bhd-components 0.10.6 → 0.10.7
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/dist/index.esm.es5.development.css +1117 -1115
- package/dist/index.esm.es5.development.js +80 -50
- 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/AIMessageList/components/copyIcon/index.js +3 -3
- package/es2017/AIMessageList/components/fileList/index.js +5 -1
- package/es2017/AIMessageList/components/footer/index.js +19 -11
- package/es2017/AIMessageList/components/header/index.js +4 -4
- package/es2017/AIMessageList/components/referencesIcon/index.js +1 -1
- package/es2017/AIMessageList/components/refreshBtn/index.js +1 -1
- package/es2017/AIMessageList/components/remarkBtn/index.js +2 -2
- package/es2017/AIMessageList/components/virtuosoList/index.js +36 -24
- package/es2017/AIMessageList/type.d.ts +4 -2
- package/es2017/customerService/historyFun.js +7 -1
- package/es2017/customerService/index.module.less +1 -0
- package/es2017/customerService/index2.module.less +1 -0
- package/esm/AIMessageList/components/copyIcon/index.js +3 -3
- package/esm/AIMessageList/components/fileList/index.js +5 -1
- package/esm/AIMessageList/components/footer/index.js +18 -10
- package/esm/AIMessageList/components/header/index.js +4 -4
- package/esm/AIMessageList/components/referencesIcon/index.js +1 -1
- package/esm/AIMessageList/components/refreshBtn/index.js +1 -1
- package/esm/AIMessageList/components/remarkBtn/index.js +2 -2
- package/esm/AIMessageList/components/virtuosoList/index.js +36 -24
- package/esm/AIMessageList/type.d.ts +4 -2
- package/esm/customerService/historyFun.js +7 -1
- package/esm/customerService/index.module.less +1 -0
- package/esm/customerService/index2.module.less +1 -0
- package/package.json +1 -1
|
@@ -2678,7 +2678,7 @@ function BhdAppLayout(props) {
|
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
2680
|
|
|
2681
|
-
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"
|
|
2681
|
+
var modules_63b47c51$f = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__00686be6","ChatWindow_Modal":"index_module_ChatWindow_Modal__00686be6","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__00686be6","header_wrap":"index_module_header_wrap__00686be6","top":"index_module_top__00686be6","user":"index_module_user__00686be6","count":"index_module_count__00686be6","operate":"index_module_operate__00686be6","line":"index_module_line__00686be6","popover_main":"index_module_popover_main__00686be6","popover":"index_module_popover__00686be6","header_wrap_newlabo":"index_module_header_wrap_newlabo__00686be6","Drawer_main":"index_module_Drawer_main__00686be6","loading":"index_module_loading__00686be6","message_con":"index_module_message_con__00686be6","left":"index_module_left__00686be6","head_sculpture":"index_module_head_sculpture__00686be6","main_content":"index_module_main_content__00686be6","right":"index_module_right__00686be6","main":"index_module_main__00686be6","main_content_flag":"index_module_main_content_flag__00686be6","operate_modal":"index_module_operate_modal__00686be6","operate_modal_bottom":"index_module_operate_modal_bottom__00686be6","active":"index_module_active__00686be6","stop_generate":"index_module_stop_generate__00686be6","icon":"index_module_icon__00686be6","find_teacher":"index_module_find_teacher__00686be6","stop_findTeacher":"index_module_stop_findTeacher__00686be6","content":"index_module_content__00686be6","content_child":"index_module_content_child__00686be6","find_teacher_con":"index_module_find_teacher_con__00686be6","sign":"index_module_sign__00686be6","ask_question":"index_module_ask_question__00686be6","bottom":"index_module_bottom__00686be6","association_problem":"index_module_association_problem__00686be6","association_problem_flag":"index_module_association_problem_flag__00686be6","related_issues_flag":"index_module_related_issues_flag__00686be6","img_con":"index_module_img_con__00686be6","mask_zoom":"index_module_mask_zoom__00686be6","img_con2":"index_module_img_con2__00686be6","copyCode":"index_module_copyCode__00686be6","time":"index_module_time__00686be6","citation_content":"index_module_citation_content__00686be6","text_exceed":"index_module_text_exceed__00686be6","popover_content":"index_module_popover_content__00686be6","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__00686be6","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__00686be6","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__00686be6","issues_list_teacherList":"index_module_issues_list_teacherList__00686be6","item":"index_module_item__00686be6","issues_list":"index_module_issues_list__00686be6","issues_list_flag":"index_module_issues_list_flag__00686be6","Drawer_buttom":"index_module_Drawer_buttom__00686be6","input_wrap":"index_module_input_wrap__00686be6","input":"index_module_input__00686be6","picture_layout":"index_module_picture_layout__00686be6","icon_close":"index_module_icon_close__00686be6","icon_zoom":"index_module_icon_zoom__00686be6","anticon":"index_module_anticon__00686be6","no_AI":"index_module_no_AI__00686be6","screenshot":"index_module_screenshot__00686be6","disabled":"index_module_disabled__00686be6","content_main":"index_module_content_main__00686be6","content_con":"index_module_content_con__00686be6","delete_quote":"index_module_delete_quote__00686be6","sending":"index_module_sending__00686be6","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__00686be6","main_list":"index_module_main_list__00686be6","chat_content":"index_module_chat_content__00686be6","popover_main_content":"index_module_popover_main_content__00686be6","popover_main_content_name":"index_module_popover_main_content_name__00686be6","teacher_layout":"index_module_teacher_layout__00686be6","delete":"index_module_delete__00686be6","num":"index_module_num__00686be6","shrink":"index_module_shrink__00686be6","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__00686be6","teacher_layout_modal":"index_module_teacher_layout_modal__00686be6","ai":"index_module_ai__00686be6","user_info":"index_module_user_info__00686be6","message":"index_module_message__00686be6","con":"index_module_con__00686be6","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__00686be6","history_list":"index_module_history_list__00686be6","search_layout":"index_module_search_layout__00686be6","mymove":"index_module_mymove__00686be6","title":"index_module_title__00686be6","search_top":"index_module_search_top__00686be6","list_item":"index_module_list_item__00686be6","list_summary":"index_module_list_summary__00686be6","head_img":"index_module_head_img__00686be6","list_desc":"index_module_list_desc__00686be6","name":"index_module_name__00686be6","decs":"index_module_decs__00686be6","open":"index_module_open__00686be6","list_summary_active":"index_module_list_summary_active__00686be6","list_detail":"index_module_list_detail__00686be6","list":"index_module_list__00686be6","list_more":"index_module_list_more__00686be6","no_data":"index_module_no_data__00686be6","history_list_broadside":"index_module_history_list_broadside__00686be6","teacher_list":"index_module_teacher_list__00686be6","screenshot_Modal":"index_module_screenshot_Modal__00686be6","ReactCrop":"index_module_ReactCrop__00686be6","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__00686be6"};
|
|
2682
2682
|
|
|
2683
2683
|
function BaseHOC(key) {
|
|
2684
2684
|
return function(props) {
|
|
@@ -3375,7 +3375,13 @@ var HistoryFun = function(props) {
|
|
|
3375
3375
|
return /*#__PURE__*/ jsxs("div", {
|
|
3376
3376
|
className: modules_63b47c51$f.list,
|
|
3377
3377
|
onClick: function() {
|
|
3378
|
-
calculationData(item.roomId, list.id, list.receiver);
|
|
3378
|
+
calculationData(item.roomId, list.id, props.userData.mid == list.sender ? list.receiver : list.sender);
|
|
3379
|
+
console.log("答应一下111111", {
|
|
3380
|
+
roomId: item.roomId,
|
|
3381
|
+
id: list.id,
|
|
3382
|
+
sender: list.sender
|
|
3383
|
+
});
|
|
3384
|
+
// calculationData(item.roomId, list.id, list.sender);
|
|
3379
3385
|
},
|
|
3380
3386
|
children: [
|
|
3381
3387
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -12943,11 +12949,11 @@ var defaultProps$1 = {
|
|
|
12943
12949
|
gradientUnits: "userSpaceOnUse",
|
|
12944
12950
|
children: [
|
|
12945
12951
|
/*#__PURE__*/ jsx("stop", {
|
|
12946
|
-
|
|
12952
|
+
stopColor: "#F87AFD"
|
|
12947
12953
|
}),
|
|
12948
12954
|
/*#__PURE__*/ jsx("stop", {
|
|
12949
12955
|
offset: "1",
|
|
12950
|
-
|
|
12956
|
+
stopColor: "#41DAF8"
|
|
12951
12957
|
})
|
|
12952
12958
|
]
|
|
12953
12959
|
}),
|
|
@@ -12960,11 +12966,11 @@ var defaultProps$1 = {
|
|
|
12960
12966
|
gradientUnits: "userSpaceOnUse",
|
|
12961
12967
|
children: [
|
|
12962
12968
|
/*#__PURE__*/ jsx("stop", {
|
|
12963
|
-
|
|
12969
|
+
stopColor: "#F87AFD"
|
|
12964
12970
|
}),
|
|
12965
12971
|
/*#__PURE__*/ jsx("stop", {
|
|
12966
12972
|
offset: "1",
|
|
12967
|
-
|
|
12973
|
+
stopColor: "#41DAF8"
|
|
12968
12974
|
})
|
|
12969
12975
|
]
|
|
12970
12976
|
})
|
|
@@ -13023,12 +13029,12 @@ var copyIconSvg = /*#__PURE__*/ jsx("i", {
|
|
|
13023
13029
|
width: "1em",
|
|
13024
13030
|
height: "1em",
|
|
13025
13031
|
viewBox: "0 0 14 14",
|
|
13026
|
-
|
|
13032
|
+
shapeRendering: "geometricPrecision",
|
|
13027
13033
|
fill: "currentColor",
|
|
13028
13034
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13029
13035
|
children: [
|
|
13030
13036
|
/*#__PURE__*/ jsx("g", {
|
|
13031
|
-
|
|
13037
|
+
clipPath: "url(#clip0_518_8403)",
|
|
13032
13038
|
children: /*#__PURE__*/ jsx("path", {
|
|
13033
13039
|
d: "M6.16666 1.66666H13.1667C13.4761 1.66666 13.7728 1.78957 13.9916 2.00837C14.2104 2.22716 14.3333 2.5239 14.3333 2.83332V9.83332C14.3333 10.1427 14.2104 10.4395 13.9916 10.6583C13.7728 10.8771 13.4761 11 13.1667 11H6.16666C5.85724 11 5.5605 10.8771 5.34171 10.6583C5.12291 10.4395 5 10.1427 5 9.83332V2.83332C5 2.5239 5.12291 2.22716 5.34171 2.00837C5.5605 1.78957 5.85724 1.66666 6.16666 1.66666ZM6.16666 2.66666C6.12246 2.66666 6.08007 2.68422 6.04881 2.71547C6.01756 2.74673 6 2.78912 6 2.83332V9.83332C6 9.85521 6.00431 9.87688 6.01268 9.8971C6.02106 9.91732 6.03334 9.9357 6.04881 9.95117C6.06429 9.96665 6.08266 9.97893 6.10288 9.9873C6.1231 9.99568 6.14478 9.99999 6.16666 9.99999H13.1667C13.2109 9.99999 13.2533 9.98243 13.2845 9.95117C13.3158 9.91992 13.3333 9.87753 13.3333 9.83332V2.83332C13.3333 2.78912 13.3158 2.74673 13.2845 2.71547C13.2533 2.68422 13.2109 2.66666 13.1667 2.66666H6.16666ZM10 12C10 11.8674 10.0527 11.7402 10.1464 11.6464C10.2402 11.5527 10.3674 11.5 10.5 11.5C10.6326 11.5 10.7598 11.5527 10.8536 11.6464C10.9473 11.7402 11 11.8674 11 12V13.1667C11 13.4761 10.8771 13.7728 10.6583 13.9916C10.4395 14.2104 10.1427 14.3333 9.83333 14.3333H2.83333C2.52391 14.3333 2.22717 14.2104 2.00837 13.9916C1.78958 13.7728 1.66666 13.4761 1.66666 13.1667V6.16666C1.66666 5.85724 1.78958 5.56049 2.00837 5.3417C2.22717 5.12291 2.52391 4.99999 2.83333 4.99999H4C4.13261 4.99999 4.25978 5.05267 4.35355 5.14644C4.44732 5.2402 4.5 5.36738 4.5 5.49999C4.5 5.6326 4.44732 5.75978 4.35355 5.85354C4.25978 5.94731 4.13261 5.99999 4 5.99999H2.83333C2.78913 5.99999 2.74674 6.01755 2.71548 6.04881C2.68422 6.08006 2.66666 6.12245 2.66666 6.16666V13.1667C2.66666 13.2109 2.68422 13.2533 2.71548 13.2845C2.74674 13.3158 2.78913 13.3333 2.83333 13.3333H9.83333C9.87753 13.3333 9.91993 13.3158 9.95118 13.2845C9.98244 13.2533 10 13.2109 10 13.1667V12Z"
|
|
13034
13040
|
})
|
|
@@ -13049,7 +13055,7 @@ var copySuccessSvg = /*#__PURE__*/ jsx("i", {
|
|
|
13049
13055
|
children: /*#__PURE__*/ jsx("svg", {
|
|
13050
13056
|
width: "1em",
|
|
13051
13057
|
height: "1em",
|
|
13052
|
-
|
|
13058
|
+
shapeRendering: "geometricPrecision",
|
|
13053
13059
|
fill: "currentColor",
|
|
13054
13060
|
viewBox: "0 0 12 7",
|
|
13055
13061
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13096,7 +13102,7 @@ var referencesIcon = /*#__PURE__*/ jsx("i", {
|
|
|
13096
13102
|
children: /*#__PURE__*/ jsxs("svg", {
|
|
13097
13103
|
width: "1em",
|
|
13098
13104
|
height: "1em",
|
|
13099
|
-
|
|
13105
|
+
shapeRendering: "geometricPrecision",
|
|
13100
13106
|
fill: "currentColor",
|
|
13101
13107
|
viewBox: "0 0 14 14",
|
|
13102
13108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13146,7 +13152,7 @@ var upvoteBtnSvg = /*#__PURE__*/ jsx("svg", {
|
|
|
13146
13152
|
width: "1em",
|
|
13147
13153
|
height: "1em",
|
|
13148
13154
|
viewBox: "0 0 16 16",
|
|
13149
|
-
|
|
13155
|
+
shapeRendering: "geometricPrecision",
|
|
13150
13156
|
fill: "currentColor",
|
|
13151
13157
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13152
13158
|
children: /*#__PURE__*/ jsx("path", {
|
|
@@ -13156,7 +13162,7 @@ var upvoteBtnSvg = /*#__PURE__*/ jsx("svg", {
|
|
|
13156
13162
|
var downvoteBtnSvg = /*#__PURE__*/ jsx("svg", {
|
|
13157
13163
|
width: "1em",
|
|
13158
13164
|
height: "1em",
|
|
13159
|
-
|
|
13165
|
+
shapeRendering: "geometricPrecision",
|
|
13160
13166
|
fill: "currentColor",
|
|
13161
13167
|
viewBox: "0 0 16 16",
|
|
13162
13168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13201,7 +13207,7 @@ var refreshSvg = /*#__PURE__*/ jsx("svg", {
|
|
|
13201
13207
|
width: "1em",
|
|
13202
13208
|
height: "1em",
|
|
13203
13209
|
fill: "currentColor",
|
|
13204
|
-
|
|
13210
|
+
shapeRendering: "geometricPrecision",
|
|
13205
13211
|
"aria-hidden": "true",
|
|
13206
13212
|
children: /*#__PURE__*/ jsx("path", {
|
|
13207
13213
|
d: "M8 3.80001C7.27938 3.80001 6.60141 3.97512 6.00464 4.2846C5.71048 4.43715 5.34834 4.32235 5.19579 4.02818C5.04324 3.73401 5.15804 3.37187 5.4522 3.21932C6.21563 2.82342 7.0826 2.60001 8 2.60001C11.0603 2.60001 13.5412 5.08088 13.5412 8.14118C13.5412 8.40936 13.5221 8.67343 13.4851 8.93202C13.4737 9.01141 13.4607 9.09026 13.446 9.16853L13.7175 9.02364C14.0098 8.86759 14.3733 8.97808 14.5293 9.27041C14.6854 9.56274 14.5749 9.92622 14.2825 10.0823L12.6718 10.9421C12.3819 11.0968 12.0215 10.9896 11.8633 10.7016L11.0035 9.13588C10.844 8.84542 10.9501 8.48065 11.2406 8.32115C11.5311 8.16164 11.8958 8.2678 12.0553 8.55825L12.2672 8.94405C12.2784 8.88383 12.2885 8.82318 12.2972 8.76211C12.3261 8.55962 12.3412 8.35233 12.3412 8.14118C12.3412 5.74362 10.3976 3.80001 8 3.80001ZM3.32824 5.34029C3.61811 5.18556 3.97853 5.29278 4.13669 5.58079L4.99651 7.14649C5.15601 7.43694 5.04986 7.80171 4.7594 7.96122C4.46895 8.12072 4.10418 8.01457 3.94467 7.72411L3.73281 7.33832C3.72156 7.39853 3.71155 7.45919 3.70282 7.52026C3.67386 7.72275 3.65883 7.93003 3.65883 8.14118C3.65883 10.5387 5.60244 12.4824 8 12.4824C8.72063 12.4824 9.39859 12.3072 9.99536 11.9978C10.2895 11.8452 10.6517 11.96 10.8042 12.2542C10.9568 12.5484 10.842 12.9105 10.5478 13.063C9.78437 13.4589 8.9174 13.6824 8 13.6824C4.93969 13.6824 2.45883 11.2015 2.45883 8.14118C2.45883 7.87301 2.47792 7.60894 2.51491 7.35034C2.52627 7.27095 2.5393 7.19211 2.55399 7.11384L2.28254 7.25873C1.99021 7.41477 1.62673 7.30429 1.47069 7.01196C1.31465 6.71963 1.42513 6.35615 1.71746 6.20011L3.32824 5.34029Z"
|
|
@@ -13277,7 +13283,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
13277
13283
|
maxPage: Math.ceil(total / pageSize)
|
|
13278
13284
|
});
|
|
13279
13285
|
var timeRenderCache = useRef(new Map()).current;
|
|
13280
|
-
|
|
13286
|
+
useRef(new Map()).current;
|
|
13281
13287
|
useImperativeHandle(ref, function() {
|
|
13282
13288
|
return {
|
|
13283
13289
|
addMsg: function(msg) {
|
|
@@ -13326,6 +13332,13 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
13326
13332
|
},
|
|
13327
13333
|
changeDataSource: function(data) {
|
|
13328
13334
|
setDataSource(data);
|
|
13335
|
+
},
|
|
13336
|
+
scrollToBottom: function scrollToBottom() {
|
|
13337
|
+
if (!virtuosoRef.current) return;
|
|
13338
|
+
virtuosoRef.current.scrollToIndex({
|
|
13339
|
+
index: "LAST",
|
|
13340
|
+
behavior: "auto"
|
|
13341
|
+
});
|
|
13329
13342
|
}
|
|
13330
13343
|
};
|
|
13331
13344
|
});
|
|
@@ -13342,18 +13355,18 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
13342
13355
|
}, []);
|
|
13343
13356
|
useEffect(function() {
|
|
13344
13357
|
if (!virtuosoRef.current) return;
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13358
|
+
// virtuosoRef.current.scrollToIndex({
|
|
13359
|
+
// index: "LAST", // 或者使用 dataSource.length - 1
|
|
13360
|
+
// behavior: "auto", // 可以是 "smooth" 实现平滑滚动
|
|
13361
|
+
// });
|
|
13362
|
+
// clearTimeout(timerRef.current.scrollTimer);
|
|
13363
|
+
// timerRef.current.scrollTimer = setTimeout(() => {
|
|
13364
|
+
// virtuosoRef.current.scrollToIndex({
|
|
13365
|
+
// index: "LAST", // 或者使用 dataSource.length - 1
|
|
13366
|
+
// behavior: "auto", // 可以是 "smooth" 实现平滑滚动
|
|
13367
|
+
// align: "end",
|
|
13368
|
+
// });
|
|
13369
|
+
// }, 500);
|
|
13357
13370
|
}, [
|
|
13358
13371
|
dataSource
|
|
13359
13372
|
]);
|
|
@@ -13400,21 +13413,26 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
13400
13413
|
]);
|
|
13401
13414
|
var itemContent = function(index, item) {
|
|
13402
13415
|
var timeNode = renderTime(item);
|
|
13403
|
-
|
|
13416
|
+
item.id + "-" + item.content;
|
|
13404
13417
|
var contentNode = null;
|
|
13405
|
-
if (htmlRenderCache.has(cahceKey)) {
|
|
13406
|
-
|
|
13407
|
-
} else {
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13418
|
+
// if (htmlRenderCache.has(cahceKey)) {
|
|
13419
|
+
// contentNode = htmlRenderCache.get(cahceKey);
|
|
13420
|
+
// } else {
|
|
13421
|
+
// const html = markToHtml(item.content, item.id);
|
|
13422
|
+
// contentNode = <div dangerouslySetInnerHTML={{ __html: html }}></div>;
|
|
13423
|
+
// if (coverRenderText) {
|
|
13424
|
+
// contentNode = coverRenderText(item, html);
|
|
13425
|
+
// }
|
|
13426
|
+
// htmlRenderCache.set(cahceKey, contentNode);
|
|
13427
|
+
// }
|
|
13428
|
+
var html = markToHtml(item.content, item.id);
|
|
13429
|
+
contentNode = /*#__PURE__*/ jsx("div", {
|
|
13430
|
+
dangerouslySetInnerHTML: {
|
|
13431
|
+
__html: html
|
|
13416
13432
|
}
|
|
13417
|
-
|
|
13433
|
+
});
|
|
13434
|
+
if (coverRenderText) {
|
|
13435
|
+
contentNode = coverRenderText(item, html);
|
|
13418
13436
|
}
|
|
13419
13437
|
// 是否显示时间
|
|
13420
13438
|
var itemNode = /*#__PURE__*/ jsx("div", {
|
|
@@ -14916,12 +14934,16 @@ var FileList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
14916
14934
|
return recordObj.current.fileList;
|
|
14917
14935
|
},
|
|
14918
14936
|
vaildFile: vaildFile,
|
|
14919
|
-
fileToCustomFile: fileToCustomFile
|
|
14937
|
+
fileToCustomFile: fileToCustomFile,
|
|
14938
|
+
clearFileList: clearFileList
|
|
14920
14939
|
};
|
|
14921
14940
|
});
|
|
14922
14941
|
var getCls = function(clsName) {
|
|
14923
14942
|
return modules_63b47c51$1[clsName] + " " + prefix + "-" + clsName;
|
|
14924
14943
|
};
|
|
14944
|
+
var clearFileList = function() {
|
|
14945
|
+
setFileList([]);
|
|
14946
|
+
};
|
|
14925
14947
|
var vaildFile = function(file, fileId) {
|
|
14926
14948
|
if (fileUpload.maxCount > 0 && recordObj.current.fileList.length > fileUpload.maxCount) {
|
|
14927
14949
|
errorCallback({
|
|
@@ -15463,6 +15485,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15463
15485
|
var msgContent = "";
|
|
15464
15486
|
setSending(true);
|
|
15465
15487
|
setTextValue("");
|
|
15488
|
+
fileListRef.current.clearFileList();
|
|
15466
15489
|
setReferencesSource(null);
|
|
15467
15490
|
var recordMsgObj = {};
|
|
15468
15491
|
var arg = [
|
|
@@ -15472,11 +15495,22 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15472
15495
|
];
|
|
15473
15496
|
beforeSendMsg.apply(void 0, _to_consumable_array(arg)).then(function(beforeInfo) {
|
|
15474
15497
|
var callback = function() {
|
|
15498
|
+
var isClose = false;
|
|
15499
|
+
var closeCallback = function() {
|
|
15500
|
+
if (isClose) return;
|
|
15501
|
+
isClose = true;
|
|
15502
|
+
onClose();
|
|
15503
|
+
setSending(false);
|
|
15504
|
+
if (recordMsgObj.id) {
|
|
15505
|
+
apiRef.contentApi.recordMsg(recordMsgObj);
|
|
15506
|
+
}
|
|
15507
|
+
console.log("onclose: ", recordMsgObj);
|
|
15508
|
+
};
|
|
15475
15509
|
fetchEventSource(url, _object_spread({
|
|
15476
15510
|
method: method,
|
|
15477
15511
|
headers: _object_spread({
|
|
15478
15512
|
"Content-Type": "application/json",
|
|
15479
|
-
|
|
15513
|
+
Accept: "text/event-stream,application/json"
|
|
15480
15514
|
}, headers()),
|
|
15481
15515
|
body: params.apply(void 0, _to_consumable_array(arg).concat([
|
|
15482
15516
|
beforeInfo
|
|
@@ -15494,7 +15528,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15494
15528
|
return null;
|
|
15495
15529
|
},
|
|
15496
15530
|
onmessage: function(ev) {
|
|
15497
|
-
var data = onMessage(ev);
|
|
15531
|
+
var data = onMessage(ev, closeCallback);
|
|
15498
15532
|
msgContent += data.content;
|
|
15499
15533
|
delete data.content;
|
|
15500
15534
|
recordMsgObj = _object_spread({
|
|
@@ -15504,18 +15538,14 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
15504
15538
|
reference: null,
|
|
15505
15539
|
source: null
|
|
15506
15540
|
}, data);
|
|
15541
|
+
apiRef.contentApi.updateMsg(msgId, recordMsgObj);
|
|
15542
|
+
msgId = data.id;
|
|
15507
15543
|
updateMsgRef.current = setTimeout(function() {
|
|
15508
|
-
apiRef.contentApi.
|
|
15509
|
-
msgId = data.id;
|
|
15544
|
+
apiRef.contentApi.scrollToBottom();
|
|
15510
15545
|
}, 100);
|
|
15511
15546
|
},
|
|
15512
15547
|
onclose: function() {
|
|
15513
|
-
|
|
15514
|
-
setSending(false);
|
|
15515
|
-
if (recordMsgObj.id) {
|
|
15516
|
-
apiRef.contentApi.recordMsg(recordMsgObj);
|
|
15517
|
-
}
|
|
15518
|
-
console.log("onclose: ", recordMsgObj);
|
|
15548
|
+
closeCallback();
|
|
15519
15549
|
},
|
|
15520
15550
|
onerror: function(err) {
|
|
15521
15551
|
onError(err);
|