bhd-components 0.5.6 → 0.5.8

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.
Files changed (115) hide show
  1. package/dist/5764783e.esm.es5.production.js +468 -0
  2. package/dist/f2b01b9c.esm.es5.development.js +167840 -0
  3. package/dist/index.esm.es5.development.css +8467 -0
  4. package/dist/index.esm.es5.development.js +5835 -0
  5. package/dist/index.esm.es5.production.css +1 -0
  6. package/dist/index.esm.es5.production.js +1 -0
  7. package/dist/vendor.esm.es5.development.esm.es5.development.css +117 -0
  8. package/dist/vendor.esm.es5.production.esm.es5.production.css +9 -0
  9. package/es2017/customerService/contactsList/index.d.ts +14 -0
  10. package/es2017/customerService/contactsList/index.js +316 -0
  11. package/es2017/customerService/contactsList/index.module.less +206 -0
  12. package/es2017/customerService/function.d.ts +17 -0
  13. package/es2017/customerService/function.js +72 -0
  14. package/es2017/customerService/historyFun/index.d.ts +14 -0
  15. package/es2017/customerService/historyFun/index.js +276 -0
  16. package/es2017/customerService/historyFun/index.module.less +223 -0
  17. package/es2017/customerService/images/knowledge_icon.png +0 -0
  18. package/es2017/customerService/images/voice_btn.gif +0 -0
  19. package/es2017/customerService/index.d.ts +16 -0
  20. package/es2017/customerService/index.js +2687 -0
  21. package/es2017/customerService/index.module.less +790 -0
  22. package/es2017/customerService/useMediaRecorder.d.ts +9 -0
  23. package/es2017/customerService/useMediaRecorder.js +78 -0
  24. package/es2017/customerService/voice_btn.gif +0 -0
  25. package/es2017/icons/components/custom-ai_icon.d.ts +4 -0
  26. package/es2017/icons/components/custom-ai_icon.js +58 -0
  27. package/es2017/icons/components/custom-contacts.d.ts +4 -0
  28. package/es2017/icons/components/custom-contacts.js +29 -0
  29. package/es2017/icons/components/custom-copy.d.ts +4 -0
  30. package/es2017/icons/components/custom-copy.js +36 -0
  31. package/es2017/icons/components/custom-dislike.d.ts +4 -0
  32. package/es2017/icons/components/custom-dislike.js +22 -0
  33. package/es2017/icons/components/custom-duihao.d.ts +4 -0
  34. package/es2017/icons/components/custom-duihao.js +22 -0
  35. package/es2017/icons/components/custom-exit_full_screen.d.ts +4 -0
  36. package/es2017/icons/components/custom-exit_full_screen.js +26 -0
  37. package/es2017/icons/components/custom-full_screen.d.ts +4 -0
  38. package/es2017/icons/components/custom-full_screen.js +22 -0
  39. package/es2017/icons/components/custom-like.d.ts +4 -0
  40. package/es2017/icons/components/custom-like.js +22 -0
  41. package/es2017/icons/components/custom-quote.d.ts +4 -0
  42. package/es2017/icons/components/custom-quote.js +31 -0
  43. package/es2017/icons/components/custom-record.d.ts +4 -0
  44. package/es2017/icons/components/custom-record.js +37 -0
  45. package/es2017/icons/components/custom-reloading.d.ts +4 -0
  46. package/es2017/icons/components/custom-reloading.js +26 -0
  47. package/es2017/icons/components/custom-retract.d.ts +4 -0
  48. package/es2017/icons/components/custom-retract.js +27 -0
  49. package/es2017/icons/components/custom-round_close.d.ts +4 -0
  50. package/es2017/icons/components/custom-round_close.js +24 -0
  51. package/es2017/icons/components/custom-sending.d.ts +4 -0
  52. package/es2017/icons/components/custom-sending.js +22 -0
  53. package/es2017/icons/components/custom-sound_recording.d.ts +4 -0
  54. package/es2017/icons/components/custom-sound_recording.js +22 -0
  55. package/es2017/icons/components/index.d.ts +15 -0
  56. package/es2017/icons/components/index.js +15 -0
  57. package/es2017/index.d.ts +1 -0
  58. package/es2017/index.js +1 -0
  59. package/esm/customerService/contactsList/index.d.ts +14 -0
  60. package/esm/customerService/contactsList/index.js +333 -0
  61. package/esm/customerService/contactsList/index.module.less +206 -0
  62. package/esm/customerService/function.d.ts +17 -0
  63. package/esm/customerService/function.js +74 -0
  64. package/esm/customerService/historyFun/index.d.ts +14 -0
  65. package/esm/customerService/historyFun/index.js +289 -0
  66. package/esm/customerService/historyFun/index.module.less +223 -0
  67. package/esm/customerService/images/knowledge_icon.png +0 -0
  68. package/esm/customerService/images/voice_btn.gif +0 -0
  69. package/esm/customerService/index.d.ts +16 -0
  70. package/esm/customerService/index.js +2793 -0
  71. package/esm/customerService/index.module.less +790 -0
  72. package/esm/customerService/useMediaRecorder.d.ts +9 -0
  73. package/esm/customerService/useMediaRecorder.js +121 -0
  74. package/esm/customerService/voice_btn.gif +0 -0
  75. package/esm/icons/components/custom-ai_icon.d.ts +4 -0
  76. package/esm/icons/components/custom-ai_icon.js +60 -0
  77. package/esm/icons/components/custom-contacts.d.ts +4 -0
  78. package/esm/icons/components/custom-contacts.js +31 -0
  79. package/esm/icons/components/custom-copy.d.ts +4 -0
  80. package/esm/icons/components/custom-copy.js +38 -0
  81. package/esm/icons/components/custom-dislike.d.ts +4 -0
  82. package/esm/icons/components/custom-dislike.js +24 -0
  83. package/esm/icons/components/custom-duihao.d.ts +4 -0
  84. package/esm/icons/components/custom-duihao.js +24 -0
  85. package/esm/icons/components/custom-exit_full_screen.d.ts +4 -0
  86. package/esm/icons/components/custom-exit_full_screen.js +28 -0
  87. package/esm/icons/components/custom-full_screen.d.ts +4 -0
  88. package/esm/icons/components/custom-full_screen.js +24 -0
  89. package/esm/icons/components/custom-like.d.ts +4 -0
  90. package/esm/icons/components/custom-like.js +24 -0
  91. package/esm/icons/components/custom-quote.d.ts +4 -0
  92. package/esm/icons/components/custom-quote.js +33 -0
  93. package/esm/icons/components/custom-record.d.ts +4 -0
  94. package/esm/icons/components/custom-record.js +39 -0
  95. package/esm/icons/components/custom-reloading.d.ts +4 -0
  96. package/esm/icons/components/custom-reloading.js +28 -0
  97. package/esm/icons/components/custom-retract.d.ts +4 -0
  98. package/esm/icons/components/custom-retract.js +29 -0
  99. package/esm/icons/components/custom-round_close.d.ts +4 -0
  100. package/esm/icons/components/custom-round_close.js +26 -0
  101. package/esm/icons/components/custom-sending.d.ts +4 -0
  102. package/esm/icons/components/custom-sending.js +24 -0
  103. package/esm/icons/components/custom-sound_recording.d.ts +4 -0
  104. package/esm/icons/components/custom-sound_recording.js +24 -0
  105. package/esm/icons/components/index.d.ts +15 -0
  106. package/esm/icons/components/index.js +15 -0
  107. package/esm/index.d.ts +1 -0
  108. package/esm/index.js +1 -0
  109. package/package.json +11 -2
  110. package/dist/1951bd5c.esm.es5.development.js +0 -45417
  111. package/dist/28cd83d3.esm.es5.production.js +0 -256
  112. package/dist/table.esm.es5.development.css +0 -772
  113. package/dist/table.esm.es5.development.js +0 -289
  114. package/dist/table.esm.es5.production.css +0 -1
  115. package/dist/table.esm.es5.production.js +0 -1
@@ -0,0 +1,117 @@
1
+ pre code.hljs {
2
+ display: block;
3
+ overflow-x: auto;
4
+ padding: 1em
5
+ }
6
+ code.hljs {
7
+ padding: 3px 5px
8
+ }
9
+ /*!
10
+ Theme: Default
11
+ Description: Original highlight.js style
12
+ Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
13
+ Maintainer: @highlightjs/core-team
14
+ Website: https://highlightjs.org/
15
+ License: see project LICENSE
16
+ Touched: 2021
17
+ */
18
+ /*
19
+ This is left on purpose making default.css the single file that can be lifted
20
+ as-is from the repository directly without the need for a build step
21
+
22
+ Typically this "required" baseline CSS is added by `makestuff.js` during build.
23
+ */
24
+ pre code.hljs {
25
+ display: block;
26
+ overflow-x: auto;
27
+ padding: 1em
28
+ }
29
+ code.hljs {
30
+ padding: 3px 5px
31
+ }
32
+ /* end baseline CSS */
33
+ .hljs {
34
+ background: #F3F3F3;
35
+ color: #444
36
+ }
37
+ /* Base color: saturation 0; */
38
+ .hljs-subst {
39
+ /* default */
40
+
41
+ }
42
+ /* purposely ignored */
43
+ .hljs-formula,
44
+ .hljs-attr,
45
+ .hljs-property,
46
+ .hljs-params {
47
+
48
+ }
49
+ .hljs-comment {
50
+ color: #697070
51
+ }
52
+ .hljs-tag,
53
+ .hljs-punctuation {
54
+ color: #444a
55
+ }
56
+ .hljs-tag .hljs-name,
57
+ .hljs-tag .hljs-attr {
58
+ color: #444
59
+ }
60
+ .hljs-keyword,
61
+ .hljs-attribute,
62
+ .hljs-selector-tag,
63
+ .hljs-meta .hljs-keyword,
64
+ .hljs-doctag,
65
+ .hljs-name {
66
+ font-weight: bold
67
+ }
68
+ /* User color: hue: 0 */
69
+ .hljs-type,
70
+ .hljs-string,
71
+ .hljs-number,
72
+ .hljs-selector-id,
73
+ .hljs-selector-class,
74
+ .hljs-quote,
75
+ .hljs-template-tag,
76
+ .hljs-deletion {
77
+ color: #880000
78
+ }
79
+ .hljs-title,
80
+ .hljs-section {
81
+ color: #880000;
82
+ font-weight: bold
83
+ }
84
+ .hljs-regexp,
85
+ .hljs-symbol,
86
+ .hljs-variable,
87
+ .hljs-template-variable,
88
+ .hljs-link,
89
+ .hljs-selector-attr,
90
+ .hljs-operator,
91
+ .hljs-selector-pseudo {
92
+ color: #ab5656
93
+ }
94
+ /* Language color: hue: 90; */
95
+ .hljs-literal {
96
+ color: #695
97
+ }
98
+ .hljs-built_in,
99
+ .hljs-bullet,
100
+ .hljs-code,
101
+ .hljs-addition {
102
+ color: #397300
103
+ }
104
+ /* Meta color: hue: 200 */
105
+ .hljs-meta {
106
+ color: #1f7199
107
+ }
108
+ .hljs-meta .hljs-string {
109
+ color: #38a
110
+ }
111
+ /* Misc effects */
112
+ .hljs-emphasis {
113
+ font-style: italic
114
+ }
115
+ .hljs-strong {
116
+ font-weight: bold
117
+ }
@@ -0,0 +1,9 @@
1
+ /*!
2
+ Theme: Default
3
+ Description: Original highlight.js style
4
+ Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
5
+ Maintainer: @highlightjs/core-team
6
+ Website: https://highlightjs.org/
7
+ License: see project LICENSE
8
+ Touched: 2021
9
+ */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ interface data {
3
+ type: number;
4
+ roomId: string;
5
+ userData: any;
6
+ http: any;
7
+ urllocation: String;
8
+ onClose: any;
9
+ switchChatRoom: any;
10
+ saveContactsList: any;
11
+ ref: any;
12
+ }
13
+ declare const ContactsList: import("react").ForwardRefExoticComponent<Omit<data, "ref"> & import("react").RefAttributes<unknown>>;
14
+ export default ContactsList;
@@ -0,0 +1,316 @@
1
+ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
3
+ import React, { useEffect, useState, useRef, useImperativeHandle, forwardRef } from "react";
4
+ import styles from "./index.module.less";
5
+ import { CustomAiIcon, CustomRetract } from "../../icons/index";
6
+ import { CloseOutlined } from "@ant-design/icons";
7
+ import { getDataTime } from "../function"; //录音使用文件
8
+ const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
9
+ let { type , roomId , userData , http , urllocation , onClose , switchChatRoom , saveContactsList } = props;
10
+ const [contactsList, setContactsList] = useState([]); //老师列表
11
+ const [newRoomId, setNewRoomId] = useState("");
12
+ const [firstLoading, setFirstLoading] = useState(true);
13
+ // const [type,setType] = useState(0);
14
+ let timer = useRef(null); //文本框输入时
15
+ //获取聊天室列表
16
+ useEffect(()=>{
17
+ roomsListTimer();
18
+ if (roomId != '') {
19
+ setNewRoomId(roomId);
20
+ }
21
+ return ()=>{
22
+ clearTimeout(timer.current);
23
+ };
24
+ }, []);
25
+ useImperativeHandle(ref, ()=>({
26
+ roomsListTimer: ()=>{
27
+ return roomsListTimer();
28
+ }
29
+ }));
30
+ // useEffect(()=>{
31
+ // //重新调用接口
32
+ // console.log(44444444,contactsList)
33
+ // roomsListTimer();
34
+ // },[type])
35
+ const roomsListTimer = ()=>{
36
+ if (timer != null) clearTimeout(timer.current);
37
+ timer.current = setTimeout(()=>roomsListTimer(), 60000);
38
+ http.get(`${urllocation}/chat-service/public/v1.0/rooms`, {
39
+ params: {
40
+ page: 1,
41
+ maxPageSize: 100002
42
+ },
43
+ headers: {
44
+ "x-module-id": userData.modules.find((ele)=>ele.short == "IntelligentCustomerService").id,
45
+ "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
46
+ }
47
+ }).then((res)=>{
48
+ if (res.data) {
49
+ let list = res.data.contacts;
50
+ // let newMessage = false;
51
+ setContactsList((contactsList)=>{
52
+ list = list.map((item, index)=>{
53
+ let c_list = contactsList.filter((e)=>e.sender == item.sender);
54
+ let obj = {};
55
+ if (c_list.length > 0) {
56
+ obj = c_list[0];
57
+ }
58
+ return _object_spread({}, obj, item);
59
+ });
60
+ return list;
61
+ });
62
+ getUserInfo(list);
63
+ // if(firstLoading){
64
+ // setFirstLoading(false);
65
+ // let isRoom = false;
66
+ // for (let index = 0; index < list.length; index++) {
67
+ // let count = list[index].unreadCount;
68
+ // if(count > 0 && list[index].roomId == roomId){
69
+ // isRoom = true;
70
+ // //在当前窗口
71
+ // return null;
72
+ // }else if(count > 0){
73
+ // isRoom = true;
74
+ // switchChatRoom(list[index].roomId, "");
75
+ // setContactsList((contactsList)=>{
76
+ // let new_list = contactsList;
77
+ // new_list = new_list.map((item)=>{
78
+ // if(item.roomId == list[index].roomId){
79
+ // return {
80
+ // ...item,
81
+ // unreadCount:0,
82
+ // }
83
+ // }else{
84
+ // return item;
85
+ // }
86
+ // })
87
+ // return new_list;
88
+ // })
89
+ // return null;
90
+ // }
91
+ // }
92
+ // }
93
+ saveContactsList(list);
94
+ }
95
+ });
96
+ };
97
+ //删除聊天室
98
+ const deleteRoom = (roomId)=>{
99
+ http.delete(`${urllocation}/chat-service/public/v1.0/rooms/${roomId}`, {
100
+ headers: {
101
+ "x-module-id": userData.modules.find((ele)=>ele.short == "IntelligentCustomerService").id,
102
+ "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
103
+ }
104
+ }).then((res)=>{
105
+ roomsListTimer();
106
+ // let contactsList;
107
+ // setContactsList((list)=>{
108
+ // contactsList = list.filter(e=>e.roomId != roomId);
109
+ // //切换到AI聊天窗口
110
+ // if(roomId == props.roomId){
111
+ // switchChatRoom(contactsList[0].roomId, "");
112
+ // }
113
+ // return contactsList;
114
+ // })
115
+ // saveContactsList(contactsList);
116
+ });
117
+ };
118
+ //获取老师的信息等
119
+ const getUserInfo = (list)=>{
120
+ list.map((item, i)=>{
121
+ if (!item.name && !item.headImg && item.sender != 'AI') {
122
+ getUserName(item.sender).then((res)=>{
123
+ if (res.data) {
124
+ let list;
125
+ setContactsList((contactsList)=>{
126
+ list = contactsList.map((item, index)=>{
127
+ if (item.sender == res.data.uid) {
128
+ return _object_spread({}, item, res.data);
129
+ } else {
130
+ return item;
131
+ }
132
+ });
133
+ return list;
134
+ });
135
+ saveContactsList(list);
136
+ }
137
+ });
138
+ }
139
+ });
140
+ };
141
+ const getUserName = (uid)=>{
142
+ return http.get(`${urllocation}/chat-service/public/v1.0/userinfo`, {
143
+ params: {
144
+ uid: uid
145
+ },
146
+ headers: {
147
+ "x-module-id": userData.modules.find((ele)=>ele.short == "TeacherAnswer").id,
148
+ "x-auth-jwt": window.localStorage.getItem("usertoken") || ""
149
+ }
150
+ });
151
+ };
152
+ return type == 2 || type == 4 ? //联系人展开
153
+ /*#__PURE__*/ _jsxs("div", {
154
+ className: styles.teacher_layout_modal,
155
+ children: [
156
+ /*#__PURE__*/ _jsx("div", {
157
+ className: styles.top,
158
+ children: /*#__PURE__*/ _jsxs("div", {
159
+ className: `${styles.ai} ${contactsList.length > 0 && contactsList[0].roomId != undefined && roomId != '' && contactsList[0].roomId == roomId || contactsList.length == 0 ? styles.active : ""}`,
160
+ onClick: ()=>{
161
+ setNewRoomId(contactsList[0].roomId);
162
+ switchChatRoom(contactsList[0].roomId, "");
163
+ roomsListTimer();
164
+ },
165
+ children: [
166
+ /*#__PURE__*/ _jsx(CustomAiIcon, {}),
167
+ /*#__PURE__*/ _jsxs("div", {
168
+ className: styles.user_info,
169
+ children: [
170
+ /*#__PURE__*/ _jsxs("p", {
171
+ className: styles.message,
172
+ children: [
173
+ "AI助手",
174
+ /*#__PURE__*/ _jsx("span", {
175
+ className: styles.time,
176
+ children: contactsList.length > 0 && getDataTime(contactsList[0].createdAt)
177
+ })
178
+ ]
179
+ }),
180
+ /*#__PURE__*/ _jsx("p", {
181
+ className: styles.con,
182
+ children: contactsList.length > 0 && contactsList[0].lastMsg
183
+ })
184
+ ]
185
+ })
186
+ ]
187
+ })
188
+ }),
189
+ userData.modules.some((item)=>item.short == "TeacherAnswer") ? /*#__PURE__*/ _jsx("div", {
190
+ className: styles.bottom,
191
+ children: contactsList.map((item, index)=>{
192
+ if (index != 0) {
193
+ return /*#__PURE__*/ _jsxs("div", {
194
+ className: `${styles.ai} ${item.roomId != undefined && roomId != '' && item.roomId == roomId ? styles.active : ""}`,
195
+ onClick: ()=>{
196
+ setNewRoomId(item.roomId);
197
+ switchChatRoom(item.roomId, "");
198
+ roomsListTimer();
199
+ },
200
+ children: [
201
+ /*#__PURE__*/ _jsx("img", {
202
+ src: item.headImg
203
+ }),
204
+ /*#__PURE__*/ _jsxs("div", {
205
+ className: styles.user_info,
206
+ children: [
207
+ /*#__PURE__*/ _jsxs("p", {
208
+ className: styles.message,
209
+ children: [
210
+ item.name,
211
+ item.unreadCount != undefined && item.unreadCount > 0 && !(item.roomId != undefined && roomId != '' && item.roomId == roomId) && /*#__PURE__*/ _jsx("span", {
212
+ className: styles.num,
213
+ children: item.unreadCount > 99 ? '99+' : item.unreadCount
214
+ }),
215
+ /*#__PURE__*/ _jsx("span", {
216
+ className: styles.time,
217
+ children: getDataTime(item.createdAt)
218
+ })
219
+ ]
220
+ }),
221
+ /*#__PURE__*/ _jsx("p", {
222
+ className: styles.con,
223
+ children: item.lastMsg
224
+ })
225
+ ]
226
+ })
227
+ ]
228
+ }, item.roomId);
229
+ } else {
230
+ return null;
231
+ }
232
+ })
233
+ }) : ''
234
+ ]
235
+ }) : /*#__PURE__*/ _jsxs("div", {
236
+ className: `${styles.teacher_layout} ${type == 3 ? styles.teacher_layout_newlabo : ""}`,
237
+ style: {
238
+ left: type == 3 ? document.getElementById("box").offsetWidth + 10 + "px" : "auto"
239
+ },
240
+ children: [
241
+ /*#__PURE__*/ _jsxs("div", {
242
+ className: styles.top,
243
+ children: [
244
+ /*#__PURE__*/ _jsxs("div", {
245
+ className: `${styles.ai} ${styles.shrink}`,
246
+ onClick: ()=>{
247
+ onClose();
248
+ },
249
+ children: [
250
+ /*#__PURE__*/ _jsx(CustomRetract, {}),
251
+ /*#__PURE__*/ _jsx("p", {
252
+ style: {
253
+ marginTop: '8px'
254
+ },
255
+ children: "收起"
256
+ })
257
+ ]
258
+ }),
259
+ /*#__PURE__*/ _jsxs("div", {
260
+ className: `${styles.ai} ${contactsList.length > 0 && contactsList[0].roomId != undefined && roomId != '' && contactsList[0].roomId == roomId || contactsList.length == 0 ? styles.active : ""}`,
261
+ onClick: ()=>{
262
+ setNewRoomId(contactsList[0].roomId);
263
+ switchChatRoom(contactsList[0].roomId, "");
264
+ roomsListTimer();
265
+ },
266
+ children: [
267
+ /*#__PURE__*/ _jsx(CustomAiIcon, {}),
268
+ /*#__PURE__*/ _jsx("p", {
269
+ children: "AI助手"
270
+ })
271
+ ]
272
+ })
273
+ ]
274
+ }),
275
+ userData.modules.some((item)=>item.short == "TeacherAnswer") && /*#__PURE__*/ _jsx("div", {
276
+ className: styles.bottom,
277
+ children: contactsList.map((item, index)=>{
278
+ if (index != 0) {
279
+ return /*#__PURE__*/ _jsxs("div", {
280
+ className: `${styles.ai} ${item.roomId != undefined && roomId != '' && item.roomId == roomId ? styles.active : ""}`,
281
+ onClick: ()=>{
282
+ setNewRoomId(item.roomId);
283
+ switchChatRoom(item.roomId, "");
284
+ roomsListTimer();
285
+ },
286
+ children: [
287
+ /*#__PURE__*/ _jsx("img", {
288
+ src: item.headImg
289
+ }),
290
+ /*#__PURE__*/ _jsx("p", {
291
+ children: item.name
292
+ }),
293
+ item.unreadCount != undefined && item.unreadCount > 0 && !(item.roomId != undefined && roomId != '' && item.roomId == roomId) && /*#__PURE__*/ _jsx("span", {
294
+ className: styles.num,
295
+ children: item.unreadCount > 99 ? '99+' : item.unreadCount
296
+ }),
297
+ // 没有消息时,可点击删除
298
+ !item.unreadCount && /*#__PURE__*/ _jsx("span", {
299
+ className: styles.delete,
300
+ onClick: (e)=>{
301
+ e.stopPropagation();
302
+ deleteRoom(item.roomId);
303
+ },
304
+ children: /*#__PURE__*/ _jsx(CloseOutlined, {})
305
+ })
306
+ ]
307
+ }, item.roomId);
308
+ } else {
309
+ return null;
310
+ }
311
+ })
312
+ })
313
+ ]
314
+ });
315
+ });
316
+ export default ContactsList;
@@ -0,0 +1,206 @@
1
+ @import "../../theme/variable.less";
2
+ // @color-background-primary-weak-hover:@color-background-info-weak;
3
+
4
+ //联系人列表
5
+ .teacher_layout {
6
+ position: fixed;
7
+ right: 568px;
8
+
9
+ border-radius: 8px;
10
+ background: rgba(255, 255, 255, 0.5);
11
+ box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.05);
12
+ backdrop-filter: blur(7.5px);
13
+ width: 80px;
14
+ .top > div,
15
+ .bottom > div {
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: center;
19
+ padding: 8px;
20
+ border-radius: 8px;
21
+ margin: 8px 0;
22
+ max-width: 60px;
23
+ overflow: hidden;
24
+ position: relative;
25
+ cursor: pointer;
26
+ &:hover {
27
+ background-color: #f5f5f5;
28
+ .delete {
29
+ display: block;
30
+ }
31
+ }
32
+ p {
33
+ max-width: 60px;
34
+ overflow: hidden;
35
+ text-overflow: ellipsis;
36
+ white-space: nowrap;
37
+ color: @color-text-Secondary-Tr;
38
+ font-size: 12px;
39
+ line-height: 1;
40
+ padding-top: 12px;
41
+ }
42
+ img {
43
+ width: 32px;
44
+ height: 32px;
45
+ border-radius: 50%;
46
+ }
47
+ .num {
48
+ position: absolute;
49
+ top: 0;
50
+ right: 0;
51
+ border-radius: 26px;
52
+ background-color: #f4523b;
53
+ color: #fff;
54
+ padding: 0 5px;
55
+ border-radius: 25px;
56
+ font-size: 12px;
57
+ line-height: 1.2;
58
+ }
59
+ .delete {
60
+ position: absolute;
61
+ top: 2px;
62
+ right: 2px;
63
+ color: rgba(0, 0, 0, 0.65);
64
+ font-size: 12px;
65
+ display: none;
66
+ }
67
+ }
68
+ .top > div {
69
+ margin: 0 8px;
70
+ }
71
+ .top .shrink {
72
+ border-bottom: 1px solid @color-border-secondary;
73
+ border-radius: 0;
74
+ margin-bottom: 8px;
75
+ margin-top: 8px;
76
+ & > span {
77
+ font-size: 20px;
78
+ }
79
+ p {
80
+ padding-top: 0;
81
+ }
82
+ &:hover {
83
+ background-color: #fff !important;
84
+ }
85
+ }
86
+ .top .active,
87
+ .bottom .active {
88
+ background: @color-background-primary-weak-hover;
89
+ }
90
+ .bottom > div:last-child {
91
+ margin-bottom: 0;
92
+ }
93
+ .bottom > div:first-child {
94
+ margin-top: 0;
95
+ }
96
+ .bottom {
97
+ max-height: 524px;
98
+ padding: 0 8px;
99
+ padding-right: 4px;
100
+ overflow-y: auto;
101
+ margin-bottom: 8px;
102
+ margin-top: 8px;
103
+ }
104
+ .bottom::-webkit-scrollbar {
105
+ background-color: #eaedf1;
106
+ background-color: transparent;
107
+ width: 4px;
108
+ height: 4px;
109
+ }
110
+ .bottom::-webkit-scrollbar-thumb {
111
+ border-radius: 4px;
112
+ background-color: rgba(0, 0, 0, 0.25);
113
+ }
114
+ }
115
+ .teacher_layout_newlabo {
116
+ top: 50px;
117
+ right: 0;
118
+ .top{
119
+ svg{
120
+ transform: rotate(180deg);
121
+ }
122
+ }
123
+ }
124
+ .teacher_layout_modal {
125
+ width: 328px;
126
+ height: calc(100% - 48px);
127
+ background-color: #fff;
128
+ position: absolute;
129
+ border-top: 1px solid @color-border-secondary;
130
+ .top,
131
+ .bottom {
132
+ .ai {
133
+ border-bottom: 1px solid @color-border-secondary;
134
+ padding: 16px;
135
+ display: flex;
136
+ align-items: center;
137
+ cursor: pointer;
138
+ img {
139
+ width: 32px;
140
+ height: 32px;
141
+ border-radius: 50%;
142
+ margin-right: 12px;
143
+ }
144
+ & > span {
145
+ margin-right: 12px;
146
+ }
147
+ .user_info {
148
+ width: 252px;
149
+ .message {
150
+ color: #000;
151
+ font-size: 14px;
152
+ line-height: 1;
153
+ padding-right: 10px;
154
+ .num {
155
+ margin-left: 12px;
156
+ border-radius: 26px;
157
+ background-color: #f4523b;
158
+ color: #fff;
159
+ padding: 0 5px;
160
+ border-radius: 25px;
161
+ font-size: 12px;
162
+ line-height: 1;
163
+ }
164
+
165
+ .time {
166
+ font-size: 12px;
167
+ color: @color-text-quaternary-Tr;
168
+ float: right;
169
+ }
170
+ }
171
+ .con {
172
+ color: @color-text-quaternary-Tr;
173
+ font-size: 12px;
174
+ line-height: 1.5;
175
+ margin-top: 8px;
176
+ overflow: hidden;
177
+ white-space: nowrap;
178
+ text-overflow: ellipsis;
179
+ }
180
+ }
181
+ }
182
+ .active {
183
+ background: @color-background-primary-weak-hover;
184
+ }
185
+ }
186
+ .bottom{
187
+ overflow: auto;
188
+ height: calc(100% - 70px);
189
+ }
190
+ .bottom::-webkit-scrollbar {
191
+ background-color: #eaedf1;
192
+ background-color: transparent;
193
+ width: 4px;
194
+ height: 4px;
195
+ }
196
+ .bottom::-webkit-scrollbar-thumb {
197
+ border-radius: 4px;
198
+ background-color: rgba(0, 0, 0, 0.25);
199
+ }
200
+
201
+ :global {
202
+ .anticon {
203
+ vertical-align: 0;
204
+ }
205
+ }
206
+ }
@@ -0,0 +1,17 @@
1
+ declare const readMessage: (roomId: number | string, urllocation: any, userData: {
2
+ modules: any[];
3
+ }, http: {
4
+ patch: (arg0: string, arg1: {
5
+ roomId: any;
6
+ }, arg2: {
7
+ headers: {
8
+ "x-module-id": any;
9
+ "x-auth-jwt": string;
10
+ };
11
+ }) => void;
12
+ }) => void;
13
+ declare const getByteLen: (val: string) => number;
14
+ declare const serverUrl: () => string;
15
+ declare const copyText: (text: string) => boolean;
16
+ declare const getDataTime: (time: string | number | Date) => string;
17
+ export { readMessage, getByteLen, serverUrl, copyText, getDataTime };