tuikit-atomicx-vue3 4.3.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 +1 -1
  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
@@ -128,5 +128,5 @@ const handleClear = () => {
128
128
  </script>
129
129
 
130
130
  <style lang="scss" module>
131
- @import './SearchBar.scss';
131
+ @use './SearchBar.scss';
132
132
  </style>
@@ -28,5 +28,5 @@ const text = computed(() => props.text || t('Search.status.noContent'));
28
28
  </script>
29
29
 
30
30
  <style lang="scss" module>
31
- @import './EmptyResult.scss';
31
+ @use './EmptyResult.scss';
32
32
  </style>
@@ -13,5 +13,5 @@ const props = defineProps<ILoadingProps>();
13
13
  </script>
14
14
 
15
15
  <style lang="scss" module>
16
- @import './Loading.scss';
16
+ @use './Loading.scss';
17
17
  </style>
@@ -396,5 +396,5 @@ const generateKey = (type: SearchType, item: SearchResultItemType, index: number
396
396
  </script>
397
397
 
398
398
  <style lang="scss" module>
399
- @import './SearchResults.scss';
399
+ @use './SearchResults.scss';
400
400
  </style>
@@ -54,5 +54,5 @@ const handleClick = () => {
54
54
  </script>
55
55
 
56
56
  <style lang="scss" module>
57
- @import './Conversation.scss';
57
+ @use './Conversation.scss';
58
58
  </style>
@@ -35,5 +35,5 @@ const handleClick = () => {
35
35
  </script>
36
36
 
37
37
  <style lang="scss" module>
38
- @import './Group.scss';
38
+ @use './Group.scss';
39
39
  </style>
@@ -259,5 +259,5 @@ const handleClick = () => {
259
259
  </script>
260
260
 
261
261
  <style lang="scss" module>
262
- @import './Message.scss';
262
+ @use './Message.scss';
263
263
  </style>
@@ -59,5 +59,5 @@ const props = withDefaults(defineProps<ISearchResultsItemProps>(), {
59
59
  </script>
60
60
 
61
61
  <style lang="scss" module>
62
- @import './SearchResultsItem.scss';
62
+ @use './SearchResultsItem.scss';
63
63
  </style>
@@ -68,5 +68,5 @@ const handleClick = () => {
68
68
  </script>
69
69
 
70
70
  <style lang="scss" module>
71
- @import './User.scss';
71
+ @use './User.scss';
72
72
  </style>
@@ -12,12 +12,12 @@ const createAudioPlayEvent = (audioId: string) => new CustomEvent(AUDIO_PLAY_EVE
12
12
  detail: { audioId },
13
13
  });
14
14
 
15
- interface IUseAudioControlProps {
15
+ interface UseAudioControlProps {
16
16
  url: string;
17
17
  audioId?: string;
18
18
  }
19
19
 
20
- interface IUseAudioControlReturn {
20
+ interface UseAudioControlReturn {
21
21
  isPlaying: ReturnType<typeof ref<boolean>>;
22
22
  progress: ReturnType<typeof ref<number>>;
23
23
  duration: ReturnType<typeof ref<number | undefined>>;
@@ -36,7 +36,7 @@ interface IUseAudioControlReturn {
36
36
  * @param props Configuration parameters
37
37
  * @returns Audio control related states and methods
38
38
  */
39
- export function useAudioControl(props: IUseAudioControlProps): IUseAudioControlReturn {
39
+ export function useAudioControl(props: UseAudioControlProps): UseAudioControlReturn {
40
40
  const { url } = props;
41
41
 
42
42
  // Generate a unique ID if audioId is not provided
@@ -147,7 +147,20 @@ export function useAudioControl(props: IUseAudioControlProps): IUseAudioControlR
147
147
  if (!audioInstance) {
148
148
  return;
149
149
  }
150
- duration.value = audioInstance.duration;
150
+ if (audioInstance.duration === Infinity) {
151
+ // Jump to a large time
152
+ audioInstance.currentTime = 1e101;
153
+ audioInstance.ontimeupdate = () => {
154
+ if (!audioInstance) {
155
+ return;
156
+ }
157
+ duration.value = audioInstance.duration;
158
+ audioInstance.ontimeupdate = null;
159
+ audioInstance.currentTime = 0;
160
+ };
161
+ } else {
162
+ duration.value = audioInstance.duration;
163
+ }
151
164
  isLoading.value = false;
152
165
  };
153
166
 
package/src/rtc/server.ts CHANGED
@@ -3,7 +3,9 @@ import { ref } from 'vue';
3
3
  import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
4
4
  import TUICore, { TUILogin, TUIConstants } from '@tencentcloud/tui-core';
5
5
  import TUIRoomEngine from '@tencentcloud/tuiroom-engine-js';
6
+ import { dataReport, MetricsKey } from '../report';
6
7
  import { useLoginState } from '../states/LoginState';
8
+ import { isMobile } from '../utils';
7
9
 
8
10
  export default class RTCLoginServer {
9
11
  private static instance: RTCLoginServer;
@@ -69,6 +71,8 @@ export default class RTCLoginServer {
69
71
 
70
72
  try {
71
73
  this.isEngineLoggingIn = true;
74
+ const metricsKey = !isMobile ? MetricsKey.T_METRICS_STATE_API_LOGIN_COUNT : MetricsKey.T_METRICS_STATE_API_LOGIN_MOBILE_COUNT;
75
+ dataReport.reportCount(metricsKey);
72
76
  await TUIChatEngine.login({
73
77
  chat,
74
78
  SDKAppID,
package/src/utils/call.ts CHANGED
@@ -93,7 +93,7 @@ function formatTime(seconds: number): string {
93
93
  return `${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
94
94
  }
95
95
 
96
- function substringByLength(str: string, maxLength: number = 12): string {
96
+ function substringByLength(str: string, maxLength = 12): string {
97
97
  if (!str || str.length <= maxLength) {
98
98
  return str;
99
99
  }
@@ -150,7 +150,7 @@ function parseCallMessageText(message: MessageModel): string {
150
150
  return i18next.t('CallMessage.switch_to_video_call');
151
151
  }
152
152
  // when CDM is abnormal, the default return value is start call
153
- return i18next.t('CallMessage.start_call');
153
+ return i18next.t('CallMessage.start_call', { messageSender: '' });
154
154
  }
155
155
  case 2:
156
156
  if (data.groupID) {