bhd-components 0.9.22 → 0.9.24

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.
@@ -1,4 +1,4 @@
1
- import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, u as MinusOutlined, v as PlusOutlined, L as LeftOutlined, R as RightOutlined, w as __generator, x as Input, y as SearchOutlined, B as Spin, D as CloseOutlined, X, F as I, H, G as html2canvas$1, J as Remarkable, K as Drawer, N as HighlightJS, Z as ZoomInOutlined, O as DatePicker, Q as Button } from './vendor.esm.es5.development.js';
1
+ import { z as zhCN, A as App, _ as _object_spread, a as AntdMessage, M as Modal$1, b as AntdNotification, C as ConfigProvider, c as _extends, d as _object_destructuring_empty, j as jsx, e as _object_spread_props, f as jsxs, t as transform, S as StyleProvider, g as _sliced_to_array, T as Tooltip, h as Table$2, I as Icon, E as ExclamationCircleFilled, i as _to_consumable_array, P as Pagination$1, k as Select, l as CaretDownOutlined, m as _inherits, n as _create_super, o as _create_class, p as _class_call_check, q as _define_property, r as _assert_this_initialized, s as _async_to_generator, u as MinusOutlined, v as PlusOutlined, L as LeftOutlined, R as RightOutlined, w as __generator, x as Input$1, y as SearchOutlined, B as Spin, D as CloseOutlined, X, F as I, H, G as html2canvas$1, J as Remarkable, K as Drawer, N as HighlightJS, Z as ZoomInOutlined, O as DatePicker, Q as Button } from './vendor.esm.es5.development.js';
2
2
  export { U as Affix, V as Alert, W as Anchor, a as AntdMessage, A as App, Y as AutoComplete, $ as Avatar, a1 as BackTop, a2 as Badge, a3 as Breadcrumb, Q as Button, a4 as Calendar, a5 as Card, a6 as Carousel, a7 as Cascader, a8 as Checkbox, a9 as Col, aa as Collapse, O as DatePicker, ab as Descriptions, ac as Divider, K as Drawer, ad as Dropdown, ae as Empty, a0 as FloatButton, af as Form, ag as Grid, ah as Image, x as Input, ai as InputNumber, aj as Layout, ak as List, al as Mentions, am as Menu, M as Modal, an as Popconfirm, ao as Popover, ap as Progress, aN as QRCode, aq as Radio, ar as Rate, as as Result, at as Row, au as Segmented, k as Select, av as Skeleton, aw as Slider, ax as Space, B as Spin, ay as Statistic, az as Steps, aA as Switch, aB as Tabs, aC as Tag, aE as TimePicker, aF as Timeline, T as Tooltip, aG as Tour, aH as Transfer, aI as Tree, aJ as TreeSelect, aK as Typography, aL as Upload, aM as Watermark, aP as en_US, b as notification, aD as theme, aO as version, z as zh_CN } from './vendor.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import React__default, { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle, useCallback } from 'react';
@@ -1976,7 +1976,8 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
1976
1976
  });
1977
1977
  _define_property(_assert_this_initialized(_this), "imgErr", function() {
1978
1978
  _this.setState({
1979
- imgError: true
1979
+ imgError: true,
1980
+ actionCloseFlag: 1 //报错时关闭按钮固定右上角
1980
1981
  }, function() {
1981
1982
  _this.moveActionClose();
1982
1983
  });
@@ -2211,7 +2212,7 @@ var ViewImage$1 = AppViewImage;
2211
2212
 
2212
2213
  var modules_63b47c51$3 = {"BhdSelect":"index_module_BhdSelect__0483925f","bhdSelect_option":"index_module_bhdSelect_option__0483925f","bhdSelectDrop":"index_module_bhdSelectDrop__0483925f","selectTitle":"index_module_selectTitle__0483925f","bhdSelectSearch":"index_module_bhdSelectSearch__0483925f","search":"index_module_search__0483925f"};
2213
2214
 
2214
- var Search = Input.Search;
2215
+ var Search = Input$1.Search;
2215
2216
  var RenderDrop = function(param) {
2216
2217
  var menu = param.menu, bhdDropdownRef = param.bhdDropdownRef, mask = param.mask, initHeight = param.initHeight;
2217
2218
  useEffect(function() {
@@ -2255,7 +2256,7 @@ var BhdSelect = function(props) {
2255
2256
  var list = [];
2256
2257
  list = children.filter(function(item) {
2257
2258
  if (props.filterOption == undefined) {
2258
- return item.props[search_label].includes(filterValue);
2259
+ return item.props[search_label] ? String(item.props[search_label]).includes(filterValue) : false;
2259
2260
  } else {
2260
2261
  if (typeof props.filterOption === "function") {
2261
2262
  return props.filterOption(filterValue, item);
@@ -2626,6 +2627,75 @@ function BhdAppLayout(props) {
2626
2627
 
2627
2628
  var modules_63b47c51$1 = {"service_ChatWindow_Drawer":"index_module_service_ChatWindow_Drawer__15161658","ChatWindow_Modal":"index_module_ChatWindow_Modal__15161658","ChatWindow_Drawer":"index_module_ChatWindow_Drawer__15161658","header_wrap":"index_module_header_wrap__15161658","top":"index_module_top__15161658","user":"index_module_user__15161658","count":"index_module_count__15161658","operate":"index_module_operate__15161658","line":"index_module_line__15161658","popover_main":"index_module_popover_main__15161658","popover":"index_module_popover__15161658","header_wrap_newlabo":"index_module_header_wrap_newlabo__15161658","Drawer_main":"index_module_Drawer_main__15161658","loading":"index_module_loading__15161658","message_con":"index_module_message_con__15161658","left":"index_module_left__15161658","head_sculpture":"index_module_head_sculpture__15161658","main_content":"index_module_main_content__15161658","right":"index_module_right__15161658","main":"index_module_main__15161658","main_content_flag":"index_module_main_content_flag__15161658","operate_modal":"index_module_operate_modal__15161658","operate_modal_bottom":"index_module_operate_modal_bottom__15161658","active":"index_module_active__15161658","stop_generate":"index_module_stop_generate__15161658","icon":"index_module_icon__15161658","find_teacher":"index_module_find_teacher__15161658","stop_findTeacher":"index_module_stop_findTeacher__15161658","content":"index_module_content__15161658","content_child":"index_module_content_child__15161658","find_teacher_con":"index_module_find_teacher_con__15161658","sign":"index_module_sign__15161658","ask_question":"index_module_ask_question__15161658","bottom":"index_module_bottom__15161658","association_problem":"index_module_association_problem__15161658","association_problem_flag":"index_module_association_problem_flag__15161658","related_issues_flag":"index_module_related_issues_flag__15161658","img_con":"index_module_img_con__15161658","mask_zoom":"index_module_mask_zoom__15161658","img_con2":"index_module_img_con2__15161658","copyCode":"index_module_copyCode__15161658","time":"index_module_time__15161658","citation_content":"index_module_citation_content__15161658","text_exceed":"index_module_text_exceed__15161658","popover_content":"index_module_popover_content__15161658","Drawer_main_newlabo":"index_module_Drawer_main_newlabo__15161658","Drawer_main_newlabo_no_pic":"index_module_Drawer_main_newlabo_no_pic__15161658","Drawer_buttom_Issues_List":"index_module_Drawer_buttom_Issues_List__15161658","issues_list_teacherList":"index_module_issues_list_teacherList__15161658","item":"index_module_item__15161658","issues_list":"index_module_issues_list__15161658","issues_list_flag":"index_module_issues_list_flag__15161658","Drawer_buttom":"index_module_Drawer_buttom__15161658","input_wrap":"index_module_input_wrap__15161658","input":"index_module_input__15161658","picture_layout":"index_module_picture_layout__15161658","icon_close":"index_module_icon_close__15161658","icon_zoom":"index_module_icon_zoom__15161658","anticon":"index_module_anticon__15161658","no_AI":"index_module_no_AI__15161658","screenshot":"index_module_screenshot__15161658","disabled":"index_module_disabled__15161658","content_main":"index_module_content_main__15161658","content_con":"index_module_content_con__15161658","delete_quote":"index_module_delete_quote__15161658","sending":"index_module_sending__15161658","Drawer_buttom_Issues_List_newlabo":"index_module_Drawer_buttom_Issues_List_newlabo__15161658","main_list":"index_module_main_list__15161658","chat_content":"index_module_chat_content__15161658","popover_main_content":"index_module_popover_main_content__15161658","popover_main_content_name":"index_module_popover_main_content_name__15161658","teacher_layout":"index_module_teacher_layout__15161658","delete":"index_module_delete__15161658","num":"index_module_num__15161658","shrink":"index_module_shrink__15161658","teacher_layout_newlabo":"index_module_teacher_layout_newlabo__15161658","teacher_layout_modal":"index_module_teacher_layout_modal__15161658","ai":"index_module_ai__15161658","user_info":"index_module_user_info__15161658","message":"index_module_message__15161658","con":"index_module_con__15161658","teacher_layout_modal_newlabo":"index_module_teacher_layout_modal_newlabo__15161658","history_list":"index_module_history_list__15161658","search_layout":"index_module_search_layout__15161658","mymove":"index_module_mymove__15161658","title":"index_module_title__15161658","search_top":"index_module_search_top__15161658","list_item":"index_module_list_item__15161658","list_summary":"index_module_list_summary__15161658","head_img":"index_module_head_img__15161658","list_desc":"index_module_list_desc__15161658","name":"index_module_name__15161658","decs":"index_module_decs__15161658","open":"index_module_open__15161658","list_summary_active":"index_module_list_summary_active__15161658","list_detail":"index_module_list_detail__15161658","list":"index_module_list__15161658","list_more":"index_module_list_more__15161658","no_data":"index_module_no_data__15161658","history_list_broadside":"index_module_history_list_broadside__15161658","teacher_list":"index_module_teacher_list__15161658","screenshot_Modal":"index_module_screenshot_Modal__15161658","ReactCrop":"index_module_ReactCrop__15161658","screenshot_Modal_btn":"index_module_screenshot_Modal_btn__15161658"};
2628
2629
 
2630
+ function BaseHOC(key) {
2631
+ return function(props) {
2632
+ var defaultValue = props.defaultValue, value = props.value, onChange = props.onChange, onPressEnter = props.onPressEnter;
2633
+ var hasValue = props.hasOwnProperty("value");
2634
+ // 用户切换到底是显示 value 还是 input
2635
+ // 不能直接用 isOnComposition 原因是,这个值发生变化不会触发重新渲染
2636
+ // 不能只使用 flag 原因是,setFlag 是异步的
2637
+ var _useState = _sliced_to_array(useState(false), 2), flag = _useState[0], setFlag = _useState[1];
2638
+ // 非中文输入时候显示 value。中文输入的时候显示 input
2639
+ var _useState1 = _sliced_to_array(useState(hasValue ? value : defaultValue), 2), input = _useState1[0], setInput = _useState1[1];
2640
+ useEffect(function() {
2641
+ if (hasValue && input !== value) {
2642
+ setInput(value);
2643
+ }
2644
+ }, [
2645
+ value
2646
+ ]);
2647
+ var isOnCompositionRef = useRef(false);
2648
+ function handleChange(e) {
2649
+ setInput(e.target.value);
2650
+ if (isOnCompositionRef.current) return;
2651
+ onChange && onChange(e);
2652
+ }
2653
+ function handleComposition(e) {
2654
+ console.log("e.type", e.type);
2655
+ if ("compositionend" === e.type) {
2656
+ isOnCompositionRef.current = false;
2657
+ handleChange(e);
2658
+ } else {
2659
+ isOnCompositionRef.current = true;
2660
+ }
2661
+ if (flag !== isOnCompositionRef.current) {
2662
+ setFlag(isOnCompositionRef.current);
2663
+ }
2664
+ }
2665
+ var Component = Input$1;
2666
+ if (key) {
2667
+ //@ts-ignore
2668
+ Component = Input$1[key];
2669
+ }
2670
+ function handlePressEnter(e) {
2671
+ console.log("isOnCompositionisOnComposition", isOnCompositionRef.current);
2672
+ setInput(e.target.value);
2673
+ if (isOnCompositionRef.current) return;
2674
+ onPressEnter && onPressEnter(e);
2675
+ }
2676
+ return /*#__PURE__*/ jsx(Component, _object_spread_props(_object_spread({}, props), {
2677
+ value: hasValue && !flag ? value : input,
2678
+ onCompositionStart: handleComposition,
2679
+ onCompositionUpdate: handleComposition,
2680
+ onCompositionEnd: handleComposition,
2681
+ onChange: handleChange,
2682
+ onPressEnter: handlePressEnter
2683
+ }));
2684
+ };
2685
+ }
2686
+ var Component = function Component(props) {
2687
+ return BaseHOC()(props);
2688
+ };
2689
+ Component.Search = function(props) {
2690
+ return BaseHOC("Search")(props);
2691
+ };
2692
+ Component.TextArea = function(props) {
2693
+ return BaseHOC("TextArea")(props);
2694
+ };
2695
+ Component.Password = Input$1.Password;
2696
+ Component.Group = Input$1.Group;
2697
+ var Input = Component;
2698
+
2629
2699
  //消息已读
2630
2700
  var readMessage = function(roomId, urllocation, userData, http) {
2631
2701
  http.patch("".concat(urllocation, "/chat-service/public/v1.0/history-messages:read"), {
@@ -3083,7 +3153,7 @@ var HistoryFun = function(props) {
3083
3153
  className: modules_63b47c51$1.search_top,
3084
3154
  children: [
3085
3155
  /*#__PURE__*/ jsx(SearchOutlined, {}),
3086
- /*#__PURE__*/ jsx(Input, {
3156
+ /*#__PURE__*/ jsx(Input$1, {
3087
3157
  placeholder: "请输入您要搜索的内容",
3088
3158
  value: keyWordProblem,
3089
3159
  onChange: function(e) {
@@ -3806,7 +3876,7 @@ var TeacherList = function(props) {
3806
3876
  className: modules_63b47c51$1.search_top,
3807
3877
  children: [
3808
3878
  /*#__PURE__*/ jsx(SearchOutlined, {}),
3809
- /*#__PURE__*/ jsx(Input, {
3879
+ /*#__PURE__*/ jsx(Input$1, {
3810
3880
  placeholder: "请输入您要召唤的老师姓名",
3811
3881
  value: keyWordProblem,
3812
3882
  onChange: function(e) {
@@ -8373,16 +8443,29 @@ var CustomerService = function(props) {
8373
8443
  getHistoryMessage(pageNum, 1);
8374
8444
  }
8375
8445
  }
8446
+ // //复制代码功能
8447
+ // let chat_content = document.getElementById('chat_content');
8448
+ // if(chat_content){
8449
+ // chat_content = document.getElementById('chat_content');
8450
+ // delegate(chat_content, 'click', `.${styles.copyCode}`, (event:any, target:any) => {
8451
+ // findCopyContent(event);
8452
+ // });
8453
+ // }
8454
+ }, [
8455
+ roomId
8456
+ ]);
8457
+ useEffect(function() {
8376
8458
  //复制代码功能
8377
- var chat_content = document.getElementById("chat_content");
8459
+ var chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
8378
8460
  if (chat_content) {
8379
- chat_content = document.getElementById("chat_content");
8461
+ chat_content = document.getElementById(showType == 1 || showType == 3 ? "chat_content" : "chat_content_modal");
8380
8462
  delegate(chat_content, "click", ".".concat(styles.copyCode), function(event, target) {
8381
8463
  findCopyContent(event);
8382
8464
  });
8383
8465
  }
8384
8466
  }, [
8385
- roomId
8467
+ roomId,
8468
+ showType
8386
8469
  ]);
8387
8470
  //进入页面,发送打招呼信息
8388
8471
  useEffect(function() {
@@ -12629,4 +12712,4 @@ var BhdDatePicker = /*#__PURE__*/ forwardRef(function(props, ref) {
12629
12712
  });
12630
12713
  var BhdDatePicker$1 = BhdDatePicker;
12631
12714
 
12632
- export { BhdAppLayout, BhdDatePicker$1 as BhdDatePicker, BhdSelect$1 as BhdSelect, BhdTableSelect$1 as BhdTableSelect, BhdTableSimple$1 as BhdTableSimple, BhdTipModal$1 as BhdTipModal, CustomerService$1 as CustomerService, Pagination, Provider$1 as Provider, Table$1 as Table, TextTootip$1 as TextTootip, TitleBar$1 as TitleBar, ViewImage$1 as ViewImage, message };
12715
+ export { BhdAppLayout, BhdDatePicker$1 as BhdDatePicker, Input as BhdEnterInput, BhdSelect$1 as BhdSelect, BhdTableSelect$1 as BhdTableSelect, BhdTableSimple$1 as BhdTableSimple, BhdTipModal$1 as BhdTipModal, CustomerService$1 as CustomerService, Pagination, Provider$1 as Provider, Table$1 as Table, TextTootip$1 as TextTootip, TitleBar$1 as TitleBar, ViewImage$1 as ViewImage, message };