react-native-steerpath-smart-map 1.22.0 → 1.23.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/CHANGELOG.md CHANGED
@@ -15,6 +15,17 @@ This package is built on top of Steerpath's Smart SDK, and most of releases are
15
15
  - [iOS](https://s3-eu-west-1.amazonaws.com/steerpath/ios/releases/smart-sdk-changelog/index.html)
16
16
  - [Web](https://s3-eu-west-1.amazonaws.com/steerpath-web-sdk/documentation/smart/latest/index.html)
17
17
 
18
+ ## [1.23.0] - 2023-05-25
19
+
20
+ - New icons!
21
+ - Bump Android Smart SDK to version android-smart-1.21.0
22
+ - Bump iOS Smart SDK to version 1.17.0
23
+
24
+
25
+ ## [1.22.1] - 2023-05-09
26
+
27
+ - Bump iOS Smart SDK to version 1.16.6 to resolve crashes happening when cancelling user tasks
28
+ - Fixed iOS bindings for POISelectionUserTask
18
29
 
19
30
  ## [1.22.0] - 2023-04-24
20
31
 
@@ -53,7 +53,7 @@ repositories {
53
53
 
54
54
  dependencies {
55
55
  implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}"
56
- implementation "com.steerpath:smart:android-smart-1.20.0"
56
+ implementation "com.steerpath:smart:android-smart-1.21.0"
57
57
  implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
58
58
  implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
59
59
  }
@@ -1,4 +1,3 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.steerpath.rnsmartmap">
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.steerpath.rnsmartmap">
3
2
 
4
3
  </manifest>
@@ -0,0 +1,9 @@
1
+ export declare const SmartLocationManager: {
2
+ addLocationChangedListener(listener: (data: {
3
+ latitude: number;
4
+ longitude: number;
5
+ buildingRef: string | null;
6
+ floorIndex: number;
7
+ }) => void): void;
8
+ removeLocationChangedListener(): void;
9
+ };
@@ -0,0 +1,21 @@
1
+ import { NativeModules, NativeEventEmitter } from "react-native";
2
+ var RNSmartLocationManager = NativeModules.RNSmartLocationManager;
3
+ var smartLocationManagerEmitter = new NativeEventEmitter(RNSmartLocationManager);
4
+ function createSmartLocationManager() {
5
+ var eventListenerRegistered = false;
6
+ return {
7
+ addLocationChangedListener: function (listener) {
8
+ if (!eventListenerRegistered) {
9
+ eventListenerRegistered = true;
10
+ smartLocationManagerEmitter.addListener('locationChanged', function (payload) {
11
+ listener(payload);
12
+ });
13
+ }
14
+ },
15
+ removeLocationChangedListener: function () {
16
+ eventListenerRegistered = false;
17
+ smartLocationManagerEmitter.removeListener('locationChanged', function () { });
18
+ }
19
+ };
20
+ }
21
+ export var SmartLocationManager = createSmartLocationManager();
@@ -0,0 +1,4 @@
1
+ export declare const SmartLocationManager: {
2
+ addListener(): void;
3
+ removeListener(): void;
4
+ };
@@ -0,0 +1,4 @@
1
+ export var SmartLocationManager = {
2
+ addListener: function () { },
3
+ removeListener: function () { },
4
+ };
@@ -19,9 +19,7 @@
19
19
  localRef:[self NSString:json[@"localRef"]]
20
20
  buildingRef:[self NSString:json[@"buildingRef"]]];
21
21
  obj.title = [self NSString:json[@"title"]];
22
-
23
- NSDictionary* props = [RCTConvert NSDictionary:json[@"properties"]];
24
- obj.properties = props;
22
+ obj.properties = [RCTConvert NSDictionary:json[@"properties"]];
25
23
 
26
24
  NSString* rawSource = [self NSString:json[@"source"]];
27
25
  NSArray *items = @[@"static", @"marker", @"live"];
@@ -133,7 +131,7 @@
133
131
  + (SPSmartMapPOISelectionUserTask*)SPSmartMapPOISelectionUserTask:(id)json
134
132
  {
135
133
  json = [self NSDictionary:json];
136
- SPSmartMapObject* mapObj = [RCTConvert SPSmartMapObject:json[@"payload"]];
134
+ SPSmartMapObject* mapObj = [RCTConvert SPSmartMapObject:json[@"smartMapObject"]];
137
135
  BOOL shouldAddMarker = [self BOOL:json[@"shouldAddMarker"]];
138
136
  NSString* actionButtonText = [self NSString:json[@"actionButtonText"]];
139
137
  NSString* actionButtonIcon = [self NSString:json[@"actionButtonIcon"]];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-steerpath-smart-map",
3
3
  "title": "React Native Steerpath Smart Map",
4
- "version": "1.22.0",
4
+ "version": "1.23.0",
5
5
  "description": "Steerpath SmartMapView for React Native",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
@@ -27,7 +27,7 @@
27
27
  "steerpath-smart-sdk": "^2.2.8"
28
28
  },
29
29
  "peerDependencies": {
30
- "react": "^16.5.0",
30
+ "react": "^16.5.0 || ^17.0.0 || ^18.0.0",
31
31
  "react-native": ">=0.57.0-rc.0 <1.0.x"
32
32
  },
33
33
  "devDependencies": {
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
20
20
  s.requires_arc = true
21
21
 
22
22
  s.dependency "React"
23
- s.dependency 'SteerpathSmartSDK', '~> 1.16.5'
23
+ s.dependency 'SteerpathSmartSDK', '~> 1.17.0'
24
24
  # s.dependency "..."
25
25
  end
26
26