@situm/react-native 3.0.8 → 3.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/situm/plugin/PluginHelper.java +3 -2
- package/android/src/main/java/com/situm/plugin/SitumMapper.java +38 -59
- package/android/src/main/java/com/situm/plugin/SitumPlugin.java +1 -0
- package/android/src/main/java/com/situm/plugin/SitumPluginImpl.java +1 -1
- package/ios/SitumPlugin.m +8 -2
- package/lib/commonjs/sdk/index.js +509 -251
- package/lib/commonjs/sdk/index.js.map +1 -1
- package/lib/commonjs/sdk/nativeInterface.js.map +1 -1
- package/lib/commonjs/sdk/types/constants.js +31 -4
- package/lib/commonjs/sdk/types/constants.js.map +1 -1
- package/lib/commonjs/sdk/utils.js +103 -0
- package/lib/commonjs/sdk/utils.js.map +1 -0
- package/lib/commonjs/utils/requestPermission.js +9 -16
- package/lib/commonjs/utils/requestPermission.js.map +1 -1
- package/lib/commonjs/wayfinding/components/MapView.js +78 -134
- package/lib/commonjs/wayfinding/components/MapView.js.map +1 -1
- package/lib/commonjs/wayfinding/hooks/index.js +118 -278
- package/lib/commonjs/wayfinding/hooks/index.js.map +1 -1
- package/lib/commonjs/wayfinding/store/index.js +17 -6
- package/lib/commonjs/wayfinding/store/index.js.map +1 -1
- package/lib/commonjs/wayfinding/types/index.js +1 -3
- package/lib/commonjs/wayfinding/types/index.js.map +1 -1
- package/lib/commonjs/wayfinding/utils/mapper.js +128 -71
- package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -1
- package/lib/module/sdk/index.js +509 -249
- package/lib/module/sdk/index.js.map +1 -1
- package/lib/module/sdk/nativeInterface.js.map +1 -1
- package/lib/module/sdk/types/constants.js +27 -3
- package/lib/module/sdk/types/constants.js.map +1 -1
- package/lib/module/sdk/utils.js +94 -0
- package/lib/module/sdk/utils.js.map +1 -0
- package/lib/module/utils/requestPermission.js +9 -16
- package/lib/module/utils/requestPermission.js.map +1 -1
- package/lib/module/wayfinding/components/MapView.js +77 -133
- package/lib/module/wayfinding/components/MapView.js.map +1 -1
- package/lib/module/wayfinding/hooks/index.js +119 -278
- package/lib/module/wayfinding/hooks/index.js.map +1 -1
- package/lib/module/wayfinding/store/index.js +15 -6
- package/lib/module/wayfinding/store/index.js.map +1 -1
- package/lib/module/wayfinding/types/index.js +1 -1
- package/lib/module/wayfinding/types/index.js.map +1 -1
- package/lib/module/wayfinding/utils/mapper.js +123 -72
- package/lib/module/wayfinding/utils/mapper.js.map +1 -1
- package/lib/typescript/src/sdk/index.d.ts +183 -145
- package/lib/typescript/src/sdk/index.d.ts.map +1 -1
- package/lib/typescript/src/sdk/nativeInterface.d.ts +59 -0
- package/lib/typescript/src/sdk/nativeInterface.d.ts.map +1 -1
- package/lib/typescript/src/sdk/types/constants.d.ts +24 -3
- package/lib/typescript/src/sdk/types/constants.d.ts.map +1 -1
- package/lib/typescript/src/sdk/types/index.d.ts +91 -146
- package/lib/typescript/src/sdk/types/index.d.ts.map +1 -1
- package/lib/typescript/src/sdk/utils.d.ts +53 -0
- package/lib/typescript/src/sdk/utils.d.ts.map +1 -0
- package/lib/typescript/src/utils/requestPermission.d.ts +1 -1
- package/lib/typescript/src/utils/requestPermission.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/components/MapView.d.ts +16 -28
- package/lib/typescript/src/wayfinding/components/MapView.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/hooks/index.d.ts +3 -34
- package/lib/typescript/src/wayfinding/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/store/index.d.ts +8 -6
- package/lib/typescript/src/wayfinding/store/index.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/types/index.d.ts +36 -17
- package/lib/typescript/src/wayfinding/types/index.d.ts.map +1 -1
- package/lib/typescript/src/wayfinding/utils/mapper.d.ts +16 -11
- package/lib/typescript/src/wayfinding/utils/mapper.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/sdk/index.ts +467 -476
- package/src/sdk/nativeInterface.ts +149 -1
- package/src/sdk/types/constants.ts +27 -3
- package/src/sdk/types/index.ts +98 -158
- package/src/sdk/utils.ts +129 -0
- package/src/utils/requestPermission.ts +18 -23
- package/src/wayfinding/components/MapView.tsx +145 -215
- package/src/wayfinding/hooks/index.ts +155 -385
- package/src/wayfinding/store/index.tsx +19 -9
- package/src/wayfinding/types/index.ts +49 -15
- package/src/wayfinding/utils/mapper.ts +145 -104
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AccessibilityMode } from "src/sdk";
|
|
2
|
+
import type { Point } from "../../sdk/types";
|
|
2
3
|
import { ErrorName } from "./constants";
|
|
3
4
|
export interface MapViewError {
|
|
4
5
|
name: ErrorName;
|
|
@@ -6,9 +7,16 @@ export interface MapViewError {
|
|
|
6
7
|
}
|
|
7
8
|
export interface MapViewRef {
|
|
8
9
|
selectPoi: (poiId: number) => void;
|
|
9
|
-
navigateToPoi: ({
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
navigateToPoi: ({ identifier, accessibilityMode, }: {
|
|
11
|
+
identifier: number;
|
|
12
|
+
accessibilityMode?: AccessibilityMode;
|
|
13
|
+
}) => void;
|
|
14
|
+
navigateToPoint: ({ lat, lng, floorIdentifier, navigationName, accessibilityMode, }: {
|
|
15
|
+
lat: number;
|
|
16
|
+
lng: number;
|
|
17
|
+
floorIdentifier: string;
|
|
18
|
+
navigationName?: string;
|
|
19
|
+
accessibilityMode?: AccessibilityMode;
|
|
12
20
|
}) => void;
|
|
13
21
|
cancelNavigation: () => void;
|
|
14
22
|
}
|
|
@@ -17,16 +25,12 @@ export interface WayfindingResult {
|
|
|
17
25
|
message: string;
|
|
18
26
|
}
|
|
19
27
|
export interface OnPoiSelectedResult {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
floorId: string;
|
|
23
|
-
floorName: string;
|
|
24
|
-
poiId: string;
|
|
25
|
-
poiName: string;
|
|
28
|
+
identifier: string;
|
|
29
|
+
buildingIdentifier: string;
|
|
26
30
|
}
|
|
27
31
|
export interface OnPoiDeselectedResult {
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
identifier: string;
|
|
33
|
+
buildingIdentifier: string;
|
|
30
34
|
}
|
|
31
35
|
export interface OnFloorChangedResult {
|
|
32
36
|
buildingId: string;
|
|
@@ -40,18 +44,33 @@ export interface Destination {
|
|
|
40
44
|
category: string;
|
|
41
45
|
identifier?: string;
|
|
42
46
|
name?: string;
|
|
43
|
-
point:
|
|
47
|
+
point: Point;
|
|
44
48
|
}
|
|
45
49
|
export interface Navigation {
|
|
46
50
|
status: string;
|
|
47
51
|
destination?: Destination;
|
|
48
52
|
}
|
|
49
53
|
export interface OnNavigationResult {
|
|
50
|
-
navigation
|
|
54
|
+
navigation?: Navigation;
|
|
51
55
|
error?: Error;
|
|
52
56
|
}
|
|
53
|
-
export type
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
export type NavigateToPoiPayload = {
|
|
58
|
+
identifier: number;
|
|
59
|
+
accessibilityMode?: AccessibilityMode;
|
|
60
|
+
};
|
|
61
|
+
export type NavigateToPointPayload = {
|
|
62
|
+
lat: number;
|
|
63
|
+
lng: number;
|
|
64
|
+
floorIdentifier: string;
|
|
65
|
+
navigationName?: string;
|
|
66
|
+
accessibilityMode?: AccessibilityMode;
|
|
67
|
+
};
|
|
68
|
+
export type DirectionsMessage = {
|
|
69
|
+
buildingIdentifier: string;
|
|
70
|
+
originIdentifier: string;
|
|
71
|
+
originCategory: string;
|
|
72
|
+
destinationIdentifier: string;
|
|
73
|
+
destinationCategory: string;
|
|
74
|
+
identifier: string;
|
|
56
75
|
};
|
|
57
76
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/wayfinding/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src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AM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import type { Directions, Location,
|
|
2
|
-
import type {
|
|
3
|
-
declare const
|
|
1
|
+
import type { Directions, DirectionsRequest, Location, NavigationProgress, NavigationRequest, Point } from "../../sdk/types";
|
|
2
|
+
import type { DirectionsMessage, NavigateToPointPayload, NavigateToPoiPayload, Navigation, OnNavigationResult } from "../types";
|
|
3
|
+
export declare const createPoint: (payload: any) => Point;
|
|
4
|
+
export declare const createDirectionsMessage: (payload: any) => DirectionsMessage;
|
|
5
|
+
export declare const createDirectionsRequest: (payload: any) => DirectionsRequest;
|
|
6
|
+
export declare const createNavigationRequest: (payload: any) => NavigationRequest;
|
|
7
|
+
declare const ViewerMapper: {
|
|
8
|
+
followUser: (follow: boolean) => string;
|
|
9
|
+
setLanguage: (lang: string) => string;
|
|
10
|
+
initialConfiguration: (style: any) => string;
|
|
11
|
+
selectPoi: (poiId: number | null) => string;
|
|
4
12
|
location: (location: Location) => string;
|
|
5
13
|
locationStatus: (locationStatus: Location["status"]) => string;
|
|
6
14
|
route: (directions: Directions) => string;
|
|
15
|
+
routeToResult: (route: any) => OnNavigationResult;
|
|
7
16
|
navigation: (navigation: Navigation) => string;
|
|
8
|
-
navigateToPoi: (navigate:
|
|
17
|
+
navigateToPoi: (navigate: NavigateToPoiPayload) => string;
|
|
18
|
+
navigateToPoint: ({ lat, lng, floorIdentifier, navigationName, accessibilityMode, }: NavigateToPointPayload) => string;
|
|
9
19
|
cancelNavigation: () => string;
|
|
10
|
-
|
|
11
|
-
followUser: (follow: boolean) => string;
|
|
12
|
-
setLanguage: (lang: string) => string;
|
|
13
|
-
initialConfiguration: (style: any, enablePoiClustering: any, showPoiNames: any, minZoom: any, maxZoom: any, initialZoom: any, useDashboardTheme: any) => string;
|
|
14
|
-
routeToResult: (navigation: any) => Navigation;
|
|
15
|
-
navigationToResult: (navigation: SDKNavigation) => Navigation;
|
|
20
|
+
navigationToResult: (navigation: NavigationProgress) => OnNavigationResult;
|
|
16
21
|
};
|
|
17
|
-
export default
|
|
22
|
+
export default ViewerMapper;
|
|
18
23
|
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/wayfinding/utils/mapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../src/wayfinding/utils/mapper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,EACN,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,WAAW,YAAa,GAAG,KAAG,KAO1C,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,GAAG,KAAG,iBAStD,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,GAAG,KAAG,iBAUtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,GAAG,KAAG,iBAqBtD,CAAC;AAMF,QAAA,MAAM,YAAY;yBAEK,OAAO;wBAGR,MAAM;kCAGI,GAAG;uBAQd,MAAM,GAAG,IAAI;yBAIX,QAAQ;qCAkBI,QAAQ,CAAC,QAAQ,CAAC;wBAI/B,UAAU;2BAGP,GAAG,KAAG,kBAAkB;6BActB,UAAU;8BAGT,oBAAoB;yFAY3C,sBAAsB;;qCAYQ,kBAAkB,KAAG,kBAAkB;CAOzE,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@situm/react-native",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-beta.0",
|
|
4
4
|
"description": "Set of utilities that allow any developer to build React Native location based apps using Situm's indoor positioning system.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": "https://github.com/situmtech/react-native",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@commitlint/config-conventional": "^17.6.7",
|
|
75
75
|
"@evilmartians/lefthook": "^1.2.20.7.7",
|
|
76
76
|
"@react-native-community/eslint-config": "^3.2.0",
|
|
77
|
-
"@types/jest": "^29.5.
|
|
77
|
+
"@types/jest": "^29.5.3",
|
|
78
78
|
"@types/react": "^18.2.7",
|
|
79
79
|
"@types/react-native": "0.72.2",
|
|
80
80
|
"@types/react-test-renderer": "^18.0.0",
|