mixpanel-react-native 2.3.1 → 2.4.1

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/MixpanelReactNative.podspec +1 -1
  3. package/Samples/ContextAPIMixpanel/Analytics.js +0 -6
  4. package/__tests__/index.test.js +186 -60
  5. package/__tests__/jest_setup.js +1 -0
  6. package/android/bin/.gradle/5.5/executionHistory/executionHistory.lock +0 -0
  7. package/android/bin/.gradle/5.5/fileChanges/last-build.bin +0 -0
  8. package/android/bin/.gradle/5.5/fileHashes/fileHashes.bin +0 -0
  9. package/android/bin/.gradle/5.5/fileHashes/fileHashes.lock +0 -0
  10. package/android/bin/.gradle/5.5/gc.properties +0 -0
  11. package/android/bin/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/bin/.gradle/buildOutputCleanup/cache.properties +2 -0
  13. package/android/bin/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/android/bin/.gradle/vcs-1/gc.properties +0 -0
  15. package/android/bin/.idea/caches/build_file_checksums.ser +0 -0
  16. package/android/bin/.idea/compiler.xml +6 -0
  17. package/android/bin/.idea/gradle.xml +21 -0
  18. package/android/bin/.idea/jarRepositories.xml +30 -0
  19. package/android/bin/.idea/libraries/Gradle__com_android_support_appcompat_v7_23_0_1_aar.xml +16 -0
  20. package/android/bin/.idea/libraries/Gradle__com_android_support_recyclerview_v7_23_0_1_aar.xml +13 -0
  21. package/android/bin/.idea/libraries/Gradle__com_android_support_support_annotations_23_0_1.xml +11 -0
  22. package/android/bin/.idea/libraries/Gradle__com_android_support_support_v4_23_0_1_aar.xml +17 -0
  23. package/android/bin/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1_aar.xml +13 -0
  24. package/android/bin/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1_aar.xml +13 -0
  25. package/android/bin/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1_aar.xml +13 -0
  26. package/android/bin/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1_aar.xml +13 -0
  27. package/android/bin/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1_aar.xml +13 -0
  28. package/android/bin/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1_aar.xml +17 -0
  29. package/android/bin/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0.xml +11 -0
  30. package/android/bin/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0.xml +11 -0
  31. package/android/bin/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3.xml +11 -0
  32. package/android/bin/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0.xml +11 -0
  33. package/android/bin/.idea/libraries/Gradle__com_mixpanel_android_mixpanel_android_6_0_0_beta1_aar.xml +16 -0
  34. package/android/bin/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0.xml +11 -0
  35. package/android/bin/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4.xml +11 -0
  36. package/android/bin/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0.xml +11 -0
  37. package/android/bin/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0.xml +11 -0
  38. package/android/bin/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0.xml +11 -0
  39. package/android/bin/.idea/libraries/Gradle__commons_cli_commons_cli_1_2.xml +11 -0
  40. package/android/bin/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml +11 -0
  41. package/android/bin/.idea/misc.xml +9 -0
  42. package/android/bin/.idea/modules.xml +8 -0
  43. package/android/bin/.idea/vcs.xml +6 -0
  44. package/android/bin/.idea/workspace.xml +57 -0
  45. package/android/bin/.project +34 -0
  46. package/android/bin/.settings/org.eclipse.buildship.core.prefs +13 -0
  47. package/android/bin/build.gradle +45 -0
  48. package/android/bin/gradle/wrapper/gradle-wrapper.jar +0 -0
  49. package/android/bin/gradle/wrapper/gradle-wrapper.properties +6 -0
  50. package/android/bin/gradlew +172 -0
  51. package/android/bin/gradlew.bat +84 -0
  52. package/android/bin/local.properties +8 -0
  53. package/android/bin/src/main/AndroidManifest.xml +2 -0
  54. package/android/build.gradle +8 -1
  55. package/android/src/main/java/com/mixpanel/reactnative/MixpanelReactNativeModule.java +15 -1
  56. package/docs/Mixpanel.html +164 -25
  57. package/docs/MixpanelGroup.html +7 -7
  58. package/docs/People.html +12 -12
  59. package/docs/index.html +1 -1
  60. package/docs/index.js.html +14 -1
  61. package/index.d.ts +1 -1
  62. package/index.js +896 -820
  63. package/ios/MixpanelReactNative.m +2 -0
  64. package/ios/MixpanelReactNative.swift +10 -0
  65. package/package.json +56 -56
package/docs/People.html CHANGED
@@ -100,7 +100,7 @@ call to identify using a different id.</div>
100
100
 
101
101
  <dt class="tag-source">Source:</dt>
102
102
  <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line531">line 531</a>
103
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line544">line 544</a>
104
104
  </li></ul></dd>
105
105
 
106
106
 
@@ -289,7 +289,7 @@ currently have a list value, the append will be ignored.
289
289
 
290
290
  <dt class="tag-source">Source:</dt>
291
291
  <dd class="tag-source"><ul class="dummy"><li>
292
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line622">line 622</a>
292
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line635">line 635</a>
293
293
  </li></ul></dd>
294
294
 
295
295
 
@@ -377,7 +377,7 @@ currently have a list value, the append will be ignored.
377
377
 
378
378
  <dt class="tag-source">Source:</dt>
379
379
  <dd class="tag-source"><ul class="dummy"><li>
380
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line712">line 712</a>
380
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line725">line 725</a>
381
381
  </li></ul></dd>
382
382
 
383
383
 
@@ -468,7 +468,7 @@ to People Analytics using the same distinct id will create and store new values.
468
468
 
469
469
  <dt class="tag-source">Source:</dt>
470
470
  <dd class="tag-source"><ul class="dummy"><li>
471
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line722">line 722</a>
471
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line735">line 735</a>
472
472
  </li></ul></dd>
473
473
 
474
474
 
@@ -630,7 +630,7 @@ provide a negative number for the value.
630
630
 
631
631
  <dt class="tag-source">Source:</dt>
632
632
  <dd class="tag-source"><ul class="dummy"><li>
633
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line590">line 590</a>
633
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line603">line 603</a>
634
634
  </li></ul></dd>
635
635
 
636
636
 
@@ -792,7 +792,7 @@ If the property exists and is not list-valued, the remove will be ignored.
792
792
 
793
793
  <dt class="tag-source">Source:</dt>
794
794
  <dd class="tag-source"><ul class="dummy"><li>
795
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line666">line 666</a>
795
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line679">line 679</a>
796
796
  </li></ul></dd>
797
797
 
798
798
 
@@ -954,7 +954,7 @@ possibly overwriting an existing property with the same name.
954
954
 
955
955
  <dt class="tag-source">Source:</dt>
956
956
  <dd class="tag-source"><ul class="dummy"><li>
957
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line548">line 548</a>
957
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line561">line 561</a>
958
958
  </li></ul></dd>
959
959
 
960
960
 
@@ -1114,7 +1114,7 @@ possibly overwriting an existing property with the same name.
1114
1114
 
1115
1115
  <dt class="tag-source">Source:</dt>
1116
1116
  <dd class="tag-source"><ul class="dummy"><li>
1117
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line567">line 567</a>
1117
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line580">line 580</a>
1118
1118
  </li></ul></dd>
1119
1119
 
1120
1120
 
@@ -1274,7 +1274,7 @@ possibly overwriting an existing property with the same name.
1274
1274
 
1275
1275
  <dt class="tag-source">Source:</dt>
1276
1276
  <dd class="tag-source"><ul class="dummy"><li>
1277
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line698">line 698</a>
1277
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line711">line 711</a>
1278
1278
  </li></ul></dd>
1279
1279
 
1280
1280
 
@@ -1436,7 +1436,7 @@ If the property exists and is not list-valued, the union will be ignored.
1436
1436
 
1437
1437
  <dt class="tag-source">Source:</dt>
1438
1438
  <dd class="tag-source"><ul class="dummy"><li>
1439
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line645">line 645</a>
1439
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line658">line 658</a>
1440
1440
  </li></ul></dd>
1441
1441
 
1442
1442
 
@@ -1573,7 +1573,7 @@ If the property exists and is not list-valued, the union will be ignored.
1573
1573
 
1574
1574
  <dt class="tag-source">Source:</dt>
1575
1575
  <dd class="tag-source"><ul class="dummy"><li>
1576
- <a href="index.js.html">index.js</a>, <a href="index.js.html#line685">line 685</a>
1576
+ <a href="index.js.html">index.js</a>, <a href="index.js.html#line698">line 698</a>
1577
1577
  </li></ul></dd>
1578
1578
 
1579
1579
 
@@ -1625,7 +1625,7 @@ If the property exists and is not list-valued, the union will be ignored.
1625
1625
  <br class="clear">
1626
1626
 
1627
1627
  <footer>
1628
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
1628
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Dec 01 2023 16:27:57 GMT-0800 (Pacific Standard Time)
1629
1629
  </footer>
1630
1630
 
1631
1631
  <script> prettyPrint(); </script>
package/docs/index.html CHANGED
@@ -179,7 +179,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
179
179
  <br class="clear">
180
180
 
181
181
  <footer>
182
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
182
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Dec 01 2023 16:27:57 GMT-0800 (Pacific Standard Time)
183
183
  </footer>
184
184
 
185
185
  <script> prettyPrint(); </script>
@@ -168,6 +168,19 @@ export class Mixpanel {
168
168
  setUseIpAddressForGeolocation(useIpAddressForGeolocation) {
169
169
  MixpanelReactNative.setUseIpAddressForGeolocation(this.token, useIpAddressForGeolocation);
170
170
  }
171
+
172
+ /**
173
+ * Set the number of events sent in a single network request to the Mixpanel server.
174
+ * By configuring this value, you can optimize network usage and manage the frequency of communication between the client and the server. The maximum size is 50; any value over 50 will default to 50.
175
+ *
176
+ * @param {integer} flushBatchSize whether to automatically send the client IP Address.
177
+ * Defaults to true.
178
+ *
179
+ */
180
+ setFlushBatchSize(flushBatchSize) {
181
+ MixpanelReactNative.setFlushBatchSize(this.token, flushBatchSize);
182
+ }
183
+
171
184
 
172
185
  /**
173
186
  * Will return true if the user has opted out from tracking.
@@ -940,7 +953,7 @@ class ObjectHelper {
940
953
  <br class="clear">
941
954
 
942
955
  <footer>
943
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Tue Jun 20 2023 11:54:12 GMT-0700 (Pacific Daylight Time)
956
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri Dec 01 2023 16:27:57 GMT-0800 (Pacific Standard Time)
944
957
  </footer>
945
958
 
946
959
  <script> prettyPrint(); </script>
package/index.d.ts CHANGED
@@ -8,8 +8,8 @@ export class Mixpanel {
8
8
  setServerURL(serverURL: string): void;
9
9
  setLoggingEnabled(loggingEnabled: boolean): void;
10
10
  setFlushOnBackground(flushOnBackground: boolean): void;
11
-
12
11
  setUseIpAddressForGeolocation(useIpAddressForGeolocation: boolean): void;
12
+ setFlushBatchSize(flushBatchSize: number): void;
13
13
  hasOptedOutTracking(): Promise<boolean>;
14
14
  optInTracking(): void;
15
15
  optOutTracking(): void;