plotline-engage 4.4.4 → 4.4.6

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.
@@ -39,6 +39,6 @@ repositories {
39
39
 
40
40
  dependencies {
41
41
  implementation 'com.facebook.react:react-native:+'
42
- implementation 'com.gitlab.plotline:plotline-android-sdk:3.8.8'
42
+ implementation 'com.gitlab.plotline:plotline-android-sdk:3.9.4'
43
43
  }
44
44
 
@@ -154,6 +154,10 @@ public class RNPlotline extends ReactContextBaseJavaModule {
154
154
  Plotline.setShouldDisablePlotline(shouldDisablePlotline);
155
155
  }
156
156
 
157
+ @ReactMethod
158
+ public void setShouldDisableBackPressedListener(boolean shouldDisableBackPressedListener){
159
+ Plotline.setShouldDisableBackPressedListener(shouldDisableBackPressedListener);
160
+ }
157
161
  @ReactMethod
158
162
  public void showStory(String storyId, String slideId){
159
163
  final Activity activity = getCurrentActivity();
@@ -174,7 +178,8 @@ public class RNPlotline extends ReactContextBaseJavaModule {
174
178
 
175
179
  @ReactMethod
176
180
  public void setLocale(String locale) {
177
- Plotline.setLocale(locale);
181
+ final Activity activity = getCurrentActivity();
182
+ Plotline.setLocale(activity, locale);
178
183
  }
179
184
 
180
185
  @ReactMethod
package/index.d.ts CHANGED
@@ -3,13 +3,14 @@ import { NavigationContainer as RNNavigationContainer } from '@react-navigation/
3
3
 
4
4
  declare class plotline {
5
5
  track(eventName: string, properties: {[key: string]: any}): void;
6
- init(apiKey: string, refId: string, endpoint?: string): void;
6
+ init(apiKey: string, refId?: string, endpoint?: string): void;
7
7
  identify(attributes: {[key: string]: any}): void;
8
8
  setLocale(locale: string): void;
9
9
  showMockStudy(): void;
10
10
  setColor(colors: {[key: string]: string}): void;
11
11
  trackPage(pageId: string): void;
12
12
  setShouldDisablePlotline(shouldDisablePlotline: boolean): void;
13
+ setShouldDisableBackPressedListener(setShouldDisableBackPressedListener: boolean): void;
13
14
  setShouldEnableScrollDelegates(shouldEnableScrollDelegates: boolean): void;
14
15
  showStory(storyId: string, slideId?: string): void;
15
16
  debug(): void;
package/index.js CHANGED
@@ -82,7 +82,7 @@ class plotline {
82
82
  RNPlotline.track(eventName, null);
83
83
  }
84
84
 
85
- init (apiKey, refId, endpoint = null) {
85
+ init (apiKey, refId = "", endpoint = null) {
86
86
  RNPlotline.init(apiKey, refId, endpoint);
87
87
  }
88
88
 
@@ -110,6 +110,14 @@ class plotline {
110
110
  RNPlotline.setShouldDisablePlotline(shouldDisablePlotline);
111
111
  }
112
112
 
113
+ setShouldDisableBackPressedListener(shouldDisableBackPressedListener) {
114
+ if (Platform.OS === 'android') {
115
+ RNPlotline.setShouldDisableBackPressedListener(
116
+ shouldDisableBackPressedListener
117
+ );
118
+ }
119
+ }
120
+
113
121
  setShouldEnableScrollDelegates (shouldEnableScrollDelegates) {
114
122
  if (Platform.OS === "ios") {
115
123
  RNPlotline.setShouldEnableScrollDelegates(shouldEnableScrollDelegates);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotline-engage",
3
- "version": "4.4.4",
3
+ "version": "4.4.6",
4
4
  "description": "React Native plugin for Plotline",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"