@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.
Files changed (65) hide show
  1. package/lib/commonjs/index.js.map +0 -1
  2. package/lib/commonjs/sdk/index.js.map +1 -1
  3. package/lib/commonjs/sdk/internaDelegatedState.js.map +0 -1
  4. package/lib/commonjs/sdk/nativeInterface.js.map +0 -1
  5. package/lib/commonjs/sdk/types/index.js.map +0 -1
  6. package/lib/commonjs/sdk/utils.js.map +0 -1
  7. package/lib/commonjs/utils/logError.js.map +0 -1
  8. package/lib/commonjs/wayfinding/types/index.js.map +0 -1
  9. package/lib/commonjs/wayfinding/utils/mapper.js.map +0 -1
  10. package/lib/module/index.js.map +0 -1
  11. package/lib/module/sdk/index.js.map +1 -1
  12. package/lib/module/sdk/internaDelegatedState.js.map +0 -1
  13. package/lib/module/sdk/nativeInterface.js.map +0 -1
  14. package/lib/module/sdk/types/index.js.map +0 -1
  15. package/lib/module/sdk/utils.js.map +0 -1
  16. package/lib/module/utils/logError.js.map +0 -1
  17. package/lib/module/wayfinding/types/index.js.map +0 -1
  18. package/lib/module/wayfinding/utils/index.js.map +0 -1
  19. package/lib/typescript/sdk/index.d.ts +5 -2
  20. package/lib/typescript/sdk/index.d.ts.map +1 -1
  21. package/package.json +3 -3
  22. package/src/sdk/index.ts +4 -14
  23. package/lib/commonjs/index.js +0 -73
  24. package/lib/commonjs/sdk/index.js +0 -931
  25. package/lib/commonjs/sdk/internaDelegatedState.js +0 -48
  26. package/lib/commonjs/sdk/nativeInterface.js +0 -20
  27. package/lib/commonjs/sdk/types/constants.js +0 -73
  28. package/lib/commonjs/sdk/types/index.js +0 -414
  29. package/lib/commonjs/sdk/utils.js +0 -156
  30. package/lib/commonjs/utils/index.js +0 -17
  31. package/lib/commonjs/utils/logError.js +0 -21
  32. package/lib/commonjs/wayfinding/components/MapView.js +0 -389
  33. package/lib/commonjs/wayfinding/components/MapView.js.map +0 -1
  34. package/lib/commonjs/wayfinding/hooks/index.js +0 -233
  35. package/lib/commonjs/wayfinding/hooks/index.js.map +0 -1
  36. package/lib/commonjs/wayfinding/index.js +0 -57
  37. package/lib/commonjs/wayfinding/store/index.js +0 -247
  38. package/lib/commonjs/wayfinding/store/index.js.map +0 -1
  39. package/lib/commonjs/wayfinding/store/utils.js +0 -49
  40. package/lib/commonjs/wayfinding/types/constants.js +0 -13
  41. package/lib/commonjs/wayfinding/types/index.js +0 -6
  42. package/lib/commonjs/wayfinding/utils/index.js +0 -12
  43. package/lib/commonjs/wayfinding/utils/mapper.js +0 -204
  44. package/lib/module/index.js +0 -14
  45. package/lib/module/sdk/index.js +0 -904
  46. package/lib/module/sdk/internaDelegatedState.js +0 -43
  47. package/lib/module/sdk/nativeInterface.js +0 -20
  48. package/lib/module/sdk/types/constants.js +0 -70
  49. package/lib/module/sdk/types/index.js +0 -445
  50. package/lib/module/sdk/utils.js +0 -146
  51. package/lib/module/utils/index.js +0 -4
  52. package/lib/module/utils/logError.js +0 -17
  53. package/lib/module/wayfinding/components/MapView.js +0 -381
  54. package/lib/module/wayfinding/components/MapView.js.map +0 -1
  55. package/lib/module/wayfinding/hooks/index.js +0 -226
  56. package/lib/module/wayfinding/hooks/index.js.map +0 -1
  57. package/lib/module/wayfinding/index.js +0 -15
  58. package/lib/module/wayfinding/store/index.js +0 -213
  59. package/lib/module/wayfinding/store/index.js.map +0 -1
  60. package/lib/module/wayfinding/store/utils.js +0 -40
  61. package/lib/module/wayfinding/types/constants.js +0 -9
  62. package/lib/module/wayfinding/types/index.js +0 -4
  63. package/lib/module/wayfinding/utils/index.js +0 -7
  64. package/lib/module/wayfinding/utils/mapper.js +0 -195
  65. package/lib/module/wayfinding/utils/mapper.js.map +0 -1
@@ -1,204 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.createPoint = exports.createNavigationRequest = exports.createDirectionsRequest = exports.createDirectionsMessage = void 0;
7
- var _sdk = require("../../sdk");
8
- /* eslint-disable @typescript-eslint/no-explicit-any */
9
-
10
- const createPoint = payload => {
11
- return {
12
- buildingIdentifier: payload.buildingIdentifier,
13
- floorIdentifier: payload.floorIdentifier,
14
- cartesianCoordinate: payload.cartesianCoordinate,
15
- coordinate: payload.coordinate
16
- };
17
- };
18
- exports.createPoint = createPoint;
19
- const createDirectionsMessage = payload => {
20
- return {
21
- buildingIdentifier: payload.buildingIdentifier,
22
- originIdentifier: (payload.originIdentifier || -1).toString(),
23
- originCategory: payload.originCategory,
24
- destinationIdentifier: (payload.destinationIdentifier || -1).toString(),
25
- destinationCategory: payload.destinationCategory,
26
- identifier: (payload.identifier || "").toString()
27
- };
28
- };
29
- exports.createDirectionsMessage = createDirectionsMessage;
30
- const createDirectionsRequest = payload => {
31
- return {
32
- buildingIdentifier: payload.from.buildingIdentifier,
33
- to: createPoint(payload.to),
34
- from: createPoint(payload.from),
35
- bearingFrom: payload.bearingFrom?.radians || 0,
36
- accessibilityMode: payload.accessibilityMode || _sdk.AccessibilityMode.CHOOSE_SHORTEST,
37
- minimizeFloorChanges: payload.minimizeFloorChanges || false,
38
- includedTags: payload.includedTags || [],
39
- excludedTags: payload.excludedTags || []
40
- };
41
- };
42
- exports.createDirectionsRequest = createDirectionsRequest;
43
- const createNavigationRequest = payload => {
44
- const navigationRequest = {
45
- distanceToGoalThreshold: payload.distanceToGoalThreshold,
46
- outsideRouteThreshold: payload.outsideRouteThreshold,
47
- distanceToIgnoreFirstIndication: payload.distanceToIgnoreFirstIndication,
48
- distanceToFloorChangeThreshold: payload.distanceToFloorChangeThreshold,
49
- distanceToChangeIndicationThreshold: payload.distanceToChangeIndicationThreshold,
50
- indicationsInterval: payload.indicationsInterval,
51
- timeToFirstIndication: payload.timeToFirstIndication,
52
- roundIndicationsStep: payload.roundIndicationsStep,
53
- timeToIgnoreUnexpectedFloorChanges: payload.timeToIgnoreUnexpectedFloorChanges,
54
- ignoreLowQualityLocations: payload.ignoreLowQualityLocations
55
- };
56
- return Object.fromEntries(Object.entries(navigationRequest || {}).filter(([_, value]) => value !== undefined));
57
- };
58
- exports.createNavigationRequest = createNavigationRequest;
59
- const mapperWrapper = (type, payload) => {
60
- return JSON.stringify({
61
- type,
62
- payload: payload ?? {}
63
- });
64
- };
65
- const ViewerMapper = {
66
- // Configuration
67
- followUser: follow => {
68
- return mapperWrapper("camera.follow_user", {
69
- value: follow
70
- });
71
- },
72
- setLanguage: lang => {
73
- return mapperWrapper("ui.set_language", lang);
74
- },
75
- setFavoritePois: poiIds => {
76
- return mapperWrapper("ui.set_favorite_pois", poiIds);
77
- },
78
- initialConfiguration: style => {
79
- return mapperWrapper("ui.initial_configuration", {
80
- ...(style && {
81
- style: style
82
- })
83
- });
84
- },
85
- // Cartography
86
- selectPoi: poiId => {
87
- return mapperWrapper(`cartography.select_poi`, {
88
- identifier: poiId
89
- });
90
- },
91
- selectCar: () => {
92
- return mapperWrapper(`cartography.select_car`);
93
- },
94
- selectPoiCategory: categoryId => {
95
- return mapperWrapper(`cartography.select_poi_category`, {
96
- identifier: categoryId
97
- });
98
- },
99
- selectFloor: (floorIdentifier, options) => {
100
- return mapperWrapper(`cartography.select_floor`, {
101
- identifier: floorIdentifier,
102
- options
103
- });
104
- },
105
- setDirectionsOptions: directionsOptions => {
106
- return mapperWrapper(`directions.set_options`, {
107
- includedTags: directionsOptions.includedTags,
108
- excludedTags: directionsOptions.excludedTags
109
- });
110
- },
111
- // Location
112
- location: location => {
113
- return mapperWrapper("location.update", {
114
- ...(location.position && {
115
- latitude: location.position.coordinate.latitude,
116
- longitude: location.position.coordinate.longitude,
117
- x: location.position.cartesianCoordinate.x,
118
- y: location.position.cartesianCoordinate.y,
119
- buildingId: location.position.buildingIdentifier,
120
- floorId: location.position.floorIdentifier,
121
- bearing: location.bearing?.degreesClockwise,
122
- isIndoor: location.position.isIndoor,
123
- isOutdoor: location.position.isOutdoor,
124
- accuracy: location.accuracy,
125
- hasBearing: location.hasBearing
126
- })
127
- });
128
- },
129
- locationStatus: locationStatus => {
130
- return mapperWrapper("location.update_status", {
131
- status: locationStatus
132
- });
133
- },
134
- locationError: errorCode => {
135
- return mapperWrapper("location.update_status", {
136
- status: errorCode
137
- });
138
- },
139
- // Directions
140
- route: directions => {
141
- return mapperWrapper("directions.update", directions);
142
- },
143
- routeToResult: route => {
144
- return {
145
- navigation: {
146
- status: route.status,
147
- destination: {
148
- category: route?.destinationId ? "POI" : "COORDINATE",
149
- identifier: route?.destinationId,
150
- //name:, //TODO
151
- point: route.to ? createPoint(route.to) : createPoint(route.TO)
152
- }
153
- }
154
- };
155
- },
156
- // Navigation
157
- navigation: navigation => {
158
- return mapperWrapper(`navigation.${navigation.status}`, navigation);
159
- },
160
- navigateToPoi: navigate => {
161
- return mapperWrapper(`navigation.start`, {
162
- navigationTo: navigate?.identifier,
163
- type: navigate.accessibilityMode
164
- });
165
- },
166
- navigateToCar: params => {
167
- return mapperWrapper(`navigation.start.to_car`, {
168
- type: params?.accessibilityMode
169
- });
170
- },
171
- navigateToPoint: ({
172
- lat,
173
- lng,
174
- floorIdentifier,
175
- navigationName,
176
- accessibilityMode
177
- }) => {
178
- return mapperWrapper(`navigation.start`, {
179
- lat,
180
- lng,
181
- floorIdentifier,
182
- navigationName,
183
- type: accessibilityMode
184
- });
185
- },
186
- cancelNavigation: () => {
187
- return mapperWrapper(`navigation.cancel`, {});
188
- },
189
- navigationToResult: navigation => {
190
- return {
191
- navigation: {
192
- status: navigation?.type
193
- }
194
- };
195
- },
196
- search: searchFilter => {
197
- return mapperWrapper(`ui.set_search_filter`, {
198
- text: searchFilter.text,
199
- poiCategoryIdentifier: searchFilter.poiCategoryIdentifier
200
- });
201
- }
202
- };
203
- var _default = exports.default = ViewerMapper;
204
- //# sourceMappingURL=mapper.js.map
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- import SitumPlugin from "./sdk";
4
-
5
- // Definitions
6
- export * from "./sdk/types";
7
- export * from "./wayfinding/types";
8
-
9
- // APIs
10
- export * from "./sdk";
11
- export * from "./utils";
12
- export * from "./wayfinding";
13
- export default SitumPlugin;
14
- //# sourceMappingURL=index.js.map