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.
Files changed (243) hide show
  1. package/dist/AttachmentPicker.module-BesmtGyl.js +11 -0
  2. package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CdJ4DUzE.js +76 -0
  3. package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CbNUofpK.js +76 -0
  4. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-XRL7A5Gj.js → MessageInput.vue_vue_type_script_setup_true_lang-wUJPjWbx.js} +23 -18
  5. package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-CmxjbNDJ.js +76 -0
  6. package/dist/chat/index.d.ts +3747 -2386
  7. package/dist/chat/index.js +12 -11
  8. package/dist/components/BarrageInput/BarrageInputH5.js +32 -8
  9. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +9 -5
  10. package/dist/components/BarrageInput/TextEditor/index.js +14 -6
  11. package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +4 -4
  12. package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +12 -4
  13. package/dist/components/BarrageList/i18n/en-US/index.d.ts +1 -0
  14. package/dist/components/BarrageList/i18n/en-US/index.js +2 -1
  15. package/dist/components/BarrageList/i18n/zh-CN/index.d.ts +1 -0
  16. package/dist/components/BarrageList/i18n/zh-CN/index.js +2 -1
  17. package/dist/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.js +5 -3
  18. package/dist/components/ChatSetting/GroupChatSetting/GroupChatSetting.js +3 -3
  19. package/dist/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.js +3 -3
  20. package/dist/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.js +3 -3
  21. package/dist/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.js +3 -3
  22. package/dist/components/ChatSetting/SettingItem/SettingItem.js +21 -21
  23. package/dist/components/ChatSetting/i18n/en-US.js +3 -3
  24. package/dist/components/ChatSetting/i18n/zh-CN.js +3 -3
  25. package/dist/components/ChatSetting/index.d.ts +1 -4
  26. package/dist/components/ChatSetting/index.js +3 -6
  27. package/dist/components/CoGuestPanel/CoGuestPanel.js +1 -1
  28. package/dist/components/ContactList/ContactInfo/ContactInfo.js +17 -17
  29. package/dist/components/ContactList/ContactInfo/ContactInfo.vue.d.ts +26 -2
  30. package/dist/components/ContactList/ContactInfo/GroupInfo/GroupInfo.js +2 -1
  31. package/dist/components/ContactList/ContactList.js +19 -10
  32. package/dist/components/ContactList/ContactList.vue.d.ts +109 -1
  33. package/dist/components/ContactList/index.d.ts +158 -26
  34. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +8 -9
  35. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +2 -1
  36. package/dist/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.js +8 -8
  37. package/dist/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.js +1 -2
  38. package/dist/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.js +8 -8
  39. package/dist/components/ConversationList/ConversationList.js +18 -44
  40. package/dist/components/ConversationList/ConversationList.vue.d.ts +197 -1535
  41. package/dist/components/ConversationList/ConversationListContent/ConversationListContent.js +8 -11
  42. package/dist/components/ConversationList/ConversationListContent/ConversationListContent.vue.d.ts +22 -340
  43. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +80 -134
  44. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +14 -14
  45. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +14 -14
  46. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +19 -30
  47. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +0 -2
  48. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +14 -15
  49. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +12 -24
  50. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
  51. package/dist/components/ConversationList/ConversationPreview/index.d.ts +1 -1
  52. package/dist/components/ConversationList/ConversationPreview/index.js +17 -21
  53. package/dist/components/ConversationList/ConversationSearch/ConversationSearch.js +1 -0
  54. package/dist/components/ConversationList/index.d.ts +468 -2400
  55. package/dist/components/ConversationList/index.js +1 -1
  56. package/dist/components/LiveCoreView/index.js +113 -58
  57. package/dist/components/LiveCoreView/index.vue.d.ts +9 -0
  58. package/dist/components/LiveList/LiveList.js +7 -5
  59. package/dist/components/LiveList/LiveListH5.js +77 -71
  60. package/dist/components/LiveList/i18n/en-US/index.d.ts +5 -0
  61. package/dist/components/LiveList/i18n/en-US/index.js +6 -1
  62. package/dist/components/LiveList/i18n/zh-CN/index.d.ts +5 -0
  63. package/dist/components/LiveList/i18n/zh-CN/index.js +6 -1
  64. package/dist/components/LiveList/pullToRefresh.js +204 -0
  65. package/dist/components/LiveList/pullToRefresh.vue.d.ts +86 -0
  66. package/dist/components/LiveScenePanel/CameraSettingDialog.js +6 -5
  67. package/dist/components/LiveScenePanel/index.js +3 -3
  68. package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +0 -4
  69. package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +1 -1
  70. package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +1 -1
  71. package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +1 -1
  72. package/dist/components/MessageInput/AttachmentPicker/index.js +14 -19
  73. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +3 -3
  74. package/dist/components/MessageInput/MessageInput.js +1 -1
  75. package/dist/components/MessageInput/MessageInput.vue.d.ts +6 -9
  76. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +2 -2
  77. package/dist/components/MessageInput/TextEditor/index.js +18 -9
  78. package/dist/components/MessageInput/index.d.ts +5 -41
  79. package/dist/components/MessageInput/index.js +4 -4
  80. package/dist/components/MessageList/Message/CustomMessage/index.js +2 -2
  81. package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +7 -5
  82. package/dist/components/MessageList/Message/FaceMessage/FaceMessage.vue.d.ts +8 -8
  83. package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +2 -1
  84. package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +2 -1
  85. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +12 -4
  86. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +3 -3
  87. package/dist/components/MessageList/MessageForward/MessageForward.js +2 -3
  88. package/dist/components/MessageList/MessageList.js +14 -7
  89. package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
  90. package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +5 -5
  91. package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +10 -10
  92. package/dist/components/MessageList/index.d.ts +143 -5
  93. package/dist/components/MessageList/index.js +5 -5
  94. package/dist/components/Search/Search.js +1 -3
  95. package/dist/components/Search/SearchResults/EmptyResult/EmptyResult.js +4 -6
  96. package/dist/components/Search/SearchResults/Loading/Loading.js +2 -4
  97. package/dist/components/Search/SearchResults/SearchResults.js +20 -22
  98. package/dist/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.js +6 -8
  99. package/dist/components/Search/SearchResults/SearchResultsItem/Group/Group.js +5 -7
  100. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +19 -21
  101. package/dist/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.js +1 -3
  102. package/dist/components/Search/SearchResults/SearchResultsItem/User/User.js +5 -7
  103. package/dist/components/StreamMixer/LocalMixer/index.js +11 -5
  104. package/dist/components/StreamView/manager/mediaManager.js +1 -1
  105. package/dist/components/UserPicker/UserPicker.js +2 -2
  106. package/dist/components/UserPicker/UserPicker.vue.d.ts +7 -8
  107. package/dist/components/UserPicker/components/ListMode/ListMode.js +14 -17
  108. package/dist/components/UserPicker/components/ListMode/ListMode.vue.d.ts +2 -2
  109. package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.vue.d.ts +2 -2
  110. package/dist/components/UserPicker/components/TreeMode/TreeMode.vue.d.ts +3 -3
  111. package/dist/components/UserPicker/components/TreeMode/TreeNode.vue.d.ts +4 -4
  112. package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +3 -3
  113. package/dist/components/UserPicker/hooks/useSelection.d.ts +8 -8
  114. package/dist/components/UserPicker/hooks/useTreeState.d.ts +3 -3
  115. package/dist/components/UserPicker/index.d.ts +134 -3
  116. package/dist/components/UserPicker/index.js +3 -2
  117. package/dist/components/UserPicker/type.d.ts +18 -18
  118. package/dist/index.js +6 -3
  119. package/dist/rtc/index.d.ts +9 -0
  120. package/dist/states/GroupSettingState/GroupSettingState.js +3 -3
  121. package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +3 -0
  122. package/dist/states/LoginState.js +1 -0
  123. package/dist/states/MessageInputState/MessageInputState.js +25 -5
  124. package/dist/styles/index.css +1275 -3559
  125. package/dist/types/contact.d.ts +13 -12
  126. package/dist/types/conversation.d.ts +12 -14
  127. package/dist/types/engine.d.ts +12 -0
  128. package/dist/types/engine.js +15 -0
  129. package/dist/types/index.js +2 -1
  130. package/dist/utils/json.js +0 -1
  131. package/package.json +7 -3
  132. package/src/chat/index.ts +12 -4
  133. package/src/components/BarrageInput/BarrageInputH5.vue +50 -4
  134. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
  135. package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
  136. package/src/components/BarrageInput/TextEditor/Editor.scss +1 -1
  137. package/src/components/BarrageInput/TextEditor/TextEditor.module.scss +2 -0
  138. package/src/components/BarrageInput/TextEditor/TextEditor.vue +6 -0
  139. package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +8 -8
  140. package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +10 -0
  141. package/src/components/BarrageList/i18n/en-US/index.ts +1 -0
  142. package/src/components/BarrageList/i18n/zh-CN/index.ts +1 -0
  143. package/src/components/ChatSetting/GroupChatSetting/GroupActions/GroupActions.vue +5 -2
  144. package/src/components/ChatSetting/GroupChatSetting/GroupChatSetting.vue +5 -4
  145. package/src/components/ChatSetting/GroupChatSetting/GroupInfo/GroupInfo.vue +2 -2
  146. package/src/components/ChatSetting/GroupChatSetting/GroupManagement/GroupManagement.vue +3 -2
  147. package/src/components/ChatSetting/GroupChatSetting/GroupMembers/GroupMembers.vue +3 -3
  148. package/src/components/ChatSetting/SettingItem/SettingItem.vue +10 -7
  149. package/src/components/ChatSetting/i18n/en-US.ts +3 -3
  150. package/src/components/ChatSetting/i18n/zh-CN.ts +3 -3
  151. package/src/components/ChatSetting/index.ts +3 -3
  152. package/src/components/CoGuestPanel/CoGuestPanel.vue +9 -0
  153. package/src/components/ContactList/ContactInfo/BlacklistInfo/BlacklistInfo.scss +2 -0
  154. package/src/components/ContactList/ContactInfo/ContactInfo.vue +17 -9
  155. package/src/components/ContactList/ContactInfo/FriendApplicationInfo/FriendApplicationInfo.scss +2 -0
  156. package/src/components/ContactList/ContactInfo/FriendInfo/FriendInfo.scss +4 -3
  157. package/src/components/ContactList/ContactInfo/GroupApplicationInfo/GroupApplicationInfo.scss +2 -0
  158. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.scss +2 -0
  159. package/src/components/ContactList/ContactInfo/GroupInfo/GroupInfo.vue +1 -0
  160. package/src/components/ContactList/ContactInfo/SearchGroupInfo/SearchGroupInfo.scss +2 -2
  161. package/src/components/ContactList/ContactInfo/SearchUserInfo/SearchUserInfo.scss +3 -2
  162. package/src/components/ContactList/ContactList.scss +2 -1
  163. package/src/components/ContactList/ContactList.vue +18 -3
  164. package/src/components/ContactList/ContactListItem/BlacklistItem/BlacklistItem.scss +3 -3
  165. package/src/components/ContactList/ContactListItem/FriendApplicationItem/FriendApplicationItem.scss +5 -6
  166. package/src/components/ContactList/ContactListItem/FriendItem/FriendItem.scss +3 -3
  167. package/src/components/ContactList/ContactListItem/GroupApplicationItem/GroupApplicationItem.scss +5 -6
  168. package/src/components/ContactList/ContactListItem/GroupItem/GroupItem.scss +3 -3
  169. package/src/components/ConversationList/ConversationActions/ConversationActions.scss +2 -12
  170. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +2 -2
  171. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -0
  172. package/src/components/ConversationList/ConversationCreate/ConversationCreateGroupDetail/ConversationCreateGroupDetail.scss +2 -1
  173. package/src/components/ConversationList/ConversationCreate/ConversationCreateUserSelectList/ConversationCreateUserSelectList.vue +2 -2
  174. package/src/components/ConversationList/ConversationCreate/ConversationGroupTypeInfo/ConversationGroupTypeInfo.scss +2 -1
  175. package/src/components/ConversationList/ConversationList.scss +0 -5
  176. package/src/components/ConversationList/ConversationList.vue +15 -41
  177. package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -0
  178. package/src/components/ConversationList/ConversationListContent/ConversationListContent.vue +13 -18
  179. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +11 -9
  180. package/src/components/ConversationList/ConversationPreview/ConversationPreview.vue +14 -16
  181. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +2 -14
  182. package/src/components/ConversationList/ConversationPreview/index.ts +1 -1
  183. package/src/components/ConversationList/ConversationSearch/ConversationSearch.vue +1 -0
  184. package/src/components/LiveCoreView/index.vue +144 -78
  185. package/src/components/LiveList/LiveList.vue +3 -0
  186. package/src/components/LiveList/LiveListH5.vue +60 -85
  187. package/src/components/LiveList/i18n/en-US/index.ts +5 -0
  188. package/src/components/LiveList/i18n/zh-CN/index.ts +5 -0
  189. package/src/components/LiveList/pullToRefresh.vue +364 -0
  190. package/src/components/LiveScenePanel/CameraSettingDialog.vue +6 -5
  191. package/src/components/LiveScenePanel/index.vue +2 -2
  192. package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.module.scss +4 -0
  193. package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +12 -17
  194. package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +3 -2
  195. package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +3 -2
  196. package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +3 -2
  197. package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +1 -0
  198. package/src/components/MessageInput/MessageInput.vue +21 -15
  199. package/src/components/MessageInput/TextEditor/Editor.scss +1 -0
  200. package/src/components/MessageInput/TextEditor/TextEditor.vue +16 -6
  201. package/src/components/MessageInput/types.d.ts +3 -4
  202. package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +1 -1
  203. package/src/components/MessageList/Message/FaceMessage/FaceMessage.vue +10 -7
  204. package/src/components/MessageList/Message/LocationMessage/LocationMessage.vue +3 -1
  205. package/src/components/MessageList/Message/MergerMessage/MergerMessage.vue +1 -1
  206. package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +2 -2
  207. package/src/components/MessageList/MessageForward/MessageForward.vue +3 -3
  208. package/src/components/MessageList/MessageList.vue +17 -5
  209. package/src/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue +9 -9
  210. package/src/components/MessageList/index.ts +5 -4
  211. package/src/components/Search/Search.scss +0 -3
  212. package/src/components/Search/SearchResults/EmptyResult/EmptyResult.scss +0 -3
  213. package/src/components/Search/SearchResults/Loading/Loading.scss +0 -3
  214. package/src/components/Search/SearchResults/SearchResults.scss +7 -16
  215. package/src/components/Search/SearchResults/SearchResultsItem/Conversation/Conversation.scss +5 -11
  216. package/src/components/Search/SearchResults/SearchResultsItem/Group/Group.scss +5 -11
  217. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.scss +5 -11
  218. package/src/components/Search/SearchResults/SearchResultsItem/SearchResultsItem.scss +0 -3
  219. package/src/components/Search/SearchResults/SearchResultsItem/User/User.scss +5 -6
  220. package/src/components/StreamMixer/LocalMixer/index.vue +9 -4
  221. package/src/components/StreamView/manager/mediaManager.ts +1 -1
  222. package/src/components/UserPicker/UserPicker.vue +6 -9
  223. package/src/components/UserPicker/components/ListMode/ListMode.vue +3 -7
  224. package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +2 -2
  225. package/src/components/UserPicker/components/TreeMode/TreeMode.vue +3 -3
  226. package/src/components/UserPicker/components/TreeMode/TreeNode.vue +3 -3
  227. package/src/components/UserPicker/hooks/useSearchFilter.ts +15 -14
  228. package/src/components/UserPicker/hooks/useSelection.ts +32 -32
  229. package/src/components/UserPicker/hooks/useTreeState.ts +4 -4
  230. package/src/components/UserPicker/index.ts +16 -14
  231. package/src/components/UserPicker/type.ts +18 -18
  232. package/src/types/contact.ts +13 -12
  233. package/src/types/conversation.ts +12 -14
  234. package/src/types/engine.ts +15 -0
  235. package/src/utils/json.ts +0 -4
  236. package/dist/AttachmentPicker.module-0_DWsAtr.js +0 -11
  237. package/dist/FilePicker.vue_vue_type_script_setup_true_lang-CaSj3Gh_.js +0 -72
  238. package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-CrzGMmrh.js +0 -72
  239. package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-DTv6TJKr.js +0 -72
  240. package/dist/states/UIOpenControlState/UIOpenControlState.d.ts +0 -15
  241. package/dist/states/UIOpenControlState/UIOpenControlState.js +0 -28
  242. package/dist/states/UIOpenControlState/index.d.ts +0 -1
  243. package/dist/states/UIOpenControlState/index.js +0 -4
@@ -1,6 +1,4 @@
1
- @use "sass:map";
2
- @use "@tencentcloud/uikit-base-component-vue3/src/providers/UIKitProvider/styles/variables.scss" as *;
3
-
1
+ @use '../../../../../styles/mixins' as mixins;
4
2
  .SearchGroup {
5
3
  display: flex;
6
4
  align-items: flex-start;
@@ -27,22 +25,18 @@
27
25
  font-weight: 500;
28
26
  font-size: 14px;
29
27
  margin-bottom: 4px;
30
- overflow: hidden;
31
- text-overflow: ellipsis;
32
- white-space: nowrap;
33
28
  color: var(--text-color-primary);
29
+
30
+ @include mixins.text-ellipsis();
34
31
  }
35
32
 
36
33
  .SearchGroup__intro {
37
34
  font-size: 12px;
38
35
  line-height: 1.5;
39
- overflow: hidden;
40
- text-overflow: ellipsis;
41
- display: -webkit-box;
42
- -webkit-line-clamp: 3;
43
- -webkit-box-orient: vertical;
44
36
  word-break: break-word;
45
37
  color: var(--text-color-secondary);
38
+
39
+ @include mixins.multi-line-ellipsis(3);
46
40
  }
47
41
 
48
42
  :global(.SearchGroup__highlight) {
@@ -1,6 +1,4 @@
1
- @use "sass:map";
2
- @use "@tencentcloud/uikit-base-component-vue3/src/providers/UIKitProvider/styles/variables.scss" as *;
3
-
1
+ @use '../../../../../styles/mixins' as mixins;
4
2
  .SearchMessage {
5
3
  display: flex;
6
4
  align-items: flex-start;
@@ -35,10 +33,9 @@
35
33
  .SearchMessage__name {
36
34
  font-weight: 500;
37
35
  font-size: 14px;
38
- overflow: hidden;
39
- text-overflow: ellipsis;
40
- white-space: nowrap;
41
36
  color: var(--text-color-primary);
37
+
38
+ @include mixins.text-ellipsis();
42
39
  }
43
40
 
44
41
  .SearchMessage__time {
@@ -85,13 +82,10 @@
85
82
  .SearchMessage__text {
86
83
  font-size: 12px;
87
84
  line-height: 1.5;
88
- overflow: hidden;
89
- text-overflow: ellipsis;
90
- display: -webkit-box;
91
- -webkit-line-clamp: 3;
92
- -webkit-box-orient: vertical;
93
85
  word-break: break-word;
94
86
  color: var(--text-color-primary);
87
+
88
+ @include mixins.multi-line-ellipsis(3);
95
89
  }
96
90
 
97
91
  .SearchMessage__emoji-img {
@@ -1,6 +1,3 @@
1
- @use "sass:map";
2
- @use "@tencentcloud/uikit-base-component-vue3/src/providers/UIKitProvider/styles/variables.scss" as *;
3
-
4
1
  .SearchResultsItem {
5
2
  padding: 12px 16px;
6
3
  cursor: pointer;
@@ -1,6 +1,4 @@
1
- @use "sass:map";
2
- @use "@tencentcloud/uikit-base-component-vue3/src/providers/UIKitProvider/styles/variables.scss" as *;
3
-
1
+ @use '../../../../../styles/mixins' as mixins;
4
2
  .SearchUser {
5
3
  display: flex;
6
4
  align-items: flex-start;
@@ -26,10 +24,9 @@
26
24
  font-weight: 500;
27
25
  font-size: 14px;
28
26
  margin-bottom: 4px;
29
- overflow: hidden;
30
- text-overflow: ellipsis;
31
- white-space: nowrap;
32
27
  color: var(--text-color-primary);
28
+
29
+ @include mixins.text-ellipsis();
33
30
  }
34
31
 
35
32
  .SearchUser__signature {
@@ -42,6 +39,8 @@
42
39
  -webkit-box-orient: vertical;
43
40
  word-break: break-word;
44
41
  color: var(--text-color-secondary);
42
+
43
+ @include mixins.multi-line-ellipsis(3);
45
44
  }
46
45
 
47
46
  :global(.SearchUser__highlight) {
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script setup lang="ts">
26
26
  import type { Ref } from 'vue';
27
- import { ref, onMounted, watch, onUnmounted, computed, nextTick } from 'vue';
27
+ import { ref, onMounted, watch, onBeforeUnmount, computed, nextTick } from 'vue';
28
28
  import TUIRoomEngine, {
29
29
  TRTCVideoResolutionMode,
30
30
  TRTCVideoRotation,
@@ -213,20 +213,25 @@ onMounted(() => {
213
213
  re.observe(localMixerRef.value);
214
214
  TUIRoomEngine.once('ready', async () => {
215
215
  const mediaSourceManager = roomEngine.instance?.getTRTCCloud().getMediaMixingManager();
216
- await mediaSourceManager.setDisplayParams(document.getElementById('local-video-mixer') as HTMLElement);
216
+ await mediaSourceManager.bindPreviewArea(document.getElementById('local-video-mixer') as HTMLElement);
217
217
  getMixControlStyle();
218
218
  });
219
219
 
220
220
  watch(localLiveStatus, async (newVal) => {
221
+ const mediaSourceManager = roomEngine.instance?.getTRTCCloud().getMediaMixingManager();
221
222
  if (newVal === LiveStatus.Live) {
222
- const mediaSourceManager = roomEngine.instance?.getTRTCCloud().getMediaMixingManager();
223
223
  await mediaSourceManager?.startPublish();
224
224
  }
225
+ if (newVal === LiveStatus.IDLE) {
226
+ await mediaSourceManager?.stopPublish();
227
+ }
225
228
  });
226
229
  });
227
230
 
228
- onUnmounted(() => {
231
+ onBeforeUnmount(async () => {
229
232
  re.unobserve(localMixerRef.value);
233
+ const mediaSourceManager = roomEngine.instance?.getTRTCCloud().getMediaMixingManager();
234
+ await mediaSourceManager?.destroy();
230
235
  });
231
236
  </script>
232
237
 
@@ -250,7 +250,7 @@ export class MediaManager {
250
250
  if (streamType === TUIVideoStreamType.kCameraStream) {
251
251
  if (isVideoMixerEnabled.value) {
252
252
  const mediaSourceManager = roomEngine.instance?.getTRTCCloud().getMediaMixingManager();
253
- mediaSourceManager.setDisplayParams(document.getElementById(viewIdList[0]) as HTMLElement);
253
+ mediaSourceManager.bindPreviewArea(document.getElementById(viewIdList[0]) as HTMLElement);
254
254
  // const publishParams = {
255
255
  // videoEncoderParams: {
256
256
  // videoResolution: TRTCVideoResolution.TRTCVideoResolution_1280_720,
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  <ListMode
23
23
  v-else-if="!isTreeMode"
24
- :data-source="searchManager.filteredData.value as IUserPickerRow<any>[]"
24
+ :data-source="searchManager.filteredData.value as UserPickerRow<any>[]"
25
25
  :selected-keys="selectionManager.selectedKeys.value"
26
26
  :locked-keys="selectionManager.lockedKeys.value"
27
27
  :on-item-click="selectionManager.toggle"
@@ -30,7 +30,7 @@
30
30
  />
31
31
  <TreeMode
32
32
  v-else
33
- :data-source="searchManager.filteredData.value as IUserPickerNode<any>[]"
33
+ :data-source="searchManager.filteredData.value as UserPickerNode<any>[]"
34
34
  :selected-keys="selectionManager.selectedKeys.value"
35
35
  :half-selected-keys="selectionManager.halfSelectedKeys.value"
36
36
  :locked-keys="selectionManager.lockedKeys.value"
@@ -64,10 +64,7 @@ import TreeMode from './components/TreeMode';
64
64
  import { useSearchFilter } from './hooks/useSearchFilter';
65
65
  import { useSelection } from './hooks/useSelection';
66
66
  import { useTreeState } from './hooks/useTreeState';
67
- import type { IUserPickerProps, IUserPickerRef, IUserPickerNode, IUserPickerRow } from './type';
68
-
69
- // Define type for props (without generics for Vue3 compatibility)
70
- type UserPickerProps = IUserPickerProps<any>;
67
+ import type { UserPickerProps, UserPickerRef, UserPickerNode, UserPickerRow } from './type';
71
68
 
72
69
  const props = withDefaults(defineProps<UserPickerProps>(), {
73
70
  dataSource: () => [],
@@ -129,7 +126,7 @@ watch(
129
126
  );
130
127
 
131
128
  // Generic node update function - can update any properties of a node
132
- const updateNodeByKey = (nodeKey: string, partialNode: Partial<IUserPickerNode<any>>) => {
129
+ const updateNodeByKey = (nodeKey: string, partialNode: Partial<UserPickerNode<any>>) => {
133
130
  if (!isTreeMode.value) {
134
131
  return;
135
132
  }
@@ -187,7 +184,7 @@ const updateNodeByKey = (nodeKey: string, partialNode: Partial<IUserPickerNode<a
187
184
  };
188
185
 
189
186
  // Implement methods exposed by ref
190
- const refMethods: IUserPickerRef<any> = {
187
+ const refMethods: UserPickerRef<any> = {
191
188
  getSelectedItems: () => selectionManager.getSelectedItems(),
192
189
  updateListData: (newDataSource: any[]) => {
193
190
  // Update list data
@@ -195,7 +192,7 @@ const refMethods: IUserPickerRef<any> = {
195
192
  internalDataSource.value = newDataSource;
196
193
  }
197
194
  },
198
- updateTreeData: (nodeKey: string, partialNode: Partial<IUserPickerNode<any>>) => {
195
+ updateTreeData: (nodeKey: string, partialNode: Partial<UserPickerNode<any>>) => {
199
196
  // Use generic update function
200
197
  updateNodeByKey(nodeKey, partialNode);
201
198
  },
@@ -27,10 +27,7 @@
27
27
  <!-- Checkbox -->
28
28
  <div :class="$style['list__checkbox-wrapper']">
29
29
  <div :class="[$style.list__checkbox, { [$style['list__checkbox--checked']]: isSelected(item.key) }]">
30
- <IconCheckSm
31
- v-if="isSelected(item.key)"
32
- name="check"
33
- />
30
+ <IconCheckSm v-if="isSelected(item.key)" />
34
31
  </div>
35
32
  </div>
36
33
 
@@ -61,10 +58,10 @@
61
58
  import { defineProps } from 'vue';
62
59
  import { useUIKit, IconCheckSm } from '@tencentcloud/uikit-base-component-vue3';
63
60
  import { Avatar } from '../../../Avatar';
64
- import type { IUserPickerRow } from '../../type';
61
+ import type { UserPickerRow } from '../../type';
65
62
 
66
63
  interface ListModeProps<T = unknown> {
67
- dataSource: IUserPickerRow<T>[];
64
+ dataSource: UserPickerRow<T>[];
68
65
  selectedKeys: Set<string>;
69
66
  lockedKeys: Set<string>;
70
67
  onItemClick: (key: string) => void;
@@ -150,7 +147,6 @@ const handleScroll = (e: Event) => {
150
147
  align-items: center;
151
148
  justify-content: center;
152
149
  transition: all 0.3s;
153
- color: #fff;
154
150
  border: 2px solid #d9d9d9;
155
151
 
156
152
  &--checked {
@@ -48,13 +48,13 @@
48
48
  import { defineProps, computed, withDefaults } from 'vue';
49
49
  import { IconClose, useUIKit } from '@tencentcloud/uikit-base-component-vue3';
50
50
  import { Avatar } from '../../../Avatar';
51
- import type { IUserPickerResult } from '../../type';
51
+ import type { UserPickerResult } from '../../type';
52
52
 
53
53
  const { t } = useUIKit();
54
54
 
55
55
  interface SelectedPanelProps {
56
56
  displayMode: 'list' | 'tree';
57
- selectedItems: IUserPickerResult;
57
+ selectedItems: UserPickerResult;
58
58
  lockedKeys: Set<string>;
59
59
  onRemove: (key: string) => void;
60
60
  maxCount?: number;
@@ -21,17 +21,17 @@
21
21
  <script setup lang="ts">
22
22
  import { defineProps } from 'vue';
23
23
  import TreeNode from './TreeNode.vue';
24
- import type { IUserPickerNode } from '../../type';
24
+ import type { UserPickerNode } from '../../type';
25
25
 
26
26
  interface TreeModeProps<T = unknown> {
27
- dataSource: IUserPickerNode<T>[];
27
+ dataSource: UserPickerNode<T>[];
28
28
  selectedKeys: Set<string>;
29
29
  halfSelectedKeys: Set<string>;
30
30
  lockedKeys: Set<string>;
31
31
  expandedKeys: Set<string>;
32
32
  loadingKeys: Set<string>;
33
33
  onItemClick: (key: string) => void;
34
- onExpand: (node: IUserPickerNode<T>) => void;
34
+ onExpand: (node: UserPickerNode<T>) => void;
35
35
  renderItem?: any; // Vue component or render function
36
36
  }
37
37
 
@@ -88,10 +88,10 @@
88
88
  import { defineProps, defineEmits, computed } from 'vue';
89
89
  import { IconArrowDown, IconCheckSm, IconLoading } from '@tencentcloud/uikit-base-component-vue3';
90
90
  import { Avatar } from '../../../Avatar';
91
- import type { IUserPickerNode } from '../../type';
91
+ import type { UserPickerNode } from '../../type';
92
92
 
93
93
  interface TreeNodeProps<T = unknown> {
94
- node: IUserPickerNode<T>;
94
+ node: UserPickerNode<T>;
95
95
  level: number;
96
96
  selectedKeys: Set<string>;
97
97
  halfSelectedKeys: Set<string>;
@@ -105,7 +105,7 @@ const props = defineProps<TreeNodeProps>();
105
105
 
106
106
  const emit = defineEmits<{
107
107
  'item-click': [key: string];
108
- expand: [node: IUserPickerNode<any>];
108
+ expand: [node: UserPickerNode<any>];
109
109
  }>();
110
110
 
111
111
  const isSelected = computed(() => props.selectedKeys.has(props.node.key));
@@ -1,8 +1,9 @@
1
- import { ref, computed, type Ref } from 'vue';
2
- import type { IUserPickerDataSource, IUserPickerNode, IUserPickerRow } from '../type';
1
+ import { ref, computed } from 'vue';
2
+ import type { Ref } from 'vue';
3
+ import type { UserPickerDataSource, UserPickerNode, UserPickerRow } from '../type';
3
4
 
4
5
  interface UseSearchFilterOptions<T = unknown> {
5
- dataSource: Ref<IUserPickerDataSource<T>>;
6
+ dataSource: Ref<UserPickerDataSource<T>>;
6
7
  isTreeMode?: boolean;
7
8
  onSearch?: (value: string) => void;
8
9
  debounceTime?: number;
@@ -11,7 +12,7 @@ interface UseSearchFilterOptions<T = unknown> {
11
12
  interface UseSearchFilterReturn<T = unknown> {
12
13
  searchValue: Ref<string>;
13
14
  setSearchValue: (value: string) => void;
14
- filteredData: Ref<IUserPickerDataSource<T>>;
15
+ filteredData: Ref<UserPickerDataSource<T>>;
15
16
  isSearching: Ref<boolean>;
16
17
  handleSearch: (value: string) => void;
17
18
  clearSearch: () => void;
@@ -19,7 +20,7 @@ interface UseSearchFilterReturn<T = unknown> {
19
20
  }
20
21
 
21
22
  // Check if it's tree data structure
22
- function isTreeDataSource<T>(data: IUserPickerDataSource<T>): data is Array<IUserPickerNode<T>> {
23
+ function isTreeDataSource<T>(data: UserPickerDataSource<T>): data is Array<UserPickerNode<T>> {
23
24
  if (data.length === 0) {
24
25
  return false;
25
26
  }
@@ -27,22 +28,22 @@ function isTreeDataSource<T>(data: IUserPickerDataSource<T>): data is Array<IUse
27
28
  }
28
29
 
29
30
  // Search tree structure
30
- function searchTreeNodes<T>(nodes: Array<IUserPickerNode<T>>, searchValue: string): Array<IUserPickerNode<T>> {
31
+ function searchTreeNodes<T>(nodes: Array<UserPickerNode<T>>, searchValue: string): Array<UserPickerNode<T>> {
31
32
  if (!searchValue.trim()) {
32
33
  return nodes;
33
34
  }
34
35
 
35
36
  // Helper function: check if node matches
36
- const isNodeMatched = (node: IUserPickerNode<T>): boolean =>
37
+ const isNodeMatched = (node: UserPickerNode<T>): boolean =>
37
38
  node.label.toLowerCase().includes(searchValue.toLowerCase());
38
39
 
39
40
  // Helper function: recursively search nodes
40
- const searchNodes = (nodesList: Array<IUserPickerNode<T>>): Array<IUserPickerNode<T>> => {
41
- const matchedNodes: Array<IUserPickerNode<T>> = [];
41
+ const searchNodes = (nodesList: Array<UserPickerNode<T>>): Array<UserPickerNode<T>> => {
42
+ const matchedNodes: Array<UserPickerNode<T>> = [];
42
43
 
43
44
  nodesList.forEach(node => {
44
45
  const isMatched = isNodeMatched(node);
45
- let matchedChildren: Array<IUserPickerNode<T>> = [];
46
+ let matchedChildren: Array<UserPickerNode<T>> = [];
46
47
 
47
48
  if (node.children && node.children.length) {
48
49
  matchedChildren = searchNodes(node.children);
@@ -53,7 +54,7 @@ function searchTreeNodes<T>(nodes: Array<IUserPickerNode<T>>, searchValue: strin
53
54
  matchedNodes.push({
54
55
  ...node,
55
56
  children: matchedChildren.length > 0 ? matchedChildren : node.children,
56
- } as IUserPickerNode<T>);
57
+ } as UserPickerNode<T>);
57
58
  }
58
59
  });
59
60
 
@@ -64,7 +65,7 @@ function searchTreeNodes<T>(nodes: Array<IUserPickerNode<T>>, searchValue: strin
64
65
  }
65
66
 
66
67
  // Search list structure
67
- function searchListItems<T>(items: Array<IUserPickerRow<T>>, searchValue: string): Array<IUserPickerRow<T>> {
68
+ function searchListItems<T>(items: Array<UserPickerRow<T>>, searchValue: string): Array<UserPickerRow<T>> {
68
69
  if (!searchValue.trim()) {
69
70
  return items;
70
71
  }
@@ -89,9 +90,9 @@ export function useSearchFilter<T = unknown>({
89
90
  }
90
91
 
91
92
  if (isTreeMode && isTreeDataSource(dataSource.value)) {
92
- return searchTreeNodes(dataSource.value as Array<IUserPickerNode<T>>, searchValue.value);
93
+ return searchTreeNodes(dataSource.value as Array<UserPickerNode<T>>, searchValue.value);
93
94
  }
94
- return searchListItems(dataSource.value as Array<IUserPickerRow<T>>, searchValue.value);
95
+ return searchListItems(dataSource.value as Array<UserPickerRow<T>>, searchValue.value);
95
96
  });
96
97
 
97
98
  // Handle search input
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-use-before-define */
2
2
  import { ref, computed, watch, type Ref } from 'vue';
3
- import type { IUserPickerNode, IUserPickerRow, IUserPickerDataSource, IUserPickerResult } from '../type';
3
+ import type { UserPickerNode, UserPickerRow, UserPickerDataSource, UserPickerResult } from '../type';
4
4
 
5
5
  interface UseSelectionOptions<T = unknown> {
6
6
  defaultSelectedKeys?: string[];
@@ -8,9 +8,9 @@ interface UseSelectionOptions<T = unknown> {
8
8
  maxCount?: number;
9
9
  minCount?: number;
10
10
  isTreeMode?: boolean;
11
- dataSource: Ref<IUserPickerDataSource<T>>;
12
- onSelectedChange?: (selectedItems: IUserPickerResult<T>) => void;
13
- onMaxCountExceed?: (selectedItems: IUserPickerResult<T>) => void;
11
+ dataSource: Ref<UserPickerDataSource<T>>;
12
+ onSelectedChange?: (selectedItems: UserPickerResult<T>) => void;
13
+ onMaxCountExceed?: (selectedItems: UserPickerResult<T>) => void;
14
14
  }
15
15
 
16
16
  interface UseSelectionReturn<T = unknown> {
@@ -21,18 +21,18 @@ interface UseSelectionReturn<T = unknown> {
21
21
  isHalfSelected: (key: string) => boolean;
22
22
  isLocked: (key: string) => boolean;
23
23
  toggle: (key: string) => void;
24
- getSelectedItems: () => IUserPickerResult<T>;
25
- getNodeChildKeys: (node: IUserPickerNode<T>) => string[];
24
+ getSelectedItems: () => UserPickerResult<T>;
25
+ getNodeChildKeys: (node: UserPickerNode<T>) => string[];
26
26
  getNodeParentChildrenMap: () => Map<string, string[]>;
27
27
  canSelectMore: Ref<boolean>;
28
28
  reachMaxCount: Ref<boolean>;
29
29
  allSelectedCount: Ref<number>;
30
- getSelectableLeafNodes: (nodeKey: string) => IUserPickerNode<T>[];
31
- getCancelableLeafNodes: (nodeKey: string) => IUserPickerNode<T>[];
30
+ getSelectableLeafNodes: (nodeKey: string) => UserPickerNode<T>[];
31
+ getCancelableLeafNodes: (nodeKey: string) => UserPickerNode<T>[];
32
32
  }
33
33
 
34
34
  // Check if it's tree data structure
35
- function isTreeDataSource<T>(data: IUserPickerDataSource<T>): data is IUserPickerNode<T>[] {
35
+ function isTreeDataSource<T>(data: UserPickerDataSource<T>): data is UserPickerNode<T>[] {
36
36
  if (data.length === 0) {
37
37
  return false;
38
38
  }
@@ -44,9 +44,9 @@ function isTreeDataSource<T>(data: IUserPickerDataSource<T>): data is IUserPicke
44
44
  * @param nodes
45
45
  * @returns
46
46
  */
47
- function buildAllNodesMap<T>(nodes: IUserPickerNode<T>[]): Map<string, IUserPickerNode<T>> {
48
- const map = new Map<string, IUserPickerNode<T>>();
49
- const traverse = (nodesToScan: IUserPickerNode<T>[]) => {
47
+ function buildAllNodesMap<T>(nodes: UserPickerNode<T>[]): Map<string, UserPickerNode<T>> {
48
+ const map = new Map<string, UserPickerNode<T>>();
49
+ const traverse = (nodesToScan: UserPickerNode<T>[]) => {
50
50
  nodesToScan.forEach(node => {
51
51
  map.set(node.key, node);
52
52
  if (node.children && node.children.length) {
@@ -59,10 +59,10 @@ function buildAllNodesMap<T>(nodes: IUserPickerNode<T>[]): Map<string, IUserPick
59
59
  }
60
60
 
61
61
  // Build parent-children mapping relationship
62
- function buildParentChildrenMap<T>(nodes: IUserPickerNode<T>[]): Map<string, string[]> {
62
+ function buildParentChildrenMap<T>(nodes: UserPickerNode<T>[]): Map<string, string[]> {
63
63
  const map = new Map<string, string[]>();
64
64
 
65
- const traverse = (nodesList: IUserPickerNode<T>[], parentKey?: string) => {
65
+ const traverse = (nodesList: UserPickerNode<T>[], parentKey?: string) => {
66
66
  nodesList.forEach(node => {
67
67
  if (parentKey) {
68
68
  if (!map.has(parentKey)) {
@@ -82,10 +82,10 @@ function buildParentChildrenMap<T>(nodes: IUserPickerNode<T>[]): Map<string, str
82
82
  }
83
83
 
84
84
  // Build child-parent mapping relationship
85
- function buildChildParentMap<T>(nodes: IUserPickerNode<T>[]): Map<string, string> {
85
+ function buildChildParentMap<T>(nodes: UserPickerNode<T>[]): Map<string, string> {
86
86
  const map = new Map<string, string>();
87
87
 
88
- const traverse = (nodesList: IUserPickerNode<T>[], parentKey?: string) => {
88
+ const traverse = (nodesList: UserPickerNode<T>[], parentKey?: string) => {
89
89
  nodesList.forEach(node => {
90
90
  if (parentKey) {
91
91
  map.set(node.key, parentKey);
@@ -127,23 +127,23 @@ export function useSelection<T = unknown>({
127
127
  // Tree node relationships
128
128
  const parentChildrenMap = computed(() => {
129
129
  if (isTreeMode && isTreeDataSource(dataSource.value)) {
130
- return buildParentChildrenMap(dataSource.value as IUserPickerNode<T>[]);
130
+ return buildParentChildrenMap(dataSource.value as UserPickerNode<T>[]);
131
131
  }
132
132
  return new Map<string, string[]>();
133
133
  });
134
134
 
135
135
  const childParentMap = computed(() => {
136
136
  if (isTreeMode && isTreeDataSource(dataSource.value)) {
137
- return buildChildParentMap(dataSource.value as IUserPickerNode<T>[]);
137
+ return buildChildParentMap(dataSource.value as UserPickerNode<T>[]);
138
138
  }
139
139
  return new Map<string, string>();
140
140
  });
141
141
 
142
142
  const nodeEntitiesMap = computed(() => {
143
143
  if (isTreeMode && isTreeDataSource(dataSource.value)) {
144
- return buildAllNodesMap(dataSource.value as IUserPickerNode<T>[]);
144
+ return buildAllNodesMap(dataSource.value as UserPickerNode<T>[]);
145
145
  }
146
- return new Map<string, IUserPickerNode<T>>();
146
+ return new Map<string, UserPickerNode<T>>();
147
147
  });
148
148
 
149
149
  // Check if maximum selection count is reached
@@ -156,7 +156,7 @@ export function useSelection<T = unknown>({
156
156
  * @param node - The node to get the child keys of
157
157
  * @returns The child keys of the node
158
158
  */
159
- const getNodeChildKeys = (node: IUserPickerNode<T>): string[] => {
159
+ const getNodeChildKeys = (node: UserPickerNode<T>): string[] => {
160
160
  const result: string[] = [];
161
161
 
162
162
  const traverse = (nodeKey: string) => {
@@ -178,7 +178,7 @@ export function useSelection<T = unknown>({
178
178
  * @param nodeKey - The key of the node to select
179
179
  * @returns The number of leaf nodes that would be selected when selecting this node (excluding already selected or locked nodes)
180
180
  */
181
- const getSelectableLeafNodes = (nodeKey: string): IUserPickerNode<T>[] => {
181
+ const getSelectableLeafNodes = (nodeKey: string): UserPickerNode<T>[] => {
182
182
  // If the node itself is a leaf node and not selected or locked, return 1
183
183
  const nodeEntity = nodeEntitiesMap.value.get(nodeKey);
184
184
  if (nodeEntity?.isLeafNode && !selectedKeys.value.has(nodeKey) && !lockedKeysSet.value.has(nodeKey)) {
@@ -186,29 +186,29 @@ export function useSelection<T = unknown>({
186
186
  }
187
187
 
188
188
  // Get all child node keys
189
- const childKeys = getNodeChildKeys({ key: nodeKey } as IUserPickerNode<T>);
189
+ const childKeys = getNodeChildKeys({ key: nodeKey } as UserPickerNode<T>);
190
190
 
191
191
  // Filter out unselected and unlocked leaf nodes
192
192
  const selectableLeafNodes = childKeys
193
193
  .filter(key => !selectedKeys.value.has(key) && !lockedKeysSet.value.has(key))
194
194
  .map(key => nodeEntitiesMap.value.get(key))
195
- .filter(childNode => childNode?.isLeafNode) as IUserPickerNode<T>[];
195
+ .filter(childNode => childNode?.isLeafNode) as UserPickerNode<T>[];
196
196
 
197
197
  return selectableLeafNodes;
198
198
  };
199
199
 
200
- const getCancelableLeafNodes = (nodeKey: string): IUserPickerNode<T>[] => {
200
+ const getCancelableLeafNodes = (nodeKey: string): UserPickerNode<T>[] => {
201
201
  const nodeEntity = nodeEntitiesMap.value.get(nodeKey);
202
202
  if (nodeEntity?.isLeafNode && selectedKeys.value.has(nodeKey)) {
203
203
  return [nodeEntity];
204
204
  }
205
205
 
206
- const childKeys = getNodeChildKeys({ key: nodeKey } as IUserPickerNode<T>);
206
+ const childKeys = getNodeChildKeys({ key: nodeKey } as UserPickerNode<T>);
207
207
 
208
208
  const cancelableLeafNodes = childKeys
209
209
  .filter(key => selectedKeys.value.has(key) && !lockedKeysSet.value.has(key))
210
210
  .map(key => nodeEntitiesMap.value.get(key))
211
- .filter(childNode => childNode?.isLeafNode) as IUserPickerNode<T>[];
211
+ .filter(childNode => childNode?.isLeafNode) as UserPickerNode<T>[];
212
212
 
213
213
  return cancelableLeafNodes;
214
214
  };
@@ -427,14 +427,14 @@ export function useSelection<T = unknown>({
427
427
  };
428
428
 
429
429
  // Get selected items
430
- const getSelectedItems = (): IUserPickerResult<T> => {
431
- const result: IUserPickerResult<T> = [];
430
+ const getSelectedItems = (): UserPickerResult<T> => {
431
+ const result: UserPickerResult<T> = [];
432
432
 
433
433
  if (isTreeMode && isTreeDataSource(dataSource.value)) {
434
- const treeData = dataSource.value as IUserPickerNode<T>[];
434
+ const treeData = dataSource.value as UserPickerNode<T>[];
435
435
 
436
436
  // Helper function: find node - use array iteration instead of for...of loop
437
- const findNode = (key: string, nodes: IUserPickerNode<T>[]): IUserPickerNode<T> | null => {
437
+ const findNode = (key: string, nodes: UserPickerNode<T>[]): UserPickerNode<T> | null => {
438
438
  const found = nodes.find(node => node.key === key);
439
439
  if (found) {
440
440
  return found;
@@ -471,7 +471,7 @@ export function useSelection<T = unknown>({
471
471
  });
472
472
  } else {
473
473
  // List mode
474
- const listData = dataSource.value as IUserPickerRow<T>[];
474
+ const listData = dataSource.value as UserPickerRow<T>[];
475
475
  selectedKeys.value.forEach(key => {
476
476
  const item = listData.find(listItem => listItem.key === key);
477
477
  if (item) {
@@ -1,8 +1,8 @@
1
1
  import { ref, type Ref } from 'vue';
2
- import type { IUserPickerNode } from '../type';
2
+ import type { UserPickerNode } from '../type';
3
3
 
4
4
  interface UseTreeStateOptions<T = unknown> {
5
- onExpand?: (node: IUserPickerNode<T>) => void;
5
+ onExpand?: (node: UserPickerNode<T>) => void;
6
6
  }
7
7
 
8
8
  interface UseTreeStateReturn<T = unknown> {
@@ -10,7 +10,7 @@ interface UseTreeStateReturn<T = unknown> {
10
10
  loadingKeys: Ref<Set<string>>;
11
11
  checkNodeIsExpanded: (key: string) => boolean;
12
12
  checkNodeIsLoading: (key: string) => boolean;
13
- toggleExpand: (node: IUserPickerNode<T>) => void;
13
+ toggleExpand: (node: UserPickerNode<T>) => void;
14
14
  setNodeLoading: (key: string, loading: boolean) => void;
15
15
  }
16
16
 
@@ -39,7 +39,7 @@ export function useTreeState<T = unknown>({ onExpand }: UseTreeStateOptions<T> =
39
39
  };
40
40
 
41
41
  // Toggle node expand state
42
- const toggleExpand = (node: IUserPickerNode<T>) => {
42
+ const toggleExpand = (node: UserPickerNode<T>) => {
43
43
  // If node is leaf node, no need to handle
44
44
  if (node.isLeafNode) {
45
45
  return;
@@ -1,11 +1,11 @@
1
- import UserPicker from './UserPicker.vue';
1
+ import UserPickerComponent from './UserPicker.vue';
2
2
  import type {
3
- IUserPickerProps,
4
- IUserPickerRef,
5
- IUserPickerRow,
6
- IUserPickerNode,
7
- IUserPickerDataSource,
8
- IUserPickerResult,
3
+ UserPickerProps,
4
+ UserPickerRef,
5
+ UserPickerRow,
6
+ UserPickerNode,
7
+ UserPickerDataSource,
8
+ UserPickerResult,
9
9
  } from './type';
10
10
  import { addI18n } from '../../i18n';
11
11
  import { resources } from './i18n';
@@ -13,12 +13,14 @@ import { resources } from './i18n';
13
13
  addI18n('en-US', { translation: { UserPicker: resources['en-US'] } });
14
14
  addI18n('zh-CN', { translation: { UserPicker: resources['zh-CN'] } });
15
15
 
16
+ const UserPicker = UserPickerComponent;
17
+
18
+ export { UserPicker };
16
19
  export type {
17
- IUserPickerProps,
18
- IUserPickerRef,
19
- IUserPickerRow,
20
- IUserPickerNode,
21
- IUserPickerDataSource,
22
- IUserPickerResult,
20
+ UserPickerProps,
21
+ UserPickerRef,
22
+ UserPickerRow,
23
+ UserPickerNode,
24
+ UserPickerDataSource,
25
+ UserPickerResult,
23
26
  };
24
- export { UserPicker };