@smart-factor/gem-ui-map-component 0.0.16 → 0.0.18
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 +4 -0
- package/dist/{MapButtons-GofPtQ74.js → MapButtons-DjsRiW1d.js} +11782 -11717
- package/dist/api/services/generated/api.d.ts +70 -0
- package/dist/components/Layers/Layers.d.ts +3 -1
- package/dist/components/Map/Map.d.ts +3 -1
- package/dist/components/Map/config.d.ts +2 -1
- package/dist/components/Map/types.d.ts +4 -2
- package/dist/components/Map/utils.d.ts +2 -1
- package/dist/components/MapButtons/index.js +1 -1
- package/dist/contexts/MapInteractionsContext/MapInteractionsContextProvider.d.ts +1 -1
- package/dist/contexts/MapInteractionsContext/types.d.ts +2 -0
- package/dist/hooks/useSetupMap.d.ts +1 -1
- package/dist/main.js +2753 -2740
- package/dist/services/Map/MapService.d.ts +3 -4
- package/package.json +2 -1
|
@@ -34,6 +34,58 @@ export interface Envelope {
|
|
|
34
34
|
/** @format double */
|
|
35
35
|
area?: number;
|
|
36
36
|
}
|
|
37
|
+
export interface ErrorResponse {
|
|
38
|
+
userMessage?: string;
|
|
39
|
+
cause?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface LoginWithPasswordParams {
|
|
42
|
+
login: string;
|
|
43
|
+
password: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UserRegion {
|
|
46
|
+
uuid?: string;
|
|
47
|
+
regionSymbol?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface AppUser {
|
|
50
|
+
/** @format int32 */
|
|
51
|
+
id?: number;
|
|
52
|
+
login: string;
|
|
53
|
+
password?: string;
|
|
54
|
+
firstName?: string;
|
|
55
|
+
lastName?: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
email: string;
|
|
58
|
+
phone?: string;
|
|
59
|
+
status?: 'REQ_CONFIRM' | 'ACTIVE' | 'BLOCKED';
|
|
60
|
+
source?: 'GEM' | 'LDAP';
|
|
61
|
+
addres?: string;
|
|
62
|
+
passwordHistory?: string;
|
|
63
|
+
passwordChangeUrl?: string;
|
|
64
|
+
/** @format date-time */
|
|
65
|
+
passwordChangeExpiration?: string;
|
|
66
|
+
/** @format date-time */
|
|
67
|
+
passwordLastChange?: string;
|
|
68
|
+
userRegions?: UserRegion[];
|
|
69
|
+
userMod?: string;
|
|
70
|
+
/** @format date-time */
|
|
71
|
+
dateMod?: string;
|
|
72
|
+
consent?: boolean;
|
|
73
|
+
/** @format date-time */
|
|
74
|
+
consentExpirationDate?: string;
|
|
75
|
+
substitutedUser?: AppUser;
|
|
76
|
+
controllingInspector?: boolean;
|
|
77
|
+
rolesList?: string[];
|
|
78
|
+
userGroups?: number[];
|
|
79
|
+
}
|
|
80
|
+
export interface AuthResult {
|
|
81
|
+
result?: string;
|
|
82
|
+
token?: string;
|
|
83
|
+
userAccount?: AppUser;
|
|
84
|
+
passwordExpired?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type LoginWithPasswordData = {
|
|
87
|
+
response: AuthResult;
|
|
88
|
+
};
|
|
37
89
|
export interface Geometry {
|
|
38
90
|
envelope?: Geometry;
|
|
39
91
|
factory?: GeometryFactory;
|
|
@@ -488,4 +540,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
488
540
|
*/
|
|
489
541
|
queryRoads: (params?: RequestParams) => Promise<AxiosResponse<QueryRoadsData, any>>;
|
|
490
542
|
};
|
|
543
|
+
user: {
|
|
544
|
+
/**
|
|
545
|
+
* No description
|
|
546
|
+
*
|
|
547
|
+
* @tags /user
|
|
548
|
+
* @name LoginWithPassword
|
|
549
|
+
* @summary Logowanie
|
|
550
|
+
* @request POST:/user/login/password
|
|
551
|
+
* @secure
|
|
552
|
+
* @response `200` `LoginWithPasswordData` OK
|
|
553
|
+
* @response `400` `string` Bad Request
|
|
554
|
+
* @response `403` `ErrorResponse` Forbidden
|
|
555
|
+
* @response `404` `string` Not Found
|
|
556
|
+
* @response `406` `string` Not Acceptable
|
|
557
|
+
* @response `409` `string` Conflict
|
|
558
|
+
*/
|
|
559
|
+
loginWithPassword: (query: LoginWithPasswordParams, params?: RequestParams) => Promise<AxiosResponse<LoginWithPasswordData, any>>;
|
|
560
|
+
};
|
|
491
561
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { MapExternalProps } from './types';
|
|
2
|
-
declare const MapWithProviders: ({ mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, setOuterDrawnGeometries, }: MapExternalProps
|
|
2
|
+
declare const MapWithProviders: ({ mapLayers, caseObjectId, sidebarConfig, mapButtonsConfig, mapElementsConfig, setOuterDrawnGeometries, setOuterSelectedMapObjects, selectedFeatureIds, multiSelectEnabled, }: MapExternalProps & {
|
|
3
|
+
selectedFeatureIds?: number[];
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
export default MapWithProviders;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface SidebarConfig {
|
|
2
2
|
sidebarVisible: boolean;
|
|
3
|
-
items: Record<'isStatic' | 'plotSearch' | 'addressSearch' | 'roadNavigation' | 'mapObjectSearch' | 'mapLayers', boolean>;
|
|
3
|
+
items: Record<'isStatic' | 'plotSearch' | 'addressSearch' | 'roadNavigation' | 'mapObjectSearch' | 'mapLayers' | 'onlyGemLayers', boolean>;
|
|
4
4
|
}
|
|
5
5
|
interface MapButtonsConfig {
|
|
6
6
|
mapButtonsVisible: boolean;
|
|
@@ -11,6 +11,7 @@ interface MapElementsConfig {
|
|
|
11
11
|
items: Record<'snapBar' | 'drawCreator', boolean>;
|
|
12
12
|
}
|
|
13
13
|
export interface MapConfig {
|
|
14
|
+
multiSelectEnabled: boolean;
|
|
14
15
|
sidebarConfig: SidebarConfig;
|
|
15
16
|
mapButtonsConfig: MapButtonsConfig;
|
|
16
17
|
mapElementsConfig: MapElementsConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Feature } from 'ol';
|
|
2
2
|
import { Coordinate } from 'ol/coordinate';
|
|
3
|
-
import { Geometry as GeometryApi, LineString, Point, Polygon } from 'ol/geom';
|
|
3
|
+
import { Geometry as GeometryApi, Geometry as GeometryOl, LineString, Point, Polygon } from 'ol/geom';
|
|
4
4
|
import { Type } from 'ol/geom/Geometry';
|
|
5
5
|
import { default as VectorLayer } from 'ol/layer/Vector';
|
|
6
6
|
import { default as VectorSource } from 'ol/source/Vector';
|
|
@@ -150,7 +150,7 @@ export interface GugikGeometryResponse {
|
|
|
150
150
|
}
|
|
151
151
|
export type MapLayer = {
|
|
152
152
|
name?: string;
|
|
153
|
-
|
|
153
|
+
layer_symbol?: string;
|
|
154
154
|
layerId?: number;
|
|
155
155
|
geometryType?: string;
|
|
156
156
|
};
|
|
@@ -158,5 +158,7 @@ export type DrawnGeometryParam = Omit<Geometry, 'geometries'>[];
|
|
|
158
158
|
export interface MapExternalProps extends MapConfig {
|
|
159
159
|
mapLayers: MapLayer[];
|
|
160
160
|
setOuterDrawnGeometries?: (drawnGeometries: DrawnGeometryParam) => void;
|
|
161
|
+
setOuterSelectedMapObjects?: (selectedMapObjects: Feature<GeometryOl>[] | null) => void;
|
|
161
162
|
caseObjectId?: number;
|
|
163
|
+
selectedFeatureIds?: number[];
|
|
162
164
|
}
|
|
@@ -8,12 +8,13 @@ import { Interactions } from './refManager';
|
|
|
8
8
|
import { InfoLayersStructure, MapLayer } from './types';
|
|
9
9
|
export declare const stripPrefix: (id: string | number | undefined, prefix: string) => string | number | undefined;
|
|
10
10
|
export declare const getIsFeatureNonIntractable: (feature: Feature<Geometry>, prefix: string) => boolean;
|
|
11
|
+
export declare const includesPrefix: (id: string | number | undefined, prefix: string) => boolean;
|
|
11
12
|
export declare const deactivateInteractions: (interactions?: Interactions) => void;
|
|
12
13
|
export declare const removeFeatureSafely: (source: VectorSource<Feature<Geometry>>, selectedFeature: Feature<Geometry>) => void;
|
|
13
14
|
export declare const transformToCorrectGeometryType: (value: MapLayer[] | undefined) => {
|
|
14
15
|
geometryType: string;
|
|
15
16
|
name?: string | undefined;
|
|
16
|
-
|
|
17
|
+
layer_symbol?: string | undefined;
|
|
17
18
|
layerId?: number | undefined;
|
|
18
19
|
}[];
|
|
19
20
|
export declare const processHintStructure: (content: InfoLayersStructure) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MapInteractionsContextProps } from './types';
|
|
2
|
-
export declare const MapInteractionsProvider: ({ children, mapLayers, caseObjectId, setOuterDrawnGeometries, }: MapInteractionsContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const MapInteractionsProvider: ({ children, mapLayers, caseObjectId, setOuterDrawnGeometries, setOuterSelectedMapObjects, }: MapInteractionsContextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -40,10 +40,12 @@ export interface MapInteractionsContextValues {
|
|
|
40
40
|
onToggleShowLocation: () => void;
|
|
41
41
|
handleCollectGeometries: () => void;
|
|
42
42
|
onSmartGemSync: () => void;
|
|
43
|
+
setOuterSelectedMapObjects: MapExternalProps['setOuterSelectedMapObjects'];
|
|
43
44
|
}
|
|
44
45
|
export interface MapInteractionsContextProps {
|
|
45
46
|
children: React.ReactNode;
|
|
46
47
|
mapLayers: MapLayer[];
|
|
47
48
|
caseObjectId: number;
|
|
48
49
|
setOuterDrawnGeometries: MapExternalProps['setOuterDrawnGeometries'];
|
|
50
|
+
setOuterSelectedMapObjects: MapExternalProps['setOuterSelectedMapObjects'];
|
|
49
51
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MapLayer } from '../components/Map/types';
|
|
2
2
|
export declare const GEOLOCATION_LAYER = "geolocationLayer";
|
|
3
|
-
export declare const useSetupMap: (mapLayers: MapLayer[], caseObjectId: number) => void;
|
|
3
|
+
export declare const useSetupMap: (mapLayers: MapLayer[], caseObjectId: number, initialSelectedFeatureIds?: number[], multiSelectEnabled?: boolean) => void;
|