cnhis-design-vue 3.2.14-beta.2 → 3.2.14-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  6. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  7. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  8. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  11. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  12. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  13. package/es/components/button-print/index.d.ts +4 -0
  14. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  15. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  16. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  17. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  18. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  19. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  20. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  21. package/es/components/classification/src/index.vue2.js +1 -1
  22. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  23. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  24. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  25. package/es/components/expand-field/src/index.vue2.js +1 -1
  26. package/es/components/expand-field/src/utils/constant.js +1 -1
  27. package/es/components/fabric-chart/index.d.ts +19 -2
  28. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +19 -2
  29. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  30. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  32. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  33. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  34. package/es/components/fabric-chart/src/constants/index.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  37. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  41. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  55. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  57. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  58. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  59. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  60. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  61. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  62. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  63. package/es/components/fabric-chart/src/utils/index.js +1 -1
  64. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  65. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  66. package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
  67. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  68. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  69. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  70. package/es/components/field-set/src/Index.vue2.js +1 -1
  71. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  72. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  73. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  74. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  75. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  76. package/es/components/field-set/src/components/table-row.vue.d.ts +2 -2
  77. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  78. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  79. package/es/components/field-set/src/constants/filter.js +1 -1
  80. package/es/components/field-set/src/constants/index.js +1 -1
  81. package/es/components/field-set/src/types/index.d.ts +1 -1
  82. package/es/components/form-config/index.d.ts +7 -5
  83. package/es/components/form-config/index.js +1 -1
  84. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -5
  85. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  86. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  87. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  88. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  89. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  90. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
  91. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  92. package/es/components/form-config/src/constants/index.d.ts +1 -11
  93. package/es/components/form-config/src/constants/index.js +1 -1
  94. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  95. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  96. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  97. package/es/components/form-render/index.js +1 -1
  98. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  99. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  100. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  101. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  102. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  103. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  104. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  105. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  106. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  107. package/es/components/form-render/src/utils/index.d.ts +1 -0
  108. package/es/components/form-render/src/utils/index.js +1 -1
  109. package/es/components/iho-chat/index.d.ts +612 -52
  110. package/es/components/iho-chat/src/Index.vue.d.ts +615 -59
  111. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  112. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  113. package/es/components/iho-chat/src/api/index.js +1 -1
  114. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +32 -1
  115. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  116. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
  117. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  118. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
  119. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  120. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
  121. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  122. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
  123. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  124. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
  125. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  126. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +20 -2
  127. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  128. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
  129. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  130. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  131. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  132. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  133. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  134. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
  135. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  136. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
  137. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  138. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +66 -1
  139. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  140. package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
  141. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  142. package/es/components/iho-chat/src/constants/index.d.ts +13 -3
  143. package/es/components/iho-chat/src/constants/index.js +1 -1
  144. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  145. package/es/components/iho-chat/src/hooks/index.js +1 -1
  146. package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
  147. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  148. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  149. package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
  150. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  151. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  152. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  153. package/es/components/iho-chat/src/types/index.d.ts +0 -6
  154. package/es/components/iho-chat/src/types/index.js +1 -1
  155. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  156. package/es/components/iho-chat/src/utils/index.js +1 -1
  157. package/es/components/iho-chat/style/index.css +1 -1
  158. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  159. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  160. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  161. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  162. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  163. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  164. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  165. package/es/components/iho-table/src/utils/index.js +1 -1
  166. package/es/components/index.css +1 -1
  167. package/es/components/index.js +1 -1
  168. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  169. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  170. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  171. package/es/components/map/src/Map.vue2.js +1 -1
  172. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  173. package/es/components/quick-search/src/index.vue2.js +1 -1
  174. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  175. package/es/components/scale-view/index.d.ts +31 -0
  176. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  177. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  178. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  179. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  180. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  181. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  182. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  183. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  184. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  185. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  186. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  187. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  188. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  189. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  190. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  191. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  192. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  193. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  194. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  195. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  196. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  197. package/es/components/scale-view/style/index.css +1 -1
  198. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  199. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  200. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  201. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  202. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  203. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  204. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  205. package/es/components/select-person/src/index.vue2.js +1 -1
  206. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  207. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  208. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  209. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  210. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  211. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  212. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  213. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  214. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  215. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  216. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  217. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  218. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  220. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  221. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  222. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  223. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  224. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  225. package/es/shared/package.json.js +1 -1
  226. package/es/shared/types/index.d.ts +3 -0
  227. package/es/shared/utils/index.d.ts +1 -0
  228. package/es/shared/utils/index.js +1 -1
  229. package/package.json +2 -2
  230. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  231. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  232. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  233. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1,7 +1,29 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  declare const _default: import("vue").DefineComponent<{}, {
3
- state: import("../types").IState;
3
+ state: {
4
+ orgId: string | number;
5
+ currentSessionItem: AnyObject;
6
+ id: string;
7
+ userInfo: AnyObject;
8
+ msgList: AnyObject[];
9
+ currentMsg: AnyObject;
10
+ isAppendMsg: boolean;
11
+ sessionList: AnyObject[];
12
+ isChangeSession: boolean;
13
+ updateSessionItem: AnyObject;
14
+ isUpdateSession: boolean;
15
+ currentReferenceMsg: AnyObject | null;
16
+ currentReEditMsg: AnyObject | null;
17
+ showVideo: boolean;
18
+ currentAVMsg: AnyObject;
19
+ currentGroupUser: AnyObject[];
20
+ showMultipleVideo: boolean;
21
+ };
4
22
  isGroupChat: import("vue").ComputedRef<boolean>;
23
+ isGroupLeader: import("vue").ComputedRef<boolean>;
24
+ isEnded: import("vue").ComputedRef<boolean>;
25
+ setCurrentSessionItem: (item: AnyObject) => void;
26
+ emit: (event: "template-click" | "unread-message-update" | "session-change" | "session-close", ...args: any[]) => void;
5
27
  showChatSet: import("vue").Ref<boolean>;
6
28
  showChatFile: import("vue").Ref<boolean>;
7
29
  chatFileType: import("vue").Ref<string>;
@@ -9,17 +31,21 @@ declare const _default: import("vue").DefineComponent<{}, {
9
31
  chatAddProps: import("vue").ComputedRef<{
10
32
  mode: string;
11
33
  disabledIds: any[];
34
+ disabled: boolean;
12
35
  defaultValue?: undefined;
13
36
  } | {
14
37
  mode: string;
15
38
  defaultValue: AnyObject[];
16
39
  disabledIds?: undefined;
40
+ disabled?: undefined;
17
41
  }>;
18
42
  handleOpenChatFile: (type: string) => void;
43
+ handleClose: () => Promise<void>;
19
44
  NAvatar: any;
20
45
  NIcon: any;
21
46
  NButton: any;
22
47
  NTooltip: any;
48
+ NPopconfirm: any;
23
49
  PersonProfile: import("vue").DefineComponent<{
24
50
  userId: {
25
51
  type: StringConstructor;
@@ -43,7 +69,25 @@ declare const _default: import("vue").DefineComponent<{}, {
43
69
  onClose?: ((...args: any[]) => any) | undefined;
44
70
  }>>;
45
71
  emit: (event: "close", ...args: any[]) => void;
46
- state: import("../types").IState;
72
+ state: {
73
+ orgId: string | number;
74
+ currentSessionItem: AnyObject;
75
+ id: string;
76
+ userInfo: AnyObject;
77
+ msgList: AnyObject[];
78
+ currentMsg: AnyObject;
79
+ isAppendMsg: boolean;
80
+ sessionList: AnyObject[];
81
+ isChangeSession: boolean;
82
+ updateSessionItem: AnyObject;
83
+ isUpdateSession: boolean;
84
+ currentReferenceMsg: AnyObject | null;
85
+ currentReEditMsg: AnyObject | null;
86
+ showVideo: boolean;
87
+ currentAVMsg: AnyObject;
88
+ currentGroupUser: AnyObject[];
89
+ showMultipleVideo: boolean;
90
+ };
47
91
  openSession: (item: AnyObject) => Promise<void>;
48
92
  showUserDetail: import("vue").Ref<boolean>;
49
93
  showLargeAvatar: import("vue").Ref<boolean>;
@@ -91,14 +135,32 @@ declare const _default: import("vue").DefineComponent<{}, {
91
135
  attrs: {
92
136
  [x: string]: unknown;
93
137
  };
94
- state: import("../types").IState;
138
+ state: {
139
+ orgId: string | number;
140
+ currentSessionItem: AnyObject;
141
+ id: string;
142
+ userInfo: AnyObject;
143
+ msgList: AnyObject[];
144
+ currentMsg: AnyObject;
145
+ isAppendMsg: boolean;
146
+ sessionList: AnyObject[];
147
+ isChangeSession: boolean;
148
+ updateSessionItem: AnyObject;
149
+ isUpdateSession: boolean;
150
+ currentReferenceMsg: AnyObject | null;
151
+ currentReEditMsg: AnyObject | null;
152
+ showVideo: boolean;
153
+ currentAVMsg: AnyObject;
154
+ currentGroupUser: AnyObject[];
155
+ showMultipleVideo: boolean;
156
+ };
95
157
  setCurrentSessionItem: (item: AnyObject) => void;
96
158
  isGroupChat: import("vue").ComputedRef<boolean>;
159
+ isGroupLeader: import("vue").ComputedRef<boolean>;
97
160
  inputRef: import("vue").Ref<any>;
98
161
  groupNameEditing: import("vue").Ref<boolean>;
99
162
  groupName: import("vue").Ref<string>;
100
163
  showGroupDetail: import("vue").Ref<boolean>;
101
- isGroupLeader: import("vue").ComputedRef<boolean>;
102
164
  currentGroupUserIds: import("vue").ComputedRef<any[]>;
103
165
  currentGroupUser: import("vue").ComputedRef<AnyObject[]>;
104
166
  handleTopping: (value: boolean) => Promise<void>;
@@ -147,7 +209,25 @@ declare const _default: import("vue").DefineComponent<{}, {
147
209
  onClose?: ((...args: any[]) => any) | undefined;
148
210
  }>>;
149
211
  emit: (event: "close", ...args: any[]) => void;
150
- state: import("../types").IState;
212
+ state: {
213
+ orgId: string | number;
214
+ currentSessionItem: AnyObject;
215
+ id: string;
216
+ userInfo: AnyObject;
217
+ msgList: AnyObject[];
218
+ currentMsg: AnyObject;
219
+ isAppendMsg: boolean;
220
+ sessionList: AnyObject[];
221
+ isChangeSession: boolean;
222
+ updateSessionItem: AnyObject;
223
+ isUpdateSession: boolean;
224
+ currentReferenceMsg: AnyObject | null;
225
+ currentReEditMsg: AnyObject | null;
226
+ showVideo: boolean;
227
+ currentAVMsg: AnyObject;
228
+ currentGroupUser: AnyObject[];
229
+ showMultipleVideo: boolean;
230
+ };
151
231
  openSession: (item: AnyObject) => Promise<void>;
152
232
  showUserDetail: import("vue").Ref<boolean>;
153
233
  showLargeAvatar: import("vue").Ref<boolean>;
@@ -211,6 +291,10 @@ declare const _default: import("vue").DefineComponent<{}, {
211
291
  type: import("vue").PropType<AnyObject[]>;
212
292
  default: () => never[];
213
293
  };
294
+ disabled: {
295
+ type: BooleanConstructor;
296
+ default: boolean;
297
+ };
214
298
  }, {
215
299
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
216
300
  title: {
@@ -232,11 +316,33 @@ declare const _default: import("vue").DefineComponent<{}, {
232
316
  type: import("vue").PropType<AnyObject[]>;
233
317
  default: () => never[];
234
318
  };
319
+ disabled: {
320
+ type: BooleanConstructor;
321
+ default: boolean;
322
+ };
235
323
  }>> & {
236
324
  onComfirm?: ((...args: any[]) => any) | undefined;
237
325
  }>>;
238
326
  emit: (event: "comfirm", ...args: any[]) => void;
239
- state: import("../types").IState;
327
+ state: {
328
+ orgId: string | number;
329
+ currentSessionItem: AnyObject;
330
+ id: string;
331
+ userInfo: AnyObject;
332
+ msgList: AnyObject[];
333
+ currentMsg: AnyObject;
334
+ isAppendMsg: boolean;
335
+ sessionList: AnyObject[];
336
+ isChangeSession: boolean;
337
+ updateSessionItem: AnyObject;
338
+ isUpdateSession: boolean;
339
+ currentReferenceMsg: AnyObject | null;
340
+ currentReEditMsg: AnyObject | null;
341
+ showVideo: boolean;
342
+ currentAVMsg: AnyObject;
343
+ currentGroupUser: AnyObject[];
344
+ showMultipleVideo: boolean;
345
+ };
240
346
  setCurrentSessionItem: (item: AnyObject) => void;
241
347
  listRef: import("vue").Ref<any>;
242
348
  keyword: import("vue").Ref<string>;
@@ -296,11 +402,16 @@ declare const _default: import("vue").DefineComponent<{}, {
296
402
  type: import("vue").PropType<AnyObject[]>;
297
403
  default: () => never[];
298
404
  };
405
+ disabled: {
406
+ type: BooleanConstructor;
407
+ default: boolean;
408
+ };
299
409
  }>> & {
300
410
  onComfirm?: ((...args: any[]) => any) | undefined;
301
411
  }, {
302
412
  title: string;
303
413
  defaultValue: AnyObject[];
414
+ disabled: boolean;
304
415
  mode: string;
305
416
  disabledIds: string[];
306
417
  }>;
@@ -314,7 +425,6 @@ declare const _default: import("vue").DefineComponent<{}, {
314
425
  type: BooleanConstructor;
315
426
  };
316
427
  }, {
317
- cssVars: import("vue").ComputedRef<AnyObject>;
318
428
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
319
429
  type: {
320
430
  type: StringConstructor;
@@ -324,7 +434,26 @@ declare const _default: import("vue").DefineComponent<{}, {
324
434
  type: BooleanConstructor;
325
435
  };
326
436
  }>> & {}>>;
327
- state: import("../types").IState;
437
+ cssVars: import("vue").ComputedRef<AnyObject>;
438
+ state: {
439
+ orgId: string | number;
440
+ currentSessionItem: AnyObject;
441
+ id: string;
442
+ userInfo: AnyObject;
443
+ msgList: AnyObject[];
444
+ currentMsg: AnyObject;
445
+ isAppendMsg: boolean;
446
+ sessionList: AnyObject[];
447
+ isChangeSession: boolean;
448
+ updateSessionItem: AnyObject;
449
+ isUpdateSession: boolean;
450
+ currentReferenceMsg: AnyObject | null;
451
+ currentReEditMsg: AnyObject | null;
452
+ showVideo: boolean;
453
+ currentAVMsg: AnyObject;
454
+ currentGroupUser: AnyObject[];
455
+ showMultipleVideo: boolean;
456
+ };
328
457
  relayMessage: (param: {
329
458
  checkedIds: string[];
330
459
  remark: string;
@@ -380,6 +509,10 @@ declare const _default: import("vue").DefineComponent<{}, {
380
509
  type: import("vue").PropType<AnyObject[]>;
381
510
  default: () => never[];
382
511
  };
512
+ disabled: {
513
+ type: BooleanConstructor;
514
+ default: boolean;
515
+ };
383
516
  }, {
384
517
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
385
518
  title: {
@@ -401,11 +534,33 @@ declare const _default: import("vue").DefineComponent<{}, {
401
534
  type: import("vue").PropType<AnyObject[]>;
402
535
  default: () => never[];
403
536
  };
537
+ disabled: {
538
+ type: BooleanConstructor;
539
+ default: boolean;
540
+ };
404
541
  }>> & {
405
542
  onComfirm?: ((...args: any[]) => any) | undefined;
406
543
  }>>;
407
544
  emit: (event: "comfirm", ...args: any[]) => void;
408
- state: import("../types").IState;
545
+ state: {
546
+ orgId: string | number;
547
+ currentSessionItem: AnyObject;
548
+ id: string;
549
+ userInfo: AnyObject;
550
+ msgList: AnyObject[];
551
+ currentMsg: AnyObject;
552
+ isAppendMsg: boolean;
553
+ sessionList: AnyObject[];
554
+ isChangeSession: boolean;
555
+ updateSessionItem: AnyObject;
556
+ isUpdateSession: boolean;
557
+ currentReferenceMsg: AnyObject | null;
558
+ currentReEditMsg: AnyObject | null;
559
+ showVideo: boolean;
560
+ currentAVMsg: AnyObject;
561
+ currentGroupUser: AnyObject[];
562
+ showMultipleVideo: boolean;
563
+ };
409
564
  setCurrentSessionItem: (item: AnyObject) => void;
410
565
  listRef: import("vue").Ref<any>;
411
566
  keyword: import("vue").Ref<string>;
@@ -465,11 +620,16 @@ declare const _default: import("vue").DefineComponent<{}, {
465
620
  type: import("vue").PropType<AnyObject[]>;
466
621
  default: () => never[];
467
622
  };
623
+ disabled: {
624
+ type: BooleanConstructor;
625
+ default: boolean;
626
+ };
468
627
  }>> & {
469
628
  onComfirm?: ((...args: any[]) => any) | undefined;
470
629
  }, {
471
630
  title: string;
472
631
  defaultValue: AnyObject[];
632
+ disabled: boolean;
473
633
  mode: string;
474
634
  disabledIds: string[];
475
635
  }>;
@@ -499,7 +659,25 @@ declare const _default: import("vue").DefineComponent<{}, {
499
659
  type: BooleanConstructor;
500
660
  };
501
661
  }>> & {}>>;
502
- state: import("../types").IState;
662
+ state: {
663
+ orgId: string | number;
664
+ currentSessionItem: AnyObject;
665
+ id: string;
666
+ userInfo: AnyObject;
667
+ msgList: AnyObject[];
668
+ currentMsg: AnyObject;
669
+ isAppendMsg: boolean;
670
+ sessionList: AnyObject[];
671
+ isChangeSession: boolean;
672
+ updateSessionItem: AnyObject;
673
+ isUpdateSession: boolean;
674
+ currentReferenceMsg: AnyObject | null;
675
+ currentReEditMsg: AnyObject | null;
676
+ showVideo: boolean;
677
+ currentAVMsg: AnyObject;
678
+ currentGroupUser: AnyObject[];
679
+ showMultipleVideo: boolean;
680
+ };
503
681
  recordRef: import("vue").Ref<any>;
504
682
  recordList: import("vue").Ref<AnyObject[]>;
505
683
  keyword: import("vue").Ref<any>;
@@ -680,6 +858,10 @@ declare const _default: import("vue").DefineComponent<{}, {
680
858
  type: import("vue").PropType<AnyObject[]>;
681
859
  default: () => never[];
682
860
  };
861
+ disabled: {
862
+ type: BooleanConstructor;
863
+ default: boolean;
864
+ };
683
865
  }, {
684
866
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
685
867
  title: {
@@ -701,11 +883,33 @@ declare const _default: import("vue").DefineComponent<{}, {
701
883
  type: import("vue").PropType<AnyObject[]>;
702
884
  default: () => never[];
703
885
  };
886
+ disabled: {
887
+ type: BooleanConstructor;
888
+ default: boolean;
889
+ };
704
890
  }>> & {
705
891
  onComfirm?: ((...args: any[]) => any) | undefined;
706
892
  }>>;
707
893
  emit: (event: "comfirm", ...args: any[]) => void;
708
- state: import("../types").IState;
894
+ state: {
895
+ orgId: string | number;
896
+ currentSessionItem: AnyObject;
897
+ id: string;
898
+ userInfo: AnyObject;
899
+ msgList: AnyObject[];
900
+ currentMsg: AnyObject;
901
+ isAppendMsg: boolean;
902
+ sessionList: AnyObject[];
903
+ isChangeSession: boolean;
904
+ updateSessionItem: AnyObject;
905
+ isUpdateSession: boolean;
906
+ currentReferenceMsg: AnyObject | null;
907
+ currentReEditMsg: AnyObject | null;
908
+ showVideo: boolean;
909
+ currentAVMsg: AnyObject;
910
+ currentGroupUser: AnyObject[];
911
+ showMultipleVideo: boolean;
912
+ };
709
913
  setCurrentSessionItem: (item: AnyObject) => void;
710
914
  listRef: import("vue").Ref<any>;
711
915
  keyword: import("vue").Ref<string>;
@@ -765,14 +969,20 @@ declare const _default: import("vue").DefineComponent<{}, {
765
969
  type: import("vue").PropType<AnyObject[]>;
766
970
  default: () => never[];
767
971
  };
972
+ disabled: {
973
+ type: BooleanConstructor;
974
+ default: boolean;
975
+ };
768
976
  }>> & {
769
977
  onComfirm?: ((...args: any[]) => any) | undefined;
770
978
  }, {
771
979
  title: string;
772
980
  defaultValue: AnyObject[];
981
+ disabled: boolean;
773
982
  mode: string;
774
983
  disabledIds: string[];
775
984
  }>;
776
985
  PersonAddOutline: 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<{}>>, {}>;
986
+ CloseOutline: 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<{}>>, {}>;
777
987
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
778
988
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as o,openBlock as r,createElementBlock as a,Fragment as i,unref as s,createElementVNode as n,createVNode as l,withCtx as c,toDisplayString as u,createTextVNode as m,normalizeProps as h,guardReactiveProps as d,createCommentVNode as p}from"vue";import{NAvatar as v,NTooltip as f,NButton as w,NIcon as g}from"naive-ui";import{useState as _}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import y from"./PersonProfile.vue.js";import j from"./ChatSet.vue.js";import C from"./ChatFile.vue.js";import k from"./ChatRecord.vue.js";import z from"./ChatAdd.vue.js";import{PersonAddOutline as S}from"@vicons/ionicons5";const q={key:0,class:"chat-header box-shadow"},U={class:"chat-header__left"},I={class:"name"},x={class:"chat-header__right"},G=n("i",{class:"chat--iconfont chat--icon-image"},null,-1),P=n("i",{class:"chat--iconfont chat--icon-folder"},null,-1),A=n("i",{class:"chat--iconfont chat--icon-list-search"},null,-1),F=n("i",{class:"chat--iconfont chat--icon-set"},null,-1);var H=e({__name:"ChatHeader",setup(e){const{state:H}=_(),{isGroupChat:R}=b(H),V=t(!1),B=t(!1),D=t("image"),E=t(!1),J=o((()=>{const e=H.currentGroupUser.map((e=>e.id));return R.value?{mode:"join",disabledIds:e}:{mode:"create",defaultValue:H.currentGroupUser}}));function K(e){D.value=e,B.value=!0}return(e,t)=>(r(),a(i,null,[s(H).id?(r(),a("section",q,[n("div",U,[l(y,{"user-id":s(H).currentSessionItem.receiver,disabled:s(R),placement:"bottom"},{trigger:c((()=>[l(s(v),{round:"",size:30,src:s(H).currentSessionItem.avatar},null,8,["src"])])),_:1},8,["user-id","disabled"]),n("span",I,u(s(H).currentSessionItem.name),1)]),n("div",x,[l(s(f),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[0]||(t[0]=()=>K("image"))},{icon:c((()=>[G])),_:1})])),default:c((()=>[m(" 图片 ")])),_:1}),l(s(f),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[1]||(t[1]=()=>K("file"))},{icon:c((()=>[P])),_:1})])),default:c((()=>[m(" 文件 ")])),_:1}),l(z,h(d(s(J))),{trigger:c((()=>[l(s(f),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny"},{icon:c((()=>[l(s(g),{size:"18",component:s(S)},null,8,["component"])])),_:1})])),default:c((()=>[m(" 添加成员 ")])),_:1})])),_:1},16),l(s(f),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[2]||(t[2]=()=>E.value=!0)},{icon:c((()=>[A])),_:1})])),default:c((()=>[m(" 聊天记录 ")])),_:1}),l(s(f),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(s(w),{quaternary:"",size:"tiny",onClick:t[3]||(t[3]=()=>V.value=!0)},{icon:c((()=>[F])),_:1})])),default:c((()=>[m(" 聊天设置 ")])),_:1})])])):p("v-if",!0),l(j,{show:V.value,"onUpdate:show":t[4]||(t[4]=e=>V.value=e)},null,8,["show"]),l(C,{show:B.value,"onUpdate:show":t[5]||(t[5]=e=>B.value=e),type:D.value,visible:B.value},null,8,["show","type","visible"]),l(k,{show:E.value,"onUpdate:show":t[6]||(t[6]=e=>E.value=e),visible:E.value},null,8,["show","visible"])],64))}});export{H as default};
1
+ import{defineComponent as e,ref as t,computed as o,openBlock as s,createElementBlock as i,Fragment as r,unref as a,createElementVNode as n,createVNode as l,withCtx as c,toDisplayString as u,renderSlot as m,createTextVNode as d,normalizeProps as h,guardReactiveProps as p,createBlock as v,createCommentVNode as f}from"vue";import{NAvatar as g,NTooltip as w,NButton as _,NIcon as y,NPopconfirm as b}from"naive-ui";import{useData as j}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as C}from"../constants/index.js";import{updateStatusApi as k}from"../api/index.js";import{$message as z}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import I from"./PersonProfile.vue.js";import S from"./ChatSet.vue.js";import q from"./ChatFile.vue.js";import x from"./ChatRecord.vue.js";import D from"./ChatAdd.vue.js";import{PersonAddOutline as E,CloseOutline as U}from"@vicons/ionicons5";const G={key:0,class:"chat-header box-shadow"},P={class:"chat-header__left"},N={class:"name"},A={class:"chat-header__right"},F=n("i",{class:"chat--iconfont chat--icon-image"},null,-1),H=n("i",{class:"chat--iconfont chat--icon-folder"},null,-1),L=n("i",{class:"chat--iconfont chat--icon-list-search"},null,-1),R=n("i",{class:"chat--iconfont chat--icon-set"},null,-1);var V=e({__name:"ChatHeader",setup(e){const{state:V,isGroupChat:$,isGroupLeader:B,isEnded:J,setCurrentSessionItem:K,emit:M}=j(),O=t(!1),Q=t(!1),T=t("image"),W=t(!1),X=o((()=>{const e=V.currentGroupUser.map((e=>e.id));return $.value?{mode:"join",disabledIds:e,disabled:J.value}:{mode:"create",defaultValue:V.currentGroupUser}}));function Y(e){T.value=e,Q.value=!0}async function Z(){try{await k({id:V.currentSessionItem.id,status:C.ENDED}),K({status:C.ENDED}),M("session-close",V.currentSessionItem),z.success("当前会话已结束")}catch(e){console.log(e)}}return(e,t)=>(s(),i(r,null,[a(V).id?(s(),i("section",G,[n("div",P,[l(I,{"user-id":a(V).currentSessionItem.receiver,disabled:a($),placement:"bottom"},{trigger:c((()=>[l(a(g),{round:"",size:30,src:a(V).currentSessionItem.avatar},null,8,["src"])])),_:1},8,["user-id","disabled"]),n("span",N,u(a(V).currentSessionItem.name),1)]),n("div",A,[m(e.$slots,"header"),l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny",onClick:t[0]||(t[0]=()=>Y("image"))},{icon:c((()=>[F])),_:1})])),default:c((()=>[d(" 图片 ")])),_:1}),l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny",onClick:t[1]||(t[1]=()=>Y("file"))},{icon:c((()=>[H])),_:1})])),default:c((()=>[d(" 文件 ")])),_:1}),l(D,h(p(a(X))),{trigger:c((()=>[l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny"},{icon:c((()=>[l(a(y),{size:"18",component:a(E)},null,8,["component"])])),_:1})])),default:c((()=>[d(" 添加成员 ")])),_:1})])),_:1},16),l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny",onClick:t[2]||(t[2]=()=>W.value=!0)},{icon:c((()=>[L])),_:1})])),default:c((()=>[d(" 聊天记录 ")])),_:1}),l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny",onClick:t[3]||(t[3]=()=>O.value=!0)},{icon:c((()=>[R])),_:1})])),default:c((()=>[d(" 聊天设置 ")])),_:1}),a($)&&a(B)?(s(),v(a(b),{key:0,onPositiveClick:Z},{trigger:c((()=>[l(a(w),{"show-arrow":!1,placement:"bottom"},{trigger:c((()=>[l(a(_),{quaternary:"",size:"tiny"},{icon:c((()=>[l(a(y),{size:"18",component:a(U)},null,8,["component"])])),_:1})])),default:c((()=>[d(" 结束聊天 ")])),_:1})])),default:c((()=>[d(" 是否确认结束群聊? ")])),_:1})):f("v-if",!0)])])):f("v-if",!0),l(S,{show:O.value,"onUpdate:show":t[4]||(t[4]=e=>O.value=e)},null,8,["show"]),l(q,{show:Q.value,"onUpdate:show":t[5]||(t[5]=e=>Q.value=e),type:T.value,visible:Q.value},null,8,["show","type","visible"]),l(x,{show:W.value,"onUpdate:show":t[6]||(t[6]=e=>W.value=e),visible:W.value},null,8,["show","visible"])],64))}});export{V as default};
@@ -5,7 +5,25 @@ import { simplifyMessage, isAudioOrVideoMessage, getAVTime } 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>;
8
- state: import("../types").IState;
8
+ state: {
9
+ orgId: string | number;
10
+ currentSessionItem: AnyObject;
11
+ id: string;
12
+ userInfo: AnyObject;
13
+ msgList: AnyObject[];
14
+ currentMsg: AnyObject;
15
+ isAppendMsg: boolean;
16
+ sessionList: AnyObject[];
17
+ isChangeSession: boolean;
18
+ updateSessionItem: AnyObject;
19
+ isUpdateSession: boolean;
20
+ currentReferenceMsg: AnyObject | null;
21
+ currentReEditMsg: AnyObject | null;
22
+ showVideo: boolean;
23
+ currentAVMsg: AnyObject;
24
+ currentGroupUser: AnyObject[];
25
+ showMultipleVideo: boolean;
26
+ };
9
27
  setMsgList: (list?: AnyObject[]) => void;
10
28
  relayMessage: (param: {
11
29
  checkedIds: string[];
@@ -77,7 +95,25 @@ declare const _default: import("vue").DefineComponent<{}, {
77
95
  onClose?: ((...args: any[]) => any) | undefined;
78
96
  }>>;
79
97
  emit: (event: "close", ...args: any[]) => void;
80
- state: import("../types").IState;
98
+ state: {
99
+ orgId: string | number;
100
+ currentSessionItem: AnyObject;
101
+ id: string;
102
+ userInfo: AnyObject;
103
+ msgList: AnyObject[];
104
+ currentMsg: AnyObject;
105
+ isAppendMsg: boolean;
106
+ sessionList: AnyObject[];
107
+ isChangeSession: boolean;
108
+ updateSessionItem: AnyObject;
109
+ isUpdateSession: boolean;
110
+ currentReferenceMsg: AnyObject | null;
111
+ currentReEditMsg: AnyObject | null;
112
+ showVideo: boolean;
113
+ currentAVMsg: AnyObject;
114
+ currentGroupUser: AnyObject[];
115
+ showMultipleVideo: boolean;
116
+ };
81
117
  openSession: (item: AnyObject) => Promise<void>;
82
118
  showUserDetail: import("vue").Ref<boolean>;
83
119
  showLargeAvatar: import("vue").Ref<boolean>;
@@ -135,7 +171,7 @@ declare const _default: import("vue").DefineComponent<{}, {
135
171
  }>> & {}>>;
136
172
  describeBodyRef: import("vue").Ref<any>;
137
173
  showMore: import("vue").Ref<boolean>;
138
- emit: (event: string, ...args: any[]) => void;
174
+ emit: (event: "template-click" | "unread-message-update" | "session-change" | "session-close", ...args: any[]) => void;
139
175
  isOverflow: import("vue").ComputedRef<boolean>;
140
176
  setting: import("vue").ComputedRef<any>;
141
177
  serverSetting: import("vue").ComputedRef<any>;
@@ -204,6 +240,10 @@ declare const _default: import("vue").DefineComponent<{}, {
204
240
  findEmoji(name: string): any;
205
241
  };
206
242
  ContextMenu: import("vue").DefineComponent<{
243
+ type: {
244
+ type: StringConstructor;
245
+ default: string;
246
+ };
207
247
  show: {
208
248
  type: BooleanConstructor;
209
249
  default: boolean;
@@ -211,10 +251,14 @@ declare const _default: import("vue").DefineComponent<{}, {
211
251
  position: {
212
252
  type: import("vue").PropType<CSSProperties>;
213
253
  };
214
- msgId: {
254
+ id: {
215
255
  type: StringConstructor;
216
256
  };
217
257
  }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
258
+ type: {
259
+ type: StringConstructor;
260
+ default: string;
261
+ };
218
262
  show: {
219
263
  type: BooleanConstructor;
220
264
  default: boolean;
@@ -222,13 +266,14 @@ declare const _default: import("vue").DefineComponent<{}, {
222
266
  position: {
223
267
  type: import("vue").PropType<CSSProperties>;
224
268
  };
225
- msgId: {
269
+ id: {
226
270
  type: StringConstructor;
227
271
  };
228
272
  }>> & {
229
273
  onSelect?: ((...args: any[]) => any) | undefined;
230
274
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
231
275
  }, {
276
+ type: string;
232
277
  show: boolean;
233
278
  }>;
234
279
  ChatAdd: import("vue").DefineComponent<{
@@ -251,6 +296,10 @@ declare const _default: import("vue").DefineComponent<{}, {
251
296
  type: import("vue").PropType<AnyObject[]>;
252
297
  default: () => never[];
253
298
  };
299
+ disabled: {
300
+ type: BooleanConstructor;
301
+ default: boolean;
302
+ };
254
303
  }, {
255
304
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
256
305
  title: {
@@ -272,11 +321,33 @@ declare const _default: import("vue").DefineComponent<{}, {
272
321
  type: import("vue").PropType<AnyObject[]>;
273
322
  default: () => never[];
274
323
  };
324
+ disabled: {
325
+ type: BooleanConstructor;
326
+ default: boolean;
327
+ };
275
328
  }>> & {
276
329
  onComfirm?: ((...args: any[]) => any) | undefined;
277
330
  }>>;
278
331
  emit: (event: "comfirm", ...args: any[]) => void;
279
- state: import("../types").IState;
332
+ state: {
333
+ orgId: string | number;
334
+ currentSessionItem: AnyObject;
335
+ id: string;
336
+ userInfo: AnyObject;
337
+ msgList: AnyObject[];
338
+ currentMsg: AnyObject;
339
+ isAppendMsg: boolean;
340
+ sessionList: AnyObject[];
341
+ isChangeSession: boolean;
342
+ updateSessionItem: AnyObject;
343
+ isUpdateSession: boolean;
344
+ currentReferenceMsg: AnyObject | null;
345
+ currentReEditMsg: AnyObject | null;
346
+ showVideo: boolean;
347
+ currentAVMsg: AnyObject;
348
+ currentGroupUser: AnyObject[];
349
+ showMultipleVideo: boolean;
350
+ };
280
351
  setCurrentSessionItem: (item: AnyObject) => void;
281
352
  listRef: import("vue").Ref<any>;
282
353
  keyword: import("vue").Ref<string>;
@@ -336,11 +407,16 @@ declare const _default: import("vue").DefineComponent<{}, {
336
407
  type: import("vue").PropType<AnyObject[]>;
337
408
  default: () => never[];
338
409
  };
410
+ disabled: {
411
+ type: BooleanConstructor;
412
+ default: boolean;
413
+ };
339
414
  }>> & {
340
415
  onComfirm?: ((...args: any[]) => any) | undefined;
341
416
  }, {
342
417
  title: string;
343
418
  defaultValue: AnyObject[];
419
+ disabled: boolean;
344
420
  mode: string;
345
421
  disabledIds: string[];
346
422
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as f,createBlock as g,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as k,NAvatar as _,NImage as x,NIcon as I,NSpace as C,NButtonGroup as w,NTooltip as S}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as L}from"../api/index.js";import{useState as b}from"../hooks/useState.js";import{useSession as A}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as H,simplifyMessage as D,getAVTime as R,downloadFile as N}from"../utils/index.js";import{first as O,last as P,toString as q}from"lodash-es";import B from"./PersonProfile.vue.js";import J from"./MessageTemplate.vue.js";import{emojis as W}from"../utils/emoji.js";import U from"./ContextMenu.js";import X from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as F,VideocamOutline as G,DocumentSharp as K,ChatbubbleEllipsesOutline as Y,EllipsisHorizontal as $,ArrowDownSharp as Q}from"@vicons/ionicons5";import{useScrollLoading as V}from"../../../../shared/hooks/useScrollLoading.js";const Z={key:0,class:"tip-text"},ee={key:1,class:"tip-text"},te={key:2,class:"message-box"},ne={key:0,class:"content-box"},se={class:"name-box"},oe=["data-time"],ie=["onContextmenu"],re={key:0,class:"reference-content"},ae=["innerHTML"],ce=["src"],le=["innerHTML"],ue=["innerHTML"],me={style:{"margin-left":"8px"}},pe={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:fe,setMsgList:ge,relayMessage:ve}=b(),{setCurrentSessionItem:ye,isGroupChat:he}=A(fe),Te=t(),Me=t(!1),ke=t({left:0,top:0}),_e=t(),xe=t(),Ie={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":he.value?"1px":"-20px","--c-tip-gap":he.value?"10px":"0px"})));function we({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(I,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Q,onClick:()=>o&&N(o,"img")},null),default:()=>"下载"}),e.close]}async function Se(){try{if(!Ie.hasMore)return;Ie.page++;const e=await E({sessionKey:fe.currentSessionItem.sessionKey,page:Ie.page,lastSendTime:Ie.lastSendTime});if(!Array.isArray(e)||0===e.length)return Ie.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=O(e).id;Ie.lastSendTime=P(e).sendTime,ge(Ie.page>1?[...fe.msgList,...e]:e),1===Ie.page&&fe.currentSessionItem.unreadNum&&(await L({chatType:fe.currentSessionItem.chatType,messageIdSet:[t],receiver:fe.userInfo.id,sender:fe.currentSessionItem.receiver}),ye({unreadNum:0}))}catch(e){console.log(e)}}async function je(e,t){_e.value=t,async function(e){var t,n,s,o,i,r;Me.value=!0,await T();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=Te.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,f=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,g=5,v={};a<=m+l/2?v.left=a-m+g+"px":v.right=m+l-a-g+"px";c-p<d/2?v.top=f+g+"px":p+u-c<=d/2?v.bottom=Math.abs(f)+g+"px":v.top=f+c-p-d/2+"px";ke.value=v}(e)}function Ee(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function Le(e){const{chatMessageType:t}=e.content;return e.sender===fe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[z.TEXT,z.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=q(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ae(e){const{chatMessageType:t,msg:n=""}=e.content,s=q(n).match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function ze(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function He(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=fe.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Re(e){fe.currentReferenceMsg=e,fe.currentReferenceMsg.content.referenceContent=null,Object.assign(fe.currentReferenceMsg,{chatType:fe.currentSessionItem.chatType,receiver:fe.currentSessionItem.receiver,receiverAvatar:fe.currentSessionItem.avatar,receiverName:fe.currentSessionItem.name})}function Ne(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=xe.value)||n.click()):Re(t)}function Oe(e,t){const n=fe.msgList.find((e=>e.id===_e.value));ve({checkedIds:e,remark:t,content:n.content})}return V(de,(()=>{Se()}),"top",(()=>{Me.value=!1})),s((()=>fe.id),(e=>{e&&(fe.currentReferenceMsg=null,Object.assign(Ie,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Se())}),{immediate:!0}),s((()=>fe.isAppendMsg),(e=>{e&&(ge([fe.currentMsg,...fe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),fe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(fe).id}]),ref_key:"chatMainRef",ref:de,style:c(a(Ce))},[l(a(M),{"show-toolbar-tooltip":"","render-toolbar":we},{default:u((()=>[(o(!0),i(m,null,p(a(fe).msgList,((e,t)=>(o(),i(m,{key:e.id},[Ee(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(fe).userInfo.id}])},[De(e,t)?(o(),i("p",Z,d(e.__sendTime),1)):f("v-if",!0),ze(e,"system")||"WITHDRAWN"===e.status?(o(),i(m,{key:1},[ze(e,"system")?(o(),g(J,{key:0,data:e},null,8,["data"])):f("v-if",!0),"WITHDRAWN"===e.status?(o(),i("p",ee,[v("span",null,d(e.sender==a(fe).userInfo.id?"你":e.senderName)+"撤回了一条消息",1),Le(e)?(o(),g(a(k),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){fe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):f("v-if",!0)])):f("v-if",!0)],64)):(o(),i("div",te,[l(B,{"user-id":e.sender,placement:e.sender==a(fe).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(_),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",ne,[v("div",se,[v("span",{class:"name","data-time":e.__time},d(a(he)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":He(e.content),"audio-video":a(H)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:h((t=>je(t,e.id)),["prevent"])},[be(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",re,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,ae)])):f("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(W).findEmoji(e.__content)},null,10,ce)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):f("v-if",!0),Ae(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,ue)):f("v-if",!0),ze(e,"template")?(o(),g(J,{key:2,data:e},null,8,["data"])):f("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),g(a(x),{key:3,width:"240",src:e.__content},null,8,["src"])):f("v-if",!0),a(H)(e.content)?(o(),i(m,{key:4},[l(a(I),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(F):a(G)},null,8,["class","component"]),v("span",me,d(a(R)(e.__content)),1)],64)):f("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),g(a(C),{key:5,"wrap-item":!1},{default:u((()=>[l(a(I),{class:"icon-file",size:"40",component:a(K)},null,8,["component"]),l(a(C),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",pe,d(e.__size),1)])),_:2},1024)])),_:2},1024)):f("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(H)(e.content)?f("v-if",!0):(o(),i(m,{key:0},[f(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(k),{quaternary:"",size:"tiny",onClick:()=>Re(e)},{icon:u((()=>[l(a(I),{size:"17",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(k),{quaternary:"",size:"tiny",onClick:t=>je(t,e.id)},{icon:u((()=>[l(a(I),{size:"14",component:a($)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,ie)])):f("v-if",!0)]))],2)):f("v-if",!0)],64)))),128))])),_:1}),l(a(U),{ref_key:"contextmenuRef",ref:Te,show:Me.value,"onUpdate:show":t[0]||(t[0]=e=>Me.value=e),position:ke.value,"msg-id":_e.value,onSelect:Ne},null,8,["show","position","msg-id"]),l(X,{title:"转发消息",mode:"relay",onComfirm:Oe},{trigger:u((()=>[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:xe},"转发",512)])),_:1})],6))}});export{de as default};
1
+ import{defineComponent as e,ref as t,computed as n,watch as o,openBlock as s,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as l,createVNode as c,withCtx as u,Fragment as m,renderList as d,toDisplayString as p,createCommentVNode as g,createBlock as f,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as w,NAvatar as k,NImage as _,NIcon as C,NSpace as x,NButtonGroup as I,NTooltip as L}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{isAudioOrVideoMessage as z,simplifyMessage as D,getAVTime as H,downloadFile as R}from"../utils/index.js";import{first as N,last as O,toString as B}from"lodash-es";import"trtc-sdk-v5";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as J}from"../utils/emoji.js";import W from"./ContextMenu.js";import U from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as X,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as Y,ArrowDownSharp as $}from"@vicons/ionicons5";import{useScrollLoading as Q}from"../../../../shared/hooks/useScrollLoading.js";const V={key:0,class:"tip-text"},Z={key:1,class:"tip-text"},ee={key:2,class:"message-box"},te={key:0,class:"content-box"},ne={class:"name-box"},oe=["data-time"],se=["onContextmenu"],ie={key:0,class:"reference-content"},re=["innerHTML"],ae=["src"],le=["innerHTML"],ce=["innerHTML"],ue={style:{"margin-left":"8px"}},me={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:pe,setMsgList:ge,relayMessage:fe,setCurrentSessionItem:ve,isGroupChat:ye}=b(),he=t(),Te=t(!1),Me=t({left:0,top:0}),we=t(),ke=t(),_e={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":ye.value?"1px":"-20px","--c-tip-gap":ye.value?"10px":"0px"})));function xe({nodes:e}){var t,n;const{_ctx:o}=null==(t=e.download)?void 0:t.children,s=o?null==(n=null==o?void 0:o.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,c(L,null,{trigger:()=>c(C,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:$,onClick:()=>s&&R(s,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.46"))||"下载"}}),e.close]}async function Ie(){try{if(!_e.hasMore)return;_e.page++;const e=await E({sessionKey:pe.currentSessionItem.sessionKey,page:_e.page,lastSendTime:_e.lastSendTime});if(!Array.isArray(e)||0===e.length)return _e.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=N(e).id;_e.lastSendTime=O(e).sendTime,ge(_e.page>1?[...pe.msgList,...e]:e),1===_e.page&&pe.currentSessionItem.unreadNum&&(await S({chatType:pe.currentSessionItem.chatType,messageIdSet:[t],receiver:pe.userInfo.id,sender:pe.currentSessionItem.receiver}),ve({unreadNum:0}))}catch(e){console.log(e)}}async function Le(e,t){we.value=t,async function(e){var t,n,o,s,i,r;Te.value=!0,await T();const{clientX:a,clientY:l}=e,{width:c=0,height:u=0,left:m=0,top:d=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},p=null!=(s=null==(o=null==(n=he.value)?void 0:n.$el)?void 0:o.getBoundingClientRect().height)?s:220,g=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+c/2?v.left=a-m+f+"px":v.right=m+c-a-f+"px";l-d<p/2?v.top=g+f+"px":d+u-l<=p/2?v.bottom=Math.abs(g)+f+"px":v.top=g+l-d-p/2+"px";Me.value=v}(e)}function je(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==A.TEMPLATE||!!n}function Ee(e){const{chatMessageType:t}=e.content;return e.sender===pe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[A.TEXT,A.EMOJI].includes(t)}function Se(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===A.BLEND){const e=B(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[A.TEXT,A.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content,o=B(n).match(/<img[^>]*>/gi);return t===A.BLEND&&o&&o.length}function Ae(e,t){var n,o;const{chatMessageType:s,messageTemplate:i}=e.content;if(s===A.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(o=null==i?void 0:i.setting)?void 0:o.style.id)}function ze(e){var t,n;const{chatMessageType:o,messageTemplate:s}=e;return o===A.TEMPLATE&&3==(null==(n=null==(t=null==s?void 0:s.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const o=new Date(e.sendTime).getTime(),s=null==(n=pe.msgList[t+1])?void 0:n.sendTime;if(s){return o-new Date(s).getTime()>3e5}return!0}function He(e){pe.currentReferenceMsg=e,pe.currentReferenceMsg.content.referenceContent=null,Object.assign(pe.currentReferenceMsg,{chatType:pe.currentSessionItem.chatType,receiver:pe.currentSessionItem.receiver,receiverAvatar:pe.currentSessionItem.avatar,receiverName:pe.currentSessionItem.name})}function Re(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=ke.value)||n.click()):He(t)}function Ne(e,t){const n=pe.msgList.find((e=>e.id===we.value));fe({checkedIds:e,remark:t,content:n.content})}return Q(de,(()=>{Ie()}),"top",(()=>{Te.value=!1})),o((()=>pe.id),(e=>{e&&(pe.currentReferenceMsg=null,Object.assign(_e,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Ie())}),{immediate:!0}),o((()=>pe.isAppendMsg),(e=>{e&&(ge([pe.currentMsg,...pe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),pe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>{var n;return s(),i("div",{class:r(["chat-main",{"home-bg":!a(pe).id}]),ref_key:"chatMainRef",ref:de,style:l(a(Ce))},[c(a(M),{"show-toolbar-tooltip":"","render-toolbar":xe},{default:u((()=>[(s(!0),i(m,null,d(a(pe).msgList,((e,t)=>{var n,o;return s(),i(m,{key:e.id},[je(e)?(s(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(pe).userInfo.id}])},[De(e,t)?(s(),i("p",V,p(e.__sendTime),1)):g("v-if",!0),Ae(e,"system")||"WITHDRAWN"===e.status?(s(),i(m,{key:1},[Ae(e,"system")?(s(),f(q,{key:0,data:e},null,8,["data"])):g("v-if",!0),"WITHDRAWN"===e.status?(s(),i("p",Z,[v("span",null,p(e.sender==a(pe).userInfo.id?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.67"))||"你":e.senderName)+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ee(e)?(s(),f(a(w),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){pe.currentReEditMsg=e}(e)},{default:u((()=>[y(" 重新编辑 ")])),_:2},1032,["onClick"])):g("v-if",!0)])):g("v-if",!0)],64)):(s(),i("div",ee,[c(P,{"user-id":e.sender,placement:e.sender==a(pe).userInfo.id?"left":"right"},{trigger:u((()=>[c(a(k),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(s(),i("div",te,[v("div",ne,[v("span",{class:"name","data-time":e.__time},p(a(ye)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(A).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(A).TEMPLATE,"template--3":ze(e.content),"audio-video":a(z)(e.content),file:e.content.chatMessageType===a(A).FILE}]),onContextmenu:h((t=>Le(t,e.id)),["prevent"])},[Se(e)?(s(),i(m,{key:0},[e.content.referenceContent?(s(),i("div",ie,[v("span",null,p(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,re)])):g("v-if",!0),e.content.chatMessageType===a(A).EMOJI?(s(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(J).findEmoji(e.__content)},null,10,ae)):(s(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):g("v-if",!0),be(e)?(s(),i("pre",{key:1,innerHTML:e.__content},null,8,ce)):g("v-if",!0),Ae(e,"template")?(s(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(A).IMAGE?(s(),f(a(_),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(z)(e.content)?(s(),i(m,{key:4},[c(a(C),{class:r({"is-audio":e.content.chatMessageType===a(A).AUDIO}),component:e.content.chatMessageType===a(A).AUDIO?a(X):a(F)},null,8,["class","component"]),v("span",ue,p(a(H)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(A).FILE?(s(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[c(a(C),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),c(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,p(e.__content),1),v("span",me,p(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),c(a(I),{class:"quick-menu"},{default:u((()=>[a(z)(e.content)?g("v-if",!0):(s(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),c(a(w),{quaternary:"",size:"tiny",onClick:()=>He(e)},{icon:u((()=>[c(a(C),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),c(a(w),{quaternary:"",size:"tiny",onClick:t=>Le(t,e.id)},{icon:u((()=>[c(a(C),{size:"14",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,se)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)})),128))])),_:1}),c(a(W),{ref_key:"contextmenuRef",ref:he,show:Te.value,"onUpdate:show":t[0]||(t[0]=e=>Te.value=e),position:Me.value,id:we.value,onSelect:Re},null,8,["show","position","id"]),c(U,{title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:Ne},{trigger:u((()=>{var e;return[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:ke},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发",512)]})),_:1})],6)}}});export{de as default};