@tencentcloud/chat-uikit-react 1.1.0 → 1.2.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 (273) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +8 -8
  3. package/dist/cjs/_virtual/extends.js +1 -0
  4. package/dist/cjs/components/Checkbox/index.d.ts +2 -1
  5. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  6. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  7. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  8. package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  9. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  10. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  11. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  12. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  13. package/dist/cjs/components/ConversationSearch/ConversationSearchInput.d.ts +2 -1
  14. package/dist/cjs/components/ConversationSearch/ConversationSearchInput.js +1 -1
  15. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  16. package/dist/cjs/components/DivWithEdit/DivWithEdit.d.ts +2 -1
  17. package/dist/cjs/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +2 -1
  18. package/dist/cjs/components/Icon/Icon.d.ts +2 -1
  19. package/dist/cjs/components/Icon/config.js +1 -1
  20. package/dist/cjs/components/Icon/images/add-friend.svg.js +1 -0
  21. package/dist/cjs/components/Icon/images/down-arrow.png.js +1 -0
  22. package/dist/cjs/components/Icon/images/right-arrow.svg.js +1 -0
  23. package/dist/cjs/components/Icon/type.d.ts +2 -1
  24. package/dist/cjs/components/Icon/type.js +1 -1
  25. package/dist/cjs/components/Input/Input.d.ts +1 -0
  26. package/dist/cjs/components/Input/Input.js +1 -1
  27. package/dist/cjs/components/Plugins/index.d.ts +1 -0
  28. package/dist/cjs/components/Plugins/index.js +1 -1
  29. package/dist/cjs/components/Popup/index.d.ts +1 -0
  30. package/dist/cjs/components/Popup/index.js +1 -1
  31. package/dist/cjs/components/Switch/Switch.d.ts +2 -1
  32. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  33. package/dist/cjs/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  34. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  35. package/dist/cjs/components/TUIContact/TUIContact.d.ts +6 -0
  36. package/dist/cjs/components/TUIContact/TUIContact.js +1 -0
  37. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +10 -0
  38. package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -0
  39. package/dist/cjs/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -0
  40. package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -0
  41. package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -0
  42. package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -0
  43. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -0
  44. package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -0
  45. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +6 -0
  46. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -0
  47. package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -0
  48. package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -0
  49. package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -0
  50. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  51. package/dist/cjs/components/TUIKit/TUIKit.d.ts +1 -0
  52. package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
  53. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +4 -0
  54. package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +1 -1
  55. package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +23 -3
  56. package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +1 -1
  57. package/dist/cjs/components/TUIManage/TUIManage.d.ts +3 -1
  58. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  59. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  60. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  61. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  62. package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
  63. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  64. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  65. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  66. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  67. package/dist/cjs/components/TUIMessage/utils/emojiMap.js +1 -1
  68. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  69. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  70. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  71. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  72. package/dist/cjs/components/TUIMessageInput/hooks/useCreateMessageInputContext.js +1 -1
  73. package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  74. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  75. package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  76. package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
  77. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  78. package/dist/cjs/components/untils.js +1 -1
  79. package/dist/cjs/context/ComponentContext.d.ts +2 -1
  80. package/dist/cjs/context/TUIContactContext.d.ts +18 -0
  81. package/dist/cjs/context/TUIContactContext.js +1 -0
  82. package/dist/cjs/context/TUIConversationContext.js +1 -1
  83. package/dist/cjs/context/TUIKitContext.d.ts +4 -0
  84. package/dist/cjs/index.css +1 -1
  85. package/dist/cjs/index.d.css +266 -13
  86. package/dist/cjs/index.d.ts +5 -1
  87. package/dist/cjs/index.js +1 -1
  88. package/dist/cjs/locales/en/TUIChat.js +1 -0
  89. package/dist/cjs/locales/en/TUIContact.js +1 -0
  90. package/dist/cjs/locales/en/TUIConversation.js +1 -0
  91. package/dist/cjs/locales/en/TUIProfile.js +1 -0
  92. package/dist/cjs/locales/en/index.js +1 -0
  93. package/dist/cjs/locales/index.js +1 -0
  94. package/dist/cjs/locales/zh_cn/TUIChat.js +1 -0
  95. package/dist/cjs/locales/zh_cn/TUIContact.js +1 -0
  96. package/dist/cjs/locales/zh_cn/TUIConversation.js +1 -0
  97. package/dist/cjs/locales/zh_cn/TUIProfile.js +1 -0
  98. package/dist/cjs/locales/zh_cn/index.js +1 -0
  99. package/dist/esm/_virtual/extends.js +1 -0
  100. package/dist/esm/components/Checkbox/index.d.ts +2 -1
  101. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  102. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  103. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  104. package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  105. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  106. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  107. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  108. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  109. package/dist/esm/components/ConversationSearch/ConversationSearchInput.d.ts +2 -1
  110. package/dist/esm/components/ConversationSearch/ConversationSearchInput.js +1 -1
  111. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  112. package/dist/esm/components/DivWithEdit/DivWithEdit.d.ts +2 -1
  113. package/dist/esm/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +2 -1
  114. package/dist/esm/components/Icon/Icon.d.ts +2 -1
  115. package/dist/esm/components/Icon/config.js +1 -1
  116. package/dist/esm/components/Icon/images/add-friend.svg.js +1 -0
  117. package/dist/esm/components/Icon/images/down-arrow.png.js +1 -0
  118. package/dist/esm/components/Icon/images/right-arrow.svg.js +1 -0
  119. package/dist/esm/components/Icon/type.d.ts +2 -1
  120. package/dist/esm/components/Icon/type.js +1 -1
  121. package/dist/esm/components/Input/Input.d.ts +1 -0
  122. package/dist/esm/components/Input/Input.js +1 -1
  123. package/dist/esm/components/Plugins/index.d.ts +1 -0
  124. package/dist/esm/components/Plugins/index.js +1 -1
  125. package/dist/esm/components/Popup/index.d.ts +1 -0
  126. package/dist/esm/components/Popup/index.js +1 -1
  127. package/dist/esm/components/Switch/Switch.d.ts +2 -1
  128. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  129. package/dist/esm/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  130. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  131. package/dist/esm/components/TUIContact/TUIContact.d.ts +6 -0
  132. package/dist/esm/components/TUIContact/TUIContact.js +1 -0
  133. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +10 -0
  134. package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -0
  135. package/dist/esm/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -0
  136. package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -0
  137. package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -0
  138. package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -0
  139. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -0
  140. package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -0
  141. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +6 -0
  142. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -0
  143. package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -0
  144. package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -0
  145. package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -0
  146. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  147. package/dist/esm/components/TUIKit/TUIKit.d.ts +1 -0
  148. package/dist/esm/components/TUIKit/TUIKit.js +1 -1
  149. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +4 -0
  150. package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +1 -1
  151. package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +23 -3
  152. package/dist/esm/components/TUIKit/hooks/useTUIKit.js +1 -1
  153. package/dist/esm/components/TUIManage/TUIManage.d.ts +3 -1
  154. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  155. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  156. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  157. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  158. package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
  159. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  160. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  161. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  162. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  163. package/dist/esm/components/TUIMessage/utils/emojiMap.js +1 -1
  164. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  165. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  166. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  167. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  168. package/dist/esm/components/TUIMessageInput/hooks/useCreateMessageInputContext.js +1 -1
  169. package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  170. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  171. package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
  172. package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
  173. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  174. package/dist/esm/components/untils.js +1 -1
  175. package/dist/esm/context/ComponentContext.d.ts +2 -1
  176. package/dist/esm/context/TUIContactContext.d.ts +18 -0
  177. package/dist/esm/context/TUIContactContext.js +1 -0
  178. package/dist/esm/context/TUIConversationContext.js +1 -1
  179. package/dist/esm/context/TUIKitContext.d.ts +4 -0
  180. package/dist/esm/index.css +1 -1
  181. package/dist/esm/index.d.css +266 -13
  182. package/dist/esm/index.d.ts +5 -1
  183. package/dist/esm/index.js +1 -1
  184. package/dist/esm/locales/en/TUIChat.js +1 -0
  185. package/dist/esm/locales/en/TUIContact.js +1 -0
  186. package/dist/esm/locales/en/TUIConversation.js +1 -0
  187. package/dist/esm/locales/en/TUIProfile.js +1 -0
  188. package/dist/esm/locales/en/index.js +1 -0
  189. package/dist/esm/locales/index.js +1 -0
  190. package/dist/esm/locales/zh_cn/TUIChat.js +1 -0
  191. package/dist/esm/locales/zh_cn/TUIContact.js +1 -0
  192. package/dist/esm/locales/zh_cn/TUIConversation.js +1 -0
  193. package/dist/esm/locales/zh_cn/TUIProfile.js +1 -0
  194. package/dist/esm/locales/zh_cn/index.js +1 -0
  195. package/package.json +5 -1
  196. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +10 -8
  197. package/src/components/ConversationCreate/ConversationCreate.tsx +4 -1
  198. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +6 -4
  199. package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +7 -3
  200. package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +0 -1
  201. package/src/components/ConversationPreview/ConversationPreview.tsx +6 -5
  202. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -2
  203. package/src/components/ConversationPreview/utils.tsx +12 -27
  204. package/src/components/ConversationSearch/ConversationSearchInput.tsx +3 -1
  205. package/src/components/Icon/config.ts +5 -0
  206. package/src/components/Icon/images/add-friend.svg +15 -0
  207. package/src/components/Icon/images/down-arrow.png +0 -0
  208. package/src/components/Icon/images/right-arrow.svg +3 -0
  209. package/src/components/Icon/styles/index.scss +0 -1
  210. package/src/components/Icon/type.ts +1 -0
  211. package/src/components/Input/Input.tsx +11 -2
  212. package/src/components/Plugins/index.tsx +26 -2
  213. package/src/components/Popup/index.tsx +20 -2
  214. package/src/components/TUIChat/hooks/useHandleMessageList.tsx +3 -8
  215. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +3 -3
  216. package/src/components/TUIContact/TUIContact.tsx +96 -0
  217. package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +32 -0
  218. package/src/components/TUIContact/TUIContactInfo/addFriendInfo.tsx +86 -0
  219. package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +34 -0
  220. package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +45 -0
  221. package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +66 -0
  222. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +103 -0
  223. package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +112 -0
  224. package/src/components/TUIContact/TUIContactInfo/index.scss +108 -0
  225. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +162 -0
  226. package/src/components/TUIContact/TUIContactList/index.scss +90 -0
  227. package/src/components/TUIContact/hooks/useTUIContact.tsx +76 -0
  228. package/src/components/TUIContact/index.scss +67 -0
  229. package/src/components/TUIContact/index.ts +3 -0
  230. package/src/components/TUIContactSearch/TUIContactSearch.tsx +100 -0
  231. package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +32 -0
  232. package/src/components/TUIContactSearch/index.scss +24 -0
  233. package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
  234. package/src/components/TUIConversationList/index.scss +2 -2
  235. package/src/components/TUIKit/TUIKit.tsx +9 -2
  236. package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +8 -0
  237. package/src/components/TUIKit/hooks/useTUIKit.tsx +43 -4
  238. package/src/components/TUIManage/TUIManage.tsx +5 -3
  239. package/src/components/TUIMessage/MessagePlugins.tsx +17 -7
  240. package/src/components/TUIMessage/MessageRevoke.tsx +5 -4
  241. package/src/components/TUIMessage/MessageStatus.tsx +3 -3
  242. package/src/components/TUIMessage/hooks/useMessageHandler.ts +4 -2
  243. package/src/components/TUIMessage/styles/layout.scss +2 -9
  244. package/src/components/TUIMessage/utils/emojiMap.ts +6 -2
  245. package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +5 -3
  246. package/src/components/TUIMessageInput/TUIForward.tsx +8 -27
  247. package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +3 -1
  248. package/src/components/TUIMessageInput/hooks/useCreateMessageInputContext.ts +3 -3
  249. package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +7 -1
  250. package/src/components/TUIMessageInput/styles/layout.scss +0 -1
  251. package/src/components/TUIMessageList/TUIMessageList.tsx +3 -1
  252. package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +3 -2
  253. package/src/components/TUIProfile/TUIProfile.tsx +18 -7
  254. package/src/components/TUIProfile/TUIProfileDefault.tsx +64 -6
  255. package/src/components/TUIProfile/styles/layout.scss +1 -1
  256. package/src/components/index.ts +1 -0
  257. package/src/components/untils.ts +26 -6
  258. package/src/context/TUIContactContext.tsx +32 -0
  259. package/src/context/TUIKitContext.tsx +5 -0
  260. package/src/context/index.ts +1 -0
  261. package/src/hooks/useConversation.tsx +3 -3
  262. package/src/locales/en/TUIChat.ts +27 -0
  263. package/src/locales/en/TUIContact.ts +28 -0
  264. package/src/locales/en/TUIConversation.ts +34 -0
  265. package/src/locales/en/TUIProfile.ts +14 -0
  266. package/src/locales/en/index.ts +11 -0
  267. package/src/locales/index.ts +23 -0
  268. package/src/locales/zh_cn/TUIChat.ts +27 -0
  269. package/src/locales/zh_cn/TUIContact.ts +29 -0
  270. package/src/locales/zh_cn/TUIConversation.ts +33 -0
  271. package/src/locales/zh_cn/TUIProfile.ts +14 -0
  272. package/src/locales/zh_cn/index.ts +11 -0
  273. package/tsconfig.json +1 -0
@@ -1,5 +1,5 @@
1
1
  export { ChatProps, TUIKit } from './components/TUIKit/TUIKit.js';
2
- export { UseChatParams, useTUIKit } from './components/TUIKit/hooks/useTUIKit.js';
2
+ export { UseChatParams, UseContactParams, useTUIKit } from './components/TUIKit/hooks/useTUIKit.js';
3
3
  export { useCreateTUIKitContext } from './components/TUIKit/hooks/useCreateTUIKitContext.js';
4
4
  export { TUIConversation, UnMemoizedTUIConversation } from './components/TUIConversation/TUIConversation.js';
5
5
  export { TUIConversationList, UnMemoTUIConversationList } from './components/TUIConversationList/TUIConversationList.js';
@@ -10,6 +10,7 @@ export { TUIChatActionContext, TUIChatActionContextValue, TUIChatActionProvider,
10
10
  export { TUIMessageContext, TUIMessageContextProvider, TUIMessageContextValue, messageShowType, useTUIMessageContext } from './context/TUIMessageContext.js';
11
11
  export { ComponentContext, ComponentContextValue, ComponentProvider, UnknowPorps, useComponentContext } from './context/ComponentContext.js';
12
12
  export { TUIMessageInputContext, TUIMessageInputContextProvider, TUIMessageInputContextValue, useTUIMessageInputContext } from './context/TUIMessageInputContext.js';
13
+ export { TUIContactContext, TUIContactContextProvider, TUIContactContextValue, useTUIContactContext } from './context/TUIContactContext.js';
13
14
  export { ConversationPreview, ConversationPreviewProps, ConversationPreviewUIComponentProps } from './components/ConversationPreview/ConversationPreview.js';
14
15
  export { ConversationPreviewContent, unMemoConversationPreviewContent } from './components/ConversationPreview/ConversationPreviewContent.js';
15
16
  export { TUIChatHeader } from './components/TUIChatHeader/TUIChatHeader.js';
@@ -39,5 +40,8 @@ export { Model } from './components/Model/index.js';
39
40
  export { Plugins, PluginsProps } from './components/Plugins/index.js';
40
41
  export { Switch } from './components/Switch/Switch.js';
41
42
  export { Toast } from './components/Toast/index.js';
43
+ export { TUIContactList } from './components/TUIContact/TUIContactList/TUIContactList.js';
44
+ export { TUIContactInfo, UnMemoizedTUIContactInfo } from './components/TUIContact/TUIContactInfo/TUIContactInfo.js';
45
+ export { TUIContact, UnMemoizedTUIContact } from './components/TUIContact/TUIContact.js';
42
46
  export { CreateGroupConversationParams, useConversation } from './hooks/useConversation.js';
43
47
  export { useProfile } from './hooks/useProfile.js';
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/TUIKit/TUIKit.js"),t=require("./components/TUIKit/hooks/useTUIKit.js"),o=require("./components/TUIKit/hooks/useCreateTUIKitContext.js"),s=require("./components/TUIConversation/TUIConversation.js"),r=require("./components/TUIConversationList/TUIConversationList.js");require("tslib"),require("react"),require("@tencentcloud/chat");var n=require("./components/TUIChat/TUIChat.js"),a=require("./components/ConversationPreview/ConversationPreview.js"),i=require("./components/ConversationPreview/ConversationPreviewContent.js"),p=require("./components/TUIChatHeader/TUIChatHeader.js"),u=require("./components/TUIChatHeader/TUIChatHeaderDefault.js"),I=require("./components/TUIMessageList/TUIMessageList.js"),C=require("./components/TUIMessage/TUIMessage.js"),x=require("./components/TUIMessage/MessagePlugins.js"),T=require("./components/TUIMessage/MessageContext.js"),U=require("./components/TUIMessageInput/TUIMessageInput.js"),c=require("./components/TUIMessageInput/TUIMessageInputDefault.js"),v=require("./components/TUIMessageInput/InputPluginsDefalut.js"),g=require("./components/TUIProfile/TUIProfile.js"),m=require("./components/TUIProfile/TUIProfileDefault.js"),l=require("./components/Avatar/Avatar.js"),h=require("./components/Avatar/default.js"),M=require("./components/ConversationSearch/ConversationSearchInput.js"),d=require("./components/ConversationSearch/ConversationSearchResult.js"),P=require("./components/TUIManage/TUIManage.js"),j=require("./components/Popup/index.js"),q=require("./components/Checkbox/index.js"),f=require("./components/DivWithEdit/DivWithEdit.js"),S=require("./components/Icon/Icon.js"),A=require("./components/Icon/type.js"),K=require("./components/EmptyStateIndicator/EmptyStateIndicator.js"),w=require("./components/Input/Input.js"),D=require("./components/Model/index.js"),y=require("./components/Plugins/index.js"),b=require("./components/Switch/Switch.js"),L=require("./components/Toast/index.js"),k=require("./context/TUIKitContext.js"),E=require("./context/TUIChatStateContext.js"),G=require("./context/TUIChatActionContext.js"),H=require("./context/TUIMessageContext.js"),W=require("./context/ComponentContext.js"),R=require("./context/TUIMessageInputContext.js"),O=require("./hooks/useConversation.js"),z=require("./hooks/useProfile.js");exports.TUIKit=e.TUIKit,exports.useTUIKit=t.useTUIKit,exports.useCreateTUIKitContext=o.useCreateTUIKitContext,exports.TUIConversation=s.TUIConversation,exports.UnMemoizedTUIConversation=s.UnMemoizedTUIConversation,exports.TUIConversationList=r.TUIConversationList,exports.UnMemoTUIConversationList=r.UnMemoTUIConversationList,exports.TUIChat=n.TUIChat,exports.ConversationPreview=a.ConversationPreview,exports.ConversationPreviewContent=i.ConversationPreviewContent,exports.unMemoConversationPreviewContent=i.unMemoConversationPreviewContent,exports.TUIChatHeader=p.TUIChatHeader,exports.TUIChatHeaderDefault=u.TUIChatHeaderDefault,exports.TUIMessageList=I.TUIMessageList,exports.TUIMessage=C.TUIMessage,exports.MessagePlugins=x.MessagePlugins,exports.MessageContext=T.MessageContext,exports.TUIMessageInput=U.TUIMessageInput,exports.TUIMessageInputDefault=c.TUIMessageInputDefault,exports.InputPluginsDefalut=v.InputPluginsDefalut,exports.TUIProfile=g.TUIProfile,exports.TUIProfileDefault=m.TUIProfileDefault,exports.Avatar=l.Avatar,exports.defaultGroupAvatarAVChatRoom=h.defaultGroupAvatarAVChatRoom,exports.defaultGroupAvatarMeeting=h.defaultGroupAvatarMeeting,exports.defaultGroupAvatarPublic=h.defaultGroupAvatarPublic,exports.defaultGroupAvatarWork=h.defaultGroupAvatarWork,exports.defaultUserAvatar=h.defaultUserAvatar,exports.ConversationSearchInput=M.ConversationSearchInput,exports.ConversationSearchResult=d.ConversationSearchResult,exports.TUIManage=P.TUIManage,exports.Popup=j.Popup,exports.Checkbox=q.Checkbox,exports.DivWithEdit=f.DivWithEdit,exports.Icon=S.Icon,exports.changeTypeToIconClassName=S.changeTypeToIconClassName,Object.defineProperty(exports,"IconTypes",{enumerable:!0,get:function(){return A.IconTypes}}),exports.EmptyStateIndicator=K.EmptyStateIndicator,exports.Input=w.Input,exports.Model=D.Model,exports.Plugins=y.Plugins,exports.Switch=b.Switch,exports.Toast=L.Toast,exports.TUIKitContext=k.TUIKitContext,exports.TUIKitProvider=k.TUIKitProvider,exports.useTUIKitContext=k.useTUIKitContext,exports.TUIChatStateContext=E.TUIChatStateContext,exports.TUIChatStateContextProvider=E.TUIChatStateContextProvider,exports.useTUIChatStateContext=E.useTUIChatStateContext,exports.TUIChatActionContext=G.TUIChatActionContext,exports.TUIChatActionProvider=G.TUIChatActionProvider,exports.useTUIChatActionContext=G.useTUIChatActionContext,exports.TUIMessageContext=H.TUIMessageContext,exports.TUIMessageContextProvider=H.TUIMessageContextProvider,Object.defineProperty(exports,"messageShowType",{enumerable:!0,get:function(){return H.messageShowType}}),exports.useTUIMessageContext=H.useTUIMessageContext,exports.ComponentContext=W.ComponentContext,exports.ComponentProvider=W.ComponentProvider,exports.useComponentContext=W.useComponentContext,exports.TUIMessageInputContext=R.TUIMessageInputContext,exports.TUIMessageInputContextProvider=R.TUIMessageInputContextProvider,exports.useTUIMessageInputContext=R.useTUIMessageInputContext,exports.useConversation=O.useConversation,exports.useProfile=z.useProfile;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./components/TUIKit/TUIKit.js"),t=require("./components/TUIKit/hooks/useTUIKit.js"),o=require("./components/TUIKit/hooks/useCreateTUIKitContext.js"),n=require("./components/TUIConversation/TUIConversation.js"),s=require("./components/TUIConversationList/TUIConversationList.js");require("tslib"),require("react"),require("@tencentcloud/chat");var r=require("./components/TUIChat/TUIChat.js"),a=require("./components/ConversationPreview/ConversationPreview.js"),i=require("./components/ConversationPreview/ConversationPreviewContent.js"),p=require("./components/TUIChatHeader/TUIChatHeader.js"),I=require("./components/TUIChatHeader/TUIChatHeaderDefault.js"),u=require("./components/TUIMessageList/TUIMessageList.js"),C=require("./components/TUIMessage/TUIMessage.js"),T=require("./components/TUIMessage/MessagePlugins.js"),x=require("./components/TUIMessage/MessageContext.js"),U=require("./components/TUIMessageInput/TUIMessageInput.js"),c=require("./components/TUIMessageInput/TUIMessageInputDefault.js"),v=require("./components/TUIMessageInput/InputPluginsDefalut.js"),m=require("./components/TUIProfile/TUIProfile.js"),d=require("./components/TUIProfile/TUIProfileDefault.js"),g=require("./components/Avatar/Avatar.js"),l=require("./components/Avatar/default.js"),M=require("./components/ConversationSearch/ConversationSearchInput.js"),h=require("./components/ConversationSearch/ConversationSearchResult.js"),P=require("./components/TUIManage/TUIManage.js"),j=require("./components/Popup/index.js"),q=require("./components/Checkbox/index.js"),f=require("./components/DivWithEdit/DivWithEdit.js"),S=require("./components/Icon/Icon.js"),A=require("./components/Icon/type.js"),K=require("./components/EmptyStateIndicator/EmptyStateIndicator.js"),w=require("./components/Input/Input.js"),D=require("./components/Model/index.js"),y=require("./components/Plugins/index.js"),L=require("./components/Switch/Switch.js"),b=require("./components/Toast/index.js"),k=require("./components/TUIContact/TUIContactList/TUIContactList.js"),E=require("./components/TUIContact/TUIContactInfo/TUIContactInfo.js"),G=require("./components/TUIContact/TUIContact.js"),H=require("./context/TUIKitContext.js"),z=require("./context/TUIChatStateContext.js"),W=require("./context/TUIChatActionContext.js"),R=require("./context/TUIMessageContext.js"),O=require("./context/ComponentContext.js"),N=require("./context/TUIMessageInputContext.js"),V=require("./context/TUIContactContext.js"),_=require("./hooks/useConversation.js"),B=require("./hooks/useProfile.js");exports.TUIKit=e.TUIKit,exports.useTUIKit=t.useTUIKit,exports.useCreateTUIKitContext=o.useCreateTUIKitContext,exports.TUIConversation=n.TUIConversation,exports.UnMemoizedTUIConversation=n.UnMemoizedTUIConversation,exports.TUIConversationList=s.TUIConversationList,exports.UnMemoTUIConversationList=s.UnMemoTUIConversationList,exports.TUIChat=r.TUIChat,exports.ConversationPreview=a.ConversationPreview,exports.ConversationPreviewContent=i.ConversationPreviewContent,exports.unMemoConversationPreviewContent=i.unMemoConversationPreviewContent,exports.TUIChatHeader=p.TUIChatHeader,exports.TUIChatHeaderDefault=I.TUIChatHeaderDefault,exports.TUIMessageList=u.TUIMessageList,exports.TUIMessage=C.TUIMessage,exports.MessagePlugins=T.MessagePlugins,exports.MessageContext=x.MessageContext,exports.TUIMessageInput=U.TUIMessageInput,exports.TUIMessageInputDefault=c.TUIMessageInputDefault,exports.InputPluginsDefalut=v.InputPluginsDefalut,exports.TUIProfile=m.TUIProfile,exports.TUIProfileDefault=d.TUIProfileDefault,exports.Avatar=g.Avatar,exports.defaultGroupAvatarAVChatRoom=l.defaultGroupAvatarAVChatRoom,exports.defaultGroupAvatarMeeting=l.defaultGroupAvatarMeeting,exports.defaultGroupAvatarPublic=l.defaultGroupAvatarPublic,exports.defaultGroupAvatarWork=l.defaultGroupAvatarWork,exports.defaultUserAvatar=l.defaultUserAvatar,exports.ConversationSearchInput=M.ConversationSearchInput,exports.ConversationSearchResult=h.ConversationSearchResult,exports.TUIManage=P.TUIManage,exports.Popup=j.Popup,exports.Checkbox=q.Checkbox,exports.DivWithEdit=f.DivWithEdit,exports.Icon=S.Icon,exports.changeTypeToIconClassName=S.changeTypeToIconClassName,Object.defineProperty(exports,"IconTypes",{enumerable:!0,get:function(){return A.IconTypes}}),exports.EmptyStateIndicator=K.EmptyStateIndicator,exports.Input=w.Input,exports.Model=D.Model,exports.Plugins=y.Plugins,exports.Switch=L.Switch,exports.Toast=b.Toast,exports.TUIContactList=k.TUIContactList,exports.TUIContactInfo=E.TUIContactInfo,exports.UnMemoizedTUIContactInfo=E.UnMemoizedTUIContactInfo,exports.TUIContact=G.TUIContact,exports.UnMemoizedTUIContact=G.UnMemoizedTUIContact,exports.TUIKitContext=H.TUIKitContext,exports.TUIKitProvider=H.TUIKitProvider,exports.useTUIKitContext=H.useTUIKitContext,exports.TUIChatStateContext=z.TUIChatStateContext,exports.TUIChatStateContextProvider=z.TUIChatStateContextProvider,exports.useTUIChatStateContext=z.useTUIChatStateContext,exports.TUIChatActionContext=W.TUIChatActionContext,exports.TUIChatActionProvider=W.TUIChatActionProvider,exports.useTUIChatActionContext=W.useTUIChatActionContext,exports.TUIMessageContext=R.TUIMessageContext,exports.TUIMessageContextProvider=R.TUIMessageContextProvider,Object.defineProperty(exports,"messageShowType",{enumerable:!0,get:function(){return R.messageShowType}}),exports.useTUIMessageContext=R.useTUIMessageContext,exports.ComponentContext=O.ComponentContext,exports.ComponentProvider=O.ComponentProvider,exports.useComponentContext=O.useComponentContext,exports.TUIMessageInputContext=N.TUIMessageInputContext,exports.TUIMessageInputContextProvider=N.TUIMessageInputContextProvider,exports.useTUIMessageInputContext=N.useTUIMessageInputContext,exports.TUIContactContext=V.TUIContactContext,exports.TUIContactContextProvider=V.TUIContactContextProvider,exports.useTUIContactContext=V.useTUIContactContext,exports.useConversation=_.useConversation,exports.useProfile=B.useProfile;
@@ -0,0 +1 @@
1
+ "use strict";module.exports={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",Friend:"Friend","Send Message":"Send Message",Signature:"Signature","New Contacts":"New Contacts","Blocked List":"Blocked List","No Result":"No Result",ID:"ID",User:"User","Add Friend":"Add Friend",remark:"remark",block:"block","Delete friend":"Delete friend","waiting for verification":"waiting for verification","verification info":"verification info","Send application":"Send application",Agree:"Agree"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Start chat":"Start chat","New one-to-one chat":"New one-to-one chat","New group chat":"New group chat","Enter a user ID":"Enter a user ID",Delete:"Delete","Conversation Information":"Conversation Information",Pin:"Pin",Unpin:"Unpin",Search:"Search","Add Participants":"Add Participants","No conversation":"No conversation",Next:"Next","Group Name":"Group Name","Group ID":"Group ID","Group Type":"Group Type",Participants:"Participants",Create:"Create",Details:"Details",Work:"Work",Public:"Public",Meeting:"Meeting",AVChatRoom:"AVChatRoom",Community:"Community","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.","Participant cannot be empty":"Participant cannot be empty"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"AllowType",NeedConfirm:"NeedConfirm",AllowAny:"AllowAny",DenyAny:"DenyAny",Birthday:"Birthday"};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={TUIChat:require("./TUIChat.js"),TUIConversation:require("./TUIConversation.js"),TUIContact:require("./TUIContact.js"),TUIProfile:require("./TUIProfile.js")};exports.message=e;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../node_modules/i18next/dist/esm/i18next.js");require("react"),require("../node_modules/@babel/runtime/helpers/extends.js"),require("../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../node_modules/react-i18next/dist/es/context.js");var s=require("../node_modules/react-i18next/dist/es/initReactI18next.js"),t=require("./en/index.js"),i=require("./zh_cn/index.js"),r={en:{translation:t.message},zh:{translation:i.message}};e.use(s.initReactI18next).init({resources:r,lng:"zh",interpolation:{escapeValue:!1}}),module.exports=e;
@@ -0,0 +1 @@
1
+ "use strict";module.exports={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",Friend:"我的好友","Send Message":"发送消息",Signature:"个性签名","Successful application, waiting for the administrator to agree to join the group application":"等待管理员同意","New Contacts":"新的联系人","Blocked List":"黑名单","No Result":"无搜索结果",ID:"ID",User:"联系人","Add Friend":"添加好友",remark:"备注",block:"加入黑名单","Delete friend":"删除好友","waiting for verification":"等待验证","verification info":"验证信息","Send application":"发送申请",Agree:"同意"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Start chat":"发起会话","New one-to-one chat":"发起单聊","New group chat":"发起群聊",Delete:"删除会话",Pin:"置顶会话",Unpin:"取消置顶","Conversation Information":"会话信息",Search:"搜索","Add Participants":"创建群聊","No conversation":"无会话",Next:"下一步","Group Name":"群名称","Group ID":"群 ID","Group Type":"群类型",Participants:"成员",Create:"创建",Details:"详情",Work:"好友工作群(Work)",Public:"陌生人社交群(Public)",Meeting:"临时会议群(Meeting)",AVChatRoom:"直播群(AVChatroom)",Community:"社群(Community)","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主同意。","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"创建后可以随意进出,最多支持100000人,支持历史消息存储,用户搜索群 ID 发起加群申请后,无需管理员审批即可进群。","Participant cannot be empty":"不能为空"};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日"};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={TUIChat:require("./TUIChat.js"),TUIConversation:require("./TUIConversation.js"),TUIContact:require("./TUIContact.js"),TUIProfile:require("./TUIProfile.js")};exports.message=e;
@@ -0,0 +1 @@
1
+ var r={exports:{}};export{r as _};
@@ -1,3 +1,4 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import React from 'react';
2
3
 
3
4
  interface onChangeParams {
@@ -11,6 +12,6 @@ interface SelectProps {
11
12
  value?: any;
12
13
  id?: string;
13
14
  }
14
- declare function Checkbox<T extends SelectProps>(props: React.PropsWithChildren<T>): JSX.Element;
15
+ declare function Checkbox<T extends SelectProps>(props: React.PropsWithChildren<T>): react_jsx_runtime.JSX.Element;
15
16
 
16
17
  export { Checkbox };
@@ -1 +1 @@
1
- import{__spreadArray as e,__assign as t,__awaiter as r,__generator as a}from"tslib";import{jsxs as i,Fragment as o,jsx as n}from"react/jsx-runtime";import{useState as c}from"react";import{Input as s}from"../Input/Input.js";import{Icon as u}from"../Icon/Icon.js";import{IconTypes as p}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultUserAvatar as m,defaultGroupAvatarAVChatRoom as d,defaultGroupAvatarMeeting as f,defaultGroupAvatarPublic as v,defaultGroupAvatarWork as g}from"../Avatar/default.js";import{PageStateTypes as h}from"./ConversationCreate.js";import{ConversationGroupTypeInfo as C,typeInfoList as N,GroupType as b}from"./ConversationGroupTypeInfo.js";import{useTUIKitContext as x}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function I(I){var y=this,j=I.profileList,k=I.pageState,P=I.setPageState,G=I.createConversation,T=I.setConversationCreated,A=x(),D=A.setActiveConversation,R=A.myProfile,w=e([],j,!0);w.unshift(R);var S=w.map((function(e){return e.nick||e.userID})).toString(),U=c(S.length>=15?"".concat(S.slice(0,12),"..."):S),L=U[0],O=U[1],W=c(""),_=W[0],E=W[1],M=c("Work"),Y=M[0],q=M[1],z=function(e,t){var r=e.target.value;switch(t){case"name":O(r);break;case"id":E(r);break;case"type":q(r)}};return k!==h.GROUP_TYPE?i(o,{children:[i("div",t({className:"tui-conversation-create-group-detail"},{children:[n("div",t({className:"create-group-box create-group-name"},{children:n(s,{maxLength:15,value:L,onChange:function(e){z(e,"name")},border:"bottom",customClassName:"input-group-name",clearable:!0,prefix:n("div",t({className:"input-group-title"},{children:"Group Name"}))})})),n("div",t({className:"create-group-box create-group-id"},{children:n(s,{border:"bottom",customClassName:"input-group-text",clearable:!0,value:_,onChange:function(e){z(e,"id")},prefix:n("div",t({className:"input-group-title"},{children:"Group ID"}))})})),n("div",t({className:"create-group-box create-group-type"},{children:n(s,{disabled:!0,border:"bottom",customClassName:"input-group-text",prefix:n("div",t({className:"input-group-title"},{children:"Group of type"})),suffix:n(u,{onClick:function(){P(h.GROUP_TYPE)},type:p.ARROW_RIGHT,width:7,height:12}),value:Y,onChange:function(e){z(e,"type")}})})),n("div",t({className:"create-group-illustrate"},{children:N.find((function(e){return e.type===Y})).des})),i("div",t({className:"create-group-portrait"},{children:[n("div",t({className:"create-group-portrait-title"},{children:"Participants"})),n("div",t({className:"create-group-portrait-info-container"},{children:j.map((function(e){var r=e.avatar,a=e.userID,o=e.nick;return i("div",t({className:"create-group-portrait-info"},{children:[n(l,{shape:"square",size:50,image:r||m}),n("div",t({className:"create-group-portrait-info-nick"},{children:o}))]}),a)}))}))]}))]})),n("div",t({className:"tui-conversation-create-next-container"},{children:n("div",t({role:"presentation",className:"tui-conversation-create-next",onClick:function(){return r(y,void 0,void 0,(function(){var e,t,r;return a(this,(function(a){switch(a.label){case 0:return e=j.map((function(e){return{userID:e.userID}})),t=function(e){switch(e){case"Work":return g;case"Public":return v;case"Meeting":return f;case"AVChatRoom":return d;default:return""}}(Y),[4,G({name:L,type:b[Y],groupID:_,avatar:t,memberList:e})];case 1:return r=a.sent(),D(r),T(!1),[2]}}))}))}},{children:"Create"}))}))]}):n(C,{groupType:Y,setGroupType:q,setPageState:P})}export{I as ConversationCreatGroupDetail};
1
+ import{__spreadArray as e,__assign as t,__awaiter as r,__generator as o}from"tslib";import{jsxs as a,Fragment as n,jsx as i}from"react/jsx-runtime";import{useState as s}from"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as c}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{Input as u}from"../Input/Input.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultUserAvatar as d,defaultGroupAvatarAVChatRoom as v,defaultGroupAvatarMeeting as f,defaultGroupAvatarPublic as g,defaultGroupAvatarWork as h}from"../Avatar/default.js";import{PageStateTypes as C}from"./ConversationCreate.js";import{ConversationGroupTypeInfo as x,typeInfoList as I,GroupType as b}from"./ConversationGroupTypeInfo.js";import{useTUIKitContext as N}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function T(T){var j=this,y=T.profileList,U=T.pageState,k=T.setPageState,P=T.createConversation,G=T.setConversationCreated,_=c().t,A=N(),D=A.setActiveConversation,R=A.myProfile,w=e([],y,!0);w.unshift(R);var S=w.map((function(e){return e.nick||e.userID})).toString(),L=s(S.length>=15?"".concat(S.slice(0,12),"..."):S),O=L[0],W=L[1],E=s(""),M=E[0],Y=E[1],q=s("Work"),z=q[0],H=q[1],K=function(e,t){var r=e.target.value;switch(t){case"name":W(r);break;case"id":Y(r);break;case"type":H(r)}};return U!==C.GROUP_TYPE?a(n,{children:[a("div",t({className:"tui-conversation-create-group-detail"},{children:[i("div",t({className:"create-group-box create-group-name"},{children:i(u,{maxLength:15,value:O,onChange:function(e){K(e,"name")},border:"bottom",customClassName:"input-group-name",clearable:!0,prefix:i("div",t({className:"input-group-title"},{children:_("TUIConversation.Group Name")}))})})),i("div",t({className:"create-group-box create-group-id"},{children:i(u,{border:"bottom",customClassName:"input-group-text",clearable:!0,value:M,onChange:function(e){K(e,"id")},prefix:i("div",t({className:"input-group-title"},{children:_("TUIConversation.Group ID")}))})})),i("div",t({className:"create-group-box create-group-type"},{children:i(u,{disabled:!0,border:"bottom",customClassName:"input-group-text",prefix:i("div",t({className:"input-group-title"},{children:_("TUIConversation.Group Type")})),suffix:i(p,{onClick:function(){k(C.GROUP_TYPE)},type:m.ARROW_RIGHT,width:7,height:12}),value:_("TUIConversation.".concat(z)),onChange:function(e){K(e,"type")}})})),i("div",t({className:"create-group-illustrate"},{children:_("TUIConversation.".concat(I.find((function(e){return e.type===z})).des))})),a("div",t({className:"create-group-portrait"},{children:[i("div",t({className:"create-group-portrait-title"},{children:_("TUIConversation.Participants")})),i("div",t({className:"create-group-portrait-info-container"},{children:y.map((function(e){var r=e.avatar,o=e.userID,n=e.nick;return a("div",t({className:"create-group-portrait-info"},{children:[i(l,{shape:"square",size:50,image:r||d}),i("div",t({className:"create-group-portrait-info-nick"},{children:n}))]}),o)}))}))]}))]})),i("div",t({className:"tui-conversation-create-next-container"},{children:i("div",t({role:"presentation",className:"tui-conversation-create-next",onClick:function(){return r(j,void 0,void 0,(function(){var e,t,r;return o(this,(function(o){switch(o.label){case 0:return e=y.map((function(e){return{userID:e.userID}})),t=function(e){switch(e){case"Work":return h;case"Public":return g;case"Meeting":return f;case"AVChatRoom":return v;default:return""}}(z),[4,P({name:O,type:b[z],groupID:M,avatar:t,memberList:e})];case 1:return r=o.sent(),D(r),G(!1),[2]}}))}))}},{children:_("TUIConversation.Create")}))}))]}):i(x,{groupType:z,setGroupType:H,setPageState:k})}export{T as ConversationCreatGroupDetail};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as i,useMemo as s}from"react";import{Icon as a}from"../Icon/Icon.js";import{IconTypes as n}from"../Icon/type.js";import{ConversationCreateUserSelectList as c}from"./ConversationCreateUserSelectList.js";import{ConversationCreatGroupDetail as C}from"./ConversationCreatGroupDetail.js";import{useTUIKitContext as E}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{useConversation as m}from"../../hooks/useConversation.js";var p;function f(f){var l=f.className,v=void 0===l?"":l,T=f.setConversationCreated,u=f.conversationList,S=void 0===u?[]:u,d=i(!1),L=d[0],h=d[1],R=i(p.USER_SELECT),U=R[0],_=R[1],I=i([]),j=I[0],A=I[1],x=E().chat,P=m(x).createConversation,G=function(){if(L)switch(U){case p.USER_SELECT:h(!1);break;case p.CREATE_DETAIL:_(p.USER_SELECT),A([]);break;case p.GROUP_TYPE:_(p.CREATE_DETAIL)}else T(!1)};return s((function(){return t(r,{children:[t("div",e({className:"tui-conversation-create-header"},{children:[o(a,{onClick:G,type:n.BACK,width:9,height:16}),o("div",e({className:"title"},{children:L?"Add Participants":"New Chat"}))]})),U===p.USER_SELECT?o(c,{isCreateGroup:L,setIsCreateGroup:h,className:v,selectList:j,setSelectList:A,conversationList:S,setConversationCreated:T,setPageState:_}):o(C,{pageState:U,setPageState:_,profileList:j.map((function(e){return e.profile})),createConversation:P,setConversationCreated:T})]})}),[L,j,U])}!function(e){e.USER_SELECT="Next",e.CREATE_DETAIL="Create",e.GROUP_TYPE="GroupType"}(p||(p={}));export{f as ConversationCreate,p as PageStateTypes};
1
+ import{__assign as e}from"tslib";import{jsxs as t,Fragment as o,jsx as r}from"react/jsx-runtime";import{useState as s,useMemo as i}from"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as n}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{Icon as a}from"../Icon/Icon.js";import{IconTypes as c}from"../Icon/type.js";import{ConversationCreateUserSelectList as m}from"./ConversationCreateUserSelectList.js";import{ConversationCreatGroupDetail as p}from"./ConversationCreatGroupDetail.js";import{useTUIKitContext as C}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{useConversation as d}from"../../hooks/useConversation.js";var l;function E(E){var u=E.className,f=void 0===u?"":u,v=E.setConversationCreated,T=E.conversationList,S=void 0===T?[]:T,h=n().t,L=s(!1),_=L[0],j=L[1],U=s(l.USER_SELECT),x=U[0],I=U[1],R=s([]),A=R[0],g=R[1],P=C().chat,G=d(P).createConversation,b=function(){if(_)switch(x){case l.USER_SELECT:j(!1);break;case l.CREATE_DETAIL:I(l.USER_SELECT),g([]);break;case l.GROUP_TYPE:I(l.CREATE_DETAIL)}else v(!1)};return i((function(){return t(o,{children:[t("div",e({className:"tui-conversation-create-header"},{children:[r(a,{onClick:b,type:c.BACK,width:9,height:16}),r("div",e({className:"title"},{children:h(_?"TUIConversation.Add Participants":"TUIConversation.Start chat")}))]})),x===l.USER_SELECT?r(m,{isCreateGroup:_,setIsCreateGroup:j,className:f,selectList:A,setSelectList:g,conversationList:S,setConversationCreated:v,setPageState:I}):r(p,{pageState:x,setPageState:I,profileList:A.map((function(e){return e.profile})),createConversation:G,setConversationCreated:v})]})}),[_,A,x])}!function(e){e.USER_SELECT="Next",e.CREATE_DETAIL="Create",e.GROUP_TYPE="GroupType"}(l||(l={}));export{E as ConversationCreate,l as PageStateTypes};
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as c}from"react/jsx-runtime";import{useState as a,useRef as s}from"react";import{Input as u}from"../Input/Input.js";import{Icon as l}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{ConversationCreateSelectView as p}from"./ConversationCreateSelectView.js";import{Avatar as d}from"../Avatar/Avatar.js";import{defaultUserAvatar as h}from"../Avatar/default.js";import{useConversationCreate as v}from"./hooks/useConversationCreate.js";import{useTUIKitContext as f}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{PageStateTypes as C}from"./ConversationCreate.js";import{useConversation as x}from"../../hooks/useConversation.js";import{Toast as g}from"../Toast/index.js";function N(N){var j=this,k=N.isCreateGroup,I=N.selectList,b=N.setSelectList,y=N.className,A=N.conversationList,L=N.setIsCreateGroup,S=N.setConversationCreated,D=N.setPageState,w=a(""),E=w[0],T=w[1],G=f(),R=G.chat,F=G.setActiveConversation,M=a({}),P=M[0],U=M[1],z=v(R,A,(function(e){U(e)})).getFriendListSortSearchResult,H=x(R).createConversation,K=s(new Map);return i(o,{children:[c(u,{className:"tui-conversation-create-search-input",placeholder:"Search",clearable:!0,value:E,onChange:function(e){return t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return t=e.target.value,T(t),n=U,[4,z(t)];case 1:return n.apply(void 0,[r.sent()]),[2]}}))}))},prefix:c(l,{type:m.SEARCH,height:16,width:16})}),k&&c(p,{selectList:I,setSelectList:b}),!k&&i("div",e({role:"presentation",className:"tui-user",onClick:function(){L(!0),K.current.clear(),b([])}},{children:[c(l,{type:m.ADD}),c("div",e({className:"tui-user-name active"},{children:"New Group"}))]})),c("div",e({className:"tui-conversation-create ".concat(y)},{children:c("div",e({className:"tui-conversation-create-container"},{children:c("div",e({className:"tui-group-container"},{children:Object.keys(P).map((function(o){return 0!==P[o].length&&i("div",e({className:"tui-group-box"},{children:[c("div",e({className:"title"},{children:o})),P[o].map((function(a,s){var u=a.userID,l=a.nick,m=a.avatar;return i("label",e({role:"presentation",className:"tui-user tui-user-checkbox-label",htmlFor:"userChecked-".concat(o,"-").concat(u),onClick:function(e){!function(e){t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return k?[2]:(t=e.userID,[4,H("C2C".concat(t))]);case 1:return n=r.sent(),S(!1),F(n),[2]}}))}))}(a)}},{children:[c(d,{size:30,image:m||h}),c("div",e({className:"tui-user-name"},{children:l||"".concat(u)})),k&&c("input",{onChange:function(e){!function(e,t,r){void 0===r&&(r=[]);var i=t.userID,o=e.target.checked;r.forEach((function(e){e.checked=o})),o?I.push({profile:t,domList:r}):I.splice(I.findIndex((function(e){return e.profile.userID===i})),1),b(n([],I,!0))}(e,a,K.current.get(u))},type:"checkbox",ref:function(e){!function(e,t){if(t){K.current.has(e)||K.current.set(e,[]);var r=K.current.get(e);0!==r.length&&r.some((function(e){return e.id===t.id}))||r.push(t)}}(u,e)},id:"userChecked-".concat(o,"-").concat(u),className:"tui-user-checkbox"})]}),u)}))]}),o)}))}))}))})),k&&c("div",e({className:"tui-conversation-create-next-container"},{children:c("div",e({role:"presentation",className:"tui-conversation-create-next",onClick:function(){I&&0===I.length?g({text:"Participant cannot be empty.",type:"error"}):D(C.CREATE_DETAIL)}},{children:"Next"}))}))]})}export{N as ConversationCreateUserSelectList};
1
+ import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as s}from"react/jsx-runtime";import{useState as a,useRef as c}from"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as u}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{Input as l}from"../Input/Input.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as d}from"../Icon/type.js";import{ConversationCreateSelectView as p}from"./ConversationCreateSelectView.js";import{Avatar as h}from"../Avatar/Avatar.js";import{defaultUserAvatar as v}from"../Avatar/default.js";import{useConversationCreate as f}from"./hooks/useConversationCreate.js";import{useTUIKitContext as C}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{PageStateTypes as x}from"./ConversationCreate.js";import{useConversation as g}from"../../hooks/useConversation.js";import{Toast as j}from"../Toast/index.js";function I(I){var N=this,b=I.isCreateGroup,k=I.selectList,y=I.setSelectList,T=I.className,A=I.conversationList,L=I.setIsCreateGroup,S=I.setConversationCreated,D=I.setPageState,w=u().t,U=a(""),E=U[0],_=U[1],R=C(),F=R.chat,G=R.setActiveConversation,M=a({}),P=M[0],z=M[1],H=f(F,A,(function(e){z(e)})).getFriendListSortSearchResult,K=g(F).createConversation,O=c(new Map);return i(o,{children:[s(l,{className:"tui-conversation-create-search-input",placeholder:w("TUIConversation.Search"),clearable:!0,value:E,onChange:function(e){return t(N,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return t=e.target.value,_(t),n=z,[4,H(t)];case 1:return n.apply(void 0,[r.sent()]),[2]}}))}))},prefix:s(m,{type:d.SEARCH,height:16,width:16})}),b&&s(p,{selectList:k,setSelectList:y}),!b&&i("div",e({role:"presentation",className:"tui-user",onClick:function(){L(!0),O.current.clear(),y([])}},{children:[s(m,{type:d.ADD}),s("div",e({className:"tui-user-name active"},{children:w("TUIConversation.New group chat")}))]})),s("div",e({className:"tui-conversation-create ".concat(T)},{children:s("div",e({className:"tui-conversation-create-container"},{children:s("div",e({className:"tui-group-container"},{children:Object.keys(P).map((function(o){return 0!==P[o].length&&i("div",e({className:"tui-group-box"},{children:[s("div",e({className:"title"},{children:o})),P[o].map((function(a,c){var u=a.userID,l=a.nick,m=a.avatar;return i("label",e({role:"presentation",className:"tui-user tui-user-checkbox-label",htmlFor:"userChecked-".concat(o,"-").concat(u),onClick:function(e){!function(e){t(N,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return b?[2]:(t=e.userID,[4,K("C2C".concat(t))]);case 1:return n=r.sent(),S(!1),G(n),[2]}}))}))}(a)}},{children:[s(h,{size:30,image:m||v}),s("div",e({className:"tui-user-name"},{children:l||"".concat(u)})),b&&s("input",{onChange:function(e){!function(e,t,r){void 0===r&&(r=[]);var i=t.userID,o=e.target.checked;r.forEach((function(e){e.checked=o})),o?k.push({profile:t,domList:r}):k.splice(k.findIndex((function(e){return e.profile.userID===i})),1),y(n([],k,!0))}(e,a,O.current.get(u))},type:"checkbox",ref:function(e){!function(e,t){if(t){O.current.has(e)||O.current.set(e,[]);var r=O.current.get(e);0!==r.length&&r.some((function(e){return e.id===t.id}))||r.push(t)}}(u,e)},id:"userChecked-".concat(o,"-").concat(u),className:"tui-user-checkbox"})]}),u)}))]}),o)}))}))}))})),b&&s("div",e({className:"tui-conversation-create-next-container"},{children:s("div",e({role:"presentation",className:"tui-conversation-create-next",onClick:function(){k&&0===k.length?j({text:w("TUIConversation.Participant cannot be empty"),type:"error"}):D(x.CREATE_DETAIL)}},{children:w("TUIConversation.Next")}))}))]})}export{I as ConversationCreateUserSelectList};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsxs as o,jsx as t}from"react/jsx-runtime";import{PageStateTypes as n}from"./ConversationCreate.js";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as i}from"../Icon/type.js";var a;!function(e){e.Work="Private",e.Public="Public",e.Meeting="ChatRoom",e.AVChatRoom="AVChatRoom"}(a||(a={}));var s=[{type:"Work",des:"Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details."},{type:"Public",des:"After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details."},{type:"Meeting",des:"After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details."},{type:"AVChatRoom",des:"After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details."}];function c(a){var c=a.groupType,u=a.setGroupType,p=a.setPageState;return o("div",e({className:"tui-conversation-group-type-info"},{children:[s.map((function(a){var s=a.type,d=a.des;return o("div",e({role:"presentation",className:"group-type-info-box ".concat(s===c?"group-type-info-box--active":""," "),onClick:function(){!function(e){u(e),p(n.CREATE_DETAIL)}(s)}},{children:[o("div",e({className:"group-type-info-title"},{children:[s===c&&t(r,{className:"box-active-icon",type:i.RIGHT,width:16,height:16}),s]})),t("div",e({className:"group-type-info-description"},{children:d}))]}),s)})),t("a",e({className:"group-type-info-document",target:"_blank",href:"https://www.tencentcloud.com/document/product/1047/33515?lang=en&pg=#group-features",rel:"bookmark noreferrer"},{children:"Details"}))]}))}export{c as ConversationGroupTypeInfo,a as GroupType,s as typeInfoList};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as n}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{PageStateTypes as r}from"./ConversationCreate.js";import{Icon as i}from"../Icon/Icon.js";import{IconTypes as a}from"../Icon/type.js";var s;!function(e){e.Work="Private",e.Public="Public",e.Meeting="ChatRoom",e.AVChatRoom="AVChatRoom",e.Community="Community"}(s||(s={}));var c=[{type:"Work",des:"Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details."},{type:"Public",des:"After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details."},{type:"Meeting",des:"After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details."},{type:"AVChatRoom",des:"After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details."},{type:"Community",des:"After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details."}];function p(s){var p=s.groupType,u=s.setGroupType,d=s.setPageState,m=n().t;return t("div",e({className:"tui-conversation-group-type-info"},{children:[c.map((function(n){var s=n.type,c=n.des;return t("div",e({role:"presentation",className:"group-type-info-box ".concat(s===p?"group-type-info-box--active":""," "),onClick:function(){!function(e){u(e),d(r.CREATE_DETAIL)}(s)}},{children:[t("div",e({className:"group-type-info-title"},{children:[s===p&&o(i,{className:"box-active-icon",type:a.RIGHT,width:16,height:16}),m("TUIConversation.".concat(s))]})),o("div",e({className:"group-type-info-description"},{children:m("TUIConversation.".concat(c))}))]}),s)})),o("a",e({className:"group-type-info-document",target:"_blank",href:"https://www.tencentcloud.com/document/product/1047/33515?lang=en&pg=#group-features",rel:"bookmark noreferrer"},{children:m("TUIConversation.Details")}))]}))}export{p as ConversationGroupTypeInfo,s as GroupType,c as typeInfoList};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e}from"tslib";import{useState as r,useEffect as o}from"react";import n from"@tencentcloud/chat";import{strChineseFirstPy as i}from"../static/word.js";import"react/jsx-runtime";import"../../../context/TUIMessageContext.js";import"../../Icon/config.js";import"../../Icon/type.js";import"date-fns";import"../ConversationCreate.js";import"../ConversationGroupTypeInfo.js";import"../../TUIProfile/TUIProfileDefault.js";import"../../../constants.js";import"../../TUIMessage/hooks/useMessageReply.js";import"../../TUIMessage/MessagePlugins.js";import"../../TUIMessage/MessageContext.js";import"../../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../../Switch/Switch.js";import{useProfile as s}from"../../../hooks/useProfile.js";var c=function(c,u,a){var f=r({}),p=f[0],l=f[1],m=function(t){var e=t.trim(),r=e.charCodeAt(0);return r>40869||r<19968?e.charAt(0):i.charAt(r-19968)},d=function(){return t(void 0,void 0,void 0,(function(){var t,r,o,i,s;return e(this,(function(e){switch(e.label){case 0:return t=u.filter((function(t){return t.type===n.TYPES.CONV_C2C})).slice(0,5).map((function(t){return t.userProfile})),[4,c.getFriendList()];case 1:return r=e.sent(),o=r.code,i=r.data,0===o&&(s=h(i.map((function(t){return t.profile})),t),l(s),a&&a(s,l)),[2]}}))}))},h=function(t,e){void 0===e&&(e=[]);for(var r={"Frequently Contacted":e,"#":[]},o=65;o<=90;o+=1)r[String.fromCharCode(o)]=[];return t.forEach((function(t){var e=t.nick,o=t.userID,n=m(e||o);n>="a"&&n<="z"?r[n.toLocaleUpperCase()].push(t):n<"A"||n>"z"?r["#"].push(t):r[n].push(t)})),Object.keys(r).forEach((function(t){r[t].sort((function(t,e){var r=t.nick,o=t.userID,n=e.nick,i=e.userID;return r||o<n||i||r||o===n||i?1:-1}))})),r},v=s(c).getUserProfile;return o((function(){d()}),[c]),{getFirstLetter:m,queryFriendList:d,getFriendListSortSearchResult:function(r){return t(void 0,void 0,void 0,(function(){var t,o,n,i;return e(this,(function(e){switch(e.label){case 0:return r?[4,v([r])]:[2,p];case 1:return t=e.sent().data,o={},n=!1,Object.keys(p).forEach((function(t){o[t]=p[t].filter((function(t){var e=t.nick,o=t.userID,i=e.toLocaleLowerCase(),s=r.toLocaleLowerCase(),c=i?i.includes(s):o.includes(s);return n=n||c,c}))})),"TencentCloudDemo"===(null===(i=process.env)||void 0===i?void 0:i.REACT_APP_ONLINE)?[2,o]:[2,n?o:h(t)]}}))}))},friendListSortResult:p}};export{c as useConversationCreate};
1
+ import{__awaiter as e,__generator as t}from"tslib";import{useState as r,useEffect as o}from"react";import s from"@tencentcloud/chat";import{strChineseFirstPy as n}from"../static/word.js";import"react/jsx-runtime";import"../../../node_modules/@babel/runtime/helpers/extends.js";import"../../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../../node_modules/react-i18next/dist/es/context.js";import"../../../context/TUIMessageContext.js";import"../../Icon/config.js";import"../../Icon/type.js";import"date-fns";import"date-fns/locale";import"../ConversationCreate.js";import"../ConversationGroupTypeInfo.js";import"../../TUIProfile/TUIProfileDefault.js";import"../../../constants.js";import"../../TUIMessage/hooks/useMessageReply.js";import"../../TUIMessage/MessagePlugins.js";import"../../TUIMessage/MessageContext.js";import"../../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../../Switch/Switch.js";import"../../../locales/index.js";import{useProfile as i}from"../../../hooks/useProfile.js";var a=function(a,c,u){var f=r({}),p=f[0],m=f[1],l=function(e){var t=e.trim(),r=t.charCodeAt(0);return r>40869||r<19968?t.charAt(0):n.charAt(r-19968)},d=function(){return e(void 0,void 0,void 0,(function(){var e,r,o,n;return t(this,(function(t){switch(t.label){case 0:return c.filter((function(e){return e.type===s.TYPES.CONV_C2C})).slice(0,5).map((function(e){return e.userProfile})),[4,a.getFriendList()];case 1:return e=t.sent(),r=e.code,o=e.data,0===r&&(n=h(o.map((function(e){return e.profile}))),m(n),u&&u(n,m)),[2]}}))}))},h=function(e,t){for(var r={"#":[]},o=65;o<=90;o+=1)r[String.fromCharCode(o)]=[];return e.forEach((function(e){var t=e.nick,o=e.userID,s=l(t||o);s>="a"&&s<="z"?r[s.toLocaleUpperCase()].push(e):s<"A"||s>"z"?r["#"].push(e):r[s].push(e)})),Object.keys(r).forEach((function(e){r[e].sort((function(e,t){var r=e.nick,o=e.userID,s=t.nick,n=t.userID;return r||o<s||n||r||o===s||n?1:-1}))})),r},j=i(a).getUserProfile;return o((function(){d()}),[a]),{getFirstLetter:l,queryFriendList:d,getFriendListSortSearchResult:function(r){return e(void 0,void 0,void 0,(function(){var e,o,s,n;return t(this,(function(t){switch(t.label){case 0:return r?[4,j([r])]:[2,p];case 1:return e=t.sent().data,o={},s=!1,Object.keys(p).forEach((function(e){o[e]=p[e].filter((function(e){var t=e.nick,o=e.userID,n=t.toLocaleLowerCase(),i=r.toLocaleLowerCase(),a=n?n.includes(i):o.includes(i);return s=s||a,a}))})),"TencentCloudDemo"===(null===(n=process.env)||void 0===n?void 0:n.REACT_APP_ONLINE)?[2,o]:[2,s?o:h(e)]}}))}))},friendListSortResult:p}};export{a as useConversationCreate};
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsx as o}from"react/jsx-runtime";import{useState as e,useEffect as i}from"react";import{useTUIKitContext as n}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{ConversationPreviewContent as r}from"./ConversationPreviewContent.js";import{getDisplayImage as a,getDisplayTitle as s,getDisplayMessage as v,getDisplayTime as m}from"./utils.js";function c(c){var l=c.activeConversation,u=c.conversation,p=c.Preview,d=void 0===p?r:p,C=c.searchValue,f=c.conversationUpdateCount,x=n("ConversationPreview"),j=x.setActiveConversation,y=x.myProfile,I=e(a(u)),P=I[0],T=I[1],g=e(s(u,C)),w=g[0],U=g[1],A=e(v(u,y)),D=A[0],M=A[1],b=e(m(u)),h=b[0],K=b[1],V=e(u.unreadCount),k=V[0],q=V[1],z=(null==l?void 0:l.conversationID)===(null==u?void 0:u.conversationID);return d?(i((function(){U(s(u,C)),M(v(u,y)),T(a(u)),K(m(u)),q(u.unreadCount)}),[u,C,f]),o(d,t({},c,{active:z,displayImage:P,displayTitle:w,displayMessage:D,displayTime:h,unread:k,setActiveConversation:j}))):null}export{c as ConversationPreview};
1
+ import{__assign as o}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useState as e,useEffect as n}from"react";import{useTUIKitContext as i}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{ConversationPreviewContent as r}from"./ConversationPreviewContent.js";import{getDisplayImage as a,getDisplayTitle as s,getDisplayMessage as v,getDisplayTime as m}from"./utils.js";function l(l){var u=l.activeConversation,c=l.conversation,p=l.Preview,C=void 0===p?r:p,d=l.searchValue,f=l.conversationUpdateCount,x=i("TUIConversation").language,I=i("ConversationPreview"),g=I.setActiveConversation,j=I.myProfile,y=e(a(c)),T=y[0],P=y[1],U=e(s(c,d)),w=U[0],A=U[1],D=e(v(c,j,x)),M=D[0],b=D[1],h=e(m(c,x)),K=h[0],V=h[1],k=e(c.unreadCount),q=k[0],z=k[1],B=(null==u?void 0:u.conversationID)===(null==c?void 0:c.conversationID);return C?(n((function(){A(s(c,d)),b(v(c,j,x)),P(a(c)),V(m(c,x)),z(c.unreadCount)}),[c,d,f,x]),t(C,o({},l,{active:B,displayImage:T,displayTitle:w,displayMessage:M,displayTime:K,unread:q,setActiveConversation:g}))):null}export{l as ConversationPreview};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import i,{useRef as t,useState as a}from"react";import{Avatar as r}from"../Avatar/Avatar.js";import{Icon as s}from"../Icon/Icon.js";import{IconTypes as c}from"../Icon/type.js";import{Plugins as l}from"../Plugins/index.js";import{useConversation as m}from"../../hooks/useConversation.js";import{useTUIKitContext as d}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function v(i){var v=i.conversation,p=i.Avatar,u=void 0===p?r:p,h=i.displayImage,f=i.displayTitle,C=i.displayMessage,N=i.displayTime,g=i.unread,P=i.active,x=i.setActiveConversation,I=t(null),j=P?"conversation-preview-content--active":"",w=g&&g>=1?"conversation-preview-content--unread":"",y=v.isPinned?"conversation-preview-content--pin":"",b=a(!1),M=b[0],k=b[1],A=d("ConversationPreviewContent"),T=A.chat,D=A.conversation,E=m(T),F=E.pinConversation,U=E.deleteConversation,z=function(e){var n=v.conversationID,o=v.isPinned;switch(e){case"pin":F({conversationID:n,isPinned:!o});break;case"delete":U(n),v===D&&x(null)}};return n("button",e({type:"button","aria-selected":P,role:"option",className:"conversation-preview-container ".concat(j," ").concat(w," ").concat(y),onClick:function(){x&&x(v),(null==I?void 0:I.current)&&I.current.blur()},onMouseEnter:function(){k(!0)},onMouseLeave:function(){k(!1)},ref:I},{children:[o("div",e({className:"avatar"},{children:o(u,{image:h,name:f,size:40})})),n("div",e({className:"content"},{children:[o("div",e({className:"title"},{children:f})),o("div",e({className:"message"},{children:C}))]})),n("div",e({className:"external"},{children:[o("div",g?e({className:"unread"},{children:g<=99?g:"99+"}):{className:"unread"}),o("div",M?e({className:"".concat(M?"more--hover":"more")},{children:o(l,{customClass:"more-handle-box",plugins:[o("div",e({role:"presentation",className:"more-handle-item",onClick:function(e){e.stopPropagation(),z("pin")}},{children:v.isPinned?"Cancel Pin":"Pin"})),o("div",e({className:"more-handle-item",style:{color:"#FF584C"},onClick:function(e){e.stopPropagation(),z("delete")},role:"presentation"},{children:"Delete"}))],showNumber:0,MoreIcon:o(s,{className:"icon-more",width:16,height:16,type:c.MORE})})}):e({className:"time"},{children:N}))]}))]}))}var p=i.memo(v);export{p as ConversationPreviewContent,v as unMemoConversationPreviewContent};
1
+ import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t,{useRef as i,useState as r}from"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as s}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{Avatar as a}from"../Avatar/Avatar.js";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as l}from"../Icon/type.js";import{Plugins as m}from"../Plugins/index.js";import{useConversation as d}from"../../hooks/useConversation.js";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function p(t){var p=t.conversation,u=t.Avatar,h=void 0===u?a:u,f=t.displayImage,C=t.displayTitle,N=t.displayMessage,x=t.displayTime,g=t.unread,j=t.active,I=t.setActiveConversation,y=s().t,b=i(null),P=j?"conversation-preview-content--active":"",w=g&&g>=1?"conversation-preview-content--unread":"",T=p.isPinned?"conversation-preview-content--pin":"",M=r(!1),U=M[0],k=M[1],A=v("ConversationPreviewContent"),_=A.chat,D=A.conversation,E=d(_),F=E.pinConversation,z=E.deleteConversation,K=function(e){var n=p.conversationID,o=p.isPinned;switch(e){case"pin":F({conversationID:n,isPinned:!o});break;case"delete":z(n),p===D&&I(null)}};return n("button",e({type:"button","aria-selected":j,role:"option",className:"conversation-preview-container ".concat(P," ").concat(w," ").concat(T),onClick:function(){I&&I(p),(null==b?void 0:b.current)&&b.current.blur()},onMouseEnter:function(){k(!0)},onMouseLeave:function(){k(!1)},ref:b},{children:[o("div",e({className:"avatar"},{children:o(h,{image:f,name:C,size:40})})),n("div",e({className:"content"},{children:[o("div",e({className:"title"},{children:C})),o("div",e({className:"message"},{children:N}))]})),n("div",e({className:"external"},{children:[o("div",g?e({className:"unread"},{children:g<=99?g:"99+"}):{className:"unread"}),o("div",U?e({className:"".concat(U?"more--hover":"more")},{children:o(m,{customClass:"more-handle-box",plugins:[o("div",e({role:"presentation",className:"more-handle-item",onClick:function(e){e.stopPropagation(),K("pin")}},{children:y(p.isPinned?"TUIConversation.Unpin":"TUIConversation.Pin")})),o("div",e({className:"more-handle-item",style:{color:"#FF584C"},onClick:function(e){e.stopPropagation(),K("delete")},role:"presentation"},{children:y("TUIConversation.Delete")}))],showNumber:0,MoreIcon:o(c,{className:"icon-more",width:16,height:16,type:l.MORE})})}):e({className:"time"},{children:x}))]}))]}))}var u=t.memo(p);export{u as ConversationPreviewContent,p as unMemoConversationPreviewContent};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{isThisYear as a,format as o,isToday as n,isYesterday as c,formatDistance as i,isThisWeek as s}from"date-fns";import l from"@tencentcloud/chat";import"react";import"../Icon/config.js";import"../Icon/type.js";import{defaultGroupAvatarWork as u,defaultUserAvatar as d}from"../Avatar/default.js";import{formatEmojiString as p}from"../TUIMessage/utils/emojiMap.js";var f=function(a,o,n){void 0===n&&(n="#147AFF");var c=v(a),i=c.name,s=c.nick,u=c.groupID,d=c.userID,p="";switch(a.type){case l.TYPES.CONV_C2C:p=s||d;break;case l.TYPES.CONV_GROUP:p=i||u;break;default:p=""}var f,m;return o?(m=(f=p).toLocaleLowerCase().indexOf(o.toLocaleLowerCase()),r("div",{children:[t("span",{children:f.slice(0,m)}),t("span",e({style:{color:n}},{children:f.slice(m,m+o.length)})),t("span",{children:f.slice(m+o.length)})]})):p},m=function(e){var r=e.type,t=v(e).avatar,a=t;if(!t)switch(r){case l.TYPES.CONV_C2C:a=d;break;case l.TYPES.CONV_GROUP:default:a=u}return a},C=function(a,o){var n=a.lastMessage,c=a.type,i=n.fromAccount,s=n.nick,u=n.nameCard,d=n.isRevoked,f="";switch(c){case l.TYPES.CONV_GROUP:f=(null==n?void 0:n.fromAccount)===(null==o?void 0:o.userID)?"You":"".concat(u||s||i||""),f="".concat(f?"".concat(f,":"):"");break;case l.TYPES.CONV_C2C:f=d?"you ":""}return r("div",e({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[t("span",{children:f}),t("span",{children:n.isRevoked?"recalled a message":p(n.messageForShow,1)})]}))},v=function(e){if(!e)return null;var r={},t=e.type,a=e.groupProfile,o=e.userProfile;switch(t){case l.TYPES.CONV_C2C:r=o;break;case l.TYPES.CONV_GROUP:r=a;case l.TYPES.CONV_SYSTEM:}return r},h=function(e){var r=e.lastMessage;return O(1e3*r.lastTime)},O=function(e){return e?a(e)?n(e)?o(e,"p"):c(e)?i(e,new Date):s(e)?o(e,"eeee"):o(e,"MMM dd"):o(e,"yyyy MMM dd"):""};export{m as getDisplayImage,C as getDisplayMessage,h as getDisplayTime,f as getDisplayTitle,v as getMessageProfile,O as getTimeStamp};
1
+ import{__assign as e}from"tslib";import{jsxs as r,jsx as a}from"react/jsx-runtime";import t from"@tencentcloud/chat";import"react";import"../Icon/config.js";import"../Icon/type.js";import{defaultGroupAvatarWork as o,defaultUserAvatar as s}from"../Avatar/default.js";import{formatEmojiString as c}from"../TUIMessage/utils/emojiMap.js";import{getTimeStamp as i}from"../untils.js";var n=function(o,s,c){void 0===c&&(c="#147AFF");var i=p(o),n=i.name,l=i.nick,u=i.groupID,m=i.userID,f=o.type,d=o.remark,C="";switch(f){case t.TYPES.CONV_C2C:C=d||l||m;break;case t.TYPES.CONV_GROUP:C=n||u;break;default:C=""}var v,h;return s?(h=(v=C).toLocaleLowerCase().indexOf(s.toLocaleLowerCase()),r("div",{children:[a("span",{children:v.slice(0,h)}),a("span",e({style:{color:c}},{children:v.slice(h,h+s.length)})),a("span",{children:v.slice(h+s.length)})]})):C},l=function(e){var r=e.type,a=p(e).avatar,c=a;if(!a)switch(r){case t.TYPES.CONV_C2C:c=s;break;case t.TYPES.CONV_GROUP:default:c=o}return c},u=function(o,s,i){var n=o.lastMessage,l=o.type,u=n.fromAccount,p=n.nick,m=n.nameCard,f=n.isRevoked,d="";switch(l){case t.TYPES.CONV_GROUP:d=(null==n?void 0:n.fromAccount)===(null==s?void 0:s.userID)?"You":"".concat(m||p||u||""),d="".concat(d?"".concat(d,":"):"");break;case t.TYPES.CONV_C2C:d=f?"you ":""}return r("div",e({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[a("span",{children:d}),a("span",{children:n.isRevoked?"recalled a message":c(n.messageForShow,1,i)})]}))},p=function(e){if(!e)return null;var r={},a=e.type,o=e.groupProfile,s=e.userProfile;switch(a){case t.TYPES.CONV_C2C:r=s;break;case t.TYPES.CONV_GROUP:r=o;case t.TYPES.CONV_SYSTEM:}return r},m=function(e,r){var a=e.lastMessage;return i(1e3*a.lastTime,r)};export{l as getDisplayImage,u as getDisplayMessage,m as getDisplayTime,n as getDisplayTitle,p as getMessageProfile};
@@ -1,5 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { InputProps } from '../Input/Input.js';
2
3
 
3
- declare function ConversationSearchInput(props: InputProps): JSX.Element;
4
+ declare function ConversationSearchInput(props: InputProps): react_jsx_runtime.JSX.Element;
4
5
 
5
6
  export { ConversationSearchInput };
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as o}from"../Icon/type.js";import{Input as a}from"../Input/Input.js";function t(t){var n=t.className,c=void 0===n?"":n,i=t.placeholder,p=t.clearable,l=t.value,m=t.onChange,s=t.prefix,h=void 0===s?e(r,{type:o.SEARCH,height:16,width:16}):s;return e(a,{className:"conversation-search-input ".concat(c),placeholder:i||"Search",clearable:p,value:l,onChange:m,prefix:h})}export{t as ConversationSearchInput};
1
+ import{jsx as e}from"react/jsx-runtime";import"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{useTranslation as t}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{Icon as o}from"../Icon/Icon.js";import{IconTypes as r}from"../Icon/type.js";import{Input as n}from"../Input/Input.js";function s(s){var i=s.className,a=void 0===i?"":i,m=s.placeholder,p=s.clearable,l=s.value,c=s.onChange,d=s.prefix,u=void 0===d?e(o,{type:r.SEARCH,height:16,width:16}):d,h=t().t;return e(n,{className:"conversation-search-input ".concat(a),placeholder:m||h("TUIConversation.Search"),clearable:p,value:l,onChange:c,prefix:u})}export{s as ConversationSearchInput};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{ConversationPreview as t}from"../ConversationPreview/ConversationPreview.js";import"react";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as n}from"../Icon/type.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import"date-fns";import"../TUIProfile/TUIProfileDefault.js";import"../../constants.js";import"../TUIMessage/hooks/useMessageReply.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import"../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../Switch/Switch.js";function i(i){var a=i.result,c=i.searchValue,m=i.Preview;return o("div",{children:0===(null==a?void 0:a.length)?s("div",e({className:"conversation-search-result no-result"},{children:[o(r,{className:"no-result-icon",type:n.CRY,width:42,height:42}),o("span",e({className:"no-result-message"},{children:'No results for "'.concat(c,'"')}))]})):a.map((function(s){return o(t,e({searchValue:c},{conversation:s,Preview:m}),s.conversationID)}))})}export{i as ConversationSearchResult};
1
+ import{__assign as e}from"tslib";import{jsx as s,jsxs as t}from"react/jsx-runtime";import{ConversationPreview as o}from"../ConversationPreview/ConversationPreview.js";import"react";import"../../node_modules/@babel/runtime/helpers/extends.js";import"../../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../../node_modules/react-i18next/dist/es/context.js";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as i}from"../Icon/type.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import"date-fns";import"date-fns/locale";import"../TUIProfile/TUIProfileDefault.js";import"../../constants.js";import"../TUIMessage/hooks/useMessageReply.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import"../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../Switch/Switch.js";import"../../locales/index.js";function n(n){var a=n.result,m=n.searchValue,l=n.Preview;return s("div",{children:0===(null==a?void 0:a.length)?t("div",e({className:"conversation-search-result no-result"},{children:[s(r,{className:"no-result-icon",type:i.CRY,width:42,height:42}),s("span",e({className:"no-result-message"},{children:'No results for "'.concat(m,'"')}))]})):a.map((function(t){return s(o,e({searchValue:m},{conversation:t,Preview:l}),t.conversationID)}))})}export{n as ConversationSearchResult};
@@ -1,3 +1,4 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { PropsWithChildren } from 'react';
2
3
 
3
4
  interface DivWithEditProps {
@@ -11,6 +12,6 @@ interface DivWithEditProps {
11
12
  toggle?: (name: string) => void;
12
13
  close?: () => void;
13
14
  }
14
- declare function DivWithEdit<T extends DivWithEditProps>(props: PropsWithChildren<T>): JSX.Element;
15
+ declare function DivWithEdit<T extends DivWithEditProps>(props: PropsWithChildren<T>): react_jsx_runtime.JSX.Element;
15
16
 
16
17
  export { DivWithEdit };
@@ -1,10 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import { PropsWithChildren } from 'react';
2
3
 
3
4
  interface EmptyStateIndicatorProps {
4
5
  /** List Type: conversation | message */
5
6
  listType?: 'conversation' | 'message' | 'chat';
6
7
  }
7
- declare function UnMemoizedEmptyStateIndicator<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>): JSX.Element;
8
+ declare function UnMemoizedEmptyStateIndicator<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>): react_jsx_runtime.JSX.Element;
8
9
  declare const EmptyStateIndicator: typeof UnMemoizedEmptyStateIndicator;
9
10
 
10
11
  export { EmptyStateIndicator, EmptyStateIndicatorProps };
@@ -1,3 +1,4 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import React from 'react';
2
3
  import { IconTypes } from './type.js';
3
4
 
@@ -9,6 +10,6 @@ interface IconProps {
9
10
  onClick?: (event: React.BaseSyntheticEvent) => void;
10
11
  className?: string;
11
12
  }
12
- declare function Icon(props: React.PropsWithChildren<IconProps>): JSX.Element;
13
+ declare function Icon(props: React.PropsWithChildren<IconProps>): react_jsx_runtime.JSX.Element;
13
14
 
14
15
  export { Icon, IconProps, changeTypeToIconClassName };
@@ -1 +1 @@
1
- import i from"./images/more.png.js";import m from"./images/create.png.js";import s from"./images/clear.png.js";import r from"./images/search.png.js";import o from"./images/back.png.js";import a from"./images/emoji.png.js";import e from"./images/progress.png.js";import t from"./images/file.png.js";import c from"./images/add.png.js";import n from"./images/image.png.js";import l from"./images/video.png.js";import u from"./images/document.png.js";import p from"./images/star.png.js";import g from"./images/copy.png.js";import N from"./images/del.png.js";import f from"./images/forward.png.js";import k from"./images/reply.png.js";import j from"./images/close.png.js";import E from"./images/arrow-right.png.js";import R from"./images/right.png.js";import d from"./images/ellipse.png.js";import O from"./images/cancel.png.js";import I from"./images/arrow-down.png.js";import C from"./images/edit.png.js";import A from"./images/confirm.png.js";import v from"./images/camera.png.js";import L from"./images/quote.png.js";import D from"./images/revocation.png.js";import T from"./images/effort.png.js";import w from"./images/cry.png.js";import M from"./images/send.png.js";import U from"./images/owner.png.js";import y from"./images/living.png.js";import S from"./images/member.png.js";import h from"./images/like.png.js";import V from"./images/unlike.png.js";import F from"./images/liked.png.js";import G from"./images/unliked.png.js";import K from"./images/union.png.js";import W from"./images/ununion.png.js";import b from"./images/vector.png.js";import P from"./images/unvector.png.js";import H from"./images/voice.png.js";import{IconTypes as Y}from"./type.js";var q,B=((q={})[Y.MORE]={url:i,className:"tui-kit-icon-more"},q[Y.CREATE]={url:m,className:"tui-kit-icon-create"},q[Y.CLEAR]={url:s,className:"tui-kit-icon-clear"},q[Y.SEARCH]={url:r,className:"tui-kit-icon-search"},q[Y.BACK]={url:o,className:"tui-kit-icon-back"},q[Y.EMOJI]={url:a,className:"tui-kit-icon-emoji"},q[Y.PROGRESS]={url:e,className:"tui-kit-icon-progress"},q[Y.FILE]={url:t,className:"tui-kit-icon-file"},q[Y.ADD]={url:c,className:"tui-kit-icon-add"},q[Y.IMAGE]={url:n,className:"tui-kit-icon-image"},q[Y.VIDEO]={url:l,className:"tui-kit-icon-video"},q[Y.DOCUMENT]={url:u,className:"tui-kit-icon-document"},q[Y.STAR]={url:p,className:"tui-kit-icon-star"},q[Y.COPY]={url:g,className:"tui-kit-icon-copy"},q[Y.DEL]={url:N,className:"tui-kit-icon-del"},q[Y.FORWARD]={url:f,className:"tui-kit-icon-forward"},q[Y.REPLY]={url:k,className:"tui-kit-icon-reply"},q[Y.CLOSE]={url:j,className:"tui-kit-icon-close"},q[Y.ARROW_RIGHT]={url:E,className:"tui-kit-icon-arrow-right"},q[Y.RIGHT]={url:R,className:"tui-kit-icon-right"},q[Y.ELLIPSE]={url:d,className:"tui-kit-icon-ellipse"},q[Y.CANCEL]={url:O,className:"tui-kit-icon-cancel"},q[Y.ARROW_DOWN]={url:I,className:"tui-kit-icon-arrow-down"},q[Y.EDIT]={url:C,className:"tui-kit-icon-edit"},q[Y.CONFIRM]={url:A,className:"tui-kit-icon-confirm"},q[Y.CAMERA]={url:v,className:"tui-kit-icon-camera"},q[Y.QUOTE]={url:L,className:"tui-kit-icon-quote"},q[Y.REVOCATION]={url:D,className:"tui-kit-icon-revocation"},q[Y.EFFORT]={url:T,className:"tui-kit-icon-effort"},q[Y.CRY]={url:w,className:"tui-kit-icon-cry"},q[Y.OWNER]={url:U,className:"tui-kit-icon-owner"},q[Y.SEND]={url:M,className:"tui-kit-icon-send"},q[Y.LIVING]={url:y,className:"tui-kit-icon-living"},q[Y.MEMBER]={url:S,className:"tui-kit-icon-member"},q[Y.LIKE]={url:h,className:"tui-kit-icon-like"},q[Y.UNLIKE]={url:V,className:"tui-kit-icon-unlike"},q[Y.LIKED]={url:F,className:"tui-kit-icon-liked"},q[Y.UNLIKED]={url:G,className:"tui-kit-icon-unliked"},q[Y.UNION]={url:K,className:"tui-kit-icon-union"},q[Y.UNUNION]={url:W,className:"tui-kit-icon-ununion"},q[Y.VECTOR]={url:b,className:"tui-kit-icon-vector"},q[Y.UNVECTOR]={url:P,className:"tui-kit-icon-unvector"},q[Y.VOICE]={url:H,className:"tui-kit-icon-voice"},q);export{B as ICON_CONFIG};
1
+ import i from"./images/more.png.js";import m from"./images/create.png.js";import s from"./images/clear.png.js";import r from"./images/search.png.js";import o from"./images/back.png.js";import a from"./images/emoji.png.js";import e from"./images/progress.png.js";import t from"./images/file.png.js";import n from"./images/add.png.js";import c from"./images/image.png.js";import l from"./images/video.png.js";import u from"./images/document.png.js";import g from"./images/star.png.js";import p from"./images/copy.png.js";import N from"./images/del.png.js";import f from"./images/forward.png.js";import k from"./images/reply.png.js";import j from"./images/close.png.js";import E from"./images/arrow-right.png.js";import d from"./images/right.png.js";import R from"./images/ellipse.png.js";import O from"./images/cancel.png.js";import I from"./images/arrow-down.png.js";import C from"./images/edit.png.js";import A from"./images/confirm.png.js";import v from"./images/camera.png.js";import D from"./images/quote.png.js";import L from"./images/revocation.png.js";import T from"./images/effort.png.js";import w from"./images/cry.png.js";import M from"./images/send.png.js";import U from"./images/owner.png.js";import y from"./images/living.png.js";import S from"./images/member.png.js";import h from"./images/like.png.js";import F from"./images/unlike.png.js";import V from"./images/liked.png.js";import G from"./images/unliked.png.js";import K from"./images/union.png.js";import W from"./images/ununion.png.js";import b from"./images/vector.png.js";import P from"./images/unvector.png.js";import H from"./images/voice.png.js";import Y from"./images/add-friend.svg.js";import{IconTypes as q}from"./type.js";var B,_=((B={})[q.MORE]={url:i,className:"tui-kit-icon-more"},B[q.CREATE]={url:m,className:"tui-kit-icon-create"},B[q.CLEAR]={url:s,className:"tui-kit-icon-clear"},B[q.SEARCH]={url:r,className:"tui-kit-icon-search"},B[q.BACK]={url:o,className:"tui-kit-icon-back"},B[q.EMOJI]={url:a,className:"tui-kit-icon-emoji"},B[q.PROGRESS]={url:e,className:"tui-kit-icon-progress"},B[q.FILE]={url:t,className:"tui-kit-icon-file"},B[q.ADD]={url:n,className:"tui-kit-icon-add"},B[q.IMAGE]={url:c,className:"tui-kit-icon-image"},B[q.VIDEO]={url:l,className:"tui-kit-icon-video"},B[q.DOCUMENT]={url:u,className:"tui-kit-icon-document"},B[q.STAR]={url:g,className:"tui-kit-icon-star"},B[q.COPY]={url:p,className:"tui-kit-icon-copy"},B[q.DEL]={url:N,className:"tui-kit-icon-del"},B[q.FORWARD]={url:f,className:"tui-kit-icon-forward"},B[q.REPLY]={url:k,className:"tui-kit-icon-reply"},B[q.CLOSE]={url:j,className:"tui-kit-icon-close"},B[q.ARROW_RIGHT]={url:E,className:"tui-kit-icon-arrow-right"},B[q.RIGHT]={url:d,className:"tui-kit-icon-right"},B[q.ELLIPSE]={url:R,className:"tui-kit-icon-ellipse"},B[q.CANCEL]={url:O,className:"tui-kit-icon-cancel"},B[q.ARROW_DOWN]={url:I,className:"tui-kit-icon-arrow-down"},B[q.EDIT]={url:C,className:"tui-kit-icon-edit"},B[q.CONFIRM]={url:A,className:"tui-kit-icon-confirm"},B[q.CAMERA]={url:v,className:"tui-kit-icon-camera"},B[q.QUOTE]={url:D,className:"tui-kit-icon-quote"},B[q.REVOCATION]={url:L,className:"tui-kit-icon-revocation"},B[q.EFFORT]={url:T,className:"tui-kit-icon-effort"},B[q.CRY]={url:w,className:"tui-kit-icon-cry"},B[q.OWNER]={url:U,className:"tui-kit-icon-owner"},B[q.SEND]={url:M,className:"tui-kit-icon-send"},B[q.LIVING]={url:y,className:"tui-kit-icon-living"},B[q.MEMBER]={url:S,className:"tui-kit-icon-member"},B[q.LIKE]={url:h,className:"tui-kit-icon-like"},B[q.UNLIKE]={url:F,className:"tui-kit-icon-unlike"},B[q.LIKED]={url:V,className:"tui-kit-icon-liked"},B[q.UNLIKED]={url:G,className:"tui-kit-icon-unliked"},B[q.UNION]={url:K,className:"tui-kit-icon-union"},B[q.UNUNION]={url:W,className:"tui-kit-icon-ununion"},B[q.VECTOR]={url:b,className:"tui-kit-icon-vector"},B[q.UNVECTOR]={url:P,className:"tui-kit-icon-unvector"},B[q.VOICE]={url:H,className:"tui-kit-icon-voice"},B[q.ADDFRIEND]={url:Y,className:"tui-kit-icon-add-friend"},B);export{_ as ICON_CONFIG};
@@ -0,0 +1 @@
1
+ var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20clip-path%3D%22url%28%23clip0_4042_40004%29%22%3E%3Cmask%20id%3D%22path-1-inside-1_4042_40004%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6893%2017.8913C21.131%2016.1584%2021.998%2013.9304%2021.998%2011.5C21.998%205.97715%2017.5209%201.5%2011.998%201.5C6.4752%201.5%201.99805%205.97715%201.99805%2011.5C1.99805%2017.0228%206.4752%2021.5%2011.998%2021.5C14.1036%2021.5%2016.0571%2020.8493%2017.6686%2019.738C17.6858%2019.7471%2017.7041%2019.7551%2017.7233%2019.7619L19.9382%2020.5463C20.2554%2020.6587%2020.5611%2020.3529%2020.4488%2020.0357L19.6893%2017.8913Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M19.6893%2017.8913L18.5362%2016.932L17.9906%2017.5879L18.2754%2018.3921L19.6893%2017.8913ZM17.6686%2019.738L18.3687%2018.4114L17.5651%2017.9872L16.817%2018.5031L17.6686%2019.738ZM17.7233%2019.7619L17.2226%2021.1759H17.2226L17.7233%2019.7619ZM19.9382%2020.5463L20.4389%2019.1324L19.9382%2020.5463ZM20.4488%2020.0357L19.0348%2020.5365L20.4488%2020.0357ZM20.498%2011.5C20.498%2013.5672%2019.762%2015.4585%2018.5362%2016.932L20.8425%2018.8506C22.5%2016.8582%2023.498%2014.2937%2023.498%2011.5H20.498ZM11.998%203C16.6925%203%2020.498%206.80558%2020.498%2011.5H23.498C23.498%205.14873%2018.3493%200%2011.998%200V3ZM3.49805%2011.5C3.49805%206.80558%207.30363%203%2011.998%203V0C5.64677%200%200.498047%205.14873%200.498047%2011.5H3.49805ZM11.998%2020C7.30363%2020%203.49805%2016.1944%203.49805%2011.5H0.498047C0.498047%2017.8513%205.64677%2023%2011.998%2023V20ZM16.817%2018.5031C15.4479%2019.4473%2013.7898%2020%2011.998%2020V23C14.4174%2023%2016.6663%2022.2512%2018.5201%2020.9728L16.817%2018.5031ZM18.2241%2018.348C18.2732%2018.3654%2018.3216%2018.3865%2018.3687%2018.4114L16.9684%2021.0645C17.0501%2021.1076%2017.135%2021.1448%2017.2226%2021.1759L18.2241%2018.348ZM20.4389%2019.1324L18.2241%2018.348L17.2226%2021.1759L19.4374%2021.9603L20.4389%2019.1324ZM19.0348%2020.5365C18.7259%2019.6641%2019.5666%2018.8234%2020.4389%2019.1324L19.4374%2021.9603C20.9442%2022.4939%2022.3964%2021.0417%2021.8627%2019.535L19.0348%2020.5365ZM18.2754%2018.3921L19.0348%2020.5365L21.8627%2019.535L21.1033%2017.3906L18.2754%2018.3921Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_4042_40004%29%22%2F%3E%3Cpath%20d%3D%22M8%2011.5H16%22%20stroke%3D%22%23147AFF%22%20style%3D%22stroke%3A%23147AFF%3Bstroke%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M12%2015.5L12%207.5%22%20stroke%3D%22%23147AFF%22%20style%3D%22stroke%3A%23147AFF%3Bstroke%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22clip0_4042_40004%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22white%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E";export{l as default};
@@ -0,0 +1 @@
1
+ var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZWlDQ1BEaXNwbGF5IFAzAAB4nHWQvUvDUBTFT6tS0DqIDh0cMolD1NIKdnFoKxRFMFQFq1OafgltfCQpUnETVyn4H1jBWXCwiFRwcXAQRAcR3Zw6KbhoeN6XVNoi3sfl/Ticc7lcwBtQGSv2AijplpFMxKS11Lrke4OHnlOqZrKooiwK/v276/PR9d5PiFlNu3YQ2U9cl84ul3aeAlN//V3Vn8maGv3f1EGNGRbgkYmVbYsJ3iUeMWgp4qrgvMvHgtMunzuelWSc+JZY0gpqhrhJLKc79HwHl4plrbWD2N6f1VeXxRzqUcxhEyYYilBRgQQF4X/8044/ji1yV2BQLo8CLMpESRETssTz0KFhEjJxCEHqkLhz634PrfvJbW3vFZhtcM4v2tpCAzidoZPV29p4BBgaAG7qTDVUR+qh9uZywPsJMJgChu8os2HmwiF3e38M6Hvh/GMM8B0CdpXzryPO7RqFn4Er/QfBIQM2AAAAUUlEQVR4AYWOAQkAIQxFP5fgIlyEi2oEGxjBCNpAbGAD/YrCkImDt8Hfgw0APuLm1GrsH7Yi5FeRPMkySCQIeWVWO7Hk/yTtciURl+qywfZvAwveD9g2Kx/SAAAAAElFTkSuQmCC";export{A as default};
@@ -0,0 +1 @@
1
+ var l="data:image/svg+xml,%3Csvg%20width%3D%226%22%20height%3D%2210%22%20viewBox%3D%220%200%206%2010%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1.69071%200.283877C1.5751%200.169695%201.42795%200.107415%201.25453%200.107415C0.907683%200.107415%200.629156%200.377298%200.629156%200.719841C0.629156%200.891113%200.702729%201.04681%200.823599%201.16619L4.50226%204.71618L0.8236%208.2558C0.70273%208.37518%200.629157%208.53607%200.629157%208.70215C0.629157%209.04469%200.907684%209.31458%201.25453%209.31458C1.42795%209.31458%201.5751%209.25229%201.69071%209.13811L5.77928%205.19367C5.92643%205.05873%205.99474%204.89265%206%204.71099C6%204.52934%205.92643%204.37364%205.77928%204.23351L1.69071%200.283877Z%22%20fill%3D%22black%22%20style%3D%22fill%3Ablack%3Bfill%3Ablack%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -41,7 +41,8 @@ declare enum IconTypes {
41
41
  UNUNION = "ununion",
42
42
  VECTOR = "vector",
43
43
  UNVECTOR = "unvector",
44
- VOICE = "voice"
44
+ VOICE = "voice",
45
+ ADDFRIEND = "addFriend"
45
46
  }
46
47
 
47
48
  export { IconTypes };
@@ -1 +1 @@
1
- var e;!function(e){e.MORE="more",e.CREATE="create",e.CLEAR="clear",e.SEARCH="search",e.BACK="back",e.EMOJI="emoji",e.PROGRESS="progress",e.FILE="file",e.CLOSE="close",e.CANCEL="cancel",e.ADD="plus",e.IMAGE="image",e.VIDEO="video",e.DOCUMENT="document",e.STAR="star",e.COPY="copy",e.DEL="del",e.FORWARD="forward",e.REPLY="reply",e.RIGHT="right",e.ARROW_RIGHT="arrow-right",e.ELLIPSE="ellipse",e.ARROW_DOWN="arrow-down",e.EDIT="edit",e.CONFIRM="confirm",e.CAMERA="camera",e.QUOTE="quote",e.REVOCATION="revocation",e.EFFORT="effort",e.CRY="cry",e.SEND="send",e.OWNER="owner",e.LIVING="living",e.MEMBER="member",e.LIKE="like",e.UNLIKE="unlike",e.LIKED="liked",e.UNLIKED="unliked",e.UNION="union",e.UNUNION="ununion",e.VECTOR="vector",e.UNVECTOR="unvector",e.VOICE="voice"}(e||(e={}));export{e as IconTypes};
1
+ var e;!function(e){e.MORE="more",e.CREATE="create",e.CLEAR="clear",e.SEARCH="search",e.BACK="back",e.EMOJI="emoji",e.PROGRESS="progress",e.FILE="file",e.CLOSE="close",e.CANCEL="cancel",e.ADD="plus",e.IMAGE="image",e.VIDEO="video",e.DOCUMENT="document",e.STAR="star",e.COPY="copy",e.DEL="del",e.FORWARD="forward",e.REPLY="reply",e.RIGHT="right",e.ARROW_RIGHT="arrow-right",e.ELLIPSE="ellipse",e.ARROW_DOWN="arrow-down",e.EDIT="edit",e.CONFIRM="confirm",e.CAMERA="camera",e.QUOTE="quote",e.REVOCATION="revocation",e.EFFORT="effort",e.CRY="cry",e.SEND="send",e.OWNER="owner",e.LIVING="living",e.MEMBER="member",e.LIKE="like",e.UNLIKE="unlike",e.LIKED="liked",e.UNLIKED="unliked",e.UNION="union",e.UNUNION="ununion",e.VECTOR="vector",e.UNVECTOR="unvector",e.VOICE="voice",e.ADDFRIEND="addFriend"}(e||(e={}));export{e as IconTypes};
@@ -11,6 +11,7 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'
11
11
  border?: '' | 'bottom';
12
12
  disabled?: boolean;
13
13
  maxLength?: number;
14
+ onKeyDown?: (options?: object) => void;
14
15
  }
15
16
  interface InputRef {
16
17
  focus: (options?: object) => void;
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import r,{useState as i,useRef as u,useImperativeHandle as e}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as a}from"../Icon/type.js";var l=r.forwardRef((function(r,l){var d=r.className,s=void 0===d?"":d,f=r.customClassName,v=void 0===f?"":f,m=r.placeholder,p=r.clearable,b=void 0!==p&&p,h=r.prefix,x=r.suffix,g=r.onChange,k=r.onBlur,N=r.onFocus,C=r.value,j=void 0===C?"":C,I=r.border,L=void 0===I?"":I,w=r.disabled,y=void 0!==w&&w,B=r.maxLength,F=void 0===B?void 0:B,R=i(!1),A=R[0],E=R[1],O=i(j),T=O[0],q=O[1],z=u(null),D=function(){z.current&&z.current.focus()};return e(l,(function(){return{focus:D,blur:function(){var t;null===(t=z.current)||void 0===t||t.blur()},input:z.current}})),n("div",t({className:"".concat(s," tui-kit-input-container")},{children:o("div",t({className:"tui-kit-input-box ".concat(L&&"tui-kit-input-border--".concat(L)," ").concat(A?"tui-kit-input-box--focus":"tui-kit-input-box--blur")},{children:[h,n("input",{maxLength:F,disabled:y,className:"tui-kit-input ".concat(v),placeholder:m,ref:z,value:T,onFocus:function(t){E(!0),null==N||N(t)},onBlur:function(t){E(!1),null==k||k(t)},onChange:function(t){q(t.target.value),z.current&&(null==g||g(t))}}),x,b&&T&&n(c,{type:a.CLEAR,height:13,width:13,onClick:function(t){q(""),D();var n=z.current.cloneNode(!0),o=Object.create(t,{target:{value:n},currentTarget:{value:n}});n.value="",null==g||g(o)}})]}))}))}));export{l as Input};
1
+ import{__assign as n}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import e,{useState as r,useRef as u,useImperativeHandle as i}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as l}from"../Icon/type.js";var a=e.forwardRef((function(e,a){var d=e.className,f=void 0===d?"":d,s=e.customClassName,v=void 0===s?"":s,p=e.placeholder,m=e.clearable,b=void 0!==m&&m,h=e.prefix,x=e.suffix,g=e.onChange,k=e.onBlur,N=e.onFocus,y=e.onKeyDown,C=e.value,j=void 0===C?"":C,w=e.border,D=void 0===w?"":w,E=e.disabled,I=void 0!==E&&E,L=e.maxLength,B=void 0===L?void 0:L,F=r(!1),K=F[0],O=F[1],R=["Enter","NumpadEnter"],A=r(j),T=A[0],q=A[1],z=u(null),G=function(){z.current&&z.current.focus()};return i(a,(function(){return{focus:G,blur:function(){var n;null===(n=z.current)||void 0===n||n.blur()},input:z.current}})),t("div",n({className:"".concat(f," tui-kit-input-container")},{children:o("div",n({className:"tui-kit-input-box ".concat(D&&"tui-kit-input-border--".concat(D)," ").concat(K?"tui-kit-input-box--focus":"tui-kit-input-box--blur")},{children:[h,t("input",{maxLength:B,disabled:I,className:"tui-kit-input ".concat(v),placeholder:p,ref:z,value:T,onFocus:function(n){O(!0),null==N||N(n)},onBlur:function(n){O(!1),null==k||k(n)},onChange:function(n){q(n.target.value),z.current&&(null==g||g(n))},onKeyDown:function(n){R.indexOf(null==n?void 0:n.key)>-1&&y&&(null==n||n.preventDefault(),y(n))}}),x,b&&T&&t(c,{type:l.CLEAR,height:13,width:13,onClick:function(n){q(""),G();var t=z.current.cloneNode(!0),o=Object.create(n,{target:{value:t},currentTarget:{value:t}});t.value="",null==g||g(o)}})]}))}))}));export{a as Input};
@@ -6,6 +6,7 @@ interface PluginsProps {
6
6
  MoreIcon?: any;
7
7
  className?: string;
8
8
  customClass?: string;
9
+ style?: any;
9
10
  root?: any;
10
11
  handleVisible?: (isVisible: any) => void;
11
12
  showMore?: boolean;
@@ -1 +1 @@
1
- import{__assign as o}from"tslib";import{jsxs as n,jsx as e}from"react/jsx-runtime";import{forwardRef as i,useImperativeHandle as l,useState as r}from"react";import{Icon as t}from"../Icon/Icon.js";import{IconTypes as c}from"../Icon/type.js";import{Popup as s}from"../Popup/index.js";import{usePluginsElement as a}from"./hooks/usePluginsElement.js";function m(i,m){var u=i.plugins,p=void 0===u?[]:u,h=i.showNumber,d=i.MoreIcon,g=i.className,f=void 0===g?"":g,v=i.customClass,N=void 0===v?"":v,b=i.root,j=i.handleVisible;l(m,(function(){return{closeMore:function(o){y(!1)}}}));var w=a({plugins:p,showNumber:h}),x=w.showPicker,I=w.elements,P=r(!1),k=P[0],y=P[1],C=function(o){o.stopPropagation(),y(!k)};return(x.length>0||(null==I?void 0:I.length)>0)&&n("ul",o({className:"plugin ".concat(f)},{children:[(null==x?void 0:x.length)>0&&x.map((function(n,i){var l="".concat(n).concat(i);return e("li",o({className:"plugin-item"},{children:n}),l)})),(null==I?void 0:I.length)>0&&n("div",o({className:"plugin-popup"},{children:[n("div",o({role:"menuitem",tabIndex:0,className:"more",onClick:C},{children:[!d&&e(t,{width:20,height:20,type:c.ADD}),d&&d]})),e(s,o({className:"plugin-popup-box ".concat(N),show:k,close:C,root:b,handleVisible:j},{children:e("ul",{children:I.map((function(n,i){var l="".concat(n).concat(i);return e("li",o({className:"plugin-item"},{children:n}),l)}))})}))]}))]}))}var u=i(m);export{u as Plugins};
1
+ import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import{forwardRef as t,useImperativeHandle as i,useRef as r,useState as l}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as s}from"../Icon/type.js";import{Popup as u}from"../Popup/index.js";import{usePluginsElement as a}from"./hooks/usePluginsElement.js";function m(t,m){var d=t.plugins,p=void 0===d?[]:d,h=t.showNumber,f=t.MoreIcon,g=t.className,v=void 0===g?"":g,N=t.style,b=t.customClass,w=void 0===b?"":b,x=t.root,y=t.handleVisible;i(m,(function(){return{closeMore:function(e){B(!1)}}}));var P=a({plugins:p,showNumber:h}),j=P.showPicker,I=P.elements,C=r(null),k=l(!1),E=k[0],B=k[1],D=function e(n){n.stopPropagation(),B(!E),E||C.current.offsetParent.removeEventListener("scroll",e)};return(j.length>0||(null==I?void 0:I.length)>0)&&n("ul",e({className:"plugin ".concat(v)},{children:[(null==j?void 0:j.length)>0&&j.map((function(n,t){var i="".concat(n).concat(t);return o("li",e({className:"plugin-item"},{children:n}),i)})),(null==I?void 0:I.length)>0&&n("div",e({className:"plugin-popup",ref:C},{children:[n("div",e({role:"menuitem",tabIndex:0,className:"more",onClick:D},{children:[!f&&o(c,{width:20,height:20,type:s.ADD}),f&&f]})),o(u,e({className:"plugin-popup-box ".concat(w),style:N,show:E,close:D,root:x,handleVisible:function(n){if(y){var o=C.current.children[1].getBoundingClientRect(),t=o.width,i=o.height,r=C.current.getBoundingClientRect(),l=r.x,c=void 0===l?0:l,s=r.y,u=void 0===s?0:s;C.current.offsetParent.addEventListener("scroll",D),y(e(e({},n),{width:t,height:i,x:c,y:u}))}}},{children:o("ul",{children:I.map((function(n,t){var i="".concat(n).concat(t);return o("li",e({className:"plugin-item"},{children:n}),i)}))})}))]}))]}))}var d=t(m);export{d as Plugins};
@@ -2,6 +2,7 @@ import React from 'react';
2
2
 
3
3
  interface PopupProps {
4
4
  className?: string;
5
+ style?: any;
5
6
  show?: boolean;
6
7
  close?: (e: any) => void;
7
8
  root?: any;
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsx as o}from"react/jsx-runtime";import{useRef as n,useState as t,useLayoutEffect as r}from"react";function i(i){var u=i.show,s=i.close,l=i.children,c=i.className,v=i.root,d=i.handleVisible,a=n(),m=t(!1),p=m[0],f=m[1];r((function(){var e,o;return u?(window.addEventListener("mouseup",s,!1),null===(e=null==a?void 0:a.current)||void 0===e||e.addEventListener("mouseup",h)):(window.removeEventListener("mouseup",s,!1),null===(o=null==a?void 0:a.current)||void 0===o||o.removeEventListener("mouseup",h)),function(){var e;window.removeEventListener("mouseup",s,!1),null===(e=null==a?void 0:a.current)||void 0===e||e.removeEventListener("mouseup",h)}}),[u]),r((function(){var e=new IntersectionObserver((function(e){var o=e[0],n=o.boundingClientRect,t=o.rootBounds,r=o.intersectionRatio;d&&r<1&&d({left:n.left-n.width<t.left,top:n.bottom+n.height<t.bottom}),f(!0)}),{root:v,threshold:[1]});return a&&u&&e.observe(null==a?void 0:a.current),function(){e.disconnect(),f(!1)}}),[a,u]);var h=function(e){e.stopPropagation()};return u&&o("div",e({role:"button",tabIndex:0,className:"popup ".concat(c," ").concat(p&&"popup-show"),ref:a},{children:l}))}export{i as Popup};
1
+ import{__assign as e}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useRef as n,useState as o,useLayoutEffect as r}from"react";function i(i){var u=i.show,l=i.close,s=i.children,c=i.className,d=i.style,v=i.root,a=i.handleVisible,m=n(),p=o(!1),h=p[0],f=p[1];r((function(){var e,t;return u?(window.addEventListener("mouseup",l,!1),null===(e=null==m?void 0:m.current)||void 0===e||e.addEventListener("mouseup",w)):(window.removeEventListener("mouseup",l,!1),null===(t=null==m?void 0:m.current)||void 0===t||t.removeEventListener("mouseup",w)),function(){var e;window.removeEventListener("mouseup",l,!1),null===(e=null==m?void 0:m.current)||void 0===e||e.removeEventListener("mouseup",w)}}),[u]),r((function(){var t=new IntersectionObserver((function(t){var n=t[0],o=n.boundingClientRect,r=n.rootBounds,i=n.intersectionRatio,u=m.current.getBoundingClientRect()||{},l=(null==v?void 0:v.getBoundingClientRect())||{},s=e(e({},o),u),c=e(e({},r),l);a&&i<1&&a({left:s.left-s.width<c.left,top:s.bottom+s.height<c.bottom,width:s.width,height:s.height}),f(!0)}),{root:v,threshold:[1]});return m&&u&&t.observe(null==m?void 0:m.current),function(){t.disconnect(),f(!1)}}),[m,u]);var w=function(e){e.stopPropagation()};return u&&t("div",e({role:"button",tabIndex:0,style:d,className:"popup ".concat(c," ").concat(h&&"popup-show"),ref:m},{children:s}))}export{i as Popup};
@@ -1,3 +1,4 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import React from 'react';
2
3
 
3
4
  interface Props {
@@ -6,7 +7,7 @@ interface Props {
6
7
  checkedColor?: string;
7
8
  className?: string;
8
9
  }
9
- declare function Switch(props: Props): JSX.Element;
10
+ declare function Switch(props: Props): react_jsx_runtime.JSX.Element;
10
11
  declare namespace Switch {
11
12
  var defaultProps: {
12
13
  checkedColor: string;