@seamly/web-ui 23.0.0-alpha.1 → 23.0.0-alpha.2

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.
@@ -1919,12 +1919,14 @@ const initializeApp = (0,redux_toolkit_modern/* createAsyncThunk */.aw)('initial
1919
1919
  rejectWithValue
1920
1920
  }) => __awaiter(void 0, void 0, void 0, function* () {
1921
1921
  var _a, _b, _c;
1922
- const contentLocale = (_a = config === null || config === void 0 ? void 0 : config.context) === null || _a === void 0 ? void 0 : _a.contentLocale;
1923
- const userLocale = (_b = config === null || config === void 0 ? void 0 : config.context) === null || _b === void 0 ? void 0 : _b.userLocale;
1922
+ let contentLocale = (_a = config === null || config === void 0 ? void 0 : config.context) === null || _a === void 0 ? void 0 : _a.contentLocale;
1923
+ let userLocale = (_b = config === null || config === void 0 ? void 0 : config.context) === null || _b === void 0 ? void 0 : _b.userLocale;
1924
1924
  const environment = config.api.sendEnvironment !== false ? api.getEnvironment() : config.api.sendEnvironment;
1925
1925
  try {
1926
1926
  if (api.hasConversation()) {
1927
1927
  const initialState = yield api.getConversationIntitialState();
1928
+ contentLocale = initialState.context.contentLocale || contentLocale;
1929
+ userLocale = initialState.context.userLocale || userLocale;
1928
1930
  api.sendContext(Object.assign(Object.assign({}, initialState.context), {
1929
1931
  environment
1930
1932
  }));
@@ -3776,7 +3778,9 @@ const createI18nMiddleware = ({
3776
3778
  }
3777
3779
  }
3778
3780
  if (actions/* initializeApp */.m.fulfilled.match(action)) {
3779
- dispatch((0,i18n_actions/* setLocale */.K)(action.payload.contentLocale));
3781
+ if (action.payload.contentLocale) {
3782
+ dispatch((0,i18n_actions/* setLocale */.K)(action.payload.contentLocale));
3783
+ }
3780
3784
  return result;
3781
3785
  }
3782
3786
  if (store_slice/* addEvent */.Ux.match(action)) {
@@ -13808,7 +13812,7 @@ class API {
13808
13812
  return {
13809
13813
  clientName: "@seamly/web-ui",
13810
13814
  clientVariant: __classPrivateFieldGet(this, _API_layoutMode, "f"),
13811
- clientVersion: "23.0.0-alpha.1",
13815
+ clientVersion: "23.0.0-alpha.2",
13812
13816
  currentUrl: window.location.toString(),
13813
13817
  screenResolution: `${window.screen.width}x${window.screen.height}`,
13814
13818
  timezone: getTimeZone(),
@@ -18680,12 +18684,12 @@ const TranslationOption = ({ label, checked, description, onChange, id, itemClas
18680
18684
 
18681
18685
  const isChecked = (language, currentLocale, isOriginal) => currentLocale === language.locale || (!currentLocale && isOriginal);
18682
18686
  const TranslationOptions = ({ onChange, describedById, }) => {
18683
- const { context: { contentLocale }, } = (0,hooks/* useConfig */.EV)();
18687
+ const { context: { userLocale, contentLocale }, } = (0,hooks/* useConfig */.EV)();
18684
18688
  const { t } = (0,i18n_hooks/* useI18n */.g)();
18685
18689
  const { languages, currentLocale, enableTranslations, disableTranslations } = (0,translations_hooks/* useTranslations */.A1)();
18686
18690
  const focusSkiplinkTarget = (0,focus_helper_hooks/* useSkiplinkTargetFocusing */.e6)();
18687
18691
  const handleChange = (locale) => () => {
18688
- if (locale === currentLocale || contentLocale === locale) {
18692
+ if (locale === currentLocale || userLocale === locale) {
18689
18693
  disableTranslations();
18690
18694
  }
18691
18695
  else {