react-native-mparticle 2.6.1 → 2.6.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.
@@ -86,9 +86,9 @@ public class MParticleModule extends ReactContextBaseJavaModule {
86
86
  }
87
87
 
88
88
  @ReactMethod
89
- public void logScreenEvent(final String event, final ReadableMap attributesMap) {
89
+ public void logScreenEvent(final String event, final ReadableMap attributesMap, final boolean shouldUploadEvent) {
90
90
  Map<String, String> attributes = ConvertStringMap(attributesMap);
91
- MParticle.getInstance().logScreen(event, attributes);
91
+ MParticle.getInstance().logScreen(event, attributes, shouldUploadEvent);
92
92
  }
93
93
 
94
94
  @ReactMethod
@@ -598,6 +598,16 @@ public class MParticleModule extends ReactContextBaseJavaModule {
598
598
  if (map.hasKey("customAttributes")) {
599
599
  builder.customAttributes(ConvertStringMap(map.getMap("customAttributes")));
600
600
  }
601
+ if (map.hasKey("currency")) {
602
+ builder.currency(map.getString("currency"));
603
+ }
604
+ if (map.hasKey("checkoutStep")) {
605
+ builder.checkoutStep(map.getInt("checkoutStep"));
606
+ }
607
+ if (map.hasKey("checkoutOptions")) {
608
+ builder.checkoutOptions(map.getString("checkoutOptions"));
609
+ }
610
+
601
611
 
602
612
  return builder.build();
603
613
  }
@@ -34,9 +34,9 @@ RCT_EXPORT_METHOD(logCommerceEvent:(MPCommerceEvent *)commerceEvent)
34
34
  [[MParticle sharedInstance] logCommerceEvent:commerceEvent];
35
35
  }
36
36
 
37
- RCT_EXPORT_METHOD(logScreenEvent:(NSString *)screenName attributes:(NSDictionary *)attributes)
37
+ RCT_EXPORT_METHOD(logScreenEvent:(NSString *)screenName attributes:(NSDictionary *)attributes shouldUploadEvent:(BOOL)shouldUploadEvent)
38
38
  {
39
- [[MParticle sharedInstance] logScreen:screenName eventInfo:attributes];
39
+ [[MParticle sharedInstance] logScreen:screenName eventInfo:attributes shouldUploadEvent:shouldUploadEvent];
40
40
  }
41
41
 
42
42
  RCT_EXPORT_METHOD(setATTStatus:(NSInteger)status withATTStatusTimestampMillis:(nonnull NSNumber *)timestamp)
package/js/index.js CHANGED
@@ -96,8 +96,8 @@ const logCommerceEvent = (commerceEvent) => {
96
96
  NativeModules.MParticle.logCommerceEvent(commerceEvent)
97
97
  }
98
98
 
99
- const logScreenEvent = (screenName, attributes = null) => {
100
- NativeModules.MParticle.logScreenEvent(screenName, attributes)
99
+ const logScreenEvent = (screenName, attributes = null, shouldUploadEvent = true) => {
100
+ NativeModules.MParticle.logScreenEvent(screenName, attributes, shouldUploadEvent)
101
101
  }
102
102
 
103
103
  // Use ATTAuthStatus constants for status
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "homepage": "https://www.mparticle.com",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "mParticle/react-native-mparticle",
7
- "version": "2.6.1",
7
+ "version": "2.6.2",
8
8
  "main": "js/index.js",
9
9
  "scripts": {
10
10
  "test": "./node_modules/standard/bin/cmd.js",