@semcore/core 2.6.2 → 2.6.3

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/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [2.6.2-prerelease.0] - 2023-09-08
5
+ ## [2.6.3-prerelease.0] - 2023-09-12
6
+
7
+ ### Fixed
8
+
9
+ - Fixed `locale` propagation in complex components.
10
+
11
+ ## [2.6.2] - 2023-09-08
6
12
 
7
13
  ### Changed
8
14
 
@@ -16,6 +16,7 @@ function i18nAppLocaleEnhance() {
16
16
  var locale = props.locale,
17
17
  other = (0, _objectWithoutProperties2["default"])(props, _excluded);
18
18
  var contextLocale = _react["default"].useContext(_WithI18n.Context);
19
+ if (!locale && !contextLocale) return props;
19
20
  return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, other), {}, {
20
21
  locale: locale !== null && locale !== void 0 ? locale : contextLocale
21
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","names":["_react","_interopRequireDefault","require","_WithI18n","_excluded","i18nAppLocaleEnhance","wrapperProps","props","locale","other","_objectWithoutProperties2","contextLocale","React","useContext","Context","_objectSpread2","_default","exports"],"sources":["../../../src/enhancement/i18n.tsx"],"sourcesContent":["import React from 'react';\n// @ts-ignore\nimport { Context } from '@semcore/utils/lib/enhances/WithI18n';\n\nfunction i18nAppLocaleEnhance() {\n return {\n wrapperProps: (props: any) => {\n const { locale, ...other } = props;\n const contextLocale = React.useContext(Context);\n return {\n ...other,\n locale: locale ?? contextLocale,\n };\n },\n };\n}\n\nexport default i18nAppLocaleEnhance;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAA+D,IAAAE,SAAA;AAE/D,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,OAAO;IACLC,YAAY,EAAE,SAAAA,aAACC,KAAU,EAAK;MAC5B,IAAQC,MAAM,GAAeD,KAAK,CAA1BC,MAAM;QAAKC,KAAK,OAAAC,yBAAA,aAAKH,KAAK,EAAAH,SAAA;MAClC,IAAMO,aAAa,GAAGC,iBAAK,CAACC,UAAU,CAACC,iBAAO,CAAC;MAC/C,WAAAC,cAAA,iBAAAA,cAAA,iBACKN,KAAK;QACRD,MAAM,EAAEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIG;MAAa;IAEnC;EACF,CAAC;AACH;AAAC,IAAAK,QAAA,GAEcX,oBAAoB;AAAAY,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"i18n.js","names":["_react","_interopRequireDefault","require","_WithI18n","_excluded","i18nAppLocaleEnhance","wrapperProps","props","locale","other","_objectWithoutProperties2","contextLocale","React","useContext","Context","_objectSpread2","_default","exports"],"sources":["../../../src/enhancement/i18n.tsx"],"sourcesContent":["import React from 'react';\n// @ts-ignore\nimport { Context } from '@semcore/utils/lib/enhances/WithI18n';\n\nfunction i18nAppLocaleEnhance() {\n return {\n wrapperProps: (props: any) => {\n const { locale, ...other } = props;\n const contextLocale = React.useContext(Context);\n if (!locale && !contextLocale) return props;\n return {\n ...other,\n locale: locale ?? contextLocale,\n };\n },\n };\n}\n\nexport default i18nAppLocaleEnhance;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAA+D,IAAAE,SAAA;AAE/D,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,OAAO;IACLC,YAAY,EAAE,SAAAA,aAACC,KAAU,EAAK;MAC5B,IAAQC,MAAM,GAAeD,KAAK,CAA1BC,MAAM;QAAKC,KAAK,OAAAC,yBAAA,aAAKH,KAAK,EAAAH,SAAA;MAClC,IAAMO,aAAa,GAAGC,iBAAK,CAACC,UAAU,CAACC,iBAAO,CAAC;MAC/C,IAAI,CAACN,MAAM,IAAI,CAACG,aAAa,EAAE,OAAOJ,KAAK;MAC3C,WAAAQ,cAAA,iBAAAA,cAAA,iBACKN,KAAK;QACRD,MAAM,EAAEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIG;MAAa;IAEnC;EACF,CAAC;AACH;AAAC,IAAAK,QAAA,GAEcX,oBAAoB;AAAAY,OAAA,cAAAD,QAAA"}
@@ -10,6 +10,7 @@ function i18nAppLocaleEnhance() {
10
10
  var locale = props.locale,
11
11
  other = _objectWithoutProperties(props, _excluded);
12
12
  var contextLocale = React.useContext(Context);
13
+ if (!locale && !contextLocale) return props;
13
14
  return _objectSpread(_objectSpread({}, other), {}, {
14
15
  locale: locale !== null && locale !== void 0 ? locale : contextLocale
15
16
  });
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","names":["React","Context","i18nAppLocaleEnhance","wrapperProps","props","locale","other","_objectWithoutProperties","_excluded","contextLocale","useContext","_objectSpread"],"sources":["../../../src/enhancement/i18n.tsx"],"sourcesContent":["import React from 'react';\n// @ts-ignore\nimport { Context } from '@semcore/utils/lib/enhances/WithI18n';\n\nfunction i18nAppLocaleEnhance() {\n return {\n wrapperProps: (props: any) => {\n const { locale, ...other } = props;\n const contextLocale = React.useContext(Context);\n return {\n ...other,\n locale: locale ?? contextLocale,\n };\n },\n };\n}\n\nexport default i18nAppLocaleEnhance;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,OAAO,QAAQ,sCAAsC;AAE9D,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,OAAO;IACLC,YAAY,EAAE,SAAAA,aAACC,KAAU,EAAK;MAC5B,IAAQC,MAAM,GAAeD,KAAK,CAA1BC,MAAM;QAAKC,KAAK,GAAAC,wBAAA,CAAKH,KAAK,EAAAI,SAAA;MAClC,IAAMC,aAAa,GAAGT,KAAK,CAACU,UAAU,CAACT,OAAO,CAAC;MAC/C,OAAAU,aAAA,CAAAA,aAAA,KACKL,KAAK;QACRD,MAAM,EAAEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAII;MAAa;IAEnC;EACF,CAAC;AACH;AAEA,eAAeP,oBAAoB"}
1
+ {"version":3,"file":"i18n.js","names":["React","Context","i18nAppLocaleEnhance","wrapperProps","props","locale","other","_objectWithoutProperties","_excluded","contextLocale","useContext","_objectSpread"],"sources":["../../../src/enhancement/i18n.tsx"],"sourcesContent":["import React from 'react';\n// @ts-ignore\nimport { Context } from '@semcore/utils/lib/enhances/WithI18n';\n\nfunction i18nAppLocaleEnhance() {\n return {\n wrapperProps: (props: any) => {\n const { locale, ...other } = props;\n const contextLocale = React.useContext(Context);\n if (!locale && !contextLocale) return props;\n return {\n ...other,\n locale: locale ?? contextLocale,\n };\n },\n };\n}\n\nexport default i18nAppLocaleEnhance;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,OAAO,QAAQ,sCAAsC;AAE9D,SAASC,oBAAoBA,CAAA,EAAG;EAC9B,OAAO;IACLC,YAAY,EAAE,SAAAA,aAACC,KAAU,EAAK;MAC5B,IAAQC,MAAM,GAAeD,KAAK,CAA1BC,MAAM;QAAKC,KAAK,GAAAC,wBAAA,CAAKH,KAAK,EAAAI,SAAA;MAClC,IAAMC,aAAa,GAAGT,KAAK,CAACU,UAAU,CAACT,OAAO,CAAC;MAC/C,IAAI,CAACI,MAAM,IAAI,CAACI,aAAa,EAAE,OAAOL,KAAK;MAC3C,OAAAO,aAAA,CAAAA,aAAA,KACKL,KAAK;QACRD,MAAM,EAAEA,MAAM,aAANA,MAAM,cAANA,MAAM,GAAII;MAAa;IAEnC;EACF,CAAC;AACH;AAEA,eAAeP,oBAAoB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/core",
3
3
  "description": "Semrush Core Component",
4
- "version": "2.6.2",
4
+ "version": "2.6.3",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@reshadow/core": "0.0.1",
13
- "@semcore/utils": "4.6.2",
13
+ "@semcore/utils": "4.6.3",
14
14
  "classnames": "2.2.6",
15
15
  "hoist-non-react-statics": "3.3.2"
16
16
  },