stream-chat-react 10.8.0 → 10.8.1

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.
@@ -38091,6 +38091,12 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
38091
38091
 
38092
38092
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
38093
38093
 
38094
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var isSafari = function () {
38095
+ if (typeof navigator === 'undefined')
38096
+ return false;
38097
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent || '');
38098
+ };
38099
+
38094
38100
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var _excluded$2 = ["onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onScroll", "onSelect"];
38095
38101
  function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
38096
38102
  function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { definePropertyExports(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -38468,7 +38474,13 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
38468
38474
  // that was actually clicked. If we clicked inside the auto-select dropdown, then
38469
38475
  // that's not a blur, from the auto-select point of view, so then do nothing.
38470
38476
  var el = e.relatedTarget;
38471
- if (_this.dropdownRef && el instanceof Node && _this.dropdownRef.contains(el)) {
38477
+ // If this is a blur event in Safari, then relatedTarget is never a dropdown item, but a common parent
38478
+ // of textarea and dropdown container. That means that dropdownRef will not contain its parent and the
38479
+ // autocomplete will be closed before onclick handler can be invoked selecting an item.
38480
+ // It seems that Safari has different implementation determining the relatedTarget node than Chrome and Firefox.
38481
+ // Therefore, if focused away in Safari, the dropdown will be kept rendered until pressing Esc or selecting and item from it.
38482
+ var focusedAwayInSafari = isSafari() && e.type === 'blur';
38483
+ if (_this.dropdownRef && el instanceof Node && _this.dropdownRef.contains(el) || focusedAwayInSafari) {
38472
38484
  return;
38473
38485
  }
38474
38486
  if (closeOnClickOutside) _this._closeAutocomplete();
@@ -48503,7 +48515,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
48503
48515
 
48504
48516
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
48505
48517
 
48506
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.8.0';
48518
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.8.1';
48507
48519
 
48508
48520
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
48509
48521
  var _b, _c;