cnhis-design-vue 3.2.8-beta.6 → 3.2.8-beta.8

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.
Files changed (104) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +75 -0
  3. package/es/components/ai-chat/index.js +1 -0
  4. package/es/components/ai-chat/src/Index.vue.d.ts +77 -0
  5. package/es/components/ai-chat/src/Index.vue.js +1 -0
  6. package/es/components/ai-chat/src/Index.vue2.js +1 -0
  7. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +14 -0
  8. package/es/components/ai-chat/src/components/ChatFooter.vue.js +1 -0
  9. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -0
  10. package/es/components/ai-chat/src/components/ChatMain.d.ts +8 -0
  11. package/es/components/ai-chat/src/components/ChatMain.js +1 -0
  12. package/es/components/ai-chat/src/types/index.d.ts +20 -0
  13. package/es/components/ai-chat/src/types/index.js +1 -0
  14. package/es/components/ai-chat/style/index.css +1 -0
  15. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  16. package/es/components/audio-sdk/src/components/recordingDialog.vue2.js +1 -1
  17. package/es/components/button-print/index.d.ts +7 -0
  18. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -0
  19. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +7 -0
  20. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  21. package/es/components/button-print/style/index.css +1 -1
  22. package/es/components/calendar/src/Calendar.vue2.js +1 -1
  23. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  24. package/es/components/field-set/src/FieldColor.vue.d.ts +2 -2
  25. package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -2
  26. package/es/components/field-set/src/FieldSet.vue.d.ts +3 -3
  27. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  28. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  29. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  30. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  31. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  32. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  33. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
  34. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  35. package/es/components/form-render/src/components/renderer/select.js +1 -1
  36. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  37. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  38. package/es/components/guide/src/renderer.js +1 -1
  39. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  40. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  41. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  42. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  43. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
  44. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -1
  45. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  46. package/es/components/index.css +1 -1
  47. package/es/components/index.d.ts +2 -1
  48. package/es/components/index.js +1 -1
  49. package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
  50. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  51. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  52. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  53. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
  54. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
  55. package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
  56. package/es/components/step-notice/src/hooks/useTheme.js +1 -1
  57. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  58. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  59. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  60. package/es/shared/assets/img/ai__avatar.png.js +1 -0
  61. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  62. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  63. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  64. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  65. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  66. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  67. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  68. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  69. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  70. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  71. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  72. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  73. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  74. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  75. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  76. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  77. package/es/shared/assets/img/failure.png.js +1 -1
  78. package/es/shared/assets/img/no-permission.png.js +1 -1
  79. package/es/shared/assets/img/nodata.png.js +1 -1
  80. package/es/shared/assets/img/notfound.png.js +1 -1
  81. package/es/shared/assets/img/qr.png.js +1 -1
  82. package/es/shared/assets/img/success.png.js +1 -1
  83. package/es/shared/assets/img/table_style_2.png.js +1 -1
  84. package/es/shared/assets/img/video.png.js +1 -1
  85. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  86. package/es/shared/assets/img/xb_big.png.js +1 -1
  87. package/es/shared/assets/img/xb_small.png.js +1 -1
  88. package/es/shared/hooks/index.d.ts +1 -0
  89. package/es/shared/hooks/index.js +1 -1
  90. package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
  91. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
  92. package/es/shared/hooks/useFormRequest/index.js +1 -1
  93. package/es/shared/hooks/useLevelSearchCascader.js +1 -1
  94. package/es/shared/hooks/useScrollLoading.d.ts +2 -0
  95. package/es/shared/hooks/useScrollLoading.js +1 -0
  96. package/es/shared/package.json.js +1 -1
  97. package/package.json +2 -2
  98. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  99. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  100. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  101. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  102. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  103. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  104. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1 +1 @@
1
- import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import"naive-ui";import{computed as o,inject as r,ref as t,watch as u,toRaw as a}from"vue";import"@vueuse/core";import"date-fns";import{uniqBy as i,isString as s,isEqual as c,omit as v,isFunction as d}from"lodash-es";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormGlobalProps as g,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{useFormField as k}from"./useFormField.js";import{traverseDependKey as w}from"../utils/schema.js";import{getAbsoluteKey as C,formRenderLog as b}from"../utils/index.js";function R(e,l){const n=t();return o({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function F(e,l,t,u,a){const s=R(e,"commonList"),c=R(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return n(e.itemObj)}const K=o((()=>{var e,l;return null!=(l=null==(e=s.value)?void 0:e.map(g))?l:[]})),w=o((()=>{var e,l;return null!=(l=null==(e=c.value)?void 0:e.map(g))?l:[]})),C=o((()=>{if(!e.recommend||!K.value.length&&!w.value.length)return l.value;const n=i(K.value.concat(w.value),(e=>e[a.value])),o=l.value.filter((e=>n.every((function(l){return l[a.value]!==e[a.value]}))));return[...h(n,u.value),...o]})),{getRecommendRequestInfo:b,getHttpInstance:F}=m();function O(l){const{url:n,getRecommendIds:o}=b(),r=d(o)?o():{},t=d(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},r,t)}}const{fieldKey:j,field:q}=k(),I=r(p);return{postRecommend:async function(l){if(!e.recommend)return;const n=F();if(!n)return;const{url:o,info:r}=O("post"),u=C.value.find((e=>e[a.value]===l));u&&t("postRecommend",await n.post(o,{...r,keyword:"",itemId:a.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,s.value&&c.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:r}=O("get");return{url:o,method:"get",key:l,cache:n,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:u.value,valueKey:a.value}}}(j.value,e.recommendCache)),{commonly:o,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(v(l,["type"])):"recently"===l.type&&e.recently.push(v(l,["type"])),e)),{commonly:[],recently:[]});s.value=o.slice(0,e.commonNum),c.value=r.slice(0,e.recentNum)},sortedOptions:C}}function O(e,l,n){const r=o((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.nameKey)?n:e.labelField)?o:"text"})),t=o((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.valueKey)?n:e.valueField)?o:"value"})),u=o((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.showKey)?n:e.showField})),a=o((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.searchKey)?n:e.searchField})),{field:i}=k();return I({props:e,labelKey:r,valueKey:t,searchKey:a,showKey:u,hooks:n,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,n;const o=q(i.value,null==(l=e.urlConfig)?void 0:l.params,null==(n=e.urlConfig)?void 0:n.dependKey);return{...e.urlConfig,params:o}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function j(l,n,r){const t=o((()=>{var n;const o=e(null==(n=l.wordbook)?void 0:n.show_key)[0];return s(o)?o:null})),u=o((()=>{var e,n,o,r;const u=null==(n=null==(e=l.wordbook)?void 0:e.render_key)?void 0:n[0];return s(u)?u:null!=(r=null!=(o=t.value)?o:l.labelField)?r:"text"})),a=o((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.wordbook)?void 0:e.value_key)?n:l.valueField)?o:"value"})),i=o((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=o((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=k(),{getSearchRequestInfo:d}=m();return I({props:l,labelKey:u,valueKey:a,searchKey:i,showKey:c,hooks:r,valueRef:n,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:n}=l,o=q(v.value,{autograph:n,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:o}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function q(e,l,n){const o={...l};return n&&w(n,((l,n,r)=>{const t=C(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;o[n]=u})),o}function I({labelKey:e,valueKey:n,searchKey:i,showKey:v,props:d,getConfig:m,getParams:y,getDependKeys:w,hooks:C,valueRef:R}){l();const F=r(p),O=r(h),j=r(g),{remoteOptions:q,filterOptions:I,fullOptions:x,searchContent:S}=f(d,{labelKey:e,valueKey:n,searchKey:i,wordSplitFilter:o((()=>{var e;return null!=(e=d.wordSplitFilter)?e:j.wordSplitFilter}))}),{field:D,fieldKey:N}=k(),P=t(!1),_=async function(l,o,r={avoidSearchContent:!0}){if(S.value=l,!m())return q.value=null;if(!r.avoidSearchContent||null==S.value)try{P.value=!0;const l={field:D.value,labelKey:e.value,valueKey:n.value},r={params:{...y().params,...o},key:N.value,cache:d.requestCache,payload:l},t=await F.addAsync(Object.assign({},y(),r));a(q.value)!==t&&(q.value=t,O("afterOptionInit",[N.value,q.value,l]))}catch(e){s(e)&&b(e)}finally{P.value=!1}},H=r(K);return u(m,((l,o)=>{if(c(l,o))return;if(q.value=null,!l)return q.value=null;const r={fetchData:_,labelKey:e.value,valueKey:n.value},{onRequestConfigChange:t,onDepsChange:u}=C||{};H.setDeps(D.value.path,w()||[],(async e=>{q.value=null,(null==e?void 0:e.keepValue)||(R.value=null),d.lazyRequest||(u?u(r):_())})),!R.value&&d.lazyRequest||(t?t(r):_())}),{immediate:!0}),{labelKey:e,loading:P,showKey:v,valueKey:n,remoteOptions:q,filterOptions:I,fullOptions:x,fetchData:_,searchContent:S}}export{j as useAutographOptions,F as useRecommendOptions,O as useUrlConfigOptions};
1
+ import{arrayed as e,checkInSetupEnv as l,jsonParse as o}from"../../../../shared/utils/index.js";import"naive-ui";import{computed as n,inject as r,ref as t,watch as u,toRaw as a}from"vue";import"@vueuse/core";import"date-fns";import{uniqBy as i,isString as s,isEqual as c,omit as v,isFunction as d}from"lodash-es";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../../shared/hooks/useScrollLoading.js";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormGlobalProps as g,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{useFormField as k}from"./useFormField.js";import{traverseDependKey as w}from"../utils/schema.js";import{getAbsoluteKey as C,formRenderLog as b}from"../utils/index.js";function R(e,l){const o=t();return n({get:()=>o.value?o.value:e[l],set(e){o.value=e}})}function F(e,l,t,u,a){const s=R(e,"commonList"),c=R(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return o(e.itemObj)}const K=n((()=>{var e,l;return null!=(l=null==(e=s.value)?void 0:e.map(g))?l:[]})),w=n((()=>{var e,l;return null!=(l=null==(e=c.value)?void 0:e.map(g))?l:[]})),C=n((()=>{if(!e.recommend||!K.value.length&&!w.value.length)return l.value;const o=i(K.value.concat(w.value),(e=>e[a.value])),n=l.value.filter((e=>o.every((function(l){return l[a.value]!==e[a.value]}))));return[...h(o,u.value),...n]})),{getRecommendRequestInfo:b,getHttpInstance:F}=m();function j(l){const{url:o,getRecommendIds:n}=b(),r=d(n)?n():{},t=d(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:o[l],info:Object.assign({},r,t)}}const{fieldKey:O,field:q}=k(),I=r(p);return{postRecommend:async function(l){if(!e.recommend)return;const o=F();if(!o)return;const{url:n,info:r}=j("post"),u=C.value.find((e=>e[a.value]===l));u&&t("postRecommend",await o.post(n,{...r,keyword:"",itemId:a.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,s.value&&c.value&&e.recommendCache)return;const o=await I.addAsync(function(l,o){const{url:n,info:r}=j("get");return{url:n,method:"get",key:l,cache:o,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:u.value,valueKey:a.value}}}(O.value,e.recommendCache)),{commonly:n,recently:r}=o.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(v(l,["type"])):"recently"===l.type&&e.recently.push(v(l,["type"])),e)),{commonly:[],recently:[]});s.value=n.slice(0,e.commonNum),c.value=r.slice(0,e.recentNum)},sortedOptions:C}}function j(e,l,o){const r=n((()=>{var l,o,n;return null!=(n=null!=(o=null==(l=e.urlConfig)?void 0:l.nameKey)?o:e.labelField)?n:"text"})),t=n((()=>{var l,o,n;return null!=(n=null!=(o=null==(l=e.urlConfig)?void 0:l.valueKey)?o:e.valueField)?n:"value"})),u=n((()=>{var l,o;return null!=(o=null==(l=e.urlConfig)?void 0:l.showKey)?o:e.showField})),a=n((()=>{var l,o;return null!=(o=null==(l=e.urlConfig)?void 0:l.searchKey)?o:e.searchField})),{field:i}=k();return I({props:e,labelKey:r,valueKey:t,searchKey:a,showKey:u,hooks:o,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,o;const n=q(i.value,null==(l=e.urlConfig)?void 0:l.params,null==(o=e.urlConfig)?void 0:o.dependKey);return{...e.urlConfig,params:n}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function O(l,o,r){const t=n((()=>{var o;const n=e(null==(o=l.wordbook)?void 0:o.show_key)[0];return s(n)?n:null})),u=n((()=>{var e,o,n,r;const u=null==(o=null==(e=l.wordbook)?void 0:e.render_key)?void 0:o[0];return s(u)?u:null!=(r=null!=(n=t.value)?n:l.labelField)?r:"text"})),a=n((()=>{var e,o,n;return null!=(n=null!=(o=null==(e=l.wordbook)?void 0:e.value_key)?o:l.valueField)?n:"value"})),i=n((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=n((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=k(),{getSearchRequestInfo:d}=m();return I({props:l,labelKey:u,valueKey:a,searchKey:i,showKey:c,hooks:r,valueRef:o,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:o}=l,n=q(v.value,{autograph:o,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:n}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function q(e,l,o){const n={...l};return o&&w(o,((l,o,r)=>{const t=C(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;n[o]=u})),n}function I({labelKey:e,valueKey:o,searchKey:i,showKey:v,props:d,getConfig:m,getParams:y,getDependKeys:w,hooks:C,valueRef:R}){l();const F=r(p),j=r(h),O=r(g),{remoteOptions:q,filterOptions:I,fullOptions:S,searchContent:x}=f(d,{labelKey:e,valueKey:o,searchKey:i,wordSplitFilter:n((()=>{var e;return null!=(e=d.wordSplitFilter)?e:O.wordSplitFilter}))}),{field:D,fieldKey:N}=k(),P=t(!1),_=async function(l,n,r={avoidSearchContent:!0}){if(x.value=l,!m())return q.value=null;if(!r.avoidSearchContent||null==x.value)try{P.value=!0;const l={field:D.value,labelKey:e.value,valueKey:o.value},r={params:{...y().params,...n},key:N.value,cache:d.requestCache,payload:l},t=await F.addAsync(Object.assign({},y(),r));a(q.value)!==t&&(q.value=t,j("afterOptionInit",[N.value,q.value,l]))}catch(e){s(e)&&b(e)}finally{P.value=!1}},H=r(K);return u(m,((l,n)=>{if(c(l,n))return;if(q.value=null,!l)return q.value=null;const r={fetchData:_,labelKey:e.value,valueKey:o.value},{onRequestConfigChange:t,onDepsChange:u}=C||{};H.setDeps(D.value.path,w()||[],(async e=>{q.value=null,(null==e?void 0:e.keepValue)||(R.value=null),d.lazyRequest||(u?u(r):_())})),!R.value&&d.lazyRequest||(t?t(r):_())}),{immediate:!0}),{labelKey:e,loading:P,showKey:v,valueKey:o,remoteOptions:q,filterOptions:I,fullOptions:S,fetchData:_,searchContent:x}}export{O as useAutographOptions,F as useRecommendOptions,j as useUrlConfigOptions};
@@ -1 +1 @@
1
- import{defineComponent as e,provide as t,createVNode as s}from"vue";import{useTheme as r}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as o,range as n}from"lodash-es";import"@vue/shared";import{widthAppend as i}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSpace as u,NButton as l}from"naive-ui";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:t,slots:d}){const p=r();function a(e,{skippable:r=!0,skipText:i="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var f;return s("footer",{class:"guide__stepFooter"},[null!=(f=o(e)?e():null)?f:s(u,{justify:"end",wrapItem:!1},{default:()=>[m(),r?s(l,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>t("cancel")},{default:()=>i}):null,s(l,{type:"primary",class:"guide__stepNextBtn",onClick:()=>t("next")},{default:()=>a===c-1?p:d})]})]);function m(){return s(u,{justify:"start",style:"flex:1"},{default:function(){return n(c).map((e=>s(l,{class:"guide__stepToBtn",bordered:!1,onClick:()=>t("toNext",e)},{default:()=>s("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:t=240,maxWidth:r=300,pointer:n=!0}=e.config;return s("section",{class:"guide__stepContentWrapper",style:{minWidth:i(t),maxWidth:i(r),...p.value}},[n?s("div",{class:"guide__stepPointerWrapper"},[s("div",{class:"guide__stepPointer"},null),s("div",{class:"guide__stepPointerLine"},null)]):null,(l=d.header,s("header",{class:"guide__stepHeader"},[o(l)?l():null])),(u=d.body,s("section",{class:"guide__stepBody"},[o(u)?u():null])),a(d.footer,e.config,e.index,e.length)]);var u,l}}});function p(r){return r?e({setup(e,{attrs:o,slots:n}){const i=[];let u=(null==r?void 0:r.parent)&&Reflect.get(r.parent,"provides");for(;u;)Object.entries(u).forEach((([e,s])=>{i.includes(e)||(i.push(e),t(e,s))})),u=Object.getPrototypeOf(u);return()=>s(d,o,n)}}):d}export{p as createGuideStep};
1
+ import{defineComponent as e,provide as t,createVNode as s}from"vue";import{useTheme as r}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isFunction as o,range as i}from"lodash-es";import"@vue/shared";import{widthAppend as n}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSpace as u,NButton as l}from"naive-ui";import"../../../shared/hooks/useScrollLoading.js";const d=e({props:{config:{type:Object,required:!0,default:()=>({})},index:{type:Number,required:!0},length:{type:Number,required:!0}},emits:["cancel","next","toNext"],setup(e,{emit:t,slots:d}){const p=r();function a(e,{skippable:r=!0,skipText:n="跳过",nextText:d="下一步",endText:p="结束引导"},a,c){var m;return s("footer",{class:"guide__stepFooter"},[null!=(m=o(e)?e():null)?m:s(u,{justify:"end",wrapItem:!1},{default:()=>[f(),r?s(l,{ghost:!0,bordered:!1,class:"guide__stepSkipBtn",textColor:"#c5c5c5",onClick:()=>t("cancel")},{default:()=>n}):null,s(l,{type:"primary",class:"guide__stepNextBtn",onClick:()=>t("next")},{default:()=>a===c-1?p:d})]})]);function f(){return s(u,{justify:"start",style:"flex:1"},{default:function(){return i(c).map((e=>s(l,{class:"guide__stepToBtn",bordered:!1,onClick:()=>t("toNext",e)},{default:()=>s("i",{class:["guide__stepToBtnContent",{guide__stepActiveBtn:e===a}]},null)})))}})}}return()=>{const{minWidth:t=240,maxWidth:r=300,pointer:i=!0}=e.config;return s("section",{class:"guide__stepContentWrapper",style:{minWidth:n(t),maxWidth:n(r),...p.value}},[i?s("div",{class:"guide__stepPointerWrapper"},[s("div",{class:"guide__stepPointer"},null),s("div",{class:"guide__stepPointerLine"},null)]):null,(l=d.header,s("header",{class:"guide__stepHeader"},[o(l)?l():null])),(u=d.body,s("section",{class:"guide__stepBody"},[o(u)?u():null])),a(d.footer,e.config,e.index,e.length)]);var u,l}}});function p(r){return r?e({setup(e,{attrs:o,slots:i}){const n=[];let u=(null==r?void 0:r.parent)&&Reflect.get(r.parent,"provides");for(;u;)Object.entries(u).forEach((([e,s])=>{n.includes(e)||(n.push(e),t(e,s))})),u=Object.getPrototypeOf(u);return()=>s(d,o,i)}}):d}export{p as createGuideStep};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as y,NSpin as g,NLayout as v,NLayoutContent as S}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import L from"./components/MultipleVideo.vue.js";import{ChatSock as N}from"./utils/chatSock.js";import{instanceAxios as w,readMessageApi as U}from"./api/index.js";import{useTheme as A}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as _,isNumber as C}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{CHAT_TYPE as O,SUBSCRIBE_MESSAGE_TYPE as x,AV_STATUS as K}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as E,InjectionIChatEmits as G}from"./types/index.js";import{isAudioOrVideoMessage as B}from"./utils/index.js";import{useSession as J}from"./hooks/useSession.js";import"trtc-sdk-v5";const P={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:q,emit:F}){const H=e;w.defaults.baseURL=H.baseURL,w.defaults.headers.Authorization="bearer "+H.token;const z=A(),D=s(!1),W=s(),Y=o({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});t(R,Y),t(E,W),t(G,F);const{openSession:Q,closeSession:X,getCurrentSession:Z,setSessionList:ee,setUpdateSessionItem:se,setCurrentSessionItem:oe}=J(Y),te=[];function ne(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{W.value.send("test")}catch(e){W.value.disconnect(),ne()}},connectCb(){console.log("连接成功"),W.value.subscribe("/user/topic/single",(({body:e})=>ie({body:e,chatType:O.SINGLE}))),W.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(console.log("body",s),Object.assign(Y.userInfo,t,o),!(null==n?void 0:n.length))return;ee(n),te.splice(0,te.length),te.push(...n.filter((e=>e.chatType===O.GROUP))),te.forEach((e=>{W.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})))})),function(){const e=Y.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&Q(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};W.value=new N("/fdp-chat/websocket",e)}async function re(e,s){if(Y.currentMsg=e,e.sessionKey===Y.currentSessionItem.sessionKey)return Y.isAppendMsg=!0,e.sender!==Y.userInfo.id&&await U({chatType:s,messageIdSet:[e.id],receiver:Y.userInfo.id,sender:e.sender}),void oe({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};se(o)}async function ie({body:e,chatType:s}){try{console.log(JSON.parse(e),"订阅新增消息");const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case x.MESSAGE:B(t.content)?!Y.showVideo&&!Y.showMultipleVideo||t.content.avStatus!==K.IN_CALL?(Y.currentMsg=t,Object.assign(Y.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===Y.userInfo.id?"call":"invite",currentMsg:t}),Y.showVideo||Y.showMultipleVideo?re(t,s):Y.showVideo=!0):(W.value.send("/app/chat/send",{},JSON.stringify({chatType:O.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:K.CALL_BUSY}})),console.log("用户忙!")):re(t,s);break;case x.AV_STATUS:Object.assign(Y.currentAVMsg,r,{callMode:r.sender===Y.userInfo.id?"call":"invite",checkedIds:[]}),Y.showVideo||Y.showMultipleVideo?console.log("用户忙!"):Y.showMultipleVideo=!0;break;case x.NEW_SESSION:if(s===O.GROUP)return;se(n);break;case x.JOIN:if(s===O.GROUP)return;se(n),W.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})));break;case x.LEAVE:X(),_(Y.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){ne()}(),n((()=>{var e;null==(e=W.value)||e.disconnect()})),q({getUnreadData:function(){return Y.sessionList.filter((e=>C(e.unreadNum)&&e.unreadNum>0))},openSession:Q,closeSession:X,getCurrentSession:Z}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(z))},[d(c(y),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[D.value?(r(),l(c(g),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",P,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Y.userInfo]},null,8,["default-value"]),m("div",$,[h(s.$slots,"toolbar")])])),d(c(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(S),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Y.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Y.showMultipleVideo?(r(),l(L,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{q as default};
1
+ import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as v,NLayoutContent as S}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import L from"./components/MultipleVideo.vue.js";import{ChatSock as N}from"./utils/chatSock.js";import{instanceAxios as w,readMessageApi as U}from"./api/index.js";import{useTheme as A}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as _,isNumber as C}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{CHAT_TYPE as O,SUBSCRIBE_MESSAGE_TYPE as x,AV_STATUS as K}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as E,InjectionIChatEmits as G}from"./types/index.js";import{isAudioOrVideoMessage as B}from"./utils/index.js";import{useSession as J}from"./hooks/useSession.js";import"trtc-sdk-v5";const P={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:q,emit:F}){const H=e;w.defaults.baseURL=H.baseURL,w.defaults.headers.Authorization="bearer "+H.token;const z=A(),D=s(!1),W=s(),Y=o({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});t(R,Y),t(E,W),t(G,F);const{openSession:Q,closeSession:X,getCurrentSession:Z,setSessionList:ee,setUpdateSessionItem:se,setCurrentSessionItem:oe}=J(Y),te=[];function ne(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{W.value.send("test")}catch(e){W.value.disconnect(),ne()}},connectCb(){console.log("连接成功"),W.value.subscribe("/user/topic/single",(({body:e})=>ie({body:e,chatType:O.SINGLE}))),W.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(console.log("body",s),Object.assign(Y.userInfo,t,o),!(null==n?void 0:n.length))return;ee(n),te.splice(0,te.length),te.push(...n.filter((e=>e.chatType===O.GROUP))),te.forEach((e=>{W.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})))})),function(){const e=Y.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&Q(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};W.value=new N("/fdp-chat/websocket",e)}async function re(e,s){if(Y.currentMsg=e,e.sessionKey===Y.currentSessionItem.sessionKey)return Y.isAppendMsg=!0,e.sender!==Y.userInfo.id&&await U({chatType:s,messageIdSet:[e.id],receiver:Y.userInfo.id,sender:e.sender}),void oe({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};se(o)}async function ie({body:e,chatType:s}){try{console.log(JSON.parse(e),"订阅新增消息");const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case x.MESSAGE:B(t.content)?!Y.showVideo&&!Y.showMultipleVideo||t.content.avStatus!==K.IN_CALL?(Y.currentMsg=t,Object.assign(Y.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===Y.userInfo.id?"call":"invite",currentMsg:t}),Y.showVideo||Y.showMultipleVideo?re(t,s):Y.showVideo=!0):(W.value.send("/app/chat/send",{},JSON.stringify({chatType:O.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:K.CALL_BUSY}})),console.log("用户忙!")):re(t,s);break;case x.AV_STATUS:Object.assign(Y.currentAVMsg,r,{callMode:r.sender===Y.userInfo.id?"call":"invite",checkedIds:[]}),Y.showVideo||Y.showMultipleVideo?console.log("用户忙!"):Y.showMultipleVideo=!0;break;case x.NEW_SESSION:if(s===O.GROUP)return;se(n);break;case x.JOIN:if(s===O.GROUP)return;se(n),W.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})));break;case x.LEAVE:X(),_(Y.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){ne()}(),n((()=>{var e;null==(e=W.value)||e.disconnect()})),q({getUnreadData:function(){return Y.sessionList.filter((e=>C(e.unreadNum)&&e.unreadNum>0))},openSession:Q,closeSession:X,getCurrentSession:Z}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(z))},[d(c(g),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[D.value?(r(),l(c(y),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",P,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Y.userInfo]},null,8,["default-value"]),m("div",$,[h(s.$slots,"toolbar")])])),d(c(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(S),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Y.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Y.showMultipleVideo?(r(),l(L,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{q as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as s,watch as o,openBlock as a,createBlock as i,unref as n,withCtx as r,withDirectives as l,createElementVNode as c,createVNode as m,createElementBlock as p,Fragment as d,renderList as u,toDisplayString as y,vShow as f,normalizeStyle as h}from"vue";import{NModal as v,NImageGroup as g,NImage as w,NInput as b,NIcon as k}from"naive-ui";import{SearchOutline as M,OpenOutline as T,DownloadOutline as I}from"@vicons/ionicons5";import{searchChatRecordApi as S}from"../api/index.js";import{useScrollLoading as _}from"../hooks/useScrollLoading.js";import{format as x,isSameWeek as j,isSameMonth as A}from"date-fns";import{useState as H}from"../hooks/useState.js";import{getFileSize as D,downloadFile as C}from"../utils/index.js";import{last as z}from"lodash-es";import"trtc-sdk-v5";import{useDebounceFn as L}from"@vueuse/core";import{useTheme as U}from"../../../../shared/hooks/useTheme.js";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";const E={class:"label"},O={class:"image-box"},$={class:"file-type"},F={class:"text"},K={class:"name"},P={class:"detail"},R={class:"opt-box"};var B=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const B=e,G=U(),{state:N}=H(),q=t([]),J=t([]),Q=t(),V=t(),W=t(),X=L(ee,500),Y={page:0,hasMore:!0,lastSendTime:x(new Date,"yyyy-MM-dd HH:mm:ss")};async function Z(){var e;try{if(!Y.hasMore)return;Y.page++;const t=await S({orgId:N.orgId,keyword:W.value,endTime:"",startTime:"",lastSendTime:Y.lastSendTime,memberIdSet:[],page:Y.page,recordType:"image"===B.type?"IMAGE":"FILE",sessionKey:N.currentSessionItem.sessionKey,userId:N.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(Y.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了"));let s=t||[];if(Array.isArray(t)&&t.length>0&&(s=t[0].recordList),Y.lastSendTime=null==(e=z(s))?void 0:e.sendTime,"image"===B.type){const e=function(e){const t={};e.forEach((e=>{const s=new Date(e.sendTime);let o=x(s,"yyyy年MM月");j(s,new Date)?o="本周":A(s,new Date)&&(o="本月"),t[o]||(t[o]=[]),t[o].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(s);q.value=Y.page>1?q.value.concat(e):e}else{const e=s.map((e=>new Promise((async t=>{const s=await D(e.content.fileUrl);t({...e,size:s})})))),t=await Promise.all(e);J.value=Y.page>1?J.value.concat(t):t}}catch(e){console.log(e)}}function ee(){Object.assign(Y,{page:0,hasMore:!0,lastSendTime:x(new Date,"yyyy-MM-dd HH:mm:ss")}),Z()}_(Q,(()=>{Z()})),_(V,(()=>{Z()}));const te=s((()=>"image"===B.type?"聊天图片":"聊天文件"));function se(e){const{size:t,sendTime:s,senderName:o}=e;return`${t} · ${x(new Date(s),"yyyy/MM/dd HH:mm")} ${o}`}function oe(e){var t;const s=(null==(t=e.content)?void 0:t.msg)||"",o=s.lastIndexOf(".");if(-1!==o){return s.charAt(o+1).toUpperCase()}return"?"}return o((()=>B.visible),(e=>{e?ee():W.value=""})),(t,s)=>(a(),i(n(v),{preset:"dialog",title:n(te),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:r((()=>[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:Q},[m(n(g),{"show-toolbar-tooltip":""},{default:r((()=>[(a(!0),p(d,null,u(q.value,(e=>(a(),p("div",{class:"image-item",key:e.label},[c("span",E,y(e.label),1),c("div",O,[(a(!0),p(d,null,u(e.list,(e=>(a(),i(n(w),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[f,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:h(n(G))},[m(n(b),{clearable:"",placeholder:"搜索文件",value:W.value,"onUpdate:value":s[0]||(s[0]=e=>W.value=e),valueModifiers:{trim:!0},onInput:n(X)},{prefix:r((()=>[m(n(k),{component:n(M)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:V},[(a(!0),p(d,null,u(J.value,((e,t)=>(a(),p("div",{class:"file-item",key:t},[c("span",$,y(oe(e)),1),c("div",F,[c("span",K,y(e.content.msg),1),c("span",P,y(se(e)),1)]),c("div",R,[m(n(k),{size:16,component:n(T)},null,8,["component"]),m(n(k),{size:16,component:n(I),onClick:()=>n(C)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])])))),128))],512)],4),[[f,"image"!==e.type]])])),_:1},8,["title"]))}});export{B as default};
1
+ import{defineComponent as e,ref as t,computed as s,watch as o,openBlock as a,createBlock as i,unref as n,withCtx as r,withDirectives as l,createElementVNode as c,createVNode as m,createElementBlock as p,Fragment as d,renderList as u,toDisplayString as y,vShow as f,normalizeStyle as h}from"vue";import{NModal as g,NImageGroup as v,NImage as w,NInput as k,NIcon as b}from"naive-ui";import{SearchOutline as M,OpenOutline as S,DownloadOutline as T}from"@vicons/ionicons5";import{searchChatRecordApi as I}from"../api/index.js";import{useScrollLoading as _}from"../hooks/useScrollLoading.js";import{format as j,isSameWeek as x,isSameMonth as A}from"date-fns";import{useState as H}from"../hooks/useState.js";import{getFileSize as D,downloadFile as C}from"../utils/index.js";import{last as L}from"lodash-es";import"trtc-sdk-v5";import{useDebounceFn as z}from"@vueuse/core";import{useTheme as U}from"../../../../shared/hooks/useTheme.js";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";const E={class:"label"},O={class:"image-box"},$={class:"file-type"},F={class:"text"},K={class:"name"},P={class:"detail"},R={class:"opt-box"};var B=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const B=e,G=U(),{state:N}=H(),q=t([]),J=t([]),Q=t(),V=t(),W=t(),X=z(ee,500),Y={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")};async function Z(){var e;try{if(!Y.hasMore)return;Y.page++;const t=await I({orgId:N.orgId,keyword:W.value,endTime:"",startTime:"",lastSendTime:Y.lastSendTime,memberIdSet:[],page:Y.page,recordType:"image"===B.type?"IMAGE":"FILE",sessionKey:N.currentSessionItem.sessionKey,userId:N.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(Y.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了"));let s=t||[];if(Array.isArray(t)&&t.length>0&&(s=t[0].recordList),Y.lastSendTime=null==(e=L(s))?void 0:e.sendTime,"image"===B.type){const e=function(e){const t={};e.forEach((e=>{const s=new Date(e.sendTime);let o=j(s,"yyyy年MM月");x(s,new Date)?o="本周":A(s,new Date)&&(o="本月"),t[o]||(t[o]=[]),t[o].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(s);q.value=Y.page>1?q.value.concat(e):e}else{const e=s.map((e=>new Promise((async t=>{const s=await D(e.content.fileUrl);t({...e,size:s})})))),t=await Promise.all(e);J.value=Y.page>1?J.value.concat(t):t}}catch(e){console.log(e)}}function ee(){Object.assign(Y,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Z()}_(Q,(()=>{Z()})),_(V,(()=>{Z()}));const te=s((()=>"image"===B.type?"聊天图片":"聊天文件"));function se(e){const{size:t,sendTime:s,senderName:o}=e;return`${t} · ${j(new Date(s),"yyyy/MM/dd HH:mm")} ${o}`}function oe(e){var t;const s=(null==(t=e.content)?void 0:t.msg)||"",o=s.lastIndexOf(".");if(-1!==o){return s.charAt(o+1).toUpperCase()}return"?"}return o((()=>B.visible),(e=>{e?ee():W.value=""})),(t,s)=>(a(),i(n(g),{preset:"dialog",title:n(te),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:r((()=>[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:Q},[m(n(v),{"show-toolbar-tooltip":""},{default:r((()=>[(a(!0),p(d,null,u(q.value,(e=>(a(),p("div",{class:"image-item",key:e.label},[c("span",E,y(e.label),1),c("div",O,[(a(!0),p(d,null,u(e.list,(e=>(a(),i(n(w),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[f,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:h(n(G))},[m(n(k),{clearable:"",placeholder:"搜索文件",value:W.value,"onUpdate:value":s[0]||(s[0]=e=>W.value=e),valueModifiers:{trim:!0},onInput:n(X)},{prefix:r((()=>[m(n(b),{component:n(M)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:V},[(a(!0),p(d,null,u(J.value,((e,t)=>(a(),p("div",{class:"file-item",key:t},[c("span",$,y(oe(e)),1),c("div",F,[c("span",K,y(e.content.msg),1),c("span",P,y(se(e)),1)]),c("div",R,[m(n(b),{size:16,component:n(S)},null,8,["component"]),m(n(b),{size:16,component:n(T),onClick:()=>n(C)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])])))),128))],512)],4),[[f,"image"!==e.type]])])),_:1},8,["title"]))}});export{B as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as s,computed as o,watch as r,nextTick as t,openBlock as a,createBlock as l,unref as n,normalizeStyle as i,withCtx as u,createVNode as p,createTextVNode as c,createElementVNode as f,createElementBlock as m,Fragment as d,renderList as v,toDisplayString as h,withDirectives as k,vShow as w}from"vue";import{NPopover as y,NButton as g,NIcon as j,NInput as S,NAvatar as _}from"naive-ui";import{SearchOutline as x}from"@vicons/ionicons5";import{useState as C}from"../hooks/useState.js";import{useSession as R}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import{openSessionApi as U}from"../api/index.js";import{useTheme as I}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSearchUserList as L}from"../hooks/useSearchUserList.js";import b from"../../../default-page/index.js";const z=["onClick"],N={class:"user-info"};var T=e({__name:"ChatSearch",setup(e){const T=I(),D=s(),E=s(),G=s(!1),H=s(""),{state:$}=C(),{openSession:q}=R($),{userList:A,handleInput:B}=L({wrapperRef:D,keywordRef:H}),F=o((()=>!A.value.length&&!!(H.value||"").replace(/^\s+|\s+$/g,"")));return r((()=>G.value),(async e=>{var s;e&&(await t(),null==(s=E.value)||s.focus())})),(e,s)=>(a(),l(n(y),{raw:"","content-class":"search-content",class:"search-wrapper",style:i(n(T)),show:G.value,"onUpdate:show":s[1]||(s[1]=e=>G.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:u((()=>[p(n(g),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:u((()=>[p(n(j),{component:n(x),color:"#ffffff80"},null,8,["component"])])),default:u((()=>[c(" 搜索联系人 ")])),_:1})])),default:u((()=>[p(n(S),{ref_key:"inputRef",ref:E,size:"small",clearable:"",autofocus:"",value:H.value,"onUpdate:value":[s[0]||(s[0]=e=>H.value=e),n(B)]},{prefix:u((()=>[p(n(j),{color:"#ffffff80",component:n(x)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),f("div",{class:"user-list-wrapper",ref_key:"listRef",ref:D},[(a(!0),m(d,null,v(n(A),(e=>(a(),m("div",{class:"user-item",key:e.id,onClick:()=>async function(e){G.value=!1;const s=await U({chatType:"SINGLE",receiver:e,sender:$.userInfo.id});q(s)}(e.id)},[p(n(_),{round:"",size:32,src:e.avatar},null,8,["src"]),f("div",N,[f("span",null,h(e.name),1),f("span",null,h(e.deptName),1),f("span",null,h(e.post),1)])],8,z)))),128)),k(p(n(b),{config:{title:" ",content:"找不到相关的结果"},type:"5"},null,512),[[w,n(F)]])],512)])),_:1},8,["style","show"]))}});export{T as default};
1
+ import{defineComponent as e,ref as o,computed as s,watch as r,nextTick as t,openBlock as a,createBlock as l,unref as n,normalizeStyle as i,withCtx as u,createVNode as p,createTextVNode as c,createElementVNode as f,createElementBlock as m,Fragment as d,renderList as h,toDisplayString as v,withDirectives as k,vShow as w}from"vue";import{NPopover as y,NButton as g,NIcon as j,NInput as S,NAvatar as _}from"naive-ui";import{SearchOutline as x}from"@vicons/ionicons5";import{useState as C}from"../hooks/useState.js";import{useSession as L}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import{openSessionApi as R}from"../api/index.js";import{useTheme as U}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import{useSearchUserList as I}from"../hooks/useSearchUserList.js";import b from"../../../default-page/index.js";const z=["onClick"],N={class:"user-info"};var T=e({__name:"ChatSearch",setup(e){const T=U(),D=o(),E=o(),G=o(!1),H=o(""),{state:$}=C(),{openSession:q}=L($),{userList:A,handleInput:B}=I({wrapperRef:D,keywordRef:H}),F=s((()=>!A.value.length&&!!(H.value||"").replace(/^\s+|\s+$/g,"")));return r((()=>G.value),(async e=>{var o;e&&(await t(),null==(o=E.value)||o.focus())})),(e,o)=>(a(),l(n(y),{raw:"","content-class":"search-content",class:"search-wrapper",style:i(n(T)),show:G.value,"onUpdate:show":o[1]||(o[1]=e=>G.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:u((()=>[p(n(g),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:u((()=>[p(n(j),{component:n(x),color:"#ffffff80"},null,8,["component"])])),default:u((()=>[c(" 搜索联系人 ")])),_:1})])),default:u((()=>[p(n(S),{ref_key:"inputRef",ref:E,size:"small",clearable:"",autofocus:"",value:H.value,"onUpdate:value":[o[0]||(o[0]=e=>H.value=e),n(B)]},{prefix:u((()=>[p(n(j),{color:"#ffffff80",component:n(x)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),f("div",{class:"user-list-wrapper",ref_key:"listRef",ref:D},[(a(!0),m(d,null,h(n(A),(e=>(a(),m("div",{class:"user-item",key:e.id,onClick:()=>async function(e){G.value=!1;const o=await R({chatType:"SINGLE",receiver:e,sender:$.userInfo.id});q(o)}(e.id)},[p(n(_),{round:"",size:32,src:e.avatar},null,8,["src"]),f("div",N,[f("span",null,v(e.name),1),f("span",null,v(e.deptName),1),f("span",null,v(e.post),1)])],8,z)))),128)),k(p(n(b),{config:{title:" ",content:"找不到相关的结果"},type:"5"},null,512),[[w,n(F)]])],512)])),_:1},8,["style","show"]))}});export{T as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,provide as o,computed as a,toRaw as l,watch as n,resolveComponent as r,openBlock as s,createElementBlock as i,mergeProps as u,unref as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as v,normalizeStyle as m,createVNode as p,withCtx as b,createSlots as g,renderList as h,createCommentVNode as x,renderSlot as y,normalizeProps as k,guardReactiveProps as D,nextTick as C}from"vue";import{useTheme as $,createOpacityColor as j}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as w}from"@vueuse/core";import"date-fns";import{isString as T,isEqualWith as I,isFunction as R,pick as q}from"lodash-es";import{useFormAsyncQueue as H,presetRequestHandler as P}from"../../../shared/hooks/useFormRequest/index.js";import{hex2rgba as _,widthAppend as A,uuidGenerator as L}from"../../../shared/utils/index.js";import{promiseTimeout as S}from"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NConfigProvider as B}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import{VxeTableEventNameList as O,InjectionIhoTableXeInstance as E,InjectionIhoTableLoading as W,InjectionIhoTableEmits as M,InjectionTableAsyncQueue as N,InjectionIhoTableAnnotation as V,InjectionIhoTableUUID as z,InjectionIhoTableInstance as G,InjectionIhoTableConfig as J,InjectionIhoTableFieldList as K,InjectionIhoTableHandler as Q,InjectionIhoTableGlobProps as U}from"./constants/index.js";import{createTableHooks as X,applyTableConfigHooks as Y,applyTableFieldHooks as Z,createTableEventHandlers as ee,createDomInsertComponent as te,createDataTransfer as oe}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as ae}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as le}from"./utils/index.js";const ne=["id"];var re=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3},developMode:{type:Boolean,default:!1}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...O],setup(e,{expose:O,emit:re}){var se,ie;const ue=e,de=t();o(E,de);const ce=t(!1),fe=a((()=>{var e;return(null==(e=ue.tableConfig)?void 0:e.loading)||ce.value}));o(W,ce);const ve=$({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),me=a((()=>{var e,t,o;const a={...ve.value};return a["--c-primary-color-opacity3"]=j(..._(a["--c-primary-color"]+""),.3),a["--c-scrollbar-width"]=A(null!=(o=null==(t=null==(e=de.value)?void 0:e.reactData)?void 0:t.scrollbarWidth)?o:0),a})),pe=a((()=>{var e,t;const o=null!=(t=null==(e=ue.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":T(o)&&(o.includes("calc")||o.endsWith("%"))?o:A(o)}})),be=ae(),ge=function(e,...t){re(e,...t);const o=d(De)[le(e)];R(o)&&o(...t),be.trigger(e,...t)};o(M,ge);const he=H(a((()=>ue.requestInstance)),a((()=>!!ue.uniqueCacheData))).create(ue.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>P(t)});o(N,he);const xe=X();o(V,a((()=>ue.annotation)));const ye=L();o(z,ye);const ke=t();o(G,ke);const De=t({uuid:null!=(ie=null==(se=ue.tableConfig)?void 0:se.uuid)?ie:ye});o(J,De);const Ce=w($e,10);function $e(){var e,t;De.value=Y(xe,{...ue.tableConfig,uuid:null!=(t=null==(e=ue.tableConfig)?void 0:e.uuid)?t:ye},{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de})}const je=t([]);o(K,je);const we=w(Te,10);function Te(){const e=Z(xe,ue.fieldList,De.value,{$table:ke,emits:ge,loading:ce,globProps:ue,$xeTable:de});I(e,l(je.value),((e,t)=>{if(R(e)&&R(t))return e.toString()===t.toString()}))||(je.value=e)}const Ie=oe(xe,De,ke);let Re=null;function qe(e){Re=e}async function He(){await C(),null==Re||Re(),Re=null}const Pe=t([]);async function _e(){var e,t;const o=await Ie(ue.tableData),a=null==(e=ke.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=ke.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return void He()}Pe.value=o,null==(t=ke.value)||t.recalculate(!0),He()}const Ae={updateTableDataRef:w(_e,10),updateConfigRef:Ce,updateFieldListRef:we};o(Q,Ae),o(U,ue);const Le=ee({hooks:xe,config:De,$table:ke,context:Ae,emits:ge,globProps:ue,loading:ce,$xeTable:de}),Se=a((()=>({...De.value,...Le})));let Be=!1,Fe=!1,Oe=!1;const Ee=w((()=>{Be&&$e(),Fe&&Te(),Oe&&_e(),Be=!1,Fe=!1,Oe=!1}),10);n((()=>ue.tableConfig),(()=>{Be=!0,Fe=!0,Oe=!0,Ee()}),{deep:!0}),n((()=>ue.fieldList),(()=>{Fe=!0,Oe=!0,Ee()}),{deep:!0}),n([()=>[...ue.tableData],()=>{var e;return null==(e=ue.tableData)?void 0:e.length}],(()=>{Oe=!0,Ee()})),n([()=>ue.tableData,()=>{var e;return null==(e=ue.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=De.value.treeConfig)?void 0:e.expandAll)&&(await S(11),null==(t=ke.value)||t.setAllTreeExpand(!0))})),$e(),Te(),_e();const{header:We,footer:Me}=te(xe);function Ne(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return O({$table:ke,async loadData(e){var t;null==(t=ke.value)||t.loadData(await Ie(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),tableDataResolved:()=>new Promise(qe),reload(){var e,t;null==(e=ke.value)||e.loadColumn([]),null==(t=ke.value)||t.loadData([]),$e(),Te(),_e()},verticalTable:{update:()=>{}},...xe.exposeHooks.expose.call({},De,{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de,...Ae})}),xe.setupHooks.setup.call(De,je,{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de}),(e,t)=>{const o=r("vxe-grid");return s(),i("section",u({class:"iho-table",id:d(ye),style:d(me)},d(F)()),[(s(),c(f(d(We)))),v("section",{style:m(d(pe))},[p(d(B),{abstract:"",namespace:"vxe-table--ignore-clear"},{default:b((()=>[p(o,u({ref_key:"$table",ref:ke},d(Se),{columns:je.value,data:Pe.value,loading:d(fe)}),g({_:2},[h(e.$slots,((t,o)=>({name:o,fn:b((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),y(e.$slots,o,k(D(Ne(t))))]))})))]),1040,["columns","data","loading"])])),_:3})],4),(s(),c(f(d(Me))))],16,ne)}}});export{re as default};
1
+ import{defineComponent as e,ref as t,provide as o,computed as a,toRaw as l,watch as n,resolveComponent as r,openBlock as s,createElementBlock as i,mergeProps as u,unref as d,createBlock as c,resolveDynamicComponent as f,createElementVNode as m,normalizeStyle as v,createVNode as p,withCtx as b,createSlots as g,renderList as h,createCommentVNode as x,renderSlot as y,normalizeProps as k,guardReactiveProps as D,nextTick as C}from"vue";import{useTheme as $,createOpacityColor as j}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as w}from"@vueuse/core";import"date-fns";import{isString as T,isEqualWith as I,isFunction as R,pick as q}from"lodash-es";import{useFormAsyncQueue as H,presetRequestHandler as P}from"../../../shared/hooks/useFormRequest/index.js";import{hex2rgba as _,widthAppend as L,uuidGenerator as S}from"../../../shared/utils/index.js";import{promiseTimeout as A}from"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NConfigProvider as B}from"naive-ui";import{useVersion as F}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{VxeTableEventNameList as O,InjectionIhoTableXeInstance as E,InjectionIhoTableLoading as W,InjectionIhoTableEmits as M,InjectionTableAsyncQueue as N,InjectionIhoTableAnnotation as V,InjectionIhoTableUUID as z,InjectionIhoTableInstance as G,InjectionIhoTableConfig as J,InjectionIhoTableFieldList as K,InjectionIhoTableHandler as Q,InjectionIhoTableGlobProps as U}from"./constants/index.js";import{createTableHooks as X,applyTableConfigHooks as Y,applyTableFieldHooks as Z,createTableEventHandlers as ee,createDomInsertComponent as te,createDataTransfer as oe}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as ae}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as le}from"./utils/index.js";const ne=["id"];var re=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3},developMode:{type:Boolean,default:!1}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...O],setup(e,{expose:O,emit:re}){var se,ie;const ue=e,de=t();o(E,de);const ce=t(!1),fe=a((()=>{var e;return(null==(e=ue.tableConfig)?void 0:e.loading)||ce.value}));o(W,ce);const me=$({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),ve=a((()=>{var e,t,o;const a={...me.value};return a["--c-primary-color-opacity3"]=j(..._(a["--c-primary-color"]+""),.3),a["--c-scrollbar-width"]=L(null!=(o=null==(t=null==(e=de.value)?void 0:e.reactData)?void 0:t.scrollbarWidth)?o:0),a})),pe=a((()=>{var e,t;const o=null!=(t=null==(e=ue.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":T(o)&&(o.includes("calc")||o.endsWith("%"))?o:L(o)}})),be=ae(),ge=function(e,...t){re(e,...t);const o=d(De)[le(e)];R(o)&&o(...t),be.trigger(e,...t)};o(M,ge);const he=H(a((()=>ue.requestInstance)),a((()=>!!ue.uniqueCacheData))).create(ue.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>P(t)});o(N,he);const xe=X();o(V,a((()=>ue.annotation)));const ye=S();o(z,ye);const ke=t();o(G,ke);const De=t({uuid:null!=(ie=null==(se=ue.tableConfig)?void 0:se.uuid)?ie:ye});o(J,De);const Ce=w($e,10);function $e(){var e,t;De.value=Y(xe,{...ue.tableConfig,uuid:null!=(t=null==(e=ue.tableConfig)?void 0:e.uuid)?t:ye},{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de})}const je=t([]);o(K,je);const we=w(Te,10);function Te(){const e=Z(xe,ue.fieldList,De.value,{$table:ke,emits:ge,loading:ce,globProps:ue,$xeTable:de});I(e,l(je.value),((e,t)=>{if(R(e)&&R(t))return e.toString()===t.toString()}))||(je.value=e)}const Ie=oe(xe,De,ke);let Re=null;function qe(e){Re=e}async function He(){await C(),null==Re||Re(),Re=null}const Pe=t([]);async function _e(){var e,t;const o=await Ie(ue.tableData),a=null==(e=ke.value)?void 0:e.getTableData().fullData;if(a){let e=0;if(!(a.some((t=>{var a;if(!(null==(a=ke.value)?void 0:a.isInsertByRow(t))){if(t!==o[e])return!0;e++}}))||e!==o.length))return void He()}Pe.value=o,null==(t=ke.value)||t.recalculate(!0),He()}const Le={updateTableDataRef:w(_e,10),updateConfigRef:Ce,updateFieldListRef:we};o(Q,Le),o(U,ue);const Se=ee({hooks:xe,config:De,$table:ke,context:Le,emits:ge,globProps:ue,loading:ce,$xeTable:de}),Ae=a((()=>({...De.value,...Se})));let Be=!1,Fe=!1,Oe=!1;const Ee=w((()=>{Be&&$e(),Fe&&Te(),Oe&&_e(),Be=!1,Fe=!1,Oe=!1}),10);n((()=>ue.tableConfig),(()=>{Be=!0,Fe=!0,Oe=!0,Ee()}),{deep:!0}),n((()=>ue.fieldList),(()=>{Fe=!0,Oe=!0,Ee()}),{deep:!0}),n([()=>[...ue.tableData],()=>{var e;return null==(e=ue.tableData)?void 0:e.length}],(()=>{Oe=!0,Ee()})),n([()=>ue.tableData,()=>{var e;return null==(e=ue.tableData)?void 0:e.length}],(async()=>{var e,t;(null==(e=De.value.treeConfig)?void 0:e.expandAll)&&(await A(11),null==(t=ke.value)||t.setAllTreeExpand(!0))})),$e(),Te(),_e();const{header:We,footer:Me}=te(xe);function Ne(e){return q(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return O({$table:ke,async loadData(e){var t;null==(t=ke.value)||t.loadData(await Ie(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),tableDataResolved:()=>new Promise(qe),reload(){var e,t;null==(e=ke.value)||e.loadColumn([]),null==(t=ke.value)||t.loadData([]),$e(),Te(),_e()},verticalTable:{update:()=>{}},...xe.exposeHooks.expose.call({},De,{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de,...Le})}),xe.setupHooks.setup.call(De,je,{$table:ke,emits:ge,globProps:ue,loading:ce,$xeTable:de}),(e,t)=>{const o=r("vxe-grid");return s(),i("section",u({class:"iho-table",id:d(ye),style:d(ve)},d(F)()),[(s(),c(f(d(We)))),m("section",{style:v(d(pe))},[p(d(B),{abstract:"",namespace:"vxe-table--ignore-clear"},{default:b((()=>[p(o,u({ref_key:"$table",ref:ke},d(Ae),{columns:je.value,data:Pe.value,loading:d(fe)}),g({_:2},[h(e.$slots,((t,o)=>({name:o,fn:b((t=>[x(" 实际上所有的vxe-grid插槽都支持 "),y(e.$slots,o,k(D(Ne(t))))]))})))]),1040,["columns","data","loading"])])),_:3})],4),(s(),c(f(d(Me))))],16,ne)}}});export{re as default};
@@ -1 +1 @@
1
- import{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as o,h as l}from"vue";import{HIGHEST_PRIORITY as s,IHO_TABLE_FIXED_STATUS as n,WIDGET_TYPE as d}from"../constants/index.js";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";import{getDefaultValue as a}from"./rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";import{IhoTableStatusHelper as f,IhoTableUtils as c}from"../utils/index.js";function m(){const m="lowCodeFieldAdaptorPlugin";return r({name:m,apply(r){r.fieldHooks.field.tap({name:m,stage:s},((s,r,m)=>{const p=s,u={className:p.bold?"iho-table__boldCell":"",field:p.columnName,showOverflow:"ellipsis",visible:f.notNegative(p.isShow),minWidth:p.colWidth,sortable:f.isPositive(p.isSort),fixed:n[p.isFixed],...p,title:p.alias||p.title};return function(e,i){const o={default:i.slotFn,header:i.headerSlotFn,edit:i.editSlotFn,footer:i.footerSlotFn,...i.slots};if(t(i.checkEditStatus)){const{default:e}=o;t(e)&&(o.default=t=>i.checkEditStatus(t)?e(t):[l("span",null,a(t.row,t.column.editRender.props))])}e.slots=o}(u,p),function(l,s,n){var r,a;const m=i(o(s));m.componentProps={size:"mini"===n.size?"small":n.size,...m.componentProps},n.forceClearable&&(m.componentProps.clearable=!0);l.editRender={name:c.getCellType(s),...l.editRender,props:m},l.editRender.enabled=!Reflect.get(d,l.editRender.name),!l.editRender.enabled&&t(null==(r=l.slots)?void 0:r.default)&&(l.editRender.enabled=t(null==(a=l.slots)?void 0:a.edit));if(!e(s.settingObj))return;Reflect.has(s.settingObj,"isHide")&&(l.visible=l.visible&&f.notPositive(s.settingObj.isHide))}(u,p,m),u})),r.fieldHooks.field.tap({name:m+"After",stage:1e3},(t=>(e(t.slots)&&Object.entries(t.slots).forEach((([e,i])=>{null==i&&Reflect.deleteProperty(t.slots,e)})),t)))}})}export{m as lowCodeFieldAdaptorPlugin};
1
+ import{isObject as e,isFunction as t,cloneDeep as i}from"lodash-es";import{toRaw as l,h as o}from"vue";import{HIGHEST_PRIORITY as s,IHO_TABLE_FIXED_STATUS as n,WIDGET_TYPE as d}from"../constants/index.js";import{defineTablePlugin as r}from"../hooks/useTablePlugin.js";import{getDefaultValue as a}from"./rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";import{IhoTableStatusHelper as f,IhoTableUtils as c}from"../utils/index.js";function m(){const m="lowCodeFieldAdaptorPlugin";return r({name:m,apply(r){r.fieldHooks.field.tap({name:m,stage:s},((s,r,m)=>{const u=s,p={className:u.bold?"iho-table__boldCell":"",field:u.columnName,showOverflow:"ellipsis",visible:f.notNegative(u.isShow),minWidth:u.colWidth,sortable:f.isPositive(u.isSort),fixed:n[u.isFixed],...u,title:u.alias||u.title};return function(e,i){const l={default:i.slotFn,header:i.headerSlotFn,edit:i.editSlotFn,footer:i.footerSlotFn,...i.slots};if(t(i.checkEditStatus)){const{default:e}=l;t(e)&&(l.default=t=>i.checkEditStatus(t)?e(t):[o("span",null,a(t.row,t.column.editRender.props))])}e.slots=l}(p,u),function(o,s,n){var r,a,m;const u=i(l(s));u.componentProps={size:"mini"===n.size?"small":n.size,...u.componentProps},n.forceClearable&&(u.componentProps.clearable=!0);o.editRender={name:c.getCellType(s),...o.editRender,props:u},null==(null==(r=o.editRender)?void 0:r.enabled)&&(o.editRender.enabled=!Reflect.get(d,o.editRender.name),!o.editRender.enabled&&t(null==(a=o.slots)?void 0:a.default)&&(o.editRender.enabled=t(null==(m=o.slots)?void 0:m.edit)));if(!e(s.settingObj))return;Reflect.has(s.settingObj,"isHide")&&(o.visible=o.visible&&f.notPositive(s.settingObj.isHide))}(p,u,m),p})),r.fieldHooks.field.tap({name:m+"After",stage:1e3},(t=>(e(t.slots)&&Object.entries(t.slots).forEach((([e,i])=>{null==i&&Reflect.deleteProperty(t.slots,e)})),t)))}})}export{m as lowCodeFieldAdaptorPlugin};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as a,openBlock as t,createBlock as o,unref as r,isRef as s,withCtx as u,createVNode as i}from"vue";import l from"../../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import{useLevelSearchCascader as p}from"../../../../../../../shared/hooks/useLevelSearchCascader.js";import"@vueuse/shared";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{InjectionTableAsyncQueue as n}from"../../../../constants/index.js";import d from"../../../../../../search-cascader/index.js";var c=e({__name:"levelSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},value:{type:[String,Array]},fieldKey:{type:String,required:!0},payload:{type:Object,required:!0}},emits:["update:value","click"],setup(e,{emit:c}){const y=e,h=a(n),{valueKey:m,valueRef:f,labelKey:v,optionsRef:k,showRef:j,fetchData:S,menuWidth:b,searchCascaderRef:g}=p(y,c,{fieldKey:y.fieldKey,asyncQueue:h,getRequestPayload:()=>y.payload});function q(){b.value=150}function w(e){c("click",e)}return(e,a)=>(t(),o(r(d),{ref_key:"searchCascaderRef",ref:g,value:r(f),"onUpdate:value":a[0]||(a[0]=e=>s(f)?f.value=e:null),show:r(j),"onUpdate:show":a[1]||(a[1]=e=>s(j)?j.value=e:null),options:r(k),"label-key":r(v),"value-key":r(m),search:r(S),"menu-width":r(b),"input-props":{onClick:w},onFocus:q},{empty:u((()=>[i(r(l))])),_:1},8,["value","show","options","label-key","value-key","search","menu-width","input-props"]))}});export{c as default};
1
+ import{defineComponent as e,inject as a,openBlock as t,createBlock as o,unref as r,isRef as s,withCtx as i,createVNode as u}from"vue";import l from"../../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import{useLevelSearchCascader as p}from"../../../../../../../shared/hooks/useLevelSearchCascader.js";import"@vueuse/shared";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../../../../../shared/hooks/useScrollLoading.js";import{InjectionTableAsyncQueue as n}from"../../../../constants/index.js";import d from"../../../../../../search-cascader/index.js";var c=e({__name:"levelSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},value:{type:[String,Array]},fieldKey:{type:String,required:!0},payload:{type:Object,required:!0}},emits:["update:value","click"],setup(e,{emit:c}){const h=e,m=a(n),{valueKey:y,valueRef:f,labelKey:v,optionsRef:k,showRef:j,fetchData:S,menuWidth:g,searchCascaderRef:b}=p(h,c,{fieldKey:h.fieldKey,asyncQueue:m,getRequestPayload:()=>h.payload});function q(){g.value=150}function w(e){c("click",e)}return(e,a)=>(t(),o(r(d),{ref_key:"searchCascaderRef",ref:b,value:r(f),"onUpdate:value":a[0]||(a[0]=e=>s(f)?f.value=e:null),show:r(j),"onUpdate:show":a[1]||(a[1]=e=>s(j)?j.value=e:null),options:r(k),"label-key":r(v),"value-key":r(y),search:r(S),"menu-width":r(g),"input-props":{onClick:w},onFocus:q},{empty:i((()=>[u(r(l))])),_:1},8,["value","show","options","label-key","value-key","search","menu-width","input-props"]))}});export{c as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as a,nextTick as n,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s}from"naive-ui";import{useVModel as d,useDebounceFn as c}from"@vueuse/core";import"date-fns";import{isFunction as p,isEmpty as v,isArray as f,isObject as y,omit as m,cloneDeep as h,xor as w}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as b}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as g}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as F}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{useMenuWidthAuto as S}from"../../../../../../../shared/hooks/selectHooks/useMenuWidthAuto.js";import{InjectionIhoTableUUID as k,InjectionIhoTableConfig as O}from"../../../../constants/index.js";import{useIhoTableFormEvent as A}from"../../../../utils/index.js";import{getSelectOptions as B,selectOptionsMap as j}from"../hooks/useSelectOption.js";var x=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowModify:{type:Boolean},allowCreate:{type:Boolean},shouldSave:{type:Boolean},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},searchField:{type:Array},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0},searchByValue:{type:Boolean}},emits:["update:value"],setup(e,{emit:x}){const C=l("$xetable"),K=d(e,"value",x),$=o(null),{emitFormChangeWithParams:q}=A({...e,$table:C}),R=t((()=>e.labelField)),M=t((()=>e.valueField)),D=t((()=>e.aliasField)),H=t((()=>e.searchField)),{fullOptions:P,filterOptions:_,searchContent:E,remoteOptions:T}=g(e,{labelKey:R,valueKey:M,searchKey:H}),{modifyEvent:V,modifyAbleRef:W,getOptionsWithCreated:L}=b(e,{searchContent:E,labelKey:R,valueKey:M,valueRef:K,fullOptions:P}),I=t((()=>L(W.value?P.value:_.value))),{setMenuWith:U}=S(e,{selectRef:$,options:I}),N=o(!1),z=c((async function(l=""){E.value=l;try{if(N.value=!0,!p(e.queryOptions)||!v(e.options))return;T.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{N.value=!1}}),400),G=l(k);a((()=>X(!0)));const J=o(!1);function Q(e){J.value=e,X(),z(),e&&U()}async function X(l=!1){var o,t,a;if(!e.multiple)return;await n();const{refTableLeftBody:r,refTableBody:u}=C.getRefMaps(),i=null==(o=null==r?void 0:r.value)?void 0:o.$el;if(!i)return;const s=null==(t=null==u?void 0:u.value)?void 0:t.$el,d=C.getRowid(e.row),c=null==(a=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:a.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function Y(l,o){var t,a;const n=e.value;await V.updateValue(l,o);const r=B(G,e.column.field,e.row,C);G&&f(r)&&i(o).forEach((e=>{if(!y(e))return;const l=e;l.created&&l.shouldSave&&r.push(m(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(G&&(null==s?void 0:s.connectField)){const o=null==(a=s.connectField)?void 0:a.split(","),t=j.get(G);o.forEach((async o=>{var a;const{tableColumn:n}=C.reactData,r=n.find((e=>e.field===o)),u=null==(a=null==r?void 0:r.editRender)?void 0:a.props;if(null==u?void 0:u.queryOptions){const a=l?`${o}__${e.column.field}-${l}`:o;if(t[a])return;t[a]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return q({oldValue:n,option:h(o)}),X()}const Z=l(O);function ee(){var e,l;return null==(l=null==(e=Z.value)?void 0:e.keyboardConfig)?void 0:l.forceArrowKey}const le=o(!0);function oe(e){var l,o,t;if($.value)if("Tab"===e.code||ee()&&(t=e.key,["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))J.value?null==(o=(l=$.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}):C.internalData.isActivated=!0;else if("Backspace"===e.code&&ee()){""===$.value.pattern&&(K.value=null,le.value=!1)}else le.value=!0}const{renderTag:te,renderLabel:ae,renderSelectAll:ne}=F(e,{labelKey:R,valueKey:M,valueRef:K,showKey:D,searchContent:E});function re(l){if(!e.multiple)return;const o=l?I.value.map((e=>e[M.value])):[];if(!w(o,K.value).length)return;const t=K.value;K.value=o,q({oldValue:t,option:l?I.value:[]})}const ue=()=>({class:"iho-table__selectOption"}),ie=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=()=>ne(re)),r(s,{ref:$,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:N.value,options:I.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,keyboard:le.value,nodeProps:ue,menuProps:ie.value,renderTag:te,renderLabel:ae,show:J.value,onUpdateShow:Q,onUpdateValue:Y,onKeydownCapture:oe,onFocus:V.focus,onBlur:V.blur},l)}}});export{x as default};
1
+ import{defineComponent as e,inject as l,ref as o,computed as t,onBeforeUnmount as a,nextTick as n,createVNode as r,toRaw as u}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import{NSelect as s}from"naive-ui";import{useVModel as d,useDebounceFn as c}from"@vueuse/core";import"date-fns";import{isFunction as p,isEmpty as v,isArray as f,isObject as m,omit as y,cloneDeep as h,xor as w}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as b}from"../../../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import{useOptionFiltered as g}from"../../../../../../../shared/hooks/selectHooks/useOptionFiltered.js";import"../../../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as F}from"../../../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{useMenuWidthAuto as S}from"../../../../../../../shared/hooks/selectHooks/useMenuWidthAuto.js";import"../../../../../../../shared/hooks/useScrollLoading.js";import{InjectionIhoTableUUID as k,InjectionIhoTableConfig as O}from"../../../../constants/index.js";import{useIhoTableFormEvent as A}from"../../../../utils/index.js";import{getSelectOptions as j,selectOptionsMap as B}from"../hooks/useSelectOption.js";var x=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"},allowModify:{type:Boolean},allowCreate:{type:Boolean},shouldSave:{type:Boolean},consistentMenuWidth:{type:Boolean,default:!0},labelField:{type:String,default:"label"},valueField:{type:String,default:"value"},searchField:{type:Array},aliasField:{type:String},menuProps:{type:Object},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean,default:!0},searchByValue:{type:Boolean}},emits:["update:value"],setup(e,{emit:x}){const C=l("$xetable"),K=d(e,"value",x),$=o(null),{emitFormChangeWithParams:q}=A({...e,$table:C}),R=t((()=>e.labelField)),M=t((()=>e.valueField)),D=t((()=>e.aliasField)),H=t((()=>e.searchField)),{fullOptions:P,filterOptions:_,searchContent:E,remoteOptions:L}=g(e,{labelKey:R,valueKey:M,searchKey:H}),{modifyEvent:T,modifyAbleRef:V,getOptionsWithCreated:W}=b(e,{searchContent:E,labelKey:R,valueKey:M,valueRef:K,fullOptions:P}),I=t((()=>W(V.value?P.value:_.value))),{setMenuWith:U}=S(e,{selectRef:$,options:I}),N=o(!1),z=c((async function(l=""){E.value=l;try{if(N.value=!0,!p(e.queryOptions)||!v(e.options))return;L.value=await e.queryOptions({keyword:l,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(l){console.log(`获取${e.column.field}options错误`)}finally{N.value=!1}}),400),G=l(k);a((()=>X(!0)));const J=o(!1);function Q(e){J.value=e,X(),z(),e&&U()}async function X(l=!1){var o,t,a;if(!e.multiple)return;await n();const{refTableLeftBody:r,refTableBody:u}=C.getRefMaps(),i=null==(o=null==r?void 0:r.value)?void 0:o.$el;if(!i)return;const s=null==(t=null==u?void 0:u.value)?void 0:t.$el,d=C.getRowid(e.row),c=null==(a=s.querySelector(`.vxe-body--row[rowid="${d}"]`))?void 0:a.clientHeight;i.querySelector(`.vxe-body--row[rowid="${d}"]`).style.height=l?"unset":c+"px"}async function Y(l,o){var t,a;const n=e.value;await T.updateValue(l,o);const r=j(G,e.column.field,e.row,C);G&&f(r)&&i(o).forEach((e=>{if(!m(e))return;const l=e;l.created&&l.shouldSave&&r.push(y(u(l),["created","shouldSave"]))}));const s=null==(t=e.column.editRender)?void 0:t.props;if(G&&(null==s?void 0:s.connectField)){const o=null==(a=s.connectField)?void 0:a.split(","),t=B.get(G);o.forEach((async o=>{var a;const{tableColumn:n}=C.reactData,r=n.find((e=>e.field===o)),u=null==(a=null==r?void 0:r.editRender)?void 0:a.props;if(null==u?void 0:u.queryOptions){const a=l?`${o}__${e.column.field}-${l}`:o;if(t[a])return;t[a]=await u.queryOptions({row:e.row,column:r,isFullData:!0,connectColumn:e.column})}}))}return q({oldValue:n,option:h(o)}),X()}const Z=l(O);function ee(){var e,l;return null==(l=null==(e=Z.value)?void 0:e.keyboardConfig)?void 0:l.forceArrowKey}const le=o(!0);function oe(e){var l,o,t;if($.value)if("Tab"===e.code||ee()&&(t=e.key,["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))J.value?null==(o=(l=$.value).handleKeydown)||o.call(l,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}):C.internalData.isActivated=!0;else if("Backspace"===e.code&&ee()){""===$.value.pattern&&(K.value=null,le.value=!1)}else le.value=!0}const{renderTag:te,renderLabel:ae,renderSelectAll:ne}=F(e,{labelKey:R,valueKey:M,valueRef:K,showKey:D,searchContent:E});function re(l){if(!e.multiple)return;const o=l?I.value.map((e=>e[M.value])):[];if(!w(o,K.value).length)return;const t=K.value;K.value=o,q({oldValue:t,option:l?I.value:[]})}const ue=()=>({class:"iho-table__selectOption"}),ie=t((()=>{var l,o;return{...e.menuProps,class:`iho-table__selectMenu ${null!=(o=null==(l=e.menuProps)?void 0:l.class)?o:""}`}}));return()=>{const l={};return e.multiple&&e.selectAll&&(l.action=()=>ne(re)),r(s,{ref:$,placeholder:e.placeholder,labelField:e.labelField,valueField:e.valueField,loading:N.value,options:I.value,multiple:e.multiple,value:e.value,remote:!0,onSearch:z,clearable:!0,filterable:!0,keyboard:le.value,nodeProps:ue,menuProps:ie.value,renderTag:te,renderLabel:ae,show:J.value,onUpdateShow:Q,onUpdateValue:Y,onKeydownCapture:oe,onFocus:T.focus,onBlur:T.blur},l)}}});export{x as default};