@situm/react-native 3.0.0-beta.0 → 3.0.0-beta.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.
Files changed (51) hide show
  1. package/README.md +59 -505
  2. package/lib/commonjs/index.js +12 -0
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/sdk/types/index.d.js +349 -0
  5. package/lib/commonjs/sdk/types/index.d.js.map +1 -1
  6. package/lib/commonjs/utils/requestPermission.js +2 -2
  7. package/lib/commonjs/utils/requestPermission.js.map +1 -1
  8. package/lib/commonjs/wayfinding/components/MapView.js +97 -12
  9. package/lib/commonjs/wayfinding/components/MapView.js.map +1 -1
  10. package/lib/commonjs/wayfinding/hooks/index.js +40 -80
  11. package/lib/commonjs/wayfinding/hooks/index.js.map +1 -1
  12. package/lib/commonjs/wayfinding/store/index.js +8 -28
  13. package/lib/commonjs/wayfinding/store/index.js.map +1 -1
  14. package/lib/commonjs/wayfinding/utils/mapper.js +6 -4
  15. package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -1
  16. package/lib/module/index.js +1 -0
  17. package/lib/module/index.js.map +1 -1
  18. package/lib/module/sdk/types/index.d.js +373 -1
  19. package/lib/module/sdk/types/index.d.js.map +1 -1
  20. package/lib/module/utils/requestPermission.js +2 -2
  21. package/lib/module/utils/requestPermission.js.map +1 -1
  22. package/lib/module/wayfinding/components/MapView.js +97 -11
  23. package/lib/module/wayfinding/components/MapView.js.map +1 -1
  24. package/lib/module/wayfinding/hooks/index.js +8 -49
  25. package/lib/module/wayfinding/hooks/index.js.map +1 -1
  26. package/lib/module/wayfinding/store/index.js +3 -24
  27. package/lib/module/wayfinding/store/index.js.map +1 -1
  28. package/lib/module/wayfinding/utils/mapper.js +6 -4
  29. package/lib/module/wayfinding/utils/mapper.js.map +1 -1
  30. package/lib/typescript/src/index.d.ts +1 -0
  31. package/lib/typescript/src/index.d.ts.map +1 -1
  32. package/lib/typescript/src/wayfinding/components/MapView.d.ts +5 -2
  33. package/lib/typescript/src/wayfinding/components/MapView.d.ts.map +1 -1
  34. package/lib/typescript/src/wayfinding/hooks/index.d.ts +3 -12
  35. package/lib/typescript/src/wayfinding/hooks/index.d.ts.map +1 -1
  36. package/lib/typescript/src/wayfinding/store/index.d.ts +3 -62
  37. package/lib/typescript/src/wayfinding/store/index.d.ts.map +1 -1
  38. package/lib/typescript/src/wayfinding/utils/mapper.d.ts +3 -2
  39. package/lib/typescript/src/wayfinding/utils/mapper.d.ts.map +1 -1
  40. package/package.json +12 -9
  41. package/src/index.ts +1 -0
  42. package/src/sdk/types/index.d.ts +80 -0
  43. package/src/utils/requestPermission.ts +2 -2
  44. package/src/wayfinding/components/MapView.tsx +329 -217
  45. package/src/wayfinding/hooks/index.ts +17 -78
  46. package/src/wayfinding/store/index.tsx +13 -80
  47. package/src/wayfinding/types/index.d.ts +10 -11
  48. package/src/wayfinding/utils/mapper.ts +16 -13
  49. package/android/.gradle/5.6.4/fileChanges/last-build.bin +0 -0
  50. package/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
  51. package/android/.gradle/5.6.4/gc.properties +0 -0
@@ -1,2 +1,374 @@
1
- export {};
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /* eslint-disable @typescript-eslint/ban-types */
3
+
4
+ /** @name
5
+ * Building
6
+ * @description
7
+ * A Building object definition
8
+ * @property {string} buildingIdentifier - The unique identifier of the resource
9
+ * @property {string} name - The building name that is appropriate for display to the user.
10
+ * @property {string} address - Te building address.
11
+ * @property {Bounds} bounds - Compute corners of this building, without rotation, in earth coordinates.
12
+ * @property {Bounds} boundsRotated - Compute corners of this building, with rotation, in earth coordinates.
13
+ * @property {Coordinate} center - Center of the building's base, as geographical coordinate.
14
+ * @property {Dimensions} Dimensions - Dimensions of building's base (height and width) in meters.
15
+ * @property {string} infoHtml - Additional information about building, formatted with HTML
16
+ * @property {string} pictureThumbUrl - The URL of building thumbnail image
17
+ * @property {string} pictureUrl - The URL of building image
18
+ * @property {number} rotation - Rotation angle of the building's base, relative to the west-east axis, increasing in counter-clockwise, being 0 the west-east axis.
19
+ * @property {string} userIdentifier - Unique identifier of the owner user of the building
20
+ * @property {object} customFields - Map of custom fields, indexed by their name.
21
+ */
22
+
23
+ /** @name
24
+ * Bounds
25
+ * @description
26
+ * Represents a rectangle bounds in a greographic 2D space.
27
+ * @property {Coordinate} northEast - The coordinate of the north-east corner of the bound.
28
+ * @property {Coordinate} northWest - The coordinate of the north-west corner of the bound.
29
+ * @property {Coordinate} southEast - The coordinate of the south-east corner of the bound.
30
+ * @property {Coordinate} southWest - The coordinate of the south-east corner of the bound.
31
+ */
32
+
33
+ /** @name
34
+ * Dimensions
35
+ * @description
36
+ * Define 2D dimensions of a rectangular area.
37
+ * @property {number} width - Width of rectangle in meters
38
+ * @property {number} height - Height of rectangle in meters.
39
+ */
40
+
41
+ /**
42
+ * @name
43
+ * Coordinate
44
+ * @description
45
+ * A structure that contains geographical coordinate.
46
+ * @property {number} latitude - Latitude in degrees
47
+ * @property {number} longitude - Longitude in degrees
48
+ */
49
+
50
+ /**
51
+ * @name
52
+ * CartesianCoordinate
53
+ * @description
54
+ * A structure that contains cartesian coordinate.
55
+ * @property {number} x - Value of coordinate at x-axis
56
+ * @property {number} y - Value of coordinate at y-axis
57
+ */
58
+
59
+ /**
60
+ * @name
61
+ * Floor
62
+ * @description
63
+ * Floor of a building.
64
+ * @property {number} altitude - Altitude of the floor above ground level, in meters.
65
+ * @property {string} buildingIdentifier - The identifier of building which this floor belongs.
66
+ * @property {number} level - The number of the floor.
67
+ * @property {string} name - The name of the floor
68
+ * @property {string} mapUrl - The floor map image url
69
+ * @property {number} scale - The scale of the floor image, in px/meters
70
+ * @property {string} floorIdentifier - The unique identifier of the resource
71
+ */
72
+
73
+ /**
74
+ * @name
75
+ * POI
76
+ * @description
77
+ * Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
78
+ * @property {string} identifier - The unique identifier of the resource
79
+ * @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
80
+ * @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate of this position, relative to building {@link Bounds}.
81
+ * @property {Coordinate} coordinate - Geographical coordinate of this position
82
+ * @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
83
+ * @property {string} poiName - A name for the POI, appropriate for display to the user.
84
+ * @property {Point} position - {@link Point} where the point is located.
85
+ * @property {boolean} isIndoor - Whether the POI is placed outside the building or not.
86
+ * @property {boolean} isOutdoor - Whether the POI is placed outside the building or not.
87
+ * @property {PoiCategory} category - Category of the POI
88
+ * @property {string} infoHtml - Additional information about POI, in HTML
89
+ * @property {object} customFields - Map of custom fields, indexed by their name.
90
+ */
91
+
92
+ /**
93
+ * @name
94
+ * Geofence
95
+ * @description
96
+ * Point of Interest, associated to a building, regardless of whether it's place inside or outside the building.
97
+ * @property {string} identifier - The unique identifier of the resource
98
+ * @property {string} buildingIdentifier - Identifier of building to which the POI belongs.
99
+ * @property {string} floorIdentifier - If this POI is outside the building (isOutdoor == true), this field has no meaning.
100
+ * @property {string} name - A name for the geofence, appropriate for display to the user.
101
+ * @property {string} infoHtml - Additional information about POI, in HTML
102
+ * @property {Point[]} polygonPoints - List of points of that define the area of the geofence
103
+ * @property {object} customFields - Map of custom fields, indexed by their name.
104
+ */
105
+
106
+ /**
107
+ * @name
108
+ * PoiCategory
109
+ * @description
110
+ * Category of Point of Interest.
111
+ * @property {string} poiCategoryCode - Unique code of the category
112
+ * @property {string} poiCategoryName - The category name appropriate for display to the user
113
+ * @property {string} icon_selected - The selected icon url
114
+ * @property {string} icon_unselected - The unselected icon url
115
+ * @property {boolean} public - Whether the category is public or not
116
+ */
117
+
118
+ /**
119
+ * @name
120
+ * Point
121
+ * @description
122
+ * Associate geographical coordinate (Location) with Building and Floor (Cartography) and cartesian coordinate relative to that building.
123
+ * @property {string} buildingIdentifier - Unique identifier for the building to which this point belongs
124
+ * @property {CartesianCoordinate} cartesianCoordinate - Cartesian coordinate (in meters) relative to the Bounds of building's base.
125
+ * @property {Coordinate} coordinate - Geographic coordinate (latitude, longitude) of the point, regardless of whether it's placed inside or outside the building.
126
+ * @property {string} floorIdentifier - Floor identifier (inside the building) where this point is placed.
127
+ * @property {boolean} isIndoor - If the POI is inside the building.
128
+ * @property {boolean} idOutdoor - If the POI is outside the building.
129
+ */
130
+
131
+ /**
132
+ * @name
133
+ * Route
134
+ * @description
135
+ * Route between two points.
136
+ * @property {RouteStep[]} edges - Ordered list of steps to go to the goal point
137
+ * @property {RouteStep} firstStep - First step
138
+ * @property {Point} from - Point where the route starts.
139
+ * @property {Indication} indications - Ordered list of instructions to go to the destination
140
+ * @property {RouteStep} lastStep - Last step
141
+ * @property {Point[]} nodes - A collection of points of the route (not ordered)
142
+ * @property {Point[]} points - List of ordered points of the route
143
+ * @property {Point} to - Last point and goal of the route.
144
+ * @property {RouteStep[]} steps - Ordered list of steps to go to the goal point
145
+ * @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
146
+ */
147
+
148
+ /**
149
+ * @name
150
+ * RouteStep
151
+ * @description
152
+ * A fragment of a route, described by the initial point from and the last point to of the fragment, and some information about the step within the route.
153
+ * @property {number} distance - Distance between from and to in meters.
154
+ * @property {number} distanceToGoal - Distance in meters between the start point of this step (from) and the last point in the route ('to' of the last step).
155
+ * @property {Point} from - Start point of this step.
156
+ * @property {number} id - Position of this RouteStep in the list of steps (Route.steps) of the route to which it belongs.
157
+ * @property {Point} to - End point of this step.
158
+ * @property {boolean} isFirst - Returns true if this is the first step in the route.
159
+ * @property {boolean} isLast - Returns true if this is the last step in the route.
160
+ */
161
+
162
+ /**
163
+ * @name
164
+ * RouteSegment
165
+ * @description
166
+ * A fragment of a route, described by a floor identifier and a list of consecutive points from the same floor
167
+ * @property {string} floorIdentifier - Identifier of the floor containing the points in this segment
168
+ * @property {Point[]} points - Consecutive points in the same floor forming a path
169
+ */
170
+
171
+ /**
172
+ * @name
173
+ * Indication
174
+ * @description
175
+ * Represents the instruction that a user should follow when on a RouteStep to continue the route.
176
+ * @property {number} distance - The distance between the origin and destination
177
+ * @property {number} distanceToNextLevel - The number of levels between the origin and destination
178
+ * @property {string} indicationType - The Indication.Action of the instruction as String
179
+ * @property {number} orientation - The angle a user should change his direction in order to go from the origin to the destination.
180
+ * @property {string} orientationType - The Indication.Orientation of the instruction as String
181
+ * @property {number} stepIdxDestination - The index of the indication's step of destination.
182
+ * @property {number} stepIdxOrigin - The index of the indication's step of origin
183
+ * @property {boolean} neededLevelChange - If the user should change the level in order to arrive to destination
184
+ */
185
+
186
+ /**
187
+ * @name
188
+ * NavigationProgress
189
+ * @description
190
+ * Provides information of the progress of a user while following a route.
191
+ * @property {Point} closestPointInRoute - Closest point in the route from the user location provided . @deprecated Use closestLocationInRoute instead.
192
+ * @property {Location} closestLocationInRoute - Closest location in the route from the user location provided .
193
+ * @property {number} distanceToClosestPointInRoute - Distance between the real user location (provided to updateWithLocation(Location)) and the closest route location.
194
+ * @property {Indication} currentIndication - The current indication.
195
+ * @property {Indication} nextIndication - The next indication.
196
+ * @property {number} currentStepIndex - The index of the closest route step to the user, where closestLocationInRoute is.
197
+ * @property {number} distanceToGoal - The distance in meters from closestLocationInRoute to route's goal point.
198
+ * @property {number} distanceToEndStep - The distance in meters to go from closestLocationInRoute to the end of the current step.
199
+ * @property {number} timeToEndStep - The estimated time to go from closestLocationInRoute to the end of the current route step, considering a speed of 1 meter/second.
200
+ * @property {number} timeToGoal - The estimated time to go from closestLocationInRoute to the goal/end of route, considering a speed of 1 meter/second.
201
+ * @property {RouteStep} routeStep - The closest route step to the user, where closestLocationInRoute is.
202
+ * @property {Point[]} points - List of ordered points of the remaining route
203
+ * @property {RouteSegment[]} segments - List of segments formed by consecutive points and a floor identifier
204
+ */
205
+
206
+ /**
207
+ * @name
208
+ * SitumEvent
209
+ * @description
210
+ * An event: POI with radius, conversion area and asociated statistics. It is intended for usage in marketing apps.
211
+ * @property {number} buildingIdentifier - The identifier of the building this floor belongs to. Deprecated, use trigger.center.buildingIdentifier instead
212
+ * @property {number} identifier - Unique identifier of the SitumEvent.
213
+ * @property {number} floorIdentifier - The identifier of the floor this event is located at. @deprecated, use trigger.center.floorIdentifier instead
214
+ * @property {string} infoHtml - Information contained into the event, in HTML format.
215
+ * @property {SitumConversionArea} conversionArea - Location where the event is located. @deprecated, use conversion instead
216
+ * @property {Circle} conversion - Location where the event is located.
217
+ * @property {Circle} trigger - Location where the event should be fired
218
+ * @property {object} customFields - Key-value pairs that allow to extend and fully customize the information associated with the event.
219
+ * @property {number} radius - Radius of the event associated area. @deprecated, use trigger.radius instead
220
+ * @property {string} name - Name of the event
221
+ * @property {number} x - Center of the event in the x-axis. @deprecated, use trigger.center.cartesianCoordinate.x instead
222
+ * @property {number} y - Center of the event in the y-axis. @deprecated, use trigger.center.cartesianCoordinate.y instead
223
+ */
224
+
225
+ /**
226
+ * @name
227
+ * SitumConversionArea
228
+ * @description
229
+ * A rectangular area of a floor defining the conversion area of an event
230
+ * @property {number} floorIdentifier - The identifier of the floor the SitumConversionArea is located at.
231
+ * @property {object} topLeft - Top-left corner
232
+ * @property {object} topRight - Top-right corner
233
+ * @property {object} bottomLeft - Bottom-left corner
234
+ * @property {object} bottomRight - Bottom-right corner
235
+ */
236
+
237
+ /**
238
+ * @name
239
+ * Circle
240
+ * @description
241
+ * A circular area
242
+ * @property {Point} center - The center of the circle
243
+ * @property {number} radius - The radius of the circle
244
+ */
245
+
246
+ /**
247
+ * @name
248
+ * LocationOptions
249
+ * @description
250
+ * A data object that contains parameters for the location service, LocationManager.
251
+ * @property {number} buildingIdentifier - Identifier of the building on which the positioning will be started
252
+ * @property {number} interval - Default interval (in milliseconds) to notify location updates
253
+ * @property {string} indoorProvider - Default indoor provider. Possible values are INPHONE and SUPPORT
254
+ * @property {boolean} useBle - Defines whether or not to use BLE for positioning
255
+ * @property {boolean} useWifi - Defines whether or not to use Wi-Fi for positioning
256
+ * @property {boolean} useGps - Defines whether or not to use the GPS for indoor positioning
257
+ * @property {boolean} useBarometer - Defines whether or not to use barometer for indoor positioning
258
+ * @property {string} motionMode - Default motion mode. Possible values are BY_CAR, BY_FOOT and RADIOMAX
259
+ * @property {boolean} useForegroundService - Defines whether or not to activate the {@link http://developers.situm.es/pages/android/using_situm_sdk_background.html foreground service}
260
+ * @property {boolean} useDeadReckoning - Defines whether ot not to use dead reckoning to get fast position updates using only the inertial sensors, between the server position updates.
261
+ * @property {OutdoorLocationOptions} outdoorLocationOptions - Outdoor location options. Only used in an indoor/outdoor request
262
+ * @property {BeaconFilter[]} beaconFilters - Deprecated - Beacon filters to be handled during scan time, otherwise only Situm beacons will be scanned. Can be invoked multiple times to add as much beacon filters as you want. The SitumSDK now does it automatically
263
+ * @property {number} smallestDisplacement - Default smallest displacement to nofiy location updates
264
+ * @property {string} realtimeUpdateInterval - Default interval to send locations to the Realtime. Possible values are REALTIME, FAST, NORMAL, SLOW and BATTERY_SAVER
265
+ * @property {boolean} autoEnableBleDuringPositioning - Set if the BLE should be re-enabled during positioning if the ble is used. Android only
266
+ */
267
+
268
+ /**
269
+ * @name
270
+ * LocationRequest
271
+ * @description
272
+ * A data object that contains parameters for the location service, LocationManager.
273
+ * @type {array}
274
+ * @property {Building} building 0 - Building on which the positioning will be started
275
+ * @property {LocationOptions} locationOptions 1 - Location options.
276
+ */
277
+
278
+ /**
279
+ * @name
280
+ * NavigationRequest
281
+ * @description
282
+ * A data object that contains parameters for the navigation service, NavigationManager.
283
+ * @property {number} distanceToChangeIndicationThreshold - Distance threshold from when the next indication is considered reached.
284
+ * @property {number} distanceToFloorChangeThreshold - Distance threshold from when a floor change is considered reached.
285
+ * @property {number} distanceToGoalThreshold - Distance threshold from when the goal is considered reached.
286
+ * @property {number} distanceToIgnoreFirstIndication - Maximum distance to ignore the first indication when navigating a route (Only available for Android).
287
+ * @property {number} ignoreLowQualityLocations - Set if low quality locations should be ignored. (Only available for Android).
288
+ * @property {number} indicationsInterval - Time to wait between indications.
289
+ * @property {number} outsideRouteThreshold - Set the distance to consider the use is outside of the route. A type=userOutsideRoute will be sent trough the NavigationListener .
290
+ * @property {number} roundIndicationsStep - Step that will be used to round indications distance.
291
+ * @property {number} timeToFirstIndication - Time to wait until the first indication is returned.
292
+ * @property {number} timeToIgnoreUnexpectedFloorChanges - Time (in millis) to ignore the locations received during navigation, when the next indication is a floor change, if the locations are in a wrong floor (not in origin or destination floors).
293
+ */
294
+
295
+ /**
296
+ * @name
297
+ * DirectionsRequest
298
+ * @description
299
+ * A data object that contains the request for directions.
300
+ * @property {Building} positioningBuilding
301
+ * @property {Point|Location} from - Current user's position as the starting point of the route.
302
+ * @property {Point|POI} to - Point to, where the route should end.
303
+ * @property {DirectionsOptions} options - Options that can be added to the request.
304
+ */
305
+
306
+ /**
307
+ * @name
308
+ * DirectionsOptions
309
+ * @description
310
+ * A data object that contains the directions options.
311
+ * @property {boolean} minimizeFloorChanges - Defines wheter or not the route should be calculated minimizing the floor changes even if the result is longer.
312
+ * @property {boolean} accessibleRoute - Deprecated, use accessibilityMode. Defines wheter or not the route has to be suitable for wheel chairs (true) or not (false).
313
+ * @property {boolean} accessible - Deprecated, use accessibilityMode. Defines wheter or not the route has to be suitable for wheel chairs (true) or not (false).
314
+ * @property {string} accessibilityMode - Defines the accessibility mode of the route. Possible values are: CHOOSE_SHORTEST, ONLY_NOT_ACCESSIBLE_FLOOR_CHANGES, ONLY_ACCESSIBLE
315
+ * @property {number} startingAngle - Current user's orientation in degrees.
316
+ */
317
+
318
+ /**
319
+ * @name
320
+ * OutdoorLocationOptions
321
+ * @description
322
+ * Outdoor location options are only used in indoor-outdoor mode (Only available for Android)
323
+ * @property {boolean} continuousMode - Environment detection continuous mode (true) or burst mode (false).
324
+ * @property {boolean} userDefinedThreshold
325
+ * @property {number} burstInterval - Interval to scan for GPS and detect the environment (in seconds).
326
+ * @property {number} averageSnrThreshold
327
+ */
328
+
329
+ /**
330
+ * @name
331
+ * BeaconFilter
332
+ * @description
333
+ * Represents a BLE filter. Now the only field is the BLE proximity UUID
334
+ * @property {string} uuid - Assigns the proximity UUID
335
+ */
336
+
337
+ /**
338
+ * @name
339
+ * RealTimeRequest
340
+ * @description
341
+ * A data object that contains the parameters to process realtime data of the users.
342
+ * @property {Building} building object
343
+ * @property {int} pollTime - Interval in milliseconds (minimum is 3000ms).
344
+ */
345
+
346
+ /**
347
+ * @name
348
+ * RealTimeData
349
+ * @description
350
+ * A data object that contains information of the location of users in realtime.
351
+ * @property {Array<Location>} locations object
352
+ */
353
+
354
+ export let LocationStatusName = /*#__PURE__*/function (LocationStatusName) {
355
+ LocationStatusName["STARTING"] = "STARTING";
356
+ LocationStatusName["CALCULATING"] = "CALCULATING";
357
+ LocationStatusName["POSITIONING"] = "POSITIONING";
358
+ LocationStatusName["USER_NOT_IN_BUILDING"] = "USER_NOT_IN_BUILDING";
359
+ LocationStatusName["STOPPED"] = "STOPPED";
360
+ return LocationStatusName;
361
+ }({});
362
+ export let NavigationStatus = /*#__PURE__*/function (NavigationStatus) {
363
+ NavigationStatus["START"] = "start";
364
+ NavigationStatus["STOP"] = "stop";
365
+ NavigationStatus["UPDATE"] = "update";
366
+ return NavigationStatus;
367
+ }({});
368
+ export let NavigationUpdateType = /*#__PURE__*/function (NavigationUpdateType) {
369
+ NavigationUpdateType["progress"] = "PROGRESS";
370
+ NavigationUpdateType["userOutsideRoute"] = "OUT_OF_ROUTE";
371
+ NavigationUpdateType["destinationReached"] = "DESTINATION_REACHED";
372
+ return NavigationUpdateType;
373
+ }({});
2
374
  //# sourceMappingURL=index.d.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["sdk/types/index.d.ts"],"mappings":""}
1
+ {"version":3,"names":["LocationStatusName","NavigationStatus","NavigationUpdateType"],"sourceRoot":"../../../../src","sources":["sdk/types/index.d.ts"],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoCA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAgC9B,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;AAM5B,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA"}
@@ -31,10 +31,10 @@ const checkAndroidPermissions = async () => {
31
31
  console.log("ANDROID VERSION > 30");
32
32
  granted = await requestMultiple([PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION, PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, PERMISSIONS.ANDROID.BLUETOOTH_SCAN]);
33
33
  if (granted["android.permission.ACCESS_FINE_LOCATION"] === RESULTS.GRANTED && granted["android.permission.BLUETOOTH_CONNECT"] === RESULTS.GRANTED && granted["android.permission.BLUETOOTH_SCAN"] === RESULTS.GRANTED) {
34
- console.info("ACCESS_FINE_LOCATION, BLUETOOTH_CONNECT and ACCESS_FINE_LOCATION permissions granted");
34
+ console.info("ACCESS_FINE_LOCATION, BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions granted");
35
35
  return true;
36
36
  }
37
- throw "ACCESS_FINE_LOCATION, BLUETOOTH_CONNECT and ACCESS_FINE_LOCATION permissions not granted";
37
+ throw "ACCESS_FINE_LOCATION, BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions not granted";
38
38
  } else {
39
39
  console.info("ANDROID VERSION < 30");
40
40
  granted = await request(PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION);
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","PERMISSIONS","request","requestMultiple","RESULTS","checkIOSPermissions","granted","IOS","LOCATION_WHEN_IN_USE","GRANTED","console","info","parseInt","Version","BLUETOOTH_PERIPHERAL","warn","checkAndroidPermissions","log","ANDROID","ACCESS_FINE_LOCATION","BLUETOOTH_CONNECT","BLUETOOTH_SCAN","requestPermission","Promise","resolve","reject","OS","then","catch","e"],"sourceRoot":"../../../src","sources":["utils/requestPermission.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SACEC,WAAW,EACXC,OAAO,EACPC,eAAe,EACfC,OAAO,QACF,0BAA0B;;AAEjC;AACA,MAAMC,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EACtC,IAAIC,OAAO,GAAG,MAAMJ,OAAO,CAACD,WAAW,CAACM,GAAG,CAACC,oBAAoB,CAAC;EAEjE,IAAIF,OAAO,KAAKF,OAAO,CAACK,OAAO,EAAE;IAC/BC,OAAO,CAACC,IAAI,CAAC,yCAAyC,CAAC;;IAEvD;IACA,IAAIC,QAAQ,CAACZ,QAAQ,CAACa,OAAO,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;MACvCP,OAAO,GAAG,MAAMJ,OAAO,CAACD,WAAW,CAACM,GAAG,CAACO,oBAAoB,CAAC;MAE7D,IAAIR,OAAO,KAAKF,OAAO,CAACK,OAAO,EAAE;QAC/BC,OAAO,CAACC,IAAI,CAAC,yCAAyC,CAAC;QACvD,OAAO,IAAI;MACb,CAAC,MAAM;QACL,MAAM,6CAA6C;MACrD;IACF,CAAC,MAAM;MACLD,OAAO,CAACK,IAAI,CAAC,+CAA+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AK,EAAE;IACzB,MAAMrB,mBAAmB,CAAC,CAAC,CACxBsB,IAAI,CAAC,MAAMH,OAAO,CAAC,CAAC,CAAC,CACrBI,KAAK,CAAEC,CAAS,IAAK;MACpBnB,OAAO,CAACK,IAAI,CAACc,CAAC,CAAC;MACfJ,MAAM,CAACI,CAAC,CAAC;IACX,CAAC,CAAC;EACN,CAAC,MAAM,IAAI7B,QAAQ,CAAC0B,EAAE,KAAK,SAAS,EAAE;IACpC,MAAMV,uBAAuB,CAAC,CAAC,CAC5BW,IAAI,CAAC,MAAMH,OAAO,CAAC,CAAC,CAAC,CACrBI,KAAK,CAAEC,CAAS,IAAK;MACpBnB,OAAO,CAACK,IAAI,CAACc,CAAC,CAAC;MACfJ,MAAM,CAACI,CAAC,CAAC;IACX,CAAC,CAAC;EACN;EAEAJ,MAAM,CAAE,YAAWzB,QAAQ,CAAC0B,EAAG,gBAAe,CAAC;AACjD,CAAC,CAAC;AAEJ,eAAeJ,iBAAiB"}
1
+ {"version":3,"names":["Platform","PERMISSIONS","request","requestMultiple","RESULTS","checkIOSPermissions","granted","IOS","LOCATION_WHEN_IN_USE","GRANTED","console","info","parseInt","Version","BLUETOOTH_PERIPHERAL","warn","checkAndroidPermissions","log","ANDROID","ACCESS_FINE_LOCATION","BLUETOOTH_CONNECT","BLUETOOTH_SCAN","requestPermission","Promise","resolve","reject","OS","then","catch","e"],"sourceRoot":"../../../src","sources":["utils/requestPermission.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SACEC,WAAW,EACXC,OAAO,EACPC,eAAe,EACfC,OAAO,QACF,0BAA0B;;AAEjC;AACA,MAAMC,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EACtC,IAAIC,OAAO,GAAG,MAAMJ,OAAO,CAACD,WAAW,CAACM,GAAG,CAACC,oBAAoB,CAAC;EAEjE,IAAIF,OAAO,KAAKF,OAAO,CAACK,OAAO,EAAE;IAC/BC,OAAO,CAACC,IAAI,CAAC,yCAAy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E,IAAIb,OAAO,KAAKF,OAAO,CAACK,OAAO,EAAE;MAC/BC,OAAO,CAACC,IAAI,CAAC,8BAA8B,CAAC;MAC5C,OAAO,IAAI;IACb,CAAC,MAAM;MACL,MAAM,6CAA6C;IACrD;EACF;AACF,CAAC;AAED,MAAMW,iBAAiB,GAAGA,CAAA;AACxB;AACA,IAAIC,OAAO,CAAO,OAAOC,OAAO,EAAEC,MAAM,KAAK;EAC3Cf,OAAO,CAACO,GAAG,CAAC,sCAAsC,GAAGjB,QAAQ,CAAC0B,EAAE,CAAC;EACjE,IAAI1B,QAAQ,CAAC0B,EAAE,KAAK,KAAK,EAAE;IACzB,MAAMrB,mBAAmB,CAAC,CAAC,CACxBsB,IAAI,CAAC,MAAMH,OAAO,CAAC,CAAC,CAAC,CACrBI,KAAK,CAAEC,CAAS,IAAK;MACpBnB,OAAO,CAACK,IAAI,CAACc,CAAC,CAAC;MACfJ,MAAM,CAACI,CAAC,CAAC;IACX,CAAC,CAAC;EACN,CAAC,MAAM,IAAI7B,QAAQ,CAAC0B,EAAE,KAAK,SAAS,EAAE;IACpC,MAAMV,uBAAuB,CAAC,CAAC,CAC5BW,IAAI,CAAC,MAAMH,OAAO,CAAC,CAAC,CAAC,CACrBI,KAAK,CAAEC,CAAS,IAAK;MACpBnB,OAAO,CAACK,IAAI,CAACc,CAAC,CAAC;MACfJ,MAAM,CAACI,CAAC,CAAC;IACX,CAAC,CAAC;EACN;EAEAJ,MAAM,CAAE,YAAWzB,QAAQ,CAAC0B,EAAG,gBAAe,CAAC;AACjD,CAAC,CAAC;AAEJ,eAAeJ,iBAAiB"}
@@ -1,11 +1,13 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  /* eslint-disable @typescript-eslint/no-empty-function */
3
- import React, { useEffect, useRef, useState } from "react";
3
+ import React, { useEffect, useImperativeHandle, useRef, useState } from "react";
4
4
  import { Platform, StyleSheet } from "react-native";
5
5
  import WebView from "react-native-webview";
6
+ import { NavigationStatus, NavigationUpdateType } from "../../sdk/types/index.d";
6
7
  //This icon should either be inside plugin or not be used rat all
7
8
  import useSitum from "../hooks";
8
- import { NavigationStatus, NavigationUpdateType, setWebViewRef } from "../store";
9
+ import { useCallbackRef } from "../hooks";
10
+ import { setWebViewRef } from "../store";
9
11
  import { useDispatch } from "../store/utils";
10
12
  import { sendMessageToViewer } from "../utils";
11
13
  import Mapper from "../utils/mapper";
@@ -31,7 +33,7 @@ const viewerStyles = StyleSheet.create({
31
33
  minWidth: "100%"
32
34
  }
33
35
  });
34
- const MapView = _ref => {
36
+ const MapView = /*#__PURE__*/React.forwardRef((_ref, ref) => {
35
37
  let {
36
38
  domain,
37
39
  // user,
@@ -50,11 +52,12 @@ const MapView = _ref => {
50
52
  //iOSMapViewIndex,
51
53
  } = _ref;
52
54
  const dispatch = useDispatch();
53
- const webViewRef = useRef();
55
+ const webViewRef = useRef(null);
54
56
  // Local states
55
57
  const [mapLoaded, setMapLoaded] = useState(false);
56
58
  const {
57
59
  user: fullUser,
60
+ pois,
58
61
  location,
59
62
  directions,
60
63
  navigation,
@@ -67,14 +70,95 @@ const MapView = _ref => {
67
70
  } = useSitum();
68
71
  const sendFollowUser = () => {
69
72
  var _location$position;
70
- if (webViewRef.current && mapLoaded && (location === null || location === void 0 ? void 0 : (_location$position = location.position) === null || _location$position === void 0 ? void 0 : _location$position.buildingIdentifier) === (configuration === null || configuration === void 0 ? void 0 : configuration.buildingIdentifier)) {
73
+ if (webViewRef.current && mapLoaded && (location === null || location === void 0 || (_location$position = location.position) === null || _location$position === void 0 ? void 0 : _location$position.buildingIdentifier) === (configuration === null || configuration === void 0 ? void 0 : configuration.buildingIdentifier)) {
71
74
  sendMessageToViewer(webViewRef.current, Mapper.followUser(true));
72
75
  }
73
76
  };
77
+
78
+ /**
79
+ * API exported to the outside world from the MapViewer
80
+ *
81
+ * These handler allows third party developers to send actions to the MapView.
82
+ * please check the MapViewRef type definitions to know the public API.
83
+ *
84
+ * <MapView
85
+ * ref={(ref: MapViewRef) => ref.selectPoi(122)}
86
+ * configuration={{
87
+ * buildingIdentifier: SITUM_BUILDING_ID,
88
+ * }}
89
+ * onLoad={onLoad} />
90
+ */
91
+ const navigateToPoiRef = useCallbackRef(_ref2 => {
92
+ let {
93
+ poi,
94
+ poiId
95
+ } = _ref2;
96
+ if (!webViewRef.current || !poi && !poiId) return;
97
+ const validPoi = pois === null || pois === void 0 ? void 0 : pois.find(p => {
98
+ var _poi$id;
99
+ return (p === null || p === void 0 ? void 0 : p.identifier) === (poiId === null || poiId === void 0 ? void 0 : poiId.toString()) ||
100
+ // @ts-ignore
101
+ (p === null || p === void 0 ? void 0 : p.identifier) === (poi === null || poi === void 0 || (_poi$id = poi.id) === null || _poi$id === void 0 ? void 0 : _poi$id.toString());
102
+ });
103
+ if (!validPoi) {
104
+ console.error("Situm > hook > Invalid value as poi or poiId");
105
+ return;
106
+ }
107
+ sendMessageToViewer(webViewRef.current, Mapper.navigateToPoi({
108
+ // @ts-ignore
109
+ navigationTo: (poi === null || poi === void 0 ? void 0 : poi.id) || poiId
110
+ }));
111
+ }, [pois]);
112
+ const selectPoiRef = useCallbackRef(poiId => {
113
+ if (!webViewRef.current) {
114
+ return;
115
+ }
116
+ const poi = pois === null || pois === void 0 ? void 0 : pois.find(p => (p === null || p === void 0 ? void 0 : p.identifier) === (poiId === null || poiId === void 0 ? void 0 : poiId.toString()));
117
+ if (!poi) {
118
+ console.error("Situm > hook > Invalid value as poiId");
119
+ return;
120
+ }
121
+ if (navigation.status !== NavigationStatus.STOP) {
122
+ console.error("Situm > hook > Navigation on course, poi selection is unavailable");
123
+ return;
124
+ }
125
+ sendMessageToViewer(webViewRef.current, Mapper.selectPoi(poiId));
126
+ }, [pois, navigation.status]);
127
+ useImperativeHandle(ref, () => {
128
+ return {
129
+ followUser() {
130
+ webViewRef.current && sendMessageToViewer(webViewRef.current, Mapper.followUser(true));
131
+ },
132
+ unFollowUser() {
133
+ webViewRef.current && sendMessageToViewer(webViewRef.current, Mapper.followUser(false));
134
+ },
135
+ selectPoi(poiId) {
136
+ selectPoiRef.current(poiId);
137
+ },
138
+ deselectPoi() {
139
+ webViewRef.current && sendMessageToViewer(webViewRef.current, Mapper.selectPoi(null));
140
+ },
141
+ navigateToPoi(_ref3) {
142
+ let {
143
+ poi,
144
+ poiId
145
+ } = _ref3;
146
+ navigateToPoiRef.current({
147
+ poi,
148
+ poiId
149
+ });
150
+ },
151
+ cancelNavigation() {
152
+ if (!webViewRef.current) return;
153
+ stopNavigation();
154
+ sendMessageToViewer(webViewRef.current, Mapper.cancelNavigation());
155
+ }
156
+ };
157
+ }, [stopNavigation, navigateToPoiRef, selectPoiRef]);
74
158
  useEffect(() => {
75
- configuration.buildingIdentifier && initializeBuildingById(configuration.buildingIdentifier);
159
+ (configuration === null || configuration === void 0 ? void 0 : configuration.buildingIdentifier) && initializeBuildingById(configuration.buildingIdentifier);
76
160
  // eslint-disable-next-line react-hooks/exhaustive-deps
77
- }, [configuration.buildingIdentifier]);
161
+ }, [configuration === null || configuration === void 0 ? void 0 : configuration.buildingIdentifier]);
78
162
  useEffect(() => {
79
163
  if (error) {
80
164
  console.error("Error code:", error.code ? error.code : " no code provided");
@@ -114,9 +198,9 @@ const MapView = _ref => {
114
198
  }, [directions]);
115
199
  useEffect(() => {
116
200
  if (webViewRef.current && mapLoaded) {
117
- sendMessageToViewer(webViewRef.current, Mapper.initialConfiguration(style, configuration.enablePoiClustering, configuration.showPoiNames, configuration.minZoom, configuration.maxZoom, configuration.initialZoom, configuration.useDashboardTheme));
201
+ sendMessageToViewer(webViewRef.current, Mapper.initialConfiguration(style, configuration === null || configuration === void 0 ? void 0 : configuration.enablePoiClustering, configuration === null || configuration === void 0 ? void 0 : configuration.showPoiNames, configuration === null || configuration === void 0 ? void 0 : configuration.minZoom, configuration === null || configuration === void 0 ? void 0 : configuration.maxZoom, configuration === null || configuration === void 0 ? void 0 : configuration.initialZoom, configuration === null || configuration === void 0 ? void 0 : configuration.useDashboardTheme));
118
202
  }
119
- }, [webViewRef, mapLoaded, style, configuration.enablePoiClustering, configuration.showPoiNames, configuration.minZoom, configuration.maxZoom, configuration.initialZoom, configuration.useDashboardTheme]);
203
+ }, [webViewRef, mapLoaded, style, configuration === null || configuration === void 0 ? void 0 : configuration.enablePoiClustering, configuration === null || configuration === void 0 ? void 0 : configuration.showPoiNames, configuration === null || configuration === void 0 ? void 0 : configuration.minZoom, configuration === null || configuration === void 0 ? void 0 : configuration.maxZoom, configuration === null || configuration === void 0 ? void 0 : configuration.initialZoom, configuration === null || configuration === void 0 ? void 0 : configuration.useDashboardTheme]);
120
204
  const handleRequestFromViewer = event => {
121
205
  const eventParsed = JSON.parse(event.nativeEvent.data);
122
206
  switch (eventParsed.type) {
@@ -169,12 +253,14 @@ const MapView = _ref => {
169
253
  return /*#__PURE__*/React.createElement(WebView, {
170
254
  ref: webViewRef,
171
255
  source: {
172
- uri: `${domain || SITUM_BASE_DOMAIN}/?email=${fullUser === null || fullUser === void 0 ? void 0 : fullUser.email}&apikey=${fullUser === null || fullUser === void 0 ? void 0 : fullUser.apiKey}&wl=true&global=true&mode=embed${configuration.buildingIdentifier ? `&buildingid=${configuration.buildingIdentifier}` : ""}&show=rts`
256
+ uri: `${domain || SITUM_BASE_DOMAIN}/${configuration !== null && configuration !== void 0 && configuration.remoteIdentifier ? `id/${configuration.remoteIdentifier}` : ""}?email=${fullUser === null || fullUser === void 0 ? void 0 : fullUser.email}&apikey=${fullUser === null || fullUser === void 0 ? void 0 : fullUser.apiKey}&wl=true&global=true&mode=embed${configuration !== null && configuration !== void 0 && configuration.buildingIdentifier ? `&buildingid=${configuration.buildingIdentifier}` : ""}&show=rts`
173
257
  },
174
258
  style: viewerStyles.webview,
259
+ limitsNavigationsToAppBoundDomains: true,
175
260
  javaScriptEnabled: true,
176
261
  domStorageEnabled: true,
177
262
  startInLoadingState: true,
263
+ cacheEnabled: true,
178
264
  onMessage: handleRequestFromViewer
179
265
  // This is called on a lot of interactions with the map because of url change probably
180
266
  ,
@@ -202,6 +288,6 @@ const MapView = _ref => {
202
288
  }
203
289
  }
204
290
  });
205
- };
291
+ });
206
292
  export default MapView;
207
293
  //# sourceMappingURL=MapView.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useRef","useState","Platform","StyleSheet","WebView","useSitum","NavigationStatus","NavigationUpdateType","setWebViewRef","useDispatch","sendMessageToViewer","Mapper","SITUM_BASE_DOMAIN","ErrorName","NETWORK_ERROR_CODE","android","ios","windows","macos","web","viewerStyles","create","webview","minHeight","minWidth","MapView","_ref","domain","configuration","onLoad","onLoadError","onFloorChanged","onPoiSelected","onPoiDeselected","onNavigationRequested","onNavigationStarted","onNavigationError","onNavigationFinished","style","dispatch","webViewRef","mapLoaded","setMapLoaded","user","fullUser","location","directions","navigation","currentBuilding","initializeBuildingById","calculateRoute","startNavigation","stopNavigation","error","sendFollowUser","_location$position","current","position","buildingIdentifier","followUser","console","code","message","status","START","routeToResult","type","destinationReached","navigationToResult","route","initialConfiguration","enablePoiClustering","showPoiNames","minZoom","maxZoom","initialZoom","useDashboardTheme","handleRequestFromViewer","event","eventParsed","JSON","parse","nativeEvent","data","originId","payload","originIdentifier","destinationId","destinationIdentifier","directionsOptions","callback","_navigation","identifier","toString","createElement","ref","source","uri","email","apiKey","javaScriptEnabled","domStorageEnabled","startInLoadingState","onMessage","onLoadEnd","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,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,OAAOC,OAAO,MAAM,sBAAsB;AAM1C;AACA,OAAOC,QAAQ,MAAM,UAAU;AAC/B,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,aAAa,QACR,UAAU;AACjB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A,QAAQ,uBAARA,QAAQ,CAAEsD,KAAM,WAC5DtD,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEuD,MACX,kCACCvE,aAAa,CAAC8B,kBAAkB,GAC3B,eAAc9B,aAAa,CAAC8B,kBAAmB,EAAC,GACjD,EACL;IACH,CAAE;IACFpB,KAAK,EAAElB,YAAY,CAACE,OAAQ;IAC5B8E,iBAAiB,EAAE,IAAK;IACxBC,iBAAiB,EAAE,IAAK;IACxBC,mBAAmB,EAAE,IAAK;IAC1BC,SAAS,EAAE1B;IACX;IAAA;IACA2B,SAAS,EAAEA,CAAA,KAAM;MACf,IAAI,CAAChE,UAAU,CAACgB,OAAO,EAAE;MACzBjB,QAAQ,CAAC/B,aAAa,CAACgC,UAAU,CAAC,CAAC;MACnCE,YAAY,CAAC,IAAI,CAAC;IACpB,CAAE;IACF+D,OAAO,EAAGC,GAAsB,IAAK;MACnC,MAAM;QAAExB;MAAY,CAAC,GAAGwB,GAAG;MAC3B;MACA,IAAIxB,WAAW,CAACrB,IAAI,KAAK/C,kBAAkB,CAACZ,QAAQ,CAACyG,EAAE,CAAC,EAAE;QACxD7E,WAAW,CAAC;UACV8E,IAAI,EAAE/F,SAAS,CAACgG,yBAAyB;UACzCC,WAAW,EAAE5B,WAAW,CAAC4B;QAC3B,CAAC,CAAC;MACJ,CAAC,MAAM;QACL;QACAhF,WAAW,CAAC;UACV8E,IAAI,EAAE/F,SAAS,CAACkG,yBAAyB;UACzCD,WAAW,EAAE5B,WAAW,CAAC4B;QAC3B,CAAC,CAAC;MACJ;IACF;EAAE,CACH,CAAC;AAEN,CAAC;AAED,eAAerF,OAAO"}
1
+ {"version":3,"names":["React","useEffect","useImperativeHandle","useRef","useState","Platform","StyleSheet","WebView","NavigationStatus","NavigationUpdateType","useSitum","useCallbackRef","setWebViewRef","useDispatch","sendMessageToViewer","Mapper","SITUM_BASE_DOMAIN","ErrorName","NETWORK_ERROR_CODE","android","ios","windows","macos","web","viewerStyles","create","webview","minHeight","minWidth","MapView","forwardRef","_ref","ref","domain","configuration","onLoad","onLoadError","onFloorChanged","onPoiSelected","onPoiDeselected","onNavigationRequested","onNavigationStarted","onNavigationError","onNavigationFinished","style","dispatch","webViewRef","mapLoaded","setMapLoaded","user","fullUser","pois","location","directions","navigation","currentBuilding","initializeBuildingById","calculateRoute","startNavigation","stopNavigation","error","sendFollowUser","_location$position","current","position","buildingIdentifier","followUser","navigateToPoiRef","_ref2","poi","poiId","validPoi","find","p","_poi$id","identifier","toString","id","console","navigateToPoi","navigationTo","selectPoiRef","status","STOP","selectPoi","unFollowUser","deselectPoi","_ref3","cancelNavigation","code","message","START","routeToResult","type","destinationReached","navigationToResult","route","initialConfiguration","enablePoiClustering","showPoiNames","minZoom","maxZoom","initialZoom","useDashboardTheme","handleRequestFromViewer","event","eventParsed","JSON","parse","nativeEvent","data","originId","payload","originIdentifier","destinationId","destinationIdentifier","directionsOptions","callback","_navigation","createElement","source","uri","remoteIdentifier","email","apiKey","limitsNavigationsToAppBoundDomains","javaScriptEnabled","domStorageEnabled","startInLoadingState","cacheEnabled","onMessage","onLoadEnd","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,IAAIC,SAAS,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/E,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,OAAOC,OAAO,MAAM,sBAAsB;AAM1C,SAEEC,gBAAgB,EAChBC,oBAAoB,QAEf,yBAAyB;AAChC;AACA,OAAOC,QAAQ,MAAM,UAAU;AAC/B,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,aAAa,QAAQ,UAAU;AACxC,SAASC,WAAW,QAAQ,gBAAgB;AAU5C,SAASC,mBAAmB,QAAQ,UAAU;AAC9C,OAAOC,MAAM,MA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