@commercetools-frontend/constants 27.13.0 → 27.14.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.
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
9
9
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
10
10
 
11
11
  // NOTE: This string will be replaced on build time with the package version.
12
- var version = "27.13.0";
12
+ var version = "27.14.0";
13
13
 
14
14
  /**
15
15
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -192,7 +192,11 @@ const STORAGE_KEYS = {
192
192
  SELECTED_DATA_LOCALE: 'selectedDataLocale',
193
193
  IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
194
194
  LOGIN_STRATEGY: 'loginStrategy',
195
- ACTIVE_USER_LANGUAGE: 'activeUserLanguage'
195
+ ACTIVE_USER_LANGUAGE: 'activeUserLanguage',
196
+ // Last known `user.language`, used only to guess the locale before
197
+ // `FetchLoggedInUser` resolves. Distinct from ACTIVE_USER_LANGUAGE, which is
198
+ // the staff-bar override.
199
+ LAST_USER_LANGUAGE: 'lastUserLanguage'
196
200
  };
197
201
  const HTTP_SECURITY_HEADER_KEYS = {
198
202
  'Content-Security-Policy': 'Content-Security-Policy',
@@ -245,7 +249,12 @@ const PERFORMANCE_MARKS = {
245
249
  INTL_READY: `${PERFORMANCE_MARK_PREFIX}intl-ready`,
246
250
  CONTENT_RENDERED: `${PERFORMANCE_MARK_PREFIX}content-rendered`,
247
251
  HYDRATION_USER: `${PERFORMANCE_MARK_PREFIX}hydration-user`,
248
- HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`
252
+ HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`,
253
+ // Whether the parse-time locale hint resolved to the same catalogue as
254
+ // `user.language`. Both map through `mapLocaleToIntlLocale`, so only a
255
+ // bucket crossing counts as a miss.
256
+ LOCALE_HINT_HIT: `${PERFORMANCE_MARK_PREFIX}locale-hint-hit`,
257
+ LOCALE_HINT_MISS: `${PERFORMANCE_MARK_PREFIX}locale-hint-miss`
249
258
  };
250
259
 
251
260
  /*
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
9
9
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
10
10
 
11
11
  // NOTE: This string will be replaced on build time with the package version.
12
- var version = "27.13.0";
12
+ var version = "27.14.0";
13
13
 
14
14
  /**
15
15
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -192,7 +192,11 @@ const STORAGE_KEYS = {
192
192
  SELECTED_DATA_LOCALE: 'selectedDataLocale',
193
193
  IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
194
194
  LOGIN_STRATEGY: 'loginStrategy',
195
- ACTIVE_USER_LANGUAGE: 'activeUserLanguage'
195
+ ACTIVE_USER_LANGUAGE: 'activeUserLanguage',
196
+ // Last known `user.language`, used only to guess the locale before
197
+ // `FetchLoggedInUser` resolves. Distinct from ACTIVE_USER_LANGUAGE, which is
198
+ // the staff-bar override.
199
+ LAST_USER_LANGUAGE: 'lastUserLanguage'
196
200
  };
197
201
  const HTTP_SECURITY_HEADER_KEYS = {
198
202
  'Content-Security-Policy': 'Content-Security-Policy',
@@ -245,7 +249,12 @@ const PERFORMANCE_MARKS = {
245
249
  INTL_READY: `${PERFORMANCE_MARK_PREFIX}intl-ready`,
246
250
  CONTENT_RENDERED: `${PERFORMANCE_MARK_PREFIX}content-rendered`,
247
251
  HYDRATION_USER: `${PERFORMANCE_MARK_PREFIX}hydration-user`,
248
- HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`
252
+ HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`,
253
+ // Whether the parse-time locale hint resolved to the same catalogue as
254
+ // `user.language`. Both map through `mapLocaleToIntlLocale`, so only a
255
+ // bucket crossing counts as a miss.
256
+ LOCALE_HINT_HIT: `${PERFORMANCE_MARK_PREFIX}locale-hint-hit`,
257
+ LOCALE_HINT_MISS: `${PERFORMANCE_MARK_PREFIX}locale-hint-miss`
249
258
  };
250
259
 
251
260
  /*
@@ -1,7 +1,7 @@
1
1
  import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
2
2
 
3
3
  // NOTE: This string will be replaced on build time with the package version.
4
- var version = "27.13.0";
4
+ var version = "27.14.0";
5
5
 
6
6
  /**
7
7
  * The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
@@ -184,7 +184,11 @@ const STORAGE_KEYS = {
184
184
  SELECTED_DATA_LOCALE: 'selectedDataLocale',
185
185
  IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
186
186
  LOGIN_STRATEGY: 'loginStrategy',
187
- ACTIVE_USER_LANGUAGE: 'activeUserLanguage'
187
+ ACTIVE_USER_LANGUAGE: 'activeUserLanguage',
188
+ // Last known `user.language`, used only to guess the locale before
189
+ // `FetchLoggedInUser` resolves. Distinct from ACTIVE_USER_LANGUAGE, which is
190
+ // the staff-bar override.
191
+ LAST_USER_LANGUAGE: 'lastUserLanguage'
188
192
  };
189
193
  const HTTP_SECURITY_HEADER_KEYS = {
190
194
  'Content-Security-Policy': 'Content-Security-Policy',
@@ -237,7 +241,12 @@ const PERFORMANCE_MARKS = {
237
241
  INTL_READY: `${PERFORMANCE_MARK_PREFIX}intl-ready`,
238
242
  CONTENT_RENDERED: `${PERFORMANCE_MARK_PREFIX}content-rendered`,
239
243
  HYDRATION_USER: `${PERFORMANCE_MARK_PREFIX}hydration-user`,
240
- HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`
244
+ HYDRATION_PROJECT: `${PERFORMANCE_MARK_PREFIX}hydration-project`,
245
+ // Whether the parse-time locale hint resolved to the same catalogue as
246
+ // `user.language`. Both map through `mapLocaleToIntlLocale`, so only a
247
+ // bucket crossing counts as a miss.
248
+ LOCALE_HINT_HIT: `${PERFORMANCE_MARK_PREFIX}locale-hint-hit`,
249
+ LOCALE_HINT_MISS: `${PERFORMANCE_MARK_PREFIX}locale-hint-miss`
241
250
  };
242
251
 
243
252
  /*
@@ -281,6 +281,7 @@ export declare const STORAGE_KEYS: {
281
281
  readonly IS_FORCED_MENU_OPEN: "isForcedMenuOpen";
282
282
  readonly LOGIN_STRATEGY: "loginStrategy";
283
283
  readonly ACTIVE_USER_LANGUAGE: "activeUserLanguage";
284
+ readonly LAST_USER_LANGUAGE: "lastUserLanguage";
284
285
  };
285
286
  export declare const HTTP_SECURITY_HEADER_KEYS: {
286
287
  readonly 'Content-Security-Policy': "Content-Security-Policy";
@@ -323,5 +324,7 @@ export declare const PERFORMANCE_MARKS: {
323
324
  readonly CONTENT_RENDERED: "mc:content-rendered";
324
325
  readonly HYDRATION_USER: "mc:hydration-user";
325
326
  readonly HYDRATION_PROJECT: "mc:hydration-project";
327
+ readonly LOCALE_HINT_HIT: "mc:locale-hint-hit";
328
+ readonly LOCALE_HINT_MISS: "mc:locale-hint-miss";
326
329
  };
327
330
  export type TPerformanceMark = (typeof PERFORMANCE_MARKS)[keyof typeof PERFORMANCE_MARKS];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/constants",
3
- "version": "27.13.0",
3
+ "version": "27.14.0",
4
4
  "description": "Shared constants for MC applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {