plotline-engage 4.2.3 → 4.2.5

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.4.7'
42
+ implementation 'com.gitlab.plotline:plotline-android-sdk:3.4.9'
43
43
  }
44
44
 
@@ -149,6 +149,12 @@ public class RNPlotline extends ReactContextBaseJavaModule {
149
149
  Plotline.track(eventName, properties, activity);
150
150
  }
151
151
 
152
+ @ReactMethod
153
+ public void showStory(String storyId, String slideId){
154
+ final Activity activity = getCurrentActivity();
155
+ Plotline.showStory(activity, storyId, slideId);
156
+ }
157
+
152
158
  @ReactMethod
153
159
  public void identify(ReadableMap object) {
154
160
  JSONObject jsonObject = getJSONObjectFromReadableMap(object);
package/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare class plotline {
9
9
  showMockStudy(): void;
10
10
  setColor(colors: {[key: string]: string}): void;
11
11
  trackPage(pageId: string): void;
12
+ showStory(storyId: string, slideId?: string): void;
12
13
  debug(): void;
13
14
  notifyScroll(): void;
14
15
  setPlotlineEventsListener(listener: (eventName: string, properties: {[key: string]: any}) => void): void;
package/index.js CHANGED
@@ -106,6 +106,14 @@ class plotline {
106
106
  RNPlotline.trackPage(pageId);
107
107
  }
108
108
 
109
+ showStory (storyId, slideId) {
110
+ if (slideId) {
111
+ RNPlotline.showStory(storyId, slideId);
112
+ } else {
113
+ RNPlotline.showStory(storyId, null);
114
+ }
115
+ }
116
+
109
117
  debug () {
110
118
  RNPlotline.debug();
111
119
  }
package/ios/RNPlotline.m CHANGED
@@ -38,6 +38,11 @@ RCT_EXPORT_METHOD(track:(NSString *)eventName properties: (NSDictionary *) prope
38
38
  }
39
39
  }
40
40
 
41
+ RCT_EXPORT_METHOD(showStory:(NSString *)storyId slideId: (NSString *)slideId)
42
+ {
43
+ [Plotline showStoryWithStoryId:storyId slideId:slideId];
44
+ }
45
+
41
46
  RCT_EXPORT_METHOD(setLocale:(NSString *)locale)
42
47
  {
43
48
  [Plotline setLocaleWithLocale:locale];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotline-engage",
3
- "version": "4.2.3",
3
+ "version": "4.2.5",
4
4
  "description": "React Native plugin for Plotline",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"