bhd-components 0.11.23 → 0.11.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.
- package/dist/index.esm.es5.development.css +1607 -1557
- package/dist/index.esm.es5.development.js +98 -37
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/virtuosoList/index.js +22 -1
- package/es2017/AIMessageList/type.d.ts +1 -1
- package/es2017/customerService/contactsList.d.ts +2 -1
- package/es2017/customerService/contactsList.js +3 -3
- package/es2017/customerService/historyFun.d.ts +3 -2
- package/es2017/customerService/historyFun.js +3 -3
- package/es2017/customerService/index.d.ts +2 -1
- package/es2017/customerService/index.js +69 -25
- package/es2017/customerService/index.module.less +25 -0
- package/es2017/customerService/index2.module.less +34 -9
- package/esm/AIMessageList/components/virtuosoList/index.js +22 -1
- package/esm/AIMessageList/type.d.ts +1 -1
- package/esm/customerService/contactsList.d.ts +2 -1
- package/esm/customerService/contactsList.js +3 -7
- package/esm/customerService/historyFun.d.ts +3 -2
- package/esm/customerService/historyFun.js +3 -3
- package/esm/customerService/index.d.ts +2 -1
- package/esm/customerService/index.js +69 -25
- package/esm/customerService/index.module.less +25 -0
- package/esm/customerService/index2.module.less +34 -9
- package/package.json +1 -1
|
@@ -383,6 +383,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
+
let actionNode = renderAction("node", item);
|
|
386
387
|
// 是否显示时间
|
|
387
388
|
let itemNode = /*#__PURE__*/ _jsx("div", {
|
|
388
389
|
className: `${getCls("msgItem")} ${item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right")} ${isLast ? getCls("msgItem-last") : ""}`,
|
|
@@ -406,7 +407,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
406
407
|
}),
|
|
407
408
|
item.location === "left" && renderAction("floatBottom", item),
|
|
408
409
|
renderReference(item),
|
|
409
|
-
renderItemBottom && renderItemBottom(item)
|
|
410
|
+
renderItemBottom && renderItemBottom(item, actionNode)
|
|
410
411
|
]
|
|
411
412
|
})
|
|
412
413
|
});
|
|
@@ -593,6 +594,26 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
596
|
let index = recordRef.current.dataSource.findIndex((ite)=>ite.id == item.id);
|
|
597
|
+
if (location === "node") {
|
|
598
|
+
if (item.id !== "helloMsg" && item.id !== "inputing") {
|
|
599
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
600
|
+
className: `${getCls("msgItem-action")}`,
|
|
601
|
+
children: [
|
|
602
|
+
/*#__PURE__*/ _jsx("div", {
|
|
603
|
+
className: `${getCls("msgItem-action-left")}`,
|
|
604
|
+
children: leftNodes
|
|
605
|
+
}),
|
|
606
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
607
|
+
className: `${getCls("msgItem-action-right")}`,
|
|
608
|
+
children: [
|
|
609
|
+
RefreshNode,
|
|
610
|
+
rightNodes
|
|
611
|
+
]
|
|
612
|
+
})
|
|
613
|
+
]
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
}
|
|
596
617
|
if (location === "bottom") {
|
|
597
618
|
if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
|
|
598
619
|
if (index === recordRef.current.dataSource.length - 1) {
|
|
@@ -79,7 +79,7 @@ export interface contentConfigProps {
|
|
|
79
79
|
onSendedHelloMsg?: () => void; //发送招呼语之后
|
|
80
80
|
onInit?: () => void; //组件初始化
|
|
81
81
|
renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
|
|
82
|
-
renderItemBottom?: (item: dataItemType) => React.ReactNode;
|
|
82
|
+
renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
|
|
83
83
|
renderItemTop?: (item: dataItemType) => React.ReactNode;
|
|
84
84
|
scrollOffset?: number;
|
|
85
85
|
renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
|
|
@@ -4,11 +4,12 @@ interface data {
|
|
|
4
4
|
roomId: string;
|
|
5
5
|
userData: any;
|
|
6
6
|
http: any;
|
|
7
|
-
urllocation:
|
|
7
|
+
urllocation: string;
|
|
8
8
|
onClose: any;
|
|
9
9
|
switchChatRoom: any;
|
|
10
10
|
contactsList: any;
|
|
11
11
|
ref: any;
|
|
12
|
+
customTitle: string;
|
|
12
13
|
}
|
|
13
14
|
declare const ContactsList: React.ForwardRefExoticComponent<Omit<data, "ref"> & React.RefAttributes<unknown>>;
|
|
14
15
|
export default ContactsList;
|
|
@@ -6,7 +6,7 @@ import { CustomAiIcon, CustomRetract } from "../icons";
|
|
|
6
6
|
import { CloseOutlined } from "@ant-design/icons";
|
|
7
7
|
import { getByteLen, formatDate, replaceThinkAndYaml } from "./function"; //录音使用文件
|
|
8
8
|
const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
9
|
-
let { type, roomId, userData, http, urllocation, onClose, switchChatRoom, contactsList } = props;
|
|
9
|
+
let { type, roomId, userData, http, urllocation, onClose, switchChatRoom, contactsList, customTitle } = props;
|
|
10
10
|
//删除聊天室
|
|
11
11
|
const deleteRoom = (roomId)=>{
|
|
12
12
|
http.delete(`${urllocation}/chat-service/public/v1.0/rooms/${roomId}`, {}).then((res)=>{
|
|
@@ -31,7 +31,7 @@ const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
31
31
|
/*#__PURE__*/ _jsxs("p", {
|
|
32
32
|
className: styles.message,
|
|
33
33
|
children: [
|
|
34
|
-
|
|
34
|
+
customTitle,
|
|
35
35
|
/*#__PURE__*/ _jsx("span", {
|
|
36
36
|
className: styles.time,
|
|
37
37
|
children: contactsList.length > 0 && contactsList[0].createdAt != undefined && formatDate(contactsList[0].createdAt)
|
|
@@ -129,7 +129,7 @@ const ContactsList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
129
129
|
children: [
|
|
130
130
|
/*#__PURE__*/ _jsx(CustomAiIcon, {}),
|
|
131
131
|
/*#__PURE__*/ _jsx("p", {
|
|
132
|
-
children:
|
|
132
|
+
children: customTitle
|
|
133
133
|
})
|
|
134
134
|
]
|
|
135
135
|
})
|
|
@@ -2,12 +2,13 @@ import React from "react";
|
|
|
2
2
|
import "highlight.js/styles/github.css";
|
|
3
3
|
interface data {
|
|
4
4
|
type: number;
|
|
5
|
-
roomId:
|
|
5
|
+
roomId: string | number;
|
|
6
6
|
userData: any;
|
|
7
7
|
http: any;
|
|
8
|
-
urllocation:
|
|
8
|
+
urllocation: string;
|
|
9
9
|
onClose: any;
|
|
10
10
|
loadSpecifiedData: any;
|
|
11
|
+
customTitle: string;
|
|
11
12
|
}
|
|
12
13
|
declare const HistoryFun: (props: data) => React.JSX.Element;
|
|
13
14
|
export default HistoryFun;
|
|
@@ -10,7 +10,7 @@ import { CustomClose, CustomExpand, CustomAiIcon } from "../icons";
|
|
|
10
10
|
import { SearchOutlined } from "@ant-design/icons";
|
|
11
11
|
import { formatDate } from "./function"; //录音使用文件
|
|
12
12
|
const HistoryFun = (props)=>{
|
|
13
|
-
let { type, roomId, userData, http, urllocation, onClose, loadSpecifiedData } = props;
|
|
13
|
+
let { type, roomId, userData, http, urllocation, onClose, loadSpecifiedData, customTitle } = props;
|
|
14
14
|
const [loading, setLoading] = useState(false);
|
|
15
15
|
const [keyWordProblem, setKeyWordProblem] = useState(""); //搜索内容
|
|
16
16
|
const [showLoadingState, setShowLoadingState] = useState(1); //1,初始状态,2、无数据 ,3、不显示图片
|
|
@@ -400,7 +400,7 @@ const HistoryFun = (props)=>{
|
|
|
400
400
|
/*#__PURE__*/ _jsxs("p", {
|
|
401
401
|
className: styles.name,
|
|
402
402
|
children: [
|
|
403
|
-
item.member == "AI" ?
|
|
403
|
+
item.member == "AI" ? customTitle : item.name,
|
|
404
404
|
item.count == 1 ? /*#__PURE__*/ _jsx("span", {
|
|
405
405
|
className: styles.time,
|
|
406
406
|
children: time
|
|
@@ -434,7 +434,7 @@ const HistoryFun = (props)=>{
|
|
|
434
434
|
// console.log(list,item,'dklfvmdflkvmdfklv')
|
|
435
435
|
let name = "";
|
|
436
436
|
if (list.sender == 'AI') {
|
|
437
|
-
name =
|
|
437
|
+
name = customTitle;
|
|
438
438
|
} else if (list.sender == item.member) {
|
|
439
439
|
name = item.name;
|
|
440
440
|
} else {
|
|
@@ -5,7 +5,7 @@ interface Service {
|
|
|
5
5
|
params: any;
|
|
6
6
|
userData: any;
|
|
7
7
|
http?: any;
|
|
8
|
-
urllocation
|
|
8
|
+
urllocation: string;
|
|
9
9
|
onCancel?: () => {};
|
|
10
10
|
serverName?: string;
|
|
11
11
|
fetchEventSource?: any;
|
|
@@ -15,6 +15,7 @@ interface Service {
|
|
|
15
15
|
onEvent: (a: string, b: string, c: string) => {};
|
|
16
16
|
config: any;
|
|
17
17
|
screenshotAreaId: string;
|
|
18
|
+
customTitle?: string;
|
|
18
19
|
}
|
|
19
20
|
declare const CustomerService: (props: Service) => React.JSX.Element;
|
|
20
21
|
export default CustomerService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
|
-
import React, { useEffect, useState, useRef } from "react";
|
|
4
|
+
import React, { useEffect, useState, useRef, useMemo } from "react";
|
|
5
5
|
import { Modal, Drawer, Tooltip } from "antd";
|
|
6
6
|
import message from '../message';
|
|
7
7
|
import ViewImage from "../viewImage";
|
|
@@ -142,6 +142,15 @@ const CustomerService = (props)=>{
|
|
|
142
142
|
const shouqiTimer = useRef(null);
|
|
143
143
|
const waitMesssageListRef = useRef([]);
|
|
144
144
|
const handleRenderMsgTimer = useRef(null);
|
|
145
|
+
const customTitle = useMemo(()=>{
|
|
146
|
+
if (props.customTitle) {
|
|
147
|
+
return props.customTitle;
|
|
148
|
+
}
|
|
149
|
+
return userData.modules.some((ele)=>ele.short == "AIservice") ? "AI助手" : "智能问答";
|
|
150
|
+
}, [
|
|
151
|
+
props.customTitle,
|
|
152
|
+
userData
|
|
153
|
+
]);
|
|
145
154
|
const handleRenderMsg = ()=>{
|
|
146
155
|
if (handleRenderMsgTimer.current) return;
|
|
147
156
|
const processMessages = ()=>{
|
|
@@ -299,6 +308,7 @@ const CustomerService = (props)=>{
|
|
|
299
308
|
try {
|
|
300
309
|
newShowType.current = true;
|
|
301
310
|
setImgBese64("");
|
|
311
|
+
//@ts-ignore
|
|
302
312
|
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
|
303
313
|
setScreenShotType(1);
|
|
304
314
|
// console.log("看看变了没有1213133");
|
|
@@ -334,6 +344,7 @@ const CustomerService = (props)=>{
|
|
|
334
344
|
},
|
|
335
345
|
triggerCallback: ()=>{
|
|
336
346
|
// 截图组件加载完毕调用此方法来完成框选区域的截图
|
|
347
|
+
//@ts-ignore
|
|
337
348
|
screenShotPlugin.current.completeScreenshot();
|
|
338
349
|
},
|
|
339
350
|
cancelCallback: (err)=>{
|
|
@@ -355,6 +366,7 @@ const CustomerService = (props)=>{
|
|
|
355
366
|
} else {
|
|
356
367
|
setScreenShotType(2);
|
|
357
368
|
// console.log("截图方式:【html2canvas】");
|
|
369
|
+
//@ts-ignore
|
|
358
370
|
html2canvas(screenshotAreaId, {
|
|
359
371
|
//__docusaurus
|
|
360
372
|
useCORS: true,
|
|
@@ -2179,8 +2191,7 @@ const CustomerService = (props)=>{
|
|
|
2179
2191
|
};
|
|
2180
2192
|
//显示聊天室名字
|
|
2181
2193
|
const showChatRoomName = ()=>{
|
|
2182
|
-
let title =
|
|
2183
|
-
title = userData.modules.some((ele)=>ele.short == "AIservice") ? "AI助手" : "智能问答";
|
|
2194
|
+
let title = customTitle;
|
|
2184
2195
|
let list = contactsList.filter((e)=>e.roomId == roomId);
|
|
2185
2196
|
if (list.length > 0 && list[0].name) {
|
|
2186
2197
|
title = list[0].name;
|
|
@@ -2195,8 +2206,21 @@ const CustomerService = (props)=>{
|
|
|
2195
2206
|
children: [
|
|
2196
2207
|
/*#__PURE__*/ _jsx("div", {
|
|
2197
2208
|
className: styles.user,
|
|
2198
|
-
children: /*#__PURE__*/
|
|
2199
|
-
|
|
2209
|
+
children: /*#__PURE__*/ _jsxs("p", {
|
|
2210
|
+
className: styles.user_p,
|
|
2211
|
+
children: [
|
|
2212
|
+
/*#__PURE__*/ _jsxs("i", {
|
|
2213
|
+
className: styles.user_icon,
|
|
2214
|
+
onClick: ()=>{
|
|
2215
|
+
setShowContacts(!showContacts);
|
|
2216
|
+
},
|
|
2217
|
+
children: [
|
|
2218
|
+
/*#__PURE__*/ _jsx(CustomContacts, {}),
|
|
2219
|
+
showUnreadMessage()
|
|
2220
|
+
]
|
|
2221
|
+
}),
|
|
2222
|
+
showChatRoomName()
|
|
2223
|
+
]
|
|
2200
2224
|
})
|
|
2201
2225
|
}),
|
|
2202
2226
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -2254,6 +2278,7 @@ const CustomerService = (props)=>{
|
|
|
2254
2278
|
/*#__PURE__*/ _jsx("div", {
|
|
2255
2279
|
className: styles.user,
|
|
2256
2280
|
children: /*#__PURE__*/ _jsxs("p", {
|
|
2281
|
+
className: styles.user_p,
|
|
2257
2282
|
children: [
|
|
2258
2283
|
showType == 1 && /*#__PURE__*/ _jsxs("i", {
|
|
2259
2284
|
className: "lianxiren21",
|
|
@@ -2265,6 +2290,16 @@ const CustomerService = (props)=>{
|
|
|
2265
2290
|
showUnreadMessage()
|
|
2266
2291
|
]
|
|
2267
2292
|
}),
|
|
2293
|
+
showType == 2 && /*#__PURE__*/ _jsxs("i", {
|
|
2294
|
+
className: styles.user_icon,
|
|
2295
|
+
onClick: ()=>{
|
|
2296
|
+
setShowContacts(!showContacts);
|
|
2297
|
+
},
|
|
2298
|
+
children: [
|
|
2299
|
+
/*#__PURE__*/ _jsx(CustomContacts, {}),
|
|
2300
|
+
showUnreadMessage()
|
|
2301
|
+
]
|
|
2302
|
+
}),
|
|
2268
2303
|
showChatRoomName()
|
|
2269
2304
|
]
|
|
2270
2305
|
})
|
|
@@ -3895,7 +3930,7 @@ const CustomerService = (props)=>{
|
|
|
3895
3930
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
3896
3931
|
children: [
|
|
3897
3932
|
/*#__PURE__*/ _jsxs(Drawer, {
|
|
3898
|
-
title:
|
|
3933
|
+
title: customTitle,
|
|
3899
3934
|
width: 560,
|
|
3900
3935
|
onClose: ()=>{
|
|
3901
3936
|
onCancel();
|
|
@@ -3922,7 +3957,8 @@ const CustomerService = (props)=>{
|
|
|
3922
3957
|
switchChatRoom: switchChatRoom,
|
|
3923
3958
|
// saveContactsList={saveContactsList}
|
|
3924
3959
|
contactsList: contactsList,
|
|
3925
|
-
ref: childRef
|
|
3960
|
+
ref: childRef,
|
|
3961
|
+
customTitle: customTitle
|
|
3926
3962
|
})
|
|
3927
3963
|
}),
|
|
3928
3964
|
/*#__PURE__*/ _jsx("div", {
|
|
@@ -3936,7 +3972,7 @@ const CustomerService = (props)=>{
|
|
|
3936
3972
|
maxHeight: `calc(100vh-${buttomHei + 48}px)`
|
|
3937
3973
|
},
|
|
3938
3974
|
onClick: ()=>{
|
|
3939
|
-
setKeyWordProblem(
|
|
3975
|
+
setKeyWordProblem("");
|
|
3940
3976
|
},
|
|
3941
3977
|
children: [
|
|
3942
3978
|
loading ? /*#__PURE__*/ _jsx("div", {
|
|
@@ -3977,7 +4013,8 @@ const CustomerService = (props)=>{
|
|
|
3977
4013
|
onClose: ()=>{
|
|
3978
4014
|
setShowHistory(false);
|
|
3979
4015
|
},
|
|
3980
|
-
loadSpecifiedData: loadSpecifiedData
|
|
4016
|
+
loadSpecifiedData: loadSpecifiedData,
|
|
4017
|
+
customTitle: customTitle
|
|
3981
4018
|
}),
|
|
3982
4019
|
showType == 1 && showTeacherList && /*#__PURE__*/ _jsx(TeacherList, {
|
|
3983
4020
|
type: showType,
|
|
@@ -3992,14 +4029,14 @@ const CustomerService = (props)=>{
|
|
|
3992
4029
|
]
|
|
3993
4030
|
}),
|
|
3994
4031
|
/*#__PURE__*/ _jsxs(Modal, {
|
|
3995
|
-
title:
|
|
4032
|
+
title: customTitle,
|
|
3996
4033
|
open: showType == 2 ? true : false,
|
|
3997
4034
|
onCancel: ()=>{
|
|
3998
4035
|
onCancel();
|
|
3999
4036
|
onEvent(serverName + serverUrl(), "click_智能问答_收起侧边栏", "提交");
|
|
4000
4037
|
},
|
|
4001
4038
|
centered: true,
|
|
4002
|
-
width:
|
|
4039
|
+
width: 1200,
|
|
4003
4040
|
// @ts-ignore
|
|
4004
4041
|
height: window.innerHeight - 160,
|
|
4005
4042
|
wrapClassName: styles.ChatWindow_Modal,
|
|
@@ -4012,7 +4049,7 @@ const CustomerService = (props)=>{
|
|
|
4012
4049
|
children: renderHeader()
|
|
4013
4050
|
}),
|
|
4014
4051
|
/*#__PURE__*/ _jsxs("div", {
|
|
4015
|
-
className: `${styles.Drawer_wrap_main}`,
|
|
4052
|
+
className: `${styles.Drawer_wrap_main} ${showContacts ? "" : styles.Drawer_wrap_main_hide}`,
|
|
4016
4053
|
onClick: ()=>{
|
|
4017
4054
|
setKeyWordProblem("");
|
|
4018
4055
|
},
|
|
@@ -4024,7 +4061,7 @@ const CustomerService = (props)=>{
|
|
|
4024
4061
|
maxHeight: `${window.innerHeight - 148 - buttomHei}px`
|
|
4025
4062
|
},
|
|
4026
4063
|
children: [
|
|
4027
|
-
/*#__PURE__*/ _jsx(ContactsList, {
|
|
4064
|
+
showContacts && /*#__PURE__*/ _jsx(ContactsList, {
|
|
4028
4065
|
type: 2,
|
|
4029
4066
|
roomId: roomId,
|
|
4030
4067
|
userData: userData,
|
|
@@ -4036,7 +4073,8 @@ const CustomerService = (props)=>{
|
|
|
4036
4073
|
switchChatRoom: switchChatRoom,
|
|
4037
4074
|
contactsList: contactsList,
|
|
4038
4075
|
// saveContactsList={saveContactsList}
|
|
4039
|
-
ref: childRef
|
|
4076
|
+
ref: childRef,
|
|
4077
|
+
customTitle: customTitle
|
|
4040
4078
|
}),
|
|
4041
4079
|
/*#__PURE__*/ _jsxs("div", {
|
|
4042
4080
|
className: styles.chat_content,
|
|
@@ -4074,7 +4112,8 @@ const CustomerService = (props)=>{
|
|
|
4074
4112
|
onClose: ()=>{
|
|
4075
4113
|
setShowHistory(false);
|
|
4076
4114
|
},
|
|
4077
|
-
loadSpecifiedData: loadSpecifiedData
|
|
4115
|
+
loadSpecifiedData: loadSpecifiedData,
|
|
4116
|
+
customTitle: customTitle
|
|
4078
4117
|
}),
|
|
4079
4118
|
showType == 2 && showTeacherList && /*#__PURE__*/ _jsx(TeacherList, {
|
|
4080
4119
|
type: showType,
|
|
@@ -4180,7 +4219,8 @@ const CustomerService = (props)=>{
|
|
|
4180
4219
|
onClose: ()=>{
|
|
4181
4220
|
setShowHistory(false);
|
|
4182
4221
|
},
|
|
4183
|
-
loadSpecifiedData: loadSpecifiedData
|
|
4222
|
+
loadSpecifiedData: loadSpecifiedData,
|
|
4223
|
+
customTitle: customTitle
|
|
4184
4224
|
}),
|
|
4185
4225
|
showType == 3 && showTeacherList && /*#__PURE__*/ _jsx(TeacherList, {
|
|
4186
4226
|
type: showType,
|
|
@@ -4208,7 +4248,8 @@ const CustomerService = (props)=>{
|
|
|
4208
4248
|
contactsList: contactsList,
|
|
4209
4249
|
switchChatRoom: switchChatRoom,
|
|
4210
4250
|
// saveContactsList={saveContactsList}
|
|
4211
|
-
ref: childRef
|
|
4251
|
+
ref: childRef,
|
|
4252
|
+
customTitle: customTitle
|
|
4212
4253
|
})
|
|
4213
4254
|
})
|
|
4214
4255
|
]
|
|
@@ -4216,14 +4257,14 @@ const CustomerService = (props)=>{
|
|
|
4216
4257
|
(showType == 4 || showType == 5) && /*#__PURE__*/ _jsxs(_Fragment, {
|
|
4217
4258
|
children: [
|
|
4218
4259
|
/*#__PURE__*/ _jsxs(Modal, {
|
|
4219
|
-
title:
|
|
4260
|
+
title: customTitle,
|
|
4220
4261
|
open: showType == 4 ? true : false,
|
|
4221
4262
|
onCancel: ()=>{
|
|
4222
4263
|
onCancel();
|
|
4223
4264
|
onEvent(serverName + serverUrl(), "click_智能问答_收起侧边栏", "提交");
|
|
4224
4265
|
},
|
|
4225
4266
|
centered: true,
|
|
4226
|
-
width:
|
|
4267
|
+
width: 1200,
|
|
4227
4268
|
// @ts-ignore
|
|
4228
4269
|
height: window.innerHeight - 160,
|
|
4229
4270
|
wrapClassName: `${styles.ChatWindow_Modal}`,
|
|
@@ -4236,7 +4277,7 @@ const CustomerService = (props)=>{
|
|
|
4236
4277
|
children: renderHeader()
|
|
4237
4278
|
}),
|
|
4238
4279
|
/*#__PURE__*/ _jsxs("div", {
|
|
4239
|
-
className: `${styles.Drawer_wrap_main}`,
|
|
4280
|
+
className: `${styles.Drawer_wrap_main} ${showContacts ? "" : styles.Drawer_wrap_main_hide}`,
|
|
4240
4281
|
children: [
|
|
4241
4282
|
/*#__PURE__*/ _jsxs("div", {
|
|
4242
4283
|
className: `${styles.Drawer_main} ${styles.Drawer_main_newlabo}`,
|
|
@@ -4245,10 +4286,10 @@ const CustomerService = (props)=>{
|
|
|
4245
4286
|
maxHeight: `${window.innerHeight - 148 - buttomHei}px`
|
|
4246
4287
|
},
|
|
4247
4288
|
onClick: ()=>{
|
|
4248
|
-
setKeyWordProblem(
|
|
4289
|
+
setKeyWordProblem("");
|
|
4249
4290
|
},
|
|
4250
4291
|
children: [
|
|
4251
|
-
/*#__PURE__*/ _jsx(ContactsList, {
|
|
4292
|
+
showContacts && /*#__PURE__*/ _jsx(ContactsList, {
|
|
4252
4293
|
type: 4,
|
|
4253
4294
|
roomId: roomId,
|
|
4254
4295
|
userData: userData,
|
|
@@ -4260,7 +4301,8 @@ const CustomerService = (props)=>{
|
|
|
4260
4301
|
contactsList: contactsList,
|
|
4261
4302
|
switchChatRoom: switchChatRoom,
|
|
4262
4303
|
// saveContactsList={saveContactsList}
|
|
4263
|
-
ref: childRef
|
|
4304
|
+
ref: childRef,
|
|
4305
|
+
customTitle: customTitle
|
|
4264
4306
|
}),
|
|
4265
4307
|
/*#__PURE__*/ _jsxs("div", {
|
|
4266
4308
|
className: styles.chat_content,
|
|
@@ -4298,7 +4340,8 @@ const CustomerService = (props)=>{
|
|
|
4298
4340
|
onClose: ()=>{
|
|
4299
4341
|
setShowHistory(false);
|
|
4300
4342
|
},
|
|
4301
|
-
loadSpecifiedData: loadSpecifiedData
|
|
4343
|
+
loadSpecifiedData: loadSpecifiedData,
|
|
4344
|
+
customTitle: customTitle
|
|
4302
4345
|
}),
|
|
4303
4346
|
showTeacherList && /*#__PURE__*/ _jsx(TeacherList, {
|
|
4304
4347
|
type: showType,
|
|
@@ -4409,7 +4452,8 @@ const CustomerService = (props)=>{
|
|
|
4409
4452
|
contactsList: contactsList,
|
|
4410
4453
|
switchChatRoom: switchChatRoom,
|
|
4411
4454
|
// saveContactsList={saveContactsList}
|
|
4412
|
-
ref: childRef
|
|
4455
|
+
ref: childRef,
|
|
4456
|
+
customTitle: customTitle
|
|
4413
4457
|
})
|
|
4414
4458
|
})
|
|
4415
4459
|
]
|
|
@@ -68,6 +68,11 @@
|
|
|
68
68
|
position: relative;
|
|
69
69
|
padding-left: 36px;
|
|
70
70
|
|
|
71
|
+
.user_p{
|
|
72
|
+
display:flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
71
76
|
i {
|
|
72
77
|
padding-right: 16px;
|
|
73
78
|
color: #111;
|
|
@@ -88,6 +93,11 @@
|
|
|
88
93
|
font-size: 12px;
|
|
89
94
|
line-height: 1.2;
|
|
90
95
|
}
|
|
96
|
+
.user_icon{
|
|
97
|
+
display: flex;
|
|
98
|
+
line-height: 1;
|
|
99
|
+
position: relative;
|
|
100
|
+
}
|
|
91
101
|
}
|
|
92
102
|
.operate {
|
|
93
103
|
display: flex;
|
|
@@ -177,6 +187,21 @@
|
|
|
177
187
|
}
|
|
178
188
|
}
|
|
179
189
|
}
|
|
190
|
+
.Drawer_wrap_main{
|
|
191
|
+
width:100%;
|
|
192
|
+
&.Drawer_wrap_main_hide{
|
|
193
|
+
.Drawer_main{
|
|
194
|
+
.chat_content{
|
|
195
|
+
width: 100%;
|
|
196
|
+
margin-left: 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.Drawer_buttom_Issues_List{
|
|
200
|
+
width: 100%;
|
|
201
|
+
margin-left: 0;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
180
205
|
.Drawer_main {
|
|
181
206
|
max-height: calc(100vh - 110px);
|
|
182
207
|
overflow: hidden;
|
|
@@ -65,6 +65,11 @@
|
|
|
65
65
|
position: relative;
|
|
66
66
|
padding-left: 36px;
|
|
67
67
|
|
|
68
|
+
.user_p{
|
|
69
|
+
display:flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
i {
|
|
69
74
|
padding-right: 16px;
|
|
70
75
|
color: #111;
|
|
@@ -85,6 +90,11 @@
|
|
|
85
90
|
font-size: 12px;
|
|
86
91
|
line-height: 1.2;
|
|
87
92
|
}
|
|
93
|
+
.user_icon{
|
|
94
|
+
display: flex;
|
|
95
|
+
line-height: 1;
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
88
98
|
}
|
|
89
99
|
.operate {
|
|
90
100
|
display: flex;
|
|
@@ -174,6 +184,21 @@
|
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
186
|
}
|
|
187
|
+
.Drawer_wrap_main{
|
|
188
|
+
width:100%;
|
|
189
|
+
&.Drawer_wrap_main_hide{
|
|
190
|
+
.Drawer_main{
|
|
191
|
+
.chat_content{
|
|
192
|
+
width: 100%;
|
|
193
|
+
margin-left: 0;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
.Drawer_buttom_Issues_List{
|
|
197
|
+
width: 100%;
|
|
198
|
+
margin-left: 0;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
177
202
|
.Drawer_main {
|
|
178
203
|
max-height: calc(100vh - 110px);
|
|
179
204
|
overflow: hidden;
|
|
@@ -188,7 +213,7 @@
|
|
|
188
213
|
}
|
|
189
214
|
}
|
|
190
215
|
.message_con {
|
|
191
|
-
|
|
216
|
+
// padding: 16px;
|
|
192
217
|
// padding-top: 0;
|
|
193
218
|
|
|
194
219
|
>div{
|
|
@@ -245,7 +270,8 @@
|
|
|
245
270
|
}
|
|
246
271
|
}
|
|
247
272
|
}
|
|
248
|
-
& > li
|
|
273
|
+
& > li,
|
|
274
|
+
.itemcontent {
|
|
249
275
|
position: relative;
|
|
250
276
|
// margin-bottom: 24px;
|
|
251
277
|
display: flex;
|
|
@@ -402,6 +428,7 @@
|
|
|
402
428
|
}
|
|
403
429
|
}
|
|
404
430
|
}
|
|
431
|
+
|
|
405
432
|
p{
|
|
406
433
|
word-break: break-all;
|
|
407
434
|
white-space: break-spaces;
|
|
@@ -522,6 +549,7 @@
|
|
|
522
549
|
border-right: 1px solid #dfe6ec;
|
|
523
550
|
}
|
|
524
551
|
}
|
|
552
|
+
|
|
525
553
|
pre {
|
|
526
554
|
background: @color-background-fillquaternary;
|
|
527
555
|
border: 1px solid @color-border-secondary-Tr;
|
|
@@ -536,7 +564,6 @@
|
|
|
536
564
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
537
565
|
border-radius: 4px;
|
|
538
566
|
margin:0;
|
|
539
|
-
|
|
540
567
|
svg{
|
|
541
568
|
height: auto;
|
|
542
569
|
width: 100%;
|
|
@@ -547,12 +574,11 @@
|
|
|
547
574
|
}
|
|
548
575
|
}
|
|
549
576
|
}
|
|
550
|
-
}
|
|
551
|
-
|
|
577
|
+
}
|
|
552
578
|
.maskZoomBox{
|
|
553
579
|
position: relative;
|
|
554
580
|
display: inline-block;
|
|
555
|
-
max-width: 100%;
|
|
581
|
+
max-width: 100%;
|
|
556
582
|
padding: 0 !important;
|
|
557
583
|
margin-top: 8px;
|
|
558
584
|
margin-bottom: 8px;
|
|
@@ -594,8 +620,7 @@
|
|
|
594
620
|
display: block;
|
|
595
621
|
}
|
|
596
622
|
}
|
|
597
|
-
}
|
|
598
|
-
|
|
623
|
+
}
|
|
599
624
|
// 最后一行操作按钮
|
|
600
625
|
.operate_modal_bottom{
|
|
601
626
|
position: relative;
|
|
@@ -2273,6 +2298,6 @@ strong {
|
|
|
2273
2298
|
i {
|
|
2274
2299
|
margin-left: 8px;
|
|
2275
2300
|
display: inline-flex;
|
|
2276
|
-
align-items: center;
|
|
2301
|
+
align-items: center;
|
|
2277
2302
|
}
|
|
2278
2303
|
}
|
|
@@ -391,6 +391,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
+
var actionNode = renderAction("node", item);
|
|
394
395
|
// 是否显示时间
|
|
395
396
|
var itemNode = /*#__PURE__*/ _jsx("div", {
|
|
396
397
|
className: "".concat(getCls("msgItem"), " ").concat(item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right"), " ").concat(isLast ? getCls("msgItem-last") : ""),
|
|
@@ -418,7 +419,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
418
419
|
}),
|
|
419
420
|
item.location === "left" && renderAction("floatBottom", item),
|
|
420
421
|
renderReference(item),
|
|
421
|
-
renderItemBottom && renderItemBottom(item)
|
|
422
|
+
renderItemBottom && renderItemBottom(item, actionNode)
|
|
422
423
|
]
|
|
423
424
|
})
|
|
424
425
|
});
|
|
@@ -609,6 +610,26 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
609
610
|
var index = recordRef.current.dataSource.findIndex(function(ite) {
|
|
610
611
|
return ite.id == item.id;
|
|
611
612
|
});
|
|
613
|
+
if (location === "node") {
|
|
614
|
+
if (item.id !== "helloMsg" && item.id !== "inputing") {
|
|
615
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
616
|
+
className: "".concat(getCls("msgItem-action")),
|
|
617
|
+
children: [
|
|
618
|
+
/*#__PURE__*/ _jsx("div", {
|
|
619
|
+
className: "".concat(getCls("msgItem-action-left")),
|
|
620
|
+
children: leftNodes
|
|
621
|
+
}),
|
|
622
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
623
|
+
className: "".concat(getCls("msgItem-action-right")),
|
|
624
|
+
children: [
|
|
625
|
+
RefreshNode,
|
|
626
|
+
rightNodes
|
|
627
|
+
]
|
|
628
|
+
})
|
|
629
|
+
]
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
}
|
|
612
633
|
if (location === "bottom") {
|
|
613
634
|
if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
|
|
614
635
|
if (index === recordRef.current.dataSource.length - 1) {
|
|
@@ -79,7 +79,7 @@ export interface contentConfigProps {
|
|
|
79
79
|
onSendedHelloMsg?: () => void; //发送招呼语之后
|
|
80
80
|
onInit?: () => void; //组件初始化
|
|
81
81
|
renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
|
|
82
|
-
renderItemBottom?: (item: dataItemType) => React.ReactNode;
|
|
82
|
+
renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
|
|
83
83
|
renderItemTop?: (item: dataItemType) => React.ReactNode;
|
|
84
84
|
scrollOffset?: number;
|
|
85
85
|
renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
|