@@ -26,55 +26,54 @@ export type Icon = {
2626 type : typeof IconTypes . Svg ;
2727 html : string ;
2828} ) ;
29- export type MarkerDefinition < MarkerOptions , InfoWindowOptions > = WithIdentifier < {
29+ export type MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > = WithIdentifier < {
3030 position : Point ;
3131 title : string | null ;
32- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
32+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
3333 icon ?: Icon ;
34- rawOptions ?: MarkerOptions ;
34+ rawOptions ?: BridgeMarkerOptions ;
3535 extra : Record < string , unknown > ;
3636} > ;
37- export type PolygonDefinition < PolygonOptions , InfoWindowOptions > = WithIdentifier < {
38- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
37+ export type PolygonDefinition < PolygonOptions , BridgeInfoWindowOptions > = WithIdentifier < {
38+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
3939 points : Array < Point > | Array < Array < Point > > ;
4040 title : string | null ;
4141 rawOptions ?: PolygonOptions ;
4242 extra : Record < string , unknown > ;
4343} > ;
44- export type PolylineDefinition < PolylineOptions , InfoWindowOptions > = WithIdentifier < {
45- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
44+ export type PolylineDefinition < PolylineOptions , BridgeInfoWindowOptions > = WithIdentifier < {
45+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
4646 points : Array < Point > ;
4747 title : string | null ;
4848 rawOptions ?: PolylineOptions ;
4949 extra : Record < string , unknown > ;
5050} > ;
51- export type CircleDefinition < CircleOptions , InfoWindowOptions > = WithIdentifier < {
52- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
51+ export type CircleDefinition < CircleOptions , BridgeInfoWindowOptions > = WithIdentifier < {
52+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
5353 center : Point ;
5454 radius : number ;
5555 title : string | null ;
5656 rawOptions ?: CircleOptions ;
5757 extra : Record < string , unknown > ;
5858} > ;
59- export type RectangleDefinition < RectangleOptions , InfoWindowOptions > = WithIdentifier < {
60- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
59+ export type RectangleDefinition < RectangleOptions , BridgeInfoWindowOptions > = WithIdentifier < {
60+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
6161 southWest : Point ;
6262 northEast : Point ;
6363 title : string | null ;
6464 rawOptions ?: RectangleOptions ;
6565 extra : Record < string , unknown > ;
6666} > ;
67- export type InfoWindowDefinition < InfoWindowOptions > = {
67+ export type InfoWindowDefinition < BridgeInfoWindowOptions > = {
6868 headerContent : string | null ;
6969 content : string | null ;
7070 position : Point ;
7171 opened : boolean ;
7272 autoClose : boolean ;
73- rawOptions ?: InfoWindowOptions ;
73+ rawOptions ?: BridgeInfoWindowOptions ;
7474 extra : Record < string , unknown > ;
7575} ;
76- export type InfoWindowWithoutPositionDefinition < InfoWindowOptions > = Omit < InfoWindowDefinition < InfoWindowOptions > , 'position' > ;
77- export default abstract class < MapOptions , Map , MarkerOptions , Marker , InfoWindowOptions , InfoWindow , PolygonOptions , Polygon , PolylineOptions , Polyline , CircleOptions , Circle , RectangleOptions , Rectangle > extends Controller < HTMLElement > {
76+ export default abstract class < MapOptions , BridgeMap , BridgeMarkerOptions , BridgeMarker , BridgeInfoWindowOptions , BridgeInfoWindow , BridgePolygonOptions , BridgePolygon , BridgePolylineOptions , BridgePolyline , BridgeCircleOptions , BridgeCircle , BridgeRectangleOptions , BridgeRectangle > extends Controller < HTMLElement > {
7877 static values : {
7978 providerOptions : ObjectConstructor ;
8079 center: ObjectConstructor ;
@@ -90,11 +89,11 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
9089 centerValue: Point | null ;
9190 zoomValue: number | null ;
9291 fitBoundsToMarkersValue: boolean ;
93- markersValue: Array < MarkerDefinition < MarkerOptions , InfoWindowOptions > > ;
94- polygonsValue: Array < PolygonDefinition < PolygonOptions , InfoWindowOptions > > ;
95- polylinesValue: Array < PolylineDefinition < PolylineOptions , InfoWindowOptions > > ;
96- circlesValue: Array < CircleDefinition < CircleOptions , InfoWindowOptions > > ;
97- rectanglesValue: Array < RectangleDefinition < RectangleOptions , InfoWindowOptions > > ;
92+ markersValue: Array < MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > > ;
93+ polygonsValue: Array < PolygonDefinition < BridgePolygonOptions , BridgeInfoWindowOptions > > ;
94+ polylinesValue: Array < PolylineDefinition < BridgePolylineOptions , BridgeInfoWindowOptions > > ;
95+ circlesValue: Array < CircleDefinition < BridgeCircleOptions , BridgeInfoWindowOptions > > ;
96+ rectanglesValue: Array < RectangleDefinition < BridgeRectangleOptions , BridgeInfoWindowOptions > > ;
9897 optionsValue: MapOptions ;
9998 hasCenterValue: boolean ;
10099 hasZoomValue: boolean ;
@@ -105,13 +104,13 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
105104 hasCirclesValue: boolean ;
106105 hasRectanglesValue: boolean ;
107106 hasOptionsValue: boolean ;
108- protected map : Map ;
109- protected markers : globalThis . Map < string , Marker > ;
110- protected polygons : globalThis . Map < string , Polygon > ;
111- protected polylines: globalThis . Map < string , Polyline > ;
112- protected circles : globalThis . Map < string , Circle > ;
113- protected rectangles: globalThis . Map < string , Rectangle > ;
114- protected infoWindows: Array < InfoWindow > ;
107+ protected map : BridgeMap ;
108+ protected markers : Map < string , BridgeMarker > ;
109+ protected polygons : Map < string , BridgePolygon > ;
110+ protected polylines: Map < string , BridgePolyline > ;
111+ protected circles : Map < string , BridgeCircle > ;
112+ protected rectangles: Map < string , BridgeRectangle > ;
113+ protected infoWindows: Array < BridgeInfoWindow > ;
115114 private isConnected ;
116115 private createMarker ;
117116 private createPolygon ;
@@ -121,9 +120,9 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
121120 protected abstract dispatchEvent ( name : string , payload : Record < string , unknown > ) : void ;
122121 connect ( ) : void ;
123122 createInfoWindow ( { definition, element, } : {
124- definition : InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
125- element: Marker | Polygon | Polyline | Circle | Rectangle ;
126- } ) : InfoWindow ;
123+ definition : Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
124+ element: BridgeMarker | BridgePolygon | BridgePolyline | BridgeCircle | BridgeRectangle ;
125+ } ) : BridgeInfoWindow ;
127126 abstract centerValueChanged ( ) : void ;
128127 abstract zoomValueChanged ( ) : void ;
129128 markersValueChanged ( ) : void ;
@@ -135,35 +134,35 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
135134 center : Point | null ;
136135 zoom: number | null ;
137136 options: MapOptions ;
138- } ) : Map ;
137+ } ) : BridgeMap ;
139138 protected abstract doFitBoundsToMarkers ( ) : void ;
140139 protected abstract doCreateMarker ( { definition } : {
141- definition : MarkerDefinition < MarkerOptions , InfoWindowOptions > ;
142- } ) : Marker ;
143- protected abstract doRemoveMarker ( marker : Marker ) : void ;
140+ definition : MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > ;
141+ } ) : BridgeMarker ;
142+ protected abstract doRemoveMarker ( marker : BridgeMarker ) : void ;
144143 protected abstract doCreatePolygon ( { definition } : {
145- definition : PolygonDefinition < PolygonOptions , InfoWindowOptions > ;
146- } ) : Polygon ;
147- protected abstract doRemovePolygon ( polygon : Polygon ) : void ;
144+ definition : PolygonDefinition < BridgePolygonOptions , BridgeInfoWindowOptions > ;
145+ } ) : BridgePolygon ;
146+ protected abstract doRemovePolygon ( polygon : BridgePolygon ) : void ;
148147 protected abstract doCreatePolyline ( { definition } : {
149- definition : PolylineDefinition < PolylineOptions , InfoWindowOptions > ;
150- } ) : Polyline ;
151- protected abstract doRemovePolyline ( polyline : Polyline ) : void ;
148+ definition : PolylineDefinition < BridgePolylineOptions , BridgeInfoWindowOptions > ;
149+ } ) : BridgePolyline ;
150+ protected abstract doRemovePolyline ( polyline : BridgePolyline ) : void ;
152151 protected abstract doCreateCircle ( { definition } : {
153- definition : CircleDefinition < CircleOptions , InfoWindowOptions > ;
154- } ) : Circle ;
155- protected abstract doRemoveCircle ( circle : Circle ) : void ;
152+ definition : CircleDefinition < BridgeCircleOptions , BridgeInfoWindowOptions > ;
153+ } ) : BridgeCircle ;
154+ protected abstract doRemoveCircle ( circle : BridgeCircle ) : void ;
156155 protected abstract doCreateRectangle ( { definition } : {
157- definition : RectangleDefinition < RectangleOptions , InfoWindowOptions > ;
158- } ) : Rectangle ;
159- protected abstract doRemoveRectangle ( rectangle : Rectangle ) : void ;
156+ definition : RectangleDefinition < BridgeRectangleOptions , BridgeInfoWindowOptions > ;
157+ } ) : BridgeRectangle ;
158+ protected abstract doRemoveRectangle ( rectangle : BridgeRectangle ) : void ;
160159 protected abstract doCreateInfoWindow ( { definition, element, } : {
161- definition : InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
162- element: Marker | Polygon | Polyline | Circle | Rectangle ;
163- } ) : InfoWindow ;
160+ definition : Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
161+ element: BridgeMarker | BridgePolygon | BridgePolyline | BridgeCircle | BridgeRectangle ;
162+ } ) : BridgeInfoWindow ;
164163 protected abstract doCreateIcon ( { definition, element } : {
165164 definition : Icon ;
166- element: Marker ;
165+ element: BridgeMarker ;
167166 } ) : void ;
168167 private createDrawingFactory ;
169168 private onDrawChanged ;
0 commit comments