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
|
@@ -2414,171 +2414,169 @@ var CustomerService = function(props) {
|
|
|
2414
2414
|
}),
|
|
2415
2415
|
/*#__PURE__*/ _jsx("div", {
|
|
2416
2416
|
className: styles.main,
|
|
2417
|
-
children: /*#__PURE__*/
|
|
2417
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
2418
2418
|
className: styles.main_content,
|
|
2419
|
-
children:
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2419
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
2420
|
+
className: styles.main_content_flag,
|
|
2421
|
+
onMouseEnter: function() {
|
|
2422
|
+
var dom = document.getElementById(item.id);
|
|
2423
|
+
if (dom) {
|
|
2424
|
+
var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
|
|
2425
|
+
var rectY = dom.getBoundingClientRect().y - 48;
|
|
2426
|
+
var h = dom.clientHeight + 24; //当前元素高度
|
|
2427
|
+
var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
|
|
2428
|
+
var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
|
|
2429
|
+
if (topDom && bottomDom) {
|
|
2430
|
+
console.log(h, con_h, rectY);
|
|
2431
|
+
if (rectY > 0) {
|
|
2432
|
+
topDom.style.cssText = "";
|
|
2433
|
+
bottomDom.style.cssText = "visibility: hidden;";
|
|
2434
|
+
// 上下都能显示时,显示到下边
|
|
2435
|
+
if (h < con_h - rectY) {
|
|
2436
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2437
|
+
bottomDom.style.cssText = "";
|
|
2438
|
+
}
|
|
2439
|
+
} else {
|
|
2440
|
+
// 上下都不显示
|
|
2441
|
+
if (h > con_h && h - con_h > Math.abs(rectY)) {
|
|
2442
|
+
console.log("rerererererer");
|
|
2443
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2444
|
+
bottomDom.style.cssText = "top:".concat(-(h + rectY - 51), "px");
|
|
2440
2445
|
} else {
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
console.log("rerererererer");
|
|
2444
|
-
topDom.style.cssText = "visibility: hidden;";
|
|
2445
|
-
bottomDom.style.cssText = "top:".concat(-(h + rectY - 51), "px");
|
|
2446
|
-
} else {
|
|
2447
|
-
topDom.style.cssText = "visibility: hidden;";
|
|
2448
|
-
bottomDom.style.cssText = "";
|
|
2449
|
-
}
|
|
2446
|
+
topDom.style.cssText = "visibility: hidden;";
|
|
2447
|
+
bottomDom.style.cssText = "";
|
|
2450
2448
|
}
|
|
2451
2449
|
}
|
|
2452
2450
|
}
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2453
|
+
children: [
|
|
2454
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2455
|
+
className: "".concat(styles.operate_modal, " operate_modal_showtop"),
|
|
2456
|
+
children: // 不是最后一行,
|
|
2457
|
+
historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
|
|
2458
|
+
}),
|
|
2459
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
2460
|
+
className: styles.content,
|
|
2461
|
+
children: [
|
|
2462
|
+
item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ _jsx("p", {
|
|
2463
|
+
dangerouslySetInnerHTML: {
|
|
2464
|
+
__html: message
|
|
2465
|
+
},
|
|
2466
|
+
className: styles.content_child
|
|
2467
|
+
}),
|
|
2468
|
+
item.message == "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ _jsxs("p", {
|
|
2469
|
+
children: [
|
|
2470
|
+
"AI助手繁忙,请稍后再提问或",
|
|
2471
|
+
/*#__PURE__*/ _jsx("span", {
|
|
2472
|
+
className: styles.find_teacher_con,
|
|
2473
|
+
onClick: function() {
|
|
2474
|
+
var extraInfo = historyMessageList[i - 1].extraInfo;
|
|
2475
|
+
var url = "";
|
|
2476
|
+
if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
|
|
2477
|
+
url = JSON.parse(extraInfo)[0].value;
|
|
2478
|
+
}
|
|
2479
|
+
setProblem({
|
|
2480
|
+
question: historyMessageList[i - 1].message,
|
|
2481
|
+
url: url
|
|
2482
|
+
});
|
|
2483
|
+
setShowTeacherList(true);
|
|
2484
|
+
},
|
|
2485
|
+
children: "召唤老师回答"
|
|
2486
|
+
})
|
|
2487
|
+
]
|
|
2488
|
+
}),
|
|
2489
|
+
!item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2490
|
+
className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
|
|
2491
|
+
children: [
|
|
2492
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2493
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2494
|
+
}),
|
|
2495
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2496
|
+
className: styles.mask_zoom,
|
|
2497
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2474
2498
|
onClick: function() {
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
url = JSON.parse(extraInfo)[0].value;
|
|
2479
|
-
}
|
|
2480
|
-
setProblem({
|
|
2481
|
-
question: historyMessageList[i - 1].message,
|
|
2482
|
-
url: url
|
|
2483
|
-
});
|
|
2484
|
-
setShowTeacherList(true);
|
|
2485
|
-
},
|
|
2486
|
-
children: "召唤老师回答"
|
|
2499
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2500
|
+
setVisible(true);
|
|
2501
|
+
}
|
|
2487
2502
|
})
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
/*#__PURE__*/ _jsx("
|
|
2497
|
-
|
|
2498
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2499
|
-
onClick: function() {
|
|
2500
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2501
|
-
setVisible(true);
|
|
2502
|
-
}
|
|
2503
|
-
})
|
|
2503
|
+
})
|
|
2504
|
+
]
|
|
2505
|
+
}),
|
|
2506
|
+
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", {
|
|
2507
|
+
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
|
|
2508
|
+
children: [
|
|
2509
|
+
item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ _jsx("li", {
|
|
2510
|
+
className: styles.related_issues_flag,
|
|
2511
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
2512
|
+
children: "相关问题"
|
|
2504
2513
|
})
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
+
}),
|
|
2515
|
+
JSON.parse(item.extraInfo).map(function(list, index) {
|
|
2516
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
2517
|
+
onClick: function() {
|
|
2518
|
+
sendMessage(list, 1);
|
|
2519
|
+
setBottomRecommendationQuestions([]);
|
|
2520
|
+
resettingBottomHei();
|
|
2521
|
+
},
|
|
2522
|
+
children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
2523
|
+
children: [
|
|
2524
|
+
JSON.parse(item.extraInfo).length > 1 ? index + 1 + "." : "",
|
|
2525
|
+
list.question
|
|
2526
|
+
]
|
|
2514
2527
|
})
|
|
2515
|
-
})
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2528
|
+
}, i + "_" + index + "_" + list.value);
|
|
2529
|
+
})
|
|
2530
|
+
]
|
|
2531
|
+
}),
|
|
2532
|
+
//findTeacher//是否在召唤老师过程中,是否是最后一条消息
|
|
2533
|
+
!item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i)
|
|
2534
|
+
]
|
|
2535
|
+
}),
|
|
2536
|
+
//引用消息
|
|
2537
|
+
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2538
|
+
className: styles.citation_content,
|
|
2539
|
+
children: [
|
|
2540
|
+
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2541
|
+
overlayClassName: styles.popover_main_content,
|
|
2542
|
+
title: item.quotedMessage,
|
|
2543
|
+
placement: "rightTop",
|
|
2544
|
+
children: /*#__PURE__*/ _jsxs("p", {
|
|
2545
|
+
className: styles.text_exceed,
|
|
2546
|
+
children: [
|
|
2547
|
+
item.quotedMessage,
|
|
2548
|
+
/*#__PURE__*/ _jsx(RightOutlined, {})
|
|
2531
2549
|
]
|
|
2532
|
-
})
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
className: "".concat(styles.operate_modal, " ").concat(styles.bottom, " operate_modal_showbottom"),
|
|
2539
|
-
children: // 不是最后一行,
|
|
2540
|
-
renderOperateBtn(item, isAiChatWindow, i)
|
|
2541
|
-
})
|
|
2542
|
-
]
|
|
2543
|
-
}),
|
|
2544
|
-
//引用消息
|
|
2545
|
-
item.quotedMessage && /*#__PURE__*/ _jsxs("div", {
|
|
2546
|
-
className: styles.citation_content,
|
|
2547
|
-
children: [
|
|
2548
|
-
getByteLen(item.quotedMessage) > 120 ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
2549
|
-
overlayClassName: styles.popover_main_content,
|
|
2550
|
-
title: item.quotedMessage,
|
|
2551
|
-
placement: "rightTop",
|
|
2552
|
-
children: /*#__PURE__*/ _jsxs("p", {
|
|
2553
|
-
className: styles.text_exceed,
|
|
2550
|
+
})
|
|
2551
|
+
}) : /*#__PURE__*/ _jsx("p", {
|
|
2552
|
+
children: item.quotedMessage
|
|
2553
|
+
}),
|
|
2554
|
+
item.quotedMessage && item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
|
|
2555
|
+
className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
|
|
2554
2556
|
children: [
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
+
/*#__PURE__*/ _jsx("img", {
|
|
2558
|
+
src: JSON.parse(item.extraInfo)[0].value
|
|
2559
|
+
}),
|
|
2560
|
+
/*#__PURE__*/ _jsx("div", {
|
|
2561
|
+
className: styles.mask_zoom,
|
|
2562
|
+
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2563
|
+
onClick: function() {
|
|
2564
|
+
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2565
|
+
setVisible(true);
|
|
2566
|
+
}
|
|
2567
|
+
})
|
|
2568
|
+
})
|
|
2557
2569
|
]
|
|
2558
2570
|
})
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
/*#__PURE__*/ _jsx("div", {
|
|
2569
|
-
className: styles.mask_zoom,
|
|
2570
|
-
children: /*#__PURE__*/ _jsx(ZoomInOutlined, {
|
|
2571
|
-
onClick: function() {
|
|
2572
|
-
setViewBase64(JSON.parse(item.extraInfo)[0].value);
|
|
2573
|
-
setVisible(true);
|
|
2574
|
-
}
|
|
2575
|
-
})
|
|
2576
|
-
})
|
|
2577
|
-
]
|
|
2578
|
-
})
|
|
2579
|
-
]
|
|
2580
|
-
})
|
|
2581
|
-
]
|
|
2571
|
+
]
|
|
2572
|
+
}),
|
|
2573
|
+
historyMessageList.length - 1 !== i && /*#__PURE__*/ _jsx("div", {
|
|
2574
|
+
className: "".concat(styles.operate_modal, " ").concat(styles.bottom, " operate_modal_showbottom"),
|
|
2575
|
+
children: // 不是最后一行,
|
|
2576
|
+
renderOperateBtn(item, isAiChatWindow, i)
|
|
2577
|
+
})
|
|
2578
|
+
]
|
|
2579
|
+
})
|
|
2582
2580
|
})
|
|
2583
2581
|
})
|
|
2584
2582
|
]
|