whyuzeim 1.1.23 → 1.1.25

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,11 +12,11 @@ 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');
19
18
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
19
+ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
20
20
  var React = require('react');
21
21
  var agoraChatUikit = require('agora-chat-uikit');
22
22
  var jsrsasign = require('jsrsasign');
@@ -138,11 +138,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
138
138
  };
139
139
  var _renderMessage = function renderMessage(msg) {
140
140
  var cuiScrollList = document.querySelector(".cui-scrollList div");
141
- console.log(_JSON$stringify(msg), 'fdsfsfsd');
142
141
  var generatingLoader = document.querySelector("#agent-generating-loader");
143
- if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) {
144
- cuiScrollList.removeChild(generatingLoader);
145
- }
142
+ if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) ;
146
143
  if (msg.type === "txt") {
147
144
  return renderTxtMsg(msg);
148
145
  } else if (msg.type === "img") {
@@ -452,6 +449,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
452
449
  return _ref4.apply(this, arguments);
453
450
  };
454
451
  }();
452
+ React.useEffect(function () {
453
+ console.log(_JSON$stringify(currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.lastMessage), 'fdsfsfs');
454
+ }, [currentConversation]);
455
455
  return /*#__PURE__*/React.createElement("div", {
456
456
  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")
457
457
  }, loading ? /*#__PURE__*/React.createElement("div", {
@@ -10,11 +10,11 @@ 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';
17
16
  import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
17
+ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
18
18
  import React, { useRef, useContext, useState, useCallback, useEffect } from 'react';
19
19
  import { useClient, useSDK, rootStore, MessageList, MessageInput, ImageMessage, FileMessage, VideoMessage, BaseMessage } from 'agora-chat-uikit';
20
20
  import jsrsasign from 'jsrsasign';
@@ -136,11 +136,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
136
136
  };
137
137
  var _renderMessage = function renderMessage(msg) {
138
138
  var cuiScrollList = document.querySelector(".cui-scrollList div");
139
- console.log(_JSON$stringify(msg), 'fdsfsfsd');
140
139
  var generatingLoader = document.querySelector("#agent-generating-loader");
141
- if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) {
142
- cuiScrollList.removeChild(generatingLoader);
143
- }
140
+ if (cuiScrollList && generatingLoader && msg.to !== (currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.conversationId)) ;
144
141
  if (msg.type === "txt") {
145
142
  return renderTxtMsg(msg);
146
143
  } else if (msg.type === "img") {
@@ -450,6 +447,9 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
450
447
  return _ref4.apply(this, arguments);
451
448
  };
452
449
  }();
450
+ useEffect(function () {
451
+ console.log(_JSON$stringify(currentConversation === null || currentConversation === void 0 ? void 0 : currentConversation.lastMessage), 'fdsfsfs');
452
+ }, [currentConversation]);
453
453
  return /*#__PURE__*/React.createElement("div", {
454
454
  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")
455
455
  }, loading ? /*#__PURE__*/React.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whyuzeim",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "description": "im componenets",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",