@useblu/blu-lytics 1.0.11 → 1.0.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dispatchers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGpF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,KAAG,IA2BlE,CAAC;AAIF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,IAMzC,CAAC;AAEF,QAAA,MAAM,eAAe,UAAW,MAAM,cAAc,cAAc,KAAG,IAQpE,CAAC;AAEF,QAAA,MAAM,sBAAsB,OACtB,MAAM,kBACM,kBAAkB,KACjC,IAQF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dispatchers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,KAAG,IA0BlE,CAAC;AAIF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,IAMzC,CAAC;AAEF,QAAA,MAAM,eAAe,UAAW,MAAM,cAAc,cAAc,KAAG,IAQpE,CAAC;AAEF,QAAA,MAAM,sBAAsB,OACtB,MAAM,kBACM,kBAAkB,KACjC,IAQF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2
2
  import { providersList } from '../providers';
3
- import { checkIfMixPanelIsInitialized } from '../utils';
4
3
  /**
5
4
  * Dispatches the specified event data to all configured providers.
6
5
  *
@@ -14,7 +13,6 @@ export var dispatchEventToAllProviders = function (eventData) {
14
13
  : providersList;
15
14
  if (providersFiltered.length > 0) {
16
15
  providersFiltered.forEach(function (provider) {
17
- checkIfMixPanelIsInitialized(provider.name);
18
16
  var actions = {
19
17
  screenEvent: function () { return provider.screenEvent
20
18
  && eventData.screen
@@ -1,4 +1,3 @@
1
1
  import { ProviderType } from '../providers/provider.types';
2
2
  export declare const isValidProvidersList: (providersList: ProviderType[]) => boolean;
3
- export declare const checkIfMixPanelIsInitialized: (provider: string) => void;
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,kBAChB,YAAY,EAAE,KAC5B,OAAmE,CAAC;AAEvE,eAAO,MAAM,4BAA4B,aAAc,MAAM,KAAG,IAY/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,kBAChB,YAAY,EAAE,KAC5B,OAAmE,CAAC"}
@@ -1,14 +1 @@
1
- import mixpanel from 'mixpanel-browser';
2
1
  export var isValidProvidersList = function (providersList) { return Array.isArray(providersList) && providersList.length > 0; };
3
- export var checkIfMixPanelIsInitialized = function (provider) {
4
- var isMixPanelProvider = provider === 'MixPanel';
5
- if (isMixPanelProvider) {
6
- var apiKey = localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem('_bl_mp');
7
- var wasInitialized = localStorage.getItem('_bl_init');
8
- if (!wasInitialized) {
9
- mixpanel.init(apiKey);
10
- localStorage.removeItem('_bl_mp');
11
- localStorage.setItem('_bl_init', 'init');
12
- }
13
- }
14
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useblu/blu-lytics",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -19,7 +19,7 @@
19
19
  "@sentry/tracing": "^6.19.7",
20
20
  "clarity-js": "^0.7.32",
21
21
  "jest-environment-jsdom": "^29.7.0",
22
- "mixpanel-browser": "^2.49.0",
22
+ "mixpanel-browser": "^2.58.0",
23
23
  "react": "^18.2.0"
24
24
  },
25
25
  "devDependencies": {