@situm/react-native 3.15.0-beta.1 → 3.15.0-beta.2

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 (145) hide show
  1. package/android/src/main/java/com/situm/plugin/PluginHelper.java +1 -1
  2. package/android/src/main/java/com/situm/plugin/SitumPluginImpl.java +1 -1
  3. package/ios/SitumPlugin.m +14 -7
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/package.json +1 -0
  6. package/lib/commonjs/sdk/index.js.map +1 -1
  7. package/lib/commonjs/sdk/internaDelegatedState.js.map +1 -0
  8. package/lib/commonjs/sdk/nativeInterface.js.map +1 -1
  9. package/lib/commonjs/sdk/types/constants.js.map +1 -1
  10. package/lib/commonjs/sdk/types/index.js.map +1 -1
  11. package/lib/commonjs/sdk/utils.js.map +1 -1
  12. package/lib/commonjs/utils/index.js.map +1 -1
  13. package/lib/commonjs/utils/logError.js.map +1 -1
  14. package/lib/commonjs/wayfinding/index.js.map +1 -1
  15. package/lib/commonjs/wayfinding/types/index.js.map +1 -1
  16. package/lib/commonjs/wayfinding/utils/index.js.map +1 -1
  17. package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -1
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/package.json +1 -0
  20. package/lib/module/sdk/index.js.map +0 -1
  21. package/lib/module/sdk/internaDelegatedState.js.map +1 -0
  22. package/lib/module/sdk/nativeInterface.js.map +1 -1
  23. package/lib/module/sdk/types/constants.js.map +1 -1
  24. package/lib/module/sdk/types/index.js.map +1 -1
  25. package/lib/module/sdk/utils.js.map +1 -1
  26. package/lib/module/utils/index.js.map +1 -1
  27. package/lib/module/utils/logError.js.map +0 -1
  28. package/lib/module/wayfinding/index.js.map +1 -1
  29. package/lib/module/wayfinding/types/constants.js.map +1 -1
  30. package/lib/module/wayfinding/types/index.js.map +0 -1
  31. package/lib/module/wayfinding/utils/index.js.map +1 -1
  32. package/lib/module/wayfinding/utils/mapper.js.map +1 -1
  33. package/lib/typescript/index.d.ts.map +1 -0
  34. package/lib/typescript/{src/sdk → sdk}/index.d.ts +25 -32
  35. package/lib/typescript/sdk/index.d.ts.map +1 -0
  36. package/lib/typescript/sdk/internaDelegatedState.d.ts +17 -0
  37. package/lib/typescript/sdk/internaDelegatedState.d.ts.map +1 -0
  38. package/lib/typescript/{src/sdk → sdk}/nativeInterface.d.ts +4 -2
  39. package/lib/typescript/sdk/nativeInterface.d.ts.map +1 -0
  40. package/lib/typescript/sdk/types/constants.d.ts.map +1 -0
  41. package/lib/typescript/{src/sdk → sdk}/types/index.d.ts +2 -1
  42. package/lib/typescript/sdk/types/index.d.ts.map +1 -0
  43. package/lib/typescript/{src/sdk → sdk}/utils.d.ts +1 -1
  44. package/lib/typescript/sdk/utils.d.ts.map +1 -0
  45. package/lib/typescript/utils/index.d.ts.map +1 -0
  46. package/lib/typescript/utils/logError.d.ts.map +1 -0
  47. package/lib/typescript/{src/wayfinding → wayfinding}/components/MapView.d.ts +1 -1
  48. package/lib/typescript/wayfinding/components/MapView.d.ts.map +1 -0
  49. package/lib/typescript/wayfinding/hooks/index.d.ts.map +1 -0
  50. package/lib/typescript/wayfinding/index.d.ts.map +1 -0
  51. package/lib/typescript/{src/wayfinding → wayfinding}/store/index.d.ts +13 -13
  52. package/lib/typescript/wayfinding/store/index.d.ts.map +1 -0
  53. package/lib/typescript/{src/wayfinding → wayfinding}/store/utils.d.ts +0 -1
  54. package/lib/typescript/wayfinding/store/utils.d.ts.map +1 -0
  55. package/lib/typescript/wayfinding/types/constants.d.ts.map +1 -0
  56. package/lib/typescript/{src/wayfinding → wayfinding}/types/index.d.ts +1 -1
  57. package/lib/typescript/wayfinding/types/index.d.ts.map +1 -0
  58. package/lib/typescript/wayfinding/utils/index.d.ts +3 -0
  59. package/lib/typescript/wayfinding/utils/index.d.ts.map +1 -0
  60. package/lib/typescript/wayfinding/utils/mapper.d.ts.map +1 -0
  61. package/package.json +24 -35
  62. package/src/sdk/index.ts +67 -52
  63. package/src/sdk/internaDelegatedState.ts +54 -0
  64. package/src/sdk/nativeInterface.ts +31 -27
  65. package/src/sdk/types/index.ts +7 -6
  66. package/src/sdk/utils.ts +12 -9
  67. package/src/utils/logError.ts +1 -1
  68. package/src/wayfinding/components/MapView.tsx +103 -104
  69. package/src/wayfinding/hooks/index.ts +94 -91
  70. package/src/wayfinding/store/index.tsx +4 -4
  71. package/src/wayfinding/types/index.ts +1 -1
  72. package/src/wayfinding/utils/index.ts +2 -1
  73. package/LICENSE +0 -21
  74. package/README.md +0 -200
  75. package/SECURITY-POLICY.md +0 -9
  76. package/lib/commonjs/index.js +0 -73
  77. package/lib/commonjs/sdk/index.js +0 -932
  78. package/lib/commonjs/sdk/nativeInterface.js +0 -20
  79. package/lib/commonjs/sdk/types/constants.js +0 -68
  80. package/lib/commonjs/sdk/types/index.js +0 -405
  81. package/lib/commonjs/sdk/utils.js +0 -156
  82. package/lib/commonjs/utils/index.js +0 -17
  83. package/lib/commonjs/utils/logError.js +0 -21
  84. package/lib/commonjs/wayfinding/components/MapView.js +0 -389
  85. package/lib/commonjs/wayfinding/components/MapView.js.map +0 -1
  86. package/lib/commonjs/wayfinding/hooks/index.js +0 -229
  87. package/lib/commonjs/wayfinding/hooks/index.js.map +0 -1
  88. package/lib/commonjs/wayfinding/index.js +0 -57
  89. package/lib/commonjs/wayfinding/store/index.js +0 -242
  90. package/lib/commonjs/wayfinding/store/index.js.map +0 -1
  91. package/lib/commonjs/wayfinding/store/utils.js +0 -49
  92. package/lib/commonjs/wayfinding/store/utils.js.map +0 -1
  93. package/lib/commonjs/wayfinding/types/constants.js +0 -13
  94. package/lib/commonjs/wayfinding/types/constants.js.map +0 -1
  95. package/lib/commonjs/wayfinding/types/index.js +0 -6
  96. package/lib/commonjs/wayfinding/utils/index.js +0 -11
  97. package/lib/commonjs/wayfinding/utils/mapper.js +0 -206
  98. package/lib/module/index.js +0 -12
  99. package/lib/module/sdk/index.js +0 -903
  100. package/lib/module/sdk/nativeInterface.js +0 -18
  101. package/lib/module/sdk/types/constants.js +0 -63
  102. package/lib/module/sdk/types/index.js +0 -434
  103. package/lib/module/sdk/utils.js +0 -144
  104. package/lib/module/utils/index.js +0 -2
  105. package/lib/module/utils/logError.js +0 -15
  106. package/lib/module/wayfinding/components/MapView.js +0 -379
  107. package/lib/module/wayfinding/components/MapView.js.map +0 -1
  108. package/lib/module/wayfinding/hooks/index.js +0 -220
  109. package/lib/module/wayfinding/hooks/index.js.map +0 -1
  110. package/lib/module/wayfinding/index.js +0 -13
  111. package/lib/module/wayfinding/store/index.js +0 -206
  112. package/lib/module/wayfinding/store/index.js.map +0 -1
  113. package/lib/module/wayfinding/store/utils.js +0 -38
  114. package/lib/module/wayfinding/store/utils.js.map +0 -1
  115. package/lib/module/wayfinding/types/constants.js +0 -7
  116. package/lib/module/wayfinding/types/index.js +0 -2
  117. package/lib/module/wayfinding/utils/index.js +0 -4
  118. package/lib/module/wayfinding/utils/mapper.js +0 -195
  119. package/lib/typescript/src/index.d.ts.map +0 -1
  120. package/lib/typescript/src/sdk/index.d.ts.map +0 -1
  121. package/lib/typescript/src/sdk/nativeInterface.d.ts.map +0 -1
  122. package/lib/typescript/src/sdk/types/constants.d.ts.map +0 -1
  123. package/lib/typescript/src/sdk/types/index.d.ts.map +0 -1
  124. package/lib/typescript/src/sdk/utils.d.ts.map +0 -1
  125. package/lib/typescript/src/utils/index.d.ts.map +0 -1
  126. package/lib/typescript/src/utils/logError.d.ts.map +0 -1
  127. package/lib/typescript/src/wayfinding/components/MapView.d.ts.map +0 -1
  128. package/lib/typescript/src/wayfinding/hooks/index.d.ts.map +0 -1
  129. package/lib/typescript/src/wayfinding/index.d.ts.map +0 -1
  130. package/lib/typescript/src/wayfinding/store/index.d.ts.map +0 -1
  131. package/lib/typescript/src/wayfinding/store/utils.d.ts.map +0 -1
  132. package/lib/typescript/src/wayfinding/types/constants.d.ts.map +0 -1
  133. package/lib/typescript/src/wayfinding/types/index.d.ts.map +0 -1
  134. package/lib/typescript/src/wayfinding/utils/index.d.ts +0 -3
  135. package/lib/typescript/src/wayfinding/utils/index.d.ts.map +0 -1
  136. package/lib/typescript/src/wayfinding/utils/mapper.d.ts.map +0 -1
  137. package/security.txt +0 -4
  138. /package/lib/typescript/{src/index.d.ts → index.d.ts} +0 -0
  139. /package/lib/typescript/{src/sdk → sdk}/types/constants.d.ts +0 -0
  140. /package/lib/typescript/{src/utils → utils}/index.d.ts +0 -0
  141. /package/lib/typescript/{src/utils → utils}/logError.d.ts +0 -0
  142. /package/lib/typescript/{src/wayfinding → wayfinding}/hooks/index.d.ts +0 -0
  143. /package/lib/typescript/{src/wayfinding → wayfinding}/index.d.ts +0 -0
  144. /package/lib/typescript/{src/wayfinding → wayfinding}/types/constants.d.ts +0 -0
  145. /package/lib/typescript/{src/wayfinding → wayfinding}/utils/mapper.d.ts +0 -0
@@ -1 +0,0 @@
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,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAvCzB;;AAyCA,MAAMG,wBAAwB,GAAG;EAC/BC,uBAAuB,EAAE,CAAC;EAC1BC,qBAAqB,EAAE;AACzB,CAAC;AAEM,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EACpC,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAAC,CAAC;EAE9B,MAAMC,QAAQ,GAAG,IAAAC,kBAAW,EAACC,qBAAc,CAAC;EAC5C,MAAMC,cAAc,GAAG,IAAAF,kBAAW,EAACG,2BAAoB,CAAC;EAExD,MAAMC,UAAU,GAAG,IAAAJ,kBAAW,EAACK,uBAAgB,CAAC;EAChD,MAAMC,UAAU,GAAG,IAAAN,kBAAW,EAACO,uBAAgB,CAAC;EAChD,MAAMC,KAAK,GAAG,IAAAR,kBAAW,EAACS,kBAAW,CAAC;EAEtC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GAAGA,CAAA,KAAM;EACrB,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,sBAAe,CAAC;EAE3C,IAAI,CAACF,OAAO,EAAE;IACZ,MAAM,IAAIG,KAAK,CAAC,wCAAwC,CAAC;EAC3D;EAEA,OAAOH,OAAO,CAACD,QAAQ;AACzB,CAAC;AAAC,IAAAK,QAAA,GAAAN,OAAA,CAAA/G,OAAA,GAEagH,QAAQ","ignoreList":[]}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- useSitum: true,
8
- SitumProvider: true,
9
- MapView: true
10
- };
11
- Object.defineProperty(exports, "MapView", {
12
- enumerable: true,
13
- get: function () {
14
- return _MapView.default;
15
- }
16
- });
17
- Object.defineProperty(exports, "SitumProvider", {
18
- enumerable: true,
19
- get: function () {
20
- return _store.default;
21
- }
22
- });
23
- Object.defineProperty(exports, "useSitum", {
24
- enumerable: true,
25
- get: function () {
26
- return _hooks.default;
27
- }
28
- });
29
- var _types = require("./types");
30
- Object.keys(_types).forEach(function (key) {
31
- if (key === "default" || key === "__esModule") return;
32
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
33
- if (key in exports && exports[key] === _types[key]) return;
34
- Object.defineProperty(exports, key, {
35
- enumerable: true,
36
- get: function () {
37
- return _types[key];
38
- }
39
- });
40
- });
41
- var _constants = require("./types/constants");
42
- Object.keys(_constants).forEach(function (key) {
43
- if (key === "default" || key === "__esModule") return;
44
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
45
- if (key in exports && exports[key] === _constants[key]) return;
46
- Object.defineProperty(exports, key, {
47
- enumerable: true,
48
- get: function () {
49
- return _constants[key];
50
- }
51
- });
52
- });
53
- var _hooks = _interopRequireDefault(require("./hooks"));
54
- var _store = _interopRequireDefault(require("./store"));
55
- var _MapView = _interopRequireDefault(require("./components/MapView"));
56
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
57
- //# sourceMappingURL=index.js.map
@@ -1,242 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.setWebViewRef = exports.setSdkInitialized = exports.setPois = exports.setNavigation = exports.setLocationStatus = exports.setLocation = exports.setError = exports.setDirections = exports.setDestinationPoiID = exports.setCurrentBuilding = exports.setBuildings = exports.setBuildingIdentifier = exports.setAuth = exports.selectWebViewRef = exports.selectUser = exports.selectPois = exports.selectNavigation = exports.selectLocationStatus = exports.selectLocation = exports.selectIsSDKInitialized = exports.selectError = exports.selectDirections = exports.selectDestinationPoiID = exports.selectCurrentBuilding = exports.selectBuildings = exports.selectBuildingIdentifier = exports.resetLocation = exports.initialState = exports.default = exports.UseSitumContext = exports.SitumContext = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _hooks = require("../hooks");
9
- var _utils = require("./utils");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
- /* eslint-disable @typescript-eslint/no-explicit-any */
13
-
14
- const initialState = exports.initialState = {
15
- webViewRef: undefined,
16
- sdkInitialized: false,
17
- user: undefined,
18
- location: null,
19
- locationStatus: null,
20
- buildings: null,
21
- currentBuilding: undefined,
22
- pois: [],
23
- directions: undefined,
24
- navigation: undefined,
25
- destinationPoiID: undefined,
26
- error: undefined,
27
- buildingIdentifier: "-1"
28
- };
29
- const SitumContext = exports.SitumContext = /*#__PURE__*/(0, _react.createContext)(undefined);
30
- const store = (0, _utils.createStore)({
31
- initialState,
32
- reducers: {
33
- setWebViewRef: (state, payload) => {
34
- return {
35
- ...state,
36
- webViewRef: payload
37
- };
38
- },
39
- setSdkInitialized: (state, payload) => {
40
- return {
41
- ...state,
42
- sdkInitialized: payload
43
- };
44
- },
45
- setAuth: (state, payload) => {
46
- return {
47
- ...state,
48
- user: payload
49
- };
50
- },
51
- setLocation: (state, payload) => {
52
- return {
53
- ...state,
54
- location: payload
55
- };
56
- },
57
- setLocationStatus: (state, payload) => {
58
- return {
59
- ...state,
60
- locationStatus: payload
61
- };
62
- },
63
- resetLocation: state => {
64
- return {
65
- ...state,
66
- location: initialState.location
67
- };
68
- },
69
- setBuildings: (state, payload) => {
70
- return {
71
- ...state,
72
- buildings: payload
73
- };
74
- },
75
- setCurrentBuilding: (state, payload) => {
76
- return {
77
- ...state,
78
- currentBuilding: payload
79
- };
80
- },
81
- setPois: (state, payload) => {
82
- return {
83
- ...state,
84
- pois: payload
85
- };
86
- },
87
- setDirections: (state, payload) => {
88
- return {
89
- ...state,
90
- directions: payload
91
- };
92
- },
93
- setNavigation: (state, payload) => {
94
- return {
95
- ...state,
96
- navigation: payload
97
- };
98
- },
99
- setDestinationPoiID: (state, payload) => {
100
- return {
101
- ...state,
102
- destinationPoiID: payload
103
- };
104
- },
105
- setError: (state, payload) => {
106
- return {
107
- ...state,
108
- error: payload
109
- };
110
- },
111
- setBuildingIdentifier: (state, payload) => {
112
- return {
113
- ...state,
114
- buildingIdentifier: payload
115
- };
116
- }
117
- }
118
- });
119
- const selectWebViewRef = state => {
120
- return state.webViewRef;
121
- };
122
- exports.selectWebViewRef = selectWebViewRef;
123
- const selectIsSDKInitialized = state => {
124
- return state.sdkInitialized;
125
- };
126
- exports.selectIsSDKInitialized = selectIsSDKInitialized;
127
- const selectUser = state => {
128
- return state.user;
129
- };
130
- exports.selectUser = selectUser;
131
- const selectLocation = state => {
132
- return state.location;
133
- };
134
- exports.selectLocation = selectLocation;
135
- const selectLocationStatus = state => {
136
- return state.locationStatus;
137
- };
138
- exports.selectLocationStatus = selectLocationStatus;
139
- const selectBuildings = state => {
140
- return state.buildings;
141
- };
142
- exports.selectBuildings = selectBuildings;
143
- const selectCurrentBuilding = state => {
144
- return state.currentBuilding;
145
- };
146
- exports.selectCurrentBuilding = selectCurrentBuilding;
147
- const selectPois = state => {
148
- return state.pois;
149
- };
150
- exports.selectPois = selectPois;
151
- const selectDirections = state => {
152
- return state.directions;
153
- };
154
- exports.selectDirections = selectDirections;
155
- const selectNavigation = state => {
156
- return state.navigation;
157
- };
158
- exports.selectNavigation = selectNavigation;
159
- const selectDestinationPoiID = state => {
160
- return state.destinationPoiID;
161
- };
162
- exports.selectDestinationPoiID = selectDestinationPoiID;
163
- const selectError = state => {
164
- return state.error;
165
- };
166
- exports.selectError = selectError;
167
- const selectBuildingIdentifier = state => {
168
- return state.buildingIdentifier;
169
- };
170
- exports.selectBuildingIdentifier = selectBuildingIdentifier;
171
- const {
172
- setWebViewRef,
173
- setSdkInitialized,
174
- setAuth,
175
- setLocation,
176
- setLocationStatus,
177
- resetLocation,
178
- setBuildings,
179
- setCurrentBuilding,
180
- setPois,
181
- setDirections,
182
- setNavigation,
183
- setDestinationPoiID,
184
- setError,
185
- setBuildingIdentifier
186
- } = store.actions;
187
-
188
- /**
189
- * Context specifically to store the only instance of our hook.
190
- */
191
- exports.setBuildingIdentifier = setBuildingIdentifier;
192
- exports.setError = setError;
193
- exports.setDestinationPoiID = setDestinationPoiID;
194
- exports.setNavigation = setNavigation;
195
- exports.setDirections = setDirections;
196
- exports.setPois = setPois;
197
- exports.setCurrentBuilding = setCurrentBuilding;
198
- exports.setBuildings = setBuildings;
199
- exports.resetLocation = resetLocation;
200
- exports.setLocationStatus = setLocationStatus;
201
- exports.setLocation = setLocation;
202
- exports.setAuth = setAuth;
203
- exports.setSdkInitialized = setSdkInitialized;
204
- exports.setWebViewRef = setWebViewRef;
205
- const UseSitumContext = exports.UseSitumContext = /*#__PURE__*/(0, _react.createContext)(undefined);
206
- const UseSitumProvider = ({
207
- children
208
- }) => {
209
- // TODO: if we have this, there is no need to have a context for the rest of the state
210
- // as there is only one instance of the hook
211
- const useSitum = (0, _hooks.useSitumInternal)();
212
- return /*#__PURE__*/_react.default.createElement(UseSitumContext.Provider, {
213
- value: {
214
- useSitum
215
- }
216
- }, children);
217
- };
218
-
219
- /**
220
- * Main context of the application, stores the plugins' state.
221
- */
222
- const SitumProvider = ({
223
- email,
224
- apiKey,
225
- children
226
- }) => {
227
- const [state, dispatch] = (0, _react.useReducer)(store.reducer, {
228
- ...store.initialState,
229
- user: {
230
- email,
231
- apiKey
232
- }
233
- });
234
- return /*#__PURE__*/_react.default.createElement(SitumContext.Provider, {
235
- value: {
236
- state,
237
- dispatch
238
- }
239
- }, /*#__PURE__*/_react.default.createElement(UseSitumProvider, null, children));
240
- };
241
- var _default = exports.default = SitumProvider;
242
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_hooks","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","initialState","exports","webViewRef","undefined","sdkInitialized","user","location","locationStatus","buildings","currentBuilding","pois","directions","navigation","destinationPoiID","error","buildingIdentifier","SitumContext","createContext","store","createStore","reducers","setWebViewRef","state","payload","setSdkInitialized","setAuth","setLocation","setLocationStatus","resetLocation","setBuildings","setCurrentBuilding","setPois","setDirections","setNavigation","setDestinationPoiID","setError","setBuildingIdentifier","selectWebViewRef","selectIsSDKInitialized","selectUser","selectLocation","selectLocationStatus","selectBuildings","selectCurrentBuilding","selectPois","selectDirections","selectNavigation","selectDestinationPoiID","selectError","selectBuildingIdentifier","actions","UseSitumContext","UseSitumProvider","children","useSitum","useSitumInternal","createElement","Prov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,GAAAA,iBAAA;AAAAvB,OAAA,CAAAoB,aAAA,GAAAA,aAAA;AAGO,MAAM8B,eAAe,GAAAlD,OAAA,CAAAkD,eAAA,gBAAG,IAAAlC,oBAAa,EAC1Cd,SACF,CAAC;AAED,MAAMiD,gBAAyD,GAAGA,CAAC;EACjEC;AACF,CAAC,KAAK;EACJ;EACA;EACA,MAAMC,QAAQ,GAAG,IAAAC,uBAAgB,EAAC,CAAC;EAEnC,oBACEhF,MAAA,CAAAW,OAAA,CAAAsE,aAAA,CAACL,eAAe,CAACM,QAAQ;IAACC,KAAK,EAAE;MAAEJ;IAAS;EAAE,GAC3CD,QACuB,CAAC;AAE/B,CAAC;;AAED;AACA;AACA;AACA,MAAMM,aAKL,GAAGA,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAER;AAAS,CAAC,KAAK;EACnC,MAAM,CAAC/B,KAAK,EAAEwC,QAAQ,CAAC,GAAG,IAAAC,iBAAU,EAAC7C,KAAK,CAAC8C,OAAO,EAAE;IAClD,GAAG9C,KAAK,CAAClB,YAAY;IACrBK,IAAI,EAAE;MAAEuD,KAAK;MAAEC;IAAO;EACxB,CAAC,CAAC;EAEF,oBACEtF,MAAA,CAAAW,OAAA,CAAAsE,aAAA,CAACxC,YAAY,CAACyC,QAAQ;IACpBC,KAAK,EAAE;MACLpC,KAAK;MACLwC;IACF;EAAE,gBAEFvF,MAAA,CAAAW,OAAA,CAAAsE,aAAA,CAACJ,gBAAgB,QAAEC,QAA2B,CACzB,CAAC;AAE5B,CAAC;AAAC,IAAAY,QAAA,GAAAhE,OAAA,CAAAf,OAAA,GAEayE,aAAa","ignoreList":[]}
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useSelector = exports.useDispatch = exports.createStore = exports.createReducer = void 0;
7
- var _react = require("react");
8
- var _index = require("./index");
9
- /* eslint-disable @typescript-eslint/no-explicit-any */
10
-
11
- const createReducer = () => {
12
- const reducer = (state, action) => {
13
- return action(state);
14
- };
15
- return reducer;
16
- };
17
- exports.createReducer = createReducer;
18
- const createStore = ({
19
- initialState,
20
- reducers
21
- }) => {
22
- const actions = Object.keys(reducers).reduce((acc, r) => {
23
- acc[r] = payload => state => reducers[r](state, payload);
24
- return acc;
25
- }, {});
26
- return {
27
- initialState,
28
- actions,
29
- reducer: createReducer()
30
- };
31
- };
32
- exports.createStore = createStore;
33
- const useSelector = selector => {
34
- const context = (0, _react.useContext)(_index.SitumContext);
35
- if (!context) {
36
- throw new Error("No SitumProvider found.");
37
- }
38
- return selector(context.state);
39
- };
40
- exports.useSelector = useSelector;
41
- const useDispatch = () => {
42
- const context = (0, _react.useContext)(_index.SitumContext);
43
- if (!context) {
44
- throw new Error("No SitumProvider found.");
45
- }
46
- return context.dispatch;
47
- };
48
- exports.useDispatch = useDispatch;
49
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_index","createReducer","reducer","state","action","exports","createStore","initialState","reducers","actions","Object","keys","reduce","acc","r","payload","useSelector","selector","context","useContext","SitumContext","Error","useDispatch","dispatch"],"sourceRoot":"../../../../src","sources":["wayfinding/store/utils.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAHA;;AAKO,MAAME,aAAa,GAAGA,CAAA,KAAS;EACpC,MAAMC,OAAO,GAAGA,CAACC,KAAQ,EAAEC,MAAuB,KAAQ;IACxD,OAAOA,MAAM,CAACD,KAAK,CAAC;EACtB,CAAC;EACD,OAAOD,OAAO;AAChB,CAAC;AAACG,OAAA,CAAAJ,aAAA,GAAAA,aAAA;AAEK,MAAMK,WAAW,GAAGA,CAAI;EAC7BC,YAAY;EACZC;AAIF,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACH,QAAQ,CAAC,CAACI,MAAM,CAAC,CAACC,GAAG,EAAEC,CAAC,KAAK;IACvDD,GAAG,CAACC,CAAC,CAAC,GAAIC,OAAY,IAAMZ,KAAQ,IAAKK,QAAQ,CAACM,CAAC,CAAC,CAACX,KAAK,EAAEY,OAAO,CAAC;IACpE,OAAOF,GAAG;EACZ,CAAC,EAAE,CAAC,CAAuD,CAAC;EAE5D,OAAO;IACLN,YAAY;IACZE,OAAO;IACPP,OAAO,EAAED,aAAa,CAAI;EAC5B,CAAC;AACH,CAAC;AAACI,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAEK,MAAMU,WAAW,GAAIC,QAA+B,IAAK;EAC9D,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACC,mBAAY,CAAC;EAExC,IAAI,CAACF,OAAO,EAAE;IACZ,MAAM,IAAIG,KAAK,CAAC,yBAAyB,CAAC;EAC5C;EAEA,OAAOJ,QAAQ,CAACC,OAAO,CAACf,KAAK,CAAC;AAChC,CAAC;AAACE,OAAA,CAAAW,WAAA,GAAAA,WAAA;AAEK,MAAMM,WAAW,GAAGA,CAAA,KAAM;EAC/B,MAAMJ,OAAO,GAAG,IAAAC,iBAAU,EAACC,mBAAY,CAAC;EAExC,IAAI,CAACF,OAAO,EAAE;IACZ,MAAM,IAAIG,KAAK,CAAC,yBAAyB,CAAC;EAC5C;EAEA,OAAOH,OAAO,CAACK,QAAQ;AACzB,CAAC;AAAClB,OAAA,CAAAiB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ErrorName = void 0;
7
- // Define class that handles errors
8
- let ErrorName = exports.ErrorName = /*#__PURE__*/function (ErrorName) {
9
- ErrorName["ERR_INTERNET_DISCONNECTED"] = "ERR_INTERNET_DISCONNECTED";
10
- ErrorName["ERR_INTERNAL_SERVER_ERROR"] = "ERR_INTERNAL_SERVER_ERROR";
11
- return ErrorName;
12
- }({});
13
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ErrorName","exports"],"sourceRoot":"../../../../src","sources":["wayfinding/types/constants.ts"],"mappings":";;;;;;AAAA;AAAA,IACYA,SAAS,GAAAC,OAAA,CAAAD,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=index.js.map
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.sendMessageToViewer = void 0;
7
- const sendMessageToViewer = (viewer, message) => {
8
- viewer.injectJavaScript(`window.postMessage(${message})`);
9
- };
10
- exports.sendMessageToViewer = sendMessageToViewer;
11
- //# sourceMappingURL=index.js.map
@@ -1,206 +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
- var _payload$bearingFrom;
32
- return {
33
- buildingIdentifier: payload.from.buildingIdentifier,
34
- to: createPoint(payload.to),
35
- from: createPoint(payload.from),
36
- bearingFrom: ((_payload$bearingFrom = payload.bearingFrom) === null || _payload$bearingFrom === void 0 ? void 0 : _payload$bearingFrom.radians) || 0,
37
- accessibilityMode: payload.accessibilityMode || _sdk.AccessibilityMode.CHOOSE_SHORTEST,
38
- minimizeFloorChanges: payload.minimizeFloorChanges || false,
39
- includedTags: payload.includedTags || [],
40
- excludedTags: payload.excludedTags || []
41
- };
42
- };
43
- exports.createDirectionsRequest = createDirectionsRequest;
44
- const createNavigationRequest = payload => {
45
- const navigationRequest = {
46
- distanceToGoalThreshold: payload.distanceToGoalThreshold,
47
- outsideRouteThreshold: payload.outsideRouteThreshold,
48
- distanceToIgnoreFirstIndication: payload.distanceToIgnoreFirstIndication,
49
- distanceToFloorChangeThreshold: payload.distanceToFloorChangeThreshold,
50
- distanceToChangeIndicationThreshold: payload.distanceToChangeIndicationThreshold,
51
- indicationsInterval: payload.indicationsInterval,
52
- timeToFirstIndication: payload.timeToFirstIndication,
53
- roundIndicationsStep: payload.roundIndicationsStep,
54
- timeToIgnoreUnexpectedFloorChanges: payload.timeToIgnoreUnexpectedFloorChanges,
55
- ignoreLowQualityLocations: payload.ignoreLowQualityLocations
56
- };
57
- return Object.fromEntries(Object.entries(navigationRequest || {}).filter(([_, value]) => value !== undefined));
58
- };
59
- exports.createNavigationRequest = createNavigationRequest;
60
- const mapperWrapper = (type, payload) => {
61
- return JSON.stringify({
62
- type,
63
- payload: payload ?? {}
64
- });
65
- };
66
- const ViewerMapper = {
67
- // Configuration
68
- followUser: follow => {
69
- return mapperWrapper("camera.follow_user", {
70
- value: follow
71
- });
72
- },
73
- setLanguage: lang => {
74
- return mapperWrapper("ui.set_language", lang);
75
- },
76
- setFavoritePois: poiIds => {
77
- return mapperWrapper("ui.set_favorite_pois", poiIds);
78
- },
79
- initialConfiguration: style => {
80
- return mapperWrapper("ui.initial_configuration", {
81
- ...(style && {
82
- style: style
83
- })
84
- });
85
- },
86
- // Cartography
87
- selectPoi: poiId => {
88
- return mapperWrapper(`cartography.select_poi`, {
89
- identifier: poiId
90
- });
91
- },
92
- selectCar: () => {
93
- return mapperWrapper(`cartography.select_car`);
94
- },
95
- selectPoiCategory: categoryId => {
96
- return mapperWrapper(`cartography.select_poi_category`, {
97
- identifier: categoryId
98
- });
99
- },
100
- selectFloor: (floorIdentifier, options) => {
101
- return mapperWrapper(`cartography.select_floor`, {
102
- identifier: floorIdentifier,
103
- options
104
- });
105
- },
106
- setDirectionsOptions: directionsOptions => {
107
- return mapperWrapper(`directions.set_options`, {
108
- includedTags: directionsOptions.includedTags,
109
- excludedTags: directionsOptions.excludedTags
110
- });
111
- },
112
- // Location
113
- location: location => {
114
- var _location$bearing;
115
- return mapperWrapper("location.update", {
116
- ...(location.position && {
117
- latitude: location.position.coordinate.latitude,
118
- longitude: location.position.coordinate.longitude,
119
- x: location.position.cartesianCoordinate.x,
120
- y: location.position.cartesianCoordinate.y,
121
- buildingId: location.position.buildingIdentifier,
122
- floorId: location.position.floorIdentifier,
123
- bearing: (_location$bearing = location.bearing) === null || _location$bearing === void 0 ? void 0 : _location$bearing.degreesClockwise,
124
- isIndoor: location.position.isIndoor,
125
- isOutdoor: location.position.isOutdoor,
126
- accuracy: location.accuracy,
127
- hasBearing: location.hasBearing
128
- })
129
- });
130
- },
131
- locationStatus: locationStatus => {
132
- return mapperWrapper("location.update_status", {
133
- status: locationStatus
134
- });
135
- },
136
- locationError: errorCode => {
137
- return mapperWrapper("location.update_status", {
138
- status: errorCode
139
- });
140
- },
141
- // Directions
142
- route: directions => {
143
- return mapperWrapper("directions.update", directions);
144
- },
145
- routeToResult: route => {
146
- return {
147
- navigation: {
148
- status: route.status,
149
- destination: {
150
- category: route !== null && route !== void 0 && route.destinationId ? "POI" : "COORDINATE",
151
- identifier: route === null || route === void 0 ? void 0 : route.destinationId,
152
- //name:, //TODO
153
- point: route.to ? createPoint(route.to) : createPoint(route.TO)
154
- }
155
- }
156
- };
157
- },
158
- // Navigation
159
- navigation: navigation => {
160
- return mapperWrapper(`navigation.${navigation.status}`, navigation);
161
- },
162
- navigateToPoi: navigate => {
163
- return mapperWrapper(`navigation.start`, {
164
- navigationTo: navigate === null || navigate === void 0 ? void 0 : navigate.identifier,
165
- type: navigate.accessibilityMode
166
- });
167
- },
168
- navigateToCar: params => {
169
- return mapperWrapper(`navigation.start.to_car`, {
170
- type: params === null || params === void 0 ? void 0 : params.accessibilityMode
171
- });
172
- },
173
- navigateToPoint: ({
174
- lat,
175
- lng,
176
- floorIdentifier,
177
- navigationName,
178
- accessibilityMode
179
- }) => {
180
- return mapperWrapper(`navigation.start`, {
181
- lat,
182
- lng,
183
- floorIdentifier,
184
- navigationName,
185
- type: accessibilityMode
186
- });
187
- },
188
- cancelNavigation: () => {
189
- return mapperWrapper(`navigation.cancel`, {});
190
- },
191
- navigationToResult: navigation => {
192
- return {
193
- navigation: {
194
- status: navigation === null || navigation === void 0 ? void 0 : navigation.type
195
- }
196
- };
197
- },
198
- search: searchFilter => {
199
- return mapperWrapper(`ui.set_search_filter`, {
200
- text: searchFilter.text,
201
- poiCategoryIdentifier: searchFilter.poiCategoryIdentifier
202
- });
203
- }
204
- };
205
- var _default = exports.default = ViewerMapper;
206
- //# sourceMappingURL=mapper.js.map
@@ -1,12 +0,0 @@
1
- import SitumPlugin from "./sdk";
2
-
3
- // Definitions
4
- export * from "./sdk/types";
5
- export * from "./wayfinding/types";
6
-
7
- // APIs
8
- export * from "./sdk";
9
- export * from "./utils";
10
- export * from "./wayfinding";
11
- export default SitumPlugin;
12
- //# sourceMappingURL=index.js.map