whyuzeim 1.1.12 → 1.1.13
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.
- package/cjs/ChatBox/index.js +3 -1
- package/cjs/IM/style/index.scss +3 -1
- package/cjs/Icon/avatar_default.svg.js +5 -0
- package/cjs/Sidebar/CustomConversationItem/index.js +3 -2
- package/cjs/Sidebar/Searchbox/index.d.ts +1 -0
- package/cjs/Sidebar/Searchbox/index.js +2 -0
- package/cjs/Sidebar/index.d.ts +1 -0
- package/cjs/Sidebar/index.js +10 -1
- package/es/ChatBox/index.js +5 -3
- package/es/IM/style/index.scss +3 -1
- package/es/Icon/avatar_default.svg.js +3 -0
- package/es/Sidebar/CustomConversationItem/index.js +3 -2
- package/es/Sidebar/Searchbox/index.d.ts +1 -0
- package/es/Sidebar/Searchbox/index.js +2 -0
- package/es/Sidebar/index.d.ts +1 -0
- package/es/Sidebar/index.js +10 -1
- package/package.json +1 -1
package/cjs/ChatBox/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var index = require('./JoinGroupDialog/index.js');
|
|
|
24
24
|
var index$1 = require('../AddMember/index.js');
|
|
25
25
|
var type = require('../type.js');
|
|
26
26
|
var tools = require('../tools.js');
|
|
27
|
+
var avatar_default = require('../Icon/avatar_default.svg.js');
|
|
27
28
|
|
|
28
29
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(t), true)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -271,6 +272,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
271
272
|
};
|
|
272
273
|
}();
|
|
273
274
|
var customHeader = function customHeader() {
|
|
275
|
+
var _headerInfo$headerIma;
|
|
274
276
|
var menuNode = /*#__PURE__*/React.createElement("ul", {
|
|
275
277
|
className: "yuze-header-more"
|
|
276
278
|
}, agoraChatUikit.rootStore.conversationStore.currentCvs.chatType === "groupChat" && /*#__PURE__*/React.createElement("li", {
|
|
@@ -331,7 +333,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
331
333
|
onBack && onBack();
|
|
332
334
|
}
|
|
333
335
|
}), !mobile && /*#__PURE__*/React.createElement("img", {
|
|
334
|
-
src: headerInfo.headerImageURL,
|
|
336
|
+
src: (_headerInfo$headerIma = headerInfo.headerImageURL) !== null && _headerInfo$headerIma !== void 0 ? _headerInfo$headerIma : avatar_default,
|
|
335
337
|
className: "w-12 h-12 ".concat(headerInfo.chatType === "groupChat" ? "rounded-md" : "rounded-full", " bg-blue")
|
|
336
338
|
}), !mobile && /*#__PURE__*/React.createElement("div", {
|
|
337
339
|
className: "flex flex-col overflow-hidden mx-5 flex-1"
|
package/cjs/IM/style/index.scss
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--im-group-join-cancel-line: rgba(0, 0, 0 0.9);
|
|
23
23
|
|
|
24
24
|
//override
|
|
25
|
-
--im-msg-bubble-color-left:
|
|
25
|
+
--im-msg-bubble-color-left: rgba(89, 191, 249, 0.2);
|
|
26
26
|
--im-msg-bubble-color-right: rgba(0, 0, 0, 0.05);
|
|
27
27
|
--im-msg-bubble-font-color: rgba(0, 0, 0, 0.7);
|
|
28
28
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
--im-member-remark-owner-backgroundColor: rgba(0, 0, 0, 0.9);
|
|
32
32
|
--im-member-remark-admin-backgroundColor: rgba(0, 0, 0, 0.6);
|
|
33
33
|
|
|
34
|
+
--im-highlight-blue-color: rgba(89, 191, 249, 0.2);
|
|
35
|
+
|
|
34
36
|
.cui-textarea-input {
|
|
35
37
|
color: var(--im-five-fontColor);
|
|
36
38
|
background-color: var(--im-main-bg-five);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var img = "data:image/svg+xml,%3csvg width='128' height='128' viewBox='0 0 128 128' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cforeignObject x='-1' y='-1' width='130' height='130'%3e%3cdiv xmlns='http://www.w3.org/1999/xhtml' style='backdrop-filter:blur(0.5px)%3bclip-path:url(%23bgblur_0_8293_30895_clip_path)%3bheight:100%25%3bwidth:100%25'%3e%3c/div%3e%3c/foreignObject%3e%3crect data-figma-bg-blur-radius='1' width='128' height='128' rx='4' fill='white' fill-opacity='0.05'/%3e%3cdefs%3e%3cclipPath id='bgblur_0_8293_30895_clip_path' transform='translate(1 1)'%3e%3crect width='128' height='128' rx='4'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
4
|
+
|
|
5
|
+
module.exports = img;
|
|
@@ -20,6 +20,7 @@ var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
|
20
20
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
21
21
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
22
22
|
var React = require('react');
|
|
23
|
+
var avatar_default = require('../../Icon/avatar_default.svg.js');
|
|
23
24
|
require('./style/index.scss');
|
|
24
25
|
var agoraChatUikit = require('agora-chat-uikit');
|
|
25
26
|
var context = require('../../IM/context.js');
|
|
@@ -173,12 +174,12 @@ var CustomConversationItem = function CustomConversationItem(props) {
|
|
|
173
174
|
};
|
|
174
175
|
}();
|
|
175
176
|
return canShow ? /*#__PURE__*/React.createElement(agoraChatUikit.ConversationItem, {
|
|
176
|
-
className: "yuze-conversationItem",
|
|
177
|
+
className: "yuze-conversationItem cursor-pointer ".concat(cvs.conversationId === agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId ? 'bg-[var(--im-highlight-blue-color)]' : ''),
|
|
177
178
|
avatar: /*#__PURE__*/React.createElement("div", {
|
|
178
179
|
className: "yuze-conversationItem-avatar relative"
|
|
179
180
|
}, /*#__PURE__*/React.createElement(agoraChatUikit.Avatar, {
|
|
180
181
|
shape: cvs.chatType === "groupChat" ? "square" : "circle",
|
|
181
|
-
src: avatar,
|
|
182
|
+
src: avatar !== null && avatar !== void 0 ? avatar : avatar_default,
|
|
182
183
|
style: {
|
|
183
184
|
background: "transparent"
|
|
184
185
|
}
|
|
@@ -149,6 +149,7 @@ var Searchbox = function Searchbox(props) {
|
|
|
149
149
|
chatType: "singleChat",
|
|
150
150
|
name: item.name
|
|
151
151
|
});
|
|
152
|
+
props.searchItemClick && props.searchItemClick(item.id.toLowerCase(), "singleChat");
|
|
152
153
|
},
|
|
153
154
|
rightNode: /*#__PURE__*/React.createElement("img", {
|
|
154
155
|
src: ic_messages
|
|
@@ -181,6 +182,7 @@ var Searchbox = function Searchbox(props) {
|
|
|
181
182
|
chatType: "groupChat",
|
|
182
183
|
name: item.name
|
|
183
184
|
});
|
|
185
|
+
props.searchItemClick && props.searchItemClick(item.sendbirdid, "groupChat");
|
|
184
186
|
},
|
|
185
187
|
rightNode: /*#__PURE__*/React.createElement("img", {
|
|
186
188
|
src: ic_messages
|
package/cjs/Sidebar/index.d.ts
CHANGED
package/cjs/Sidebar/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var index$2 = require('./CustomConversationItem/index.js');
|
|
|
29
29
|
var index = require('../IM/MobileHeader/index.js');
|
|
30
30
|
|
|
31
31
|
var Sidebar = function Sidebar(props) {
|
|
32
|
+
var _props$className;
|
|
32
33
|
var _useState = React.useState(false),
|
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
34
35
|
openCreateGroup = _useState2[0],
|
|
@@ -143,6 +144,14 @@ var Sidebar = function Sidebar(props) {
|
|
|
143
144
|
}), /*#__PURE__*/React.createElement(index$3, {
|
|
144
145
|
style: {
|
|
145
146
|
display: componentType !== "search" ? "none" : "block"
|
|
147
|
+
},
|
|
148
|
+
searchItemClick: function searchItemClick(conversationId, chattype) {
|
|
149
|
+
if (props.onConversationItemClick) {
|
|
150
|
+
var tempCVS = agoraChatUikit.rootStore.conversationStore.getConversation(chattype === 'singleChat' ? "singleChat" : "groupChat", conversationId);
|
|
151
|
+
if (tempCVS) {
|
|
152
|
+
props.onConversationItemClick(tempCVS);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
146
155
|
}
|
|
147
156
|
}), /*#__PURE__*/React.createElement(index$4, {
|
|
148
157
|
ref: mobileCreateGroup,
|
|
@@ -278,7 +287,7 @@ var Sidebar = function Sidebar(props) {
|
|
|
278
287
|
}
|
|
279
288
|
};
|
|
280
289
|
return /*#__PURE__*/React.createElement("div", {
|
|
281
|
-
className: "yuze-conversationList h-full",
|
|
290
|
+
className: "yuze-conversationList h-full ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : ''),
|
|
282
291
|
onMouseLeave: function onMouseLeave() {
|
|
283
292
|
!mobile && canSidebarExpand && componentType === "default" && userInfo.uid && setSidebarExpand && setSidebarExpand(false);
|
|
284
293
|
},
|
package/es/ChatBox/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
|
14
14
|
import React, { useContext, useState, useEffect } from 'react';
|
|
15
15
|
import { useClient, rootStore, Chat, MessageList, Tooltip, ImageMessage, FileMessage, VideoMessage, AudioMessage, BaseMessage, TextMessage } from 'agora-chat-uikit';
|
|
16
16
|
import './style/index.scss';
|
|
17
|
-
import img$
|
|
17
|
+
import img$2 from './image/ic_more.svg.js';
|
|
18
18
|
import img from './image/ic_chat_back.svg.js';
|
|
19
19
|
import { Context } from '../IM/context.js';
|
|
20
20
|
import { Modal, Button, message } from 'antd';
|
|
@@ -22,6 +22,7 @@ import JoinGroupDialog from './JoinGroupDialog/index.js';
|
|
|
22
22
|
import AddMember from '../AddMember/index.js';
|
|
23
23
|
import { commonMessageInputConfig, commonMessageProps } from '../type.js';
|
|
24
24
|
import { reportAgentInUse, reportAgentMsg } from '../tools.js';
|
|
25
|
+
import img$1 from '../Icon/avatar_default.svg.js';
|
|
25
26
|
|
|
26
27
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
28
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(t), true)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -269,6 +270,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
269
270
|
};
|
|
270
271
|
}();
|
|
271
272
|
var customHeader = function customHeader() {
|
|
273
|
+
var _headerInfo$headerIma;
|
|
272
274
|
var menuNode = /*#__PURE__*/React.createElement("ul", {
|
|
273
275
|
className: "yuze-header-more"
|
|
274
276
|
}, rootStore.conversationStore.currentCvs.chatType === "groupChat" && /*#__PURE__*/React.createElement("li", {
|
|
@@ -329,7 +331,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
329
331
|
onBack && onBack();
|
|
330
332
|
}
|
|
331
333
|
}), !mobile && /*#__PURE__*/React.createElement("img", {
|
|
332
|
-
src: headerInfo.headerImageURL,
|
|
334
|
+
src: (_headerInfo$headerIma = headerInfo.headerImageURL) !== null && _headerInfo$headerIma !== void 0 ? _headerInfo$headerIma : img$1,
|
|
333
335
|
className: "w-12 h-12 ".concat(headerInfo.chatType === "groupChat" ? "rounded-md" : "rounded-full", " bg-blue")
|
|
334
336
|
}), !mobile && /*#__PURE__*/React.createElement("div", {
|
|
335
337
|
className: "flex flex-col overflow-hidden mx-5 flex-1"
|
|
@@ -362,7 +364,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
362
364
|
color: "var(--im-main-backgroundColor)"
|
|
363
365
|
}
|
|
364
366
|
}, /*#__PURE__*/React.createElement("img", {
|
|
365
|
-
src: img$
|
|
367
|
+
src: img$2,
|
|
366
368
|
className: "cursor-pointer"
|
|
367
369
|
})), contextHolder));
|
|
368
370
|
};
|
package/es/IM/style/index.scss
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--im-group-join-cancel-line: rgba(0, 0, 0 0.9);
|
|
23
23
|
|
|
24
24
|
//override
|
|
25
|
-
--im-msg-bubble-color-left:
|
|
25
|
+
--im-msg-bubble-color-left: rgba(89, 191, 249, 0.2);
|
|
26
26
|
--im-msg-bubble-color-right: rgba(0, 0, 0, 0.05);
|
|
27
27
|
--im-msg-bubble-font-color: rgba(0, 0, 0, 0.7);
|
|
28
28
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
--im-member-remark-owner-backgroundColor: rgba(0, 0, 0, 0.9);
|
|
32
32
|
--im-member-remark-admin-backgroundColor: rgba(0, 0, 0, 0.6);
|
|
33
33
|
|
|
34
|
+
--im-highlight-blue-color: rgba(89, 191, 249, 0.2);
|
|
35
|
+
|
|
34
36
|
.cui-textarea-input {
|
|
35
37
|
color: var(--im-five-fontColor);
|
|
36
38
|
background-color: var(--im-main-bg-five);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var img = "data:image/svg+xml,%3csvg width='128' height='128' viewBox='0 0 128 128' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cforeignObject x='-1' y='-1' width='130' height='130'%3e%3cdiv xmlns='http://www.w3.org/1999/xhtml' style='backdrop-filter:blur(0.5px)%3bclip-path:url(%23bgblur_0_8293_30895_clip_path)%3bheight:100%25%3bwidth:100%25'%3e%3c/div%3e%3c/foreignObject%3e%3crect data-figma-bg-blur-radius='1' width='128' height='128' rx='4' fill='white' fill-opacity='0.05'/%3e%3cdefs%3e%3cclipPath id='bgblur_0_8293_30895_clip_path' transform='translate(1 1)'%3e%3crect width='128' height='128' rx='4'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
2
|
+
|
|
3
|
+
export { img as default };
|
|
@@ -18,6 +18,7 @@ import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
|
18
18
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
19
19
|
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
20
20
|
import React, { useContext, useState, useEffect } from 'react';
|
|
21
|
+
import img from '../../Icon/avatar_default.svg.js';
|
|
21
22
|
import './style/index.scss';
|
|
22
23
|
import { useConversationContext, useClient, rootStore, ConversationItem, Avatar } from 'agora-chat-uikit';
|
|
23
24
|
import { Context } from '../../IM/context.js';
|
|
@@ -171,12 +172,12 @@ var CustomConversationItem = function CustomConversationItem(props) {
|
|
|
171
172
|
};
|
|
172
173
|
}();
|
|
173
174
|
return canShow ? /*#__PURE__*/React.createElement(ConversationItem, {
|
|
174
|
-
className: "yuze-conversationItem",
|
|
175
|
+
className: "yuze-conversationItem cursor-pointer ".concat(cvs.conversationId === rootStore.conversationStore.currentCvs.conversationId ? 'bg-[var(--im-highlight-blue-color)]' : ''),
|
|
175
176
|
avatar: /*#__PURE__*/React.createElement("div", {
|
|
176
177
|
className: "yuze-conversationItem-avatar relative"
|
|
177
178
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
178
179
|
shape: cvs.chatType === "groupChat" ? "square" : "circle",
|
|
179
|
-
src: avatar,
|
|
180
|
+
src: avatar !== null && avatar !== void 0 ? avatar : img,
|
|
180
181
|
style: {
|
|
181
182
|
background: "transparent"
|
|
182
183
|
}
|
|
@@ -147,6 +147,7 @@ var Searchbox = function Searchbox(props) {
|
|
|
147
147
|
chatType: "singleChat",
|
|
148
148
|
name: item.name
|
|
149
149
|
});
|
|
150
|
+
props.searchItemClick && props.searchItemClick(item.id.toLowerCase(), "singleChat");
|
|
150
151
|
},
|
|
151
152
|
rightNode: /*#__PURE__*/React.createElement("img", {
|
|
152
153
|
src: img
|
|
@@ -179,6 +180,7 @@ var Searchbox = function Searchbox(props) {
|
|
|
179
180
|
chatType: "groupChat",
|
|
180
181
|
name: item.name
|
|
181
182
|
});
|
|
183
|
+
props.searchItemClick && props.searchItemClick(item.sendbirdid, "groupChat");
|
|
182
184
|
},
|
|
183
185
|
rightNode: /*#__PURE__*/React.createElement("img", {
|
|
184
186
|
src: img
|
package/es/Sidebar/index.d.ts
CHANGED
package/es/Sidebar/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import CustomConversationItem from './CustomConversationItem/index.js';
|
|
|
27
27
|
import MobileHeader from '../IM/MobileHeader/index.js';
|
|
28
28
|
|
|
29
29
|
var Sidebar = function Sidebar(props) {
|
|
30
|
+
var _props$className;
|
|
30
31
|
var _useState = useState(false),
|
|
31
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
33
|
openCreateGroup = _useState2[0],
|
|
@@ -141,6 +142,14 @@ var Sidebar = function Sidebar(props) {
|
|
|
141
142
|
}), /*#__PURE__*/React.createElement(Searchbox, {
|
|
142
143
|
style: {
|
|
143
144
|
display: componentType !== "search" ? "none" : "block"
|
|
145
|
+
},
|
|
146
|
+
searchItemClick: function searchItemClick(conversationId, chattype) {
|
|
147
|
+
if (props.onConversationItemClick) {
|
|
148
|
+
var tempCVS = rootStore.conversationStore.getConversation(chattype === 'singleChat' ? "singleChat" : "groupChat", conversationId);
|
|
149
|
+
if (tempCVS) {
|
|
150
|
+
props.onConversationItemClick(tempCVS);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
144
153
|
}
|
|
145
154
|
}), /*#__PURE__*/React.createElement(MobileCreateGroup, {
|
|
146
155
|
ref: mobileCreateGroup,
|
|
@@ -276,7 +285,7 @@ var Sidebar = function Sidebar(props) {
|
|
|
276
285
|
}
|
|
277
286
|
};
|
|
278
287
|
return /*#__PURE__*/React.createElement("div", {
|
|
279
|
-
className: "yuze-conversationList h-full",
|
|
288
|
+
className: "yuze-conversationList h-full ".concat((_props$className = props.className) !== null && _props$className !== void 0 ? _props$className : ''),
|
|
280
289
|
onMouseLeave: function onMouseLeave() {
|
|
281
290
|
!mobile && canSidebarExpand && componentType === "default" && userInfo.uid && setSidebarExpand && setSidebarExpand(false);
|
|
282
291
|
},
|