@commercetools-frontend/application-shell-connectors 24.10.0 → 24.11.0

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.
@@ -76,7 +76,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
76
76
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
77
77
 
78
78
  // NOTE: This string will be replaced on build time with the package version.
79
- var version = "24.10.0";
79
+ var version = "24.11.0";
80
80
 
81
81
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
82
82
  const getDisplayName = Component => {
@@ -687,6 +687,11 @@ const logger = {
687
687
  }
688
688
  };
689
689
 
690
+ // Attempt to load the `user language` from sessionStorage
691
+ function selectUserLanguageFromStorage() {
692
+ return window.sessionStorage.getItem(constants.STORAGE_KEYS.ACTIVE_USER_LANGUAGE) || null;
693
+ }
694
+
690
695
  const getSessionToken = () => window.sessionStorage.getItem(constants.STORAGE_KEYS.SESSION_TOKEN);
691
696
  const setActiveSession = sessionToken => {
692
697
  if (!sessionToken) return;
@@ -1094,6 +1099,7 @@ exports.oidcStorage = oidcStorage;
1094
1099
  exports.selectProjectKeyFromUrl = selectProjectKeyFromUrl;
1095
1100
  exports.selectTeamIdFromStorage = selectTeamIdFromStorage;
1096
1101
  exports.selectUserId = selectUserId;
1102
+ exports.selectUserLanguageFromStorage = selectUserLanguageFromStorage;
1097
1103
  exports.setCachedApolloClient = setCachedApolloClient;
1098
1104
  exports.useApplicationContext = useApplicationContext;
1099
1105
  exports.useCustomViewContext = useCustomViewContext;
@@ -75,7 +75,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
75
75
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
76
76
 
77
77
  // NOTE: This string will be replaced on build time with the package version.
78
- var version = "24.10.0";
78
+ var version = "24.11.0";
79
79
 
80
80
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
81
81
  const getDisplayName = Component => {
@@ -684,6 +684,11 @@ const logger = {
684
684
  }
685
685
  };
686
686
 
687
+ // Attempt to load the `user language` from sessionStorage
688
+ function selectUserLanguageFromStorage() {
689
+ return window.sessionStorage.getItem(constants.STORAGE_KEYS.ACTIVE_USER_LANGUAGE) || null;
690
+ }
691
+
687
692
  const getSessionToken = () => window.sessionStorage.getItem(constants.STORAGE_KEYS.SESSION_TOKEN);
688
693
  const setActiveSession = sessionToken => {
689
694
  if (!sessionToken) return;
@@ -1087,6 +1092,7 @@ exports.oidcStorage = oidcStorage;
1087
1092
  exports.selectProjectKeyFromUrl = selectProjectKeyFromUrl;
1088
1093
  exports.selectTeamIdFromStorage = selectTeamIdFromStorage;
1089
1094
  exports.selectUserId = selectUserId;
1095
+ exports.selectUserLanguageFromStorage = selectUserLanguageFromStorage;
1090
1096
  exports.setCachedApolloClient = setCachedApolloClient;
1091
1097
  exports.useApplicationContext = useApplicationContext;
1092
1098
  exports.useCustomViewContext = useCustomViewContext;
@@ -43,7 +43,7 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
43
43
  import { RetryLink } from '@apollo/client/link/retry';
44
44
 
45
45
  // NOTE: This string will be replaced on build time with the package version.
46
- var version = "24.10.0";
46
+ var version = "24.11.0";
47
47
 
48
48
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
49
49
  const getDisplayName = Component => {
@@ -654,6 +654,11 @@ const logger = {
654
654
  }
655
655
  };
656
656
 
657
+ // Attempt to load the `user language` from sessionStorage
658
+ function selectUserLanguageFromStorage() {
659
+ return window.sessionStorage.getItem(STORAGE_KEYS.ACTIVE_USER_LANGUAGE) || null;
660
+ }
661
+
657
662
  const getSessionToken = () => window.sessionStorage.getItem(STORAGE_KEYS.SESSION_TOKEN);
658
663
  const setActiveSession = sessionToken => {
659
664
  if (!sessionToken) return;
@@ -1037,4 +1042,4 @@ function useMcMutation(mutation, options) {
1037
1042
  return useMutation(mutation, options);
1038
1043
  }
1039
1044
 
1040
- export { ApplicationContext, ApplicationContextProvider, Context$2 as Context, CustomViewContextProvider, GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, buildApiUrl, createApolloClient, createApolloContextForProxyForwardTo, createHttpClientOptions, executeHttpClientRequest, getCachedApolloClient, getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, oidcStorage, selectProjectKeyFromUrl, selectTeamIdFromStorage, selectUserId, setCachedApolloClient, useApplicationContext, useCustomViewContext, useCustomViewParentDataRefresher, useMcLazyQuery, useMcMutation, useMcQuery, useProjectExtensionImageRegex, version, withApplicationContext, withProjectExtensionImageRegex };
1045
+ export { ApplicationContext, ApplicationContextProvider, Context$2 as Context, CustomViewContextProvider, GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, buildApiUrl, createApolloClient, createApolloContextForProxyForwardTo, createHttpClientOptions, executeHttpClientRequest, getCachedApolloClient, getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, oidcStorage, selectProjectKeyFromUrl, selectTeamIdFromStorage, selectUserId, selectUserLanguageFromStorage, setCachedApolloClient, useApplicationContext, useCustomViewContext, useCustomViewParentDataRefresher, useMcLazyQuery, useMcMutation, useMcQuery, useProjectExtensionImageRegex, version, withApplicationContext, withProjectExtensionImageRegex };
@@ -5,7 +5,7 @@ export { useCustomViewParentDataRefresher } from "./hooks/custom-views/use-custo
5
5
  export { CustomViewContextProvider, useCustomViewContext, } from "./components/custom-view-context/index.js";
6
6
  export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, } from "./components/project-extension-image-regex/index.js";
7
7
  export { default as createApolloClient } from "./configure-apollo.js";
8
- export { getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, selectUserId, selectProjectKeyFromUrl, selectTeamIdFromStorage, createApolloContextForProxyForwardTo, } from "./utils/index.js";
8
+ export { getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, selectUserId, selectProjectKeyFromUrl, selectTeamIdFromStorage, selectUserLanguageFromStorage, createApolloContextForProxyForwardTo, } from "./utils/index.js";
9
9
  export { useMcQuery, useMcLazyQuery, useMcMutation, } from "./hooks/apollo-hooks/index.js";
10
10
  export { buildApiUrl, createHttpClientOptions, executeHttpClientRequest, } from "./utils/http-client.js";
11
11
  export * as oidcStorage from "./utils/oidc-storage.js";
@@ -5,3 +5,4 @@ export { default as getCorrelationId } from "./get-correlation-id/index.js";
5
5
  export { default as getMcApiUrl } from "./get-mc-api-url/index.js";
6
6
  export { createApolloContextForProxyForwardTo } from "./apollo-context.js";
7
7
  export { isLoggerEnabled, default as logger } from "./logger.js";
8
+ export { default as selectUserLanguageFromStorage } from "./select-user-language-from-storage/index.js";
@@ -0,0 +1 @@
1
+ export { default } from "./select-user-language-from-storage.js";
@@ -0,0 +1 @@
1
+ export default function selectUserLanguageFromStorage(): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-shell-connectors",
3
- "version": "24.10.0",
3
+ "version": "24.11.0",
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": "24.10.0",
41
- "@commercetools-frontend/browser-history": "24.10.0",
42
- "@commercetools-frontend/constants": "24.10.0",
43
- "@commercetools-frontend/sentry": "24.10.0",
40
+ "@commercetools-frontend/application-config": "24.11.0",
41
+ "@commercetools-frontend/browser-history": "24.11.0",
42
+ "@commercetools-frontend/constants": "24.11.0",
43
+ "@commercetools-frontend/sentry": "24.11.0",
44
44
  "@commercetools/http-user-agent": "3.0.0",
45
45
  "@emotion/react": "^11.14.0",
46
46
  "@types/lodash": "^4.14.198",