11import { MapChange } from '@jupyter/ydoc' ;
22import {
33 IAnnotation ,
4+ IAnnotationModel ,
45 IDict ,
56 IGeoTiffSource ,
67 IHeatmapLayer ,
78 IHillshadeLayer ,
89 IImageLayer ,
910 IImageSource ,
1011 IJGISFilterItem ,
12+ IJGISFormSchemaRegistry ,
1113 IJGISLayer ,
1214 IJGISLayerDocChange ,
1315 IJGISLayerTreeDocChange ,
@@ -34,6 +36,7 @@ import {
3436import { showErrorMessage } from '@jupyterlab/apputils' ;
3537import { IObservableMap , ObservableMap } from '@jupyterlab/observables' ;
3638import { User } from '@jupyterlab/services' ;
39+ import { IStateDB } from '@jupyterlab/statedb' ;
3740import { CommandRegistry } from '@lumino/commands' ;
3841import { JSONValue , UUID } from '@lumino/coreutils' ;
3942import { ContextMenu } from '@lumino/widgets' ;
@@ -90,6 +93,7 @@ import CollaboratorPointers, { ClientPointer } from './CollaboratorPointers';
9093import { FollowIndicator } from './FollowIndicator' ;
9194import TemporalSlider from './TemporalSlider' ;
9295import { MainViewModel } from './mainviewmodel' ;
96+ import { LeftPanelComponent , RightPanelComponent } from '../panelview' ;
9397
9498type OlLayerTypes =
9599 | TileLayer
@@ -102,6 +106,9 @@ type OlLayerTypes =
102106 | ImageLayer < any > ;
103107interface IProps {
104108 viewModel : MainViewModel ;
109+ state ?: IStateDB ;
110+ formSchemaRegistry ?: IJGISFormSchemaRegistry ;
111+ annotationModel ?: IAnnotationModel ;
105112}
106113
107114interface IStates {
@@ -123,6 +130,11 @@ interface IStates {
123130export class MainView extends React . Component < IProps , IStates > {
124131 constructor ( props : IProps ) {
125132 super ( props ) ;
133+ this . _state = props . state ;
134+
135+ this . _formSchemaRegistry = props . formSchemaRegistry ;
136+
137+ this . _annotationModel = props . annotationModel ;
126138
127139 // Enforce the map to take the full available width in the case of Jupyter Notebook viewer
128140 const el = document . getElementById ( 'main-panel' ) ;
@@ -2220,6 +2232,21 @@ export class MainView extends React.Component<IProps, IStates> {
22202232 scale = { this . state . scale }
22212233 />
22222234 </ div >
2235+
2236+ { this . _state && (
2237+ < LeftPanelComponent
2238+ model = { this . _model }
2239+ commands = { this . _commands }
2240+ state = { this . _state }
2241+ > </ LeftPanelComponent >
2242+ ) }
2243+ { this . _formSchemaRegistry && this . _annotationModel && (
2244+ < RightPanelComponent
2245+ model = { this . _model }
2246+ formSchemaRegistry = { this . _formSchemaRegistry }
2247+ annotationModel = { this . _annotationModel }
2248+ > </ RightPanelComponent >
2249+ ) }
22232250 </ >
22242251 ) ;
22252252 }
@@ -2240,4 +2267,7 @@ export class MainView extends React.Component<IProps, IStates> {
22402267 private _originalFeatures : IDict < Feature < Geometry > [ ] > = { } ;
22412268 private _highlightLayer : VectorLayer < VectorSource > ;
22422269 private _updateCenter : CallableFunction ;
2270+ private _state ?: IStateDB ;
2271+ private _formSchemaRegistry ?: IJGISFormSchemaRegistry ;
2272+ private _annotationModel ?: IAnnotationModel ;
22432273}
0 commit comments