From 04d849a1128bffce2556a049c9c7f8376981780a Mon Sep 17 00:00:00 2001 From: Zihe Jia Date: Mon, 13 May 2024 11:52:17 -0700 Subject: [PATCH] Update docs --- docs/Mixpanel.html | 66 ++++++++++++++++++++--------------------- docs/MixpanelGroup.html | 14 ++++----- docs/People.html | 24 +++++++-------- docs/index.html | 2 +- docs/index.js.html | 26 +++++----------- 5 files changed, 61 insertions(+), 71 deletions(-) diff --git a/docs/Mixpanel.html b/docs/Mixpanel.html index f55201ac..79b036e1 100644 --- a/docs/Mixpanel.html +++ b/docs/Mixpanel.html @@ -93,7 +93,7 @@

new Mixpanel<
Source:
@@ -309,7 +309,7 @@

Parameters:
Source:
@@ -469,7 +469,7 @@
Parameters:
Source:
@@ -634,7 +634,7 @@
Parameters:
Source:
@@ -727,7 +727,7 @@

c
Source:
@@ -889,7 +889,7 @@

Parameters:
Source:
@@ -1026,7 +1026,7 @@
Parameters:
Source:
@@ -1142,7 +1142,7 @@

flushSource:
@@ -1238,7 +1238,7 @@

getDeviceI
Source:
@@ -1356,7 +1356,7 @@

getDisti
Source:
@@ -1539,7 +1539,7 @@

Parameters:
Source:
@@ -1639,7 +1639,7 @@

getPeopleSource:
@@ -1753,7 +1753,7 @@

get
Source:
@@ -1863,7 +1863,7 @@

ha
Source:
@@ -2034,7 +2034,7 @@

Parameters:
Source:
@@ -2256,7 +2256,7 @@
Parameters:
Source:
@@ -2346,7 +2346,7 @@

optInTra
Source:
@@ -2438,7 +2438,7 @@

optOutT
Source:
@@ -2585,7 +2585,7 @@

Parameters:
Source:
@@ -2725,7 +2725,7 @@
Parameters:
Source:
@@ -2885,7 +2885,7 @@
Parameters:
Source:
@@ -2974,7 +2974,7 @@

resetSource:
@@ -3113,7 +3113,7 @@
Parameters:
Source:
@@ -3251,7 +3251,7 @@
Parameters:
Source:
@@ -3411,7 +3411,7 @@
Parameters:
Source:
@@ -3550,7 +3550,7 @@
Parameters:
Source:
@@ -3689,7 +3689,7 @@
Parameters:
Source:
@@ -3829,7 +3829,7 @@
Parameters:
Source:
@@ -3968,7 +3968,7 @@
Parameters:
Source:
@@ -4134,7 +4134,7 @@
Parameters:
Source:
@@ -4323,7 +4323,7 @@
Parameters:
Source:
@@ -4464,7 +4464,7 @@
Parameters:
Source:
@@ -4516,7 +4516,7 @@

Home

Classes

  • diff --git a/docs/MixpanelGroup.html b/docs/MixpanelGroup.html index af4de242..62ac5f8f 100644 --- a/docs/MixpanelGroup.html +++ b/docs/MixpanelGroup.html @@ -95,7 +95,7 @@

    new Mixp
    Source:
    @@ -284,7 +284,7 @@

    Parameters:
    Source:
    @@ -446,7 +446,7 @@
    Parameters:
    Source:
    @@ -606,7 +606,7 @@
    Parameters:
    Source:
    @@ -768,7 +768,7 @@
    Parameters:
    Source:
    @@ -905,7 +905,7 @@
    Parameters:
    Source:
    @@ -957,7 +957,7 @@

    Home

    Classes

    • diff --git a/docs/People.html b/docs/People.html index 16124619..c24f042f 100644 --- a/docs/People.html +++ b/docs/People.html @@ -100,7 +100,7 @@

      new PeopleSource:
      @@ -289,7 +289,7 @@
      Parameters:
      Source:
      @@ -377,7 +377,7 @@

      clearChar
      Source:
      @@ -468,7 +468,7 @@

      deleteUser<
      Source:
      @@ -630,7 +630,7 @@

      Parameters:
      Source:
      @@ -792,7 +792,7 @@
      Parameters:
      Source:
      @@ -954,7 +954,7 @@
      Parameters:
      Source:
      @@ -1114,7 +1114,7 @@
      Parameters:
      Source:
      @@ -1274,7 +1274,7 @@
      Parameters:
      Source:
      @@ -1436,7 +1436,7 @@
      Parameters:
      Source:
      @@ -1573,7 +1573,7 @@
      Parameters:
      Source:
      @@ -1625,7 +1625,7 @@

      Home

      Classes

      • diff --git a/docs/index.html b/docs/index.html index 3adce787..487d0ab2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -203,7 +203,7 @@

        Home

        Classes

        • diff --git a/docs/index.js.html b/docs/index.js.html index 042d5f2d..332896e3 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -31,7 +31,6 @@

          Source: index.js

          import {Platform, NativeModules} from "react-native"; import packageJson from "./package.json"; const {MixpanelReactNative} = NativeModules; -import MixpanelMain from "mixpanel-react-native/javascript/mixpanel-main"; const DevicePlatform = { Unknown: "Unknown", @@ -74,27 +73,18 @@

          Source: index.js

          } this.token = token; this.trackAutomaticEvents = trackAutomaticEvents; - if (!useNative) { - this.mixpanelImpl = new MixpanelMain( - token, - trackAutomaticEvents, - storage - ); - return; - } - if (!MixpanelReactNative) { + if (useNative && MixpanelReactNative) { + this.mixpanelImpl = MixpanelReactNative; + return; + } else if (useNative) { console.warn( "MixpanelReactNative is not available; using JavaScript mode. If you prefer not to use the JavaScript mode, please follow the guide in the GitHub repository: https://github.com/mixpanel/mixpanel-react-native." ); - this.mixpanelImpl = new MixpanelMain( - token, - trackAutomaticEvents, - storage - ); - } else { - this.mixpanelImpl = MixpanelReactNative; } + + const MixpanelMain = require("mixpanel-react-native/javascript/mixpanel-main"); + this.mixpanelImpl = new MixpanelMain(token, trackAutomaticEvents, storage); } /** @@ -1048,7 +1038,7 @@

          Home

          Classes