@bigbinary/neeto-commons-frontend 2.1.14 → 2.1.16

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.
package/initializers.d.ts CHANGED
@@ -7,7 +7,6 @@ type Configurations = {
7
7
  };
8
8
  skip?: Partial<{
9
9
  globalProps: boolean;
10
- mixpanel: boolean;
11
10
  i18n: boolean;
12
11
  logger: boolean;
13
12
  axios: Skippable<{
package/initializers.js CHANGED
@@ -5,10 +5,9 @@ import i18n from 'i18next';
5
5
  import { serializeKeysToSnakeCase, keysToCamelCase, matches, deepFreezeObject } from '@bigbinary/neeto-commons-frontend/pure';
6
6
  import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
7
7
  import { Toastr } from '@bigbinary/neetoui';
8
- import { evolve, omit, values, mergeDeepLeft, curry, mergeAll, either, isEmpty, isNil } from 'ramda';
8
+ import { evolve, omit, values, mergeDeepLeft, curry, mergeAll } from 'ramda';
9
9
  import { initReactI18next } from 'react-i18next';
10
10
  import Logger from 'js-logger';
11
- import mixpanel from 'mixpanel-browser';
12
11
 
13
12
  function _typeof$1(obj) {
14
13
  "@babel/helpers - typeof";
@@ -2460,18 +2459,6 @@ function initializeLogger() {
2460
2459
  window.logger = Logger;
2461
2460
  }
2462
2461
 
2463
- function initializeMixPanel() {
2464
- var isUserLoggedIn = !either(isEmpty, isNil)(globalProps.user);
2465
- mixpanel.init(process.env.MIXPANEL_TOKEN || "TEST_TOKEN");
2466
- if (!isUserLoggedIn) return;
2467
- mixpanel.people.set({
2468
- $email: globalProps.user.email,
2469
- $fist_name: globalProps.user.firstName,
2470
- $last_name: globalProps.user.lastName
2471
- });
2472
- mixpanel.identify(globalProps.user.email);
2473
- }
2474
-
2475
2462
  var isObjectOrFunction = function isObjectOrFunction(object) {
2476
2463
  var type = _typeof$1(object);
2477
2464
  return type === "function" || type === "object" && !!object;
@@ -2491,16 +2478,15 @@ function disableReactDevTools() {
2491
2478
  }
2492
2479
 
2493
2480
  // eslint-disable-next-line import/no-mutable-exports
2494
- var globalProps$1 = {};
2481
+ var globalProps = {};
2495
2482
  function initializeApplication(_ref) {
2496
2483
  var translationResources = _ref.translationResources,
2497
2484
  skip = _ref.skip;
2498
2485
  if (!(skip !== null && skip !== void 0 && skip.globalProps)) {
2499
2486
  initializeGlobalProps();
2500
2487
  // eslint-disable-next-line @bigbinary/neeto/no-globalProps-reassignment
2501
- globalProps$1 = window.globalProps;
2488
+ globalProps = window.globalProps;
2502
2489
  }
2503
- if (!(skip !== null && skip !== void 0 && skip.mixpanel)) initializeMixPanel();
2504
2490
  if (_typeof$1(skip === null || skip === void 0 ? void 0 : skip.axios) === "object" || !(skip !== null && skip !== void 0 && skip.axios)) {
2505
2491
  initializeAxios(skip === null || skip === void 0 ? void 0 : skip.axios);
2506
2492
  }
@@ -2509,5 +2495,5 @@ function initializeApplication(_ref) {
2509
2495
  if (process.env.NODE_ENV === "production") disableReactDevTools();
2510
2496
  }
2511
2497
 
2512
- export { initializeApplication as default, globalProps$1 as globalProps };
2498
+ export { initializeApplication as default, globalProps };
2513
2499
  //# sourceMappingURL=initializers.js.map