stream-chat-react 10.22.2 → 10.22.3

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.
@@ -38641,6 +38641,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
38641
38641
  currentTrigger: null,
38642
38642
  data: null,
38643
38643
  dataLoading: false,
38644
+ isComposing: false,
38644
38645
  left: null,
38645
38646
  selectionEnd: 0,
38646
38647
  selectionStart: 0,
@@ -38664,22 +38665,21 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
38664
38665
  SuggestionItem = _this$props7.SuggestionItem,
38665
38666
  _this$props7$Suggesti = _this$props7.SuggestionList,
38666
38667
  SuggestionList = _this$props7$Suggesti === void 0 ? List$1 : _this$props7$Suggesti;
38668
+ var isComposing = this.state.isComposing;
38667
38669
  var triggerProps = this.getTriggerProps();
38668
- if (triggerProps.values && triggerProps.currentTrigger && !(disableMentions && triggerProps.currentTrigger === '@')) {
38669
- return /*#__PURE__*/React__default["default"].createElement("div", {
38670
- className: clsx('rta__autocomplete', 'str-chat__suggestion-list-container', dropdownClassName),
38671
- ref: this.setDropdownRef,
38672
- style: dropdownStyle
38673
- }, /*#__PURE__*/React__default["default"].createElement(SuggestionList, _extendsExports({
38674
- className: clsx('str-chat__suggestion-list', listClassName),
38675
- dropdownScroll: this._dropdownScroll,
38676
- itemClassName: clsx('str-chat__suggestion-list-item', itemClassName),
38677
- itemStyle: itemStyle,
38678
- onSelect: this._onSelect,
38679
- SuggestionItem: SuggestionItem
38680
- }, triggerProps)));
38681
- }
38682
- return null;
38670
+ if (isComposing || !triggerProps.values || !triggerProps.currentTrigger || disableMentions && triggerProps.currentTrigger === '@') return null;
38671
+ return /*#__PURE__*/React__default["default"].createElement("div", {
38672
+ className: clsx('rta__autocomplete', 'str-chat__suggestion-list-container', dropdownClassName),
38673
+ ref: this.setDropdownRef,
38674
+ style: dropdownStyle
38675
+ }, /*#__PURE__*/React__default["default"].createElement(SuggestionList, _extendsExports({
38676
+ className: clsx('str-chat__suggestion-list', listClassName),
38677
+ dropdownScroll: this._dropdownScroll,
38678
+ itemClassName: clsx('str-chat__suggestion-list-item', itemClassName),
38679
+ itemStyle: itemStyle,
38680
+ onSelect: this._onSelect,
38681
+ SuggestionItem: SuggestionItem
38682
+ }, triggerProps)));
38683
38683
  }
38684
38684
  }, {
38685
38685
  key: "render",
@@ -38731,6 +38731,20 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
38731
38731
  _this2._onClickAndBlurHandler(e);
38732
38732
  _onClick === null || _onClick === void 0 ? void 0 : _onClick(e);
38733
38733
  },
38734
+ onCompositionEnd: function onCompositionEnd() {
38735
+ return _this2.setState(function (pv) {
38736
+ return _objectSpread(_objectSpread({}, pv), {}, {
38737
+ isComposing: false
38738
+ });
38739
+ });
38740
+ },
38741
+ onCompositionStart: function onCompositionStart() {
38742
+ return _this2.setState(function (pv) {
38743
+ return _objectSpread(_objectSpread({}, pv), {}, {
38744
+ isComposing: true
38745
+ });
38746
+ });
38747
+ },
38734
38748
  onFocus: function onFocus(e) {
38735
38749
  var _this2$props$onFocus, _this2$props;
38736
38750
  (_this2$props$onFocus = (_this2$props = _this2.props).onFocus) === null || _this2$props$onFocus === void 0 ? void 0 : _this2$props$onFocus.call(_this2$props, e);
@@ -47790,7 +47804,7 @@ var StreamChatReact = (function (exports, React$2, streamChat, ReactDOM) {
47790
47804
 
47791
47805
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};
47792
47806
 
47793
- window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.22.2';
47807
+ window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var version$1 = '10.22.3';
47794
47808
 
47795
47809
  window.StreamChat.StreamChat=StreamChat;window.StreamChat.logChatPromiseExecution=logChatPromiseExecution;window.StreamChat.Channel=Channel;window.ICAL=window.ICAL||{};var useChat = function (_a) {
47796
47810
  var _b, _c;