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.
- 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
- package/dist/chat/index.d.ts +35 -35
- package/dist/chat/server.js +15 -15
- package/dist/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.js +6 -6
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/FriendInfo/FriendInfo.js +9 -9
- package/dist/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.js +1 -1
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +4 -4
- package/dist/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.js +8 -8
- package/dist/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.js +7 -7
- package/dist/components/ContactList/ContactList.js +7 -7
- package/dist/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.js +8 -8
- package/dist/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/FriendItem/FriendItem.js +5 -5
- package/dist/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.js +1 -1
- package/dist/components/ContactList/ContactListItem/GroupItem/GroupItem.js +1 -1
- package/dist/components/ContactList/ContactSearch/ContactSearch.js +6 -6
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +9 -9
- package/dist/components/ConversationList/ConversationList.js +4 -4
- package/dist/components/ConversationList/ConversationList.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +10 -10
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +20 -20
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/index.js +1 -1
- package/dist/components/ConversationList/index.d.ts +30 -30
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +88 -84
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +2 -2
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +2 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +23 -21
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +32 -31
- package/dist/components/MessageInput/index.d.ts +6 -6
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +24 -34
- package/dist/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.js +29 -28
- package/dist/components/MessageList/Message/Message.vue.d.ts +1 -1
- package/dist/components/MessageList/MessageList.js +8 -6
- package/dist/components/MessageList/index.d.ts +2 -2
- package/dist/hooks/useAudioControl.d.ts +3 -3
- package/dist/hooks/useAudioControl.js +32 -30
- package/dist/rtc/server.js +45 -40
- package/dist/states/LoginState.d.ts +23 -0
- package/dist/states/LoginState.js +34 -39
- package/dist/states/MessageInputState/MessageInputState.d.ts +41 -7
- package/dist/states/MessageInputState/MessageInputState.js +60 -59
- package/dist/states/MessageInputState/utils.d.ts +8 -1
- package/dist/states/MessageInputState/utils.js +30 -10
- package/dist/styles/index.css +1 -1
- package/dist/utils/call.js +1 -1
- package/package.json +1 -1
- package/src/chat/server.ts +0 -1
- package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.vue +1 -1
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.vue +1 -1
- package/src/components/ContactList/ContactList.vue +1 -1
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.vue +1 -1
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.vue +1 -1
- package/src/components/ContactList/ContactSearch/ContactSearch.vue +1 -1
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreateButton/ConversationCreateButton.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +1 -1
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.vue +1 -1
- package/src/components/ConversationList/ConversationList.vue +2 -2
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.vue +1 -1
- package/src/components/ConversationList/ConversationPlaceHolder/ConversationPlaceHolder.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +1 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +3 -3
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUnread.vue +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -1
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +7 -3
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +1 -1
- package/src/components/MessageInput/TextEditor/EditorCore.ts +4 -2
- package/src/components/MessageInput/TextEditor/TextEditor.vue +3 -4
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +20 -37
- package/src/components/MessageList/Message/CustomMessage/CallMessage/CallMessage.vue +1 -1
- package/src/components/MessageList/Message/Message.vue +1 -1
- package/src/components/MessageList/MessageList.vue +2 -0
- package/src/components/Search/Search.vue +1 -1
- package/src/components/Search/SearchAdvanced/DateRangePicker/DateRangePicker.vue +1 -1
- package/src/components/Search/SearchAdvanced/MessageAdvanced/MessageAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchAdvanced.vue +1 -1
- package/src/components/Search/SearchAdvanced/SearchTab/SearchTab.vue +1 -1
- package/src/components/Search/SearchAdvanced/Slider/Slider.vue +1 -1
- package/src/components/Search/SearchAdvanced/UserAdvanced/UserAdvanced.vue +1 -1
- package/src/components/Search/SearchBar/SearchBar.vue +1 -1
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.vue +1 -1
- package/src/components/Search/SearchResults/Loading/Loading.vue +1 -1
- package/src/components/Search/SearchResults/SearchResults.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.vue +1 -1
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.vue +1 -1
- package/src/hooks/useAudioControl.ts +17 -4
- package/src/rtc/server.ts +4 -0
- package/src/utils/call.ts +2 -2
|
@@ -12,12 +12,12 @@ const createAudioPlayEvent = (audioId: string) => new CustomEvent(AUDIO_PLAY_EVE
|
|
|
12
12
|
detail: { audioId },
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
interface
|
|
15
|
+
interface UseAudioControlProps {
|
|
16
16
|
url: string;
|
|
17
17
|
audioId?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface
|
|
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:
|
|
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
|
-
|
|
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
|
|
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) {
|