@tencentcloud/roomkit-electron-vue3 2.7.1 → 2.8.1
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/es/components/Chat/ChatKit/components/TUIChat/emoji-config/locales/zh_tw.d.ts +2 -0
- package/es/components/Chat/ChatKit/components/TUIChat/emoji-config/locales/zh_tw.mjs +67 -0
- package/es/components/Chat/ChatKit/components/TUIChat/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/index.vue2.mjs +23 -10
- package/es/components/Chat/ChatKit/components/TUIChat/message-input/message-input-editor.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-input/message-input-editor.vue2.mjs +14 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.vue.d.ts +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/index.vue2.mjs +13 -13
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/index.vue2.mjs +2 -2
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/index.vue2.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/message-revoked.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/read-receipt-panel/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/message-list/read-receipt-panel/index.vue2.mjs +2 -1
- package/es/components/Chat/ChatKit/components/TUIChat/server.d.ts +1 -1
- package/es/components/Chat/ChatKit/components/TUIChat/server.mjs +12 -3
- package/es/components/Chat/ChatKit/components/TUIChat/utils/sendMessage.mjs +2 -1
- package/es/components/Chat/ChatKit/components/common/BottomPopup/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/common/BottomPopup/index.vue2.mjs +2 -2
- package/es/components/Chat/ChatKit/components/common/ImagePreviewer/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/common/Overlay/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/common/Toast/index.vue.d.ts +1 -1
- package/es/components/Chat/ChatKit/components/common/Transfer/index.vue.mjs +1 -1
- package/es/components/Chat/ChatKit/components/common/Transfer/index.vue2.mjs +3 -3
- package/es/components/Chat/ChatKit/locales/en/TUIChat.d.ts +3 -0
- package/es/components/Chat/ChatKit/locales/en/TUIChat.mjs +5 -2
- package/es/components/Chat/ChatKit/locales/en/index.d.ts +3 -0
- package/es/components/Chat/ChatKit/locales/en/message.mjs +2 -2
- package/es/components/Chat/ChatKit/locales/index.d.ts +4 -1083
- package/es/components/Chat/ChatKit/locales/index.mjs +3 -1
- package/es/components/Chat/ChatKit/locales/zh_cn/TUIChat.d.ts +3 -0
- package/es/components/Chat/ChatKit/locales/zh_cn/TUIChat.mjs +4 -1
- package/es/components/Chat/ChatKit/locales/zh_cn/index.d.ts +3 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIChat.d.ts +153 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIChat.mjs +155 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIContact.d.ts +65 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIContact.mjs +67 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIConversation.d.ts +23 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIConversation.mjs +25 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIGroup.d.ts +86 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUIGroup.mjs +88 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUISearch.d.ts +40 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/TUISearch.mjs +42 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/component.d.ts +20 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/component.mjs +22 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/emoji.d.ts +3 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/emoji.mjs +4 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/evaluate.d.ts +10 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/evaluate.mjs +12 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/index.d.ts +513 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/index.mjs +39 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/message.d.ts +61 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/message.mjs +63 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/time.d.ts +36 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/time.mjs +38 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/translate.d.ts +163 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/words.d.ts +13 -0
- package/es/components/Chat/ChatKit/locales/zh_tw/words.mjs +15 -0
- package/es/components/Chat/ChatKit/utils/riseInput.d.ts +1 -0
- package/es/components/Chat/ChatKit/utils/riseInput.mjs +45 -0
- package/es/components/Chat/index/index.vue.mjs +1 -1
- package/es/components/Chat/index/index.vue2.mjs +4 -19
- package/es/components/ManageMember/MemberControl/useMemberControlHooks.d.ts +2 -2
- package/es/components/ManageMember/MemberControl/useMemberControlHooks.mjs +3 -3
- package/es/components/ManageMember/MemberInvite/MemberInvite.vue2.mjs +1 -1
- package/es/components/PreRoom/PasswordDialog.vue.mjs +1 -1
- package/es/components/PreRoom/PasswordDialog.vue2.mjs +21 -12
- package/es/components/RoomContent/StreamContainer/index.vue.d.ts +1 -14
- package/es/components/RoomContent/StreamContainer/index.vue.mjs +1 -1
- package/es/components/RoomContent/StreamContainer/index.vue2.mjs +111 -262
- package/es/components/RoomContent/StreamContainer/useStreamContainerHooks.d.ts +2 -9
- package/es/components/RoomContent/StreamContainer/useStreamContainerHooks.mjs +11 -0
- package/es/components/RoomContent/index.vue.d.ts +1 -14
- package/es/components/RoomContent/index.vue.mjs +1 -1
- package/es/components/RoomContent/index.vue2.mjs +1 -4
- package/es/components/RoomFooter/AIControl.vue.d.ts +1 -5
- package/es/components/RoomFooter/AIControl.vue.mjs +1 -1
- package/es/components/RoomFooter/AIControl.vue2.mjs +5 -8
- package/es/components/RoomFooter/ApplyControl/MasterApplyControl/index.vue2.mjs +1 -1
- package/es/components/RoomFooter/BasicBeauty.vue.mjs +1 -1
- package/es/components/RoomFooter/BasicBeauty.vue2.mjs +6 -3
- package/es/components/RoomFooter/ChatControl.vue.mjs +2 -1
- package/es/components/RoomFooter/EndControl/index.vue.mjs +1 -1
- package/es/components/RoomFooter/EndControl/index.vue2.mjs +4 -6
- package/es/components/RoomFooter/EndControl/useEndControlHooks.mjs +8 -12
- package/es/components/RoomFooter/FullScreenControl.vue.mjs +1 -1
- package/es/components/RoomFooter/InviteControl.vue.mjs +1 -1
- package/es/components/RoomFooter/InviteControl.vue2.mjs +2 -1
- package/es/components/RoomFooter/ManageMemberControl.vue.mjs +1 -1
- package/es/components/RoomFooter/MoreControl/index.vue.mjs +1 -1
- package/es/components/RoomFooter/ScreenShareControl/Index.vue.mjs +1 -1
- package/es/components/RoomFooter/ScreenShareControl/Index.vue2.mjs +3 -3
- package/es/components/RoomFooter/VirtualBackground.vue.mjs +1 -1
- package/es/components/RoomFooter/VirtualBackground.vue2.mjs +5 -2
- package/es/components/RoomFooter/WhiteboardControl.vue.mjs +13 -3
- package/es/components/RoomFooter/index/index.vue.d.ts +1 -5
- package/es/components/RoomFooter/index/index.vue.mjs +1 -1
- package/es/components/RoomFooter/index/index.vue2.mjs +2 -8
- package/es/components/RoomHeader/UserInfo/index.vue.mjs +1 -1
- package/es/components/RoomHeader/UserInfo/index.vue2.mjs +3 -2
- package/es/components/RoomHeader/index/LayoutControl.vue2.mjs +1 -1
- package/es/components/RoomHeader/index/index.vue.d.ts +1 -5
- package/es/components/RoomHeader/index/index.vue.mjs +1 -1
- package/es/components/RoomHeader/index/index.vue2.mjs +0 -15
- package/es/components/RoomHome/RoomControl/index.vue.d.ts +0 -5
- package/es/components/RoomHome/RoomControl/index.vue.mjs +1 -1
- package/es/components/RoomHome/RoomControl/index.vue2.mjs +1 -2
- package/es/components/RoomInvite/InvitationNotification.vue2.mjs +1 -1
- package/es/components/RoomInvite/useRoomInviteHooks.mjs +2 -2
- package/es/components/RoomOverlay/RoomOverlay.vue.mjs +16 -0
- package/es/components/RoomOverlay/RoomOverlay.vue2.mjs +4 -0
- package/es/components/RoomOverlay/useRoomOverlayHooks.d.ts +15 -0
- package/es/components/RoomOverlay/useRoomOverlayHooks.mjs +30 -0
- package/es/components/RoomSidebar/index.vue.mjs +1 -1
- package/es/components/ScheduleConference/InvitePanel.vue.mjs +1 -1
- package/es/components/ScheduleConference/ScheduleConferencePanel/index.vue.mjs +1 -1
- package/es/components/ScheduleConference/ScheduleConferencePanel/index.vue2.mjs +11 -7
- package/es/components/ScheduleConference/ScheduleRoomControl.vue.mjs +1 -1
- package/es/components/ScheduleConference/ScheduleRoomControl.vue2.mjs +3 -3
- package/es/components/ScheduleConference/ScheduleRoomList.vue2.mjs +2 -2
- package/es/components/ScheduleConference/ShareLink.vue2.mjs +1 -1
- package/es/components/ScheduleConference/TimezonePicker.vue.mjs +1 -1
- package/es/components/Stream/MultiStreamView/index.vue.d.ts +33 -0
- package/es/components/{Chat/MessageList → Stream/MultiStreamView}/index.vue.mjs +2 -2
- package/es/components/Stream/MultiStreamView/index.vue2.mjs +99 -0
- package/es/components/Stream/MultiStreamView/useMultiStreamViewHook.d.ts +17 -0
- package/es/components/Stream/MultiStreamView/useMultiStreamViewHook.mjs +95 -0
- package/es/components/Stream/SingleStreamView/index.vue.d.ts +25 -0
- package/es/components/Stream/SingleStreamView/index.vue.mjs +30 -0
- package/es/components/Stream/SingleStreamView/index.vue2.mjs +4 -0
- package/es/components/{RoomContent/StreamRegion → Stream/common}/LocalScreenView/index.vue.mjs +1 -1
- package/es/components/{RoomContent/StreamRegion → Stream/common}/LocalScreenView/index.vue2.mjs +23 -58
- package/es/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue.mjs +1 -1
- package/es/components/Stream/common/StreamList/index.vue.d.ts +27 -0
- package/es/components/{RoomContent → Stream/common}/StreamList/index.vue.mjs +2 -2
- package/es/components/{RoomContent → Stream/common}/StreamList/index.vue2.mjs +59 -95
- package/{lib/components/RoomContent/StreamRegion → es/components/Stream/common}/StreamPlay/index.vue.d.ts +9 -6
- package/es/components/{RoomContent/StreamRegion → Stream/common}/StreamPlay/index.vue.mjs +1 -1
- package/es/components/{RoomContent/StreamRegion → Stream/common}/StreamPlay/index.vue2.mjs +17 -12
- package/es/components/Stream/common/StreamRegion/index.vue.d.ts +25 -0
- package/es/components/{RoomContent → Stream/common}/StreamRegion/index.vue.mjs +2 -2
- package/es/components/{RoomContent → Stream/common}/StreamRegion/index.vue2.mjs +24 -27
- package/es/components/common/Language.vue.mjs +1 -1
- package/es/components/common/SwitchTheme.vue.mjs +1 -1
- package/es/components/common/base/Button.vue.d.ts +1 -1
- package/es/components/common/base/Checkbox/index.vue.d.ts +1 -1
- package/es/components/common/base/Dialog/index.vue.d.ts +4 -4
- package/es/components/common/base/IconButton.vue.d.ts +3 -3
- package/es/components/common/base/Input/index.vue.d.ts +4 -4
- package/es/components/common/base/Message/Message.vue.d.ts +4 -4
- package/es/components/common/base/MessageBox/index.vue.d.ts +1 -1
- package/es/components/common/base/Notification/index.vue.d.ts +1 -1
- package/es/components/common/base/Select/index.vue.d.ts +1 -1
- package/es/components/common/base/Select/index.vue2.mjs +1 -1
- package/es/components/common/base/Slider.vue.d.ts +1 -1
- package/es/components/{AITools → common/widgets/AITools}/AISubtitles.vue.mjs +2 -2
- package/es/components/{AITools → common/widgets/AITools}/AISubtitles.vue2.mjs +8 -7
- package/es/components/{AITools → common/widgets/AITools}/AITranscription.vue.mjs +2 -2
- package/es/components/{AITools → common/widgets/AITools}/AITranscription.vue2.mjs +9 -8
- package/es/conference.d.ts +6 -0
- package/es/conference.mjs +7 -1
- package/es/conference.vue.mjs +1 -1
- package/es/conference.vue2.mjs +14 -24
- package/es/extension/chatExtension.mjs +1 -1
- package/es/extension/utils/interact.mjs +1 -1
- package/es/extension/utils/setLanguage.mjs +1 -1
- package/es/hooks/useMasterApplyControl.mjs +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +969 -1197
- package/es/locales/en-US.d.ts +2 -1
- package/es/locales/en-US.mjs +3 -2
- package/es/locales/zh-CN.d.ts +2 -1
- package/es/locales/zh-CN.mjs +2 -1
- package/es/preConference.vue.d.ts +5 -0
- package/es/preConference.vue.mjs +1 -1
- package/es/preConference.vue2.mjs +7 -4
- package/es/services/index.d.ts +1 -0
- package/es/services/manager/chatManager.d.ts +0 -2
- package/es/services/manager/chatManager.mjs +6 -12
- package/{lib/services/manager/MediaManager.d.ts → es/services/manager/mediaManager.d.ts} +16 -13
- package/es/services/manager/{MediaManager.mjs → mediaManager.mjs} +110 -113
- package/es/services/manager/roomActionManager.d.ts +3 -0
- package/es/services/manager/roomActionManager.mjs +7 -0
- package/es/services/manager/scheduleConferenceManager.d.ts +1 -0
- package/es/services/manager/scheduleConferenceManager.mjs +24 -1
- package/es/services/manager/trackingManager.d.ts +11 -0
- package/es/services/manager/trackingManager.mjs +20 -0
- package/es/services/manager/userManager.d.ts +11 -1
- package/es/services/manager/userManager.mjs +159 -9
- package/es/services/roomService.d.ts +3 -2
- package/es/services/roomService.mjs +23 -41
- package/es/stores/basic.mjs +6 -1
- package/es/stores/room.d.ts +29 -1
- package/es/stores/room.mjs +49 -59
- package/es/utils/domOperation.d.ts +4 -0
- package/es/utils/domOperation.mjs +17 -23
- package/es/utils/utils.d.ts +11 -0
- package/es/utils/utils.mjs +43 -0
- package/lib/components/Chat/ChatKit/components/TUIChat/emoji-config/locales/zh_tw.d.ts +2 -0
- package/lib/components/Chat/ChatKit/components/TUIChat/emoji-config/locales/zh_tw.js +67 -0
- package/lib/components/Chat/ChatKit/components/TUIChat/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/index.vue2.js +22 -9
- package/lib/components/Chat/ChatKit/components/TUIChat/message-input/message-input-editor.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-input/message-input-editor.vue2.js +13 -0
- package/lib/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.vue.d.ts +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/index.vue2.js +13 -13
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/index.vue2.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/index.vue2.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/message-revoked.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/read-receipt-panel/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/message-list/read-receipt-panel/index.vue2.js +1 -0
- package/lib/components/Chat/ChatKit/components/TUIChat/server.d.ts +1 -1
- package/lib/components/Chat/ChatKit/components/TUIChat/server.js +12 -3
- package/lib/components/Chat/ChatKit/components/TUIChat/utils/sendMessage.js +2 -1
- package/lib/components/Chat/ChatKit/components/common/BottomPopup/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/common/BottomPopup/index.vue2.js +2 -2
- package/lib/components/Chat/ChatKit/components/common/ImagePreviewer/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/common/Overlay/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/common/Toast/index.vue.d.ts +1 -1
- package/lib/components/Chat/ChatKit/components/common/Transfer/index.vue.js +1 -1
- package/lib/components/Chat/ChatKit/components/common/Transfer/index.vue2.js +2 -2
- package/lib/components/Chat/ChatKit/locales/en/TUIChat.d.ts +3 -0
- package/lib/components/Chat/ChatKit/locales/en/TUIChat.js +5 -2
- package/lib/components/Chat/ChatKit/locales/en/index.d.ts +3 -0
- package/lib/components/Chat/ChatKit/locales/en/message.js +2 -2
- package/lib/components/Chat/ChatKit/locales/index.d.ts +4 -1083
- package/lib/components/Chat/ChatKit/locales/index.js +3 -1
- package/lib/components/Chat/ChatKit/locales/zh_cn/TUIChat.d.ts +3 -0
- package/lib/components/Chat/ChatKit/locales/zh_cn/TUIChat.js +4 -1
- package/lib/components/Chat/ChatKit/locales/zh_cn/index.d.ts +3 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIChat.d.ts +153 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIChat.js +155 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIContact.d.ts +65 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIContact.js +67 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIConversation.d.ts +23 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIConversation.js +25 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIGroup.d.ts +86 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUIGroup.js +88 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUISearch.d.ts +40 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/TUISearch.js +42 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/component.d.ts +20 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/component.js +22 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/emoji.d.ts +3 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/emoji.js +4 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/evaluate.d.ts +10 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/evaluate.js +12 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/index.d.ts +513 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/index.js +39 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/message.d.ts +61 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/message.js +63 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/time.d.ts +36 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/time.js +38 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/translate.d.ts +163 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/words.d.ts +13 -0
- package/lib/components/Chat/ChatKit/locales/zh_tw/words.js +15 -0
- package/lib/components/Chat/ChatKit/utils/riseInput.d.ts +1 -0
- package/lib/components/Chat/ChatKit/utils/riseInput.js +45 -0
- package/lib/components/Chat/index/index.vue.js +1 -1
- package/lib/components/Chat/index/index.vue2.js +2 -17
- package/lib/components/ManageMember/MemberControl/useMemberControlHooks.d.ts +2 -2
- package/lib/components/ManageMember/MemberControl/useMemberControlHooks.js +3 -3
- package/lib/components/ManageMember/MemberInvite/MemberInvite.vue2.js +1 -1
- package/lib/components/PreRoom/PasswordDialog.vue.js +1 -1
- package/lib/components/PreRoom/PasswordDialog.vue2.js +20 -11
- package/lib/components/RoomContent/StreamContainer/index.vue.d.ts +1 -14
- package/lib/components/RoomContent/StreamContainer/index.vue.js +1 -1
- package/lib/components/RoomContent/StreamContainer/index.vue2.js +109 -260
- package/lib/components/RoomContent/StreamContainer/useStreamContainerHooks.d.ts +2 -9
- package/lib/components/RoomContent/StreamContainer/useStreamContainerHooks.js +11 -0
- package/lib/components/RoomContent/index.vue.d.ts +1 -14
- package/lib/components/RoomContent/index.vue.js +1 -1
- package/lib/components/RoomContent/index.vue2.js +1 -4
- package/lib/components/RoomFooter/AIControl.vue.d.ts +1 -5
- package/lib/components/RoomFooter/AIControl.vue.js +1 -1
- package/lib/components/RoomFooter/AIControl.vue2.js +5 -8
- package/lib/components/RoomFooter/ApplyControl/MasterApplyControl/index.vue2.js +1 -1
- package/lib/components/RoomFooter/BasicBeauty.vue.js +1 -1
- package/lib/components/RoomFooter/BasicBeauty.vue2.js +6 -3
- package/lib/components/RoomFooter/ChatControl.vue.js +2 -1
- package/lib/components/RoomFooter/EndControl/index.vue.js +1 -1
- package/lib/components/RoomFooter/EndControl/index.vue2.js +4 -6
- package/lib/components/RoomFooter/EndControl/useEndControlHooks.js +8 -12
- package/lib/components/RoomFooter/FullScreenControl.vue.js +1 -1
- package/lib/components/RoomFooter/InviteControl.vue.js +1 -1
- package/lib/components/RoomFooter/InviteControl.vue2.js +2 -1
- package/lib/components/RoomFooter/ManageMemberControl.vue.js +1 -1
- package/lib/components/RoomFooter/MoreControl/index.vue.js +1 -1
- package/lib/components/RoomFooter/ScreenShareControl/Index.vue.js +1 -1
- package/lib/components/RoomFooter/ScreenShareControl/Index.vue2.js +3 -3
- package/lib/components/RoomFooter/VirtualBackground.vue.js +1 -1
- package/lib/components/RoomFooter/VirtualBackground.vue2.js +5 -2
- package/lib/components/RoomFooter/WhiteboardControl.vue.js +13 -3
- package/lib/components/RoomFooter/index/index.vue.d.ts +1 -5
- package/lib/components/RoomFooter/index/index.vue.js +1 -1
- package/lib/components/RoomFooter/index/index.vue2.js +2 -8
- package/lib/components/RoomHeader/UserInfo/index.vue.js +1 -1
- package/lib/components/RoomHeader/UserInfo/index.vue2.js +3 -2
- package/lib/components/RoomHeader/index/LayoutControl.vue2.js +1 -1
- package/lib/components/RoomHeader/index/index.vue.d.ts +1 -5
- package/lib/components/RoomHeader/index/index.vue.js +1 -1
- package/lib/components/RoomHeader/index/index.vue2.js +0 -15
- package/lib/components/RoomHome/RoomControl/index.vue.d.ts +0 -5
- package/lib/components/RoomHome/RoomControl/index.vue.js +1 -1
- package/lib/components/RoomHome/RoomControl/index.vue2.js +1 -2
- package/lib/components/RoomInvite/InvitationNotification.vue2.js +1 -1
- package/lib/components/RoomInvite/useRoomInviteHooks.js +2 -2
- package/lib/components/RoomOverlay/RoomOverlay.vue.js +16 -0
- package/lib/components/RoomOverlay/RoomOverlay.vue2.js +4 -0
- package/lib/components/RoomOverlay/useRoomOverlayHooks.d.ts +15 -0
- package/lib/components/RoomOverlay/useRoomOverlayHooks.js +30 -0
- package/lib/components/RoomSidebar/index.vue.js +1 -1
- package/lib/components/ScheduleConference/InvitePanel.vue.js +1 -1
- package/lib/components/ScheduleConference/ScheduleConferencePanel/index.vue.js +1 -1
- package/lib/components/ScheduleConference/ScheduleConferencePanel/index.vue2.js +11 -7
- package/lib/components/ScheduleConference/ScheduleRoomControl.vue.js +1 -1
- package/lib/components/ScheduleConference/ScheduleRoomControl.vue2.js +3 -3
- package/lib/components/ScheduleConference/ScheduleRoomList.vue2.js +2 -2
- package/lib/components/ScheduleConference/ShareLink.vue2.js +1 -1
- package/lib/components/ScheduleConference/TimezonePicker.vue.js +1 -1
- package/lib/components/Stream/MultiStreamView/index.vue.d.ts +33 -0
- package/lib/components/{Chat/MessageList → Stream/MultiStreamView}/index.vue.js +2 -2
- package/lib/components/Stream/MultiStreamView/index.vue2.js +99 -0
- package/lib/components/Stream/MultiStreamView/useMultiStreamViewHook.d.ts +17 -0
- package/lib/components/Stream/MultiStreamView/useMultiStreamViewHook.js +95 -0
- package/lib/components/Stream/SingleStreamView/index.vue.d.ts +25 -0
- package/lib/components/Stream/SingleStreamView/index.vue.js +30 -0
- package/lib/components/Stream/SingleStreamView/index.vue2.js +4 -0
- package/lib/components/{RoomContent/StreamRegion → Stream/common}/LocalScreenView/index.vue.js +1 -1
- package/lib/components/{RoomContent/StreamRegion → Stream/common}/LocalScreenView/index.vue2.js +22 -57
- package/lib/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue.js +1 -1
- package/lib/components/Stream/common/StreamList/index.vue.d.ts +27 -0
- package/lib/components/{RoomContent → Stream/common}/StreamList/index.vue.js +2 -2
- package/lib/components/{RoomContent → Stream/common}/StreamList/index.vue2.js +60 -96
- package/{es/components/RoomContent/StreamRegion → lib/components/Stream/common}/StreamPlay/index.vue.d.ts +9 -6
- package/lib/components/{RoomContent/StreamRegion → Stream/common}/StreamPlay/index.vue.js +1 -1
- package/lib/components/{RoomContent/StreamRegion → Stream/common}/StreamPlay/index.vue2.js +21 -16
- package/lib/components/Stream/common/StreamRegion/index.vue.d.ts +25 -0
- package/lib/components/{RoomContent → Stream/common}/StreamRegion/index.vue.js +2 -2
- package/lib/components/{RoomContent → Stream/common}/StreamRegion/index.vue2.js +24 -27
- package/lib/components/common/Language.vue.js +1 -1
- package/lib/components/common/SwitchTheme.vue.js +1 -1
- package/lib/components/common/base/Button.vue.d.ts +1 -1
- package/lib/components/common/base/Checkbox/index.vue.d.ts +1 -1
- package/lib/components/common/base/Dialog/index.vue.d.ts +4 -4
- package/lib/components/common/base/IconButton.vue.d.ts +3 -3
- package/lib/components/common/base/Input/index.vue.d.ts +4 -4
- package/lib/components/common/base/Message/Message.vue.d.ts +4 -4
- package/lib/components/common/base/MessageBox/index.vue.d.ts +1 -1
- package/lib/components/common/base/Notification/index.vue.d.ts +1 -1
- package/lib/components/common/base/Select/index.vue.d.ts +1 -1
- package/lib/components/common/base/Select/index.vue2.js +1 -1
- package/lib/components/common/base/Slider.vue.d.ts +1 -1
- package/lib/components/{AITools → common/widgets/AITools}/AISubtitles.vue.js +2 -2
- package/lib/components/{AITools → common/widgets/AITools}/AISubtitles.vue2.js +8 -7
- package/lib/components/{AITools → common/widgets/AITools}/AITranscription.vue.js +2 -2
- package/lib/components/{AITools → common/widgets/AITools}/AITranscription.vue2.js +9 -8
- package/lib/conference.d.ts +6 -0
- package/lib/conference.js +7 -1
- package/lib/conference.vue.js +1 -1
- package/lib/conference.vue2.js +14 -24
- package/lib/extension/chatExtension.js +1 -1
- package/lib/extension/utils/interact.js +1 -1
- package/lib/extension/utils/setLanguage.js +1 -1
- package/lib/hooks/useMasterApplyControl.js +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +969 -1197
- package/lib/locales/en-US.d.ts +2 -1
- package/lib/locales/en-US.js +3 -2
- package/lib/locales/zh-CN.d.ts +2 -1
- package/lib/locales/zh-CN.js +2 -1
- package/lib/preConference.vue.d.ts +5 -0
- package/lib/preConference.vue.js +1 -1
- package/lib/preConference.vue2.js +6 -3
- package/lib/services/index.d.ts +1 -0
- package/lib/services/manager/chatManager.d.ts +0 -2
- package/lib/services/manager/chatManager.js +6 -12
- package/{es/services/manager/MediaManager.d.ts → lib/services/manager/mediaManager.d.ts} +16 -13
- package/lib/services/manager/{MediaManager.js → mediaManager.js} +109 -112
- package/lib/services/manager/roomActionManager.d.ts +3 -0
- package/lib/services/manager/roomActionManager.js +7 -0
- package/lib/services/manager/scheduleConferenceManager.d.ts +1 -0
- package/lib/services/manager/scheduleConferenceManager.js +23 -0
- package/lib/services/manager/trackingManager.d.ts +11 -0
- package/lib/services/manager/trackingManager.js +20 -0
- package/lib/services/manager/userManager.d.ts +11 -1
- package/lib/services/manager/userManager.js +158 -8
- package/lib/services/roomService.d.ts +3 -2
- package/lib/services/roomService.js +24 -42
- package/lib/stores/basic.js +6 -1
- package/lib/stores/room.d.ts +29 -1
- package/lib/stores/room.js +49 -59
- package/lib/utils/domOperation.d.ts +4 -0
- package/lib/utils/domOperation.js +17 -23
- package/lib/utils/utils.d.ts +11 -0
- package/lib/utils/utils.js +43 -0
- package/package.json +4 -4
- package/src/TUIRoom/components/Chat/ChatKit/CHANGELOG.md +35 -0
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/emoji-config/locales/zh_tw.ts +66 -0
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/index.vue +24 -8
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-input/message-input-editor.vue +15 -1
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-input-toolbar/index.vue +13 -13
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-list/index.vue +1 -1
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/index.vue +2 -1
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-list/message-tool/message-revoked.vue +4 -6
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/message-list/read-receipt-panel/index.vue +9 -3
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/server.ts +12 -3
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIChat/utils/sendMessage.ts +1 -0
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIContact/contact-list/index.vue +3 -1
- package/src/TUIRoom/components/Chat/ChatKit/components/TUIGroup/manage-group/index.vue +2 -2
- package/src/TUIRoom/components/Chat/ChatKit/components/common/BottomPopup/index.vue +1 -1
- package/src/TUIRoom/components/Chat/ChatKit/components/common/BottomPopup/style/h5.scss +4 -3
- package/src/TUIRoom/components/Chat/ChatKit/components/common/BottomPopup/style/modal.scss +0 -2
- package/src/TUIRoom/components/Chat/ChatKit/components/common/ImagePreviewer/index.vue +2 -2
- package/src/TUIRoom/components/Chat/ChatKit/components/common/Overlay/index.vue +5 -0
- package/src/TUIRoom/components/Chat/ChatKit/components/common/Transfer/index.vue +2 -2
- package/src/TUIRoom/components/Chat/ChatKit/locales/en/TUIChat.ts +4 -1
- package/src/TUIRoom/components/Chat/ChatKit/locales/en/message.ts +2 -2
- package/src/TUIRoom/components/Chat/ChatKit/locales/index.ts +9 -3
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_cn/TUIChat.ts +3 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/TUIChat.ts +154 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/TUIContact.ts +66 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/TUIConversation.ts +24 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/TUIGroup.ts +87 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/TUISearch.ts +41 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/component.ts +21 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/emoji.ts +2 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/evaluate.ts +11 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/index.ts +41 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/message.ts +62 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/time.ts +37 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/translate.ts +164 -0
- package/src/TUIRoom/components/Chat/ChatKit/locales/zh_tw/words.ts +14 -0
- package/src/TUIRoom/components/Chat/ChatKit/utils/riseInput.ts +53 -0
- package/src/TUIRoom/components/Chat/index/index.vue +2 -20
- package/src/TUIRoom/components/ManageMember/MemberControl/useMemberControlHooks.ts +7 -4
- package/src/TUIRoom/components/PreRoom/PasswordDialog.vue +21 -11
- package/src/TUIRoom/components/RoomContent/StreamContainer/index.vue +107 -384
- package/src/TUIRoom/components/RoomContent/StreamContainer/useStreamContainerHooks.ts +5 -112
- package/src/TUIRoom/components/RoomContent/index.vue +1 -5
- package/src/TUIRoom/components/RoomFooter/AIControl.vue +7 -6
- package/src/TUIRoom/components/RoomFooter/BasicBeauty.vue +1 -1
- package/src/TUIRoom/components/RoomFooter/ChatControl.vue +1 -0
- package/src/TUIRoom/components/RoomFooter/EndControl/index.vue +4 -3
- package/src/TUIRoom/components/RoomFooter/EndControl/useEndControlHooks.ts +4 -10
- package/src/TUIRoom/components/RoomFooter/InviteControl.vue +1 -0
- package/src/TUIRoom/components/RoomFooter/ScreenShareControl/Index.vue +3 -3
- package/src/TUIRoom/components/RoomFooter/VirtualBackground.vue +1 -1
- package/src/TUIRoom/components/RoomFooter/WhiteboardControl.vue +13 -2
- package/src/TUIRoom/components/RoomFooter/index/index.vue +0 -6
- package/src/TUIRoom/components/RoomHeader/UserInfo/index.vue +2 -5
- package/src/TUIRoom/components/RoomHeader/index/index.vue +0 -17
- package/src/TUIRoom/components/RoomHome/RoomControl/index.vue +0 -2
- package/src/TUIRoom/components/RoomInvite/useRoomInviteHooks.ts +2 -2
- package/src/TUIRoom/components/RoomOverlay/RoomOverlay.vue +13 -0
- package/src/TUIRoom/components/RoomOverlay/useRoomOverlayHooks.ts +21 -0
- package/src/TUIRoom/components/RoomSidebar/index.vue +1 -1
- package/src/TUIRoom/components/ScheduleConference/InvitePanel.vue +1 -0
- package/src/TUIRoom/components/ScheduleConference/ScheduleConferencePanel/index.vue +10 -4
- package/src/TUIRoom/components/ScheduleConference/ScheduleRoomControl.vue +1 -0
- package/src/TUIRoom/components/Stream/MultiStreamView/index.vue +161 -0
- package/src/TUIRoom/components/Stream/MultiStreamView/useMultiStreamViewHook.ts +107 -0
- package/src/TUIRoom/components/Stream/SingleStreamView/index.vue +32 -0
- package/src/TUIRoom/components/Stream/common/LocalScreenView/index.vue +150 -0
- package/src/TUIRoom/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue +1 -6
- package/src/TUIRoom/components/{RoomContent → Stream/common}/StreamList/index.vue +74 -124
- package/src/TUIRoom/components/{RoomContent/StreamRegion → Stream/common}/StreamPlay/index.vue +28 -13
- package/src/TUIRoom/components/{RoomContent → Stream/common}/StreamRegion/index.vue +27 -32
- package/src/TUIRoom/components/common/base/Swiper.vue +20 -6
- package/src/TUIRoom/components/{AITools → common/widgets/AITools}/AISubtitles.vue +2 -2
- package/src/TUIRoom/components/{AITools → common/widgets/AITools}/AITranscription.vue +3 -3
- package/src/TUIRoom/conference.ts +14 -0
- package/src/TUIRoom/conference.vue +10 -23
- package/src/TUIRoom/hooks/useMasterApplyControl.ts +2 -1
- package/src/TUIRoom/index.ts +3 -1
- package/src/TUIRoom/locales/en-US.ts +4 -3
- package/src/TUIRoom/locales/zh-CN.ts +3 -1
- package/src/TUIRoom/preConference.vue +3 -1
- package/src/TUIRoom/services/index.ts +1 -0
- package/src/TUIRoom/services/manager/chatManager.ts +7 -16
- package/src/TUIRoom/services/manager/{MediaManager.ts → mediaManager.ts} +125 -136
- package/src/TUIRoom/services/manager/roomActionManager.ts +5 -0
- package/src/TUIRoom/services/manager/scheduleConferenceManager.ts +24 -1
- package/src/TUIRoom/services/manager/trackingManager.ts +22 -0
- package/src/TUIRoom/services/manager/userManager.ts +201 -7
- package/src/TUIRoom/services/roomService.ts +5 -24
- package/src/TUIRoom/stores/basic.ts +6 -0
- package/src/TUIRoom/stores/room.ts +60 -71
- package/src/TUIRoom/utils/domOperation.ts +27 -0
- package/src/TUIRoom/utils/utils.ts +61 -0
- package/es/components/Chat/ChatEditor/index.vue.mjs +0 -7
- package/es/components/Chat/ChatEditor/index.vue2.mjs +0 -45
- package/es/components/Chat/ChatEditor/useChatEditor.mjs +0 -83
- package/es/components/Chat/EditorTools/index.vue.d.ts +0 -6
- package/es/components/Chat/EditorTools/index.vue.mjs +0 -7
- package/es/components/Chat/EditorTools/index.vue2.mjs +0 -59
- package/es/components/Chat/MessageList/index.vue2.mjs +0 -101
- package/es/components/Chat/MessageList/useMessageListHook.mjs +0 -142
- package/es/components/Chat/MessageTypes/MessageText.vue.d.ts +0 -8
- package/es/components/Chat/MessageTypes/MessageText.vue.mjs +0 -7
- package/es/components/Chat/MessageTypes/MessageText.vue2.mjs +0 -31
- package/es/components/Chat/util.mjs +0 -432
- package/es/components/RoomContent/StreamList/index.vue.d.ts +0 -39
- package/es/components/RoomContent/StreamRegion/LocalScreenView/index.vue.d.ts +0 -14
- package/es/components/RoomContent/StreamRegion/index.vue.d.ts +0 -42
- package/es/components/common/icons/EmojiIcon.vue.mjs +0 -21
- package/lib/components/Chat/ChatEditor/index.vue.js +0 -7
- package/lib/components/Chat/ChatEditor/index.vue2.js +0 -45
- package/lib/components/Chat/ChatEditor/useChatEditor.js +0 -83
- package/lib/components/Chat/EditorTools/index.vue.d.ts +0 -6
- package/lib/components/Chat/EditorTools/index.vue.js +0 -7
- package/lib/components/Chat/EditorTools/index.vue2.js +0 -59
- package/lib/components/Chat/MessageList/index.vue.d.ts +0 -2
- package/lib/components/Chat/MessageList/index.vue2.js +0 -101
- package/lib/components/Chat/MessageList/useMessageListHook.js +0 -142
- package/lib/components/Chat/MessageTypes/MessageText.vue.d.ts +0 -8
- package/lib/components/Chat/MessageTypes/MessageText.vue.js +0 -7
- package/lib/components/Chat/MessageTypes/MessageText.vue2.js +0 -31
- package/lib/components/Chat/util.js +0 -432
- package/lib/components/RoomContent/StreamList/index.vue.d.ts +0 -39
- package/lib/components/RoomContent/StreamRegion/LocalScreenView/index.vue.d.ts +0 -14
- package/lib/components/RoomContent/StreamRegion/index.vue.d.ts +0 -42
- package/lib/components/common/icons/EmojiIcon.vue.d.ts +0 -2
- package/lib/components/common/icons/EmojiIcon.vue.js +0 -21
- /package/es/components/{AITools/AISubtitles.vue.d.ts → RoomOverlay/RoomOverlay.vue.d.ts} +0 -0
- /package/es/components/{Chat/ChatEditor → Stream/common/LocalScreenView}/index.vue.d.ts +0 -0
- /package/es/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue.d.ts +0 -0
- /package/es/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue2.mjs +0 -0
- /package/{lib/components → es/components/common/widgets}/AITools/AISubtitles.vue.d.ts +0 -0
- /package/es/components/{AITools → common/widgets/AITools}/AITranscription.vue.d.ts +0 -0
- /package/{es/components/Chat/MessageList/index.vue.d.ts → lib/components/RoomOverlay/RoomOverlay.vue.d.ts} +0 -0
- /package/lib/components/{Chat/ChatEditor → Stream/common/LocalScreenView}/index.vue.d.ts +0 -0
- /package/lib/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue.d.ts +0 -0
- /package/lib/components/{RoomContent/StreamRegion → Stream/common}/StreamCover/index.vue2.js +0 -0
- /package/{es/components/common/icons/EmojiIcon.vue.d.ts → lib/components/common/widgets/AITools/AISubtitles.vue.d.ts} +0 -0
- /package/lib/components/{AITools → common/widgets/AITools}/AITranscription.vue.d.ts +0 -0
|
@@ -252,3 +252,30 @@ export function getFields(
|
|
|
252
252
|
|
|
253
253
|
return Promise.reject(new Error('getFields() occur error'));
|
|
254
254
|
}
|
|
255
|
+
|
|
256
|
+
export function getContentSize(element: HTMLElement) {
|
|
257
|
+
const computedStyle = getComputedStyle(element);
|
|
258
|
+
|
|
259
|
+
const paddingTop = Number(computedStyle.paddingTop.replace('px', ''));
|
|
260
|
+
const paddingBottom = Number(computedStyle.paddingBottom.replace('px', ''));
|
|
261
|
+
const borderTop = Number(computedStyle.borderTopWidth.replace('px', ''));
|
|
262
|
+
const borderBottom = Number(
|
|
263
|
+
computedStyle.borderBottomWidth.replace('px', '')
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
const paddingLeft = Number(computedStyle.paddingLeft.replace('px', ''));
|
|
267
|
+
const paddingRight = Number(computedStyle.paddingRight.replace('px', ''));
|
|
268
|
+
const borderLeft = Number(computedStyle.borderLeftWidth.replace('px', ''));
|
|
269
|
+
const borderRight = Number(computedStyle.borderRightWidth.replace('px', ''));
|
|
270
|
+
|
|
271
|
+
const contentWidth =
|
|
272
|
+
element.offsetWidth - paddingLeft - paddingRight - borderLeft - borderRight;
|
|
273
|
+
const contentHeight =
|
|
274
|
+
element.offsetHeight -
|
|
275
|
+
paddingTop -
|
|
276
|
+
paddingBottom -
|
|
277
|
+
borderTop -
|
|
278
|
+
borderBottom;
|
|
279
|
+
|
|
280
|
+
return { width: contentWidth, height: contentHeight };
|
|
281
|
+
}
|
|
@@ -268,3 +268,64 @@ export function formatTimestampToTime(
|
|
|
268
268
|
match => replacements[match]
|
|
269
269
|
);
|
|
270
270
|
}
|
|
271
|
+
|
|
272
|
+
export type Comparator<T> = (a: T, b: T) => -1 | 0 | 1;
|
|
273
|
+
/**
|
|
274
|
+
* Creates a new combined {@link Comparator<T>} which sorts items by the given comparators.
|
|
275
|
+
* The comparators are applied in the order they are given (left -> right).
|
|
276
|
+
*
|
|
277
|
+
* @param comparators the comparators to use for sorting.
|
|
278
|
+
* @returns a combined {@link Comparator<T>}.
|
|
279
|
+
*/
|
|
280
|
+
export const combineComparators = <T>(
|
|
281
|
+
...comparators: Comparator<T>[]
|
|
282
|
+
): Comparator<T> => {
|
|
283
|
+
return (a, b) => {
|
|
284
|
+
for (const comparator of comparators) {
|
|
285
|
+
const result = comparator(a, b);
|
|
286
|
+
if (result !== 0) return result;
|
|
287
|
+
}
|
|
288
|
+
return 0;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export const createComparator = <T>(
|
|
293
|
+
compareRules: (data1: T, data2: T) => boolean
|
|
294
|
+
) => {
|
|
295
|
+
return (a: T, b: T) => {
|
|
296
|
+
if (compareRules(a, b) && compareRules(b, a)) {
|
|
297
|
+
return 0;
|
|
298
|
+
}
|
|
299
|
+
if (compareRules(a, b)) {
|
|
300
|
+
return -1;
|
|
301
|
+
}
|
|
302
|
+
if (compareRules(b, a)) {
|
|
303
|
+
return 1;
|
|
304
|
+
}
|
|
305
|
+
return 0;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export function arrayIsEqual<T>(arr1: T[], arr2: T[]): boolean {
|
|
310
|
+
if (arr1.length !== arr2.length) {
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
314
|
+
if (
|
|
315
|
+
typeof arr1[i] === 'object' &&
|
|
316
|
+
typeof arr2[i] === 'object' &&
|
|
317
|
+
arr1[i] !== null &&
|
|
318
|
+
arr2[i] !== null
|
|
319
|
+
) {
|
|
320
|
+
if (!arrayIsEqual(arr1[i] as any, arr2[i] as any)) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
if (arr1[i] !== arr2[i]) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./index.vue2.mjs";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const ChatEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b27110df"]]);
|
|
5
|
-
export {
|
|
6
|
-
ChatEditor as default
|
|
7
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createVNode, withDirectives, createElementVNode, isRef, withKeys, vModelText } from "vue";
|
|
2
|
-
import emoji from "../EditorTools/index.vue.mjs";
|
|
3
|
-
import useChatEditor from "./useChatEditor.mjs";
|
|
4
|
-
const _hoisted_1 = ["disabled", "placeholder"];
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "index",
|
|
7
|
-
setup(__props) {
|
|
8
|
-
const {
|
|
9
|
-
t,
|
|
10
|
-
editorInputEle,
|
|
11
|
-
sendMsg,
|
|
12
|
-
isMessageDisabled,
|
|
13
|
-
sendMessage,
|
|
14
|
-
handleChooseEmoji
|
|
15
|
-
} = useChatEditor();
|
|
16
|
-
return (_ctx, _cache) => {
|
|
17
|
-
return openBlock(), createElementBlock("div", {
|
|
18
|
-
class: normalizeClass(["chat-editor", { disable: unref(isMessageDisabled) }])
|
|
19
|
-
}, [
|
|
20
|
-
createVNode(emoji, {
|
|
21
|
-
class: "chat-emoji",
|
|
22
|
-
onChooseEmoji: unref(handleChooseEmoji)
|
|
23
|
-
}, null, 8, ["onChooseEmoji"]),
|
|
24
|
-
withDirectives(createElementVNode("textarea", {
|
|
25
|
-
ref_key: "editorInputEle",
|
|
26
|
-
ref: editorInputEle,
|
|
27
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(sendMsg) ? sendMsg.value = $event : null),
|
|
28
|
-
disabled: unref(isMessageDisabled),
|
|
29
|
-
class: "content-bottom-input",
|
|
30
|
-
placeholder: unref(isMessageDisabled) ? unref(t)("Muted by the moderator") : unref(t)("Type a message"),
|
|
31
|
-
onKeyup: _cache[1] || (_cache[1] = withKeys(
|
|
32
|
-
//@ts-ignore
|
|
33
|
-
(...args) => unref(sendMessage) && unref(sendMessage)(...args),
|
|
34
|
-
["enter"]
|
|
35
|
-
))
|
|
36
|
-
}, null, 40, _hoisted_1), [
|
|
37
|
-
[vModelText, unref(sendMsg)]
|
|
38
|
-
])
|
|
39
|
-
], 2);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
export {
|
|
44
|
-
_sfc_main as default
|
|
45
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from "vue";
|
|
2
|
-
import { storeToRefs } from "pinia";
|
|
3
|
-
import renderMsg from "../../common/base/Message/Message.mjs";
|
|
4
|
-
import { TencentCloudChat } from "@tencentcloud/tuiroom-engine-electron";
|
|
5
|
-
import useGetRoomEngine from "../../../hooks/useRoomEngine.mjs";
|
|
6
|
-
import { useChatStore } from "../../../stores/chat.mjs";
|
|
7
|
-
import { useRoomStore } from "../../../stores/room.mjs";
|
|
8
|
-
import { useI18n } from "../../../locales/index.mjs";
|
|
9
|
-
import { useBasicStore } from "../../../stores/basic.mjs";
|
|
10
|
-
import { decodeSendTextMsg } from "../util.mjs";
|
|
11
|
-
function useChatEditor() {
|
|
12
|
-
const roomEngine = useGetRoomEngine();
|
|
13
|
-
const { t } = useI18n();
|
|
14
|
-
const basicStore = useBasicStore();
|
|
15
|
-
const chatStore = useChatStore();
|
|
16
|
-
const roomStore = useRoomStore();
|
|
17
|
-
const { roomId } = storeToRefs(basicStore);
|
|
18
|
-
const { isMessageDisabled } = storeToRefs(chatStore);
|
|
19
|
-
const editorInputEle = ref();
|
|
20
|
-
const sendMsg = ref("");
|
|
21
|
-
const isEmojiToolbarVisible = ref(false);
|
|
22
|
-
watch(isMessageDisabled, (value) => {
|
|
23
|
-
if (value) {
|
|
24
|
-
sendMsg.value = "";
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const sendMessage = async () => {
|
|
28
|
-
var _a;
|
|
29
|
-
const result = decodeSendTextMsg(sendMsg.value);
|
|
30
|
-
if (result === "") {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
sendMsg.value = "";
|
|
34
|
-
isEmojiToolbarVisible.value = false;
|
|
35
|
-
try {
|
|
36
|
-
const tim = (_a = roomEngine.instance) == null ? void 0 : _a.getTIM();
|
|
37
|
-
if (!tim) {
|
|
38
|
-
throw new Error("tim is null");
|
|
39
|
-
}
|
|
40
|
-
const message = tim.createTextMessage({
|
|
41
|
-
to: roomId.value,
|
|
42
|
-
conversationType: TencentCloudChat.TYPES.CONV_GROUP,
|
|
43
|
-
payload: {
|
|
44
|
-
text: result
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
await tim.sendMessage(message);
|
|
48
|
-
chatStore.updateMessageList({
|
|
49
|
-
ID: Math.random().toString(),
|
|
50
|
-
type: "TIMTextElem",
|
|
51
|
-
payload: {
|
|
52
|
-
text: result
|
|
53
|
-
},
|
|
54
|
-
nick: roomStore.localUser.nameCard || roomStore.localUser.userName || roomStore.localUser.userId,
|
|
55
|
-
from: roomStore.localUser.userId,
|
|
56
|
-
flow: "out",
|
|
57
|
-
sequence: Math.random()
|
|
58
|
-
});
|
|
59
|
-
} catch (e) {
|
|
60
|
-
renderMsg({ type: "error", message: t("Failed to send the message") });
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const handleChooseEmoji = (emojiName) => {
|
|
64
|
-
sendMsg.value += emojiName;
|
|
65
|
-
editorInputEle.value.focus();
|
|
66
|
-
};
|
|
67
|
-
const togglePopover = () => {
|
|
68
|
-
isEmojiToolbarVisible.value = !isEmojiToolbarVisible.value;
|
|
69
|
-
};
|
|
70
|
-
return {
|
|
71
|
-
t,
|
|
72
|
-
editorInputEle,
|
|
73
|
-
sendMsg,
|
|
74
|
-
isMessageDisabled,
|
|
75
|
-
sendMessage,
|
|
76
|
-
handleChooseEmoji,
|
|
77
|
-
isEmojiToolbarVisible,
|
|
78
|
-
togglePopover
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
useChatEditor as default
|
|
83
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
-
"choose-emoji": (...args: any[]) => void;
|
|
3
|
-
}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>> & {
|
|
4
|
-
"onChoose-emoji"?: ((...args: any[]) => any) | undefined;
|
|
5
|
-
}, {}, {}>;
|
|
6
|
-
export default _default;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, openBlock, createElementBlock, createVNode, withModifiers, withDirectives, normalizeClass, unref, Fragment, renderList, createElementVNode, vShow } from "vue";
|
|
2
|
-
import { emojiList, emojiBaseUrl, emojiMap } from "../util.mjs";
|
|
3
|
-
import { isMobile } from "../../../utils/environment.mjs";
|
|
4
|
-
import SvgIcon from "../../common/base/SvgIcon.vue.mjs";
|
|
5
|
-
import EmojiIcon from "../../common/icons/EmojiIcon.vue.mjs";
|
|
6
|
-
import vClickOutside from "../../../directives/vClickOutside.mjs";
|
|
7
|
-
const _hoisted_1 = { class: "emoji-tool" };
|
|
8
|
-
const _hoisted_2 = ["onClick"];
|
|
9
|
-
const _hoisted_3 = ["src"];
|
|
10
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "index",
|
|
12
|
-
emits: ["choose-emoji"],
|
|
13
|
-
setup(__props, { emit: __emit }) {
|
|
14
|
-
const emit = __emit;
|
|
15
|
-
const showEmojiToolbar = ref(false);
|
|
16
|
-
const chooseEmoji = (itemName) => {
|
|
17
|
-
const emojiInfo = itemName;
|
|
18
|
-
emit("choose-emoji", emojiInfo);
|
|
19
|
-
};
|
|
20
|
-
const handleEmojiToobar = () => {
|
|
21
|
-
showEmojiToolbar.value = !showEmojiToolbar.value;
|
|
22
|
-
};
|
|
23
|
-
const handleClickOutsideEmojiToobar = () => {
|
|
24
|
-
if (showEmojiToolbar.value) {
|
|
25
|
-
showEmojiToolbar.value = false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
return (_ctx, _cache) => {
|
|
29
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
30
|
-
createVNode(SvgIcon, {
|
|
31
|
-
icon: EmojiIcon,
|
|
32
|
-
class: "emoji-icon",
|
|
33
|
-
onClick: withModifiers(handleEmojiToobar, ["stop"])
|
|
34
|
-
}),
|
|
35
|
-
withDirectives((openBlock(), createElementBlock("div", {
|
|
36
|
-
class: normalizeClass(unref(isMobile) ? "emoji-list-h5" : "emoji-list")
|
|
37
|
-
}, [
|
|
38
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(emojiList), (childrenItem, childrenIndex) => {
|
|
39
|
-
return openBlock(), createElementBlock("div", {
|
|
40
|
-
key: childrenIndex,
|
|
41
|
-
class: "emoji-item",
|
|
42
|
-
onClick: ($event) => chooseEmoji(childrenItem)
|
|
43
|
-
}, [
|
|
44
|
-
createElementVNode("img", {
|
|
45
|
-
src: unref(emojiBaseUrl) + unref(emojiMap)[childrenItem]
|
|
46
|
-
}, null, 8, _hoisted_3)
|
|
47
|
-
], 8, _hoisted_2);
|
|
48
|
-
}), 128))
|
|
49
|
-
], 2)), [
|
|
50
|
-
[vShow, showEmojiToolbar.value],
|
|
51
|
-
[unref(vClickOutside), handleClickOutsideEmojiToobar]
|
|
52
|
-
])
|
|
53
|
-
]);
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
_sfc_main as default
|
|
59
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, nextTick, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, Fragment, renderList, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
|
-
import { storeToRefs } from "pinia";
|
|
3
|
-
import MessageText from "../MessageTypes/MessageText.vue.mjs";
|
|
4
|
-
import { isMobile } from "../../../utils/environment.mjs";
|
|
5
|
-
import useMessageList from "./useMessageListHook.mjs";
|
|
6
|
-
import { getScrollInfo } from "../../../utils/domOperation.mjs";
|
|
7
|
-
import { throttle } from "../../../utils/utils.mjs";
|
|
8
|
-
import { useRoomStore } from "../../../stores/room.mjs";
|
|
9
|
-
const _hoisted_1 = ["title"];
|
|
10
|
-
const _hoisted_2 = { class: "message-body" };
|
|
11
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
-
__name: "index",
|
|
13
|
-
setup(__props) {
|
|
14
|
-
const messageListRef = ref();
|
|
15
|
-
const roomStore = useRoomStore();
|
|
16
|
-
const { getDisplayName } = storeToRefs(roomStore);
|
|
17
|
-
const {
|
|
18
|
-
messageList,
|
|
19
|
-
setMessageListInfo,
|
|
20
|
-
handleGetHistoryMessageList,
|
|
21
|
-
isCompleted,
|
|
22
|
-
getDisplaySenderName
|
|
23
|
-
} = useMessageList();
|
|
24
|
-
let isScrollAtBottom = true;
|
|
25
|
-
const handleMessageListScroll = (e) => {
|
|
26
|
-
const messageContainer = e.target;
|
|
27
|
-
const bottom = messageContainer.scrollHeight - messageContainer.scrollTop - messageContainer.clientHeight;
|
|
28
|
-
isScrollAtBottom = bottom <= 80;
|
|
29
|
-
if (messageContainer.scrollTop < 40 && !isCompleted.value) {
|
|
30
|
-
handleGetHistoryMessageList();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const handleScroll = throttle(handleMessageListScroll, 1e3);
|
|
34
|
-
async function scrollToLatestMessage() {
|
|
35
|
-
const { scrollHeight } = await getScrollInfo("#messageScrollList");
|
|
36
|
-
if (messageListRef.value) {
|
|
37
|
-
messageListRef.value.scrollTop = scrollHeight;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
watch(messageList, async (newMessageList, oldMessageList) => {
|
|
41
|
-
var _a;
|
|
42
|
-
if (newMessageList.length === 0) return;
|
|
43
|
-
const lastMessage = newMessageList.slice(-1);
|
|
44
|
-
const oldLastMessage = oldMessageList.slice(-1);
|
|
45
|
-
const isSendByMe = lastMessage[0].flow === "out";
|
|
46
|
-
const isNewMessage = lastMessage[0].ID !== ((_a = oldLastMessage[0]) == null ? void 0 : _a.ID);
|
|
47
|
-
await nextTick();
|
|
48
|
-
if (isScrollAtBottom) {
|
|
49
|
-
scrollToLatestMessage();
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (isSendByMe && isNewMessage) {
|
|
53
|
-
scrollToLatestMessage();
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
onMounted(() => {
|
|
57
|
-
var _a;
|
|
58
|
-
setMessageListInfo();
|
|
59
|
-
(_a = messageListRef.value) == null ? void 0 : _a.addEventListener("scroll", handleScroll);
|
|
60
|
-
});
|
|
61
|
-
onUnmounted(() => {
|
|
62
|
-
var _a;
|
|
63
|
-
(_a = messageListRef.value) == null ? void 0 : _a.removeEventListener("scroll", handleScroll);
|
|
64
|
-
});
|
|
65
|
-
return (_ctx, _cache) => {
|
|
66
|
-
return openBlock(), createElementBlock("div", {
|
|
67
|
-
class: normalizeClass(unref(isMobile) ? "message-list-container-h5" : "message-list-container")
|
|
68
|
-
}, [
|
|
69
|
-
createElementVNode("div", {
|
|
70
|
-
id: "messageScrollList",
|
|
71
|
-
ref_key: "messageListRef",
|
|
72
|
-
ref: messageListRef,
|
|
73
|
-
class: "message-list"
|
|
74
|
-
}, [
|
|
75
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(messageList), (item, index) => {
|
|
76
|
-
return openBlock(), createElementBlock("div", {
|
|
77
|
-
key: item.ID,
|
|
78
|
-
ref_for: true,
|
|
79
|
-
ref: "messageAimId",
|
|
80
|
-
class: normalizeClass(["message-item", `${"out" === item.flow ? "is-me" : ""}`])
|
|
81
|
-
}, [
|
|
82
|
-
unref(getDisplaySenderName)(index) ? (openBlock(), createElementBlock("div", {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: "message-header",
|
|
85
|
-
title: item.nick || item.from
|
|
86
|
-
}, toDisplayString(unref(getDisplayName)(item.from)), 9, _hoisted_1)) : createCommentVNode("", true),
|
|
87
|
-
createElementVNode("div", _hoisted_2, [
|
|
88
|
-
createVNode(MessageText, {
|
|
89
|
-
data: item.payload.text
|
|
90
|
-
}, null, 8, ["data"])
|
|
91
|
-
])
|
|
92
|
-
], 2);
|
|
93
|
-
}), 128))
|
|
94
|
-
], 512)
|
|
95
|
-
], 2);
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
export {
|
|
100
|
-
_sfc_main as default
|
|
101
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { watch, onUnmounted } from "vue";
|
|
2
|
-
import { storeToRefs } from "pinia";
|
|
3
|
-
import { useChatStore } from "../../../stores/chat.mjs";
|
|
4
|
-
import { useBasicStore } from "../../../stores/basic.mjs";
|
|
5
|
-
import { useI18n } from "../../../locales/index.mjs";
|
|
6
|
-
import TUIRoomEngine__default, { TencentCloudChat } from "@tencentcloud/tuiroom-engine-electron";
|
|
7
|
-
import useGetRoomEngine from "../../../hooks/useRoomEngine.mjs";
|
|
8
|
-
function useMessageList() {
|
|
9
|
-
var _a;
|
|
10
|
-
const { t } = useI18n();
|
|
11
|
-
const roomEngine = useGetRoomEngine();
|
|
12
|
-
const chatStore = useChatStore();
|
|
13
|
-
const basicStore = useBasicStore();
|
|
14
|
-
const { roomId } = storeToRefs(basicStore);
|
|
15
|
-
const { messageList, isCompleted, nextReqMessageId } = storeToRefs(chatStore);
|
|
16
|
-
watch(
|
|
17
|
-
isCompleted,
|
|
18
|
-
(value) => {
|
|
19
|
-
isCompleted.value = value;
|
|
20
|
-
},
|
|
21
|
-
{ immediate: true, deep: true }
|
|
22
|
-
);
|
|
23
|
-
async function handleGetHistoryMessageList() {
|
|
24
|
-
var _a2;
|
|
25
|
-
const tim2 = (_a2 = roomEngine.instance) == null ? void 0 : _a2.getTIM();
|
|
26
|
-
const imResponse = await (tim2 == null ? void 0 : tim2.getMessageList({
|
|
27
|
-
conversationID: `GROUP${roomId.value}`,
|
|
28
|
-
nextReqMessageID: nextReqMessageId.value
|
|
29
|
-
}));
|
|
30
|
-
const {
|
|
31
|
-
nextReqMessageID: middleReqMessageId,
|
|
32
|
-
messageList: historyMessageList,
|
|
33
|
-
isCompleted: isCompleted2
|
|
34
|
-
} = imResponse.data;
|
|
35
|
-
messageList.value.splice(0, 0, ...historyMessageList);
|
|
36
|
-
const currentMessageList = messageList.value.filter(
|
|
37
|
-
(item) => item.type === "TIMTextElem"
|
|
38
|
-
);
|
|
39
|
-
chatStore.setMessageListInfo(
|
|
40
|
-
currentMessageList,
|
|
41
|
-
isCompleted2,
|
|
42
|
-
middleReqMessageId
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
async function getMessageList() {
|
|
46
|
-
var _a2;
|
|
47
|
-
let count = 0;
|
|
48
|
-
const result = {
|
|
49
|
-
currentMessageList: [],
|
|
50
|
-
isCompleted: false,
|
|
51
|
-
nextReqMessageId: ""
|
|
52
|
-
};
|
|
53
|
-
const tim2 = (_a2 = roomEngine.instance) == null ? void 0 : _a2.getTIM();
|
|
54
|
-
const getIMMessageList = async () => {
|
|
55
|
-
const conversationData = {
|
|
56
|
-
conversationID: `GROUP${roomId.value}`
|
|
57
|
-
};
|
|
58
|
-
if (result.nextReqMessageId !== "") {
|
|
59
|
-
conversationData.nextReqMessageID = result.nextReqMessageId;
|
|
60
|
-
}
|
|
61
|
-
const imResponse = await tim2.getMessageList(conversationData);
|
|
62
|
-
const { messageList: messageList2, isCompleted: isCompleted2, nextReqMessageID } = imResponse.data;
|
|
63
|
-
result.currentMessageList.splice(0, 0, ...messageList2);
|
|
64
|
-
result.isCompleted = messageList2.length > 0 ? isCompleted2 : true;
|
|
65
|
-
result.nextReqMessageId = nextReqMessageID;
|
|
66
|
-
if (result.isCompleted || result.currentMessageList.length >= 15) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
count += 1;
|
|
70
|
-
if (count === 1) {
|
|
71
|
-
await getIMMessageList();
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
await getIMMessageList();
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
const onReceiveMessage = (options) => {
|
|
78
|
-
if (!options || !options.data) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
const currentConversationId = `GROUP${roomId.value}`;
|
|
82
|
-
options.data.forEach((message) => {
|
|
83
|
-
if (message.conversationID !== currentConversationId || message.type !== TencentCloudChat.TYPES.MSG_TEXT) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
const {
|
|
87
|
-
ID,
|
|
88
|
-
payload: { text },
|
|
89
|
-
nick: userName,
|
|
90
|
-
from: userId
|
|
91
|
-
} = message;
|
|
92
|
-
chatStore.updateMessageList({
|
|
93
|
-
ID,
|
|
94
|
-
type: "TIMTextElem",
|
|
95
|
-
payload: {
|
|
96
|
-
text
|
|
97
|
-
},
|
|
98
|
-
nick: userName || userId,
|
|
99
|
-
from: userId,
|
|
100
|
-
flow: "in",
|
|
101
|
-
sequence: Math.random()
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
async function setMessageListInfo() {
|
|
106
|
-
const { currentMessageList, isCompleted: isCompleted2, nextReqMessageId: nextReqMessageId2 } = await getMessageList();
|
|
107
|
-
const filterCurrentMessageList = currentMessageList.filter(
|
|
108
|
-
(item) => item.type === "TIMTextElem"
|
|
109
|
-
);
|
|
110
|
-
chatStore.setMessageListInfo(
|
|
111
|
-
filterCurrentMessageList,
|
|
112
|
-
isCompleted2,
|
|
113
|
-
nextReqMessageId2
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
function getDisplaySenderName(index) {
|
|
117
|
-
if (index === 0) return true;
|
|
118
|
-
return messageList.value[index].from !== messageList.value[index - 1].from;
|
|
119
|
-
}
|
|
120
|
-
let tim = (_a = roomEngine.instance) == null ? void 0 : _a.getTIM();
|
|
121
|
-
if (!tim) {
|
|
122
|
-
tim = TencentCloudChat.create({ SDKAppID: basicStore.sdkAppId });
|
|
123
|
-
}
|
|
124
|
-
TUIRoomEngine__default.once("ready", () => {
|
|
125
|
-
tim == null ? void 0 : tim.on(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onReceiveMessage);
|
|
126
|
-
});
|
|
127
|
-
onUnmounted(() => {
|
|
128
|
-
tim == null ? void 0 : tim.off(TencentCloudChat.EVENT.MESSAGE_RECEIVED, onReceiveMessage);
|
|
129
|
-
});
|
|
130
|
-
return {
|
|
131
|
-
t,
|
|
132
|
-
handleGetHistoryMessageList,
|
|
133
|
-
messageList,
|
|
134
|
-
getMessageList,
|
|
135
|
-
setMessageListInfo,
|
|
136
|
-
getDisplaySenderName,
|
|
137
|
-
isCompleted
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
export {
|
|
141
|
-
useMessageList as default
|
|
142
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<Readonly<{
|
|
2
|
-
data?: any;
|
|
3
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
|
|
4
|
-
data?: any;
|
|
5
|
-
}>>>, {
|
|
6
|
-
readonly data?: any;
|
|
7
|
-
}, {}>;
|
|
8
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import _sfc_main from "./MessageText.vue2.mjs";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const MessageText = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-98238edd"]]);
|
|
5
|
-
export {
|
|
6
|
-
MessageText as default
|
|
7
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import { decodeMessageText } from "../util.mjs";
|
|
3
|
-
const _hoisted_1 = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "text-box"
|
|
6
|
-
};
|
|
7
|
-
const _hoisted_2 = ["src"];
|
|
8
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
-
__name: "MessageText",
|
|
10
|
-
props: ["data"],
|
|
11
|
-
setup(__props) {
|
|
12
|
-
const props = __props;
|
|
13
|
-
const handleTextMessageShowContext = (text) => decodeMessageText(text);
|
|
14
|
-
return (_ctx, _cache) => {
|
|
15
|
-
return openBlock(), createElementBlock("span", null, [
|
|
16
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(handleTextMessageShowContext(props.data), (item, index) => {
|
|
17
|
-
return openBlock(), createElementBlock("span", { key: index }, [
|
|
18
|
-
item.name === "text" ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(item.text), 1)) : item.name === "img" ? (openBlock(), createElementBlock("img", {
|
|
19
|
-
key: 1,
|
|
20
|
-
class: "text-img",
|
|
21
|
-
src: item.src
|
|
22
|
-
}, null, 8, _hoisted_2)) : createCommentVNode("", true)
|
|
23
|
-
]);
|
|
24
|
-
}), 128))
|
|
25
|
-
]);
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
export {
|
|
30
|
-
_sfc_main as default
|
|
31
|
-
};
|