cnhis-design-vue 3.3.3-beta.3 → 3.3.3-beta.31

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 (234) hide show
  1. package/es/components/audio-sdk/index.d.ts +18 -16
  2. package/es/components/audio-sdk/src/Index.vue.d.ts +18 -16
  3. package/es/components/audio-sdk/src/Index.vue2.js +47 -12
  4. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  5. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +6 -6
  6. package/es/components/audio-sdk/src/components/recording.vue.d.ts +6 -6
  7. package/es/components/audio-sdk/src/components/recording.vue2.js +17 -3
  8. package/es/components/audio-sdk/src/utils/recorder/fft.d.ts +4 -0
  9. package/es/components/audio-sdk/src/utils/recorder/mp3-engine.d.ts +4 -0
  10. package/es/components/audio-sdk/src/utils/recorder/mp3.d.ts +4 -0
  11. package/es/components/audio-sdk/src/utils/recorder/recorder.d.ts +4 -0
  12. package/es/components/audio-sdk/src/utils/recorder/wave.d.ts +4 -0
  13. package/es/components/base-search/index.d.ts +3 -0
  14. package/es/components/base-search/src/index.vue.d.ts +3 -0
  15. package/es/components/big-table/src/components/NoData.vue2.js +8 -1
  16. package/es/components/big-table/src/hooks/useTableParse.js +8 -1
  17. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  18. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  19. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  20. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  21. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +3 -0
  22. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  23. package/es/components/callback/src/components/render/popupMaps.d.ts +13 -0
  24. package/es/components/card-reader-sdk-cn/src/henan/index.js +8 -1
  25. package/es/components/card-render/src/components/index.d.ts +23 -23
  26. package/es/components/classification/index.d.ts +56 -6
  27. package/es/components/classification/src/components/search-filter/index.vue.d.ts +56 -6
  28. package/es/components/classification/src/components/set-classification/index.vue.d.ts +56 -6
  29. package/es/components/classification/src/index.vue.d.ts +56 -6
  30. package/es/components/date-picker/src/DatePicker.vue2.js +8 -1
  31. package/es/components/expand-field/index.d.ts +792 -1
  32. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +792 -1
  33. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +792 -1
  34. package/es/components/expand-field/src/components/form.vue.d.ts +792 -1
  35. package/es/components/expand-field/src/components/form.vue2.js +8 -1
  36. package/es/components/expand-field/src/index.vue.d.ts +792 -1
  37. package/es/components/field-editor/index.d.ts +13 -0
  38. package/es/components/field-editor/src/FieldEditor.vue.d.ts +13 -0
  39. package/es/components/field-editor/src/FieldEditor.vue2.js +2 -1
  40. package/es/components/field-editor/src/fields.d.ts +1 -0
  41. package/es/components/field-editor/src/fields.js +6 -0
  42. package/es/components/field-set/src/FieldColor.vue.d.ts +2 -0
  43. package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -0
  44. package/es/components/field-set/src/FieldSet.vue.d.ts +34 -0
  45. package/es/components/field-set/src/FieldSet.vue2.js +118 -69
  46. package/es/components/field-set/src/Index.vue2.js +8 -3
  47. package/es/components/field-set/src/TableStyle.vue2.js +2 -2
  48. package/es/components/field-set/src/constants/index.d.ts +1 -1
  49. package/es/components/field-set/src/types/index.d.ts +1 -0
  50. package/es/components/field-set/style/index.css +1 -1
  51. package/es/components/form-config/index.d.ts +39 -0
  52. package/es/components/form-config/src/FormConfig.vue.d.ts +39 -0
  53. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +13 -0
  54. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -0
  55. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +13 -0
  56. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +9 -2
  57. package/es/components/form-render/index.d.ts +13 -0
  58. package/es/components/form-render/src/FormRender.vue.d.ts +13 -0
  59. package/es/components/form-render/src/FormRender.vue2.js +4 -0
  60. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +13 -0
  61. package/es/components/form-render/src/components/renderer/formItem.js +8 -1
  62. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +12 -3
  63. package/es/components/form-render/src/hooks/useBusinessBinding.js +7 -7
  64. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  65. package/es/components/form-render/src/hooks/useFormValidator.js +8 -1
  66. package/es/components/form-render/src/hooks/useLowCodeReactions.js +2 -1
  67. package/es/components/form-render/src/utils/business.d.ts +3 -1
  68. package/es/components/form-render/src/utils/business.js +7 -1
  69. package/es/components/iho-chat/index.d.ts +25 -5
  70. package/es/components/iho-chat/src/Index.vue.d.ts +25 -5
  71. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +2 -2
  72. package/es/components/iho-chat/src/components/ChatFile.vue2.js +5 -15
  73. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +5 -1
  74. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +53 -14
  75. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +2 -2
  76. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +3 -2
  77. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +3 -3
  78. package/es/components/iho-chat/src/components/ChatMain.vue2.js +7 -15
  79. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +2 -2
  80. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +3 -3
  81. package/es/components/iho-chat/src/components/ContextMenu.js +3 -11
  82. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +2 -2
  83. package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +3 -3
  84. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +16 -0
  85. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +112 -53
  86. package/es/components/iho-chat/src/hooks/index.d.ts +1 -0
  87. package/es/components/iho-chat/src/hooks/index.js +1 -0
  88. package/es/components/iho-chat/src/hooks/useData.js +2 -7
  89. package/es/components/iho-chat/src/hooks/useDraggable.d.ts +25 -0
  90. package/es/components/iho-chat/src/hooks/useDraggable.js +160 -0
  91. package/es/components/iho-chat/src/utils/index.d.ts +2 -3
  92. package/es/components/iho-chat/src/utils/index.js +20 -39
  93. package/es/components/iho-chat/style/index.css +1 -1
  94. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +8 -1
  95. package/es/components/iho-table/src/plugins/headerPlugin/index.js +5 -2
  96. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +2 -1
  97. package/es/components/index.css +1 -1
  98. package/es/components/info-header/index.d.ts +26 -0
  99. package/es/components/info-header/src/InfoHeader.vue.d.ts +26 -0
  100. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +13 -0
  101. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +13 -0
  102. package/es/components/info-header/src/components/patientInfo/index.vue2.js +16 -2
  103. package/es/components/quick-search/index.d.ts +2 -0
  104. package/es/components/quick-search/src/index.vue.d.ts +2 -0
  105. package/es/components/scale-view/index.d.ts +53 -3
  106. package/es/components/scale-view/src/ScaleView.vue.d.ts +56 -5
  107. package/es/components/scale-view/src/ScaleView.vue2.js +79 -4
  108. package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +5 -0
  109. package/es/components/scale-view/src/components/AnswerParse.vue2.js +74 -8
  110. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +3 -0
  111. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +26 -2
  112. package/es/components/scale-view/src/components/EvaluatePage.vue.d.ts +3 -0
  113. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +27 -6
  114. package/es/components/scale-view/src/components/NoData.vue2.js +9 -3
  115. package/es/components/scale-view/src/components/ScaleScore.d.ts +1 -1
  116. package/es/components/scale-view/src/components/ScaleScore.js +45 -3
  117. package/es/components/scale-view/src/components/formitem/r-checkbox.js +16 -2
  118. package/es/components/scale-view/src/components/formitem/r-sign.js +32 -4
  119. package/es/components/scale-view/src/components/formitem/r-upload.js +65 -7
  120. package/es/components/scale-view/src/components/formitem/sign-com.js +8 -1
  121. package/es/components/scale-view/src/hooks/scaleview-computed.js +18 -3
  122. package/es/components/scale-view/src/hooks/scaleview-init.js +24 -3
  123. package/es/components/scale-view/src/hooks/scaleview-methods.js +40 -5
  124. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +8 -0
  125. package/es/components/scale-view/src/hooks/scaleview-props.js +8 -0
  126. package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +2 -1
  127. package/es/components/scale-view/src/hooks/scaleview-submit.js +64 -8
  128. package/es/components/scale-view/src/hooks/scaleview-validate.d.ts +1 -1
  129. package/es/components/scale-view/src/hooks/scaleview-validate.js +157 -24
  130. package/es/components/scale-view/src/hooks/use-evaluate.js +16 -2
  131. package/es/components/scale-view/src/hooks/use-noData.js +33 -5
  132. package/es/components/scale-view/src/utils/judge-types.d.ts +2 -1
  133. package/es/components/scale-view/src/utils/judge-types.js +10 -10
  134. package/es/components/scale-view/src/utils/watch-form-change.d.ts +13 -0
  135. package/es/components/scale-view/src/utils/watch-form-change.js +71 -0
  136. package/es/components/select-person/index.d.ts +792 -1
  137. package/es/components/select-person/src/SelectPerson.vue.d.ts +434 -341
  138. package/es/components/select-person/src/SelectPerson.vue2.js +521 -675
  139. package/es/components/select-person/src/SelectPersonRole.vue.d.ts +630 -0
  140. package/es/components/select-person/src/SelectPersonRole.vue.js +6 -0
  141. package/es/components/select-person/src/SelectPersonRole.vue2.js +942 -0
  142. package/es/components/select-person/src/components/GroupItem.vue.d.ts +19 -0
  143. package/es/components/select-person/src/components/GroupItem.vue.js +6 -0
  144. package/es/components/select-person/src/components/GroupItem.vue2.js +37 -0
  145. package/es/components/select-person/src/components/SearchGroupList.vue.d.ts +214 -0
  146. package/es/components/select-person/src/components/SearchGroupList.vue.js +6 -0
  147. package/es/components/select-person/src/components/SearchGroupList.vue2.js +145 -0
  148. package/es/components/select-person/src/components/SearchMultiple.vue2.js +1 -1
  149. package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +21 -12
  150. package/es/components/select-person/src/components/TagItem.vue.d.ts +43 -0
  151. package/es/components/select-person/src/components/TagItem.vue.js +6 -0
  152. package/es/components/select-person/src/components/TagItem.vue2.js +40 -0
  153. package/es/components/select-person/src/index.vue.d.ts +793 -1
  154. package/es/components/select-person/src/index.vue2.js +21 -4
  155. package/es/components/select-person/src/types/index.d.ts +35 -0
  156. package/es/components/select-person/src/types/index.js +1 -0
  157. package/es/components/select-person/src/utils/index.d.ts +3 -0
  158. package/es/components/select-person/src/utils/index.js +29 -8
  159. package/es/components/select-person/style/index.css +1 -1
  160. package/es/components/shortcut-setter/index.d.ts +13 -0
  161. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +13 -0
  162. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
  163. package/es/components/table-filter/src/components/bi-filter/components/SelectFilter.vue.d.ts +1 -0
  164. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +1 -0
  165. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
  166. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +54 -6
  167. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +26 -10
  168. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +17 -2
  169. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +37 -2
  170. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +18 -2
  171. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +44 -1
  172. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +1 -0
  173. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
  174. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +2 -1
  175. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +55 -6
  176. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +6 -3
  177. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +1 -1
  178. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +12 -1
  179. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue.d.ts +1 -1
  180. package/es/components/table-filter/src/components/render-widget/components/DateQuickBtn/index.vue2.js +25 -6
  181. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +1 -1
  182. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +12 -1
  183. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +2 -2
  184. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +2 -2
  185. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
  186. package/es/components/table-filter/src/hooks/useAdvanced.js +20 -3
  187. package/es/components/table-filter/src/hooks/useRenderWidget.js +4 -0
  188. package/es/components/table-filter/src/tool/date.d.ts +3 -0
  189. package/es/components/table-filter/src/tool/date.js +139 -0
  190. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  191. package/es/components/table-filter/src/tool/transformData.js +11 -8
  192. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  193. package/es/components/table-filter/src/types/enums.js +2 -1
  194. package/es/components/table-filter/src/types/index.d.ts +12 -0
  195. package/es/components/vod-chunk-upload/index.d.ts +3 -0
  196. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +1 -29
  197. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +109 -11
  198. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +15 -1
  199. package/es/components/vod-chunk-upload/src/hooks/upload-data.js +72 -9
  200. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +3 -0
  201. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +75 -9
  202. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  203. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  204. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  205. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  206. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  207. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  208. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  209. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  210. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  211. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  212. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  213. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  214. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  215. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  216. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  217. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  218. package/es/shared/assets/img/failure.png.js +1 -1
  219. package/es/shared/assets/img/no-permission.png.js +1 -1
  220. package/es/shared/assets/img/nodata.png.js +1 -1
  221. package/es/shared/assets/img/notfound.png.js +1 -1
  222. package/es/shared/assets/img/qr.png.js +1 -1
  223. package/es/shared/assets/img/success.png.js +1 -1
  224. package/es/shared/assets/img/table_style_2.png.js +1 -1
  225. package/es/shared/assets/img/video.png.js +1 -1
  226. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  227. package/es/shared/assets/img/xb_big.png.js +1 -1
  228. package/es/shared/assets/img/xb_small.png.js +1 -1
  229. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  230. package/es/shared/hooks/selectHooks/useSearchContent.js +1 -1
  231. package/es/shared/package.json.js +1 -1
  232. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  233. package/es/shared/utils/tapable/index.d.ts +139 -0
  234. package/package.json +3 -3
@@ -7,7 +7,9 @@ export declare function isIdCard(idCardNo: string): boolean;
7
7
  export declare function isMobile(mobile: string): boolean;
8
8
  export declare function parseBirthday(birthday: string): AgeContext;
9
9
  export declare function parseAge2Birthday(age: number, ageUnit: string, formatter?: string): string;
10
- export declare function parseAgeFromContext(context: AgeContext): {
10
+ export declare function parseAgeFromContext(context: AgeContext & {
11
+ birthday?: string;
12
+ }, nominalAge?: boolean): {
11
13
  ageUnit: FIELD_AGE_UNIT;
12
14
  age: number;
13
15
  };
@@ -174,7 +174,13 @@ function parseAge2Birthday(age, ageUnit, formatter = "yyyy-MM-dd HH:mm") {
174
174
  return date;
175
175
  }
176
176
  }
177
- function parseAgeFromContext(context) {
177
+ function parseAgeFromContext(context, nominalAge) {
178
+ if (nominalAge && context.birthday) {
179
+ return {
180
+ ageUnit: FIELD_AGE_UNIT.YEAR,
181
+ age: Math.max(new Date().getFullYear() - new Date(context.birthday).getFullYear(), 1)
182
+ };
183
+ }
178
184
  const result = context.minutes < 60 ? {
179
185
  ageUnit: FIELD_AGE_UNIT.MINUTE,
180
186
  age: context.minutes
@@ -933,7 +933,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
933
933
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
934
934
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
935
935
  downloadFile: typeof import("./src/utils").downloadFile;
936
- getFileDetails: typeof import("./src/utils").getFileDetails;
936
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
937
937
  getFileType: typeof import("./src/utils").getFileType;
938
938
  getDetail: typeof import("./src/utils").getDetail;
939
939
  ChatAdd: import("vue").DefineComponent<{
@@ -1353,7 +1353,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1353
1353
  formatTime: typeof import("./src/utils").formatTime;
1354
1354
  isDoctorRole: typeof import("./src/utils").isDoctorRole;
1355
1355
  getRoleName: typeof import("./src/utils").getRoleName;
1356
- getFileDetails: typeof import("./src/utils").getFileDetails;
1356
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
1357
1357
  getFileType: typeof import("./src/utils").getFileType;
1358
1358
  getDetail: typeof import("./src/utils").getDetail;
1359
1359
  showAudioAndVideoRecord: typeof import("./src/utils").showAudioAndVideoRecord;
@@ -1690,7 +1690,6 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1690
1690
  renderToolbar: ({ nodes }: import("naive-ui").ImageRenderToolbarProps) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1691
1691
  [key: string]: any;
1692
1692
  }>[];
1693
- formatImage: (obj: string | import("../../shared/types").AnyObject, type: string) => any;
1694
1693
  getHistoryRecord: () => Promise<void>;
1695
1694
  handleSelectLabel: (event: MouseEvent, msgId: string) => void;
1696
1695
  handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
@@ -1909,7 +1908,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1909
1908
  getForwardTitle: typeof import("./src/utils").getForwardTitle;
1910
1909
  isDoctorRole: typeof import("./src/utils").isDoctorRole;
1911
1910
  getRoleName: typeof import("./src/utils").getRoleName;
1912
- getFileDetails: typeof import("./src/utils").getFileDetails;
1911
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
1913
1912
  getFileType: typeof import("./src/utils").getFileType;
1914
1913
  getDetail: typeof import("./src/utils").getDetail;
1915
1914
  showAudioAndVideoRecord: typeof import("./src/utils").showAudioAndVideoRecord;
@@ -2272,6 +2271,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
2272
2271
  isAudioOrVideoMessage: typeof import("./src/utils").isAudioOrVideoMessage;
2273
2272
  getAVTime: typeof import("./src/utils").getAVTime;
2274
2273
  getForwardTitle: typeof import("./src/utils").getForwardTitle;
2274
+ formatJsonstr: typeof import("./src/utils").formatJsonstr;
2275
2275
  MESSAGE_TYPE: typeof import("./src/constants").MESSAGE_TYPE;
2276
2276
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2277
2277
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -2281,6 +2281,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
2281
2281
  HappyOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2282
2282
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2283
2283
  ChatFooter: import("vue").DefineComponent<{}, {
2284
+ SPACE_PLACEHOLDER: string;
2284
2285
  inputRef: import("vue").Ref<HTMLDivElement | undefined>;
2285
2286
  state: {
2286
2287
  orgId: string | number;
@@ -2330,16 +2331,19 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
2330
2331
  options: import("../../shared/types").AnyObject[];
2331
2332
  defaultValue: import("../../shared/types").AnyObject[];
2332
2333
  }>;
2333
- btnDisabled: import("vue").ComputedRef<boolean>;
2334
+ sendBtnDisabled: import("vue").ComputedRef<boolean>;
2334
2335
  isForwardDisabled: import("vue").ComputedRef<boolean>;
2336
+ callBtnDisabled: import("vue").ComputedRef<boolean>;
2335
2337
  handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
2336
2338
  handleKeyDown: (event: KeyboardEvent) => void;
2337
2339
  isWrap: (event: KeyboardEvent) => boolean;
2338
2340
  handleInput: () => void;
2339
2341
  selectEmoji: (name: string) => void;
2342
+ insertSpace: () => void;
2340
2343
  doUpdateFile: (file: File) => Promise<string>;
2341
2344
  fileChange: (options: import("./src/types").FileOptions, chatMessageType: import("./src/constants").MESSAGE_TYPE) => Promise<void>;
2342
2345
  handleMsgSend: () => Promise<void>;
2346
+ removeSpace: () => void;
2343
2347
  doSendMessage: (contentInfo: import("../../shared/types").AnyObject) => Promise<void>;
2344
2348
  clearInput: () => void;
2345
2349
  handleRelay: ({ checkedIds, remark }: {
@@ -3046,8 +3050,22 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
3046
3050
  handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
3047
3051
  }) => void;
3048
3052
  isConnect: import("vue").Ref<boolean>;
3053
+ wrapperRef: import("vue").Ref<HTMLElement | null>;
3054
+ handleRef: import("vue").Ref<HTMLElement | null>;
3055
+ isMaxSize: import("vue").Ref<boolean>;
3056
+ miniWrapperRef: import("vue").Ref<HTMLElement | null>;
3049
3057
  callUser: import("vue").ComputedRef<any>;
3050
3058
  title: import("vue").ComputedRef<string>;
3059
+ style: import("vue").Ref<{
3060
+ left: string;
3061
+ top: string;
3062
+ }>;
3063
+ changePosition: (position?: ("center" | "top-right") | undefined) => void;
3064
+ miniStyle: import("vue").Ref<{
3065
+ left: string;
3066
+ top: string;
3067
+ }>;
3068
+ changeMiniPosition: (position?: ("center" | "top-right") | undefined) => void;
3051
3069
  handleAddPerson: ({ checkedIds, checkedOptions }: {
3052
3070
  checkedIds: string[];
3053
3071
  checkedOptions: import("../../shared/types").AnyObject[];
@@ -3062,6 +3080,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
3062
3080
  handleRemoteUserExit: (event: any) => void;
3063
3081
  handleError: (error: any) => void;
3064
3082
  NButton: any;
3083
+ NAvatar: any;
3065
3084
  NIcon: any;
3066
3085
  ChatAdd: import("vue").DefineComponent<{
3067
3086
  title: {
@@ -3264,6 +3283,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
3264
3283
  PersonAdd: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3265
3284
  MicOff: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3266
3285
  Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3286
+ ResizeOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3267
3287
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3268
3288
  PersonProfile: import("vue").DefineComponent<{}, {
3269
3289
  state: {
@@ -934,7 +934,7 @@ declare const _default: import("vue").DefineComponent<{
934
934
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
935
935
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
936
936
  downloadFile: typeof import("./utils").downloadFile;
937
- getFileDetails: typeof import("./utils").getFileDetails;
937
+ formatJsonstr: typeof import("./utils").formatJsonstr;
938
938
  getFileType: typeof import("./utils").getFileType;
939
939
  getDetail: typeof import("./utils").getDetail;
940
940
  ChatAdd: import("vue").DefineComponent<{
@@ -1354,7 +1354,7 @@ declare const _default: import("vue").DefineComponent<{
1354
1354
  formatTime: typeof import("./utils").formatTime;
1355
1355
  isDoctorRole: typeof import("./utils").isDoctorRole;
1356
1356
  getRoleName: typeof import("./utils").getRoleName;
1357
- getFileDetails: typeof import("./utils").getFileDetails;
1357
+ formatJsonstr: typeof import("./utils").formatJsonstr;
1358
1358
  getFileType: typeof import("./utils").getFileType;
1359
1359
  getDetail: typeof import("./utils").getDetail;
1360
1360
  showAudioAndVideoRecord: typeof import("./utils").showAudioAndVideoRecord;
@@ -1691,7 +1691,6 @@ declare const _default: import("vue").DefineComponent<{
1691
1691
  renderToolbar: ({ nodes }: import("naive-ui").ImageRenderToolbarProps) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1692
1692
  [key: string]: any;
1693
1693
  }>[];
1694
- formatImage: (obj: string | AnyObject, type: string) => any;
1695
1694
  getHistoryRecord: () => Promise<void>;
1696
1695
  handleSelectLabel: (event: MouseEvent, msgId: string) => void;
1697
1696
  handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
@@ -1910,7 +1909,7 @@ declare const _default: import("vue").DefineComponent<{
1910
1909
  getForwardTitle: typeof import("./utils").getForwardTitle;
1911
1910
  isDoctorRole: typeof import("./utils").isDoctorRole;
1912
1911
  getRoleName: typeof import("./utils").getRoleName;
1913
- getFileDetails: typeof import("./utils").getFileDetails;
1912
+ formatJsonstr: typeof import("./utils").formatJsonstr;
1914
1913
  getFileType: typeof import("./utils").getFileType;
1915
1914
  getDetail: typeof import("./utils").getDetail;
1916
1915
  showAudioAndVideoRecord: typeof import("./utils").showAudioAndVideoRecord;
@@ -2273,6 +2272,7 @@ declare const _default: import("vue").DefineComponent<{
2273
2272
  isAudioOrVideoMessage: typeof import("./utils").isAudioOrVideoMessage;
2274
2273
  getAVTime: typeof import("./utils").getAVTime;
2275
2274
  getForwardTitle: typeof import("./utils").getForwardTitle;
2275
+ formatJsonstr: typeof import("./utils").formatJsonstr;
2276
2276
  MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
2277
2277
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2278
2278
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -2282,6 +2282,7 @@ declare const _default: import("vue").DefineComponent<{
2282
2282
  HappyOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2283
2283
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2284
2284
  ChatFooter: import("vue").DefineComponent<{}, {
2285
+ SPACE_PLACEHOLDER: string;
2285
2286
  inputRef: import("vue").Ref<HTMLDivElement | undefined>;
2286
2287
  state: {
2287
2288
  orgId: string | number;
@@ -2331,16 +2332,19 @@ declare const _default: import("vue").DefineComponent<{
2331
2332
  options: AnyObject[];
2332
2333
  defaultValue: AnyObject[];
2333
2334
  }>;
2334
- btnDisabled: import("vue").ComputedRef<boolean>;
2335
+ sendBtnDisabled: import("vue").ComputedRef<boolean>;
2335
2336
  isForwardDisabled: import("vue").ComputedRef<boolean>;
2337
+ callBtnDisabled: import("vue").ComputedRef<boolean>;
2336
2338
  handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
2337
2339
  handleKeyDown: (event: KeyboardEvent) => void;
2338
2340
  isWrap: (event: KeyboardEvent) => boolean;
2339
2341
  handleInput: () => void;
2340
2342
  selectEmoji: (name: string) => void;
2343
+ insertSpace: () => void;
2341
2344
  doUpdateFile: (file: File) => Promise<string>;
2342
2345
  fileChange: (options: import("./types").FileOptions, chatMessageType: import("./constants").MESSAGE_TYPE) => Promise<void>;
2343
2346
  handleMsgSend: () => Promise<void>;
2347
+ removeSpace: () => void;
2344
2348
  doSendMessage: (contentInfo: AnyObject) => Promise<void>;
2345
2349
  clearInput: () => void;
2346
2350
  handleRelay: ({ checkedIds, remark }: {
@@ -3047,8 +3051,22 @@ declare const _default: import("vue").DefineComponent<{
3047
3051
  handleRemoteVideoAvailable: import("../../../shared/types").AnyFn;
3048
3052
  }) => void;
3049
3053
  isConnect: import("vue").Ref<boolean>;
3054
+ wrapperRef: import("vue").Ref<HTMLElement | null>;
3055
+ handleRef: import("vue").Ref<HTMLElement | null>;
3056
+ isMaxSize: import("vue").Ref<boolean>;
3057
+ miniWrapperRef: import("vue").Ref<HTMLElement | null>;
3050
3058
  callUser: import("vue").ComputedRef<any>;
3051
3059
  title: import("vue").ComputedRef<string>;
3060
+ style: import("vue").Ref<{
3061
+ left: string;
3062
+ top: string;
3063
+ }>;
3064
+ changePosition: (position?: ("center" | "top-right") | undefined) => void;
3065
+ miniStyle: import("vue").Ref<{
3066
+ left: string;
3067
+ top: string;
3068
+ }>;
3069
+ changeMiniPosition: (position?: ("center" | "top-right") | undefined) => void;
3052
3070
  handleAddPerson: ({ checkedIds, checkedOptions }: {
3053
3071
  checkedIds: string[];
3054
3072
  checkedOptions: AnyObject[];
@@ -3063,6 +3081,7 @@ declare const _default: import("vue").DefineComponent<{
3063
3081
  handleRemoteUserExit: (event: any) => void;
3064
3082
  handleError: (error: any) => void;
3065
3083
  NButton: any;
3084
+ NAvatar: any;
3066
3085
  NIcon: any;
3067
3086
  ChatAdd: import("vue").DefineComponent<{
3068
3087
  title: {
@@ -3265,6 +3284,7 @@ declare const _default: import("vue").DefineComponent<{
3265
3284
  PersonAdd: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3266
3285
  MicOff: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3267
3286
  Close: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3287
+ ResizeOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3268
3288
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3269
3289
  PersonProfile: import("vue").DefineComponent<{}, {
3270
3290
  state: {
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
- import { downloadFile, getFileDetails, getFileType, getDetail } from '../utils';
3
+ import { downloadFile, formatJsonstr, getFileType, getDetail } from '../utils';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  type: {
6
6
  type: StringConstructor;
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
82
82
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
83
83
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
84
84
  downloadFile: typeof downloadFile;
85
- getFileDetails: typeof getFileDetails;
85
+ formatJsonstr: typeof formatJsonstr;
86
86
  getFileType: typeof getFileType;
87
87
  getDetail: typeof getDetail;
88
88
  ChatAdd: import("vue").DefineComponent<{
@@ -13,7 +13,7 @@ import { useScrollLoading } from '../../../../shared/hooks/useScrollLoading.js';
13
13
  import { useData } from '../hooks/useData.js';
14
14
  import 'stompjs';
15
15
  import 'sockjs-client/dist/sockjs.min.js';
16
- import { getFileSize, getFileDetails, getFileType, getDetail, downloadFile } from '../utils/index.js';
16
+ import { formatJsonstr, getFileType, getDetail, downloadFile } from '../utils/index.js';
17
17
  import 'trtc-sdk-v5';
18
18
  import ChatAdd from './ChatAdd.vue.js';
19
19
 
@@ -103,17 +103,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
103
103
  const newList = formatImageList(_list);
104
104
  imageList.value = pageInfo.page > 1 ? imageList.value.concat(newList) : newList;
105
105
  } else {
106
- const promiseList = _list.map((item) => {
107
- return new Promise(async (resolve) => {
108
- const size = await getFileSize(item.content.fileUrl);
109
- resolve({
110
- ...item,
111
- size
112
- });
113
- });
114
- });
115
- const newList = await Promise.all(promiseList);
116
- fileList.value = pageInfo.page > 1 ? fileList.value.concat(newList) : newList;
106
+ fileList.value = pageInfo.page > 1 ? fileList.value.concat(_list) : _list;
117
107
  }
118
108
  } catch (error) {
119
109
  } finally {
@@ -209,7 +199,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
199
  key: image,
210
200
  width: "80",
211
201
  height: "80",
212
- src: unref(getFileDetails)(image, "fileUrl")
202
+ src: unref(formatJsonstr)(image, "fileUrl")
213
203
  }, null, 8, ["src"]);
214
204
  }), 128))])]);
215
205
  }), 128))]),
@@ -246,7 +236,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
246
236
  return openBlock(), createElementBlock("div", {
247
237
  class: "file-item",
248
238
  key: i
249
- }, [createElementVNode("span", _hoisted_3, toDisplayString(unref(getFileType)(item.content.msg)), 1), createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(unref(getFileDetails)(item.content.msg, "fileName")), 1), createElementVNode("span", _hoisted_6, toDisplayString(unref(getDetail)(item, true)), 1)]), createElementVNode("div", _hoisted_7, [createVNode(ChatAdd, {
239
+ }, [createElementVNode("span", _hoisted_3, toDisplayString(unref(getFileType)(item.content.msg)), 1), createElementVNode("div", _hoisted_4, [createElementVNode("span", _hoisted_5, toDisplayString(unref(formatJsonstr)(item.content.msg, "fileName")), 1), createElementVNode("span", _hoisted_6, toDisplayString(unref(getDetail)(item, true)), 1)]), createElementVNode("div", _hoisted_7, [createVNode(ChatAdd, {
250
240
  title: function() {
251
241
  var _a, _b, _c;
252
242
  try {
@@ -286,7 +276,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
286
276
  trigger: withCtx(() => [createVNode(unref(NIcon), {
287
277
  size: 16,
288
278
  component: unref(DownloadOutline),
289
- onClick: () => unref(downloadFile)(item.content.fileUr, item.content.msg)
279
+ onClick: () => unref(downloadFile)(item.content.msg)
290
280
  }, null, 8, ["component", "onClick"])]),
291
281
  default: withCtx(() => [createTextVNode(function() {
292
282
  var _a, _b, _c;
@@ -4,6 +4,7 @@ import { MESSAGE_TYPE } from '../constants';
4
4
  import { simplifyMessage } from '../utils';
5
5
  import { FileOptions } from '../types';
6
6
  declare const _default: import("vue").DefineComponent<{}, {
7
+ SPACE_PLACEHOLDER: string;
7
8
  inputRef: Ref<HTMLDivElement | undefined>;
8
9
  state: {
9
10
  orgId: string | number;
@@ -53,16 +54,19 @@ declare const _default: import("vue").DefineComponent<{}, {
53
54
  options: AnyObject[];
54
55
  defaultValue: AnyObject[];
55
56
  }>;
56
- btnDisabled: import("vue").ComputedRef<boolean>;
57
+ sendBtnDisabled: import("vue").ComputedRef<boolean>;
57
58
  isForwardDisabled: import("vue").ComputedRef<boolean>;
59
+ callBtnDisabled: import("vue").ComputedRef<boolean>;
58
60
  handleCall: (chatMessageType: string, checkedIds?: string[]) => void;
59
61
  handleKeyDown: (event: KeyboardEvent) => void;
60
62
  isWrap: (event: KeyboardEvent) => boolean;
61
63
  handleInput: () => void;
62
64
  selectEmoji: (name: string) => void;
65
+ insertSpace: () => void;
63
66
  doUpdateFile: (file: File) => Promise<string>;
64
67
  fileChange: (options: FileOptions, chatMessageType: MESSAGE_TYPE) => Promise<void>;
65
68
  handleMsgSend: () => Promise<void>;
69
+ removeSpace: () => void;
66
70
  doSendMessage: (contentInfo: AnyObject) => Promise<void>;
67
71
  clearInput: () => void;
68
72
  handleRelay: ({ checkedIds, remark }: {
@@ -1,4 +1,4 @@
1
- import { createElementVNode, defineComponent, ref, computed, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
1
+ import { createElementVNode, defineComponent, ref, computed, onMounted, watch, withDirectives, openBlock, createElementBlock, normalizeStyle, unref, createVNode, withCtx, Fragment, toDisplayString, createCommentVNode, renderList, createBlock, createTextVNode, mergeProps, renderSlot, vShow } from 'vue';
2
2
  import { NButton, NIcon, NTooltip, NPopover, NUpload, NUploadTrigger } from 'naive-ui';
3
3
  import ChatAdd from './ChatAdd.vue.js';
4
4
  import { useData } from '../hooks/useData.js';
@@ -92,6 +92,7 @@ const _hoisted_24 = /* @__PURE__ */ createElementVNode("span", {
92
92
  var _sfc_main = /* @__PURE__ */ defineComponent({
93
93
  __name: "ChatFooter",
94
94
  setup(__props) {
95
+ const SPACE_PLACEHOLDER = '<span style="display: inline-block;width: 1px;user-select: none;" data-space="true"></span>';
95
96
  const inputRef = ref();
96
97
  const {
97
98
  state,
@@ -109,8 +110,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
109
110
  defaultValue: [state.userInfo]
110
111
  };
111
112
  });
112
- const btnDisabled = computed(() => !content.value.replace(/(&nbsp;|\s|<br>)+/g, ""));
113
+ const sendBtnDisabled = computed(() => !content.value.replace(/(&nbsp;|\s|<br>|<span[^>]*data-space="true"[^>]*>[\s\S]*?<\/span>)+/g, ""));
113
114
  const isForwardDisabled = computed(() => !state.msgList.some((msgItem) => msgItem.checked));
115
+ const callBtnDisabled = computed(() => state.showVideo || state.showMultipleVideo);
114
116
  function handleCall(chatMessageType, checkedIds = []) {
115
117
  const uuid = uuidGenerator();
116
118
  const _checkedIds = [];
@@ -153,15 +155,29 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
153
155
  }
154
156
  function handleInput() {
155
157
  var _a;
158
+ if (!inputRef.value)
159
+ return;
156
160
  content.value = ((_a = inputRef.value) == null ? void 0 : _a.innerHTML) || "";
161
+ insertSpace();
157
162
  }
158
163
  function selectEmoji(name) {
159
164
  var _a;
160
165
  commonEmoticons.value.unshift(name);
161
166
  commonEmoticons.value = uniq(commonEmoticons.value).slice(0, 26);
167
+ if (!inputRef.value)
168
+ return;
162
169
  (_a = inputRef.value) == null ? void 0 : _a.focus();
170
+ insertSpace();
163
171
  document.execCommand("insertHTML", false, `<img data-msg=${name} data-type=${MESSAGE_TYPE.EMOJI} class="emoji--min" src=${emojis.findEmoji(name)} />`);
164
172
  }
173
+ function insertSpace() {
174
+ if (!inputRef.value)
175
+ return;
176
+ if (!inputRef.value.innerHTML || inputRef.value.innerHTML === "<br>") {
177
+ Array.from(inputRef.value.childNodes).forEach((child) => child.remove());
178
+ document.execCommand("insertHTML", false, SPACE_PLACEHOLDER);
179
+ }
180
+ }
165
181
  async function doUpdateFile(file) {
166
182
  const formData = new FormData();
167
183
  formData.append("sender", state.userInfo.id);
@@ -175,7 +191,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
175
191
  } = options.file;
176
192
  const data = await doUpdateFile(file);
177
193
  if (!data)
178
- return console.log("\u4E0A\u4F20\u5931\u8D25");
194
+ return console.log(function() {
195
+ var _a, _b, _c;
196
+ try {
197
+ return ((_a = window.getLanguageByCode) == null ? void 0 : _a.call(window, "10010.1.641")) || ((_c = (_b = window.top) == null ? void 0 : _b.getLanguageByCode) == null ? void 0 : _c.call(_b, "10010.1.641")) || "\u4E0A\u4F20\u5931\u8D25";
198
+ } catch (e) {
199
+ return "\u4E0A\u4F20\u5931\u8D25";
200
+ }
201
+ }());
179
202
  doSendMessage({
180
203
  chatMessageType,
181
204
  msg: isObject(data) ? JSON.stringify(data) : chatMessageType === MESSAGE_TYPE.FILE ? name : data,
@@ -183,13 +206,14 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
183
206
  });
184
207
  }
185
208
  async function handleMsgSend() {
209
+ if (sendBtnDisabled.value)
210
+ return console.log("\u8BF7\u8F93\u5165\u5185\u5BB9");
211
+ removeSpace();
186
212
  const {
187
213
  innerHTML = "",
188
214
  innerText = "",
189
215
  outerText = ""
190
216
  } = inputRef.value || {};
191
- if (btnDisabled.value)
192
- return console.log("\u8BF7\u8F93\u5165\u5185\u5BB9");
193
217
  let chatMessageType = MESSAGE_TYPE.TEXT;
194
218
  let msg = "";
195
219
  if (innerHTML) {
@@ -251,6 +275,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
251
275
  origin: "btn"
252
276
  });
253
277
  }
278
+ function removeSpace() {
279
+ if (!inputRef.value)
280
+ return;
281
+ const spaceHolders = inputRef.value.querySelectorAll('[data-space="true"]');
282
+ spaceHolders.forEach((space) => space.remove());
283
+ }
254
284
  async function doSendMessage(contentInfo) {
255
285
  const {
256
286
  chatMessageType = MESSAGE_TYPE.TEXT,
@@ -262,7 +292,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
262
292
  msg,
263
293
  chatMessageType
264
294
  };
265
- if (chatMessageType === MESSAGE_TYPE.FILE) {
295
+ if ([MESSAGE_TYPE.FILE, MESSAGE_TYPE.IMAGE].includes(chatMessageType)) {
266
296
  _content.fileUrl = url;
267
297
  }
268
298
  if (origin === "btn") {
@@ -280,7 +310,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
280
310
  }
281
311
  function clearInput() {
282
312
  if (inputRef.value) {
283
- inputRef.value.innerHTML = "";
313
+ inputRef.value.innerHTML = SPACE_PLACEHOLDER;
284
314
  }
285
315
  content.value = "";
286
316
  }
@@ -315,6 +345,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
315
345
  });
316
346
  state.isForward = false;
317
347
  }
348
+ onMounted(() => {
349
+ if (inputRef.value) {
350
+ inputRef.value.innerHTML = SPACE_PLACEHOLDER;
351
+ }
352
+ });
318
353
  watch(() => [state.currentReferenceMsg, state.currentReEditMsg], ([currentReferenceMsg, currentReEditMsg]) => {
319
354
  var _a;
320
355
  if (currentReferenceMsg || currentReEditMsg) {
@@ -578,14 +613,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
578
613
  }, {
579
614
  trigger: withCtx(() => [createVNode(unref(NButton), {
580
615
  quaternary: "",
581
- size: "tiny"
616
+ size: "tiny",
617
+ disabled: unref(callBtnDisabled)
582
618
  }, {
583
619
  icon: withCtx(() => [createVNode(unref(NIcon), {
584
620
  size: "18",
585
621
  component: unref(CallOutline)
586
622
  }, null, 8, ["component"])]),
587
623
  _: 1
588
- })]),
624
+ }, 8, ["disabled"])]),
589
625
  default: withCtx(() => [createTextVNode(function() {
590
626
  var _a, _b, _c;
591
627
  try {
@@ -605,14 +641,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
605
641
  }, {
606
642
  trigger: withCtx(() => [createVNode(unref(NButton), {
607
643
  quaternary: "",
608
- size: "tiny"
644
+ size: "tiny",
645
+ disabled: unref(callBtnDisabled)
609
646
  }, {
610
647
  icon: withCtx(() => [createVNode(unref(NIcon), {
611
648
  size: "20",
612
649
  component: unref(VideocamOutline)
613
650
  }, null, 8, ["component"])]),
614
651
  _: 1
615
- })]),
652
+ }, 8, ["disabled"])]),
616
653
  default: withCtx(() => [createTextVNode(function() {
617
654
  var _a, _b, _c;
618
655
  try {
@@ -632,6 +669,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
632
669
  trigger: withCtx(() => [createVNode(unref(NButton), {
633
670
  quaternary: "",
634
671
  size: "tiny",
672
+ disabled: unref(callBtnDisabled),
635
673
  onClick: _cache[9] || (_cache[9] = () => handleCall(unref(MESSAGE_TYPE).AUDIO))
636
674
  }, {
637
675
  icon: withCtx(() => [createVNode(unref(NIcon), {
@@ -639,7 +677,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
639
677
  component: unref(CallOutline)
640
678
  }, null, 8, ["component"])]),
641
679
  _: 1
642
- })]),
680
+ }, 8, ["disabled"])]),
643
681
  default: withCtx(() => [createTextVNode(function() {
644
682
  var _a, _b, _c;
645
683
  try {
@@ -655,6 +693,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
655
693
  trigger: withCtx(() => [createVNode(unref(NButton), {
656
694
  quaternary: "",
657
695
  size: "tiny",
696
+ disabled: unref(callBtnDisabled),
658
697
  onClick: _cache[10] || (_cache[10] = () => handleCall(unref(MESSAGE_TYPE).VIDEO))
659
698
  }, {
660
699
  icon: withCtx(() => [createVNode(unref(NIcon), {
@@ -662,7 +701,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
662
701
  component: unref(VideocamOutline)
663
702
  }, null, 8, ["component"])]),
664
703
  _: 1
665
- })]),
704
+ }, 8, ["disabled"])]),
666
705
  default: withCtx(() => [createTextVNode(function() {
667
706
  var _a, _b, _c;
668
707
  try {
@@ -682,7 +721,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
682
721
  }, null, 40, _hoisted_22), [[vShow, unref(state).id]]), createElementVNode("div", _hoisted_23, [_hoisted_24, createVNode(unref(NButton), {
683
722
  type: "primary",
684
723
  round: "",
685
- disabled: unref(btnDisabled),
724
+ disabled: unref(sendBtnDisabled),
686
725
  onClick: handleMsgSend
687
726
  }, {
688
727
  default: withCtx(() => [createTextVNode(function() {
@@ -401,7 +401,7 @@ declare const _default: import("vue").DefineComponent<{}, {
401
401
  OpenOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
402
402
  DownloadOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
403
403
  downloadFile: typeof import("../utils").downloadFile;
404
- getFileDetails: typeof import("../utils").getFileDetails;
404
+ formatJsonstr: typeof import("../utils").formatJsonstr;
405
405
  getFileType: typeof import("../utils").getFileType;
406
406
  getDetail: typeof import("../utils").getDetail;
407
407
  ChatAdd: import("vue").DefineComponent<{
@@ -821,7 +821,7 @@ declare const _default: import("vue").DefineComponent<{}, {
821
821
  formatTime: typeof import("../utils").formatTime;
822
822
  isDoctorRole: typeof import("../utils").isDoctorRole;
823
823
  getRoleName: typeof import("../utils").getRoleName;
824
- getFileDetails: typeof import("../utils").getFileDetails;
824
+ formatJsonstr: typeof import("../utils").formatJsonstr;
825
825
  getFileType: typeof import("../utils").getFileType;
826
826
  getDetail: typeof import("../utils").getDetail;
827
827
  showAudioAndVideoRecord: typeof import("../utils").showAudioAndVideoRecord;
@@ -218,14 +218,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
218
218
  }, {
219
219
  trigger: withCtx(() => [createVNode(unref(NButton), {
220
220
  quaternary: "",
221
- size: "tiny"
221
+ size: "tiny",
222
+ disabled: unref(state).showVideo || unref(state).showMultipleVideo
222
223
  }, {
223
224
  icon: withCtx(() => [createVNode(unref(NIcon), {
224
225
  size: "18",
225
226
  component: unref(CloseOutline)
226
227
  }, null, 8, ["component"])]),
227
228
  _: 1
228
- })]),
229
+ }, 8, ["disabled"])]),
229
230
  default: withCtx(() => [createTextVNode(" \u7ED3\u675F\u804A\u5929 ")]),
230
231
  _: 1
231
232
  })]),
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  import { ImageRenderToolbarProps } from 'naive-ui';
3
3
  import { AnyObject } from '../../../../shared/types';
4
- import { simplifyMessage, isAudioOrVideoMessage, getAVTime, getForwardTitle } from '../utils';
4
+ import { simplifyMessage, isAudioOrVideoMessage, getAVTime, getForwardTitle, formatJsonstr } from '../utils';
5
5
  import { MESSAGE_TYPE } from '../constants';
6
6
  declare const _default: import("vue").DefineComponent<{}, {
7
7
  chatMainRef: import("vue").Ref<HTMLElement | undefined>;
@@ -71,7 +71,6 @@ declare const _default: import("vue").DefineComponent<{}, {
71
71
  renderToolbar: ({ nodes }: ImageRenderToolbarProps) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
72
72
  [key: string]: any;
73
73
  }>[];
74
- formatImage: (obj: AnyObject | string, type: string) => any;
75
74
  getHistoryRecord: () => Promise<void>;
76
75
  handleSelectLabel: (event: MouseEvent, msgId: string) => void;
77
76
  handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
@@ -290,7 +289,7 @@ declare const _default: import("vue").DefineComponent<{}, {
290
289
  getForwardTitle: typeof getForwardTitle;
291
290
  isDoctorRole: typeof import("../utils").isDoctorRole;
292
291
  getRoleName: typeof import("../utils").getRoleName;
293
- getFileDetails: typeof import("../utils").getFileDetails;
292
+ formatJsonstr: typeof formatJsonstr;
294
293
  getFileType: typeof import("../utils").getFileType;
295
294
  getDetail: typeof import("../utils").getDetail;
296
295
  showAudioAndVideoRecord: typeof import("../utils").showAudioAndVideoRecord;
@@ -653,6 +652,7 @@ declare const _default: import("vue").DefineComponent<{}, {
653
652
  isAudioOrVideoMessage: typeof isAudioOrVideoMessage;
654
653
  getAVTime: typeof getAVTime;
655
654
  getForwardTitle: typeof getForwardTitle;
655
+ formatJsonstr: typeof formatJsonstr;
656
656
  MESSAGE_TYPE: typeof MESSAGE_TYPE;
657
657
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
658
658
  EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;