@xapp/chat-widget 1.68.0 → 1.70.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.
package/dist/index.js CHANGED
@@ -30217,15 +30217,21 @@ var ChatWidget = function (props) {
30217
30217
  // if (get("opened")) {
30218
30218
  // setVisible(true);
30219
30219
  // }
30220
- // We need this to minimize
30221
- setVisible(chatState.visuals.opened);
30220
+ if (chatState.visuals.opened) {
30221
+ setVisible(true);
30222
+ }
30223
+ else {
30224
+ if (mode === "normal") {
30225
+ setVisible(false);
30226
+ }
30227
+ }
30222
30228
  if (patternExist && patternMatches) {
30223
30229
  setVisible(true);
30224
30230
  }
30225
30231
  if (currentWidth < +configWidth) {
30226
30232
  setVisible(false);
30227
30233
  }
30228
- }, [currentWidth, patternExist, patternMatches, configWidth, setVisible, chatState.visuals.opened]);
30234
+ }, [currentWidth, patternExist, patternMatches, configWidth, setVisible, chatState.visuals.opened, mode]);
30229
30235
  function handleOnChange() {
30230
30236
  if (!typing) {
30231
30237
  dispatch(sendTyping(true));