tuikit-atomicx-vue3 3.3.0-beta.3 → 3.3.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/dist/AttachmentPicker.module-BesmtGyl.js +11 -0
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +76 -0
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +76 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-XRL7A5Gj.js → MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js} +23 -18
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +76 -0
- package/dist/chat/index.d.ts +3747 -2386
- package/dist/chat/index.js +12 -11
- package/dist/components/BarrageInput/BarrageInputH5.js +32 -8
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +9 -5
- package/dist/components/BarrageInput/TextEditor/index.js +14 -6
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +4 -4
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +12 -4
- package/dist/components/BarrageList/i18n/en-US/index.d.ts +1 -0
- package/dist/components/BarrageList/i18n/en-US/index.js +2 -1
- package/dist/components/BarrageList/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.js +2 -1
- package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +5 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +3 -3
- package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +3 -3
- package/dist/components/ChatSetting/SettingItem/SettingItem.js +21 -21
- package/dist/components/ChatSetting/i18n/en-US.js +3 -3
- package/dist/components/ChatSetting/i18n/zh-CN.js +3 -3
- package/dist/components/ChatSetting/index.d.ts +1 -4
- package/dist/components/ChatSetting/index.js +3 -6
- package/dist/components/CoGuestPanel/CoGuestPanel.js +1 -1
- package/dist/components/ContactList/ContactInfo/ContactInfo.js +17 -17
- package/dist/components/ContactList/ContactInfo/ContactInfo.vue.d.ts +26 -2
- package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +2 -1
- package/dist/components/ContactList/ContactList.js +19 -10
- package/dist/components/ContactList/ContactList.vue.d.ts +109 -1
- package/dist/components/ContactList/index.d.ts +158 -26
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +8 -9
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +2 -1
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +8 -8
- package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +1 -2
- package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +8 -8
- package/dist/components/ConversationList/ConversationList.js +18 -44
- package/dist/components/ConversationList/ConversationList.vue.d.ts +197 -1535
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +8 -11
- package/dist/components/ConversationList/ConversationListContent/ConversationListContent.vue.d.ts +22 -340
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +80 -134
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +19 -30
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +0 -2
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +14 -15
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +12 -24
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
- package/dist/components/ConversationList/ConversationPreview/index.d.ts +1 -1
- package/dist/components/ConversationList/ConversationPreview/index.js +17 -21
- package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/components/ConversationList/index.d.ts +468 -2400
- package/dist/components/ConversationList/index.js +1 -1
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +1 -1
- package/dist/components/LiveCoreView/index.js +113 -58
- package/dist/components/LiveCoreView/index.vue.d.ts +9 -0
- package/dist/components/LiveList/LiveList.js +7 -5
- package/dist/components/LiveList/LiveListH5.js +77 -71
- package/dist/components/LiveList/i18n/en-US/index.d.ts +5 -0
- package/dist/components/LiveList/i18n/en-US/index.js +6 -1
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +5 -0
- package/dist/components/LiveList/i18n/zh-CN/index.js +6 -1
- package/dist/components/LiveList/pullToRefresh.js +204 -0
- package/dist/components/LiveList/pullToRefresh.vue.d.ts +86 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +6 -5
- package/dist/components/LiveScenePanel/index.js +3 -3
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +0 -4
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +1 -1
- package/dist/components/MessageInput/AttachmentPicker/index.js +14 -19
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/MessageInput.vue.d.ts +6 -9
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +18 -9
- package/dist/components/MessageInput/index.d.ts +5 -41
- package/dist/components/MessageInput/index.js +4 -4
- package/dist/components/MessageList/Message/CustomMessage/index.js +2 -2
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +7 -5
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.vue.d.ts +8 -8
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +2 -1
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +2 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +12 -4
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +3 -3
- package/dist/components/MessageList/MessageForward/MessageForward.js +2 -3
- package/dist/components/MessageList/MessageList.js +14 -7
- package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +5 -5
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +10 -10
- package/dist/components/MessageList/index.d.ts +143 -5
- package/dist/components/MessageList/index.js +5 -5
- package/dist/components/Search/Search.js +1 -3
- package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +4 -6
- package/dist/components/Search/SearchResults/Loading/Loading.js +2 -4
- package/dist/components/Search/SearchResults/SearchResults.js +20 -22
- package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +6 -8
- package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +5 -7
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +19 -21
- package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +1 -3
- package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +5 -7
- package/dist/components/StreamMixer/LocalMixer/index.js +11 -5
- package/dist/components/StreamView/manager/mediaManager.js +1 -1
- package/dist/components/UserPicker/UserPicker.js +2 -2
- package/dist/components/UserPicker/UserPicker.vue.d.ts +7 -8
- package/dist/components/UserPicker/components/ListMode/ListMode.js +14 -17
- package/dist/components/UserPicker/components/ListMode/ListMode.vue.d.ts +2 -2
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.vue.d.ts +2 -2
- package/dist/components/UserPicker/components/TreeMode/TreeMode.vue.d.ts +3 -3
- package/dist/components/UserPicker/components/TreeMode/TreeNode.vue.d.ts +4 -4
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +3 -3
- package/dist/components/UserPicker/hooks/useSelection.d.ts +8 -8
- package/dist/components/UserPicker/hooks/useTreeState.d.ts +3 -3
- package/dist/components/UserPicker/index.d.ts +134 -3
- package/dist/components/UserPicker/index.js +3 -2
- package/dist/components/UserPicker/type.d.ts +18 -18
- package/dist/index.js +6 -3
- package/dist/rtc/index.d.ts +9 -0
- package/dist/states/GroupSettingState/GroupSettingState.js +3 -3
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +3 -0
- package/dist/states/LoginState.js +1 -0
- package/dist/states/MessageInputState/MessageInputState.js +25 -5
- package/dist/styles/index.css +1294 -3578
- package/dist/types/contact.d.ts +13 -12
- package/dist/types/conversation.d.ts +12 -14
- package/dist/types/engine.d.ts +12 -0
- package/dist/types/engine.js +15 -0
- package/dist/types/index.js +2 -1
- package/dist/utils/json.js +0 -1
- package/package.json +7 -3
- package/src/chat/index.ts +12 -4
- package/src/components/BarrageInput/BarrageInputH5.vue +50 -4
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/TextEditor/Editor.scss +1 -1
- package/src/components/BarrageInput/TextEditor/TextEditor.module.scss +2 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +6 -0
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +8 -8
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +10 -0
- package/src/components/BarrageList/i18n/en-US/index.ts +1 -0
- package/src/components/BarrageList/i18n/zh-CN/index.ts +1 -0
- package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +5 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -4
- package/src/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.vue +2 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +3 -2
- package/src/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.vue +3 -3
- package/src/components/ChatSetting/SettingItem/SettingItem.vue +10 -7
- package/src/components/ChatSetting/i18n/en-US.ts +3 -3
- package/src/components/ChatSetting/i18n/zh-CN.ts +3 -3
- package/src/components/ChatSetting/index.ts +3 -3
- package/src/components/CoGuestPanel/CoGuestPanel.vue +9 -0
- package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/ContactInfo.vue +17 -9
- package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.scss +4 -3
- package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.scss +2 -0
- package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
- package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.scss +2 -2
- package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.scss +3 -2
- package/src/components/ContactList/ContactList.scss +2 -1
- package/src/components/ContactList/ContactList.vue +18 -3
- package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.scss +3 -3
- package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.scss +5 -6
- package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.scss +3 -3
- package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.scss +5 -6
- package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.scss +3 -3
- package/src/components/ConversationList/ConversationActions/ConversationActions.scss +2 -12
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -0
- package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.scss +2 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +2 -2
- package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.scss +2 -1
- package/src/components/ConversationList/ConversationList.scss +0 -5
- package/src/components/ConversationList/ConversationList.vue +15 -41
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +13 -18
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +11 -9
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +14 -16
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +2 -14
- package/src/components/ConversationList/ConversationPreview/index.ts +1 -1
- package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveCoreView/index.vue +145 -79
- package/src/components/LiveList/LiveList.vue +3 -0
- package/src/components/LiveList/LiveListH5.vue +60 -85
- package/src/components/LiveList/i18n/en-US/index.ts +5 -0
- package/src/components/LiveList/i18n/zh-CN/index.ts +5 -0
- package/src/components/LiveList/pullToRefresh.vue +364 -0
- package/src/components/LiveScenePanel/CameraSettingDialog.vue +6 -5
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.module.scss +4 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +12 -17
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +3 -2
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +3 -2
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +3 -2
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
- package/src/components/MessageInput/MessageInput.vue +21 -15
- package/src/components/MessageInput/TextEditor/Editor.scss +1 -0
- package/src/components/MessageInput/TextEditor/TextEditor.vue +16 -6
- package/src/components/MessageInput/types.d.ts +3 -4
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +1 -1
- package/src/components/MessageList/Message/FaceMessage/FaceMessage.vue +10 -7
- package/src/components/MessageList/Message/LocationMessage/LocationMessage.vue +3 -1
- package/src/components/MessageList/Message/MergerMessage/MergerMessage.vue +1 -1
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +2 -2
- package/src/components/MessageList/MessageForward/MessageForward.vue +3 -3
- package/src/components/MessageList/MessageList.vue +17 -5
- package/src/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue +9 -9
- package/src/components/MessageList/index.ts +5 -4
- package/src/components/Search/Search.scss +0 -3
- package/src/components/Search/SearchResults/EmptyResult/EmptyResult.scss +0 -3
- package/src/components/Search/SearchResults/Loading/Loading.scss +0 -3
- package/src/components/Search/SearchResults/SearchResults.scss +7 -16
- package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.scss +5 -11
- package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.scss +0 -3
- package/src/components/Search/SearchResults/SearchResultsItem/User/User.scss +5 -6
- package/src/components/StreamMixer/LocalMixer/index.vue +9 -4
- package/src/components/StreamView/manager/mediaManager.ts +1 -1
- package/src/components/UserPicker/UserPicker.vue +6 -9
- package/src/components/UserPicker/components/ListMode/ListMode.vue +3 -7
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +2 -2
- package/src/components/UserPicker/components/TreeMode/TreeMode.vue +3 -3
- package/src/components/UserPicker/components/TreeMode/TreeNode.vue +3 -3
- package/src/components/UserPicker/hooks/useSearchFilter.ts +15 -14
- package/src/components/UserPicker/hooks/useSelection.ts +32 -32
- package/src/components/UserPicker/hooks/useTreeState.ts +4 -4
- package/src/components/UserPicker/index.ts +16 -14
- package/src/components/UserPicker/type.ts +18 -18
- package/src/types/contact.ts +13 -12
- package/src/types/conversation.ts +12 -14
- package/src/types/engine.ts +15 -0
- package/src/utils/json.ts +0 -4
- package/dist/AttachmentPicker.module-0_DWsAtr.js +0 -11
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CaSj3Gh_.js +0 -72
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CrzGMmrh.js +0 -72
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-DTv6TJKr.js +0 -72
- package/dist/states/UIOpenControlState/UIOpenControlState.d.ts +0 -15
- package/dist/states/UIOpenControlState/UIOpenControlState.js +0 -28
- package/dist/states/UIOpenControlState/index.d.ts +0 -1
- package/dist/states/UIOpenControlState/index.js +0 -4
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { defineComponent, useCssVars, ref, computed, createElementBlock, openBlock, createElementVNode, normalizeStyle, normalizeClass, createBlock, createCommentVNode, unref, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import { IconArrowUpNew, IconCheck, IconErrorToast } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { _ as _export_sfc } from "../../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
key: 1,
|
|
6
|
+
class: "refresh-loading"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_2 = { class: "refresh-text" };
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "pullToRefresh",
|
|
11
|
+
props: {
|
|
12
|
+
threshold: { default: 60 },
|
|
13
|
+
resistance: { default: 2.5 },
|
|
14
|
+
disabled: { type: Boolean, default: false },
|
|
15
|
+
resultDuration: { default: 500 },
|
|
16
|
+
text: { default: () => ({
|
|
17
|
+
pull: "Pull to refresh",
|
|
18
|
+
release: "Release to refresh",
|
|
19
|
+
loading: "Loading...",
|
|
20
|
+
success: "Refresh success",
|
|
21
|
+
error: "Refresh failed"
|
|
22
|
+
}) }
|
|
23
|
+
},
|
|
24
|
+
emits: ["refresh", "loadMore"],
|
|
25
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
26
|
+
useCssVars((_ctx) => ({
|
|
27
|
+
"38f9ff2f": props.threshold + "px"
|
|
28
|
+
}));
|
|
29
|
+
const refreshState = ref(
|
|
30
|
+
"pulling"
|
|
31
|
+
/* Pulling */
|
|
32
|
+
);
|
|
33
|
+
const startY = ref(0);
|
|
34
|
+
const currentY = ref(0);
|
|
35
|
+
const isTouching = ref(false);
|
|
36
|
+
const contentRef = ref(null);
|
|
37
|
+
let timer = null;
|
|
38
|
+
const props = __props;
|
|
39
|
+
const emit = __emit;
|
|
40
|
+
__expose({
|
|
41
|
+
completeRefresh
|
|
42
|
+
});
|
|
43
|
+
const pullDistance = computed(() => {
|
|
44
|
+
if (refreshState.value === "loading") {
|
|
45
|
+
return props.threshold;
|
|
46
|
+
}
|
|
47
|
+
if (!isTouching.value) return 0;
|
|
48
|
+
return Math.max(0, (currentY.value - startY.value) / props.resistance);
|
|
49
|
+
});
|
|
50
|
+
const contentTranslateY = computed(() => {
|
|
51
|
+
if (refreshState.value === "loading" || refreshState.value === "success" || refreshState.value === "error") {
|
|
52
|
+
return props.threshold;
|
|
53
|
+
}
|
|
54
|
+
return Math.min(pullDistance.value, props.threshold);
|
|
55
|
+
});
|
|
56
|
+
const translateY = computed(() => {
|
|
57
|
+
if (refreshState.value === "loading" || refreshState.value === "success" || refreshState.value === "error") {
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
return Math.min(pullDistance.value, props.threshold) - props.threshold;
|
|
61
|
+
});
|
|
62
|
+
const isIndicatorVisible = computed(() => {
|
|
63
|
+
if (refreshState.value === "loading" || refreshState.value === "success" || refreshState.value === "error") {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
return pullDistance.value > 10;
|
|
67
|
+
});
|
|
68
|
+
const statusText = computed(() => {
|
|
69
|
+
switch (refreshState.value) {
|
|
70
|
+
case "releasing":
|
|
71
|
+
return props.text.release;
|
|
72
|
+
case "loading":
|
|
73
|
+
return props.text.loading;
|
|
74
|
+
case "success":
|
|
75
|
+
return props.text.success;
|
|
76
|
+
case "error":
|
|
77
|
+
return props.text.error;
|
|
78
|
+
default:
|
|
79
|
+
return props.text.pull;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
function isScrollAtBottom(threshold = 50) {
|
|
83
|
+
if (!contentRef.value) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return contentRef.value.scrollTop + contentRef.value.clientHeight >= contentRef.value.scrollHeight - threshold;
|
|
87
|
+
}
|
|
88
|
+
function handleWheel(event) {
|
|
89
|
+
if (!contentRef.value) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (event.deltaY > 0 && isScrollAtBottom()) {
|
|
93
|
+
emit("loadMore");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function handleScroll() {
|
|
97
|
+
if (!contentRef.value) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (isScrollAtBottom()) {
|
|
101
|
+
emit("loadMore");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function checkIsAtTop() {
|
|
105
|
+
if (!contentRef.value) return true;
|
|
106
|
+
return contentRef.value.scrollTop === 0;
|
|
107
|
+
}
|
|
108
|
+
function onTouchStart(event) {
|
|
109
|
+
if (props.disabled || refreshState.value === "loading") return;
|
|
110
|
+
if (!checkIsAtTop()) return;
|
|
111
|
+
isTouching.value = true;
|
|
112
|
+
startY.value = event.touches[0].clientY;
|
|
113
|
+
currentY.value = startY.value;
|
|
114
|
+
refreshState.value = "pulling";
|
|
115
|
+
}
|
|
116
|
+
function onTouchMove(event) {
|
|
117
|
+
if (!isTouching.value || props.disabled || refreshState.value === "loading") return;
|
|
118
|
+
currentY.value = event.touches[0].clientY;
|
|
119
|
+
if (pullDistance.value > 0 && checkIsAtTop()) {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
}
|
|
122
|
+
refreshState.value = pullDistance.value > props.threshold ? "releasing" : "pulling";
|
|
123
|
+
}
|
|
124
|
+
function onTouchEnd() {
|
|
125
|
+
if (!isTouching.value || props.disabled) return;
|
|
126
|
+
isTouching.value = false;
|
|
127
|
+
if (refreshState.value === "loading") return;
|
|
128
|
+
if (refreshState.value === "releasing") {
|
|
129
|
+
startRefresh();
|
|
130
|
+
} else {
|
|
131
|
+
resetPullState();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function startRefresh() {
|
|
135
|
+
refreshState.value = "loading";
|
|
136
|
+
emit("refresh", completeRefresh);
|
|
137
|
+
}
|
|
138
|
+
function completeRefresh(success = true) {
|
|
139
|
+
refreshState.value = success ? "success" : "error";
|
|
140
|
+
if (timer) {
|
|
141
|
+
clearTimeout(timer);
|
|
142
|
+
}
|
|
143
|
+
timer = setTimeout(() => {
|
|
144
|
+
resetPullState();
|
|
145
|
+
}, props.resultDuration);
|
|
146
|
+
}
|
|
147
|
+
function resetPullState() {
|
|
148
|
+
startY.value = 0;
|
|
149
|
+
currentY.value = 0;
|
|
150
|
+
if (refreshState.value !== "loading") {
|
|
151
|
+
refreshState.value = "pulling";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return (_ctx, _cache) => {
|
|
155
|
+
return openBlock(), createElementBlock("div", {
|
|
156
|
+
class: "pull-to-refresh",
|
|
157
|
+
onTouchstart: onTouchStart,
|
|
158
|
+
onTouchmove: onTouchMove,
|
|
159
|
+
onTouchend: onTouchEnd,
|
|
160
|
+
onTouchcancel: onTouchEnd
|
|
161
|
+
}, [
|
|
162
|
+
createElementVNode("div", {
|
|
163
|
+
class: normalizeClass(["refresh-indicator", [refreshState.value, { visible: isIndicatorVisible.value }]]),
|
|
164
|
+
style: normalizeStyle({ transform: `translateY(${translateY.value}px)` })
|
|
165
|
+
}, [
|
|
166
|
+
refreshState.value !== "loading" && refreshState.value !== "success" && refreshState.value !== "error" ? (openBlock(), createBlock(unref(IconArrowUpNew), {
|
|
167
|
+
key: 0,
|
|
168
|
+
class: normalizeClass(["refresh-arrow", {
|
|
169
|
+
releasing: refreshState.value === "releasing"
|
|
170
|
+
/* Releasing */
|
|
171
|
+
}]),
|
|
172
|
+
size: 16
|
|
173
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
174
|
+
refreshState.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_1)) : createCommentVNode("", true),
|
|
175
|
+
refreshState.value === "success" ? (openBlock(), createBlock(unref(IconCheck), {
|
|
176
|
+
key: 2,
|
|
177
|
+
class: "refresh-success",
|
|
178
|
+
size: 16
|
|
179
|
+
})) : createCommentVNode("", true),
|
|
180
|
+
refreshState.value === "error" ? (openBlock(), createBlock(unref(IconErrorToast), {
|
|
181
|
+
key: 3,
|
|
182
|
+
class: "refresh-error",
|
|
183
|
+
size: 16
|
|
184
|
+
})) : createCommentVNode("", true),
|
|
185
|
+
createElementVNode("span", _hoisted_2, toDisplayString(statusText.value), 1)
|
|
186
|
+
], 6),
|
|
187
|
+
createElementVNode("div", {
|
|
188
|
+
ref_key: "contentRef",
|
|
189
|
+
ref: contentRef,
|
|
190
|
+
class: "refresh-content",
|
|
191
|
+
style: normalizeStyle({ transform: `translateY(${contentTranslateY.value}px)` }),
|
|
192
|
+
onScroll: handleScroll,
|
|
193
|
+
onWheel: handleWheel
|
|
194
|
+
}, [
|
|
195
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
196
|
+
], 36)
|
|
197
|
+
], 32);
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
const PullToRefresh = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4886b108"]]);
|
|
202
|
+
export {
|
|
203
|
+
PullToRefresh as default
|
|
204
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
threshold?: number;
|
|
3
|
+
resistance?: number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
resultDuration?: number;
|
|
6
|
+
text?: {
|
|
7
|
+
pull: string;
|
|
8
|
+
release: string;
|
|
9
|
+
loading: string;
|
|
10
|
+
success: string;
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare function completeRefresh(success?: boolean): void;
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
default?(_: {}): any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
19
|
+
threshold: number;
|
|
20
|
+
resistance: number;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
resultDuration: number;
|
|
23
|
+
text: () => {
|
|
24
|
+
pull: string;
|
|
25
|
+
release: string;
|
|
26
|
+
loading: string;
|
|
27
|
+
success: string;
|
|
28
|
+
error: string;
|
|
29
|
+
};
|
|
30
|
+
}>>, {
|
|
31
|
+
completeRefresh: typeof completeRefresh;
|
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
|
+
loadMore: () => void;
|
|
34
|
+
refresh: (completeRefresh: (success?: boolean) => void) => void;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
36
|
+
threshold: number;
|
|
37
|
+
resistance: number;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
resultDuration: number;
|
|
40
|
+
text: () => {
|
|
41
|
+
pull: string;
|
|
42
|
+
release: string;
|
|
43
|
+
loading: string;
|
|
44
|
+
success: string;
|
|
45
|
+
error: string;
|
|
46
|
+
};
|
|
47
|
+
}>>> & Readonly<{
|
|
48
|
+
onLoadMore?: (() => any) | undefined;
|
|
49
|
+
onRefresh?: ((completeRefresh: (success?: boolean) => void) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
text: {
|
|
52
|
+
pull: string;
|
|
53
|
+
release: string;
|
|
54
|
+
loading: string;
|
|
55
|
+
success: string;
|
|
56
|
+
error: string;
|
|
57
|
+
};
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
threshold: number;
|
|
60
|
+
resistance: number;
|
|
61
|
+
resultDuration: number;
|
|
62
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
63
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
64
|
+
export default _default;
|
|
65
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
66
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
67
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
68
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
69
|
+
} : {
|
|
70
|
+
type: import('vue').PropType<T[K]>;
|
|
71
|
+
required: true;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
type __VLS_WithDefaults<P, D> = {
|
|
75
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
76
|
+
default: D[K];
|
|
77
|
+
}> : P[K];
|
|
78
|
+
};
|
|
79
|
+
type __VLS_Prettify<T> = {
|
|
80
|
+
[K in keyof T]: T[K];
|
|
81
|
+
} & {};
|
|
82
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
83
|
+
new (): {
|
|
84
|
+
$slots: S;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, watch, onMounted, onBeforeUnmount, createBlock, openBlock, unref, withCtx, createElementVNode, createVNode, toDisplayString, createElementBlock, Fragment, renderList } from "vue";
|
|
2
2
|
import { useDeviceState } from "../../states/DeviceState.js";
|
|
3
3
|
import { TRTCCloud, TRTCVideoResolution, TRTCVideoMirrorType, TRTCVideoFillMode, TRTCVideoRotation } from "@tencentcloud/tuiroom-engine-js";
|
|
4
4
|
import { useUIKit, TUIDialog, TUISelect, TUIOption } from "@tencentcloud/uikit-base-component-vue3";
|
|
@@ -24,9 +24,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
const { cameraList } = useDeviceState();
|
|
25
25
|
const props = __props;
|
|
26
26
|
const emits = __emit;
|
|
27
|
-
onUnmounted(async () => {
|
|
28
|
-
await previewTRTCCloud.stopCameraDeviceTest();
|
|
29
|
-
});
|
|
30
27
|
const title = computed(() => {
|
|
31
28
|
return props.mediaSource ? t("Update Camera") : t("Add Camera");
|
|
32
29
|
});
|
|
@@ -63,6 +60,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
60
|
}
|
|
64
61
|
await previewTRTCCloud.startCameraDeviceTest("video-preview");
|
|
65
62
|
});
|
|
63
|
+
onBeforeUnmount(async () => {
|
|
64
|
+
await previewTRTCCloud.stopCameraDeviceTest();
|
|
65
|
+
previewTRTCCloud.destroy();
|
|
66
|
+
});
|
|
66
67
|
watch(
|
|
67
68
|
() => props.mediaSource,
|
|
68
69
|
async (mediaSource) => {
|
|
@@ -208,7 +209,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
208
209
|
};
|
|
209
210
|
}
|
|
210
211
|
});
|
|
211
|
-
const CameraSettingDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
212
|
+
const CameraSettingDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cbd9ccf2"]]);
|
|
212
213
|
export {
|
|
213
214
|
CameraSettingDialog as default
|
|
214
215
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref,
|
|
1
|
+
import { defineComponent, computed, ref, onBeforeUnmount, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, createBlock, createCommentVNode, Fragment, renderList } from "vue";
|
|
2
2
|
import TUIRoomEngine, { TRTCMediaSourceType, TRTCVideoResolution, TUIVideoQuality, TRTCVideoResolutionMode } from "@tencentcloud/tuiroom-engine-js";
|
|
3
3
|
import LiveSceneSelect from "./LiveSceneSelect.js";
|
|
4
4
|
import { useUIKit, TUIToast, TOAST_TYPE } from "@tencentcloud/uikit-base-component-vue3";
|
|
@@ -193,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
193
193
|
cameraSettingMediaSource.value = material;
|
|
194
194
|
showCameraSettingDialog.value = true;
|
|
195
195
|
};
|
|
196
|
-
|
|
196
|
+
onBeforeUnmount(() => {
|
|
197
197
|
clearMediaSource();
|
|
198
198
|
});
|
|
199
199
|
return (_ctx, _cache) => {
|
|
@@ -231,7 +231,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
|
-
const LiveScenePanelComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
234
|
+
const LiveScenePanelComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e1c7a80b"]]);
|
|
235
235
|
addI18n("en-US", { translation: resource });
|
|
236
236
|
addI18n("zh-CN", { translation: resource$1 });
|
|
237
237
|
export {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
-
className?: string;
|
|
3
2
|
attachmentPickerMode?: 'collapsed' | 'expanded';
|
|
4
3
|
}
|
|
5
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
6
|
-
className: string;
|
|
7
5
|
attachmentPickerMode: string;
|
|
8
6
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
9
|
-
className: string;
|
|
10
7
|
attachmentPickerMode: string;
|
|
11
8
|
}>>> & Readonly<{}>, {
|
|
12
|
-
className: string;
|
|
13
9
|
attachmentPickerMode: "collapsed" | "expanded";
|
|
14
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
11
|
export default _default;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, createBlock, withCtx, createVNode, createElementVNode, Fragment, renderList, resolveDynamicComponent, mergeProps } from "vue";
|
|
2
2
|
import { useUIKit, IconPlus } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
3
|
import { P as PopoverRoot_default, a as PopoverTrigger_default, b as PopoverPortal_default, c as PopoverContent_default } from "../../../PopoverTrigger-BKOIHfdS.js";
|
|
4
|
-
import { s as styles } from "../../../AttachmentPicker.module-
|
|
5
|
-
import { _ as _sfc_main$1 } from "../../../FilePicker.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as _sfc_main$2 } from "../../../ImagePicker.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as _sfc_main$3 } from "../../../VideoPicker.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
const _hoisted_1 = { class: "flex flex-col gap-2.5" };
|
|
4
|
+
import { s as styles } from "../../../AttachmentPicker.module-BesmtGyl.js";
|
|
5
|
+
import { _ as _sfc_main$1 } from "../../../FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js";
|
|
6
|
+
import { _ as _sfc_main$2 } from "../../../ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js";
|
|
7
|
+
import { _ as _sfc_main$3 } from "../../../VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js";
|
|
9
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
9
|
__name: "AttachmentPicker",
|
|
11
10
|
props: {
|
|
12
|
-
className: { default: "" },
|
|
13
11
|
attachmentPickerMode: { default: "collapsed" }
|
|
14
12
|
},
|
|
15
13
|
setup(__props) {
|
|
@@ -33,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
31
|
})));
|
|
34
32
|
return (_ctx, _cache) => {
|
|
35
33
|
return openBlock(), createElementBlock("div", {
|
|
36
|
-
class: normalizeClass([unref(styles)["attachment-picker"]
|
|
34
|
+
class: normalizeClass([unref(styles)["attachment-picker"]])
|
|
37
35
|
}, [
|
|
38
36
|
isCollapsed.value ? (openBlock(), createBlock(unref(PopoverRoot_default), { key: 0 }, {
|
|
39
37
|
default: withCtx(() => [
|
|
@@ -41,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
39
|
default: withCtx(() => [
|
|
42
40
|
createVNode(unref(IconPlus), {
|
|
43
41
|
class: normalizeClass(unref(styles)["attachment-picker__icon"]),
|
|
44
|
-
size: "
|
|
42
|
+
size: "20"
|
|
45
43
|
}, null, 8, ["class"])
|
|
46
44
|
]),
|
|
47
45
|
_: 1
|
|
@@ -51,19 +49,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
49
|
createVNode(unref(PopoverContent_default), {
|
|
52
50
|
side: "top",
|
|
53
51
|
align: "start",
|
|
54
|
-
"side-offset": 5
|
|
55
|
-
class: "rounded-lg p-5 w-[260px] bg-white shadow-sm border will-change-[transform,opacity] data-[state=open]:data-[side=top]:animate-slideDownAndFade data-[state=open]:data-[side=right]:animate-slideLeftAndFade data-[state=open]:data-[side=bottom]:animate-slideUpAndFade data-[state=open]:data-[side=left]:animate-slideRightAndFade"
|
|
52
|
+
"side-offset": 5
|
|
56
53
|
}, {
|
|
57
54
|
default: withCtx(() => [
|
|
58
|
-
createElementVNode("div",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
], 2)
|
|
66
|
-
])
|
|
55
|
+
createElementVNode("div", {
|
|
56
|
+
class: normalizeClass(unref(styles)["attachment-picker__popup"])
|
|
57
|
+
}, [
|
|
58
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(pickerItems.value, (picker, index) => {
|
|
59
|
+
return openBlock(), createBlock(resolveDynamicComponent(picker.Component), mergeProps({ key: index }, { ref_for: true }, picker.props), null, 16);
|
|
60
|
+
}), 128))
|
|
61
|
+
], 2)
|
|
67
62
|
]),
|
|
68
63
|
_: 1
|
|
69
64
|
})
|
|
@@ -7,9 +7,9 @@ import { useMessageInputState } from "../../../states/MessageInputState/MessageI
|
|
|
7
7
|
import { MessageContentType } from "../../../states/MessageInputState/type.js";
|
|
8
8
|
import { _ as _export_sfc } from "../../../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
9
9
|
const styles = {
|
|
10
|
-
"emoji-picker__icon": "_emoji-
|
|
11
|
-
"emoji-picker__list": "_emoji-
|
|
12
|
-
"emoji-picker__list-item": "_emoji-picker__list-
|
|
10
|
+
"emoji-picker__icon": "_emoji-picker__icon_z2wnx_1",
|
|
11
|
+
"emoji-picker__list": "_emoji-picker__list_z2wnx_5",
|
|
12
|
+
"emoji-picker__list-item": "_emoji-picker__list-item_z2wnx_16"
|
|
13
13
|
};
|
|
14
14
|
const _hoisted_1 = { class: "flex flex-col gap-2.5" };
|
|
15
15
|
const _hoisted_2 = ["onClick"];
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MessageInputProps } from './types';
|
|
2
2
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
headerToolbar?(_: {}): any;
|
|
5
5
|
leftInline?(_: {}): any;
|
|
6
|
+
textEditor?(_: {}): any;
|
|
7
|
+
inputPrefix?(_: {}): any;
|
|
8
|
+
inputSuffix?(_: {}): any;
|
|
6
9
|
rightInline?(_: {}): any;
|
|
7
10
|
footerToolbar?(_: {}): any;
|
|
8
11
|
};
|
|
9
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MessageInputProps>, {
|
|
10
13
|
autoFocus: boolean;
|
|
11
14
|
disabled: boolean;
|
|
12
15
|
hideSendButton: boolean;
|
|
13
16
|
placeholder: string;
|
|
14
|
-
className: string;
|
|
15
|
-
style: () => {};
|
|
16
17
|
attachmentPickerMode: string;
|
|
17
18
|
actions: () => string[];
|
|
18
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
19
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MessageInputProps>, {
|
|
19
20
|
autoFocus: boolean;
|
|
20
21
|
disabled: boolean;
|
|
21
22
|
hideSendButton: boolean;
|
|
22
23
|
placeholder: string;
|
|
23
|
-
className: string;
|
|
24
|
-
style: () => {};
|
|
25
24
|
attachmentPickerMode: string;
|
|
26
25
|
actions: () => string[];
|
|
27
26
|
}>>> & Readonly<{}>, {
|
|
28
|
-
style: import('vue').CSSProperties;
|
|
29
27
|
placeholder: string;
|
|
30
28
|
disabled: boolean;
|
|
31
|
-
className: string;
|
|
32
29
|
autoFocus: boolean;
|
|
33
30
|
actions: import('./types').MessageInputActions;
|
|
34
31
|
attachmentPickerMode: import('./types').MessageInputAttachmentPickerMode;
|
|
@@ -4,8 +4,8 @@ interface TextEditorProps {
|
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
}
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
inputPrefix?(_: {}): any;
|
|
8
|
+
inputSuffix?(_: {}): any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextEditorProps>, {
|
|
11
11
|
autoFocus: boolean;
|
|
@@ -24,12 +24,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
const { t } = useUIKit();
|
|
25
25
|
const { activeConversation } = useConversationListState();
|
|
26
26
|
const { updateRawValue, sendMessage, setEditorInstance, setContent } = useMessageInputState();
|
|
27
|
-
const
|
|
27
|
+
const editorDomRef = ref(null);
|
|
28
28
|
const isFocused = ref(props.autoFocus);
|
|
29
29
|
const placeholderText = computed(() => props.disabled ? "" : props.placeholder || t("MessageInput.enter_a_message"));
|
|
30
30
|
let editorInstance = null;
|
|
31
31
|
onMounted(() => {
|
|
32
|
-
const element =
|
|
32
|
+
const element = editorDomRef.value;
|
|
33
33
|
if (!element) {
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
onUnmounted(() => {
|
|
62
|
-
const element =
|
|
62
|
+
const element = editorDomRef.value;
|
|
63
63
|
if (editorInstance && element) {
|
|
64
64
|
editorInstance.destroy();
|
|
65
65
|
element.removeAttribute("data-editor-created");
|
|
@@ -71,6 +71,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
71
|
setContent("");
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
+
watch(() => props.disabled, (newDisabled) => {
|
|
75
|
+
if (editorInstance) {
|
|
76
|
+
editorInstance.setEditable(!newDisabled);
|
|
77
|
+
if (newDisabled) {
|
|
78
|
+
setContent("");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
74
82
|
return (_ctx, _cache) => {
|
|
75
83
|
return openBlock(), createElementBlock("div", {
|
|
76
84
|
class: normalizeClass([unref(styles)["input-wrapper"], props.disabled && unref(styles).disabled])
|
|
@@ -78,17 +86,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
86
|
createElementVNode("div", {
|
|
79
87
|
class: normalizeClass(unref(styles)["input-prefix"])
|
|
80
88
|
}, [
|
|
81
|
-
renderSlot(_ctx.$slots, "
|
|
89
|
+
renderSlot(_ctx.$slots, "inputPrefix")
|
|
82
90
|
], 2),
|
|
83
|
-
|
|
84
|
-
ref_key: "
|
|
85
|
-
ref:
|
|
91
|
+
(openBlock(), createElementBlock("div", {
|
|
92
|
+
ref_key: "editorDomRef",
|
|
93
|
+
ref: editorDomRef,
|
|
94
|
+
key: props.disabled ? "disabled" : "enabled",
|
|
86
95
|
class: normalizeClass(unref(styles)["editor"])
|
|
87
|
-
}, null, 2),
|
|
96
|
+
}, null, 2)),
|
|
88
97
|
createElementVNode("div", {
|
|
89
98
|
class: normalizeClass(unref(styles)["input-suffix"])
|
|
90
99
|
}, [
|
|
91
|
-
renderSlot(_ctx.$slots, "
|
|
100
|
+
renderSlot(_ctx.$slots, "inputSuffix")
|
|
92
101
|
], 2)
|
|
93
102
|
], 2);
|
|
94
103
|
};
|