@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.
@@ -24649,45 +24649,48 @@ function useTranslationsContainer() {
24649
24649
 
24650
24650
 
24651
24651
 
24652
- function translations_middleware_createMiddleware() {
24653
- return ({
24654
- dispatch,
24655
- getState
24656
- }) => next => action => {
24657
- var _action$history, _action$history$trans, _action$initialState, _action$initialState$, _action$event, _action$event$payload, _action$event$payload2;
24652
+ function translations_middleware_createMiddleware({
24653
+ dispatch,
24654
+ getState
24655
+ }) {
24656
+ return next => {
24657
+ return action => {
24658
+ var _action$history, _action$history$trans, _action$initialState, _action$initialState$, _action$event, _action$event$payload, _action$event$payload2;
24658
24659
 
24659
- const result = next(action);
24660
+ const result = next(action);
24660
24661
 
24661
- switch (action.type) {
24662
- case String(seamlyActions.SET_HISTORY):
24663
- 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) {
24664
- dispatch(enable(action.history.translation.locale));
24665
- }
24662
+ switch (action.type) {
24663
+ case String(seamlyActions.SET_HISTORY):
24664
+ 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) {
24665
+ dispatch(enable(action.history.translation.locale));
24666
+ dispatch(setLocale(action.history.translation.locale));
24667
+ }
24666
24668
 
24667
- break;
24669
+ break;
24668
24670
 
24669
- case String(seamlyActions.SET_INITIAL_STATE):
24670
- if ((_action$initialState = action.initialState) !== null && _action$initialState !== void 0 && (_action$initialState$ = _action$initialState.translation) !== null && _action$initialState$ !== void 0 && _action$initialState$.enabled) {
24671
- dispatch(enable(action.initialState.translation.locale));
24672
- dispatch(setLocale(action.locale));
24673
- }
24671
+ case String(seamlyActions.SET_INITIAL_STATE):
24672
+ if ((_action$initialState = action.initialState) !== null && _action$initialState !== void 0 && (_action$initialState$ = _action$initialState.translation) !== null && _action$initialState$ !== void 0 && _action$initialState$.enabled) {
24673
+ dispatch(enable(action.initialState.translation.locale));
24674
+ dispatch(setLocale(action.locale));
24675
+ }
24674
24676
 
24675
- break;
24677
+ break;
24676
24678
 
24677
- case String(seamlyActions.ADD_EVENT):
24678
- 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) {
24679
- dispatch(setLocale(action.event.payload.body.translationLocale));
24680
- }
24679
+ case String(seamlyActions.ADD_EVENT):
24680
+ 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) {
24681
+ dispatch(setLocale(action.event.payload.body.translationLocale));
24682
+ }
24681
24683
 
24682
- break;
24684
+ break;
24683
24685
 
24684
- case String(disable):
24685
- const initialLocale = selectInitialLocale(getState());
24686
- dispatch(setLocale(initialLocale));
24687
- break;
24688
- }
24686
+ case String(disable):
24687
+ const initialLocale = selectInitialLocale(getState());
24688
+ dispatch(setLocale(initialLocale));
24689
+ break;
24690
+ }
24689
24691
 
24690
- return result;
24692
+ return result;
24693
+ };
24691
24694
  };
24692
24695
  }
24693
24696
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/reducer.js
@@ -33406,12 +33409,11 @@ var Socket = class {
33406
33409
  onConnClose(event) {
33407
33410
  var _context26;
33408
33411
 
33409
- let closeCode = event && event.code;
33410
33412
  if (this.hasLogger()) this.log("transport", "close", event);
33411
33413
  this.triggerChanError();
33412
33414
  clearTimeout(this.heartbeatTimer);
33413
33415
 
33414
- if (!this.closeWasClean && closeCode !== 1e3) {
33416
+ if (!this.closeWasClean) {
33415
33417
  this.reconnectTimer.scheduleTimeout();
33416
33418
  }
33417
33419
 
@@ -34529,7 +34531,7 @@ function store_createStore({
34529
34531
  api
34530
34532
  }), options_middleware_createMiddleware({
34531
34533
  api
34532
- }), translations_middleware_createMiddleware()]
34534
+ }), translations_middleware_createMiddleware]
34533
34535
  });
34534
34536
  return store;
34535
34537
  }