@situm/react-native 3.5.16 → 3.7.0
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 +1 -0
- package/lib/commonjs/index.js +3 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/sdk/index.js +77 -98
- package/lib/commonjs/sdk/index.js.map +1 -1
- package/lib/commonjs/sdk/nativeInterface.js.map +1 -1
- package/lib/commonjs/sdk/types/constants.js +7 -14
- package/lib/commonjs/sdk/types/constants.js.map +1 -1
- package/lib/commonjs/sdk/types/index.js +2 -4
- package/lib/commonjs/sdk/types/index.js.map +1 -1
- package/lib/commonjs/sdk/utils.js +0 -1
- package/lib/commonjs/sdk/utils.js.map +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/logError.js +1 -2
- package/lib/commonjs/utils/logError.js.map +1 -1
- package/lib/commonjs/utils/requestPermission.js +1 -2
- package/lib/commonjs/utils/requestPermission.js.map +1 -1
- package/lib/commonjs/wayfinding/components/MapView.js +38 -16
- package/lib/commonjs/wayfinding/components/MapView.js.map +1 -1
- package/lib/commonjs/wayfinding/hooks/index.js +2 -4
- package/lib/commonjs/wayfinding/hooks/index.js.map +1 -1
- package/lib/commonjs/wayfinding/index.js.map +1 -1
- package/lib/commonjs/wayfinding/store/index.js +14 -20
- package/lib/commonjs/wayfinding/store/index.js.map +1 -1
- package/lib/commonjs/wayfinding/store/utils.js +4 -5
- package/lib/commonjs/wayfinding/store/utils.js.map +1 -1
- package/lib/commonjs/wayfinding/types/constants.js +1 -2
- package/lib/commonjs/wayfinding/types/constants.js.map +1 -1
- package/lib/commonjs/wayfinding/types/index.js.map +1 -1
- package/lib/commonjs/wayfinding/utils/index.js.map +1 -1
- package/lib/commonjs/wayfinding/utils/mapper.js +18 -14
- package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/sdk/index.js +77 -98
- package/lib/module/sdk/index.js.map +1 -1
- package/lib/module/sdk/nativeInterface.js.map +1 -1
- package/lib/module/sdk/types/constants.js.map +1 -1
- package/lib/module/sdk/types/index.js.map +1 -1
- package/lib/module/sdk/utils.js +0 -1
- package/lib/module/sdk/utils.js.map +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/logError.js.map +1 -1
- package/lib/module/utils/requestPermission.js.map +1 -1
- package/lib/module/wayfinding/components/MapView.js +35 -12
- package/lib/module/wayfinding/components/MapView.js.map +1 -1
- package/lib/module/wayfinding/hooks/index.js +1 -2
- package/lib/module/wayfinding/hooks/index.js.map +1 -1
- package/lib/module/wayfinding/index.js.map +1 -1
- package/lib/module/wayfinding/store/index.js +8 -10
- package/lib/module/wayfinding/store/index.js.map +1 -1
- package/lib/module/wayfinding/store/utils.js +4 -5
- package/lib/module/wayfinding/store/utils.js.map +1 -1
- package/lib/module/wayfinding/types/constants.js.map +1 -1
- package/lib/module/wayfinding/types/index.js.map +1 -1
- package/lib/module/wayfinding/utils/index.js.map +1 -1
- package/lib/module/wayfinding/utils/mapper.js +17 -12
- package/lib/module/wayfinding/utils/mapper.js.map +1 -1
- package/lib/typescript/src/sdk/index.d.ts.map +1 -1
- package/lib/typescript/src/sdk/utils.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/components/MapView.d.ts +7 -2
- package/lib/typescript/src/wayfinding/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/store/index.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/store/utils.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/types/index.d.ts +34 -0
- package/lib/typescript/src/wayfinding/types/index.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/utils/mapper.d.ts +3 -1
- package/lib/typescript/src/wayfinding/utils/mapper.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/wayfinding/components/MapView.tsx +40 -1
- package/src/wayfinding/types/index.ts +37 -0
- package/src/wayfinding/utils/mapper.ts +14 -4
|
@@ -10,6 +10,11 @@ export interface MapViewError {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface MapViewRef {
|
|
13
|
+
/**
|
|
14
|
+
* Sets the list of favoritePois that will appear in the mapView. This method removes any previous pois from the favorite list.
|
|
15
|
+
* @param poiIds Ids of the pois you want to set as favorites. You can obtain the identifiers of your POIs by retrieving them with [SitumPlugin.fetchIndoorPOIsFromBuilding()](https://developers.situm.com/sdk_documentation/react-native/typedoc/classes/default.html#fetchIndoorPOIsFromBuilding).
|
|
16
|
+
*/
|
|
17
|
+
setFavoritePois: (poiIds: number[]) => void;
|
|
13
18
|
/**
|
|
14
19
|
* Selects the given POI in the map.
|
|
15
20
|
* @param poiId You can obtain the identifiers of your POIs by retrieving them with [SitumPlugin.fetchIndoorPOIsFromBuilding()](https://developers.situm.com/sdk_documentation/react-native/typedoc/classes/default.html#fetchIndoorPOIsFromBuilding).
|
|
@@ -57,6 +62,13 @@ export interface MapViewRef {
|
|
|
57
62
|
setOnDirectionsRequestInterceptor: (params: {
|
|
58
63
|
onDirectionsRequestInterceptor: OnDirectionsRequestInterceptor;
|
|
59
64
|
}) => void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Performs a search with the given SearchFilter.
|
|
68
|
+
*
|
|
69
|
+
* This action will have the same effect as the user searching in the searchbar.
|
|
70
|
+
*/
|
|
71
|
+
search: (searchFilter: SearchFilter) => void;
|
|
60
72
|
}
|
|
61
73
|
|
|
62
74
|
export interface WayfindingResult {
|
|
@@ -106,6 +118,16 @@ export interface OnExternalLinkClickedResult {
|
|
|
106
118
|
url: string;
|
|
107
119
|
}
|
|
108
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Result that will be returned when the list of favoritePois is updated
|
|
123
|
+
*/
|
|
124
|
+
export interface OnFavoritePoisUpdatedResult {
|
|
125
|
+
/**
|
|
126
|
+
* Array containing the list of ids of all the pois that are currently stored as favorites.
|
|
127
|
+
*/
|
|
128
|
+
currentPoisIdentifiers: number[];
|
|
129
|
+
}
|
|
130
|
+
|
|
109
131
|
export interface Destination {
|
|
110
132
|
category: string;
|
|
111
133
|
identifier?: string;
|
|
@@ -144,3 +166,18 @@ export type DirectionsMessage = {
|
|
|
144
166
|
destinationCategory: string;
|
|
145
167
|
identifier: string;
|
|
146
168
|
};
|
|
169
|
+
|
|
170
|
+
export interface SearchFilter {
|
|
171
|
+
/**
|
|
172
|
+
* Text used in the searchbar to filter and display the search results whose name or description matches the filter.
|
|
173
|
+
*
|
|
174
|
+
* An empty string will clear the current text filter (if any). A null value will apply no change.
|
|
175
|
+
*/
|
|
176
|
+
text?: string | null;
|
|
177
|
+
/**
|
|
178
|
+
* A [PoiCategory](https://developers.situm.com/sdk_documentation/react-native/typedoc/types/poicategory) identifier used to filter and display the POIs that belong to the given category.
|
|
179
|
+
*
|
|
180
|
+
* An empty string will clear the current category filter (if any). A null value will apply no change.
|
|
181
|
+
*/
|
|
182
|
+
poiCategoryIdentifier?: string | null;
|
|
183
|
+
}
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
NavigateToPoiPayload,
|
|
16
16
|
Navigation,
|
|
17
17
|
OnNavigationResult,
|
|
18
|
+
SearchFilter,
|
|
18
19
|
} from "../types";
|
|
19
20
|
|
|
20
21
|
export const createPoint = (payload: any): Point => {
|
|
@@ -86,6 +87,9 @@ const ViewerMapper = {
|
|
|
86
87
|
setLanguage: (lang: string) => {
|
|
87
88
|
return mapperWrapper("ui.set_language", lang);
|
|
88
89
|
},
|
|
90
|
+
setFavoritePois: (poiIds: number[]) => {
|
|
91
|
+
return mapperWrapper("ui.set_favorite_pois", poiIds);
|
|
92
|
+
},
|
|
89
93
|
initialConfiguration: (style: any) => {
|
|
90
94
|
return mapperWrapper("ui.initial_configuration", {
|
|
91
95
|
...(style && {
|
|
@@ -103,10 +107,10 @@ const ViewerMapper = {
|
|
|
103
107
|
});
|
|
104
108
|
},
|
|
105
109
|
setDirectionsOptions: (directionsOptions: MapViewDirectionsOptions) => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
return mapperWrapper(`directions.set_options`, {
|
|
111
|
+
includedTags: directionsOptions.includedTags,
|
|
112
|
+
excludedTags: directionsOptions.excludedTags,
|
|
113
|
+
});
|
|
110
114
|
},
|
|
111
115
|
// Location
|
|
112
116
|
location: (location: Location) => {
|
|
@@ -182,6 +186,12 @@ const ViewerMapper = {
|
|
|
182
186
|
},
|
|
183
187
|
};
|
|
184
188
|
},
|
|
189
|
+
search: (searchFilter: SearchFilter) => {
|
|
190
|
+
return mapperWrapper(`ui.set_search_filter`, {
|
|
191
|
+
text: searchFilter.text,
|
|
192
|
+
poiCategoryIdentifier: searchFilter.poiCategoryIdentifier,
|
|
193
|
+
});
|
|
194
|
+
},
|
|
185
195
|
};
|
|
186
196
|
|
|
187
197
|
export default ViewerMapper;
|