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,11 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
"attachment-picker": "_attachment-picker_1bduq_1",
|
|
3
|
+
"attachment-picker__icon": "_attachment-picker__icon_1bduq_5",
|
|
4
|
+
"attachment-picker__popup": "_attachment-picker__popup_1bduq_9",
|
|
5
|
+
"attachment-picker--expanded": "_attachment-picker--expanded_1bduq_19",
|
|
6
|
+
"attachment-picker__item": "_attachment-picker__item_1bduq_24",
|
|
7
|
+
"attachment-picker__item-icon": "_attachment-picker__item-icon_1bduq_48"
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
styles as s
|
|
11
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent, ref, createBlock, openBlock, unref, withCtx, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, createVNode, toDisplayString } from "vue";
|
|
2
|
+
import { IconFile } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { View as _sfc_main$1 } from "./baseComp/View/index.js";
|
|
4
|
+
import { s as styles } from "./AttachmentPicker.module-BesmtGyl.js";
|
|
5
|
+
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
6
|
+
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
7
|
+
const _hoisted_1 = ["accept"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "FilePicker",
|
|
10
|
+
props: {
|
|
11
|
+
label: { default: "" },
|
|
12
|
+
iconSize: { default: 24 },
|
|
13
|
+
onClose: { type: Function, default: () => {
|
|
14
|
+
} },
|
|
15
|
+
className: { default: "" },
|
|
16
|
+
style: { default: void 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const PICKER_CONSTANTS = {
|
|
20
|
+
ACCEPT_TYPE: "*/*"
|
|
21
|
+
};
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { sendMessage } = useMessageInputState();
|
|
24
|
+
const fileInputRef = ref(null);
|
|
25
|
+
function handleButtonClick() {
|
|
26
|
+
var _a;
|
|
27
|
+
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
28
|
+
}
|
|
29
|
+
function handleFileInput(e) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const target = e.target;
|
|
32
|
+
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
33
|
+
if (!file) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
sendMessage([{ type: MessageContentType.FILE, content: file }]);
|
|
37
|
+
target.value = "";
|
|
38
|
+
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
39
|
+
}
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return openBlock(), createBlock(unref(_sfc_main$1), null, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
46
|
+
style: normalizeStyle(_ctx.style),
|
|
47
|
+
onClick: handleButtonClick
|
|
48
|
+
}, [
|
|
49
|
+
createVNode(unref(IconFile), {
|
|
50
|
+
size: _ctx.iconSize,
|
|
51
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
52
|
+
}, null, 8, ["size", "class"]),
|
|
53
|
+
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
54
|
+
], 6)) : (openBlock(), createBlock(unref(IconFile), {
|
|
55
|
+
key: 1,
|
|
56
|
+
size: _ctx.iconSize,
|
|
57
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
58
|
+
onClick: handleButtonClick
|
|
59
|
+
}, null, 8, ["size", "class"])),
|
|
60
|
+
createElementVNode("input", {
|
|
61
|
+
ref_key: "fileInputRef",
|
|
62
|
+
ref: fileInputRef,
|
|
63
|
+
type: "file",
|
|
64
|
+
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
65
|
+
hidden: "",
|
|
66
|
+
onChange: handleFileInput
|
|
67
|
+
}, null, 40, _hoisted_1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
_sfc_main as _
|
|
76
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent, ref, createBlock, openBlock, unref, withCtx, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, createVNode, toDisplayString } from "vue";
|
|
2
|
+
import { IconImage } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { View as _sfc_main$1 } from "./baseComp/View/index.js";
|
|
4
|
+
import { s as styles } from "./AttachmentPicker.module-BesmtGyl.js";
|
|
5
|
+
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
6
|
+
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
7
|
+
const _hoisted_1 = ["accept"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "ImagePicker",
|
|
10
|
+
props: {
|
|
11
|
+
label: { default: "" },
|
|
12
|
+
iconSize: { default: 24 },
|
|
13
|
+
onClose: { type: Function, default: () => {
|
|
14
|
+
} },
|
|
15
|
+
className: { default: "" },
|
|
16
|
+
style: { default: void 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const PICKER_CONSTANTS = {
|
|
20
|
+
ACCEPT_TYPE: ".jpg,.jpeg,.gif,.png,.bmp,.webp"
|
|
21
|
+
};
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { sendMessage } = useMessageInputState();
|
|
24
|
+
const fileInputRef = ref(null);
|
|
25
|
+
function handleButtonClick() {
|
|
26
|
+
var _a;
|
|
27
|
+
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
28
|
+
}
|
|
29
|
+
function handleFileInput(e) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const target = e.target;
|
|
32
|
+
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
33
|
+
if (!file) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
sendMessage([{ type: MessageContentType.IMAGE, content: file }]);
|
|
37
|
+
target.value = "";
|
|
38
|
+
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
39
|
+
}
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return openBlock(), createBlock(unref(_sfc_main$1), null, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
46
|
+
style: normalizeStyle(_ctx.style),
|
|
47
|
+
onClick: handleButtonClick
|
|
48
|
+
}, [
|
|
49
|
+
createVNode(unref(IconImage), {
|
|
50
|
+
size: _ctx.iconSize,
|
|
51
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
52
|
+
}, null, 8, ["size", "class"]),
|
|
53
|
+
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
54
|
+
], 6)) : (openBlock(), createBlock(unref(IconImage), {
|
|
55
|
+
key: 1,
|
|
56
|
+
size: _ctx.iconSize,
|
|
57
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
58
|
+
onClick: handleButtonClick
|
|
59
|
+
}, null, 8, ["size", "class"])),
|
|
60
|
+
createElementVNode("input", {
|
|
61
|
+
ref_key: "fileInputRef",
|
|
62
|
+
ref: fileInputRef,
|
|
63
|
+
type: "file",
|
|
64
|
+
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
65
|
+
hidden: "",
|
|
66
|
+
onChange: handleFileInput
|
|
67
|
+
}, null, 40, _hoisted_1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
_sfc_main as _
|
|
76
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, createVNode, withCtx, createCommentVNode } from "vue";
|
|
2
2
|
import { AttachmentPicker as _sfc_main$1 } from "./components/MessageInput/AttachmentPicker/index.js";
|
|
3
|
-
import { _ as _sfc_main$5 } from "./FilePicker.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { _ as _sfc_main$6 } from "./ImagePicker.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as _sfc_main$7 } from "./VideoPicker.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as _sfc_main$5 } from "./FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js";
|
|
4
|
+
import { _ as _sfc_main$6 } from "./ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js";
|
|
5
|
+
import { _ as _sfc_main$7 } from "./VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js";
|
|
6
6
|
import EmojiPickerComponent from "./components/MessageInput/EmojiPicker/EmojiPicker.js";
|
|
7
7
|
import { QuotedMessagePreview as _sfc_main$2 } from "./components/MessageInput/QuotedMessagePreview/index.js";
|
|
8
8
|
import { SendButton as _sfc_main$4 } from "./components/MessageInput/SendButton/index.js";
|
|
@@ -24,8 +24,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
disabled: { type: Boolean, default: false },
|
|
25
25
|
hideSendButton: { type: Boolean, default: false },
|
|
26
26
|
placeholder: { default: "" },
|
|
27
|
-
className: { default: "" },
|
|
28
|
-
style: { default: () => ({}) },
|
|
29
27
|
attachmentPickerMode: { default: "collapsed" },
|
|
30
28
|
actions: { default: () => ["EmojiPicker", "ImagePicker", "FilePicker", "VideoPicker"] },
|
|
31
29
|
slots: {}
|
|
@@ -66,10 +64,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
66
64
|
}
|
|
67
65
|
};
|
|
68
66
|
return (_ctx, _cache) => {
|
|
69
|
-
var _a, _b;
|
|
70
67
|
return openBlock(), createElementBlock("div", {
|
|
71
|
-
class: normalizeClass([unref(styles)["message-input"]
|
|
72
|
-
style: normalizeStyle(_ctx.style)
|
|
68
|
+
class: normalizeClass([unref(styles)["message-input"]])
|
|
73
69
|
}, [
|
|
74
70
|
renderSlot(_ctx.$slots, "headerToolbar", {}, () => [
|
|
75
71
|
createElementVNode("div", {
|
|
@@ -89,13 +85,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
85
|
}, [
|
|
90
86
|
renderSlot(_ctx.$slots, "leftInline")
|
|
91
87
|
], 2),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
renderSlot(_ctx.$slots, "textEditor", {}, () => [
|
|
89
|
+
(openBlock(), createBlock(unref(_sfc_main$3), {
|
|
90
|
+
autoFocus: _ctx.autoFocus,
|
|
91
|
+
disabled: _ctx.disabled,
|
|
92
|
+
placeholder: _ctx.placeholder,
|
|
93
|
+
key: _ctx.disabled ? "disabled-editor" : "enabled-editor"
|
|
94
|
+
}, {
|
|
95
|
+
inputPrefix: withCtx(() => [
|
|
96
|
+
renderSlot(_ctx.$slots, "inputPrefix")
|
|
97
|
+
]),
|
|
98
|
+
inputSuffix: withCtx(() => [
|
|
99
|
+
renderSlot(_ctx.$slots, "inputSuffix")
|
|
100
|
+
]),
|
|
101
|
+
_: 3
|
|
102
|
+
}, 8, ["autoFocus", "disabled", "placeholder"]))
|
|
103
|
+
]),
|
|
99
104
|
createElementVNode("div", {
|
|
100
105
|
class: normalizeClass(unref(styles)["message-input__rightInline"])
|
|
101
106
|
}, [
|
|
@@ -109,12 +114,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
114
|
!_ctx.hideSendButton ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
110
115
|
key: 0,
|
|
111
116
|
class: normalizeClass(unref(styles)["message-input__send-button"]),
|
|
112
|
-
disabled:
|
|
117
|
+
disabled: props.disabled,
|
|
113
118
|
onClick: sendInputMessage
|
|
114
119
|
}, null, 8, ["class", "disabled"])) : createCommentVNode("", true)
|
|
115
120
|
], 2)
|
|
116
121
|
])
|
|
117
|
-
],
|
|
122
|
+
], 2);
|
|
118
123
|
};
|
|
119
124
|
}
|
|
120
125
|
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent, ref, createBlock, openBlock, unref, withCtx, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, createVNode, toDisplayString } from "vue";
|
|
2
|
+
import { IconVideo } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { View as _sfc_main$1 } from "./baseComp/View/index.js";
|
|
4
|
+
import { s as styles } from "./AttachmentPicker.module-BesmtGyl.js";
|
|
5
|
+
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
6
|
+
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
7
|
+
const _hoisted_1 = ["accept"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "VideoPicker",
|
|
10
|
+
props: {
|
|
11
|
+
label: { default: "" },
|
|
12
|
+
iconSize: { default: 24 },
|
|
13
|
+
onClose: { type: Function, default: () => {
|
|
14
|
+
} },
|
|
15
|
+
className: { default: "" },
|
|
16
|
+
style: { default: void 0 }
|
|
17
|
+
},
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const PICKER_CONSTANTS = {
|
|
20
|
+
ACCEPT_TYPE: ".mp4,.mov,.qt"
|
|
21
|
+
};
|
|
22
|
+
const props = __props;
|
|
23
|
+
const { sendMessage } = useMessageInputState();
|
|
24
|
+
const fileInputRef = ref(null);
|
|
25
|
+
function handleButtonClick() {
|
|
26
|
+
var _a;
|
|
27
|
+
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
28
|
+
}
|
|
29
|
+
function handleFileInput(e) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const target = e.target;
|
|
32
|
+
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
33
|
+
if (!file) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
sendMessage([{ type: MessageContentType.VIDEO, content: file }]);
|
|
37
|
+
target.value = "";
|
|
38
|
+
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
39
|
+
}
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return openBlock(), createBlock(unref(_sfc_main$1), null, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
46
|
+
style: normalizeStyle(_ctx.style),
|
|
47
|
+
onClick: handleButtonClick
|
|
48
|
+
}, [
|
|
49
|
+
createVNode(unref(IconVideo), {
|
|
50
|
+
size: _ctx.iconSize,
|
|
51
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
52
|
+
}, null, 8, ["size", "class"]),
|
|
53
|
+
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
54
|
+
], 6)) : (openBlock(), createBlock(unref(IconVideo), {
|
|
55
|
+
key: 1,
|
|
56
|
+
size: _ctx.iconSize,
|
|
57
|
+
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
58
|
+
onClick: handleButtonClick
|
|
59
|
+
}, null, 8, ["size", "class"])),
|
|
60
|
+
createElementVNode("input", {
|
|
61
|
+
ref_key: "fileInputRef",
|
|
62
|
+
ref: fileInputRef,
|
|
63
|
+
type: "file",
|
|
64
|
+
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
65
|
+
hidden: "",
|
|
66
|
+
onChange: handleFileInput
|
|
67
|
+
}, null, 40, _hoisted_1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
_sfc_main as _
|
|
76
|
+
};
|