stream-chat-react 11.15.1 → 11.15.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.
@@ -49070,7 +49070,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, ReactDOM, streamC
49070
49070
  return node instanceof OwnElement || node instanceof HTMLElement;
49071
49071
  }
49072
49072
 
49073
- function isShadowRoot(node) {
49073
+ function isShadowRoot$1(node) {
49074
49074
  // IE 11 has no ShadowRoot
49075
49075
  if (typeof ShadowRoot === 'undefined') {
49076
49076
  return false;
@@ -49237,7 +49237,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, ReactDOM, streamC
49237
49237
  if (parent.contains(child)) {
49238
49238
  return true;
49239
49239
  } // then fallback to custom implementation with Shadow DOM support
49240
- else if (rootNode && isShadowRoot(rootNode)) {
49240
+ else if (rootNode && isShadowRoot$1(rootNode)) {
49241
49241
  var next = child;
49242
49242
 
49243
49243
  do {
@@ -49278,7 +49278,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, ReactDOM, streamC
49278
49278
  // $FlowFixMe[prop-missing]
49279
49279
  element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
49280
49280
  element.parentNode || ( // DOM Element detected
49281
- isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
49281
+ isShadowRoot$1(element) ? element.host : null) || // ShadowRoot detected
49282
49282
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
49283
49283
  getDocumentElement(element) // fallback
49284
49284
 
@@ -49312,7 +49312,7 @@ var StreamChatReact = (function (exports, React$2, jsxRuntime, ReactDOM, streamC
49312
49312
 
49313
49313
  var currentNode = getParentNode(element);
49314
49314
 
49315
- if (isShadowRoot(currentNode)) {
49315
+ if (isShadowRoot$1(currentNode)) {
49316
49316
  currentNode = currentNode.host;
49317
49317
  }
49318
49318
 
@@ -73280,7 +73280,7 @@ bitsperframe: %d
73280
73280
 
73281
73281
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
73282
73282
 
73283
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.15.1';
73283
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '11.15.2';
73284
73284
 
73285
73285
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
73286
73286
  var _b, _c;
@@ -73642,7 +73642,8 @@ bitsperframe: %d
73642
73642
 
73643
73643
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
73644
73644
 
73645
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var classNames = {
73645
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var isShadowRoot = function (node) { return !!node.host; };
73646
+ var classNames = {
73646
73647
  1: {
73647
73648
  buttonClassName: 'str-chat__input-flat-emojiselect',
73648
73649
  pickerContainerClassName: undefined,
@@ -73670,8 +73671,11 @@ bitsperframe: %d
73670
73671
  return;
73671
73672
  var handlePointerDown = function (e) {
73672
73673
  var target = e.target;
73673
- if (popperElement.contains(target) || referenceElement.contains(target))
73674
+ var rootNode = target.getRootNode();
73675
+ if (popperElement.contains(isShadowRoot(rootNode) ? rootNode.host : target) ||
73676
+ referenceElement.contains(target)) {
73674
73677
  return;
73678
+ }
73675
73679
  setDisplayPicker(false);
73676
73680
  };
73677
73681
  window.addEventListener('pointerdown', handlePointerDown);