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.
@@ -2414,171 +2414,169 @@ var CustomerService = function(props) {
2414
2414
  }),
2415
2415
  /*#__PURE__*/ _jsx("div", {
2416
2416
  className: styles.main,
2417
- children: /*#__PURE__*/ _jsxs("div", {
2417
+ children: /*#__PURE__*/ _jsx("div", {
2418
2418
  className: styles.main_content,
2419
- children: [
2420
- /*#__PURE__*/ _jsxs("div", {
2421
- className: styles.main_content_flag,
2422
- onMouseEnter: function() {
2423
- var dom = document.getElementById(item.id);
2424
- if (dom) {
2425
- var con_h = document.getElementById("chat_content").clientHeight - 24; //滚动区域的高度
2426
- var rectY = dom.getBoundingClientRect().y - 48;
2427
- var h = dom.clientHeight + 24; //当前元素高度
2428
- var topDom = dom.getElementsByClassName("operate_modal_showtop")[0];
2429
- var bottomDom = dom.getElementsByClassName("operate_modal_showbottom")[0];
2430
- if (topDom && bottomDom) {
2431
- console.log(h, con_h, rectY);
2432
- if (rectY > 0) {
2433
- topDom.style.cssText = "";
2434
- bottomDom.style.cssText = "visibility: hidden;";
2435
- // 上下都能显示时,显示到下边
2436
- if (h < con_h - rectY) {
2437
- topDom.style.cssText = "visibility: hidden;";
2438
- bottomDom.style.cssText = "";
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
- if (h > con_h && h - con_h > Math.abs(rectY)) {
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
- children: [
2455
- /*#__PURE__*/ _jsx("div", {
2456
- className: "".concat(styles.operate_modal, " operate_modal_showtop"),
2457
- children: // 不是最后一行,
2458
- historyMessageList.length - 1 != i && renderOperateBtn(item, isAiChatWindow, i)
2459
- }),
2460
- /*#__PURE__*/ _jsxs("div", {
2461
- className: styles.content,
2462
- children: [
2463
- item.message != "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ _jsx("p", {
2464
- dangerouslySetInnerHTML: {
2465
- __html: message
2466
- },
2467
- className: styles.content_child
2468
- }),
2469
- item.message == "AI助手繁忙,请稍后再提问或" && /*#__PURE__*/ _jsxs("p", {
2470
- children: [
2471
- "AI助手繁忙,请稍后再提问或",
2472
- /*#__PURE__*/ _jsx("span", {
2473
- className: styles.find_teacher_con,
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
- var extraInfo = historyMessageList[i - 1].extraInfo;
2476
- var url = "";
2477
- if (extraInfo && JSON.parse(extraInfo).length > 0 && JSON.parse(extraInfo)[0].key == "imageUrl" && JSON.parse(extraInfo)[0].value) {
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
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
2491
- className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
2492
- children: [
2493
- /*#__PURE__*/ _jsx("img", {
2494
- src: JSON.parse(item.extraInfo)[0].value
2495
- }),
2496
- /*#__PURE__*/ _jsx("div", {
2497
- className: styles.mask_zoom,
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
- 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", {
2508
- className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
2509
- children: [
2510
- item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ _jsx("li", {
2511
- className: styles.related_issues_flag,
2512
- children: /*#__PURE__*/ _jsx("span", {
2513
- children: "相关问题"
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
- JSON.parse(item.extraInfo).map(function(list, index) {
2517
- return /*#__PURE__*/ _jsx("li", {
2518
- onClick: function() {
2519
- sendMessage(list, 1);
2520
- setBottomRecommendationQuestions([]);
2521
- resettingBottomHei();
2522
- },
2523
- children: item.message == "抱歉,我暂时无法回答这样的问题。" ? list.question : /*#__PURE__*/ _jsxs(_Fragment, {
2524
- children: [
2525
- JSON.parse(item.extraInfo).length > 1 ? index + 1 + "." : "",
2526
- list.question
2527
- ]
2528
- })
2529
- }, i + "_" + index + "_" + list.value);
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
- //findTeacher//是否在召唤老师过程中,是否是最后一条消息
2534
- !item.findTeacher && historyMessageList.length - 1 == i && item.id != "123456" && item.id != "123456_date" && renderLastOperateBtn(item, isAiChatWindow, i)
2535
- ]
2536
- }),
2537
- historyMessageList.length - 1 !== i && /*#__PURE__*/ _jsx("div", {
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
- item.quotedMessage,
2556
- /*#__PURE__*/ _jsx(RightOutlined, {})
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
- }) : /*#__PURE__*/ _jsx("p", {
2560
- children: item.quotedMessage
2561
- }),
2562
- item.extraInfo && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "imageUrl" && /*#__PURE__*/ _jsxs("p", {
2563
- className: "".concat(styles.img_con, " ").concat(showType == 2 || showType == 4 ? styles.img_con2 : ""),
2564
- children: [
2565
- /*#__PURE__*/ _jsx("img", {
2566
- src: JSON.parse(item.extraInfo)[0].value
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
  ]
@@ -1956,6 +1956,11 @@
1956
1956
  line-height: 100%; /* 14px */
1957
1957
  }
1958
1958
  }
1959
+ :global{
1960
+ .bhd-spin-nested-loading{
1961
+ height:calc(100% - 130px)
1962
+ }
1963
+ }
1959
1964
  }
1960
1965
  }
1961
1966
  @keyframes mymove {
@@ -1946,6 +1946,11 @@
1946
1946
  line-height: 100%; /* 14px */
1947
1947
  }
1948
1948
  }
1949
+ :global{
1950
+ .bhd-spin-nested-loading{
1951
+ height:calc(100% - 130px)
1952
+ }
1953
+ }
1949
1954
  }
1950
1955
  }
1951
1956
  @keyframes mymove {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.9.14",
3
+ "version": "0.9.15",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {