@commercetools-frontend/application-shell-connectors 22.14.3 → 22.15.1

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.
@@ -81,7 +81,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
81
81
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
82
82
 
83
83
  // NOTE: This string will be replaced on build time with the package version.
84
- var version = "22.14.3";
84
+ var version = "22.15.1";
85
85
 
86
86
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
87
87
  const getDisplayName = Component => {
@@ -705,10 +705,8 @@ const getSessionState = stateId => {
705
705
  if (unparsedSessionState) {
706
706
  try {
707
707
  const parsedSessionState = JSON.parse(unparsedSessionState);
708
- window.sessionStorage.removeItem(sessionStateKey);
709
708
  return parsedSessionState;
710
709
  } catch (error) {
711
- window.sessionStorage.removeItem(sessionStateKey);
712
710
  if (process.env.NODE_ENV !== 'production') {
713
711
  var _context2;
714
712
  // eslint-disable-next-line no-console
@@ -723,6 +721,11 @@ const setSessionState = (stateId, state) => {
723
721
  const sessionStateKey = _concatInstanceProperty__default["default"](_context3 = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context3, stateId);
724
722
  window.sessionStorage.setItem(sessionStateKey, _JSON$stringify__default["default"](state));
725
723
  };
724
+ const removeSessionState = stateId => {
725
+ var _context4;
726
+ const sessionStateKey = _concatInstanceProperty__default["default"](_context4 = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context4, stateId);
727
+ window.sessionStorage.removeItem(sessionStateKey);
728
+ };
726
729
 
727
730
  var oidcStorage = /*#__PURE__*/Object.freeze({
728
731
  __proto__: null,
@@ -731,6 +734,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
731
734
  clearSession: clearSession,
732
735
  getSessionState: getSessionState,
733
736
  setSessionState: setSessionState,
737
+ removeSessionState: removeSessionState,
734
738
  getActiveProjectKey: getActiveProjectKey,
735
739
  setActiveProjectKey: setActiveProjectKey,
736
740
  removeActiveProjectKey: removeActiveProjectKey,
@@ -79,7 +79,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
79
79
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
80
80
 
81
81
  // NOTE: This string will be replaced on build time with the package version.
82
- var version = "22.14.3";
82
+ var version = "22.15.1";
83
83
 
84
84
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
85
85
  const getDisplayName = Component => {
@@ -687,10 +687,8 @@ const getSessionState = stateId => {
687
687
  if (unparsedSessionState) {
688
688
  try {
689
689
  const parsedSessionState = JSON.parse(unparsedSessionState);
690
- window.sessionStorage.removeItem(sessionStateKey);
691
690
  return parsedSessionState;
692
691
  } catch (error) {
693
- window.sessionStorage.removeItem(sessionStateKey);
694
692
  }
695
693
  }
696
694
  return null;
@@ -700,6 +698,11 @@ const setSessionState = (stateId, state) => {
700
698
  const sessionStateKey = _concatInstanceProperty__default["default"](_context3 = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context3, stateId);
701
699
  window.sessionStorage.setItem(sessionStateKey, _JSON$stringify__default["default"](state));
702
700
  };
701
+ const removeSessionState = stateId => {
702
+ var _context4;
703
+ const sessionStateKey = _concatInstanceProperty__default["default"](_context4 = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context4, stateId);
704
+ window.sessionStorage.removeItem(sessionStateKey);
705
+ };
703
706
 
704
707
  var oidcStorage = /*#__PURE__*/Object.freeze({
705
708
  __proto__: null,
@@ -708,6 +711,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
708
711
  clearSession: clearSession,
709
712
  getSessionState: getSessionState,
710
713
  setSessionState: setSessionState,
714
+ removeSessionState: removeSessionState,
711
715
  getActiveProjectKey: getActiveProjectKey,
712
716
  setActiveProjectKey: setActiveProjectKey,
713
717
  removeActiveProjectKey: removeActiveProjectKey,
@@ -46,7 +46,7 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
46
46
  import { RetryLink } from '@apollo/client/link/retry';
47
47
 
48
48
  // NOTE: This string will be replaced on build time with the package version.
49
- var version = "22.14.3";
49
+ var version = "22.15.1";
50
50
 
51
51
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
52
52
  const getDisplayName = Component => {
@@ -670,10 +670,8 @@ const getSessionState = stateId => {
670
670
  if (unparsedSessionState) {
671
671
  try {
672
672
  const parsedSessionState = JSON.parse(unparsedSessionState);
673
- window.sessionStorage.removeItem(sessionStateKey);
674
673
  return parsedSessionState;
675
674
  } catch (error) {
676
- window.sessionStorage.removeItem(sessionStateKey);
677
675
  if (process.env.NODE_ENV !== 'production') {
678
676
  var _context2;
679
677
  // eslint-disable-next-line no-console
@@ -688,6 +686,11 @@ const setSessionState = (stateId, state) => {
688
686
  const sessionStateKey = _concatInstanceProperty(_context3 = "".concat(STORAGE_KEYS.NONCE, "_")).call(_context3, stateId);
689
687
  window.sessionStorage.setItem(sessionStateKey, _JSON$stringify(state));
690
688
  };
689
+ const removeSessionState = stateId => {
690
+ var _context4;
691
+ const sessionStateKey = _concatInstanceProperty(_context4 = "".concat(STORAGE_KEYS.NONCE, "_")).call(_context4, stateId);
692
+ window.sessionStorage.removeItem(sessionStateKey);
693
+ };
691
694
 
692
695
  var oidcStorage = /*#__PURE__*/Object.freeze({
693
696
  __proto__: null,
@@ -696,6 +699,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
696
699
  clearSession: clearSession,
697
700
  getSessionState: getSessionState,
698
701
  setSessionState: setSessionState,
702
+ removeSessionState: removeSessionState,
699
703
  getActiveProjectKey: getActiveProjectKey,
700
704
  setActiveProjectKey: setActiveProjectKey,
701
705
  removeActiveProjectKey: removeActiveProjectKey,
@@ -8,4 +8,5 @@ declare const getSessionScope: () => string | null;
8
8
  declare const setSessionScope: (scope: string) => void;
9
9
  declare const getSessionState: <State extends {}>(stateId?: string) => State | null;
10
10
  declare const setSessionState: <State extends {}>(stateId: string, state: State) => void;
11
- export { getSessionToken, setActiveSession, clearSession, getSessionState, setSessionState, getActiveProjectKey, setActiveProjectKey, removeActiveProjectKey, getSessionScope, setSessionScope, };
11
+ declare const removeSessionState: (stateId?: string) => void;
12
+ export { getSessionToken, setActiveSession, clearSession, getSessionState, setSessionState, removeSessionState, getActiveProjectKey, setActiveProjectKey, removeActiveProjectKey, getSessionScope, setSessionScope, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-shell-connectors",
3
- "version": "22.14.3",
3
+ "version": "22.15.1",
4
4
  "description": "Contains complementary tools for @commercetools-frontend/application-shell",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.22.15",
39
39
  "@babel/runtime-corejs3": "^7.22.15",
40
- "@commercetools-frontend/application-config": "22.14.3",
41
- "@commercetools-frontend/browser-history": "22.14.3",
42
- "@commercetools-frontend/constants": "22.14.3",
43
- "@commercetools-frontend/sentry": "22.14.3",
40
+ "@commercetools-frontend/application-config": "22.15.1",
41
+ "@commercetools-frontend/browser-history": "22.15.1",
42
+ "@commercetools-frontend/constants": "22.15.1",
43
+ "@commercetools-frontend/sentry": "22.15.1",
44
44
  "@commercetools/http-user-agent": "3.0.0",
45
45
  "@emotion/react": "^11.11.1",
46
46
  "@types/lodash": "^4.14.198",