tuikit-atomicx-vue3 3.3.0-beta.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/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 +1275 -3559
- 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/LiveCoreView/index.vue +144 -78
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// List item data structure
|
|
2
|
-
export interface
|
|
2
|
+
export interface UserPickerRow<T = unknown> {
|
|
3
3
|
key: string; // Unique identifier
|
|
4
4
|
label: string; // Display name
|
|
5
5
|
avatarUrl?: string | undefined; // Avatar URL
|
|
@@ -7,21 +7,21 @@ export interface IUserPickerRow<T = unknown> {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// Tree node data structure
|
|
10
|
-
export interface
|
|
10
|
+
export interface UserPickerNode<T = unknown> {
|
|
11
11
|
key: string; // Unique identifier
|
|
12
12
|
label: string; // Display name
|
|
13
13
|
isLeafNode: boolean; // Whether is leaf node
|
|
14
14
|
avatarUrl?: string | undefined; // Avatar URL
|
|
15
15
|
lazyLoad?: boolean; // Whether supports lazy loading
|
|
16
|
-
children?: Array<
|
|
16
|
+
children?: Array<UserPickerNode<T>>; // Child nodes
|
|
17
17
|
extraData?: T | undefined; // Extended data
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// Data source type
|
|
21
|
-
export type
|
|
21
|
+
export type UserPickerDataSource<T = unknown> = Array<UserPickerRow<T>> | Array<UserPickerNode<T>>;
|
|
22
22
|
|
|
23
23
|
// Selection result item type
|
|
24
|
-
export interface
|
|
24
|
+
export interface UserPickerResultItem<T = unknown> {
|
|
25
25
|
key: string;
|
|
26
26
|
label: string;
|
|
27
27
|
avatarUrl?: string | undefined;
|
|
@@ -31,18 +31,18 @@ export interface IUserPickerResultItem<T = unknown> {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Selection result type
|
|
34
|
-
export type
|
|
34
|
+
export type UserPickerResult<T = unknown> = Array<UserPickerResultItem<T>>;
|
|
35
35
|
|
|
36
36
|
// Component props interface
|
|
37
|
-
export interface
|
|
37
|
+
export interface UserPickerProps<T = unknown> {
|
|
38
38
|
// Basic properties
|
|
39
39
|
displayMode: 'list' | 'tree'; // Display mode
|
|
40
|
-
dataSource:
|
|
40
|
+
dataSource: UserPickerDataSource<T>; // Data source
|
|
41
41
|
defaultSelectedItems?: Array<{ key: string; [key: string]: any }>;
|
|
42
42
|
lockedItems?: Array<{ key: string; [key: string]: any }>;
|
|
43
43
|
maxCount?: number | undefined;
|
|
44
44
|
minCount?: number | undefined;
|
|
45
|
-
onMaxCountExceed?: (selectedItems:
|
|
45
|
+
onMaxCountExceed?: (selectedItems: UserPickerResult<T>) => void;
|
|
46
46
|
|
|
47
47
|
// Search related
|
|
48
48
|
enableSearch?: boolean; // Whether to enable search
|
|
@@ -50,31 +50,31 @@ export interface IUserPickerProps<T = unknown> {
|
|
|
50
50
|
onSearch?: (value: string) => void; // Search callback
|
|
51
51
|
|
|
52
52
|
// Custom rendering
|
|
53
|
-
renderItem?: (data:
|
|
53
|
+
renderItem?: (data: UserPickerRow<T> | UserPickerNode<T>) => any; // Vue render function or component
|
|
54
54
|
|
|
55
55
|
// Event callbacks
|
|
56
|
-
onSelectedChange?: (selectedItems:
|
|
56
|
+
onSelectedChange?: (selectedItems: UserPickerResult<T>) => void; // Selection change callback
|
|
57
57
|
onReachEnd?: () => void; // List scroll to bottom callback (list mode)
|
|
58
58
|
|
|
59
59
|
// Tree mode specific properties
|
|
60
|
-
onExpand?: (node:
|
|
60
|
+
onExpand?: (node: UserPickerNode<T>) => void; // Expand callback for lazy loading child items
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// Component ref interface
|
|
64
|
-
export interface
|
|
65
|
-
getSelectedItems: () =>
|
|
66
|
-
updateListData: (newDataSource: Array<
|
|
67
|
-
updateTreeData: (key: string, partialNewNode: Partial<
|
|
64
|
+
export interface UserPickerRef<T = unknown> {
|
|
65
|
+
getSelectedItems: () => UserPickerResult<T>; // Get currently selected items
|
|
66
|
+
updateListData: (newDataSource: Array<UserPickerRow<T>>) => void; // Update list data
|
|
67
|
+
updateTreeData: (key: string, partialNewNode: Partial<UserPickerNode<T>>) => void; // Update tree data
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
// Selection state type (for internal state management)
|
|
71
|
-
export interface
|
|
71
|
+
export interface SelectionState {
|
|
72
72
|
selectedKeys: Set<string>;
|
|
73
73
|
halfSelectedKeys?: Set<string>; // Only valid in tree mode
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
// Tree node state type (for internal state management)
|
|
77
|
-
export interface
|
|
77
|
+
export interface TreeState {
|
|
78
78
|
expandedKeys: Set<string>;
|
|
79
79
|
loadingKeys: Set<string>;
|
|
80
80
|
}
|
package/src/types/contact.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
import type { GroupModel } from './engine';
|
|
2
3
|
import type TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
3
4
|
|
|
@@ -180,10 +181,10 @@ export interface ContactListProps {
|
|
|
180
181
|
searchPlaceholder?: string;
|
|
181
182
|
emptyText?: string;
|
|
182
183
|
|
|
183
|
-
ContactItem?:
|
|
184
|
-
ContactSearchComponent?:
|
|
185
|
-
GroupHeader?:
|
|
186
|
-
PlaceholderEmptyList?:
|
|
184
|
+
ContactItem?: Component;
|
|
185
|
+
ContactSearchComponent?: Component;
|
|
186
|
+
GroupHeader?: Component;
|
|
187
|
+
PlaceholderEmptyList?: Component;
|
|
187
188
|
|
|
188
189
|
onContactItemClick?: (item: ContactGroupItem) => void;
|
|
189
190
|
onFriendApplicationAction?: (action: 'accept' | 'refuse', application: FriendApplication) => void;
|
|
@@ -197,14 +198,14 @@ export interface ContactInfoBaseProps {
|
|
|
197
198
|
|
|
198
199
|
export interface ContactInfoProps extends ContactInfoBaseProps {
|
|
199
200
|
contactItem?: ContactGroupItem | undefined;
|
|
200
|
-
PlaceholderEmpty?:
|
|
201
|
-
FriendInfoComponent?:
|
|
202
|
-
GroupInfoComponent?:
|
|
203
|
-
BlacklistInfoComponent?:
|
|
204
|
-
FriendApplicationInfoComponent?:
|
|
205
|
-
GroupApplicationInfoComponent?:
|
|
206
|
-
SearchGroupInfoComponent?:
|
|
207
|
-
SearchUserInfoComponent?:
|
|
201
|
+
PlaceholderEmpty?: Component;
|
|
202
|
+
FriendInfoComponent?: Component;
|
|
203
|
+
GroupInfoComponent?: Component;
|
|
204
|
+
BlacklistInfoComponent?: Component;
|
|
205
|
+
FriendApplicationInfoComponent?: Component;
|
|
206
|
+
GroupApplicationInfoComponent?: Component;
|
|
207
|
+
SearchGroupInfoComponent?: Component;
|
|
208
|
+
SearchUserInfoComponent?: Component;
|
|
208
209
|
onSendMessage?: (friend: Friend) => void;
|
|
209
210
|
onDeleteFriend?: (friend: Friend) => void;
|
|
210
211
|
onUpdateFriendRemark?: (friend: Friend, remark: string) => void;
|
|
@@ -26,11 +26,11 @@ export interface ConversationListProps {
|
|
|
26
26
|
/** Specifies a vue component to customize the conversation actions in conversation preview. */
|
|
27
27
|
ConversationActions?: Component<ConversationActionsProps>;
|
|
28
28
|
/** Specifies a vue component to display when the chat list is empty. */
|
|
29
|
-
PlaceholderEmptyList?:
|
|
29
|
+
PlaceholderEmptyList?: Component;
|
|
30
30
|
/** Specifies a vue component to display while the chat list is loading. */
|
|
31
|
-
PlaceholderLoading?:
|
|
31
|
+
PlaceholderLoading?: Component;
|
|
32
32
|
/** Specifies a vue component to display when there is an error loading the chat list. */
|
|
33
|
-
PlaceholderLoadError?:
|
|
33
|
+
PlaceholderLoadError?: Component;
|
|
34
34
|
/** Specifies a vue component to customize the avatar in list. */
|
|
35
35
|
Avatar?: Component<AvatarProps>;
|
|
36
36
|
/** Specifies a function to filter conversations in the conversation list. */
|
|
@@ -74,11 +74,11 @@ export interface ConversationListContentProps {
|
|
|
74
74
|
/** Indicates whether there was an error loading the chat list */
|
|
75
75
|
error?: boolean;
|
|
76
76
|
/** A custom component to display when the chat list is empty */
|
|
77
|
-
PlaceholderEmptyList?:
|
|
77
|
+
PlaceholderEmptyList?: Component;
|
|
78
78
|
/** A custom component to display while the chat list is loading */
|
|
79
|
-
PlaceholderLoading?:
|
|
79
|
+
PlaceholderLoading?: Component;
|
|
80
80
|
/** A custom component to display when there is an error loading the chat list */
|
|
81
|
-
PlaceholderLoadError?:
|
|
81
|
+
PlaceholderLoadError?: Component;
|
|
82
82
|
/** The custom class name */
|
|
83
83
|
className?: string;
|
|
84
84
|
/** The custom class style */
|
|
@@ -92,18 +92,16 @@ export interface ConversationPreviewUIProps {
|
|
|
92
92
|
isSelected?: boolean;
|
|
93
93
|
/** Whether to show the ConversationActions */
|
|
94
94
|
enableActions?: boolean;
|
|
95
|
-
/** The string to be highlighted in the title */
|
|
96
|
-
highlightMatchString?: string;
|
|
97
95
|
/** The custom Avatar component */
|
|
98
96
|
Avatar?: Component<AvatarProps>;
|
|
99
97
|
/** The custom Title component */
|
|
100
|
-
Title?: string |
|
|
98
|
+
Title?: string | Component;
|
|
101
99
|
/** The custom last message abstract component */
|
|
102
|
-
LastMessageAbstract?: string |
|
|
100
|
+
LastMessageAbstract?: string | Component;
|
|
103
101
|
/** The custom last message abstract component */
|
|
104
|
-
LastMessageTimestamp?: string |
|
|
102
|
+
LastMessageTimestamp?: string | Component;
|
|
105
103
|
/** The custom Unread component */
|
|
106
|
-
Unread?: string |
|
|
104
|
+
Unread?: string | Component;
|
|
107
105
|
/** The custom ConversationActions component */
|
|
108
106
|
ConversationActions?: Component<ConversationActionsProps>;
|
|
109
107
|
/** Callback when the user click a conversation from conversation list */
|
|
@@ -162,9 +160,9 @@ export interface ConversationActionsConfig extends ConversationActionsBaseConfig
|
|
|
162
160
|
*/
|
|
163
161
|
customConversationActions?: Record<string, ConversationActionItem>;
|
|
164
162
|
/** The icon vue element to be displayed in the action popup. */
|
|
165
|
-
PopupIcon?:
|
|
163
|
+
PopupIcon?: Component;
|
|
166
164
|
/** An array of vue elements to be displayed in the action popup. */
|
|
167
|
-
PopupElements?:
|
|
165
|
+
PopupElements?: Component[];
|
|
168
166
|
/** The function to be called when the action popup is clicked. */
|
|
169
167
|
onClick?: (e: Event, key?: string, conversation?: ConversationModel) => void;
|
|
170
168
|
/** Function to be called when the actions modal is closed (H5 only). */
|
package/src/types/engine.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
|
|
2
|
+
|
|
1
3
|
export type {
|
|
2
4
|
IConversationModel as ConversationModel,
|
|
3
5
|
ISearchResult as SearchResult,
|
|
@@ -16,3 +18,16 @@ export enum SearchType {
|
|
|
16
18
|
USER = 'user',
|
|
17
19
|
GROUP = 'group',
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
export enum MessageType {
|
|
23
|
+
TEXT = TUIChatEngine.TYPES.MSG_TEXT,
|
|
24
|
+
IMAGE = TUIChatEngine.TYPES.MSG_IMAGE,
|
|
25
|
+
AUDIO = TUIChatEngine.TYPES.MSG_AUDIO,
|
|
26
|
+
VIDEO = TUIChatEngine.TYPES.MSG_VIDEO,
|
|
27
|
+
FILE = TUIChatEngine.TYPES.MSG_FILE,
|
|
28
|
+
FACE = TUIChatEngine.TYPES.MSG_FACE,
|
|
29
|
+
LOCATION = TUIChatEngine.TYPES.MSG_LOCATION,
|
|
30
|
+
GRP_TIP = TUIChatEngine.TYPES.MSG_GRP_TIP,
|
|
31
|
+
CUSTOM = TUIChatEngine.TYPES.MSG_CUSTOM,
|
|
32
|
+
MERGER = TUIChatEngine.TYPES.MSG_MERGER,
|
|
33
|
+
}
|
package/src/utils/json.ts
CHANGED
|
@@ -43,7 +43,6 @@ export function safeJSONParse<T>(
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
try {
|
|
46
|
-
// 处理一些常见的错误输入
|
|
47
46
|
const trimmed = text.trim();
|
|
48
47
|
if (!trimmed) {
|
|
49
48
|
return defaultValue;
|
|
@@ -55,17 +54,14 @@ export function safeJSONParse<T>(
|
|
|
55
54
|
return null as T;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
// 尝试解析 JSON
|
|
59
57
|
const parsed = JSON.parse(trimmed, reviver);
|
|
60
58
|
|
|
61
|
-
// 验证解析结果是否为有效值
|
|
62
59
|
if (parsed === undefined || parsed === null) {
|
|
63
60
|
return defaultValue;
|
|
64
61
|
}
|
|
65
62
|
|
|
66
63
|
return parsed;
|
|
67
64
|
} catch (error) {
|
|
68
|
-
console.warn('JSON parse failed:', error);
|
|
69
65
|
return defaultValue;
|
|
70
66
|
}
|
|
71
67
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const styles = {
|
|
2
|
-
"attachment-picker": "_attachment-picker_1b1ig_1",
|
|
3
|
-
"attachment-picker__icon": "_attachment-picker__icon_1b1ig_5",
|
|
4
|
-
"attachment-picker__popup": "_attachment-picker__popup_1b1ig_8",
|
|
5
|
-
"attachment-picker--expanded": "_attachment-picker--expanded_1b1ig_18",
|
|
6
|
-
"attachment-picker__item": "_attachment-picker__item_1b1ig_22",
|
|
7
|
-
"attachment-picker__item-icon": "_attachment-picker__item-icon_1b1ig_45"
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
styles as s
|
|
11
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, createElementBlock, openBlock, createBlock, createElementVNode, normalizeStyle, normalizeClass, unref, createVNode, toDisplayString } from "vue";
|
|
2
|
-
import { IconFile } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
-
import { s as styles } from "./AttachmentPicker.module-0_DWsAtr.js";
|
|
4
|
-
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
5
|
-
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
6
|
-
const _hoisted_1 = ["accept"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "FilePicker",
|
|
9
|
-
props: {
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
iconSize: { default: 24 },
|
|
12
|
-
onClose: { type: Function, default: () => {
|
|
13
|
-
} },
|
|
14
|
-
className: { default: "" },
|
|
15
|
-
style: { default: void 0 }
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const PICKER_CONSTANTS = {
|
|
19
|
-
ACCEPT_TYPE: "*/*"
|
|
20
|
-
};
|
|
21
|
-
const props = __props;
|
|
22
|
-
const { sendMessage } = useMessageInputState();
|
|
23
|
-
const fileInputRef = ref(null);
|
|
24
|
-
function handleButtonClick() {
|
|
25
|
-
var _a;
|
|
26
|
-
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
27
|
-
}
|
|
28
|
-
function handleFileInput(e) {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const target = e.target;
|
|
31
|
-
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
32
|
-
if (!file) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
sendMessage([{ type: MessageContentType.FILE, content: file }]);
|
|
36
|
-
target.value = "";
|
|
37
|
-
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
38
|
-
}
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", null, [
|
|
41
|
-
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
44
|
-
style: normalizeStyle(_ctx.style),
|
|
45
|
-
onClick: handleButtonClick
|
|
46
|
-
}, [
|
|
47
|
-
createVNode(unref(IconFile), {
|
|
48
|
-
size: _ctx.iconSize,
|
|
49
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
50
|
-
}, null, 8, ["size", "class"]),
|
|
51
|
-
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
52
|
-
], 6)) : (openBlock(), createBlock(unref(IconFile), {
|
|
53
|
-
key: 1,
|
|
54
|
-
size: _ctx.iconSize,
|
|
55
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
56
|
-
onClick: handleButtonClick
|
|
57
|
-
}, null, 8, ["size", "class"])),
|
|
58
|
-
createElementVNode("input", {
|
|
59
|
-
ref_key: "fileInputRef",
|
|
60
|
-
ref: fileInputRef,
|
|
61
|
-
type: "file",
|
|
62
|
-
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
63
|
-
hidden: "",
|
|
64
|
-
onChange: handleFileInput
|
|
65
|
-
}, null, 40, _hoisted_1)
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
_sfc_main as _
|
|
72
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, createElementBlock, openBlock, createBlock, createElementVNode, normalizeStyle, normalizeClass, unref, createVNode, toDisplayString } from "vue";
|
|
2
|
-
import { IconImage } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
-
import { s as styles } from "./AttachmentPicker.module-0_DWsAtr.js";
|
|
4
|
-
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
5
|
-
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
6
|
-
const _hoisted_1 = ["accept"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "ImagePicker",
|
|
9
|
-
props: {
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
iconSize: { default: 24 },
|
|
12
|
-
onClose: { type: Function, default: () => {
|
|
13
|
-
} },
|
|
14
|
-
className: { default: "" },
|
|
15
|
-
style: { default: void 0 }
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const PICKER_CONSTANTS = {
|
|
19
|
-
ACCEPT_TYPE: ".jpg,.jpeg,.gif,.png,.bmp,.webp"
|
|
20
|
-
};
|
|
21
|
-
const props = __props;
|
|
22
|
-
const { sendMessage } = useMessageInputState();
|
|
23
|
-
const fileInputRef = ref(null);
|
|
24
|
-
function handleButtonClick() {
|
|
25
|
-
var _a;
|
|
26
|
-
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
27
|
-
}
|
|
28
|
-
function handleFileInput(e) {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const target = e.target;
|
|
31
|
-
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
32
|
-
if (!file) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
sendMessage([{ type: MessageContentType.IMAGE, content: file }]);
|
|
36
|
-
target.value = "";
|
|
37
|
-
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
38
|
-
}
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", null, [
|
|
41
|
-
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
44
|
-
style: normalizeStyle(_ctx.style),
|
|
45
|
-
onClick: handleButtonClick
|
|
46
|
-
}, [
|
|
47
|
-
createVNode(unref(IconImage), {
|
|
48
|
-
size: _ctx.iconSize,
|
|
49
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
50
|
-
}, null, 8, ["size", "class"]),
|
|
51
|
-
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
52
|
-
], 6)) : (openBlock(), createBlock(unref(IconImage), {
|
|
53
|
-
key: 1,
|
|
54
|
-
size: _ctx.iconSize,
|
|
55
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
56
|
-
onClick: handleButtonClick
|
|
57
|
-
}, null, 8, ["size", "class"])),
|
|
58
|
-
createElementVNode("input", {
|
|
59
|
-
ref_key: "fileInputRef",
|
|
60
|
-
ref: fileInputRef,
|
|
61
|
-
type: "file",
|
|
62
|
-
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
63
|
-
hidden: "",
|
|
64
|
-
onChange: handleFileInput
|
|
65
|
-
}, null, 40, _hoisted_1)
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
_sfc_main as _
|
|
72
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, createElementBlock, openBlock, createBlock, createElementVNode, normalizeStyle, normalizeClass, unref, createVNode, toDisplayString } from "vue";
|
|
2
|
-
import { IconVideo } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
-
import { s as styles } from "./AttachmentPicker.module-0_DWsAtr.js";
|
|
4
|
-
import { useMessageInputState } from "./states/MessageInputState/MessageInputState.js";
|
|
5
|
-
import { MessageContentType } from "./states/MessageInputState/type.js";
|
|
6
|
-
const _hoisted_1 = ["accept"];
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "VideoPicker",
|
|
9
|
-
props: {
|
|
10
|
-
label: { default: "" },
|
|
11
|
-
iconSize: { default: 24 },
|
|
12
|
-
onClose: { type: Function, default: () => {
|
|
13
|
-
} },
|
|
14
|
-
className: { default: "" },
|
|
15
|
-
style: { default: void 0 }
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const PICKER_CONSTANTS = {
|
|
19
|
-
ACCEPT_TYPE: ".mp4,.mov,.qt"
|
|
20
|
-
};
|
|
21
|
-
const props = __props;
|
|
22
|
-
const { sendMessage } = useMessageInputState();
|
|
23
|
-
const fileInputRef = ref(null);
|
|
24
|
-
function handleButtonClick() {
|
|
25
|
-
var _a;
|
|
26
|
-
(_a = fileInputRef.value) == null ? void 0 : _a.click();
|
|
27
|
-
}
|
|
28
|
-
function handleFileInput(e) {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const target = e.target;
|
|
31
|
-
const file = (_a = target.files) == null ? void 0 : _a[0];
|
|
32
|
-
if (!file) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
sendMessage([{ type: MessageContentType.VIDEO, content: file }]);
|
|
36
|
-
target.value = "";
|
|
37
|
-
(_b = props.onClose) == null ? void 0 : _b.call(props);
|
|
38
|
-
}
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", null, [
|
|
41
|
-
_ctx.label ? (openBlock(), createElementBlock("button", {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass([unref(styles)["attachment-picker__item"], _ctx.className]),
|
|
44
|
-
style: normalizeStyle(_ctx.style),
|
|
45
|
-
onClick: handleButtonClick
|
|
46
|
-
}, [
|
|
47
|
-
createVNode(unref(IconVideo), {
|
|
48
|
-
size: _ctx.iconSize,
|
|
49
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"])
|
|
50
|
-
}, null, 8, ["size", "class"]),
|
|
51
|
-
createElementVNode("div", null, toDisplayString(_ctx.label), 1)
|
|
52
|
-
], 6)) : (openBlock(), createBlock(unref(IconVideo), {
|
|
53
|
-
key: 1,
|
|
54
|
-
size: _ctx.iconSize,
|
|
55
|
-
class: normalizeClass(unref(styles)["attachment-picker__item-icon"]),
|
|
56
|
-
onClick: handleButtonClick
|
|
57
|
-
}, null, 8, ["size", "class"])),
|
|
58
|
-
createElementVNode("input", {
|
|
59
|
-
ref_key: "fileInputRef",
|
|
60
|
-
ref: fileInputRef,
|
|
61
|
-
type: "file",
|
|
62
|
-
accept: PICKER_CONSTANTS.ACCEPT_TYPE,
|
|
63
|
-
hidden: "",
|
|
64
|
-
onChange: handleFileInput
|
|
65
|
-
}, null, 40, _hoisted_1)
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
_sfc_main as _
|
|
72
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
interface UIOpenControlState {
|
|
4
|
-
isChatSettingOpen: Ref<boolean>;
|
|
5
|
-
isChatSearchOpen: Ref<boolean>;
|
|
6
|
-
}
|
|
7
|
-
interface UIOpenControlAction {
|
|
8
|
-
toggleChatSetting: () => void;
|
|
9
|
-
setChatSettingOpen: (open: boolean) => void;
|
|
10
|
-
toggleChatSearch: () => void;
|
|
11
|
-
setChatSearchOpen: (open: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
declare function useUIOpenControlState(): UIOpenControlState & UIOpenControlAction;
|
|
14
|
-
export { useUIOpenControlState, };
|
|
15
|
-
export type { UIOpenControlState };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
2
|
-
const isChatSettingOpen = ref(false);
|
|
3
|
-
const isChatSearchOpen = ref(false);
|
|
4
|
-
const toggleChatSetting = () => {
|
|
5
|
-
isChatSettingOpen.value = !isChatSettingOpen.value;
|
|
6
|
-
};
|
|
7
|
-
const setChatSettingOpen = (open) => {
|
|
8
|
-
isChatSettingOpen.value = open;
|
|
9
|
-
};
|
|
10
|
-
const toggleChatSearch = () => {
|
|
11
|
-
isChatSearchOpen.value = !isChatSearchOpen.value;
|
|
12
|
-
};
|
|
13
|
-
const setChatSearchOpen = (open) => {
|
|
14
|
-
isChatSearchOpen.value = open;
|
|
15
|
-
};
|
|
16
|
-
function useUIOpenControlState() {
|
|
17
|
-
return {
|
|
18
|
-
isChatSettingOpen,
|
|
19
|
-
isChatSearchOpen,
|
|
20
|
-
toggleChatSetting,
|
|
21
|
-
setChatSettingOpen,
|
|
22
|
-
toggleChatSearch,
|
|
23
|
-
setChatSearchOpen
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
useUIOpenControlState
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useUIOpenControlState } from './UIOpenControlState';
|