@situm/react-native 3.15.0-beta.4 → 3.15.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.
Files changed (65) hide show
  1. package/lib/commonjs/index.js +72 -0
  2. package/lib/commonjs/index.js.map +1 -0
  3. package/lib/commonjs/sdk/index.js +930 -0
  4. package/lib/commonjs/sdk/index.js.map +1 -1
  5. package/lib/commonjs/sdk/internaDelegatedState.js +48 -0
  6. package/lib/commonjs/sdk/internaDelegatedState.js.map +1 -0
  7. package/lib/commonjs/sdk/nativeInterface.js +20 -0
  8. package/lib/commonjs/sdk/nativeInterface.js.map +1 -0
  9. package/lib/commonjs/sdk/types/constants.js +73 -0
  10. package/lib/commonjs/sdk/types/index.js +414 -0
  11. package/lib/commonjs/sdk/types/index.js.map +1 -0
  12. package/lib/commonjs/sdk/utils.js +156 -0
  13. package/lib/commonjs/sdk/utils.js.map +1 -0
  14. package/lib/commonjs/utils/index.js +17 -0
  15. package/lib/commonjs/utils/logError.js +21 -0
  16. package/lib/commonjs/utils/logError.js.map +1 -0
  17. package/lib/commonjs/wayfinding/components/MapView.js +388 -0
  18. package/lib/commonjs/wayfinding/components/MapView.js.map +1 -0
  19. package/lib/commonjs/wayfinding/hooks/index.js +233 -0
  20. package/lib/commonjs/wayfinding/hooks/index.js.map +1 -0
  21. package/lib/commonjs/wayfinding/index.js +57 -0
  22. package/lib/commonjs/wayfinding/store/index.js +246 -0
  23. package/lib/commonjs/wayfinding/store/index.js.map +1 -0
  24. package/lib/commonjs/wayfinding/store/utils.js +49 -0
  25. package/lib/commonjs/wayfinding/types/constants.js +13 -0
  26. package/lib/commonjs/wayfinding/types/index.js +6 -0
  27. package/lib/commonjs/wayfinding/types/index.js.map +1 -0
  28. package/lib/commonjs/wayfinding/utils/index.js +12 -0
  29. package/lib/commonjs/wayfinding/utils/mapper.js +204 -0
  30. package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -0
  31. package/lib/module/index.js +14 -0
  32. package/lib/module/index.js.map +1 -0
  33. package/lib/module/sdk/index.js +904 -0
  34. package/lib/module/sdk/index.js.map +1 -1
  35. package/lib/module/sdk/internaDelegatedState.js +43 -0
  36. package/lib/module/sdk/internaDelegatedState.js.map +1 -0
  37. package/lib/module/sdk/nativeInterface.js +20 -0
  38. package/lib/module/sdk/nativeInterface.js.map +1 -0
  39. package/lib/module/sdk/types/constants.js +70 -0
  40. package/lib/module/sdk/types/index.js +445 -0
  41. package/lib/module/sdk/types/index.js.map +1 -0
  42. package/lib/module/sdk/utils.js +146 -0
  43. package/lib/module/sdk/utils.js.map +1 -0
  44. package/lib/module/utils/index.js +4 -0
  45. package/lib/module/utils/logError.js +17 -0
  46. package/lib/module/utils/logError.js.map +1 -0
  47. package/lib/module/wayfinding/components/MapView.js +381 -0
  48. package/lib/module/wayfinding/components/MapView.js.map +1 -0
  49. package/lib/module/wayfinding/hooks/index.js +226 -0
  50. package/lib/module/wayfinding/hooks/index.js.map +1 -0
  51. package/lib/module/wayfinding/index.js +15 -0
  52. package/lib/module/wayfinding/store/index.js +213 -0
  53. package/lib/module/wayfinding/store/index.js.map +1 -0
  54. package/lib/module/wayfinding/store/utils.js +40 -0
  55. package/lib/module/wayfinding/types/constants.js +9 -0
  56. package/lib/module/wayfinding/types/index.js +4 -0
  57. package/lib/module/wayfinding/types/index.js.map +1 -0
  58. package/lib/module/wayfinding/utils/index.js +7 -0
  59. package/lib/module/wayfinding/utils/index.js.map +1 -0
  60. package/lib/module/wayfinding/utils/mapper.js +195 -0
  61. package/lib/module/wayfinding/utils/mapper.js.map +1 -0
  62. package/lib/typescript/sdk/index.d.ts +2 -2
  63. package/lib/typescript/sdk/index.d.ts.map +1 -1
  64. package/package.json +5 -5
  65. package/src/sdk/index.ts +12 -3
@@ -0,0 +1,388 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeWebview = _interopRequireDefault(require("react-native-webview"));
10
+ var _sdk = _interopRequireDefault(require("../../sdk"));
11
+ var _hooks = _interopRequireDefault(require("../hooks"));
12
+ var _constants = require("../types/constants");
13
+ var _utils = require("../utils");
14
+ var _mapper = _interopRequireDefault(require("../utils/mapper"));
15
+ var _store = require("../store");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
19
+ /* eslint-disable @typescript-eslint/no-empty-function */
20
+ /* eslint-disable @typescript-eslint/no-explicit-any */
21
+
22
+ const SITUM_BASE_DOMAIN = "https://maps.situm.com";
23
+ const NETWORK_ERROR_CODE = {
24
+ android: -2,
25
+ ios: -1009,
26
+ // These platforms are unhandled
27
+ windows: 0,
28
+ macos: 0,
29
+ web: 0
30
+ };
31
+ const viewerStyles = _reactNative.StyleSheet.create({
32
+ webview: {
33
+ minHeight: "100%",
34
+ minWidth: "100%"
35
+ }
36
+ });
37
+ const MapView = /*#__PURE__*/_react.default.forwardRef(({
38
+ configuration,
39
+ style,
40
+ onLoad = () => {},
41
+ onLoadError = () => {},
42
+ onPoiSelected = () => {},
43
+ onPoiDeselected = () => {},
44
+ onFloorChanged = () => {},
45
+ onExternalLinkClicked = undefined,
46
+ onFavoritePoisUpdated = () => {}
47
+ }, ref) => {
48
+ const webViewRef = (0, _react.useRef)(null);
49
+ const [_onDirectionsRequestInterceptor, setInterceptor] = (0, _react.useState)();
50
+
51
+ // Local states
52
+ const [mapLoaded, setMapLoaded] = (0, _react.useState)(false);
53
+ const [buildingIdentifier, setBuildingIdentifier] = (0, _react.useState)(configuration.buildingIdentifier);
54
+ const {
55
+ init,
56
+ location,
57
+ locationStatus,
58
+ directions,
59
+ navigation,
60
+ calculateRoute,
61
+ startNavigation,
62
+ stopNavigation,
63
+ error
64
+ } = (0, _hooks.default)();
65
+ const sendFollowUser = () => {
66
+ if (webViewRef.current && mapLoaded && location?.position?.buildingIdentifier === configuration.buildingIdentifier) {
67
+ _followUser(true);
68
+ }
69
+ };
70
+
71
+ // Helper functions used on imperative handler
72
+ // Navigation
73
+ const _navigateToPoi = (0, _react.useCallback)(payload => {
74
+ if (!webViewRef.current || !payload || !payload.identifier) return;
75
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.navigateToPoi(payload));
76
+ }, []);
77
+ const _followUser = (0, _react.useCallback)(payload => {
78
+ if (!webViewRef.current) return;
79
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.followUser(payload));
80
+ }, []);
81
+ const _navigateToCar = (0, _react.useCallback)(payload => {
82
+ if (!webViewRef.current) return;
83
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.navigateToCar(payload));
84
+ }, []);
85
+ const _navigateToPoint = (0, _react.useCallback)(payload => {
86
+ if (!webViewRef.current || !payload?.lat && !payload?.lng && !payload?.floorIdentifier) return;
87
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.navigateToPoint(payload));
88
+ }, []);
89
+
90
+ // Cartography
91
+ const _selectPoi = (0, _react.useCallback)(poiId => {
92
+ if (!webViewRef.current) {
93
+ return;
94
+ }
95
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.selectPoi(poiId));
96
+ }, []);
97
+ const _selectCar = (0, _react.useCallback)(() => {
98
+ if (!webViewRef.current) {
99
+ return;
100
+ }
101
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.selectCar());
102
+ }, []);
103
+ const _selectPoiCategory = (0, _react.useCallback)(categoryId => {
104
+ if (!webViewRef.current) {
105
+ return;
106
+ }
107
+ if (_sdk.default.navigationIsRunning()) {
108
+ console.error("Situm > hook > Navigation on course, poi category selection is unavailable");
109
+ return;
110
+ }
111
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.selectPoiCategory(categoryId));
112
+ }, []);
113
+ const _selectFloor = (0, _react.useCallback)((floorId, options) => {
114
+ if (!webViewRef.current) {
115
+ return;
116
+ }
117
+ if (_sdk.default.navigationIsRunning()) {
118
+ console.error("Situm > hook > Navigation on course, floor selection is unavailable");
119
+ return;
120
+ }
121
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.selectFloor(floorId, options));
122
+ }, []);
123
+ const _search = (0, _react.useCallback)(payload => {
124
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.search(payload));
125
+ }, []);
126
+ const _setDirectionsOptions = (0, _react.useCallback)(directionsOptions => {
127
+ if (!webViewRef.current) {
128
+ return;
129
+ }
130
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.setDirectionsOptions(directionsOptions));
131
+ }, []);
132
+ const _setFavoritePois = (0, _react.useCallback)(poiIds => {
133
+ if (!webViewRef.current) {
134
+ return;
135
+ }
136
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.setFavoritePois(poiIds));
137
+ }, []);
138
+ const _onMapIsReady = () => {
139
+ if (locationStatus) {
140
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.locationStatus(locationStatus));
141
+ }
142
+ if (error) {
143
+ // Right now, status and errors share message on the viewer:
144
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.locationError(error));
145
+ }
146
+ };
147
+
148
+ /**
149
+ * API exported to the outside world from the MapViewer
150
+ *
151
+ * These handler allows third party developers to send actions to the MapView.
152
+ * please check the MapViewRef type definitions to know the public API.
153
+ *
154
+ * <MapView
155
+ * ref={(ref: MapViewRef) => ref.selectPoi(122)}
156
+ * configuration={{
157
+ * buildingIdentifier: SITUM_BUILDING_ID,
158
+ * }}
159
+ * onLoad={onLoad} />
160
+ */
161
+
162
+ (0, _react.useImperativeHandle)(ref, () => {
163
+ return {
164
+ followUser() {
165
+ _followUser(true);
166
+ },
167
+ unfollowUser() {
168
+ _followUser(false);
169
+ },
170
+ selectPoi(poiId) {
171
+ _selectPoi(poiId);
172
+ },
173
+ selectCar() {
174
+ _selectCar();
175
+ },
176
+ selectPoiCategory(poiId) {
177
+ _selectPoiCategory(poiId);
178
+ },
179
+ selectFloor(poiId, options) {
180
+ _selectFloor(poiId, options);
181
+ },
182
+ setDirectionsOptions(directionsOptions) {
183
+ _setDirectionsOptions(directionsOptions);
184
+ },
185
+ setFavoritePois(poiIds) {
186
+ _setFavoritePois(poiIds);
187
+ },
188
+ deselectPoi() {
189
+ webViewRef.current && (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.selectPoi(null));
190
+ },
191
+ navigateToPoi(payload) {
192
+ _navigateToPoi(payload);
193
+ },
194
+ navigateToCar(payload) {
195
+ _navigateToCar(payload);
196
+ },
197
+ navigateToPoint(payload) {
198
+ _navigateToPoint(payload);
199
+ },
200
+ setOnDirectionsRequestInterceptor(directionRequestInterceptor) {
201
+ setInterceptor(() => directionRequestInterceptor);
202
+ },
203
+ cancelNavigation() {
204
+ if (!webViewRef.current) return;
205
+ stopNavigation();
206
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.cancelNavigation());
207
+ },
208
+ search(payload) {
209
+ _search(payload);
210
+ }
211
+ };
212
+ }, [stopNavigation, _navigateToPoi, _followUser, _navigateToCar, _navigateToPoint, _selectPoi, _selectCar, _selectPoiCategory, _selectFloor, _setDirectionsOptions, _setFavoritePois, _search]);
213
+ (0, _react.useEffect)(() => {
214
+ _sdk.default.validateMapViewProjectSettings();
215
+ return () => {};
216
+ }, []);
217
+ (0, _react.useEffect)(() => {
218
+ if (!error) return;
219
+ console.error("Error code:", error.code ? error.code : " no code provided");
220
+ console.error("Error detected:", error.message);
221
+ }, [error]);
222
+
223
+ // Updated SDK location
224
+ (0, _react.useEffect)(() => {
225
+ if (!webViewRef.current || !location || !mapLoaded) return;
226
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.location(location));
227
+ }, [location, mapLoaded]);
228
+
229
+ // locationStatus
230
+ (0, _react.useEffect)(() => {
231
+ if (!webViewRef.current || !locationStatus || !mapLoaded) return;
232
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.locationStatus(locationStatus));
233
+ // Callbacks used in `useEffect` won't be invoked if the value of locationStatus
234
+ // is set but hasn't changed. Set locationStatus to null always to avoid missing
235
+ // repeated messages.
236
+ (0, _store.setLocationStatus)(null);
237
+ }, [locationStatus, mapLoaded]);
238
+
239
+ // locationError
240
+ (0, _react.useEffect)(() => {
241
+ if (!webViewRef.current || !error || !mapLoaded) return;
242
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.locationError(error));
243
+ // Callbacks used in `useEffect` won't be invoked if the value of locationStatus
244
+ // is set but hasn't changed. Set locationStatus to null always to avoid missing
245
+ // repeated messages.
246
+ (0, _store.setError)(null);
247
+ }, [error, mapLoaded]);
248
+
249
+ // Updated SDK navigation
250
+ (0, _react.useEffect)(() => {
251
+ if (!webViewRef.current || !navigation || !mapLoaded) return;
252
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.navigation(navigation));
253
+ }, [navigation, mapLoaded]);
254
+
255
+ // Updated SDK route
256
+ (0, _react.useEffect)(() => {
257
+ if (!webViewRef.current || !directions || !mapLoaded) return;
258
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.route(directions));
259
+ }, [directions, mapLoaded]);
260
+
261
+ // Update language
262
+ (0, _react.useEffect)(() => {
263
+ if (!webViewRef.current || !configuration.language || !mapLoaded) return;
264
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.setLanguage(configuration.language));
265
+ }, [configuration.language, mapLoaded]);
266
+
267
+ // Update SDK configuration
268
+ (0, _react.useEffect)(() => {
269
+ if (webViewRef.current && mapLoaded) {
270
+ (0, _utils.sendMessageToViewer)(webViewRef.current, _mapper.default.initialConfiguration(style));
271
+ }
272
+ }, [webViewRef, mapLoaded, style]);
273
+
274
+ // Update follow user
275
+ (0, _react.useEffect)(() => {
276
+ mapLoaded && sendFollowUser();
277
+ // eslint-disable-next-line react-hooks/exhaustive-deps
278
+ }, [mapLoaded]);
279
+ const handleRequestFromViewer = event => {
280
+ const eventParsed = JSON.parse(event.nativeEvent.data);
281
+ switch (eventParsed.type) {
282
+ case "app.map_is_ready":
283
+ init();
284
+ setMapLoaded(true);
285
+ _onMapIsReady();
286
+ onLoad && onLoad("");
287
+ break;
288
+ case "directions.requested":
289
+ calculateRoute(eventParsed.payload, _onDirectionsRequestInterceptor);
290
+ break;
291
+ case "navigation.requested":
292
+ startNavigation(eventParsed.payload, _onDirectionsRequestInterceptor);
293
+ break;
294
+ case "navigation.stopped":
295
+ stopNavigation();
296
+ break;
297
+ case "cartography.poi_selected":
298
+ onPoiSelected(eventParsed?.payload);
299
+ break;
300
+ case "cartography.poi_deselected":
301
+ onPoiDeselected(eventParsed?.payload);
302
+ break;
303
+ case "ui.favorite_pois_updated":
304
+ {
305
+ const favoritePoisIds = {
306
+ currentPoisIdentifiers: eventParsed.payload.favoritePois ? [...eventParsed.payload.favoritePois] : []
307
+ };
308
+ onFavoritePoisUpdated(favoritePoisIds);
309
+ break;
310
+ }
311
+ case "cartography.floor_selected":
312
+ onFloorChanged(eventParsed?.payload);
313
+ break;
314
+ case "cartography.building_selected":
315
+ if (!eventParsed.payload.identifier || eventParsed.payload.identifier.toString() === buildingIdentifier) {
316
+ return;
317
+ } else {
318
+ setBuildingIdentifier(eventParsed.payload.identifier.toString());
319
+ }
320
+ break;
321
+ case "viewer.navigation.started":
322
+ case "viewer.navigation.updated":
323
+ case "viewer.navigation.stopped":
324
+ _sdk.default.updateNavigationState(eventParsed.payload);
325
+ break;
326
+ default:
327
+ break;
328
+ }
329
+ };
330
+ const _onShouldStartLoadWithRequest = request => {
331
+ if (request && request.url && !request.url.startsWith(configuration.viewerDomain || SITUM_BASE_DOMAIN)) {
332
+ if (onExternalLinkClicked && typeof onExternalLinkClicked === "function") {
333
+ onExternalLinkClicked({
334
+ url: request.url
335
+ });
336
+ } else {
337
+ _reactNative.Linking.openURL(request.url);
338
+ }
339
+ return false;
340
+ }
341
+ return true;
342
+ };
343
+ const _effectiveProfile = () => {
344
+ let effectiveProfile = configuration.profile;
345
+ if (configuration.remoteIdentifier && configuration.remoteIdentifier.length > 0) {
346
+ console.warn('Situm> MapView> [!] "remoteIdentifier" is deprecated. Use "profile" instead.');
347
+ if (!configuration.profile || configuration.profile.length == 0) {
348
+ effectiveProfile = configuration.remoteIdentifier;
349
+ }
350
+ }
351
+ return effectiveProfile;
352
+ };
353
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeWebview.default, {
354
+ ref: webViewRef,
355
+ source: {
356
+ uri: `${configuration.viewerDomain || SITUM_BASE_DOMAIN}/${_effectiveProfile() ? `id/${_effectiveProfile()}` : ""}?&apikey=${configuration.situmApiKey}&wl=true&global=true&mode=embed${configuration.buildingIdentifier ? `&buildingid=${configuration.buildingIdentifier}` : ""}&show=rts`
357
+ },
358
+ style: _reactNative.StyleSheet.flatten([viewerStyles.webview, style]),
359
+ limitsNavigationsToAppBoundDomains: true,
360
+ javaScriptEnabled: true,
361
+ domStorageEnabled: true,
362
+ startInLoadingState: true,
363
+ cacheEnabled: true,
364
+ onMessage: handleRequestFromViewer,
365
+ onShouldStartLoadWithRequest: _onShouldStartLoadWithRequest,
366
+ onError: evt => {
367
+ if (!onLoadError) return;
368
+ const {
369
+ nativeEvent
370
+ } = evt;
371
+ // TODO: on render error should probably still try to render an html
372
+ if (nativeEvent.code === NETWORK_ERROR_CODE[_reactNative.Platform.OS]) {
373
+ onLoadError({
374
+ name: _constants.ErrorName.ERR_INTERNET_DISCONNECTED,
375
+ description: nativeEvent.description
376
+ });
377
+ } else {
378
+ // TODO: handle more errors
379
+ onLoadError({
380
+ name: _constants.ErrorName.ERR_INTERNAL_SERVER_ERROR,
381
+ description: nativeEvent.description
382
+ });
383
+ }
384
+ }
385
+ });
386
+ });
387
+ var _default = exports.default = MapView;
388
+ //# sourceMappingURL=MapView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeWebview","_interopRequireDefault","_sdk","_hooks","_constants","_utils","_mapper","_store","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SITUM_BASE_DOMAIN","NETWORK_ERROR_CODE","android","ios","windows","macos","web","viewerStyles","StyleSheet","create","webview","minHeight","minWidth","MapView","React","forwardRef","configuration","style","onLoad","onLoadError","onPoiSelected","onPoiDeselected","onFloorChanged","onExternalLinkClicked","undefined","onFavoritePoisUpdated","ref","webViewRef","useRef","_onDirectionsRequestInterceptor","setInterceptor","useState","mapLoaded","setMapLoaded","buildingIdentifier","setBuildingIdentifier","init","location","locationStatus","directions","navigation","calculateRoute","startNavigation","stopNavigation","error","useSitum","sendFollowUser","current","position","_followUser","_navigateToPoi","useCallback","payload","identifier","sendMessageToViewer","ViewerMapper","navigateToPoi","followUser","_navigateToCar","navigateToCar","_navigateToPoint","lat","lng","floorIdentifier","navigateToPoint","_selectPoi","poiId","selectPoi","_selectCar","selectCar","_selectPoiCategory","categoryId","SitumPlugin","navigationIsRunning","console","selectPoiCategory","_selectFloor","floorId","options","selectFloor","_search","search","_setDirectionsOptions","directionsOptions","setDirectionsOptions","_setFavoritePois","poiIds","setFavoritePois","_onMapIsReady","locationError","useImperativeHandle","unfollowUser","deselectPoi","setOnDirectionsRequestInterceptor","directionRequestInterceptor","cancelNavigation","useEffect","validateMapViewProjectSettings","code","message","setLocationStatus","setError","route","language","setLanguage","initialConfiguration","handleRequestFromViewer","event","eventParsed","JSON","parse","nativeEvent","data","type","favoritePoisIds","currentPoisIdentifiers","favoritePois","toString","updateNavigationState","_onShouldStartLoadWithRequest","request","url","startsWith","viewerDomain","Linking","openURL","_effectiveProfile","effectiveProfile","profile","remoteIdentifier","length","warn","jsx","source","uri","situmApiKey","flatten","limitsNavigationsToAppBoundDomains","javaScriptEnabled","domStorageEnabled","startInLoadingState","cacheEnabled","onMessage","onShouldStartLoadWithRequest","onError","evt","Platform","OS","name","ErrorName","ERR_INTERNET_DISCONNECTED","description","ERR_INTERNAL_SERVER_ERROR","_default","exports"],"sourceRoot":"../../../../src","sources":["wayfinding/components/MapView.tsx"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAKA,IAAAI,IAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,MAAA,GAAAF,sBAAA,CAAAH,OAAA;AAiBA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAuD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAhB,uBAAA,YAAAA,CAAAY,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAA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;MACNC,GAAG,EAAE,GAAGtH,aAAa,CAAC2G,YAAY,IAAI3H,iBAAiB,IACrD8H,iBAAiB,CAAC,CAAC,GAAG,MAAMA,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,YAEtD9G,aAAa,CAACuH,WAAW,kCAEzBvH,aAAa,CAACkB,kBAAkB,GAC5B,eAAelB,aAAa,CAACkB,kBAAkB,EAAE,GACjD,EAAE;IAEV,CAAE;IACFjB,KAAK,EAAET,uBAAU,CAACgI,OAAO,CAAC,CAACjI,YAAY,CAACG,OAAO,EAAEO,KAAK,CAAC,CAAE;IACzDwH,kCAAkC,EAAE,IAAK;IACzCC,iBAAiB,EAAE,IAAK;IACxBC,iBAAiB,EAAE,IAAK;IACxBC,mBAAmB,EAAE,IAAK;IAC1BC,YAAY;IACZC,SAAS,EAAEpC,uBAAwB;IACnCqC,4BAA4B,EAAExB,6BAA8B;IAC5DyB,OAAO,EAAGC,GAAsB,IAAK;MACnC,IAAI,CAAC9H,WAAW,EAAE;MAClB,MAAM;QAAE4F;MAAY,CAAC,GAAGkC,GAAG;MAC3B;MACA,IAAIlC,WAAW,CAACb,IAAI,KAAKjG,kBAAkB,CAACiJ,qBAAQ,CAACC,EAAE,CAAC,EAAE;QACxDhI,WAAW,CAAC;UACViI,IAAI,EAAEC,oBAAS,CAACC,yBAAyB;UACzCC,WAAW,EAAExC,WAAW,CAACwC;QAC3B,CAAC,CAAC;MACJ,CAAC,MAAM;QACL;QACApI,WAAW,CAAC;UACViI,IAAI,EAAEC,oBAAS,CAACG,yBAAyB;UACzCD,WAAW,EAAExC,WAAW,CAACwC;QAC3B,CAAC,CAAC;MACJ;IACF;EAAE,CACH,CAAC;AAEN,CACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAA3K,OAAA,GAEa8B,OAAO","ignoreList":[]}
@@ -0,0 +1,233 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useSitumInternal = exports.default = void 0;
7
+ var _react = require("react");
8
+ var _sdk = _interopRequireDefault(require("../../sdk"));
9
+ var _types = require("../../sdk/types");
10
+ var _constants = require("../../sdk/types/constants");
11
+ var _index = require("../store/index");
12
+ var _utils = require("../store/utils");
13
+ var _mapper = require("../utils/mapper");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
+
17
+ const defaultNavigationRequest = {
18
+ distanceToGoalThreshold: 4,
19
+ outsideRouteThreshold: 5
20
+ };
21
+ const useSitumInternal = () => {
22
+ const dispatch = (0, _utils.useDispatch)();
23
+ const location = (0, _utils.useSelector)(_index.selectLocation);
24
+ const locationStatus = (0, _utils.useSelector)(_index.selectLocationStatus);
25
+ const directions = (0, _utils.useSelector)(_index.selectDirections);
26
+ const navigation = (0, _utils.useSelector)(_index.selectNavigation);
27
+ const error = (0, _utils.useSelector)(_index.selectError);
28
+ const [lockDirections, setLockDirections] = (0, _react.useState)(false);
29
+ const init = () => {
30
+ console.debug("Situm > hook > Initializing -> Registering callbacks");
31
+ registerCallbacks();
32
+ };
33
+ function registerCallbacks() {
34
+ _sdk.default.internalSetMethodCallMapDelegate(internalCall => {
35
+ switch (internalCall.type) {
36
+ case _constants.InternalCallType.LOCATION:
37
+ let location = internalCall.get();
38
+ dispatch((0, _index.setLocation)({
39
+ ...location
40
+ }));
41
+ break;
42
+ case _constants.InternalCallType.LOCATION_STATUS:
43
+ let statusName = internalCall.get();
44
+ if (statusName in _constants.LocationStatusName) {
45
+ dispatch((0, _index.setLocationStatus)(statusName));
46
+ }
47
+ break;
48
+ case _constants.InternalCallType.LOCATION_STOPPED:
49
+ // TODO: LOCATION_STOPPED exists only in RN, delete!
50
+ dispatch((0, _index.resetLocation)());
51
+ break;
52
+ case _constants.InternalCallType.LOCATION_ERROR:
53
+ let error = internalCall.get();
54
+ dispatch((0, _index.setError)(error));
55
+ break;
56
+ case _constants.InternalCallType.NAVIGATION_START:
57
+ dispatch((0, _index.setNavigation)({
58
+ type: _constants.NavigationUpdateType.PROGRESS,
59
+ status: _constants.NavigationStatus.START
60
+ }));
61
+ break;
62
+ case _constants.InternalCallType.NAVIGATION_DESTINATION_REACHED:
63
+ dispatch((0, _index.setNavigation)({
64
+ type: _constants.NavigationUpdateType.DESTINATION_REACHED,
65
+ status: _constants.NavigationStatus.UPDATE
66
+ }));
67
+ break;
68
+ case _constants.InternalCallType.NAVIGATION_PROGRESS:
69
+ let progress = internalCall.get();
70
+ dispatch((0, _index.setNavigation)({
71
+ currentIndication: progress?.currentIndication,
72
+ routeStep: progress?.routeStep,
73
+ distanceToGoal: progress?.distanceToGoal,
74
+ points: progress?.points,
75
+ type: _constants.NavigationUpdateType.PROGRESS,
76
+ segments: progress?.segments,
77
+ status: _constants.NavigationStatus.UPDATE
78
+ }));
79
+ break;
80
+ case _constants.InternalCallType.NAVIGATION_OUT_OF_ROUTE:
81
+ dispatch((0, _index.setNavigation)({
82
+ type: _constants.NavigationUpdateType.OUT_OF_ROUTE,
83
+ status: _constants.NavigationStatus.UPDATE
84
+ }));
85
+ break;
86
+ case _constants.InternalCallType.NAVIGATION_CANCELLATION:
87
+ dispatch((0, _index.setNavigation)({
88
+ type: _constants.NavigationUpdateType.CANCELLED,
89
+ status: _constants.NavigationStatus.STOP
90
+ }));
91
+ break;
92
+ case _constants.InternalCallType.NAVIGATION_ERROR:
93
+ case _constants.InternalCallType.GEOFENCES_ENTER:
94
+ case _constants.InternalCallType.GEOFENCES_EXIT:
95
+ // Do nothing.
96
+ break;
97
+ }
98
+ });
99
+ }
100
+ const calculateRoute = async (payload, interceptor, updateRoute = true) => {
101
+ console.debug("Situm > hook > calculating route");
102
+ const directionsRequest = (0, _mapper.createDirectionsRequest)(payload.directionsRequest);
103
+ interceptor && interceptor(directionsRequest);
104
+ const {
105
+ to,
106
+ from,
107
+ minimizeFloorChanges,
108
+ accessibilityMode,
109
+ bearingFrom,
110
+ includedTags,
111
+ excludedTags
112
+ } = directionsRequest;
113
+ const {
114
+ originIdentifier,
115
+ destinationIdentifier,
116
+ buildingIdentifier
117
+ } = (0, _mapper.createDirectionsMessage)(payload);
118
+ const _buildings = await _sdk.default.fetchBuildings();
119
+ const _building = _buildings.find(b => b.buildingIdentifier === buildingIdentifier);
120
+ if (!_building) {
121
+ console.debug(`Situm > hook > Could not compute route: missing building`);
122
+ return;
123
+ }
124
+ if (!to || !from || lockDirections) {
125
+ console.debug(`Situm > hook > Could not compute route (to: ${to}, from: ${from}, lockDirections: ${lockDirections})`);
126
+ return;
127
+ }
128
+
129
+ // iOS workaround -> does not allow for several direction petitions
130
+ setLockDirections(true);
131
+ return await _sdk.default.requestDirections(_building, from, to, {
132
+ minimizeFloorChanges,
133
+ accessibilityMode,
134
+ bearingFrom,
135
+ includedTags,
136
+ excludedTags
137
+ }).then(_directions => {
138
+ const newRoute = {
139
+ ..._directions,
140
+ originIdentifier,
141
+ destinationIdentifier,
142
+ type: accessibilityMode
143
+ };
144
+ if (updateRoute) {
145
+ dispatch((0, _index.setDirections)(newRoute));
146
+ }
147
+ return newRoute;
148
+ }).catch(e => {
149
+ console.error(`Situm > hook > Could not compute route: ${e}`);
150
+ dispatch((0, _index.setDirections)({
151
+ error: JSON.stringify(e)
152
+ }));
153
+ }).finally(() => {
154
+ setLockDirections(false);
155
+ });
156
+ };
157
+
158
+ // Navigation
159
+ const startNavigation = (payload, interceptor) => {
160
+ console.debug("Situm > hook > request to start navigation");
161
+ // TODO: we should delegate this to the sdk plugin
162
+ if (!navigation || navigation?.status !== _constants.NavigationStatus.STOP) {
163
+ stopNavigation();
164
+ }
165
+ calculateRoute(payload, interceptor, false).then(r => {
166
+ if (!r) {
167
+ console.debug(`Situm > hook > No route was computed`);
168
+ return;
169
+ }
170
+ dispatch((0, _index.setNavigation)({
171
+ status: _constants.NavigationStatus.START,
172
+ type: _constants.NavigationUpdateType.PROGRESS,
173
+ ...r
174
+ }));
175
+ try {
176
+ const navigationRequest = (0, _mapper.createNavigationRequest)(payload.navigationRequest);
177
+ _sdk.default.requestNavigationUpdates({
178
+ ...defaultNavigationRequest,
179
+ ...navigationRequest
180
+ });
181
+ } catch (e) {
182
+ console.error(`Situm > hook > Could not update navigation ${e}`);
183
+ //TODO: Remove this and emit these errors in SitumPlugin.onNavigationError
184
+ dispatch((0, _index.setError)({
185
+ message: "Could not update navigation",
186
+ code: _types.ErrorCode.UNKNOWN,
187
+ type: _types.ErrorType.NON_CRITICAL
188
+ }));
189
+ stopNavigation();
190
+ }
191
+ }).catch(e => {
192
+ console.error(`Situm > hook > Could not compute route for navigation ${JSON.stringify(e)}`);
193
+ });
194
+ };
195
+ const stopNavigation = () => {
196
+ // TODO: we should delegate this to the sdk plugin
197
+ if (!navigation || navigation?.status === _constants.NavigationStatus.STOP) {
198
+ return;
199
+ }
200
+ console.debug("Situm > hook > Stopping navigation");
201
+ _sdk.default.removeNavigationUpdates().then(() => {
202
+ console.debug("Situm > hook > Successfully removed navigation updates");
203
+ dispatch((0, _index.setNavigation)({
204
+ status: _constants.NavigationStatus.STOP
205
+ }));
206
+ }).catch(e => {
207
+ console.warn(`Situm > hook > Could not remove navigation updates ${JSON.stringify(e)}`);
208
+ });
209
+ };
210
+ return {
211
+ // States
212
+ location,
213
+ locationStatus,
214
+ directions,
215
+ navigation,
216
+ error,
217
+ // Functions
218
+ init,
219
+ calculateRoute,
220
+ startNavigation,
221
+ stopNavigation
222
+ };
223
+ };
224
+ exports.useSitumInternal = useSitumInternal;
225
+ const useSitum = () => {
226
+ const context = (0, _react.useContext)(_index.UseSitumContext);
227
+ if (!context) {
228
+ throw new Error("Situm > hook > No SitumProvider found.");
229
+ }
230
+ return context.useSitum;
231
+ };
232
+ var _default = exports.default = useSitum;
233
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_sdk","_interopRequireDefault","_types","_constants","_index","_utils","_mapper","e","__esModule","default","defaultNavigationRequest","distanceToGoalThreshold","outsideRouteThreshold","useSitumInternal","dispatch","useDispatch","location","useSelector","selectLocation","locationStatus","selectLocationStatus","directions","selectDirections","navigation","selectNavigation","error","selectError","lockDirections","setLockDirections","useState","init","console","debug","registerCallbacks","SitumPlugin","internalSetMethodCallMapDelegate","internalCall","type","InternalCallType","LOCATION","get","setLocation","LOCATION_STATUS","statusName","LocationStatusName","setLocationStatus","LOCATION_STOPPED","resetLocation","LOCATION_ERROR","setError","NAVIGATION_START","setNavigation","NavigationUpdateType","PROGRESS","status","NavigationStatus","START","NAVIGATION_DESTINATION_REACHED","DESTINATION_REACHED","UPDATE","NAVIGATION_PROGRESS","progress","currentIndication","routeStep","distanceToGoal","points","segments","NAVIGATION_OUT_OF_ROUTE","OUT_OF_ROUTE","NAVIGATION_CANCELLATION","CANCELLED","STOP","NAVIGATION_ERROR","GEOFENCES_ENTER","GEOFENCES_EXIT","calculateRoute","payload","interceptor","updateRoute","directionsRequest","createDirectionsRequest","to","from","minimizeFloorChanges","accessibilityMode","bearingFrom","includedTags","excludedTags","originIdentifier","destinationIdentifier","buildingIdentifier","createDirectionsMessage","_buildings","fetchBuildings","_building","find","b","requestDirections","then","_directions","newRoute","setDirections","catch","JSON","stringify","finally","startNavigation","stopNavigation","r","navigationRequest","createNavigationRequest","requestNavigationUpdates","message","code","ErrorCode","UNKNOWN","ErrorType","NON_CRITICAL","removeNavigationUpdates","warn","exports","useSitum","context","useContext","UseSitumContext","Error","_default"],"sourceRoot":"../../../../src","sources":["wayfinding/hooks/index.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AASA,IAAAI,UAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AAcA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AAIyB,SAAAE,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAA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