@seamly/web-ui 19.1.4 → 19.1.6

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.
@@ -20881,9 +20881,9 @@ const seamlyStateReducer = (state, action) => {
20881
20881
 
20882
20882
 
20883
20883
  if (accountHasUploads && (eventType === eventTypes.message || eventType === eventTypes.participant) && !payload.fromClient) {
20884
- const {
20885
- type: entryType
20886
- } = payload.entry || {};
20884
+ var _payload$entry;
20885
+
20886
+ const entryType = payload === null || payload === void 0 ? void 0 : (_payload$entry = payload.entry) === null || _payload$entry === void 0 ? void 0 : _payload$entry.type;
20887
20887
  newOptions = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions), {}, {
20888
20888
  features: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features), {}, {
20889
20889
  uploads: seamly_utils_objectSpread(seamly_utils_objectSpread({}, newOptions.features.uploads), {}, {
@@ -21015,12 +21015,9 @@ const seamlyStateReducer = (state, action) => {
21015
21015
  const newFeaturesHasUpload = newFeatures.hasOwnProperty(featureKeys.uploads); // Only set uploads if it was initialised by the account config.
21016
21016
 
21017
21017
  if (newFeaturesHasUpload) {
21018
- const {
21019
- payload: lastParticipantEventPayload
21020
- } = lastParticipantEvent;
21021
- const {
21022
- type: entryType
21023
- } = lastParticipantEventPayload.entry || {};
21018
+ var _lastParticipantEvent, _lastParticipantEvent2;
21019
+
21020
+ const entryType = lastParticipantEvent === null || lastParticipantEvent === void 0 ? void 0 : (_lastParticipantEvent = lastParticipantEvent.payload) === null || _lastParticipantEvent === void 0 ? void 0 : (_lastParticipantEvent2 = _lastParticipantEvent.entry) === null || _lastParticipantEvent2 === void 0 ? void 0 : _lastParticipantEvent2.type;
21024
21021
  newFeatures = seamly_utils_objectSpread(seamly_utils_objectSpread({}, newFeatures), {}, {
21025
21022
  uploads: {
21026
21023
  enabled: !!(uploads && uploads.enabled),
@@ -24649,45 +24646,48 @@ function useTranslationsContainer() {
24649
24646
 
24650
24647
 
24651
24648
 
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;
24649
+ function translations_middleware_createMiddleware({
24650
+ dispatch,
24651
+ getState
24652
+ }) {
24653
+ return next => {
24654
+ return action => {
24655
+ var _action$history, _action$history$trans, _action$initialState, _action$initialState$, _action$event, _action$event$payload, _action$event$payload2;
24658
24656
 
24659
- const result = next(action);
24657
+ const result = next(action);
24660
24658
 
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
- }
24659
+ switch (action.type) {
24660
+ case String(seamlyActions.SET_HISTORY):
24661
+ 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) {
24662
+ dispatch(enable(action.history.translation.locale));
24663
+ dispatch(setLocale(action.history.translation.locale));
24664
+ }
24666
24665
 
24667
- break;
24666
+ break;
24668
24667
 
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
- }
24668
+ case String(seamlyActions.SET_INITIAL_STATE):
24669
+ if ((_action$initialState = action.initialState) !== null && _action$initialState !== void 0 && (_action$initialState$ = _action$initialState.translation) !== null && _action$initialState$ !== void 0 && _action$initialState$.enabled) {
24670
+ dispatch(enable(action.initialState.translation.locale));
24671
+ dispatch(setLocale(action.locale));
24672
+ }
24674
24673
 
24675
- break;
24674
+ break;
24676
24675
 
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
- }
24676
+ case String(seamlyActions.ADD_EVENT):
24677
+ 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) {
24678
+ dispatch(setLocale(action.event.payload.body.translationLocale));
24679
+ }
24681
24680
 
24682
- break;
24681
+ break;
24683
24682
 
24684
- case String(disable):
24685
- const initialLocale = selectInitialLocale(getState());
24686
- dispatch(setLocale(initialLocale));
24687
- break;
24688
- }
24683
+ case String(disable):
24684
+ const initialLocale = selectInitialLocale(getState());
24685
+ dispatch(setLocale(initialLocale));
24686
+ break;
24687
+ }
24689
24688
 
24690
- return result;
24689
+ return result;
24690
+ };
24691
24691
  };
24692
24692
  }
24693
24693
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/reducer.js
@@ -33406,12 +33406,11 @@ var Socket = class {
33406
33406
  onConnClose(event) {
33407
33407
  var _context26;
33408
33408
 
33409
- let closeCode = event && event.code;
33410
33409
  if (this.hasLogger()) this.log("transport", "close", event);
33411
33410
  this.triggerChanError();
33412
33411
  clearTimeout(this.heartbeatTimer);
33413
33412
 
33414
- if (!this.closeWasClean && closeCode !== 1e3) {
33413
+ if (!this.closeWasClean) {
33415
33414
  this.reconnectTimer.scheduleTimeout();
33416
33415
  }
33417
33416
 
@@ -34529,7 +34528,7 @@ function store_createStore({
34529
34528
  api
34530
34529
  }), options_middleware_createMiddleware({
34531
34530
  api
34532
- }), translations_middleware_createMiddleware()]
34531
+ }), translations_middleware_createMiddleware]
34533
34532
  });
34534
34533
  return store;
34535
34534
  }