@smart-factor/gem-ui-map-component 0.0.19 → 0.0.21

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.
@@ -1,3 +1,3 @@
1
1
  import { MapExternalProps } from './types';
2
- declare const MapWithProviders: ({ mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, setOuterDrawnGeometries, setOuterSelectedMapObjects, selectedFeatures, multiSelectEnabled, }: MapExternalProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const MapWithProviders: ({ id, mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, setOuterDrawnGeometries, setOuterSelectedMapObjects, selectedFeatures, multiSelectEnabled, initialDrawnGeometries, }: MapExternalProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default MapWithProviders;
@@ -156,6 +156,10 @@ export type MapLayer = {
156
156
  geometryType?: string;
157
157
  };
158
158
  export type DrawnGeometryParam = Omit<Geometry, 'geometries'>[];
159
+ export type InitialDrawnGeometry = {
160
+ type: string;
161
+ coordinates: Coordinate | Coordinate[] | Coordinate[][] | Coordinate[][][];
162
+ };
159
163
  export type SelectedFeature = {
160
164
  id: number;
161
165
  road_id?: number;
@@ -171,9 +175,11 @@ export type SelectedFeature = {
171
175
  };
172
176
  };
173
177
  export interface MapExternalProps extends MapConfig {
178
+ id?: string;
174
179
  mapLayers: MapLayer[];
175
180
  setOuterDrawnGeometries?: (drawnGeometries: DrawnGeometryParam) => void;
176
181
  setOuterSelectedMapObjects?: (selectedMapObjects: Feature<GeometryOl>[] | null) => void;
177
182
  caseObjectId?: number;
178
183
  selectedFeatures?: SelectedFeature[];
184
+ initialDrawnGeometries?: InitialDrawnGeometry[];
179
185
  }
@@ -1,4 +1,4 @@
1
- import { M as f } from "../../MapButtons-CcIHdsKh.js";
1
+ import { M as f } from "../../MapButtons-S-jADkgq.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,3 +1,3 @@
1
- import { MapLayer, SelectedFeature } from '../components/Map/types';
1
+ import { InitialDrawnGeometry, MapLayer, SelectedFeature } from '../components/Map/types';
2
2
  export declare const GEOLOCATION_LAYER = "geolocationLayer";
3
- export declare const useSetupMap: (mapLayers: MapLayer[], caseObjectId: number, initialSelectedFeatures?: SelectedFeature[], multiSelectEnabled?: boolean) => void;
3
+ export declare const useSetupMap: (id: string, mapLayers: MapLayer[], caseObjectId: number, initialSelectedFeatures?: SelectedFeature[], multiSelectEnabled?: boolean, initialDrawnGeometries?: InitialDrawnGeometry[]) => void;