bhd-components 0.7.13 → 0.7.14
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/{1c455680.esm.es5.production.js → 1c8e7e4e.esm.es5.production.js} +1 -1
- package/dist/{75d9e8b4.esm.es5.development.js → 2a1e1288.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.js +152 -47
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +148 -43
- package/esm/customerService/index.js +150 -45
- package/package.json +1 -1
|
@@ -120868,7 +120868,7 @@ function requireD () {
|
|
|
120868
120868
|
+ 'pragma private protected public pure ref return scope shared static struct '
|
|
120869
120869
|
+ 'super switch synchronized template this throw try typedef typeid typeof union '
|
|
120870
120870
|
+ 'unittest version void volatile while with __FILE__ __LINE__ __gshared|10 '
|
|
120871
|
-
+ '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.7.
|
|
120871
|
+
+ '__thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ "0.7.14"',
|
|
120872
120872
|
built_in:
|
|
120873
120873
|
'bool cdouble cent cfloat char creal dchar delegate double dstring float function '
|
|
120874
120874
|
+ 'idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar '
|
|
@@ -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 './2a1e1288.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 './2a1e1288.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';
|
|
@@ -4422,48 +4422,78 @@ var CustomerService = function(props) {
|
|
|
4422
4422
|
} catch (error) {}
|
|
4423
4423
|
}, 3000);
|
|
4424
4424
|
};
|
|
4425
|
-
|
|
4426
|
-
var
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4425
|
+
//发送欢迎语,视频页面
|
|
4426
|
+
var sendWelcomMessage = function() {
|
|
4427
|
+
if (config.type == "video") {
|
|
4428
|
+
var params = config.params;
|
|
4429
|
+
var videoId = params.videoId;
|
|
4430
|
+
var watchTime = params.videoProgress;
|
|
4431
|
+
var courseId = getQuery("yc_id");
|
|
4432
|
+
var sectionId = params.VideoBriefSummaryId;
|
|
4433
|
+
// let courseId="20899",
|
|
4434
|
+
// sectionId= "462347",
|
|
4435
|
+
// videoId= "29715",
|
|
4436
|
+
// watchTime= 677
|
|
4437
|
+
if (videoId && courseId && sectionId) {
|
|
4438
|
+
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|
|
4439
|
+
"recommendedQuestions": [],
|
|
4440
|
+
"contexts": [
|
|
4441
|
+
{
|
|
4442
|
+
"type": "VIDEO",
|
|
4443
|
+
"courseId": courseId,
|
|
4444
|
+
"sectionId": sectionId,
|
|
4445
|
+
"videoId": videoId,
|
|
4446
|
+
"watchTime": watchTime
|
|
4447
|
+
}
|
|
4448
|
+
],
|
|
4449
|
+
"maximum": 3
|
|
4450
|
+
}).then(function(res) {
|
|
4451
|
+
var data = res.data.questions;
|
|
4452
|
+
var questionsList = data.map(function(item, index) {
|
|
4453
|
+
if (index < 3) {
|
|
4454
|
+
return {
|
|
4455
|
+
key: "messageSource",
|
|
4456
|
+
value: item.id,
|
|
4457
|
+
question: item.question,
|
|
4458
|
+
answer: item.answer
|
|
4459
|
+
};
|
|
4460
|
+
} else {
|
|
4461
|
+
return null;
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
var obj = {
|
|
4465
|
+
roomId: roomId,
|
|
4466
|
+
sender: "AI",
|
|
4467
|
+
recevier: mid,
|
|
4468
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?",
|
|
4469
|
+
extraInfos: questionsList.length > 0 ? questionsList : null
|
|
4470
|
+
};
|
|
4471
|
+
if (pageNumHistory <= 1) {
|
|
4472
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
4473
|
+
var newHistoryMessageList = historyMessageList.filter(function(e) {
|
|
4474
|
+
return e.id != "123456_date";
|
|
4475
|
+
});
|
|
4476
|
+
newHistoryMessageList.push(_object_spread_props(_object_spread({}, obj), {
|
|
4477
|
+
id: "123456_date",
|
|
4478
|
+
upvoted: false,
|
|
4479
|
+
downvoted: false,
|
|
4480
|
+
quotedMessage: "",
|
|
4481
|
+
createdAt: getDataTime(-1),
|
|
4482
|
+
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4483
|
+
}));
|
|
4484
|
+
return newHistoryMessageList;
|
|
4485
|
+
});
|
|
4486
|
+
scrollToBottom();
|
|
4455
4487
|
}
|
|
4456
|
-
|
|
4488
|
+
return;
|
|
4489
|
+
}).catch(function() {});
|
|
4457
4490
|
}
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
});
|
|
4461
|
-
obj = {
|
|
4491
|
+
} else {
|
|
4492
|
+
var obj = {
|
|
4462
4493
|
roomId: roomId,
|
|
4463
4494
|
sender: "AI",
|
|
4464
4495
|
recevier: mid,
|
|
4465
|
-
message: "Hi,我是智能学习助手,你遇到了什么问题?"
|
|
4466
|
-
extraInfos: questionsList
|
|
4496
|
+
message: "Hi,我是智能学习助手,你遇到了什么问题?"
|
|
4467
4497
|
};
|
|
4468
4498
|
if (pageNumHistory <= 1) {
|
|
4469
4499
|
setHistoryMessageList(function(historyMessageList) {
|
|
@@ -4476,12 +4506,84 @@ var CustomerService = function(props) {
|
|
|
4476
4506
|
downvoted: false,
|
|
4477
4507
|
quotedMessage: "",
|
|
4478
4508
|
createdAt: getDataTime(-1),
|
|
4479
|
-
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4509
|
+
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4510
|
+
extraInfo: JSON.stringify([
|
|
4511
|
+
{
|
|
4512
|
+
key: "messageSource",
|
|
4513
|
+
value: "knowledgebase"
|
|
4514
|
+
}
|
|
4515
|
+
])
|
|
4480
4516
|
}));
|
|
4481
4517
|
return newHistoryMessageList;
|
|
4482
4518
|
});
|
|
4483
4519
|
scrollToBottom();
|
|
4484
4520
|
}
|
|
4521
|
+
}
|
|
4522
|
+
};
|
|
4523
|
+
//AI窗口,type:1发送打招呼信息 2点赞消息 3踩消息 4没有AI客服权限,5,发送超过10万字消息 6, 没有AI客服权限,发送最热的问题
|
|
4524
|
+
var sendGreetingMessage = function(type) {
|
|
4525
|
+
var questionsList = [];
|
|
4526
|
+
var obj = {};
|
|
4527
|
+
if (type == 1) {
|
|
4528
|
+
sendWelcomMessage();
|
|
4529
|
+
// console.log(hotQuestionsList,newHotQuestionsList.current,'33322221111');
|
|
4530
|
+
// if(newHotQuestionsList.current.length > 0){
|
|
4531
|
+
// questionsList = newHotQuestionsList.current.map((item, index) => {
|
|
4532
|
+
// if (index < 3) {
|
|
4533
|
+
// return {
|
|
4534
|
+
// key: "messageSource",
|
|
4535
|
+
// value: item.id,
|
|
4536
|
+
// question: item.question,
|
|
4537
|
+
// answer: item.answer,
|
|
4538
|
+
// };
|
|
4539
|
+
// } else {
|
|
4540
|
+
// return null;
|
|
4541
|
+
// }
|
|
4542
|
+
// });
|
|
4543
|
+
// }else{
|
|
4544
|
+
// questionsList = hotQuestionsList.map((item, index) => {
|
|
4545
|
+
// if (index < 3) {
|
|
4546
|
+
// return {
|
|
4547
|
+
// key: "messageSource",
|
|
4548
|
+
// value: item.id,
|
|
4549
|
+
// question: item.question,
|
|
4550
|
+
// answer: item.answer,
|
|
4551
|
+
// };
|
|
4552
|
+
// } else {
|
|
4553
|
+
// return null;
|
|
4554
|
+
// }
|
|
4555
|
+
// });
|
|
4556
|
+
// }
|
|
4557
|
+
// questionsList = questionsList.filter((i) => i != null);
|
|
4558
|
+
// obj = {
|
|
4559
|
+
// roomId: roomId,
|
|
4560
|
+
// sender: "AI",
|
|
4561
|
+
// recevier: mid,
|
|
4562
|
+
// message: `Hi,我是智能学习助手,你遇到了什么问题?`,
|
|
4563
|
+
// extraInfos: questionsList,
|
|
4564
|
+
// };
|
|
4565
|
+
// if(pageNumHistory <= 1){
|
|
4566
|
+
// setHistoryMessageList((historyMessageList) => {
|
|
4567
|
+
// let newHistoryMessageList = historyMessageList.filter(e=>e.id!='123456_date');
|
|
4568
|
+
// newHistoryMessageList.push({
|
|
4569
|
+
// ...obj,
|
|
4570
|
+
// id: '123456_date',
|
|
4571
|
+
// upvoted: false,
|
|
4572
|
+
// downvoted: false,
|
|
4573
|
+
// quotedMessage: "",
|
|
4574
|
+
// createdAt: getDataTime(-1),
|
|
4575
|
+
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4576
|
+
// // extraInfo: JSON.stringify([
|
|
4577
|
+
// // {
|
|
4578
|
+
// // key: "messageSource",
|
|
4579
|
+
// // value: "knowledgebase",
|
|
4580
|
+
// // },
|
|
4581
|
+
// // ]),
|
|
4582
|
+
// });
|
|
4583
|
+
// return newHistoryMessageList;
|
|
4584
|
+
// });
|
|
4585
|
+
// scrollToBottom();
|
|
4586
|
+
// }
|
|
4485
4587
|
return;
|
|
4486
4588
|
} else if (type == 2) {
|
|
4487
4589
|
obj = {
|
|
@@ -5101,7 +5203,7 @@ var CustomerService = function(props) {
|
|
|
5101
5203
|
} else {
|
|
5102
5204
|
var newHistoryMessageList2 = list1.map(function(item) {
|
|
5103
5205
|
message = item.message + obj.message;
|
|
5104
|
-
var extraInfo =
|
|
5206
|
+
var extraInfo = null;
|
|
5105
5207
|
// message = '抱歉,我暂时无法回答这样的问题。'
|
|
5106
5208
|
if (message == "抱歉,我暂时无法回答这样的问题。") {
|
|
5107
5209
|
extraInfo = videoHotQuestionsList.current.map(function(str, index) {
|
|
@@ -5499,12 +5601,15 @@ var CustomerService = function(props) {
|
|
|
5499
5601
|
var flag = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
5500
5602
|
console.log(flag, props, 3333333);
|
|
5501
5603
|
if (config && config.type == "video" && config.params) {
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5604
|
+
var params = config.params;
|
|
5605
|
+
var videoId = params.videoId;
|
|
5606
|
+
var watchTime = params.videoProgress;
|
|
5607
|
+
var courseId = getQuery("yc_id");
|
|
5608
|
+
var sectionId = params.VideoBriefSummaryId;
|
|
5609
|
+
// let courseId="20899",
|
|
5610
|
+
// sectionId= "462347",
|
|
5611
|
+
// videoId= "29715",
|
|
5612
|
+
// watchTime= 677
|
|
5508
5613
|
if (videoId && courseId && sectionId) {
|
|
5509
5614
|
console.log(recommendeQuestionID.current, "recommendeQuestionID.current");
|
|
5510
5615
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
|