stream-chat-react 10.5.0 → 10.6.0

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.
@@ -47108,7 +47108,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
47108
47108
  };
47109
47109
  /** THREAD */
47110
47110
  var openThread = function (message, event) {
47111
- event.preventDefault();
47111
+ event === null || event === void 0 ? void 0 : event.preventDefault();
47112
47112
  setQuotedMessage(function (current) {
47113
47113
  if ((current === null || current === void 0 ? void 0 : current.parent_id) !== (message === null || message === void 0 ? void 0 : message.parent_id)) {
47114
47114
  return undefined;
@@ -47120,7 +47120,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
47120
47120
  dispatch({ channel: channel, message: message, type: 'openThread' });
47121
47121
  };
47122
47122
  var closeThread = function (event) {
47123
- event.preventDefault();
47123
+ event === null || event === void 0 ? void 0 : event.preventDefault();
47124
47124
  dispatch({ type: 'closeThread' });
47125
47125
  };
47126
47126
  var loadMoreThreadFinished = lodash_debounce(function (threadHasMore, threadMessages) {
@@ -48456,7 +48456,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
48456
48456
 
48457
48457
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
48458
48458
 
48459
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.5.0';
48459
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.6.0';
48460
48460
 
48461
48461
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
48462
48462
  var _b, _c;
@@ -49486,10 +49486,10 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
49486
49486
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
49487
49487
 
49488
49488
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var UnMemoizedCustomNotification = function (props) {
49489
- var active = props.active, children = props.children, type = props.type;
49489
+ var active = props.active, children = props.children, className = props.className, type = props.type;
49490
49490
  if (!active)
49491
49491
  return null;
49492
- return (React__default["default"].createElement("div", { "aria-live": 'polite', className: "str-chat__custom-notification notification-".concat(type, " str-chat__notification"), "data-testid": 'custom-notification' }, children));
49492
+ return (React__default["default"].createElement("div", { "aria-live": 'polite', className: clsx("str-chat__custom-notification notification-".concat(type), "str-chat__notification", className), "data-testid": 'custom-notification' }, children));
49493
49493
  };
49494
49494
  var CustomNotification = React__default["default"].memo(UnMemoizedCustomNotification);
49495
49495
 
@@ -49507,7 +49507,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
49507
49507
  client.on('connection.changed', connectionChanged);
49508
49508
  return function () { return client.off('connection.changed', connectionChanged); };
49509
49509
  }, [client, online]);
49510
- return (React__default["default"].createElement(CustomNotification, { active: !online, type: 'error' }, t('Connection failure, reconnecting now...')));
49510
+ return (React__default["default"].createElement(CustomNotification, { active: !online, className: 'str-chat__connection-status-notification', type: 'error' }, t('Connection failure, reconnecting now...')));
49511
49511
  };
49512
49512
  var ConnectionStatus = React__default["default"].memo(UnMemoizedConnectionStatus);
49513
49513
 
@@ -51638,7 +51638,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
51638
51638
  React__default["default"].createElement("div", { className: 'str-chat__thread-header-details' },
51639
51639
  React__default["default"].createElement("div", { className: 'str-chat__thread-header-title' }, t('Thread')),
51640
51640
  React__default["default"].createElement("div", { className: 'str-chat__thread-header-subtitle' }, displayTitle)),
51641
- React__default["default"].createElement("button", { "aria-label": 'Close thread', className: 'str-chat__square-button str-chat__close-thread-button', "data-testid": 'close-button', onClick: function (event) { return closeThread(event); } },
51641
+ React__default["default"].createElement("button", { "aria-label": 'Close thread', className: 'str-chat__square-button str-chat__close-thread-button', "data-testid": 'close-button', onClick: closeThread },
51642
51642
  React__default["default"].createElement(CloseIcon, null))));
51643
51643
  };
51644
51644
 
@@ -51703,9 +51703,11 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
51703
51703
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
51704
51704
 
51705
51705
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var UnMemoizedWindow = function (props) {
51706
- var children = props.children, _a = props.hideOnThread, hideOnThread = _a === void 0 ? false : _a;
51707
- var thread = useChannelStateContext('Window').thread;
51708
- return (React__default["default"].createElement("div", { className: "str-chat__main-panel ".concat(hideOnThread && thread ? 'str-chat__main-panel--hideOnThread' : '') }, children));
51706
+ var children = props.children, _a = props.hideOnThread, hideOnThread = _a === void 0 ? false : _a, propThread = props.thread;
51707
+ var contextThread = useChannelStateContext('Window').thread;
51708
+ return (React__default["default"].createElement("div", { className: clsx('str-chat__main-panel', {
51709
+ 'str-chat__main-panel--hideOnThread': hideOnThread && (contextThread || propThread),
51710
+ }) }, children));
51709
51711
  };
51710
51712
  /**
51711
51713
  * A UI component for conditionally displaying a Thread or Channel