bhd-components 0.7.16 → 0.7.17
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/{ee67a556.esm.es5.production.js → 1728c440.esm.es5.production.js} +1 -1
- package/dist/{cb6a18bd.esm.es5.development.js → ca9b7f2c.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.js +53 -103
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/customerService/index.js +50 -100
- package/esm/customerService/index.js +50 -100
- 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.17"',
|
|
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 './ca9b7f2c.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 './ca9b7f2c.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';
|
|
@@ -4150,7 +4150,7 @@ var CustomerService = function(props) {
|
|
|
4150
4150
|
var _useState3 = _sliced_to_array(useState([]), 2), historyMessageList = _useState3[0], setHistoryMessageList = _useState3[1]; //历史消息
|
|
4151
4151
|
var _useState4 = _sliced_to_array(useState(""), 2), keyWord = _useState4[0], setKeyWord = _useState4[1]; //搜索内容
|
|
4152
4152
|
var _useState5 = _sliced_to_array(useState([]), 2), questionsList = _useState5[0], setQuestionsList = _useState5[1]; //问题列表
|
|
4153
|
-
var _useState6 = _sliced_to_array(useState([]), 2)
|
|
4153
|
+
var _useState6 = _sliced_to_array(useState([]), 2); _useState6[0]; var setHotQuestionsList = _useState6[1]; //热门问题
|
|
4154
4154
|
// const [videoHotQuestionsList, setVideoHotQuestionsList] = useState([]); //热门问题
|
|
4155
4155
|
var _useState7 = _sliced_to_array(useState(false), 2), greetingMessage = _useState7[0], setGreetingMessage = _useState7[1]; //聊天记录列表是否请求完成
|
|
4156
4156
|
var _useState8 = _sliced_to_array(useState(1), 2), pageNum = _useState8[0], setPageNum = _useState8[1]; //页码
|
|
@@ -4207,10 +4207,10 @@ var CustomerService = function(props) {
|
|
|
4207
4207
|
}
|
|
4208
4208
|
});
|
|
4209
4209
|
useEffect(function() {
|
|
4210
|
-
if
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
}
|
|
4210
|
+
// if(config && config.type == 'video'){
|
|
4211
|
+
// //获取热门推荐
|
|
4212
|
+
// videoPageQuestiionsList(1);
|
|
4213
|
+
// }
|
|
4214
4214
|
setShowType(initShowType);
|
|
4215
4215
|
}, [
|
|
4216
4216
|
initShowType
|
|
@@ -4483,14 +4483,13 @@ var CustomerService = function(props) {
|
|
|
4483
4483
|
createdAt: getDataTime(-1),
|
|
4484
4484
|
extraInfo: obj.extraInfos != null ? JSON.stringify(obj.extraInfos) : null
|
|
4485
4485
|
}));
|
|
4486
|
-
console.log(newHistoryMessageList, 3333333333339999);
|
|
4487
4486
|
return newHistoryMessageList;
|
|
4488
4487
|
});
|
|
4489
4488
|
scrollToBottom();
|
|
4490
4489
|
}
|
|
4491
4490
|
return;
|
|
4492
4491
|
} catch (error) {}
|
|
4493
|
-
})
|
|
4492
|
+
});
|
|
4494
4493
|
}
|
|
4495
4494
|
} else {
|
|
4496
4495
|
var obj = {
|
|
@@ -4524,71 +4523,54 @@ var CustomerService = function(props) {
|
|
|
4524
4523
|
}
|
|
4525
4524
|
}
|
|
4526
4525
|
};
|
|
4527
|
-
|
|
4526
|
+
//无ai权限时,发送热门问题
|
|
4527
|
+
var getAssociativeProblem = function() {
|
|
4528
|
+
http.get("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions"), {
|
|
4529
|
+
params: {
|
|
4530
|
+
page: 1,
|
|
4531
|
+
maxPageSize: 5
|
|
4532
|
+
}
|
|
4533
|
+
}).then(function(res) {
|
|
4534
|
+
setFinished(true);
|
|
4535
|
+
if (res.data.total > 0) {
|
|
4536
|
+
var questionsList = res.data.questions.map(function(item) {
|
|
4537
|
+
return {
|
|
4538
|
+
key: "messageSource",
|
|
4539
|
+
value: item.id,
|
|
4540
|
+
question: item.question,
|
|
4541
|
+
answer: item.answer
|
|
4542
|
+
};
|
|
4543
|
+
});
|
|
4544
|
+
var obj = {
|
|
4545
|
+
roomId: roomId,
|
|
4546
|
+
sender: "AI",
|
|
4547
|
+
recevier: mid,
|
|
4548
|
+
message: "猜你想问:",
|
|
4549
|
+
extraInfos: questionsList
|
|
4550
|
+
};
|
|
4551
|
+
if (pageNumHistory <= 1) {
|
|
4552
|
+
setHistoryMessageList(function(historyMessageList) {
|
|
4553
|
+
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
4554
|
+
id: "p" + new Date().getTime(),
|
|
4555
|
+
upvoted: false,
|
|
4556
|
+
downvoted: false,
|
|
4557
|
+
quotedMessage: "",
|
|
4558
|
+
createdAt: getDataTime(-1),
|
|
4559
|
+
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4560
|
+
}));
|
|
4561
|
+
return newHistoryMessageList;
|
|
4562
|
+
});
|
|
4563
|
+
scrollToBottom();
|
|
4564
|
+
}
|
|
4565
|
+
return;
|
|
4566
|
+
}
|
|
4567
|
+
});
|
|
4568
|
+
};
|
|
4569
|
+
//AI窗口,type:1发送打招呼信息欢迎语 2点赞消息 3踩消息 4没有AI客服权限,5,发送超过10万字消息 6, 没有AI客服权限,发送最热的问题
|
|
4528
4570
|
var sendGreetingMessage = function(type) {
|
|
4529
|
-
var questionsList = [];
|
|
4530
4571
|
var obj = {};
|
|
4531
4572
|
if (type == 1) {
|
|
4532
|
-
console.log("dflkvmdfklvdf欢迎语");
|
|
4533
4573
|
sendWelcomMessage();
|
|
4534
|
-
// console.log(hotQuestionsList,newHotQuestionsList.current,'33322221111');
|
|
4535
|
-
// if(newHotQuestionsList.current.length > 0){
|
|
4536
|
-
// questionsList = newHotQuestionsList.current.map((item, index) => {
|
|
4537
|
-
// if (index < 3) {
|
|
4538
|
-
// return {
|
|
4539
|
-
// key: "messageSource",
|
|
4540
|
-
// value: item.id,
|
|
4541
|
-
// question: item.question,
|
|
4542
|
-
// answer: item.answer,
|
|
4543
|
-
// };
|
|
4544
|
-
// } else {
|
|
4545
|
-
// return null;
|
|
4546
|
-
// }
|
|
4547
|
-
// });
|
|
4548
|
-
// }else{
|
|
4549
|
-
// questionsList = hotQuestionsList.map((item, index) => {
|
|
4550
|
-
// if (index < 3) {
|
|
4551
|
-
// return {
|
|
4552
|
-
// key: "messageSource",
|
|
4553
|
-
// value: item.id,
|
|
4554
|
-
// question: item.question,
|
|
4555
|
-
// answer: item.answer,
|
|
4556
|
-
// };
|
|
4557
|
-
// } else {
|
|
4558
|
-
// return null;
|
|
4559
|
-
// }
|
|
4560
|
-
// });
|
|
4561
|
-
// }
|
|
4562
|
-
// questionsList = questionsList.filter((i) => i != null);
|
|
4563
|
-
// obj = {
|
|
4564
|
-
// roomId: roomId,
|
|
4565
|
-
// sender: "AI",
|
|
4566
|
-
// recevier: mid,
|
|
4567
|
-
// message: `Hi,我是智能学习助手,你遇到了什么问题?`,
|
|
4568
|
-
// extraInfos: questionsList,
|
|
4569
|
-
// };
|
|
4570
|
-
// if(pageNumHistory <= 1){
|
|
4571
|
-
// setHistoryMessageList((historyMessageList) => {
|
|
4572
|
-
// let newHistoryMessageList = historyMessageList.filter(e=>e.id!='123456_date');
|
|
4573
|
-
// newHistoryMessageList.push({
|
|
4574
|
-
// ...obj,
|
|
4575
|
-
// id: '123456_date',
|
|
4576
|
-
// upvoted: false,
|
|
4577
|
-
// downvoted: false,
|
|
4578
|
-
// quotedMessage: "",
|
|
4579
|
-
// createdAt: getDataTime(-1),
|
|
4580
|
-
// extraInfo: JSON.stringify(obj.extraInfos),
|
|
4581
|
-
// // extraInfo: JSON.stringify([
|
|
4582
|
-
// // {
|
|
4583
|
-
// // key: "messageSource",
|
|
4584
|
-
// // value: "knowledgebase",
|
|
4585
|
-
// // },
|
|
4586
|
-
// // ]),
|
|
4587
|
-
// });
|
|
4588
|
-
// return newHistoryMessageList;
|
|
4589
|
-
// });
|
|
4590
|
-
// scrollToBottom();
|
|
4591
|
-
// }
|
|
4592
4574
|
return;
|
|
4593
4575
|
} else if (type == 2) {
|
|
4594
4576
|
obj = {
|
|
@@ -4649,35 +4631,7 @@ var CustomerService = function(props) {
|
|
|
4649
4631
|
]
|
|
4650
4632
|
};
|
|
4651
4633
|
} else if (type == 6) {
|
|
4652
|
-
|
|
4653
|
-
return {
|
|
4654
|
-
key: "messageSource",
|
|
4655
|
-
value: item.id,
|
|
4656
|
-
question: item.question,
|
|
4657
|
-
answer: item.answer
|
|
4658
|
-
};
|
|
4659
|
-
});
|
|
4660
|
-
obj = {
|
|
4661
|
-
roomId: roomId,
|
|
4662
|
-
sender: "AI",
|
|
4663
|
-
recevier: mid,
|
|
4664
|
-
message: "猜你想问:",
|
|
4665
|
-
extraInfos: questionsList
|
|
4666
|
-
};
|
|
4667
|
-
if (pageNumHistory <= 1) {
|
|
4668
|
-
setHistoryMessageList(function(historyMessageList) {
|
|
4669
|
-
var newHistoryMessageList = historyMessageList.concat(_object_spread_props(_object_spread({}, obj), {
|
|
4670
|
-
id: "p" + new Date().getTime(),
|
|
4671
|
-
upvoted: false,
|
|
4672
|
-
downvoted: false,
|
|
4673
|
-
quotedMessage: "",
|
|
4674
|
-
createdAt: getDataTime(-1),
|
|
4675
|
-
extraInfo: JSON.stringify(obj.extraInfos)
|
|
4676
|
-
}));
|
|
4677
|
-
return newHistoryMessageList;
|
|
4678
|
-
});
|
|
4679
|
-
scrollToBottom();
|
|
4680
|
-
}
|
|
4634
|
+
getAssociativeProblem();
|
|
4681
4635
|
return;
|
|
4682
4636
|
}
|
|
4683
4637
|
setKeyWord("");
|
|
@@ -4903,10 +4857,6 @@ var CustomerService = function(props) {
|
|
|
4903
4857
|
scrollToBottom();
|
|
4904
4858
|
}
|
|
4905
4859
|
console.log(type, "接受答案77777");
|
|
4906
|
-
//获取下面的推荐问题
|
|
4907
|
-
// if(type == 2){
|
|
4908
|
-
// videoPageQuestiionsList(2);
|
|
4909
|
-
// }
|
|
4910
4860
|
http.post("".concat(urllocation, "/chat-service/public/v1.0/history-messages"), obj).then(function(res) {
|
|
4911
4861
|
if (res.data.id) {
|
|
4912
4862
|
if (pageNumHistory <= 1) {
|