@bigbinary/neeto-commons-frontend 2.0.111 → 2.0.113

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.js CHANGED
@@ -52,8 +52,6 @@ function _defineProperty(obj, key, value) {
52
52
  }
53
53
 
54
54
  var HEADERS_KEYS = {
55
- xAuthEmail: "X-Auth-Email",
56
- xAuthToken: "X-Auth-Token",
57
55
  xCsrfToken: "X-CSRF-TOKEN",
58
56
  contentType: "Content-Type",
59
57
  accept: "Accept"
@@ -66,15 +64,9 @@ var shouldShowToastr = function shouldShowToastr(response) {
66
64
  return typeof response === "string" || _typeof$1(response) === "object" && ((response === null || response === void 0 ? void 0 : response.notice) || (response === null || response === void 0 ? void 0 : response.noticeCode));
67
65
  };
68
66
  var setAuthHeaders = function setAuthHeaders() {
69
- var _document$querySelect, _axios$defaults$heade, _globalProps$user, _globalProps$user2;
67
+ var _document$querySelect, _axios$defaults$heade;
70
68
  // @ts-ignore
71
69
  axios.defaults.headers = (_axios$defaults$heade = {}, _defineProperty(_axios$defaults$heade, HEADERS_KEYS.accept, "application/json"), _defineProperty(_axios$defaults$heade, HEADERS_KEYS.contentType, "application/json"), _defineProperty(_axios$defaults$heade, HEADERS_KEYS.xCsrfToken, (_document$querySelect = document.querySelector('[name="csrf-token"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute("content")), _axios$defaults$heade);
72
- var token = (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.authenticationToken;
73
- var email = (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.email;
74
- if (token && email) {
75
- axios.defaults.headers[HEADERS_KEYS.xAuthEmail] = email;
76
- axios.defaults.headers[HEADERS_KEYS.xAuthToken] = token;
77
- }
78
70
  };
79
71
 
80
72
  // pipe function from ramda doesn't accept array of functions.
@@ -2393,7 +2385,7 @@ var commonsEn = {
2393
2385
  neetoCommons: neetoCommons
2394
2386
  };
2395
2387
 
2396
- var packageNames = ["neeto-molecules", "neeto-integrations-frontend", "neeto-team-members-frontend", "neeto-tags-frontend"];
2388
+ var packageNames = ["neeto-molecules", "neeto-integrations-frontend", "neeto-team-members-frontend", "neeto-tags-frontend", "neeto-form-frontend"];
2397
2389
  var getPackageTranslations = function getPackageTranslations(language, packageNames) {
2398
2390
  var loadTranslations = curry(function (language, packageName) {
2399
2391
  try {
@@ -2407,12 +2399,16 @@ var getPackageTranslations = function getPackageTranslations(language, packageNa
2407
2399
  };
2408
2400
  var packageEnTranslations = getPackageTranslations("en", packageNames);
2409
2401
  var en = mergeDeepLeft(commonsEn, packageEnTranslations);
2402
+ var de = getPackageTranslations("de", packageNames);
2410
2403
  var initializeI18n = function initializeI18n(resources) {
2411
2404
  var _i18n$services$format;
2412
2405
  i18n.use(Browser).use(initReactI18next).init({
2413
2406
  resources: mergeDeepLeft(resources, {
2414
2407
  en: {
2415
2408
  translation: en
2409
+ },
2410
+ de: {
2411
+ translation: de
2416
2412
  }
2417
2413
  }),
2418
2414
  supportedLngs: ["en", "de"],