bhd-components 0.9.14 → 0.9.15
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/README.md +1 -1
- package/dist/index.esm.es5.development.css +1093 -1087
- package/dist/index.esm.es5.development.js +151 -153
- 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/customerService/index.js +150 -152
- package/es2017/customerService/index.module.less +5 -0
- package/es2017/customerService/index2.module.less +5 -0
- package/esm/customerService/index.js +150 -152
- package/esm/customerService/index.module.less +5 -0
- package/esm/customerService/index2.module.less +5 -0
- package/package.json +1 -1
|
@@ -2320,171 +2320,169 @@ const CustomerService = (props)=>{
|
|
|
2320
2320
|
}),
|
|
2321
2321
|
/*#__PURE__*/ _jsx("div", {
|
|
2322
2322
|
className: styles.main,
|
|
2323
|
-
children: /*#__PURE__*/
|
|
2323
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
2324
2324
|
className: styles.main_content,
|
|
2325
|
-
children:
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2325
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
2326
|
+
className: styles.main_content_flag,
|
|
2327
|
+
onMouseEnter: ()=>{
|
|
2328
|
+
const dom = document.getElementById(item.id);
|
|
2329
|
+
if (dom) {
|
|
2330
|
+
const con_h = document.getElementById('chat_content').clientHeight - 24; //滚动区域的高度
|
|
2331
|
+
const rectY = dom.getBoundingClientRect().y - 48;
|
|
2332
|
+
const h = dom.clientHeight + 24; //当前元素高度
|
|
2333
|
+
const topDom = dom.getElementsByClassName('operate_modal_showtop')[0];
|
|
2334
|
+
const bottomDom = dom.getElementsByClassName('operate_modal_showbottom')[0];
|
|
2335
|
+
if (topDom && bottomDom) {
|
|
2336
|
+
console.log(h, con_h, rectY);
|
|
2337
|
+
if (rectY > 0) {
|
|
2338
|
+
topDom.style.cssText = "";
|
|
2339
|
+
bottomDom.style.cssText = "visibility: hidden;";
|
|
2340
|
+
// 上下都能显示时,显示到下边
|
|
2341
|
+
if (h < con_h - rectY) {
|
|
2342
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2343
|
+
bottomDom.style.cssText = "";
|
|
2344
|
+
}
|
|
2345
|
+
} else {
|
|
2346
|
+
// 上下都不显示
|
|
2347
|
+
if (h > con_h && h - con_h > Math.abs(rectY)) {
|
|
2348
|
+
console.log('rerererererer');
|
|
2349
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2350
|
+
bottomDom.style.cssText = `top:${-(h + rectY - 51)}px`;
|
|
2346
2351
|
} else {
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
console.log('rerererererer');
|
|
2350
|
-
topDom.style.cssText = "visibility: hidden;";
|
|
2351
|
-
bottomDom.style.cssText = `top:${-(h + rectY - 51)}px`;
|
|
2352
|
-
} else {
|
|
2353
|
-
topDom.style.cssText = "visibility: hidden;";
|
|
2354
|
-
bottomDom.style.cssText = "";
|
|
2355
|
-
}
|
|
2352
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2353
|
+
bottomDom.style.cssText = "";
|
|
2356
2354
|
}
|
|
2357
2355
|
}
|
|
2358
2356
|
}
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2359
|
+
children: [
|
|
2360
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2361
|
+
className: `${styles.operate_modal} operate_modal_showtop`,
|
|
2362
|
+
children: // 不是最后一行,
|
|
2363
|
+
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
2364
|
+
}),
|
|
2365
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
2366
|
+
className: styles.content,
|
|
2367
|
+
children: [
|
|
2368
|
+
item.message != 'AI助手繁忙,请稍后再提问或' && /*#__PURE__*/ _jsx("p", {
|
|
2369
|
+
dangerouslySetInnerHTML: {
|
|
2370
|
+
__html: message
|
|
2371
|
+
},
|
|
2372
|
+
className: styles.content_child
|
|
2373
|
+
}),
|
|
2374
|
+
item.message == 'AI助手繁忙,请稍后再提问或' && /*#__PURE__*/ _jsxs("p", {
|
|
2375
|
+
children: [
|
|
2376
|
+
"AI助手繁忙,请稍后再提问或",
|
|
2377
|
+
/*#__PURE__*/ _jsx("span", {
|
|
2378
|
+
className: styles.find_teacher_con,
|
|
2379
|
+
onClick: ()=>{
|
|
2380
|
+
let extraInfo = historyMessageList[i - 1].extraInfo;
|
|
2381
|
+
let url = '';
|
|
2382
|
+
if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
|
|
2383
|
+
url = JSON.parse(extraInfo)[0].value;
|
|
2384
|
+
}
|
|
2385
|
+
setProblem({
|
|
2386
|
+
question: historyMessageList[i - 1].message,
|
|
2387
|
+
url
|
|
2388
|
+
});
|
|
2389
|
+
setShowTeacherList(true);
|
|
2390
|
+
},
|
|
2391
|
+
children: "召唤老师回答"
|
|
2392
|
+
})
|
|
2393
|
+
]
|
|
2394
|
+
}),
|
|
2395
|
+
!item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2396
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
2397
|
+
children: [
|
|
2398
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2399
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2400
|
+
}),
|
|
2401
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2402
|
+
className: styles.mask_zoom,
|
|
2403
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2380
2404
|
onClick: ()=>{
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
url = JSON.parse(extraInfo)[0].value;
|
|
2385
|
-
}
|
|
2386
|
-
setProblem({
|
|
2387
|
-
question: historyMessageList[i - 1].message,
|
|
2388
|
-
url
|
|
2389
|
-
});
|
|
2390
|
-
setShowTeacherList(true);
|
|
2391
|
-
},
|
|
2392
|
-
children: "召唤老师回答"
|
|
2405
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2406
|
+
setVisible(true);
|
|
2407
|
+
}
|
|
2393
2408
|
})
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
/*#__PURE__*/ _jsx("
|
|
2403
|
-
|
|
2404
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2405
|
-
onClick: ()=>{
|
|
2406
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2407
|
-
setVisible(true);
|
|
2408
|
-
}
|
|
2409
|
-
})
|
|
2409
|
+
})
|
|
2410
|
+
]
|
|
2411
|
+
}),
|
|
2412
|
+
item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ _jsxs("ul", {
|
|
2413
|
+
className: `${styles.association_problem} ${item.message == '抱歉,我暂时无法回答这样的问题。' ? styles.association_problem_flag : ''}`,
|
|
2414
|
+
children: [
|
|
2415
|
+
item.message == '抱歉,我暂时无法回答这样的问题。' && /*#__PURE__*/ _jsx("li", {
|
|
2416
|
+
className: styles.related_issues_flag,
|
|
2417
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
2418
|
+
children: "相关问题"
|
|
2410
2419
|
})
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
+
}),
|
|
2421
|
+
JSON.parse(item.extraInfo).map((list, index)=>{
|
|
2422
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
2423
|
+
onClick: ()=>{
|
|
2424
|
+
sendMessage(list, 1);
|
|
2425
|
+
setBottomRecommendationQuestions([]);
|
|
2426
|
+
resettingBottomHei();
|
|
2427
|
+
},
|
|
2428
|
+
children: item.message == '抱歉,我暂时无法回答这样的问题。' ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2429
|
+
children: [
|
|
2430
|
+
JSON.parse(item.extraInfo).length > 1 ? index + 1 + '.' : '',
|
|
2431
|
+
list.question
|
|
2432
|
+
]
|
|
2420
2433
|
})
|
|
2421
|
-
})
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2434
|
+
}, i + "_" + index + "_" + list.value);
|
|
2435
|
+
})
|
|
2436
|
+
]
|
|
2437
|
+
}),
|
|
2438
|
+
//findTeacher//是否在召唤老师过程中,是否是最后一条消息
|
|
2439
|
+
!item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != '123456_date' && renderLastOperateBtn(item, isAiChatWindow, i)
|
|
2440
|
+
]
|
|
2441
|
+
}),
|
|
2442
|
+
//引用消息
|
|
2443
|
+
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2444
|
+
className: styles.citation_content,
|
|
2445
|
+
children: [
|
|
2446
|
+
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2447
|
+
overlayClassName: styles.popover_main_content,
|
|
2448
|
+
title: item.quotedMessage,
|
|
2449
|
+
placement: "rightTop",
|
|
2450
|
+
children: /*#__PURE__*/ _jsxs("p", {
|
|
2451
|
+
className: styles.text_exceed,
|
|
2452
|
+
children: [
|
|
2453
|
+
item.quotedMessage,
|
|
2454
|
+
/*#__PURE__*/ _jsx(RightOutlined, {})
|
|
2437
2455
|
]
|
|
2438
|
-
})
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
className: `${styles.operate_modal} ${styles.bottom} operate_modal_showbottom`,
|
|
2445
|
-
children: // 不是最后一行,
|
|
2446
|
-
renderOperateBtn(item, isAiChatWindow, i)
|
|
2447
|
-
})
|
|
2448
|
-
]
|
|
2449
|
-
}),
|
|
2450
|
-
//引用消息
|
|
2451
|
-
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2452
|
-
className: styles.citation_content,
|
|
2453
|
-
children: [
|
|
2454
|
-
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2455
|
-
overlayClassName: styles.popover_main_content,
|
|
2456
|
-
title: item.quotedMessage,
|
|
2457
|
-
placement: "rightTop",
|
|
2458
|
-
children: /*#__PURE__*/ _jsxs("p", {
|
|
2459
|
-
className: styles.text_exceed,
|
|
2456
|
+
})
|
|
2457
|
+
}) : /*#__PURE__*/ _jsx("p", {
|
|
2458
|
+
children: item.quotedMessage
|
|
2459
|
+
}),
|
|
2460
|
+
item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2461
|
+
className: `${styles.img_con} ${showType == 2 || showType == 4 ? styles.img_con2 : ''}`,
|
|
2460
2462
|
children: [
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2464
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2465
|
+
}),
|
|
2466
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2467
|
+
className: styles.mask_zoom,
|
|
2468
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2469
|
+
onClick: ()=>{
|
|
2470
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2471
|
+
setVisible(true);
|
|
2472
|
+
}
|
|
2473
|
+
})
|
|
2474
|
+
})
|
|
2463
2475
|
]
|
|
2464
2476
|
})
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
/*#__PURE__*/ _jsx("div", {
|
|
2475
|
-
className: styles.mask_zoom,
|
|
2476
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2477
|
-
onClick: ()=>{
|
|
2478
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2479
|
-
setVisible(true);
|
|
2480
|
-
}
|
|
2481
|
-
})
|
|
2482
|
-
})
|
|
2483
|
-
]
|
|
2484
|
-
})
|
|
2485
|
-
]
|
|
2486
|
-
})
|
|
2487
|
-
]
|
|
2477
|
+
]
|
|
2478
|
+
}),
|
|
2479
|
+
historyMessageList.length - 1 !== i && /*#__PURE__*/ _jsx("div", {
|
|
2480
|
+
className: `${styles.operate_modal} ${styles.bottom} operate_modal_showbottom`,
|
|
2481
|
+
children: // 不是最后一行,
|
|
2482
|
+
renderOperateBtn(item, isAiChatWindow, i)
|
|
2483
|
+
})
|
|
2484
|
+
]
|
|
2485
|
+
})
|
|
2488
2486
|
})
|
|
2489
2487
|
})
|
|
2490
2488
|
]
|