react-native-steerpath-smart-map 1.13.0 → 1.14.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.
package/CHANGELOG.md CHANGED
@@ -15,6 +15,30 @@ 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.14.2] - 2022-02-16
19
+
20
+ - Bump iOS Smart SDK version to 1.15.11
21
+
22
+ ## [1.14.1] - 2022-02-01
23
+
24
+ - Bump iOS Smart SDK to 1.15.10 (fixes an issue where search bottom sheet was cut off from the bottom)
25
+
26
+ ## [1.14.0] - 2022-01-28
27
+ - Added ```setLanguage()``` API which sets the language that the SDK will use in search. The method setLanguage() takes one parameter ```languageCode``` which is one of the language codes listed in the config file's ```supportedLanguages```-array.
28
+ ```
29
+ "defaultLanguage": "fi-FI",
30
+ "supportedLanguages": [
31
+ "en-GB",
32
+ "fi-FI",
33
+ "sv-SE",
34
+ "nb-NO"
35
+ ],
36
+ ```
37
+ Example: ``` SmartMapManager.setLanguage('en-GB')```
38
+ ## [1.13.1] - 2022-01-25
39
+
40
+ - Bump Android Smart SDK to android-smart-1.14.1
41
+
18
42
  ## [1.13.0] - 2022-01-24
19
43
 
20
44
  - Bump Web Smart SDK to 2.0.2
@@ -59,7 +59,7 @@ repositories {
59
59
 
60
60
  dependencies {
61
61
  implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}"
62
- implementation "com.steerpath:smart:android-smart-1.14.0"
62
+ implementation "com.steerpath:smart:android-smart-1.14.2"
63
63
  implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
64
64
  implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0"
65
65
  }
@@ -86,4 +86,9 @@ public class RNSmartMapManager extends ReactContextBaseJavaModule {
86
86
  }
87
87
  callback.invoke(map);
88
88
  }
89
+
90
+ @ReactMethod
91
+ public void setLanguage(String languageCode) {
92
+ appContext.runOnUiQueueThread(() -> SmartSDK.getInstance().setLanguage(languageCode));
93
+ }
89
94
  }
@@ -29,5 +29,6 @@ export declare const SmartMapManager: {
29
29
  startWithConfig(config: ConfigSDK): void;
30
30
  setLiveConfig(config: LiveConfig | null): void;
31
31
  fetchVersions(callback: (versions: FetchVersionResponse) => void): void;
32
+ setLanguage(languageCode: String): void;
32
33
  };
33
34
  export {};
@@ -27,4 +27,7 @@ export var SmartMapManager = {
27
27
  fetchVersions: function (callback) {
28
28
  RNSmartMapManager.fetchVersions(callback);
29
29
  },
30
+ setLanguage: function (languageCode) {
31
+ RNSmartMapManager.setLanguage(languageCode);
32
+ }
30
33
  };
@@ -1,3 +1,4 @@
1
1
  export declare const SmartMapManager: {
2
2
  start(apiKey: string, config?: string | Record<string, unknown> | undefined): void;
3
+ setLanguage(languageCode: String): void;
3
4
  };
@@ -1,8 +1,15 @@
1
1
  /* eslint-disable prefer-destructuring */
2
2
  import { steerpath } from "steerpath-smart-sdk";
3
+ var smartSDKInstance = {
4
+ setLanguage: function () { }
5
+ };
3
6
  export var SmartMapManager = {
4
7
  start: function (apiKey, config) {
5
8
  var smartSDK = new steerpath.SmartSDK();
9
+ smartSDKInstance = smartSDK;
6
10
  smartSDK.start(apiKey, config);
7
11
  },
12
+ setLanguage: function (languageCode) {
13
+ smartSDKInstance.setLanguage(languageCode);
14
+ }
8
15
  };
@@ -47,4 +47,9 @@ RCT_EXPORT_METHOD(fetchVersions:(RCTResponseSenderBlock)callback)
47
47
  }]);
48
48
  }
49
49
 
50
+ RCT_EXPORT_METHOD(setLanguage:(nonnull NSString *)languageCode)
51
+ {
52
+ [[SPSmartSDK getInstance] setLanguage: languageCode];
53
+ }
54
+
50
55
  @end
@@ -78,7 +78,7 @@ RCT_EXPORT_METHOD(setMapMode:(nonnull NSNumber*) reactTag
78
78
  break;
79
79
  }
80
80
  }];
81
-
81
+
82
82
  }
83
83
 
84
84
  RCT_EXPORT_METHOD(setWidgetPadding:(nonnull NSNumber*) reactTag
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.13.0",
4
+ "version": "1.14.2",
5
5
  "description": "Steerpath SmartMapView for React Native",
6
6
  "main": "dist/index.js",
7
7
  "scripts": {
@@ -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.15.8'
23
+ s.dependency 'SteerpathSmartSDK', '~> 1.15.11'
24
24
  # s.dependency "..."
25
25
  end
26
26
 
@@ -60,4 +60,7 @@ export const SmartMapManager = {
60
60
  fetchVersions(callback: (versions: FetchVersionResponse) => void) {
61
61
  RNSmartMapManager.fetchVersions(callback);
62
62
  },
63
+ setLanguage(languageCode: String): void {
64
+ RNSmartMapManager.setLanguage(languageCode);
65
+ }
63
66
  };
@@ -1,9 +1,20 @@
1
1
  /* eslint-disable prefer-destructuring */
2
2
  import { steerpath } from "steerpath-smart-sdk";
3
3
 
4
+ type SmartSDK = {
5
+ setLanguage(languageCode: String): void;
6
+ }
7
+ let smartSDKInstance: SmartSDK = {
8
+ setLanguage: () => {}
9
+ }
10
+
4
11
  export const SmartMapManager = {
5
12
  start(apiKey: string, config?: Record<string, unknown> | string): void {
6
13
  const smartSDK = new steerpath.SmartSDK();
14
+ smartSDKInstance = smartSDK;
7
15
  smartSDK.start(apiKey, config);
8
16
  },
17
+ setLanguage(languageCode: String): void {
18
+ smartSDKInstance.setLanguage(languageCode);
19
+ }
9
20
  };