sea-react-components 1.3.21 → 1.3.22

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/utils/axios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,YAChB,MAAM,YACN,YAAY,kCA8DtB,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/axios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,YAChB,MAAM,YACN,YAAY,kCAiEtB,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -43,7 +43,9 @@ export const createInstance = (baseURL, options = {
43
43
  ].includes(message)) {
44
44
  console.log("Unauthenticated or invalid input - logging out");
45
45
  removeCookie(options.JWTTokenKey);
46
- window.location.reload();
46
+ setTimeout(() => {
47
+ window.location.reload();
48
+ }, 2000);
47
49
  }
48
50
  return Promise.reject((_d = error.response) === null || _d === void 0 ? void 0 : _d.data);
49
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/cookie/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAM,GAAG,SAMjD,CAAC;AAEF,eAAO,MAAM,SAAS,SACd,MAAM,SACL,MAAM,YACH;IACR,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC,KACA,IAiBF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,IAa3C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/cookie/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAM,GAAG,SAMjD,CAAC;AAEF,eAAO,MAAM,SAAS,SACd,MAAM,SACL,MAAM,YACH;IACR,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC,KACA,IAiBF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,IAiB3C,CAAC"}
@@ -26,9 +26,11 @@ export const setCookie = (name, value, options) => {
26
26
  document.cookie = cookie;
27
27
  };
28
28
  export const removeCookie = (name) => {
29
+ console.log("removeCookie: ", name);
29
30
  // Try removing it for all common scopes
30
31
  const domains = [window.location.hostname, `.${window.location.hostname}`];
31
32
  const paths = ["/", ""];
33
+ console.log({ domains, paths });
32
34
  domains.forEach((domain) => {
33
35
  paths.forEach((path) => {
34
36
  document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=${path}; domain=${domain};`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sea-react-components",
3
3
  "description": "SEA react components library",
4
- "version": "1.3.21",
4
+ "version": "1.3.22",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "tsc --build && npx postcss src/styles.css -o dist/styles.css && npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css",