@situm/react-native 3.15.0-beta.3 → 3.15.0-beta.4
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/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/sdk/index.js.map +1 -1
- package/lib/commonjs/sdk/internaDelegatedState.js.map +0 -1
- package/lib/commonjs/sdk/nativeInterface.js.map +0 -1
- package/lib/commonjs/sdk/types/index.js.map +0 -1
- package/lib/commonjs/sdk/utils.js.map +0 -1
- package/lib/commonjs/utils/logError.js.map +0 -1
- package/lib/commonjs/wayfinding/types/index.js.map +0 -1
- package/lib/commonjs/wayfinding/utils/mapper.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/sdk/index.js.map +1 -1
- package/lib/module/sdk/internaDelegatedState.js.map +0 -1
- package/lib/module/sdk/nativeInterface.js.map +0 -1
- package/lib/module/sdk/types/index.js.map +0 -1
- package/lib/module/sdk/utils.js.map +0 -1
- package/lib/module/utils/logError.js.map +0 -1
- package/lib/module/wayfinding/types/index.js.map +0 -1
- package/lib/module/wayfinding/utils/index.js.map +0 -1
- package/lib/typescript/sdk/index.d.ts +5 -2
- package/lib/typescript/sdk/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/sdk/index.ts +4 -14
- package/lib/commonjs/index.js +0 -73
- package/lib/commonjs/sdk/index.js +0 -931
- package/lib/commonjs/sdk/internaDelegatedState.js +0 -48
- package/lib/commonjs/sdk/nativeInterface.js +0 -20
- package/lib/commonjs/sdk/types/constants.js +0 -73
- package/lib/commonjs/sdk/types/index.js +0 -414
- package/lib/commonjs/sdk/utils.js +0 -156
- package/lib/commonjs/utils/index.js +0 -17
- package/lib/commonjs/utils/logError.js +0 -21
- package/lib/commonjs/wayfinding/components/MapView.js +0 -389
- package/lib/commonjs/wayfinding/components/MapView.js.map +0 -1
- package/lib/commonjs/wayfinding/hooks/index.js +0 -233
- package/lib/commonjs/wayfinding/hooks/index.js.map +0 -1
- package/lib/commonjs/wayfinding/index.js +0 -57
- package/lib/commonjs/wayfinding/store/index.js +0 -247
- package/lib/commonjs/wayfinding/store/index.js.map +0 -1
- package/lib/commonjs/wayfinding/store/utils.js +0 -49
- package/lib/commonjs/wayfinding/types/constants.js +0 -13
- package/lib/commonjs/wayfinding/types/index.js +0 -6
- package/lib/commonjs/wayfinding/utils/index.js +0 -12
- package/lib/commonjs/wayfinding/utils/mapper.js +0 -204
- package/lib/module/index.js +0 -14
- package/lib/module/sdk/index.js +0 -904
- package/lib/module/sdk/internaDelegatedState.js +0 -43
- package/lib/module/sdk/nativeInterface.js +0 -20
- package/lib/module/sdk/types/constants.js +0 -70
- package/lib/module/sdk/types/index.js +0 -445
- package/lib/module/sdk/utils.js +0 -146
- package/lib/module/utils/index.js +0 -4
- package/lib/module/utils/logError.js +0 -17
- package/lib/module/wayfinding/components/MapView.js +0 -381
- package/lib/module/wayfinding/components/MapView.js.map +0 -1
- package/lib/module/wayfinding/hooks/index.js +0 -226
- package/lib/module/wayfinding/hooks/index.js.map +0 -1
- package/lib/module/wayfinding/index.js +0 -15
- package/lib/module/wayfinding/store/index.js +0 -213
- package/lib/module/wayfinding/store/index.js.map +0 -1
- package/lib/module/wayfinding/store/utils.js +0 -40
- package/lib/module/wayfinding/types/constants.js +0 -9
- package/lib/module/wayfinding/types/index.js +0 -4
- package/lib/module/wayfinding/utils/index.js +0 -7
- package/lib/module/wayfinding/utils/mapper.js +0 -195
- package/lib/module/wayfinding/utils/mapper.js.map +0 -1
package/lib/module/sdk/utils.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { LocationStatusName, logError } from "..";
|
|
4
|
-
import { ErrorCode, ErrorType } from "./types";
|
|
5
|
-
/**
|
|
6
|
-
* Handles callbacks coming from SDKs asynchronously
|
|
7
|
-
*
|
|
8
|
-
* @param response
|
|
9
|
-
* @param resolve
|
|
10
|
-
* @param reject
|
|
11
|
-
* @param errorMessage
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
export const handleAsyncCallback = (response, resolve, reject, errorMessage) => {
|
|
15
|
-
if (response?.success) {
|
|
16
|
-
resolve();
|
|
17
|
-
} else {
|
|
18
|
-
reject({
|
|
19
|
-
code: ErrorCode.UNKNOWN,
|
|
20
|
-
message: errorMessage || "Unknown error.",
|
|
21
|
-
type: ErrorType.NON_CRITICAL
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Handles callbacks coming from SDKs synchronously
|
|
28
|
-
*
|
|
29
|
-
* @param response
|
|
30
|
-
* @param errorMessage
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
export const handleSyncCallback = (r, errorMessage) => {
|
|
34
|
-
if (r?.success) {
|
|
35
|
-
return;
|
|
36
|
-
} else {
|
|
37
|
-
throw {
|
|
38
|
-
code: -1,
|
|
39
|
-
message: errorMessage || "Unknown error."
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Wraps all SDK API methods with a exception handling code, and defines helper functions.
|
|
46
|
-
*
|
|
47
|
-
* @param fn
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
export const exceptionWrapper = fn => {
|
|
51
|
-
let returnValue;
|
|
52
|
-
try {
|
|
53
|
-
fn({
|
|
54
|
-
onCallback: handleSyncCallback,
|
|
55
|
-
onSuccess: response => {
|
|
56
|
-
returnValue = response;
|
|
57
|
-
},
|
|
58
|
-
onError: error => {
|
|
59
|
-
logError(error);
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
} catch (error) {
|
|
64
|
-
logError(error);
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
|
-
return returnValue;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Wraps all SDK API methods with a promise, and defines helper functions.
|
|
72
|
-
*
|
|
73
|
-
* @param fn
|
|
74
|
-
* @returns
|
|
75
|
-
*/
|
|
76
|
-
export const promiseWrapper = fn => {
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
try {
|
|
79
|
-
return fn({
|
|
80
|
-
resolve,
|
|
81
|
-
reject,
|
|
82
|
-
onCallback: (r, errorMessage) => handleAsyncCallback(r, resolve, reject, errorMessage),
|
|
83
|
-
onSuccess: response => resolve(response),
|
|
84
|
-
onError: error => {
|
|
85
|
-
logError(error);
|
|
86
|
-
reject(error);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
} catch (error) {
|
|
90
|
-
logError(error);
|
|
91
|
-
reject({
|
|
92
|
-
code: ErrorCode.UNKNOWN,
|
|
93
|
-
message: typeof error === "object" && error !== null && "message" in error ? error?.message : "Unknown error.",
|
|
94
|
-
type: ErrorType.NON_CRITICAL
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
export function locationStatusAdapter(statusName) {
|
|
100
|
-
// The MapView will only understand status names declared at LocationStatusName and CALCULATING
|
|
101
|
-
// is not one of them.
|
|
102
|
-
// TODO: implement status & error adapter on native SDKs.
|
|
103
|
-
if (statusName === "CALCULATING") {
|
|
104
|
-
statusName = LocationStatusName.STARTING;
|
|
105
|
-
}
|
|
106
|
-
return statusName;
|
|
107
|
-
}
|
|
108
|
-
export function locationErrorAdapter(error) {
|
|
109
|
-
let adaptedCode = ErrorCode.UNKNOWN;
|
|
110
|
-
const adaptedMessage = error.message;
|
|
111
|
-
const adaptedType = ErrorType.CRITICAL;
|
|
112
|
-
switch (error.code.toString()) {
|
|
113
|
-
case "8001": // MISSING_LOCATION_PERMISSION
|
|
114
|
-
case "8": // kSITLocationErrorLocationDisabled
|
|
115
|
-
case "9": // kSITLocationErrorLocationRestricted
|
|
116
|
-
case "10":
|
|
117
|
-
// kSITLocationErrorLocationAuthStatusNotDetermined
|
|
118
|
-
adaptedCode = ErrorCode.LOCATION_PERMISSION_DENIED;
|
|
119
|
-
break;
|
|
120
|
-
case "8002":
|
|
121
|
-
// LOCATION_DISABLED
|
|
122
|
-
adaptedCode = ErrorCode.LOCATION_DISABLED;
|
|
123
|
-
break;
|
|
124
|
-
case "8012":
|
|
125
|
-
// MISSING_BLUETOOTH_PERMISSION
|
|
126
|
-
adaptedCode = ErrorCode.BLUETOOTH_PERMISSION_DENIED;
|
|
127
|
-
break;
|
|
128
|
-
case "8100": //BLUETOOTH_DISABLED. 8100 ->This number does not exist in Situm SDK. We made it up in SitumMapper.java (RN adapter)
|
|
129
|
-
case "6":
|
|
130
|
-
// kSITLocationErrorBluetoothisOff
|
|
131
|
-
adaptedCode = ErrorCode.BLUETOOTH_DISABLED;
|
|
132
|
-
break;
|
|
133
|
-
case "11":
|
|
134
|
-
//kSITLocationErrorLocationAccuracyAuthorizationStatusReducedAccuracy
|
|
135
|
-
adaptedCode = ErrorCode.REDUCED_ACCURACY;
|
|
136
|
-
break;
|
|
137
|
-
// Add more cases as needed
|
|
138
|
-
}
|
|
139
|
-
const returnError = {
|
|
140
|
-
code: adaptedCode,
|
|
141
|
-
message: adaptedMessage,
|
|
142
|
-
type: adaptedType
|
|
143
|
-
};
|
|
144
|
-
return returnError;
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Small utility that can be used as an error handler. You cannot just pass
|
|
5
|
-
* `console.error` as a failure callback - it's not properly bound. If passes an
|
|
6
|
-
* `Error` object, it will print the message and stack.
|
|
7
|
-
*/
|
|
8
|
-
export const logError = __DEV__ ? function (response) {
|
|
9
|
-
if (response instanceof String) {
|
|
10
|
-
console.log(response);
|
|
11
|
-
} else {
|
|
12
|
-
console.log(JSON.stringify(response));
|
|
13
|
-
}
|
|
14
|
-
} : function (_response) {
|
|
15
|
-
// do nothing
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=logError.js.map
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
6
|
-
import { Linking, Platform, StyleSheet } from "react-native";
|
|
7
|
-
import WebView from "react-native-webview";
|
|
8
|
-
import SitumPlugin from "../../sdk";
|
|
9
|
-
import useSitum from "../hooks";
|
|
10
|
-
import { ErrorName } from "../types/constants";
|
|
11
|
-
import { sendMessageToViewer } from "../utils";
|
|
12
|
-
import ViewerMapper from "../utils/mapper";
|
|
13
|
-
import { setError, setLocationStatus } from "../store";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const SITUM_BASE_DOMAIN = "https://maps.situm.com";
|
|
16
|
-
const NETWORK_ERROR_CODE = {
|
|
17
|
-
android: -2,
|
|
18
|
-
ios: -1009,
|
|
19
|
-
// These platforms are unhandled
|
|
20
|
-
windows: 0,
|
|
21
|
-
macos: 0,
|
|
22
|
-
web: 0
|
|
23
|
-
};
|
|
24
|
-
const viewerStyles = StyleSheet.create({
|
|
25
|
-
webview: {
|
|
26
|
-
minHeight: "100%",
|
|
27
|
-
minWidth: "100%"
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
const MapView = /*#__PURE__*/React.forwardRef(({
|
|
31
|
-
configuration,
|
|
32
|
-
style,
|
|
33
|
-
onLoad = () => {},
|
|
34
|
-
onLoadError = () => {},
|
|
35
|
-
onPoiSelected = () => {},
|
|
36
|
-
onPoiDeselected = () => {},
|
|
37
|
-
onFloorChanged = () => {},
|
|
38
|
-
onExternalLinkClicked = undefined,
|
|
39
|
-
onFavoritePoisUpdated = () => {}
|
|
40
|
-
}, ref) => {
|
|
41
|
-
const webViewRef = useRef(null);
|
|
42
|
-
const [_onDirectionsRequestInterceptor, setInterceptor] = useState();
|
|
43
|
-
|
|
44
|
-
// Local states
|
|
45
|
-
const [mapLoaded, setMapLoaded] = useState(false);
|
|
46
|
-
const [buildingIdentifier, setBuildingIdentifier] = useState(configuration.buildingIdentifier);
|
|
47
|
-
const {
|
|
48
|
-
init,
|
|
49
|
-
location,
|
|
50
|
-
locationStatus,
|
|
51
|
-
directions,
|
|
52
|
-
navigation,
|
|
53
|
-
calculateRoute,
|
|
54
|
-
startNavigation,
|
|
55
|
-
stopNavigation,
|
|
56
|
-
error
|
|
57
|
-
} = useSitum();
|
|
58
|
-
const sendFollowUser = () => {
|
|
59
|
-
if (webViewRef.current && mapLoaded && location?.position?.buildingIdentifier === configuration.buildingIdentifier) {
|
|
60
|
-
_followUser(true);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// Helper functions used on imperative handler
|
|
65
|
-
// Navigation
|
|
66
|
-
const _navigateToPoi = useCallback(payload => {
|
|
67
|
-
if (!webViewRef.current || !payload || !payload.identifier) return;
|
|
68
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.navigateToPoi(payload));
|
|
69
|
-
}, []);
|
|
70
|
-
const _followUser = useCallback(payload => {
|
|
71
|
-
if (!webViewRef.current) return;
|
|
72
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.followUser(payload));
|
|
73
|
-
}, []);
|
|
74
|
-
const _navigateToCar = useCallback(payload => {
|
|
75
|
-
if (!webViewRef.current) return;
|
|
76
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.navigateToCar(payload));
|
|
77
|
-
}, []);
|
|
78
|
-
const _navigateToPoint = useCallback(payload => {
|
|
79
|
-
if (!webViewRef.current || !payload?.lat && !payload?.lng && !payload?.floorIdentifier) return;
|
|
80
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.navigateToPoint(payload));
|
|
81
|
-
}, []);
|
|
82
|
-
|
|
83
|
-
// Cartography
|
|
84
|
-
const _selectPoi = useCallback(poiId => {
|
|
85
|
-
if (!webViewRef.current) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.selectPoi(poiId));
|
|
89
|
-
}, []);
|
|
90
|
-
const _selectCar = useCallback(() => {
|
|
91
|
-
if (!webViewRef.current) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.selectCar());
|
|
95
|
-
}, []);
|
|
96
|
-
const _selectPoiCategory = useCallback(categoryId => {
|
|
97
|
-
if (!webViewRef.current) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
if (SitumPlugin.navigationIsRunning()) {
|
|
101
|
-
console.error("Situm > hook > Navigation on course, poi category selection is unavailable");
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.selectPoiCategory(categoryId));
|
|
105
|
-
}, []);
|
|
106
|
-
const _selectFloor = useCallback((floorId, options) => {
|
|
107
|
-
if (!webViewRef.current) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (SitumPlugin.navigationIsRunning()) {
|
|
111
|
-
console.error("Situm > hook > Navigation on course, floor selection is unavailable");
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.selectFloor(floorId, options));
|
|
115
|
-
}, []);
|
|
116
|
-
const _search = useCallback(payload => {
|
|
117
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.search(payload));
|
|
118
|
-
}, []);
|
|
119
|
-
const _setDirectionsOptions = useCallback(directionsOptions => {
|
|
120
|
-
if (!webViewRef.current) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.setDirectionsOptions(directionsOptions));
|
|
124
|
-
}, []);
|
|
125
|
-
const _setFavoritePois = useCallback(poiIds => {
|
|
126
|
-
if (!webViewRef.current) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.setFavoritePois(poiIds));
|
|
130
|
-
}, []);
|
|
131
|
-
const _onMapIsReady = () => {
|
|
132
|
-
if (locationStatus) {
|
|
133
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.locationStatus(locationStatus));
|
|
134
|
-
}
|
|
135
|
-
if (error) {
|
|
136
|
-
// Right now, status and errors share message on the viewer:
|
|
137
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.locationError(error));
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* API exported to the outside world from the MapViewer
|
|
143
|
-
*
|
|
144
|
-
* These handler allows third party developers to send actions to the MapView.
|
|
145
|
-
* please check the MapViewRef type definitions to know the public API.
|
|
146
|
-
*
|
|
147
|
-
* <MapView
|
|
148
|
-
* ref={(ref: MapViewRef) => ref.selectPoi(122)}
|
|
149
|
-
* configuration={{
|
|
150
|
-
* buildingIdentifier: SITUM_BUILDING_ID,
|
|
151
|
-
* }}
|
|
152
|
-
* onLoad={onLoad} />
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
useImperativeHandle(ref, () => {
|
|
156
|
-
return {
|
|
157
|
-
followUser() {
|
|
158
|
-
_followUser(true);
|
|
159
|
-
},
|
|
160
|
-
unfollowUser() {
|
|
161
|
-
_followUser(false);
|
|
162
|
-
},
|
|
163
|
-
selectPoi(poiId) {
|
|
164
|
-
_selectPoi(poiId);
|
|
165
|
-
},
|
|
166
|
-
selectCar() {
|
|
167
|
-
_selectCar();
|
|
168
|
-
},
|
|
169
|
-
selectPoiCategory(poiId) {
|
|
170
|
-
_selectPoiCategory(poiId);
|
|
171
|
-
},
|
|
172
|
-
selectFloor(poiId, options) {
|
|
173
|
-
_selectFloor(poiId, options);
|
|
174
|
-
},
|
|
175
|
-
setDirectionsOptions(directionsOptions) {
|
|
176
|
-
_setDirectionsOptions(directionsOptions);
|
|
177
|
-
},
|
|
178
|
-
setFavoritePois(poiIds) {
|
|
179
|
-
_setFavoritePois(poiIds);
|
|
180
|
-
},
|
|
181
|
-
deselectPoi() {
|
|
182
|
-
webViewRef.current && sendMessageToViewer(webViewRef.current, ViewerMapper.selectPoi(null));
|
|
183
|
-
},
|
|
184
|
-
navigateToPoi(payload) {
|
|
185
|
-
_navigateToPoi(payload);
|
|
186
|
-
},
|
|
187
|
-
navigateToCar(payload) {
|
|
188
|
-
_navigateToCar(payload);
|
|
189
|
-
},
|
|
190
|
-
navigateToPoint(payload) {
|
|
191
|
-
_navigateToPoint(payload);
|
|
192
|
-
},
|
|
193
|
-
setOnDirectionsRequestInterceptor(directionRequestInterceptor) {
|
|
194
|
-
setInterceptor(() => directionRequestInterceptor);
|
|
195
|
-
},
|
|
196
|
-
cancelNavigation() {
|
|
197
|
-
if (!webViewRef.current) return;
|
|
198
|
-
stopNavigation();
|
|
199
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.cancelNavigation());
|
|
200
|
-
},
|
|
201
|
-
search(payload) {
|
|
202
|
-
_search(payload);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
}, [stopNavigation, _navigateToPoi, _followUser, _navigateToCar, _navigateToPoint, _selectPoi, _selectCar, _selectPoiCategory, _selectFloor, _setDirectionsOptions, _setFavoritePois, _search]);
|
|
206
|
-
useEffect(() => {
|
|
207
|
-
SitumPlugin.validateMapViewProjectSettings();
|
|
208
|
-
return () => {};
|
|
209
|
-
}, []);
|
|
210
|
-
useEffect(() => {
|
|
211
|
-
if (!error) return;
|
|
212
|
-
console.error("Error code:", error.code ? error.code : " no code provided");
|
|
213
|
-
console.error("Error detected:", error.message);
|
|
214
|
-
}, [error]);
|
|
215
|
-
|
|
216
|
-
// Updated SDK location
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
if (!webViewRef.current || !location || !mapLoaded) return;
|
|
219
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.location(location));
|
|
220
|
-
}, [location, mapLoaded]);
|
|
221
|
-
|
|
222
|
-
// locationStatus
|
|
223
|
-
useEffect(() => {
|
|
224
|
-
if (!webViewRef.current || !locationStatus || !mapLoaded) return;
|
|
225
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.locationStatus(locationStatus));
|
|
226
|
-
// Callbacks used in `useEffect` won't be invoked if the value of locationStatus
|
|
227
|
-
// is set but hasn't changed. Set locationStatus to null always to avoid missing
|
|
228
|
-
// repeated messages.
|
|
229
|
-
setLocationStatus(null);
|
|
230
|
-
}, [locationStatus, mapLoaded]);
|
|
231
|
-
|
|
232
|
-
// locationError
|
|
233
|
-
useEffect(() => {
|
|
234
|
-
if (!webViewRef.current || !error || !mapLoaded) return;
|
|
235
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.locationError(error));
|
|
236
|
-
// Callbacks used in `useEffect` won't be invoked if the value of locationStatus
|
|
237
|
-
// is set but hasn't changed. Set locationStatus to null always to avoid missing
|
|
238
|
-
// repeated messages.
|
|
239
|
-
setError(null);
|
|
240
|
-
}, [error, mapLoaded]);
|
|
241
|
-
|
|
242
|
-
// Updated SDK navigation
|
|
243
|
-
useEffect(() => {
|
|
244
|
-
if (!webViewRef.current || !navigation || !mapLoaded) return;
|
|
245
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.navigation(navigation));
|
|
246
|
-
}, [navigation, mapLoaded]);
|
|
247
|
-
|
|
248
|
-
// Updated SDK route
|
|
249
|
-
useEffect(() => {
|
|
250
|
-
if (!webViewRef.current || !directions || !mapLoaded) return;
|
|
251
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.route(directions));
|
|
252
|
-
}, [directions, mapLoaded]);
|
|
253
|
-
|
|
254
|
-
// Update language
|
|
255
|
-
useEffect(() => {
|
|
256
|
-
if (!webViewRef.current || !configuration.language || !mapLoaded) return;
|
|
257
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.setLanguage(configuration.language));
|
|
258
|
-
}, [configuration.language, mapLoaded]);
|
|
259
|
-
|
|
260
|
-
// Update SDK configuration
|
|
261
|
-
useEffect(() => {
|
|
262
|
-
if (webViewRef.current && mapLoaded) {
|
|
263
|
-
sendMessageToViewer(webViewRef.current, ViewerMapper.initialConfiguration(style));
|
|
264
|
-
}
|
|
265
|
-
}, [webViewRef, mapLoaded, style]);
|
|
266
|
-
|
|
267
|
-
// Update follow user
|
|
268
|
-
useEffect(() => {
|
|
269
|
-
mapLoaded && sendFollowUser();
|
|
270
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
271
|
-
}, [mapLoaded]);
|
|
272
|
-
const handleRequestFromViewer = event => {
|
|
273
|
-
const eventParsed = JSON.parse(event.nativeEvent.data);
|
|
274
|
-
switch (eventParsed.type) {
|
|
275
|
-
case "app.map_is_ready":
|
|
276
|
-
init();
|
|
277
|
-
setMapLoaded(true);
|
|
278
|
-
_onMapIsReady();
|
|
279
|
-
onLoad && onLoad("");
|
|
280
|
-
break;
|
|
281
|
-
case "directions.requested":
|
|
282
|
-
calculateRoute(eventParsed.payload, _onDirectionsRequestInterceptor);
|
|
283
|
-
break;
|
|
284
|
-
case "navigation.requested":
|
|
285
|
-
startNavigation(eventParsed.payload, _onDirectionsRequestInterceptor);
|
|
286
|
-
break;
|
|
287
|
-
case "navigation.stopped":
|
|
288
|
-
stopNavigation();
|
|
289
|
-
break;
|
|
290
|
-
case "cartography.poi_selected":
|
|
291
|
-
onPoiSelected(eventParsed?.payload);
|
|
292
|
-
break;
|
|
293
|
-
case "cartography.poi_deselected":
|
|
294
|
-
onPoiDeselected(eventParsed?.payload);
|
|
295
|
-
break;
|
|
296
|
-
case "ui.favorite_pois_updated":
|
|
297
|
-
{
|
|
298
|
-
const favoritePoisIds = {
|
|
299
|
-
currentPoisIdentifiers: eventParsed.payload.favoritePois ? [...eventParsed.payload.favoritePois] : []
|
|
300
|
-
};
|
|
301
|
-
onFavoritePoisUpdated(favoritePoisIds);
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
case "cartography.floor_selected":
|
|
305
|
-
onFloorChanged(eventParsed?.payload);
|
|
306
|
-
break;
|
|
307
|
-
case "cartography.building_selected":
|
|
308
|
-
if (!eventParsed.payload.identifier || eventParsed.payload.identifier.toString() === buildingIdentifier) {
|
|
309
|
-
return;
|
|
310
|
-
} else {
|
|
311
|
-
setBuildingIdentifier(eventParsed.payload.identifier.toString());
|
|
312
|
-
}
|
|
313
|
-
break;
|
|
314
|
-
case "viewer.navigation.started":
|
|
315
|
-
case "viewer.navigation.updated":
|
|
316
|
-
case "viewer.navigation.stopped":
|
|
317
|
-
SitumPlugin.updateNavigationState(eventParsed.payload);
|
|
318
|
-
break;
|
|
319
|
-
default:
|
|
320
|
-
break;
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
const _onShouldStartLoadWithRequest = request => {
|
|
324
|
-
if (request && request.url && !request.url.startsWith(configuration.viewerDomain || SITUM_BASE_DOMAIN)) {
|
|
325
|
-
if (onExternalLinkClicked && typeof onExternalLinkClicked === "function") {
|
|
326
|
-
onExternalLinkClicked({
|
|
327
|
-
url: request.url
|
|
328
|
-
});
|
|
329
|
-
} else {
|
|
330
|
-
Linking.openURL(request.url);
|
|
331
|
-
}
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
return true;
|
|
335
|
-
};
|
|
336
|
-
const _effectiveProfile = () => {
|
|
337
|
-
let effectiveProfile = configuration.profile;
|
|
338
|
-
if (configuration.remoteIdentifier && configuration.remoteIdentifier.length > 0) {
|
|
339
|
-
console.warn('Situm> MapView> [!] "remoteIdentifier" is deprecated. Use "profile" instead.');
|
|
340
|
-
if (!configuration.profile || configuration.profile.length == 0) {
|
|
341
|
-
effectiveProfile = configuration.remoteIdentifier;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return effectiveProfile;
|
|
345
|
-
};
|
|
346
|
-
return /*#__PURE__*/_jsx(WebView, {
|
|
347
|
-
ref: webViewRef,
|
|
348
|
-
source: {
|
|
349
|
-
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`
|
|
350
|
-
},
|
|
351
|
-
style: StyleSheet.flatten([viewerStyles.webview, style]),
|
|
352
|
-
limitsNavigationsToAppBoundDomains: true,
|
|
353
|
-
javaScriptEnabled: true,
|
|
354
|
-
domStorageEnabled: true,
|
|
355
|
-
startInLoadingState: true,
|
|
356
|
-
cacheEnabled: true,
|
|
357
|
-
onMessage: handleRequestFromViewer,
|
|
358
|
-
onShouldStartLoadWithRequest: _onShouldStartLoadWithRequest,
|
|
359
|
-
onError: evt => {
|
|
360
|
-
if (!onLoadError) return;
|
|
361
|
-
const {
|
|
362
|
-
nativeEvent
|
|
363
|
-
} = evt;
|
|
364
|
-
// TODO: on render error should probably still try to render an html
|
|
365
|
-
if (nativeEvent.code === NETWORK_ERROR_CODE[Platform.OS]) {
|
|
366
|
-
onLoadError({
|
|
367
|
-
name: ErrorName.ERR_INTERNET_DISCONNECTED,
|
|
368
|
-
description: nativeEvent.description
|
|
369
|
-
});
|
|
370
|
-
} else {
|
|
371
|
-
// TODO: handle more errors
|
|
372
|
-
onLoadError({
|
|
373
|
-
name: ErrorName.ERR_INTERNAL_SERVER_ERROR,
|
|
374
|
-
description: nativeEvent.description
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
export default MapView;
|
|
381
|
-
//# sourceMappingURL=MapView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useImperativeHandle","useRef","useState","Linking","Platform","StyleSheet","WebView","SitumPlugin","useSitum","ErrorName","sendMessageToViewer","ViewerMapper","setError","setLocationStatus","jsx","_jsx","SITUM_BASE_DOMAIN","NETWORK_ERROR_CODE","android","ios","windows","macos","web","viewerStyles","create","webview","minHeight","minWidth","MapView","forwardRef","configuration","style","onLoad","onLoadError","onPoiSelected","onPoiDeselected","onFloorChanged","onExternalLinkClicked","undefined","onFavoritePoisUpdated","ref","webViewRef","_onDirectionsRequestInterceptor","setInterceptor","mapLoaded","setMapLoaded","buildingIdentifier","setBuildingIdentifier","init","location","locationStatus","directions","navigation","calculateRoute","startNavigation","stopNavigation","error","sendFollowUser","current","position","_followUser","_navigateToPoi","payload","identifier","navigateToPoi","followUser","_navigateToCar","navigateToCar","_navigateToPoint","lat","lng","floorIdentifier","navigateToPoint","_selectPoi","poiId","selectPoi","_selectCar","selectCar","_selectPoiCategory","categoryId","navigationIsRunning","console","selectPoiCategory","_selectFloor","floorId","options","selectFloor","_search","search","_setDirectionsOptions","directionsOptions","setDirectionsOptions","_setFavoritePois","poiIds","setFavoritePois","_onMapIsReady","locationError","unfollowUser","deselectPoi","setOnDirectionsRequestInterceptor","directionRequestInterceptor","cancelNavigation","validateMapViewProjectSettings","code","message","route","language","setLanguage","initialConfiguration","handleRequestFromViewer","event","eventParsed","JSON","parse","nativeEvent","data","type","favoritePoisIds","currentPoisIdentifiers","favoritePois","toString","updateNavigationState","_onShouldStartLoadWithRequest","request","url","startsWith","viewerDomain","openURL","_effectiveProfile","effectiveProfile","profile","remoteIdentifier","length","warn","source","uri","situmApiKey","flatten","limitsNavigationsToAppBoundDomains","javaScriptEnabled","domStorageEnabled","startInLoadingState","cacheEnabled","onMessage","onShouldStartLoadWithRequest","onError","evt","OS","name","ERR_INTERNET_DISCONNECTED","description","ERR_INTERNAL_SERVER_ERROR"],"sourceRoot":"../../../../src","sources":["wayfinding/components/MapView.tsx"],"mappings":";;AAAA;AACA;AACA,OAAOA,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SACEC,OAAO,EACPC,QAAQ,EAERC,UAAU,QAEL,cAAc;AACrB,OAAOC,OAAO,MAA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