@smart-factor/gem-ui-map-component 0.0.1
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.
- package/README.md +29 -0
- package/dist/MapButtons-Bsd6BBt9.js +94106 -0
- package/dist/api/mutations/useAssignMapRepresentation.d.ts +10 -0
- package/dist/api/queries/useGetCasesBySearch.d.ts +4 -0
- package/dist/api/queries/useGetMapRepresentation.d.ts +4 -0
- package/dist/api/queries/useGetPRGAddress.d.ts +20 -0
- package/dist/api/queries/useGetPlotBySearch.d.ts +5 -0
- package/dist/api/queryKeys.d.ts +29 -0
- package/dist/api/services/api.d.ts +3 -0
- package/dist/api/services/generated/api.d.ts +461 -0
- package/dist/components/AddressSearch/AddressSearch.d.ts +1 -0
- package/dist/components/AngleOverlay/AngleOverlay.d.ts +6 -0
- package/dist/components/AngleOverlay/AngleOverlay.styles.d.ts +3 -0
- package/dist/components/AngleOverlay/utils.d.ts +3 -0
- package/dist/components/CaseContextualSearch/CaseContextualSearch.d.ts +11 -0
- package/dist/components/CaseContextualSearch/index.d.ts +1 -0
- package/dist/components/CaseContextualSearch/useGetCasesContextual.d.ts +11 -0
- package/dist/components/DrawCreator/DrawCreator.d.ts +9 -0
- package/dist/components/DrawCreator/DrawCreator.styles.d.ts +3 -0
- package/dist/components/Layers/Layers.d.ts +2 -0
- package/dist/components/Layers/Layers.styles.d.ts +8 -0
- package/dist/components/Map/Map.d.ts +3 -0
- package/dist/components/Map/Map.styles.d.ts +29 -0
- package/dist/components/Map/config.d.ts +18 -0
- package/dist/components/Map/refManager.d.ts +65 -0
- package/dist/components/Map/types.d.ts +175 -0
- package/dist/components/Map/utils.d.ts +33 -0
- package/dist/components/MapButtons/MapButtons.d.ts +3 -0
- package/dist/components/MapButtons/index.d.ts +1 -0
- package/dist/components/MapButtons/index.js +4 -0
- package/dist/components/MapPopups/ChooseLayerModal/ChooseLayerModal.d.ts +1 -0
- package/dist/components/MapPopups/ChooseLayerModal/types.d.ts +4 -0
- package/dist/components/MapPopups/ChooseOverlappingGeometryModal/ChooseOverlappingGeometryModal.d.ts +1 -0
- package/dist/components/MapPopups/ChooseOverlappingGeometryModal/types.d.ts +6 -0
- package/dist/components/MapPopups/ConfirmDeleteModal/ConfirmDeleteModal.d.ts +1 -0
- package/dist/components/MapPopups/ConfirmDeleteModal/types.d.ts +4 -0
- package/dist/components/MapPopups/ConfirmDrawingModal/ConfirmDrawingModal.d.ts +1 -0
- package/dist/components/MapPopups/ConfirmDrawingModal/types.d.ts +4 -0
- package/dist/components/MapPopups/LayersInfoDrawer/LayersInfoDrawer.d.ts +1 -0
- package/dist/components/MapPopups/LayersInfoDrawer/types.d.ts +4 -0
- package/dist/components/MapPopups/MapPopups.d.ts +2 -0
- package/dist/components/MapPopups/styles.d.ts +13 -0
- package/dist/components/MapRepresentationSearch/MapRepresentationSearch.d.ts +1 -0
- package/dist/components/MapSidebar/MapSidebar.d.ts +2 -0
- package/dist/components/MapSidebar/MapSidebar.style.d.ts +20 -0
- package/dist/components/MapSidebar/index.d.ts +1 -0
- package/dist/components/Navigation/Navigation.d.ts +2 -0
- package/dist/components/Navigation/Navigation.styles.d.ts +3 -0
- package/dist/components/Navigation/NavigationContext.d.ts +29 -0
- package/dist/components/Navigation/RoadInputs.d.ts +1 -0
- package/dist/components/PlotSearch/PlotSearch.d.ts +1 -0
- package/dist/components/QueryClientProvider/QueryClientProvider.d.ts +6 -0
- package/dist/components/SnapConfigBar/SnapConfigBar.d.ts +1 -0
- package/dist/components/SnapConfigBar/SnapConfigBar.styles.d.ts +8 -0
- package/dist/constants/geometryTypes.d.ts +14 -0
- package/dist/constants/snapInteractionsTypes.d.ts +7 -0
- package/dist/constants/snapTypes.d.ts +5 -0
- package/dist/constants/style.d.ts +2 -0
- package/dist/contexts/MapInteractionsContext/MapInteractionsContextProvider.d.ts +6 -0
- package/dist/contexts/MapInteractionsContext/index.d.ts +2 -0
- package/dist/contexts/MapInteractionsContext/types.d.ts +41 -0
- package/dist/contexts/MapInteractionsContext/useMapInteractionsContext.d.ts +3 -0
- package/dist/contexts/MapOverlaysAndPopupsContext.d.ts +19 -0
- package/dist/contexts/MapPopupContext/MapPopupContext.d.ts +8 -0
- package/dist/contexts/MapPopupContext/types.d.ts +20 -0
- package/dist/helpers.d.ts +2 -0
- package/dist/hooks/useDebounce.d.ts +1 -0
- package/dist/hooks/useDelayedOpenAndClose.d.ts +1 -0
- package/dist/hooks/useMapGeolocation.d.ts +2 -0
- package/dist/hooks/useSetupMap.d.ts +3 -0
- package/dist/hooks/useTimeoutDebounce.d.ts +4 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +11363 -0
- package/dist/providers/GemUIMapComponentProvider.d.ts +4 -0
- package/dist/services/EventEmitter.d.ts +7 -0
- package/dist/services/Layers/LayersService.d.ts +34 -0
- package/dist/services/Map/MapService.d.ts +70 -0
- package/dist/services/Map/types.d.ts +96 -0
- package/dist/services/Navigation/NavigationService.d.ts +12 -0
- package/dist/snap/helpers.d.ts +7 -0
- package/dist/snap/snap.d.ts +12 -0
- package/dist/snap/types.d.ts +49 -0
- package/package.json +107 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class TypedEventEmitter<Events extends Record<string, unknown>> {
|
|
2
|
+
private emitter;
|
|
3
|
+
constructor();
|
|
4
|
+
emit<Key extends keyof Events>(event: Key, ...args: Events[Key] extends void ? [] : [Events[Key]?]): boolean;
|
|
5
|
+
on<Key extends keyof Events>(event: Key, listener: (arg: Events[Key]) => void): this;
|
|
6
|
+
off<Key extends keyof Events>(event: Key, listener?: (arg: Events[Key]) => void): this;
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GEMLayer, GEMLayerTreeItem, LayersEvents, ProcessedGEMLayer, WMSLayerDetailed } from '../../components/Map/types';
|
|
2
|
+
import { TypedEventEmitter } from '../EventEmitter';
|
|
3
|
+
declare class LayersService {
|
|
4
|
+
private selectedLayers;
|
|
5
|
+
private selectedLayersSymbols;
|
|
6
|
+
layersEventEmitters: TypedEventEmitter<LayersEvents>;
|
|
7
|
+
queryGEMLayers(): Promise<import('axios').AxiosResponse<{
|
|
8
|
+
response: {
|
|
9
|
+
data: GEMLayer[];
|
|
10
|
+
};
|
|
11
|
+
}, any>>;
|
|
12
|
+
querySelectedLayers(symbol: string): Promise<import('axios').AxiosResponse<any, any>>;
|
|
13
|
+
saveLayersConfig(value: string, symbol: string): Promise<import('axios').AxiosResponse<any, any>>;
|
|
14
|
+
setSelectedLayers(layers: (GEMLayer | WMSLayerDetailed)[]): void;
|
|
15
|
+
addLayersToSelected(layers: (GEMLayer | WMSLayerDetailed)[]): void;
|
|
16
|
+
removeLayersFromSelected(layers: (GEMLayer | WMSLayerDetailed)[]): void;
|
|
17
|
+
getSelectedLayersSymbols(): string[];
|
|
18
|
+
queryLayersByKeys(unprocessedLayers: GEMLayer[], checkedLayersKeys: string[]): GEMLayer[];
|
|
19
|
+
processLayersStructure(layers: GEMLayer[], selectedLayerIds: string[]): {
|
|
20
|
+
id: string;
|
|
21
|
+
parent: string;
|
|
22
|
+
label: string;
|
|
23
|
+
config: import('../Map/types').GEMLayerConfig;
|
|
24
|
+
checked: boolean;
|
|
25
|
+
}[];
|
|
26
|
+
createTreeItems(flatLayers: ProcessedGEMLayer[]): GEMLayerTreeItem[];
|
|
27
|
+
onNodeCheck(nodeId: string, checked: boolean, treeItems: GEMLayerTreeItem[]): GEMLayerTreeItem[];
|
|
28
|
+
getCheckedLayers(treeItems: GEMLayerTreeItem[], unprocessedLayers: GEMLayer[]): GEMLayer[];
|
|
29
|
+
getCheckedLayerIds(treeItems: GEMLayerTreeItem[]): string[];
|
|
30
|
+
filterTree(nodes: GEMLayerTreeItem[], searchTerm: string): GEMLayerTreeItem[];
|
|
31
|
+
private filterNode;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: LayersService;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Map } from 'ol';
|
|
2
|
+
import { Coordinate } from 'ol/coordinate';
|
|
3
|
+
import { default as Feature } from 'ol/Feature';
|
|
4
|
+
import { Geometry as GeometryOl } from 'ol/geom';
|
|
5
|
+
import { Type } from 'ol/geom/Geometry';
|
|
6
|
+
import { default as VectorLayer } from 'ol/layer/Vector';
|
|
7
|
+
import { default as VectorSource } from 'ol/source/Vector';
|
|
8
|
+
import { Style } from 'ol/style';
|
|
9
|
+
import { Geometry as GeometryApi } from '../../api/services/generated/api';
|
|
10
|
+
import { GEMRoadNetDetails, GeometryEvents, ItemPositionResponse, MapEvents, SnapEvents, VectorLayerType } from '../../components/Map/types';
|
|
11
|
+
import { TypedEventEmitter } from '../EventEmitter';
|
|
12
|
+
import { GEMFeature, GEMLayerConfig, GEMVectorLayer, GroupedWMSLayer, QueryMapItemsPayload, StyleDefinition, WMSLayer, WMSLayerConfig } from './types';
|
|
13
|
+
declare class MapService {
|
|
14
|
+
projectionConst: {
|
|
15
|
+
EPSG_2180: string;
|
|
16
|
+
EPSG_3857: string;
|
|
17
|
+
};
|
|
18
|
+
private imageScale;
|
|
19
|
+
private mapItemsCache;
|
|
20
|
+
private abortController;
|
|
21
|
+
private debounceTimeout;
|
|
22
|
+
mapEventEmitter: TypedEventEmitter<MapEvents>;
|
|
23
|
+
geometryEventEmitter: TypedEventEmitter<GeometryEvents>;
|
|
24
|
+
snapEventEmitter: TypedEventEmitter<SnapEvents>;
|
|
25
|
+
constructor();
|
|
26
|
+
queryConfig(symbol: string): Promise<import('axios').AxiosResponse<any, any>>;
|
|
27
|
+
queryMapItemsDebounced(payload: QueryMapItemsPayload, options?: {
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
}, debounceTime?: number): Promise<GEMVectorLayer[]>;
|
|
30
|
+
clearCache(key?: string): void;
|
|
31
|
+
getMapExtent(map: Map): {
|
|
32
|
+
type: string;
|
|
33
|
+
coordinates: Coordinate[][];
|
|
34
|
+
crs: {
|
|
35
|
+
type: string;
|
|
36
|
+
properties: {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
createFeatures(featureList: GEMFeature[], style: StyleDefinition, image: GEMVectorLayer['image']): Feature<GeometryOl>[];
|
|
42
|
+
createFeature(feature: GEMFeature, style: StyleDefinition, image: GEMVectorLayer['image'], imageScale?: number | null): Feature<GeometryOl>;
|
|
43
|
+
createLayer(style?: StyleDefinition): VectorLayer<VectorSource<Feature<GeometryOl>>, Feature<GeometryOl>>;
|
|
44
|
+
createEmptyVectorLayer(layer_symbol: string): VectorLayer<VectorSource<Feature<GeometryOl>>, Feature<GeometryOl>>;
|
|
45
|
+
createVectorLayer(layer: GEMVectorLayer, type: string, imageScale: number, config?: GEMLayerConfig | WMSLayerConfig): VectorLayer<VectorSource<Feature<GeometryOl>>, Feature<GeometryOl>>;
|
|
46
|
+
groupWMSServices(layers: WMSLayer[]): GroupedWMSLayer[];
|
|
47
|
+
processStyle(styleDefinition: StyleDefinition, imageSrc: string | null): Style;
|
|
48
|
+
queryNetsByRoadId(roadId: number): Promise<import('axios').AxiosResponse<{
|
|
49
|
+
response: GEMRoadNetDetails[];
|
|
50
|
+
}, any>>;
|
|
51
|
+
queryPointIconPositionFromCoords(coords: Coordinate): Promise<{
|
|
52
|
+
response: ItemPositionResponse;
|
|
53
|
+
}>;
|
|
54
|
+
createPurposeGeometry(caseObjectId: number, geometry: Partial<GeometryApi>, layerId: number): Promise<import('axios').AxiosResponse<any, any>>;
|
|
55
|
+
updatePurposeGeometry(id: number, mapRepresentationId: number, geometry: Partial<GeometryApi>, layerId: number): Promise<import('axios').AxiosResponse<any, any>>;
|
|
56
|
+
deletePurposeGeometry(id: number, mapRepresentationId: number): Promise<import('axios').AxiosResponse<any, any>>;
|
|
57
|
+
getPurposeGeometry(caseObjectId: number): Promise<import('axios').AxiosResponse<import('../../api/services/generated/api').QueryMapRepresentationsByCaseObjectIdData, any>>;
|
|
58
|
+
validatePurposeGeometry(geometry: Partial<GeometryApi>): Promise<{
|
|
59
|
+
response: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
getDefaultStyle(feature?: Feature<GeometryOl>, isNonEditable?: boolean): any;
|
|
62
|
+
getSelectStyle(feature: Feature<GeometryOl>): any[] | Style;
|
|
63
|
+
queryHoverStyles(): Record<Type, Style>;
|
|
64
|
+
getHoverStyle(feature: Feature<GeometryOl>): any[] | Style | undefined;
|
|
65
|
+
removeHoverStyle(feature: Feature<GeometryOl>): any;
|
|
66
|
+
filterLayersByFeatureId(id: string, layers: VectorLayerType[]): VectorLayerType[];
|
|
67
|
+
findLayerByFeatureId(id: string, layers: VectorLayerType[]): VectorLayerType | undefined;
|
|
68
|
+
}
|
|
69
|
+
declare const _default: MapService;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Coordinate } from 'ol/coordinate';
|
|
2
|
+
import { Geometry } from 'ol/geom';
|
|
3
|
+
export interface WMSLayer {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
projection: string;
|
|
7
|
+
type: string;
|
|
8
|
+
url: string;
|
|
9
|
+
use_cors: boolean;
|
|
10
|
+
version: string;
|
|
11
|
+
zIndex: number;
|
|
12
|
+
}
|
|
13
|
+
export type WMSLayerConfig = {
|
|
14
|
+
type: 'WMS';
|
|
15
|
+
symbol: string;
|
|
16
|
+
url: string;
|
|
17
|
+
use_cors: boolean;
|
|
18
|
+
read_only: boolean;
|
|
19
|
+
creatable_por: string;
|
|
20
|
+
min_zoom: number;
|
|
21
|
+
max_zoom: number;
|
|
22
|
+
declutter: boolean;
|
|
23
|
+
format: string;
|
|
24
|
+
projection: string;
|
|
25
|
+
version: string;
|
|
26
|
+
layerOrder: number;
|
|
27
|
+
geomType: string;
|
|
28
|
+
mlv_id: number;
|
|
29
|
+
visible_for_rlo: boolean;
|
|
30
|
+
};
|
|
31
|
+
export interface GroupedWMSLayer extends Omit<WMSLayer, 'name'> {
|
|
32
|
+
layers: string[];
|
|
33
|
+
}
|
|
34
|
+
export type GEMLayerConfig = {
|
|
35
|
+
creatable_por: boolean;
|
|
36
|
+
declutter: boolean;
|
|
37
|
+
format: string | null;
|
|
38
|
+
geomType: 'POINT' | 'LINESTRING' | 'POLYGON';
|
|
39
|
+
layerOrder: number;
|
|
40
|
+
max_zoom: number;
|
|
41
|
+
min_zoom: number;
|
|
42
|
+
mlv_id: number;
|
|
43
|
+
projection: string | null;
|
|
44
|
+
read_only: boolean;
|
|
45
|
+
symbol: string;
|
|
46
|
+
type: 'GEM' | 'WMS' | 'VECTOR' | 'RASTR';
|
|
47
|
+
url: string | null;
|
|
48
|
+
use_cors: boolean;
|
|
49
|
+
version: string | null;
|
|
50
|
+
visible_for_rlo: boolean;
|
|
51
|
+
};
|
|
52
|
+
export type GEMVectorLayer = {
|
|
53
|
+
image: string | null;
|
|
54
|
+
items: GEMFeature[];
|
|
55
|
+
layer_style: StyleDefinition;
|
|
56
|
+
layer_symbol: string;
|
|
57
|
+
};
|
|
58
|
+
export type StyleDefinition = {
|
|
59
|
+
fill: string;
|
|
60
|
+
radius: string;
|
|
61
|
+
rotateWithView?: boolean;
|
|
62
|
+
rotation?: number;
|
|
63
|
+
styleDefinition?: boolean;
|
|
64
|
+
stroke: {
|
|
65
|
+
color: string;
|
|
66
|
+
width?: string;
|
|
67
|
+
lineDash?: number[];
|
|
68
|
+
lineCap?: CanvasLineCap;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type GEMFeature = {
|
|
72
|
+
id: number;
|
|
73
|
+
road_id: number;
|
|
74
|
+
item_style: StyleDefinition | null;
|
|
75
|
+
image: string | null;
|
|
76
|
+
text: string | null;
|
|
77
|
+
ref_id: number | null;
|
|
78
|
+
parent_id: number | null;
|
|
79
|
+
geometry: Geometry;
|
|
80
|
+
};
|
|
81
|
+
type Bbox = {
|
|
82
|
+
coordinates: Coordinate[][];
|
|
83
|
+
crs: {
|
|
84
|
+
properties: {
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
89
|
+
type: string;
|
|
90
|
+
};
|
|
91
|
+
export type QueryMapItemsPayload = {
|
|
92
|
+
layerList: string[];
|
|
93
|
+
bbox: Bbox;
|
|
94
|
+
zoom: number;
|
|
95
|
+
};
|
|
96
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GEMRoad, GEMRoadNetResponse, NavigationEvents } from '../../components/Map/types';
|
|
2
|
+
import { TypedEventEmitter } from '../EventEmitter';
|
|
3
|
+
declare class NavigationService {
|
|
4
|
+
navigationEventEmitter: TypedEventEmitter<NavigationEvents>;
|
|
5
|
+
constructor();
|
|
6
|
+
queryRoadsInformation(): Promise<import('axios').AxiosResponse<{
|
|
7
|
+
response: GEMRoad[];
|
|
8
|
+
}, any>>;
|
|
9
|
+
queryRoadNets(roadId: number): Promise<import('axios').AxiosResponse<GEMRoadNetResponse, any>>;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: NavigationService;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Collection, Feature } from 'ol';
|
|
2
|
+
import { Coordinate } from 'ol/coordinate';
|
|
3
|
+
import { FindInteractionProps, QuerySnapProps, RemoveInteractionProps } from './types';
|
|
4
|
+
export declare const removeInteraction: ({ type, map }: RemoveInteractionProps) => void;
|
|
5
|
+
export declare const findInteraction: ({ type, interactions, }: FindInteractionProps) => import('ol/interaction/Interaction').default | undefined;
|
|
6
|
+
export declare const createAngleFeatures: (points: Coordinate[]) => Collection<Feature<import('ol/geom').Geometry>>;
|
|
7
|
+
export declare const querySnapPoints: ({ interactLayers, type }: QuerySnapProps) => Collection<Feature<import('ol/geom').Geometry>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Collection, Feature } from 'ol';
|
|
2
|
+
import { default as Select } from 'ol/interaction/Select';
|
|
3
|
+
import { default as Snap } from 'ol/interaction/Snap';
|
|
4
|
+
import { default as VectorLayer } from 'ol/layer/Vector';
|
|
5
|
+
import { Vector } from 'ol/source';
|
|
6
|
+
import { AddAdditionalSnapProps, AddAngleSnapProps, CreateHoverSnapLayer, RemoveHoverSnapLayerProps } from './types';
|
|
7
|
+
export declare const initializeSnapInteraction: (features: Collection<Feature>) => Snap;
|
|
8
|
+
export declare const addAdditionalSnapInteraction: ({ interactLayers, map, pixelTolerance, type, }: AddAdditionalSnapProps) => void;
|
|
9
|
+
export declare const addAngleSnapInteraction: ({ map, points, pixelTolerance, type, }: AddAngleSnapProps) => void;
|
|
10
|
+
export declare const createHoverSnapLayer: ({ features, type, }: CreateHoverSnapLayer) => VectorLayer<Vector<Feature<import('ol/geom').Geometry>>, Feature<import('ol/geom').Geometry>>;
|
|
11
|
+
export declare const removeHoverSnapLayer: ({ interactSnapLayers, type, map, }: RemoveHoverSnapLayerProps) => void;
|
|
12
|
+
export declare const initializeHoverSnapInteraction: (layers: VectorLayer[], pixelTolerance: number) => Select;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Collection, Feature, Map } from 'ol';
|
|
2
|
+
import { Coordinate } from 'ol/coordinate';
|
|
3
|
+
import { default as Interaction } from 'ol/interaction/Interaction';
|
|
4
|
+
import { default as VectorLayer } from 'ol/layer/Vector';
|
|
5
|
+
export interface AddAdditionalSnapProps {
|
|
6
|
+
interactLayers: VectorLayer[];
|
|
7
|
+
map: Map;
|
|
8
|
+
pixelTolerance: number;
|
|
9
|
+
type: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AddAngleSnapProps {
|
|
12
|
+
map: Map;
|
|
13
|
+
points: Coordinate[];
|
|
14
|
+
pixelTolerance: number;
|
|
15
|
+
type: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateHoverSnapLayer {
|
|
18
|
+
features: Collection<Feature>;
|
|
19
|
+
type: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RemoveInteractionProps {
|
|
22
|
+
type: string;
|
|
23
|
+
map: Map;
|
|
24
|
+
}
|
|
25
|
+
export interface FindInteractionProps {
|
|
26
|
+
type: string;
|
|
27
|
+
interactions: Interaction[];
|
|
28
|
+
}
|
|
29
|
+
export interface QuerySnapProps {
|
|
30
|
+
interactLayers: VectorLayer[];
|
|
31
|
+
type: string;
|
|
32
|
+
}
|
|
33
|
+
export interface InitializeAdditionalSnapProps {
|
|
34
|
+
features: Collection<Feature>;
|
|
35
|
+
map: Map;
|
|
36
|
+
pixelTolerance: number;
|
|
37
|
+
type: string;
|
|
38
|
+
}
|
|
39
|
+
export interface InitializeAngleSnapProps {
|
|
40
|
+
features: Collection<Feature>;
|
|
41
|
+
map: Map;
|
|
42
|
+
pixelTolerance: number;
|
|
43
|
+
type: string;
|
|
44
|
+
}
|
|
45
|
+
export interface RemoveHoverSnapLayerProps {
|
|
46
|
+
interactSnapLayers: VectorLayer[];
|
|
47
|
+
type: string;
|
|
48
|
+
map: Map;
|
|
49
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@smart-factor/gem-ui-map-component",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Gem UI Map Component",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"module": "./dist/main.js",
|
|
8
|
+
"exports": "./dist/main.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"types": "./dist/main.d.ts",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && vite build",
|
|
16
|
+
"watch": "vite build --watch",
|
|
17
|
+
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --report-unused-disable-directives --max-warnings 0",
|
|
18
|
+
"lint:fix": "eslint 'src/**/*.{js,jsx,ts,tsx}' --fix",
|
|
19
|
+
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,css,md}' --ignore-unknown",
|
|
20
|
+
"storybook": "storybook dev -p 6006",
|
|
21
|
+
"build-storybook": "storybook build",
|
|
22
|
+
"test": "vitest",
|
|
23
|
+
"test:ui": "vitest --ui",
|
|
24
|
+
"test:coverage": "vitest run --coverage",
|
|
25
|
+
"prepare": "husky",
|
|
26
|
+
"knip": "knip"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^18.3.1",
|
|
30
|
+
"react-dom": "^18.3.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@chromatic-com/storybook": "^1.6.1",
|
|
34
|
+
"@storybook/addon-essentials": "^8.2.4",
|
|
35
|
+
"@storybook/addon-interactions": "^8.2.4",
|
|
36
|
+
"@storybook/addon-links": "^8.2.4",
|
|
37
|
+
"@storybook/blocks": "^8.2.4",
|
|
38
|
+
"@storybook/react": "^8.2.4",
|
|
39
|
+
"@storybook/react-vite": "^8.2.4",
|
|
40
|
+
"@storybook/test": "^8.2.4",
|
|
41
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
42
|
+
"@testing-library/react": "^16.0.0",
|
|
43
|
+
"@testing-library/user-event": "^14.5.2",
|
|
44
|
+
"@types/node": "^20.14.9",
|
|
45
|
+
"@types/proj4": "^2.5.6",
|
|
46
|
+
"@types/qs": "^6.9.18",
|
|
47
|
+
"@types/react": "^18.3.3",
|
|
48
|
+
"@types/react-dom": "^18.3.0",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
|
50
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
51
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
52
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
53
|
+
"@vitest/ui": "^2.0.5",
|
|
54
|
+
"eslint": "^8.57.0",
|
|
55
|
+
"eslint-config-prettier": "^9.1.0",
|
|
56
|
+
"eslint-plugin-react": "^7.34.2",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
58
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
|
59
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
60
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
61
|
+
"glob": "10.3.12",
|
|
62
|
+
"jsdom": "^24.1.0",
|
|
63
|
+
"knip": "^5.43.6",
|
|
64
|
+
"prettier": "^3.4.2",
|
|
65
|
+
"storybook": "^8.2.4",
|
|
66
|
+
"typescript": "5.4.5",
|
|
67
|
+
"vite": "^5.3.1",
|
|
68
|
+
"vite-plugin-dts": "^4.0.0-beta.2",
|
|
69
|
+
"vite-plugin-lib-inject-css": "2.0.1",
|
|
70
|
+
"vitest": "^2.0.3"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@emotion/react": "^11.13.0",
|
|
74
|
+
"@emotion/styled": "^11.13.0",
|
|
75
|
+
"@hookform/resolvers": "^3.9.0",
|
|
76
|
+
"@mui/icons-material": "^5.15.21",
|
|
77
|
+
"@mui/material": "^5.16.7",
|
|
78
|
+
"@mui/system": "^5.16.7",
|
|
79
|
+
"@smart-factor/gem-ui-components": "^0.0.51",
|
|
80
|
+
"@tanstack/react-query": "^5.49.2",
|
|
81
|
+
"@turf/bearing": "^7.1.0",
|
|
82
|
+
"@turf/center": "^7.1.0",
|
|
83
|
+
"@turf/destination": "^7.1.0",
|
|
84
|
+
"@turf/distance": "^7.1.0",
|
|
85
|
+
"@turf/helpers": "^7.1.0",
|
|
86
|
+
"axios": "^1.7.9",
|
|
87
|
+
"eventemitter3": "^5.0.1",
|
|
88
|
+
"husky": "^9.1.4",
|
|
89
|
+
"lint-staged": "^15.2.8",
|
|
90
|
+
"lodash-es": "^4.17.21",
|
|
91
|
+
"ol": "^10.2.1",
|
|
92
|
+
"proj4": "^2.12.0",
|
|
93
|
+
"qs": "^6.14.0",
|
|
94
|
+
"react-hook-form": "^7.53.0",
|
|
95
|
+
"react-router-dom": "^6.26.0",
|
|
96
|
+
"zod": "^3.23.8"
|
|
97
|
+
},
|
|
98
|
+
"lint-staged": {
|
|
99
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
100
|
+
"npm run lint:fix",
|
|
101
|
+
"npm run format"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
}
|
|
107
|
+
}
|