@seamly/web-ui 19.1.4 → 19.1.5

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.
@@ -16162,45 +16162,48 @@ function useTranslationsContainer() {
16162
16162
 
16163
16163
 
16164
16164
 
16165
- function translations_middleware_createMiddleware() {
16166
- return ({
16167
- dispatch,
16168
- getState
16169
- }) => next => action => {
16170
- var _action$history, _action$history$trans, _action$initialState, _action$initialState$, _action$event, _action$event$payload, _action$event$payload2;
16165
+ function translations_middleware_createMiddleware({
16166
+ dispatch,
16167
+ getState
16168
+ }) {
16169
+ return next => {
16170
+ return action => {
16171
+ var _action$history, _action$history$trans, _action$initialState, _action$initialState$, _action$event, _action$event$payload, _action$event$payload2;
16171
16172
 
16172
- const result = next(action);
16173
+ const result = next(action);
16173
16174
 
16174
- switch (action.type) {
16175
- case String(seamlyActions.SET_HISTORY):
16176
- if ((_action$history = action.history) !== null && _action$history !== void 0 && (_action$history$trans = _action$history.translation) !== null && _action$history$trans !== void 0 && _action$history$trans.enabled) {
16177
- dispatch(enable(action.history.translation.locale));
16178
- }
16175
+ switch (action.type) {
16176
+ case String(seamlyActions.SET_HISTORY):
16177
+ if ((_action$history = action.history) !== null && _action$history !== void 0 && (_action$history$trans = _action$history.translation) !== null && _action$history$trans !== void 0 && _action$history$trans.enabled) {
16178
+ dispatch(enable(action.history.translation.locale));
16179
+ dispatch(setLocale(action.history.translation.locale));
16180
+ }
16179
16181
 
16180
- break;
16182
+ break;
16181
16183
 
16182
- case String(seamlyActions.SET_INITIAL_STATE):
16183
- if ((_action$initialState = action.initialState) !== null && _action$initialState !== void 0 && (_action$initialState$ = _action$initialState.translation) !== null && _action$initialState$ !== void 0 && _action$initialState$.enabled) {
16184
- dispatch(enable(action.initialState.translation.locale));
16185
- dispatch(setLocale(action.locale));
16186
- }
16184
+ case String(seamlyActions.SET_INITIAL_STATE):
16185
+ if ((_action$initialState = action.initialState) !== null && _action$initialState !== void 0 && (_action$initialState$ = _action$initialState.translation) !== null && _action$initialState$ !== void 0 && _action$initialState$.enabled) {
16186
+ dispatch(enable(action.initialState.translation.locale));
16187
+ dispatch(setLocale(action.locale));
16188
+ }
16187
16189
 
16188
- break;
16190
+ break;
16189
16191
 
16190
- case String(seamlyActions.ADD_EVENT):
16191
- if (action.event.type === 'info' && ((_action$event = action.event) === null || _action$event === void 0 ? void 0 : (_action$event$payload = _action$event.payload) === null || _action$event$payload === void 0 ? void 0 : (_action$event$payload2 = _action$event$payload.body) === null || _action$event$payload2 === void 0 ? void 0 : _action$event$payload2.subtype) === 'new_translation' && action.event.payload.body.translationEnabled) {
16192
- dispatch(setLocale(action.event.payload.body.translationLocale));
16193
- }
16192
+ case String(seamlyActions.ADD_EVENT):
16193
+ if (action.event.type === 'info' && ((_action$event = action.event) === null || _action$event === void 0 ? void 0 : (_action$event$payload = _action$event.payload) === null || _action$event$payload === void 0 ? void 0 : (_action$event$payload2 = _action$event$payload.body) === null || _action$event$payload2 === void 0 ? void 0 : _action$event$payload2.subtype) === 'new_translation' && action.event.payload.body.translationEnabled) {
16194
+ dispatch(setLocale(action.event.payload.body.translationLocale));
16195
+ }
16194
16196
 
16195
- break;
16197
+ break;
16196
16198
 
16197
- case String(disable):
16198
- const initialLocale = selectInitialLocale(getState());
16199
- dispatch(setLocale(initialLocale));
16200
- break;
16201
- }
16199
+ case String(disable):
16200
+ const initialLocale = selectInitialLocale(getState());
16201
+ dispatch(setLocale(initialLocale));
16202
+ break;
16203
+ }
16202
16204
 
16203
- return result;
16205
+ return result;
16206
+ };
16204
16207
  };
16205
16208
  }
16206
16209
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/reducer.js
@@ -24554,12 +24557,11 @@ var Socket = class {
24554
24557
  }
24555
24558
 
24556
24559
  onConnClose(event) {
24557
- let closeCode = event && event.code;
24558
24560
  if (this.hasLogger()) this.log("transport", "close", event);
24559
24561
  this.triggerChanError();
24560
24562
  clearTimeout(this.heartbeatTimer);
24561
24563
 
24562
- if (!this.closeWasClean && closeCode !== 1e3) {
24564
+ if (!this.closeWasClean) {
24563
24565
  this.reconnectTimer.scheduleTimeout();
24564
24566
  }
24565
24567
 
@@ -25596,7 +25598,7 @@ function store_createStore({
25596
25598
  api
25597
25599
  }), options_middleware_createMiddleware({
25598
25600
  api
25599
- }), translations_middleware_createMiddleware()]
25601
+ }), translations_middleware_createMiddleware]
25600
25602
  });
25601
25603
  return store;
25602
25604
  }