bhd-components 0.7.12 → 0.7.13
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/{367716ff.esm.es5.production.js → 1c455680.esm.es5.production.js} +1 -1
- package/dist/{4507d48e.esm.es5.development.js → 75d9e8b4.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.css +1032 -1018
- package/dist/index.esm.es5.development.js +56 -33
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +53 -31
- package/es2017/customerService/index.module.less +38 -27
- package/esm/customerService/index.js +53 -30
- package/esm/customerService/index.module.less +38 -27
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './
|
|
2
|
-
export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './
|
|
1
|
+
import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './75d9e8b4.esm.es5.development.js';
|
|
2
|
+
export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './75d9e8b4.esm.es5.development.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
|
|
5
5
|
import { Fragment } from 'react/jsx-runtime';
|
|
@@ -3166,7 +3166,7 @@ var AppViewImage = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
3166
3166
|
});
|
|
3167
3167
|
var ViewImage$1 = AppViewImage;
|
|
3168
3168
|
|
|
3169
|
-
var modules_63b47c51 = {"service_ChatWindow_Drawer":"
|
|
3169
|
+
var modules_63b47c51 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__f4576182","ChatWindow_Modal":"index_module_ChatWindow_Modal__f4576182","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__f4576182","header_wrap":"index_module_header_wrap__f4576182","top":"index_module_top__f4576182","user":"index_module_user__f4576182","count":"index_module_count__f4576182","operate":"index_module_operate__f4576182","line":"index_module_line__f4576182","popover_main":"index_module_popover_main__f4576182","popover":"index_module_popover__f4576182","header_wrap_newlabo":"index_module_header_wrap_newlabo__f4576182","Drawer_main":"index_module_Drawer_main__f4576182","loading":"index_module_loading__f4576182","message_con":"index_module_message_con__f4576182","left":"index_module_left__f4576182","head_sculpture":"index_module_head_sculpture__f4576182","main_content":"index_module_main_content__f4576182","right":"index_module_right__f4576182","main":"index_module_main__f4576182","main_content_flag":"index_module_main_content_flag__f4576182","operate_modal":"index_module_operate_modal__f4576182","operate_modal_bottom":"index_module_operate_modal_bottom__f4576182","active":"index_module_active__f4576182","stop_generate":"index_module_stop_generate__f4576182","icon":"index_module_icon__f4576182","find_teacher":"index_module_find_teacher__f4576182","stop_findTeacher":"index_module_stop_findTeacher__f4576182","content":"index_module_content__f4576182","content_child":"index_module_content_child__f4576182","sign":"index_module_sign__f4576182","ask_question":"index_module_ask_question__f4576182","association_problem":"index_module_association_problem__f4576182","association_problem_flag":"index_module_association_problem_flag__f4576182","related_issues_flag":"index_module_related_issues_flag__f4576182","img_con":"index_module_img_con__f4576182","mask_zoom":"index_module_mask_zoom__f4576182","img_con2":"index_module_img_con2__f4576182","copyCode":"index_module_copyCode__f4576182","time":"index_module_time__f4576182","citation_content":"index_module_citation_content__f4576182","text_exceed":"index_module_text_exceed__f4576182","popover_content":"index_module_popover_content__f4576182","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__f4576182","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__f4576182","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__f4576182","issues_list_teacherList":"index_module_issues_list_teacherList__f4576182","item":"index_module_item__f4576182","issues_list":"index_module_issues_list__f4576182","issues_list_flag":"index_module_issues_list_flag__f4576182","Drawer_buttom":"index_module_Drawer_buttom__f4576182","input_wrap":"index_module_input_wrap__f4576182","input":"index_module_input__f4576182","picture_layout":"index_module_picture_layout__f4576182","icon_close":"index_module_icon_close__f4576182","icon_zoom":"index_module_icon_zoom__f4576182","anticon":"index_module_anticon__f4576182","no_AI":"index_module_no_AI__f4576182","screenshot":"index_module_screenshot__f4576182","disabled":"index_module_disabled__f4576182","content_main":"index_module_content_main__f4576182","content_con":"index_module_content_con__f4576182","delete_quote":"index_module_delete_quote__f4576182","sending":"index_module_sending__f4576182","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__f4576182","main_list":"index_module_main_list__f4576182","chat_content":"index_module_chat_content__f4576182","popover_main_content":"index_module_popover_main_content__f4576182","popover_main_content_name":"index_module_popover_main_content_name__f4576182","teacher_layout":"index_module_teacher_layout__f4576182","bottom":"index_module_bottom__f4576182","delete":"index_module_delete__f4576182","num":"index_module_num__f4576182","shrink":"index_module_shrink__f4576182","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__f4576182","teacher_layout_modal":"index_module_teacher_layout_modal__f4576182","ai":"index_module_ai__f4576182","user_info":"index_module_user_info__f4576182","message":"index_module_message__f4576182","con":"index_module_con__f4576182","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__f4576182","history_list":"index_module_history_list__f4576182","search_layout":"index_module_search_layout__f4576182","mymove":"index_module_mymove__f4576182","title":"index_module_title__f4576182","search_top":"index_module_search_top__f4576182","list_item":"index_module_list_item__f4576182","list_summary":"index_module_list_summary__f4576182","head_img":"index_module_head_img__f4576182","list_desc":"index_module_list_desc__f4576182","name":"index_module_name__f4576182","decs":"index_module_decs__f4576182","open":"index_module_open__f4576182","list_summary_active":"index_module_list_summary_active__f4576182","list_detail":"index_module_list_detail__f4576182","list":"index_module_list__f4576182","list_more":"index_module_list_more__f4576182","no_data":"index_module_no_data__f4576182","history_list_broadside":"index_module_history_list_broadside__f4576182","screenshot_Modal":"index_module_screenshot_Modal__f4576182","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__f4576182"};
|
|
3170
3170
|
|
|
3171
3171
|
//消息已读
|
|
3172
3172
|
var readMessage = function(roomId, urllocation, userData, http) {
|
|
@@ -4191,6 +4191,7 @@ var CustomerService = function(props) {
|
|
|
4191
4191
|
var isPosition = useRef(true);
|
|
4192
4192
|
var recommendeQuestionID = useRef([]); //推荐问题id
|
|
4193
4193
|
var videoHotQuestionsList = useRef([]); //视频热门问题
|
|
4194
|
+
var newHotQuestionsList = useRef([]); //视频热门问题
|
|
4194
4195
|
var mid = props.userData.mid;
|
|
4195
4196
|
var remarkable = new Remarkable({
|
|
4196
4197
|
highlight: function highlight(str, lang) {
|
|
@@ -4426,19 +4427,34 @@ var CustomerService = function(props) {
|
|
|
4426
4427
|
var questionsList = [];
|
|
4427
4428
|
var obj = {};
|
|
4428
4429
|
if (type == 1) {
|
|
4429
|
-
console.log(hotQuestionsList, "33322221111");
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4430
|
+
console.log(hotQuestionsList, newHotQuestionsList.current, "33322221111");
|
|
4431
|
+
if (newHotQuestionsList.current.length > 0) {
|
|
4432
|
+
questionsList = newHotQuestionsList.current.map(function(item, index) {
|
|
4433
|
+
if (index < 3) {
|
|
4434
|
+
return {
|
|
4435
|
+
key: "messageSource",
|
|
4436
|
+
value: item.id,
|
|
4437
|
+
question: item.question,
|
|
4438
|
+
answer: item.answer
|
|
4439
|
+
};
|
|
4440
|
+
} else {
|
|
4441
|
+
return null;
|
|
4442
|
+
}
|
|
4443
|
+
});
|
|
4444
|
+
} else {
|
|
4445
|
+
questionsList = hotQuestionsList.map(function(item, index) {
|
|
4446
|
+
if (index < 3) {
|
|
4447
|
+
return {
|
|
4448
|
+
key: "messageSource",
|
|
4449
|
+
value: item.id,
|
|
4450
|
+
question: item.question,
|
|
4451
|
+
answer: item.answer
|
|
4452
|
+
};
|
|
4453
|
+
} else {
|
|
4454
|
+
return null;
|
|
4455
|
+
}
|
|
4456
|
+
});
|
|
4457
|
+
}
|
|
4442
4458
|
questionsList = questionsList.filter(function(i) {
|
|
4443
4459
|
return i != null;
|
|
4444
4460
|
});
|
|
@@ -4650,7 +4666,8 @@ var CustomerService = function(props) {
|
|
|
4650
4666
|
};
|
|
4651
4667
|
//发送知识库问题 item,flag == 1 是获取问候信息的答案,flag == 2 是普通消息,flag == 3 是针对视频页面点击底部推荐问题
|
|
4652
4668
|
var sendMessage = function(item, flag) {
|
|
4653
|
-
|
|
4669
|
+
var type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
4670
|
+
console.log(item, flag, 888888888);
|
|
4654
4671
|
var questions = [];
|
|
4655
4672
|
if (item && flag) {
|
|
4656
4673
|
questions = [
|
|
@@ -4712,7 +4729,7 @@ var CustomerService = function(props) {
|
|
|
4712
4729
|
key: "questionId",
|
|
4713
4730
|
value: flag == 1 ? questions.value : questions.id,
|
|
4714
4731
|
answer: questions.answer
|
|
4715
|
-
});
|
|
4732
|
+
}, type);
|
|
4716
4733
|
setKeyWord("");
|
|
4717
4734
|
setQuestionsList([]);
|
|
4718
4735
|
setCitationContent({});
|
|
@@ -4764,7 +4781,7 @@ var CustomerService = function(props) {
|
|
|
4764
4781
|
}
|
|
4765
4782
|
};
|
|
4766
4783
|
//向知识库发送问题 或答案 type:1 发送问题 2 接受答案
|
|
4767
|
-
var sendingExistingIssues = function(type, obj, questions) {
|
|
4784
|
+
var sendingExistingIssues = function(type, obj, questions, problemType) {
|
|
4768
4785
|
if (pageNumHistory <= 1) {
|
|
4769
4786
|
setHistoryMessageList(function(historyMessageList) {
|
|
4770
4787
|
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
@@ -4815,10 +4832,10 @@ var CustomerService = function(props) {
|
|
|
4815
4832
|
}
|
|
4816
4833
|
]
|
|
4817
4834
|
};
|
|
4818
|
-
sendingExistingIssues(2, dataObj, "");
|
|
4835
|
+
sendingExistingIssues(2, dataObj, "", problemType);
|
|
4819
4836
|
testLabQuestion(obj.message, questions.answer, "");
|
|
4820
4837
|
}
|
|
4821
|
-
if (type == 2 && config && config.type == "video") {
|
|
4838
|
+
if (type == 2 && config && config.type == "video" && problemType != "AssociativeProblem") {
|
|
4822
4839
|
//先请求问题列表
|
|
4823
4840
|
videoPageQuestiionsList(2);
|
|
4824
4841
|
}
|
|
@@ -4868,6 +4885,7 @@ var CustomerService = function(props) {
|
|
|
4868
4885
|
obj.regenerate = false;
|
|
4869
4886
|
}
|
|
4870
4887
|
var data = JSON.stringify(obj);
|
|
4888
|
+
var flagKeyWord = keyWord;
|
|
4871
4889
|
setKeyWord("");
|
|
4872
4890
|
setQuestionsList([]);
|
|
4873
4891
|
setTimeout(function() {
|
|
@@ -5014,7 +5032,9 @@ var CustomerService = function(props) {
|
|
|
5014
5032
|
}
|
|
5015
5033
|
if (msg.finished) {
|
|
5016
5034
|
setFinished(true); //发送结束
|
|
5017
|
-
|
|
5035
|
+
if (!flagKeyWord) {
|
|
5036
|
+
videoPageQuestiionsList(2);
|
|
5037
|
+
}
|
|
5018
5038
|
// isPosition.current = true;
|
|
5019
5039
|
setTimeout(function() {
|
|
5020
5040
|
isPosition.current = true;
|
|
@@ -5479,15 +5499,12 @@ var CustomerService = function(props) {
|
|
|
5479
5499
|
var flag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
5480
5500
|
console.log(flag, props, 3333333);
|
|
5481
5501
|
if (config && config.type == "video" && config.params) {
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
// sectionId= "462347",
|
|
5489
|
-
// videoId= "29707",
|
|
5490
|
-
// watchTime= 262
|
|
5502
|
+
// let params = config.params;
|
|
5503
|
+
// let videoId = params.videoId;
|
|
5504
|
+
// let watchTime = params.videoProgress;
|
|
5505
|
+
// let courseId = getQuery('yc_id');
|
|
5506
|
+
// let sectionId = params.VideoBriefSummaryId;
|
|
5507
|
+
var courseId = "20899", sectionId = "462347", videoId = "29715", watchTime = 677;
|
|
5491
5508
|
if (videoId && courseId && sectionId) {
|
|
5492
5509
|
console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
|
|
5493
5510
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
@@ -5515,6 +5532,7 @@ var CustomerService = function(props) {
|
|
|
5515
5532
|
setBottomRecommendationQuestions(data);
|
|
5516
5533
|
} else {
|
|
5517
5534
|
setHotQuestionsList(data);
|
|
5535
|
+
newHotQuestionsList.current = data;
|
|
5518
5536
|
}
|
|
5519
5537
|
// let ids:any[] = [];
|
|
5520
5538
|
// data.map((str: { id: string; })=>{
|
|
@@ -6171,7 +6189,7 @@ var CustomerService = function(props) {
|
|
|
6171
6189
|
]
|
|
6172
6190
|
}),
|
|
6173
6191
|
item.extraInfo != undefined && JSON.parse(item.extraInfo).length > 0 && JSON.parse(item.extraInfo)[0].key == "messageSource" && JSON.parse(item.extraInfo)[0].value != "knowledgebase" && /*#__PURE__*/ jsxs("ul", {
|
|
6174
|
-
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ?
|
|
6192
|
+
className: "".concat(styles.association_problem, " ").concat(item.message == "抱歉,我暂时无法回答这样的问题。" ? styles.association_problem_flag : ""),
|
|
6175
6193
|
children: [
|
|
6176
6194
|
item.message == "抱歉,我暂时无法回答这样的问题。" && /*#__PURE__*/ jsx("li", {
|
|
6177
6195
|
className: styles.related_issues_flag,
|
|
@@ -6443,6 +6461,7 @@ var CustomerService = function(props) {
|
|
|
6443
6461
|
} else if (JSON.parse(previousLineData.extraInfo).length > 0 && JSON.parse(previousLineData.extraInfo)[0].key == "imageUrl") {
|
|
6444
6462
|
showTeacherBtn = false;
|
|
6445
6463
|
}
|
|
6464
|
+
console.log(showTeacherBtn, "dlvkdfl");
|
|
6446
6465
|
/// style={{position:showStopBtn && isPosition.current ? 'sticky' : 'relative'}}
|
|
6447
6466
|
return /*#__PURE__*/ jsxs("div", {
|
|
6448
6467
|
className: "".concat(styles.operate_modal_bottom),
|
|
@@ -6840,6 +6859,8 @@ var CustomerService = function(props) {
|
|
|
6840
6859
|
}
|
|
6841
6860
|
}, 1000);
|
|
6842
6861
|
}
|
|
6862
|
+
setBottomRecommendationQuestions([]);
|
|
6863
|
+
resettingBottomHei();
|
|
6843
6864
|
},
|
|
6844
6865
|
onPressEnter: function(e) {
|
|
6845
6866
|
// console.log('发送内容22222',props)
|
|
@@ -6850,6 +6871,8 @@ var CustomerService = function(props) {
|
|
|
6850
6871
|
clearTimeout(timer.current);
|
|
6851
6872
|
setKeyWord("");
|
|
6852
6873
|
setCitationContent({});
|
|
6874
|
+
setBottomRecommendationQuestions([]);
|
|
6875
|
+
resettingBottomHei();
|
|
6853
6876
|
//查找是否是召唤老师回答并有相应的老师名称
|
|
6854
6877
|
if (answerMode == 1 && teacherList.length > 0) {
|
|
6855
6878
|
var list = teacherList.filter(function(v) {
|
|
@@ -7080,7 +7103,7 @@ var CustomerService = function(props) {
|
|
|
7080
7103
|
className: styles.item,
|
|
7081
7104
|
children: /*#__PURE__*/ jsx("span", {
|
|
7082
7105
|
onClick: function() {
|
|
7083
|
-
sendMessage(item, 2);
|
|
7106
|
+
sendMessage(item, 2, "AssociativeProblem");
|
|
7084
7107
|
setKeyWord("");
|
|
7085
7108
|
onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
|
|
7086
7109
|
},
|