tuikit-atomicx-vue3 4.4.0-beta.1 → 4.4.0

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 (113) hide show
  1. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D1G-LitO.js → MessageInput.vue_vue_type_script_setup_true_lang-D9jiYNFu.js} +31 -31
  2. package/dist/chat/index.d.ts +35 -35
  3. package/dist/chat/server.js +15 -15
  4. package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
  5. package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
  6. package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
  7. package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
  8. package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
  9. package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
  10. package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
  11. package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
  12. package/dist/components/ContactList/ContactList.js +7 -7
  13. package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
  14. package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
  15. package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
  16. package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
  17. package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
  18. package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
  19. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
  20. package/dist/components/ConversationList/ConversationList.js +4 -4
  21. package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
  22. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
  23. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
  24. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
  25. package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
  26. package/dist/components/ConversationList/index.d.ts +30 -30
  27. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
  28. package/dist/components/MessageInput/MessageInput.js +1 -1
  29. package/dist/components/MessageInput/MessageInput.vue.d.ts +2 -2
  30. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +2 -1
  31. package/dist/components/MessageInput/TextEditor/EditorCore.js +23 -21
  32. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +2 -2
  33. package/dist/components/MessageInput/TextEditor/index.js +32 -31
  34. package/dist/components/MessageInput/index.d.ts +6 -6
  35. package/dist/components/MessageInput/index.js +1 -1
  36. package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
  37. package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
  38. package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
  39. package/dist/components/MessageList/MessageList.js +8 -6
  40. package/dist/components/MessageList/index.d.ts +2 -2
  41. package/dist/hooks/useAudioControl.d.ts +3 -3
  42. package/dist/hooks/useAudioControl.js +32 -30
  43. package/dist/rtc/server.js +45 -40
  44. package/dist/states/LoginState.d.ts +23 -0
  45. package/dist/states/LoginState.js +34 -39
  46. package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
  47. package/dist/states/MessageInputState/MessageInputState.js +60 -59
  48. package/dist/states/MessageInputState/utils.d.ts +8 -1
  49. package/dist/states/MessageInputState/utils.js +30 -10
  50. package/dist/styles/index.css +1 -1
  51. package/dist/utils/call.js +1 -1
  52. package/package.json +2 -2
  53. package/src/chat/server.ts +0 -1
  54. package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
  55. package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
  56. package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
  57. package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
  58. package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
  59. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
  60. package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
  61. package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
  62. package/src/components/ContactList/ContactList.vue +1 -1
  63. package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
  64. package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
  65. package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
  66. package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
  67. package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
  68. package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
  69. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +1 -1
  70. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
  71. package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
  72. package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
  73. package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
  74. package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
  75. package/src/components/ConversationList/ConversationList.vue +2 -2
  76. package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
  77. package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
  78. package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
  79. package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
  80. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
  81. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +1 -1
  82. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
  83. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
  84. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
  85. package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
  86. package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
  87. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  88. package/src/components/MessageInput/MessageInput.vue +1 -1
  89. package/src/components/MessageInput/TextEditor/EditorCore.ts +4 -2
  90. package/src/components/MessageInput/TextEditor/TextEditor.vue +3 -4
  91. package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
  92. package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +1 -1
  93. package/src/components/MessageList/Message/Message.vue +1 -1
  94. package/src/components/MessageList/MessageList.vue +2 -0
  95. package/src/components/Search/Search.vue +1 -1
  96. package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
  97. package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
  98. package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
  99. package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
  100. package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
  101. package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
  102. package/src/components/Search/SearchBar/SearchBar.vue +1 -1
  103. package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
  104. package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
  105. package/src/components/Search/SearchResults/SearchResults.vue +1 -1
  106. package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
  107. package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
  108. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
  109. package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
  110. package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
  111. package/src/hooks/useAudioControl.ts +17 -4
  112. package/src/rtc/server.ts +4 -0
  113. package/src/utils/call.ts +2 -2
@@ -82,7 +82,7 @@ function H(a) {
82
82
  let s = c || a.nameCard || a.nick || n;
83
83
  switch (s = S(s), t.actionType) {
84
84
  case 1:
85
- return (((d = e == null ? void 0 : e.data) == null ? void 0 : d.cmd) === "audioCall" || ((g = e == null ? void 0 : e.data) == null ? void 0 : g.cmd) === "videoCall") && t.groupID ? i.t("CallMessage.start_call", { messageSender: s }) : ((_ = e == null ? void 0 : e.data) == null ? void 0 : _.cmd) === "hangup" ? t.groupID ? i.t("CallMessage.call_ended") : `${i.t("CallMessage.call_duration")}: ${N(e == null ? void 0 : e.call_end)}` : ((m = e == null ? void 0 : e.data) == null ? void 0 : m.cmd) === "switchToAudio" ? i.t("CallMessage.switch_to_audio_call") : ((p = e == null ? void 0 : e.data) == null ? void 0 : p.cmd) === "switchToVideo" ? i.t("CallMessage.switch_to_video_call") : i.t("CallMessage.start_call");
85
+ return (((d = e == null ? void 0 : e.data) == null ? void 0 : d.cmd) === "audioCall" || ((g = e == null ? void 0 : e.data) == null ? void 0 : g.cmd) === "videoCall") && t.groupID ? i.t("CallMessage.start_call", { messageSender: s }) : ((_ = e == null ? void 0 : e.data) == null ? void 0 : _.cmd) === "hangup" ? t.groupID ? i.t("CallMessage.call_ended") : `${i.t("CallMessage.call_duration")}: ${N(e == null ? void 0 : e.call_end)}` : ((m = e == null ? void 0 : e.data) == null ? void 0 : m.cmd) === "switchToAudio" ? i.t("CallMessage.switch_to_audio_call") : ((p = e == null ? void 0 : e.data) == null ? void 0 : p.cmd) === "switchToVideo" ? i.t("CallMessage.switch_to_video_call") : i.t("CallMessage.start_call", { messageSender: "" });
86
86
  case 2:
87
87
  return t.groupID ? `${s} ${i.t("CallMessage.cancel_call")}` : t.inviter === l ? i.t("CallMessage.canceled") : i.t("CallMessage.canceled_by_recipient");
88
88
  case 3:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuikit-atomicx-vue3",
3
- "version": "4.4.0-beta.1",
3
+ "version": "4.4.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "@tencentcloud/chat": "^3.5.8",
53
53
  "@tencentcloud/chat-uikit-engine": "~2.5.6",
54
54
  "@tencentcloud/tui-core": "latest",
55
- "@tencentcloud/tuiroom-engine-js": "~3.5.0-beta.1",
55
+ "@tencentcloud/tuiroom-engine-js": "~3.4.3",
56
56
  "@tencentcloud/uikit-base-component-vue3": "1.1.1",
57
57
  "vue": "^3.4.21"
58
58
  },
@@ -111,7 +111,6 @@ export default class ChatLoginServer {
111
111
  }
112
112
 
113
113
  public logout() {
114
- TUIChatEngine.logout();
115
114
  this.isLogin.value = false;
116
115
  this.isEngineLoggingIn = false;
117
116
  }
@@ -67,5 +67,5 @@ const handleRemoveFromBlacklist = async () => {
67
67
  </script>
68
68
 
69
69
  <style scoped lang="scss">
70
- @import './BlacklistInfo.scss';
70
+ @use './BlacklistInfo.scss';
71
71
  </style>
@@ -260,5 +260,5 @@ const handleJoinGroup = (data: GroupModel, note: string) => emit('joinGroup', da
260
260
  </script>
261
261
 
262
262
  <style scoped lang="scss">
263
- @import './ContactInfo.scss';
263
+ @use './ContactInfo.scss';
264
264
  </style>
@@ -84,5 +84,5 @@ const handleRefuse = () => {
84
84
  </script>
85
85
 
86
86
  <style scoped lang="scss">
87
- @import './FriendApplicationInfo.scss';
87
+ @use './FriendApplicationInfo.scss';
88
88
  </style>
@@ -215,5 +215,5 @@ const handleSendMessage = () => {
215
215
  </script>
216
216
 
217
217
  <style scoped lang="scss">
218
- @import './FriendInfo.scss';
218
+ @use './FriendInfo.scss';
219
219
  </style>
@@ -95,5 +95,5 @@ const handleRefuse = () => {
95
95
  </script>
96
96
 
97
97
  <style scoped lang="scss">
98
- @import './GroupApplicationInfo.scss';
98
+ @use './GroupApplicationInfo.scss';
99
99
  </style>
@@ -143,5 +143,5 @@ const handleGroupAction = () => {
143
143
  }
144
144
  </script>
145
145
  <style scoped lang="scss">
146
- @import './GroupInfo.scss';
146
+ @use './GroupInfo.scss';
147
147
  </style>
@@ -143,5 +143,5 @@ const handleJoinGroup = async () => {
143
143
  </script>
144
144
 
145
145
  <style scoped lang="scss">
146
- @import './SearchGroupInfo.scss';
146
+ @use './SearchGroupInfo.scss';
147
147
  </style>
@@ -124,5 +124,5 @@ const handleAddFriend = async () => {
124
124
  </script>
125
125
 
126
126
  <style scoped lang="scss">
127
- @import './SearchUserInfo.scss';
127
+ @use './SearchUserInfo.scss';
128
128
  </style>
@@ -310,5 +310,5 @@ const emptyText = computed(() => props.emptyText || t('TUIContact.No contacts'))
310
310
  </script>
311
311
 
312
312
  <style scoped lang="scss">
313
- @import './ContactList.scss';
313
+ @use './ContactList.scss';
314
314
  </style>
@@ -43,5 +43,5 @@ const handleClick = () => {
43
43
  </script>
44
44
 
45
45
  <style scoped lang="scss">
46
- @import './BlacklistItem.scss';
46
+ @use './BlacklistItem.scss';
47
47
  </style>
@@ -66,5 +66,5 @@ const handleAccept = () => {
66
66
  </script>
67
67
 
68
68
  <style scoped lang="scss">
69
- @import './FriendApplicationItem.scss';
69
+ @use './FriendApplicationItem.scss';
70
70
  </style>
@@ -43,5 +43,5 @@ const handleClick = () => {
43
43
  </script>
44
44
 
45
45
  <style scoped lang="scss">
46
- @import './FriendItem.scss';
46
+ @use './FriendItem.scss';
47
47
  </style>
@@ -74,5 +74,5 @@ const handleAction = (action: 'accept' | 'refuse', event: Event) => {
74
74
  </script>
75
75
 
76
76
  <style scoped lang="scss">
77
- @import './GroupApplicationItem.scss';
77
+ @use './GroupApplicationItem.scss';
78
78
  </style>
@@ -43,5 +43,5 @@ const handleClick = () => {
43
43
  </script>
44
44
 
45
45
  <style scoped lang="scss">
46
- @import './GroupItem.scss';
46
+ @use './GroupItem.scss';
47
47
  </style>
@@ -94,5 +94,5 @@ const CustomSearchBar = (searchBarProps: SearchBarProps) => h('div', { class: 'c
94
94
  </script>
95
95
 
96
96
  <style scoped lang="scss">
97
- @import './ContactSearch.scss';
97
+ @use './ContactSearch.scss';
98
98
  </style>
@@ -178,5 +178,5 @@ const handleMaskClick = (e: Event) => {
178
178
  </script>
179
179
 
180
180
  <style lang="scss" module>
181
- @import './ConversationActions.scss';
181
+ @use './ConversationActions.scss';
182
182
  </style>
@@ -195,7 +195,7 @@ const handleCreateGroupConversation = async () => {
195
195
 
196
196
  const generateGroupName = (userList: Friend[]) => {
197
197
  const selfName = loginUserInfo.value?.userName || loginUserInfo.value?.userId || '';
198
- const name = `${selfName}、` + userList.map(item => item?.remark || item?.nick || item?.userID).join('、');
198
+ const name = `${selfName}、${userList.map(item => item?.remark || item?.nick || item?.userID).join('、')}`;
199
199
  return name.length >= GROUP_NAME_LIMIT ? name.slice(0, GROUP_NAME_LIMIT) : name;
200
200
  };
201
201
 
@@ -231,5 +231,5 @@ const handleCancel = () => {
231
231
  </script>
232
232
 
233
233
  <style lang="scss" scoped>
234
- @import './ConversationCreate.scss';
234
+ @use './ConversationCreate.scss';
235
235
  </style>
@@ -83,5 +83,5 @@ const handleClick = (action: CreateConvTypes) => {
83
83
  </script>
84
84
 
85
85
  <style lang="scss" module>
86
- @import './ConversationCreateButton.scss';
86
+ @use './ConversationCreateButton.scss';
87
87
  </style>
@@ -120,5 +120,5 @@ const groupInfoChange = (value: string, type: string) => {
120
120
  </script>
121
121
 
122
122
  <style lang="scss" module>
123
- @import './ConversationCreateGroupDetail.scss';
123
+ @use './ConversationCreateGroupDetail.scss';
124
124
  </style>
@@ -61,5 +61,5 @@ const handleSelectListUpdate = (list: UserPickerResult) => {
61
61
  </script>
62
62
 
63
63
  <style lang="scss" module>
64
- @import './ConversationCreateUserSelectList.scss';
64
+ @use './ConversationCreateUserSelectList.scss';
65
65
  </style>
@@ -57,5 +57,5 @@ const selectGroupType = (type: GroupType) => {
57
57
  </script>
58
58
 
59
59
  <style lang="scss" module>
60
- @import './ConversationGroupTypeInfo.scss';
60
+ @use './ConversationGroupTypeInfo.scss';
61
61
  </style>
@@ -44,7 +44,7 @@
44
44
  :Preview="Preview"
45
45
  :ConversationActions="ConversationActions"
46
46
  :actions-config="actionsConfig"
47
- @select="handleSelectConversation"
47
+ @select-conversation="handleSelectConversation"
48
48
  />
49
49
  </component>
50
50
  </div>
@@ -185,5 +185,5 @@ const handleCreated = (conversation: ConversationModel) => {
185
185
  </script>
186
186
 
187
187
  <style lang="scss" module>
188
- @import './ConversationList.scss';
188
+ @use './ConversationList.scss';
189
189
  </style>
@@ -46,5 +46,5 @@ const props = withDefaults(defineProps<ConversationListContentProps>(), {
46
46
  </script>
47
47
 
48
48
  <style lang="scss" module>
49
- @import './ConversationListContent.scss';
49
+ @use './ConversationListContent.scss';
50
50
  </style>
@@ -47,5 +47,5 @@ const props = withDefaults(defineProps<ConversationListHeaderProps>(), {
47
47
  </script>
48
48
 
49
49
  <style lang="scss" module>
50
- @import './ConversationListHeader.scss';
50
+ @use './ConversationListHeader.scss';
51
51
  </style>
@@ -74,5 +74,5 @@ const placeholderText = computed(() => {
74
74
  </script>
75
75
 
76
76
  <style lang="scss" module>
77
- @import './ConversationPlaceHolder.scss';
77
+ @use './ConversationPlaceHolder.scss';
78
78
  </style>
@@ -14,7 +14,7 @@
14
14
  :actionsConfig="actionsConfig"
15
15
  :className="className"
16
16
  :style="style"
17
- @select="handleSelectConversation"
17
+ @select-conversation="handleSelectConversation"
18
18
  >
19
19
  <slot />
20
20
  </component>
@@ -33,5 +33,5 @@ const latestMessagePreview = computed(() => getLatestMessagePreview(props.conver
33
33
  </script>
34
34
 
35
35
  <style lang="scss" module>
36
- @import './ConversationPreview.scss';
36
+ @use './ConversationPreview.scss';
37
37
  </style>
@@ -23,5 +23,5 @@ const time = getTimeStamp({
23
23
  </script>
24
24
 
25
25
  <style lang="scss" module>
26
- @import './ConversationPreview.scss';
26
+ @use './ConversationPreview.scss';
27
27
  </style>
@@ -15,5 +15,5 @@ const title =props?.conversation?.getShowName?.() || '';
15
15
  </script>
16
16
 
17
17
  <style lang="scss" module>
18
- @import './ConversationPreview.scss';
18
+ @use './ConversationPreview.scss';
19
19
  </style>
@@ -96,7 +96,7 @@ const props = withDefaults(defineProps<ConversationPreviewUIProps>(), {
96
96
  });
97
97
 
98
98
  const emit = defineEmits<{
99
- select: [conversation: ConversationModel];
99
+ selectConversation: [conversation: ConversationModel];
100
100
  }>();
101
101
 
102
102
  const { activeConversation, setActiveConversation } = useConversationListState();
@@ -120,7 +120,7 @@ watch(isHovered, (newValue) => {
120
120
  });
121
121
 
122
122
  const handleClick = () => {
123
- emit('select', props.conversation);
123
+ emit('selectConversation', props.conversation);
124
124
  setActiveConversation(props.conversation.conversationID);
125
125
  };
126
126
 
@@ -130,5 +130,5 @@ const handleCloseActionsModal = () => {
130
130
  </script>
131
131
 
132
132
  <style lang="scss" module>
133
- @import './ConversationPreview.scss';
133
+ @use './ConversationPreview.scss';
134
134
  </style>
@@ -30,5 +30,5 @@ const isUnreadMarked = computed(() => props.conversation?.markList?.includes(TUI
30
30
  </script>
31
31
 
32
32
  <style lang="scss" module>
33
- @import './ConversationPreview.scss';
33
+ @use './ConversationPreview.scss';
34
34
  </style>
@@ -188,5 +188,5 @@ watch(keyword, handleSearchChange, { immediate: true });
188
188
  </script>
189
189
 
190
190
  <style lang="scss" module>
191
- @import './ConversationSearch.scss';
191
+ @use './ConversationSearch.scss';
192
192
  </style>
@@ -1,6 +1,9 @@
1
1
  <template>
2
- <div>
3
- <PopoverRoot :open="isOpen" @update:open="handleOpenChange">
2
+ <View>
3
+ <PopoverRoot
4
+ :open="isOpen"
5
+ @update:open="handleOpenChange"
6
+ >
4
7
  <PopoverTrigger
5
8
  as="div"
6
9
  :disabled="props.disabled"
@@ -45,7 +48,7 @@
45
48
  </PopoverContent>
46
49
  </PopoverPortal>
47
50
  </PopoverRoot>
48
- </div>
51
+ </View>
49
52
  </template>
50
53
 
51
54
  <script setup lang="ts">
@@ -53,6 +56,7 @@ import { onMounted, defineProps, useCssModule, ref } from 'vue';
53
56
  import { useUIKit, IconEmoji } from '@tencentcloud/uikit-base-component-vue3';
54
57
  import cs from 'classnames';
55
58
  import { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from 'reka-ui';
59
+ import { View } from '../../../baseComp/View';
56
60
  import { emojiUrlMap, emojiBaseUrl } from '../../../constants/emoji';
57
61
  import { useMessageInputState, MessageContentType } from '../../../states/MessageInputState';
58
62
  import { transformTextWithEmojiKeyToName } from '../../../utils/emoji';
@@ -14,6 +14,7 @@
14
14
  align-items: center;
15
15
  color: var(--text-color-secondary);
16
16
  gap: 2px;
17
+ margin-left: -6px;
17
18
  }
18
19
 
19
20
  &__wrapper {
@@ -76,7 +76,7 @@ const props = withDefaults(defineProps<MessageInputProps>(), {
76
76
  autoFocus: true,
77
77
  disabled: false,
78
78
  hideSendButton: false,
79
- placeholder: '',
79
+ placeholder: undefined,
80
80
  attachmentPickerMode: 'collapsed',
81
81
  actions: () => ['EmojiPicker', 'ImagePicker', 'FilePicker', 'VideoPicker'],
82
82
  });
@@ -4,8 +4,7 @@ import StarterKit from '@tiptap/starter-kit';
4
4
  import { Extension, Editor } from '@tiptap/vue-3';
5
5
  import { MessageContentType } from '../../../states/MessageInputState';
6
6
  import type { InputContent } from '../../../states/MessageInputState';
7
- import type { JSONContent } from '@tiptap/vue-3';
8
- import type { EditorOptions as TiptapEditorOptions } from '@tiptap/vue-3';
7
+ import type { JSONContent, EditorOptions as TiptapEditorOptions } from '@tiptap/vue-3';
9
8
  import './Editor.scss';
10
9
 
11
10
  function createEmojiExtension() {
@@ -111,6 +110,7 @@ interface EditorOptions {
111
110
  placeholder?: string;
112
111
  autoFocus?: boolean;
113
112
  disabled?: boolean;
113
+ isPlaceholderOnlyShowWhenEditable?: boolean;
114
114
  onUpdate?: (content: InputContent[]) => void;
115
115
  onEnter?: () => void;
116
116
  onFocus?: () => void;
@@ -122,6 +122,7 @@ function createEditor({
122
122
  placeholder = '',
123
123
  autoFocus = false,
124
124
  disabled = false,
125
+ isPlaceholderOnlyShowWhenEditable = true,
125
126
  onUpdate,
126
127
  onEnter,
127
128
  onFocus,
@@ -134,6 +135,7 @@ function createEditor({
134
135
  createImageExtension(),
135
136
  Placeholder.configure({
136
137
  placeholder,
138
+ showOnlyWhenEditable: isPlaceholderOnlyShowWhenEditable,
137
139
  }),
138
140
  ];
139
141
 
@@ -32,7 +32,7 @@ interface TextEditorProps {
32
32
  const props = withDefaults(defineProps<TextEditorProps>(), {
33
33
  autoFocus: true,
34
34
  disabled: false,
35
- placeholder: '',
35
+ placeholder: undefined,
36
36
  });
37
37
 
38
38
  const { t } = useUIKit();
@@ -42,8 +42,6 @@ const { updateRawValue, sendMessage, setEditorInstance, setContent } = useMessag
42
42
  const editorDomRef = ref<HTMLDivElement | null>(null);
43
43
  const isFocused = ref(props.autoFocus);
44
44
 
45
- const placeholderText = computed(() => (props.disabled ? '' : props.placeholder || t('MessageInput.enter_a_message')));
46
-
47
45
  let editorInstance: Editor | null = null;
48
46
 
49
47
  onMounted(() => {
@@ -57,7 +55,8 @@ onMounted(() => {
57
55
  if (!element.dataset.editorCreated) {
58
56
  editorInstance = createEditor({
59
57
  element,
60
- placeholder: placeholderText.value,
58
+ placeholder: props.placeholder ?? t('MessageInput.enter_a_message'),
59
+ isPlaceholderOnlyShowWhenEditable: props.placeholder === undefined,
61
60
  autoFocus: props.autoFocus,
62
61
  disabled: props.disabled,
63
62
  onUpdate: (content) => {
@@ -1,25 +1,21 @@
1
1
  <template>
2
2
  <div
3
3
  class="wave-form"
4
- @click="handleClick"
5
4
  :style="waveFormStyle"
5
+ @click="handleClick"
6
6
  >
7
7
  <div
8
8
  v-for="(height, index) in waveBarHeights"
9
9
  :key="index"
10
10
  class="wave-form__bar"
11
- :class="{ 'wave-form__bar--active': isBarActive(index) }"
11
+ :class="{ 'wave-form__bar--active': activeStates[index] }"
12
12
  :style="{ height: `${height}px` }"
13
13
  />
14
- <div
15
- class="wave-form__cursor"
16
- :style="cursorStyle"
17
- />
18
14
  </div>
19
15
  </template>
20
16
 
21
17
  <script lang="ts" setup>
22
- import { ref, computed, onMounted } from 'vue';
18
+ import { computed } from 'vue';
23
19
 
24
20
  interface WaveFormProps {
25
21
  progress: number | undefined;
@@ -29,7 +25,7 @@ interface WaveFormProps {
29
25
 
30
26
  const props = withDefaults(defineProps<WaveFormProps>(), {
31
27
  barsCount: 30,
32
- width: '100%'
28
+ width: '100%',
33
29
  });
34
30
 
35
31
  const emit = defineEmits<{
@@ -38,32 +34,27 @@ const emit = defineEmits<{
38
34
 
39
35
  // Calculate wave form container style
40
36
  const waveFormStyle = computed(() => ({
41
- width: typeof props.width === 'number' ? `${props.width}px` : props.width
37
+ width: typeof props.width === 'number' ? `${props.width}px` : props.width,
42
38
  }));
43
39
 
44
40
  // Generate fixed wave bar heights array to avoid height changes on re-render
45
- const waveBarHeights = ref<number[]>([]);
46
-
47
- // Generate random heights on component mount and keep them constant during component lifecycle
48
- onMounted(() => {
49
- const heights = [];
50
- for (let i = 0; i < props.barsCount; i++) {
51
- // Generate random heights between 8px and 24px
52
- heights.push(Math.random() * 16 + 8);
41
+ const waveBarHeights = Array.from({ length: props.barsCount }, () => Math.random() * 16 + 4);
42
+
43
+ // Compute active states for all bars
44
+ const activeStates = computed(() => {
45
+ const currentProgress = props.progress || 0;
46
+
47
+ if (currentProgress === 0) {
48
+ return Array(props.barsCount).fill(false);
53
49
  }
54
- waveBarHeights.value = heights;
55
- });
56
50
 
57
- // Check if wave bar is active
58
- const isBarActive = (index: number) => {
59
- const barProgress = (index + 1) / props.barsCount;
60
- return (props.progress || 0) >= barProgress;
61
- };
51
+ const _activeStates = Array.from({ length: props.barsCount }, (_, index) => {
52
+ const barProgress = index / props.barsCount;
53
+ return currentProgress >= barProgress;
54
+ });
62
55
 
63
- // Calculate cursor position style
64
- const cursorStyle = computed(() => ({
65
- left: `${(props.progress || 0) * 100}%`
66
- }));
56
+ return _activeStates;
57
+ });
67
58
 
68
59
  // Handle click event, calculate new progress
69
60
  const handleClick = (event: MouseEvent) => {
@@ -71,7 +62,7 @@ const handleClick = (event: MouseEvent) => {
71
62
  const rect = waveElement.getBoundingClientRect();
72
63
  const offsetX = event.clientX - rect.left;
73
64
  const newProgress = offsetX / rect.width;
74
-
65
+
75
66
  // Ensure progress value is between 0-1
76
67
  const validProgress = Math.max(0, Math.min(1, newProgress));
77
68
  emit('seek', validProgress);
@@ -102,13 +93,5 @@ const handleClick = (event: MouseEvent) => {
102
93
  }
103
94
  }
104
95
 
105
- &__cursor {
106
- position: absolute;
107
- top: 0;
108
- width: 2px;
109
- height: 100%;
110
- background-color: rgba(0, 0, 0, 20%);
111
- pointer-events: none;
112
- }
113
96
  }
114
97
  </style>
@@ -25,7 +25,7 @@ const callAgain = () => {
25
25
 
26
26
  startCall({
27
27
  type: payload.value.data.data.call_type,
28
- userIDList: payload.value.data.inviteeList,
28
+ userIDList: [activeConversation.value.userProfile?.userID],
29
29
  });
30
30
  };
31
31
  </script>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { MessageLayout } from './MessageLayout';
3
3
  import type { MessageAction } from '../../../hooks/useMessageActions';
4
- import type { IMessageModel as MessageModel } from '@tencentcloud/chat-uikit-engine';
4
+ import type { MessageModel } from '../../../types/engine';
5
5
 
6
6
  interface MessageProps {
7
7
  message: MessageModel;
@@ -243,6 +243,8 @@ watch(messageList, (newMessages, oldMessages) => {
243
243
  // TODO: new message notification
244
244
  }
245
245
  }
246
+ }, {
247
+ immediate: true,
246
248
  });
247
249
 
248
250
  watch(() => props.enableReadReceipt, (newEnableReadReceipt) => {
@@ -188,5 +188,5 @@ const stopClickPropagation = (e: Event) => {
188
188
  </script>
189
189
 
190
190
  <style lang="scss" module>
191
- @import './Search.scss';
191
+ @use './Search.scss';
192
192
  </style>
@@ -554,5 +554,5 @@ const handleH5Cancel = () => {
554
554
  </script>
555
555
 
556
556
  <style lang="scss" module>
557
- @import './DateRangePicker.scss';
557
+ @use './DateRangePicker.scss';
558
558
  </style>
@@ -259,5 +259,5 @@ const handleQuickOptionClick = (option: string) => {
259
259
  </script>
260
260
 
261
261
  <style lang="scss" module>
262
- @import './MessageAdvanced.scss';
262
+ @use './MessageAdvanced.scss';
263
263
  </style>
@@ -58,5 +58,5 @@ const handleUserAdvancedChange = (params: Map<SearchType, any>) => {
58
58
  </script>
59
59
 
60
60
  <style lang="scss" module>
61
- @import './SearchAdvanced.scss';
61
+ @use './SearchAdvanced.scss';
62
62
  </style>
@@ -53,5 +53,5 @@ const handleTabClick = (tabKey: SearchTabType) => {
53
53
  </script>
54
54
 
55
55
  <style lang="scss" module>
56
- @import './SearchTab.scss';
56
+ @use './SearchTab.scss';
57
57
  </style>
@@ -78,5 +78,5 @@ const handleStart = (type: 'min' | 'max', e: MouseEvent | TouchEvent) => {
78
78
  </script>
79
79
 
80
80
  <style lang="scss" module>
81
- @import './Slider.scss';
81
+ @use './Slider.scss';
82
82
  </style>