@@ -18,7 +18,6 @@ export interface SceneObjectStatePlain {
18
18
key ?: string ;
19
19
$timeRange ?: SceneTimeRangeLike ;
20
20
$data ?: SceneDataProvider ;
21
- $editor ?: SceneEditor ;
22
21
$variables ?: SceneVariables ;
23
22
}
24
23
@@ -43,10 +42,15 @@ export interface SceneLayoutChildOptions {
43
42
44
43
export interface SceneComponentProps < T > {
45
44
model : T ;
46
- isEditing ?: boolean ;
47
45
}
48
46
49
- export type SceneComponent < TModel > = React . FunctionComponent < SceneComponentProps < TModel > > ;
47
+ export interface SceneComponentWrapperProps {
48
+ model : SceneObject ;
49
+ children : React . ReactNode ;
50
+ }
51
+
52
+ export type SceneComponent < TModel > = ( props : SceneComponentProps < TModel > ) => React . ReactElement | null ;
53
+ export type SceneComponentCustomWrapper = ( props : SceneComponentWrapperProps ) => React . ReactElement | null ;
50
54
51
55
export interface SceneDataState extends SceneObjectStatePlain {
52
56
data ?: PanelData ;
@@ -103,9 +107,6 @@ export interface SceneObject<TState extends SceneObjectState = SceneObjectState>
103
107
/** A React component to use for rendering the object */
104
108
Component ( props : SceneComponentProps < SceneObject < TState > > ) : React . ReactElement | null ;
105
109
106
- /** To be replaced by declarative method */
107
- Editor ( props : SceneComponentProps < SceneObject < TState > > ) : React . ReactElement | null ;
108
-
109
110
/** Force a re-render, should only be needed when variable values change */
110
111
forceRender ( ) : void ;
111
112
@@ -131,24 +132,6 @@ export interface SceneLayout<T extends SceneLayoutState = SceneLayoutState> exte
131
132
getDragClassCancel ?( ) : string ;
132
133
}
133
134
134
- export interface SceneEditorState extends SceneObjectStatePlain {
135
- hoverObject ?: SceneObjectRef ;
136
- selectedObject ?: SceneObjectRef ;
137
- }
138
-
139
- export interface SceneEditor extends SceneObject < SceneEditorState > {
140
- onMouseEnterObject ( model : SceneObject ) : void ;
141
- onMouseLeaveObject ( model : SceneObject ) : void ;
142
- onSelectObject ( model : SceneObject ) : void ;
143
- getEditComponentWrapper ( ) : React . ComponentType < SceneComponentEditWrapperProps > ;
144
- }
145
-
146
- interface SceneComponentEditWrapperProps {
147
- editor : SceneEditor ;
148
- model : SceneObject ;
149
- children : React . ReactNode ;
150
- }
151
-
152
135
export interface SceneTimeRangeState extends SceneObjectStatePlain {
153
136
from : string ;
154
137
to : string ;
0 commit comments