whyuzeim 1.1.35 → 1.1.37

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.
@@ -12,7 +12,6 @@ var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/esm/asyncToGener
12
12
  var _defineProperty = require('@babel/runtime-corejs3/helpers/esm/defineProperty');
13
13
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/esm/slicedToArray');
14
14
  var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
15
- var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
16
15
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
17
16
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
18
17
  var _setInterval = require('@babel/runtime-corejs3/core-js-stable/set-interval');
@@ -39,8 +38,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
39
38
  MessageSDK = _useSDK.ChatSDK;
40
39
  var manulLoginRef = React.useRef(false);
41
40
  var _useConversationConte = agoraChatUikit.useConversationContext(),
42
- i = _useConversationConte.currentConversation;
43
- console.log(_JSON$stringify(i), 'dfsfs');
41
+ agoraCurrentConversation = _useConversationConte.currentConversation;
44
42
  var _useContext = React.useContext(context.Context),
45
43
  http = _useContext.http,
46
44
  userInfo = _useContext.userInfo;
@@ -138,9 +136,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
138
136
  }, formatMessageTime(msg.time)));
139
137
  };
140
138
  var _renderMessage = function renderMessage(msg) {
141
- var cuiScrollList = document.querySelector(".cui-scrollList div");
142
- var generatingLoader = document.querySelector("#agent-generating-loader");
143
- if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) ;
144
139
  if (msg.type === "txt") {
145
140
  return renderTxtMsg(msg);
146
141
  } else if (msg.type === "img") {
@@ -434,6 +429,13 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
434
429
  return _ref4.apply(this, arguments);
435
430
  };
436
431
  }();
432
+ React.useEffect(function () {
433
+ var cuiScrollList = document.querySelector(".cui-scrollList div");
434
+ var generatingLoader = document.querySelector("#agent-generating-loader");
435
+ if (cuiScrollList && generatingLoader) {
436
+ cuiScrollList.removeChild(generatingLoader);
437
+ }
438
+ }, [agoraCurrentConversation]);
437
439
  return /*#__PURE__*/React.createElement("div", {
438
440
  className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
439
441
  }, loading ? /*#__PURE__*/React.createElement("div", {
@@ -10,7 +10,6 @@ import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerat
10
10
  import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
11
11
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
12
12
  import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
13
- import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
14
13
  import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
15
14
  import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
16
15
  import _setInterval from '@babel/runtime-corejs3/core-js-stable/set-interval';
@@ -37,8 +36,7 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
37
36
  MessageSDK = _useSDK.ChatSDK;
38
37
  var manulLoginRef = useRef(false);
39
38
  var _useConversationConte = useConversationContext(),
40
- i = _useConversationConte.currentConversation;
41
- console.log(_JSON$stringify(i), 'dfsfs');
39
+ agoraCurrentConversation = _useConversationConte.currentConversation;
42
40
  var _useContext = useContext(Context),
43
41
  http = _useContext.http,
44
42
  userInfo = _useContext.userInfo;
@@ -136,9 +134,6 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
136
134
  }, formatMessageTime(msg.time)));
137
135
  };
138
136
  var _renderMessage = function renderMessage(msg) {
139
- var cuiScrollList = document.querySelector(".cui-scrollList div");
140
- var generatingLoader = document.querySelector("#agent-generating-loader");
141
- if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) ;
142
137
  if (msg.type === "txt") {
143
138
  return renderTxtMsg(msg);
144
139
  } else if (msg.type === "img") {
@@ -432,6 +427,13 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
432
427
  return _ref4.apply(this, arguments);
433
428
  };
434
429
  }();
430
+ useEffect(function () {
431
+ var cuiScrollList = document.querySelector(".cui-scrollList div");
432
+ var generatingLoader = document.querySelector("#agent-generating-loader");
433
+ if (cuiScrollList && generatingLoader) {
434
+ cuiScrollList.removeChild(generatingLoader);
435
+ }
436
+ }, [agoraCurrentConversation]);
435
437
  return /*#__PURE__*/React.createElement("div", {
436
438
  className: "bg-[var(--im-main-backgroundColor)] im-agent-mid ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : "", " w-full h-full overflow-hidden flex flex-col")
437
439
  }, loading ? /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.35",
3
+ "version": "1.1.37",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",