@tencentcloud/chat-uikit-react 1.2.1 → 2.1.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 (283) hide show
  1. package/.eslintrc.js +2 -1
  2. package/CHANGELOG.md +9 -3
  3. package/dist/cjs/components/Checkbox/index.d.ts +1 -2
  4. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  5. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  6. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  7. package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  8. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  9. package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +2 -0
  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 +1 -2
  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 +1 -2
  17. package/dist/cjs/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +1 -2
  18. package/dist/cjs/components/Icon/Icon.d.ts +1 -2
  19. package/dist/cjs/components/Icon/config.js +1 -1
  20. package/dist/cjs/components/Icon/images/chats-selected.svg.js +1 -0
  21. package/dist/cjs/components/Icon/images/chats.svg.js +1 -0
  22. package/dist/cjs/components/Icon/images/contacts-selected.svg.js +1 -0
  23. package/dist/cjs/components/Icon/images/contacts.svg.js +1 -0
  24. package/dist/cjs/components/Icon/images/files.png.js +1 -0
  25. package/dist/cjs/components/Icon/images/image.png.js +1 -1
  26. package/dist/cjs/components/Icon/images/video.png.js +1 -1
  27. package/dist/cjs/components/Switch/Switch.d.ts +1 -2
  28. package/dist/cjs/components/TUIChat/TUIChat.d.ts +5 -0
  29. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  30. package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
  31. package/dist/cjs/components/TUIChat/hooks/useHandleMessage.js +1 -1
  32. package/dist/cjs/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  33. package/dist/cjs/components/TUIChat/unitls.js +1 -1
  34. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  35. package/dist/cjs/components/TUIContact/TUIContact.js +1 -1
  36. package/dist/cjs/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -1
  37. package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  38. package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  39. package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  40. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  41. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  42. package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -1
  43. package/dist/cjs/components/TUIConversation/TUIConversation.js +1 -1
  44. package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +1 -0
  45. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  46. package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
  47. package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +1 -1
  48. package/dist/cjs/components/TUIManage/TUIManage.d.ts +1 -3
  49. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  50. package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
  51. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  52. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  53. package/dist/cjs/components/TUIMessage/MessageImage.js +1 -1
  54. package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
  55. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  56. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  57. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  58. package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
  59. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  60. package/dist/cjs/components/TUIMessage/MessageVideo.js +1 -1
  61. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  62. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  63. package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
  64. package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  65. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  66. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  67. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  68. package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  69. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  70. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  71. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  72. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  73. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  74. package/dist/cjs/components/untils.js +1 -1
  75. package/dist/cjs/constants.js +1 -1
  76. package/dist/cjs/context/ComponentContext.d.ts +3 -2
  77. package/dist/cjs/context/TUIChatActionContext.d.ts +3 -14
  78. package/dist/cjs/context/TUIChatStateContext.d.ts +2 -0
  79. package/dist/cjs/context/TUIConversationContext.js +1 -1
  80. package/dist/cjs/index.css +1 -1
  81. package/dist/cjs/index.d.css +240 -12
  82. package/dist/cjs/index.d.ts +2 -0
  83. package/dist/cjs/index.js +1 -1
  84. package/dist/cjs/locales/en/TUIChat.js +1 -1
  85. package/dist/cjs/locales/en/TUIContact.js +1 -1
  86. package/dist/cjs/locales/en/TUIProfile.js +1 -1
  87. package/dist/cjs/locales/index.d.ts +6 -0
  88. package/dist/cjs/locales/index.js +1 -1
  89. package/dist/cjs/locales/zh_cn/TUIChat.js +1 -1
  90. package/dist/cjs/locales/zh_cn/TUIContact.js +1 -1
  91. package/dist/cjs/locales/zh_cn/TUIProfile.js +1 -1
  92. package/dist/cjs/server.js +1 -0
  93. package/dist/cjs/utils/env.js +1 -0
  94. package/dist/esm/components/Checkbox/index.d.ts +1 -2
  95. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  96. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  97. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  98. package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  99. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  100. package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +2 -0
  101. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  102. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  103. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  104. package/dist/esm/components/ConversationSearch/ConversationSearchInput.d.ts +1 -2
  105. package/dist/esm/components/ConversationSearch/ConversationSearchInput.js +1 -1
  106. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  107. package/dist/esm/components/DivWithEdit/DivWithEdit.d.ts +1 -2
  108. package/dist/esm/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +1 -2
  109. package/dist/esm/components/Icon/Icon.d.ts +1 -2
  110. package/dist/esm/components/Icon/config.js +1 -1
  111. package/dist/esm/components/Icon/images/chats-selected.svg.js +1 -0
  112. package/dist/esm/components/Icon/images/chats.svg.js +1 -0
  113. package/dist/esm/components/Icon/images/contacts-selected.svg.js +1 -0
  114. package/dist/esm/components/Icon/images/contacts.svg.js +1 -0
  115. package/dist/esm/components/Icon/images/files.png.js +1 -0
  116. package/dist/esm/components/Icon/images/image.png.js +1 -1
  117. package/dist/esm/components/Icon/images/video.png.js +1 -1
  118. package/dist/esm/components/Switch/Switch.d.ts +1 -2
  119. package/dist/esm/components/TUIChat/TUIChat.d.ts +5 -0
  120. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  121. package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
  122. package/dist/esm/components/TUIChat/hooks/useHandleMessage.js +1 -1
  123. package/dist/esm/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  124. package/dist/esm/components/TUIChat/unitls.js +1 -1
  125. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  126. package/dist/esm/components/TUIContact/TUIContact.js +1 -1
  127. package/dist/esm/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -1
  128. package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
  129. package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
  130. package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
  131. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  132. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  133. package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -1
  134. package/dist/esm/components/TUIConversation/TUIConversation.js +1 -1
  135. package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +1 -0
  136. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  137. package/dist/esm/components/TUIKit/TUIKit.js +1 -1
  138. package/dist/esm/components/TUIKit/hooks/useTUIKit.js +1 -1
  139. package/dist/esm/components/TUIManage/TUIManage.d.ts +1 -3
  140. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  141. package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
  142. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  143. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  144. package/dist/esm/components/TUIMessage/MessageImage.js +1 -1
  145. package/dist/esm/components/TUIMessage/MessageName.js +1 -1
  146. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  147. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  148. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  149. package/dist/esm/components/TUIMessage/MessageText.js +1 -1
  150. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  151. package/dist/esm/components/TUIMessage/MessageVideo.js +1 -1
  152. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  153. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  154. package/dist/esm/components/TUIMessage/utils/index.js +1 -1
  155. package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
  156. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  157. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  158. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  159. package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  160. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  161. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  162. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  163. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  164. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  165. package/dist/esm/components/untils.js +1 -1
  166. package/dist/esm/constants.js +1 -1
  167. package/dist/esm/context/ComponentContext.d.ts +3 -2
  168. package/dist/esm/context/TUIChatActionContext.d.ts +3 -14
  169. package/dist/esm/context/TUIChatStateContext.d.ts +2 -0
  170. package/dist/esm/context/TUIConversationContext.js +1 -1
  171. package/dist/esm/index.css +1 -1
  172. package/dist/esm/index.d.css +240 -12
  173. package/dist/esm/index.d.ts +2 -0
  174. package/dist/esm/index.js +1 -1
  175. package/dist/esm/locales/en/TUIChat.js +1 -1
  176. package/dist/esm/locales/en/TUIContact.js +1 -1
  177. package/dist/esm/locales/en/TUIProfile.js +1 -1
  178. package/dist/esm/locales/index.d.ts +6 -0
  179. package/dist/esm/locales/index.js +1 -1
  180. package/dist/esm/locales/zh_cn/TUIChat.js +1 -1
  181. package/dist/esm/locales/zh_cn/TUIContact.js +1 -1
  182. package/dist/esm/locales/zh_cn/TUIProfile.js +1 -1
  183. package/dist/esm/server.js +1 -0
  184. package/dist/esm/utils/env.js +1 -0
  185. package/package.json +7 -6
  186. package/rollup.config.js +1 -2
  187. package/scripts/publish-github.js +60 -0
  188. package/scripts/publish-intl-demo.js +14 -0
  189. package/scripts/publish-npm.js +22 -0
  190. package/src/components/Avatar/styles/index.scss +1 -0
  191. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +6 -3
  192. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +5 -1
  193. package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +7 -2
  194. package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -0
  195. package/src/components/ConversationCreate/styles/index.scss +2 -0
  196. package/src/components/ConversationPreview/ConversationPreview.tsx +2 -0
  197. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +57 -9
  198. package/src/components/ConversationPreview/styles/index.scss +4 -2
  199. package/src/components/ConversationPreview/utils.tsx +5 -1
  200. package/src/components/DivWithEdit/styles/index.scss +2 -1
  201. package/src/components/Icon/config.ts +1 -1
  202. package/src/components/Icon/images/chats-selected.svg +6 -0
  203. package/src/components/Icon/images/chats.svg +9 -0
  204. package/src/components/Icon/images/contacts-selected.svg +3 -0
  205. package/src/components/Icon/images/contacts.svg +6 -0
  206. package/src/components/Icon/images/files.png +0 -0
  207. package/src/components/Icon/images/image.png +0 -0
  208. package/src/components/Icon/images/language.svg +3 -0
  209. package/src/components/Icon/images/video.png +0 -0
  210. package/src/components/Model/styles/layout.scss +1 -1
  211. package/src/components/Profile/styles/index.scss +4 -0
  212. package/src/components/TUIChat/TUIChat.tsx +74 -120
  213. package/src/components/TUIChat/TUIChatState.tsx +18 -45
  214. package/src/components/TUIChat/hooks/useHandleMessage.tsx +8 -0
  215. package/src/components/TUIChat/hooks/useHandleMessageList.tsx +2 -41
  216. package/src/components/TUIChat/unitls.ts +0 -29
  217. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +7 -1
  218. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -1
  219. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +1 -1
  220. package/src/components/TUIConversation/TUIConversation.tsx +1 -4
  221. package/src/components/TUIConversationList/TUIConversationList.tsx +91 -65
  222. package/src/components/TUIConversationList/index.scss +5 -0
  223. package/src/components/TUIKit/TUIKit.tsx +133 -9
  224. package/src/components/TUIKit/styles/h5.scss +34 -0
  225. package/src/components/TUIKit/styles/index.scss +103 -0
  226. package/src/components/TUIKit/styles/reset.scss +20 -0
  227. package/src/components/TUIManage/TUIManage.tsx +59 -35
  228. package/src/components/TUIManage/styles/index.scss +15 -1
  229. package/src/components/TUIMessage/MessageBubble.tsx +20 -3
  230. package/src/components/TUIMessage/MessageCustom.tsx +11 -2
  231. package/src/components/TUIMessage/MessageImage.tsx +2 -1
  232. package/src/components/TUIMessage/MessageName.tsx +1 -1
  233. package/src/components/TUIMessage/MessagePlugins.tsx +4 -2
  234. package/src/components/TUIMessage/MessageRevoke.tsx +2 -2
  235. package/src/components/TUIMessage/MessageText.tsx +25 -3
  236. package/src/components/TUIMessage/MessageVideo.tsx +8 -5
  237. package/src/components/TUIMessage/hooks/useMessageHandler.ts +13 -33
  238. package/src/components/TUIMessage/styles/color.scss +1 -0
  239. package/src/components/TUIMessage/styles/layout.scss +33 -6
  240. package/src/components/TUIMessage/utils/index.ts +1 -1
  241. package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +2 -2
  242. package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +3 -7
  243. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +4 -3
  244. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +10 -3
  245. package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +10 -14
  246. package/src/components/TUIMessageInput/styles/color.scss +1 -1
  247. package/src/components/TUIMessageInput/styles/layout.scss +7 -2
  248. package/src/components/TUIMessageList/TUIMessageList.tsx +9 -13
  249. package/src/components/TUIMessageList/index.ts +0 -1
  250. package/src/components/TUIProfile/TUIProfileDefault.tsx +65 -51
  251. package/src/components/TUIProfile/styles/layout.scss +6 -0
  252. package/src/components/untils.ts +9 -0
  253. package/src/constants.ts +4 -1
  254. package/src/context/ComponentContext.tsx +2 -0
  255. package/src/context/TUIChatActionContext.tsx +3 -23
  256. package/src/context/TUIChatStateContext.tsx +2 -0
  257. package/src/context/TUIKitContext.tsx +0 -1
  258. package/src/index.ts +4 -0
  259. package/src/locales/en/TUIChat.ts +2 -1
  260. package/src/locales/en/TUIContact.ts +1 -1
  261. package/src/locales/en/TUIProfile.ts +5 -4
  262. package/src/locales/index.ts +5 -4
  263. package/src/locales/zh_cn/TUIChat.ts +1 -0
  264. package/src/locales/zh_cn/TUIContact.ts +1 -1
  265. package/src/locales/zh_cn/TUIProfile.ts +1 -0
  266. package/src/server.ts +44 -0
  267. package/src/utils/env.ts +5 -0
  268. package/tsconfig.json +1 -0
  269. package/dist/cjs/_virtual/extends.js +0 -1
  270. package/dist/cjs/components/Icon/images/document.png.js +0 -1
  271. package/dist/cjs/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
  272. package/dist/cjs/components/TUIChat/hooks/useCreateMessage.js +0 -1
  273. package/dist/cjs/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
  274. package/dist/cjs/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
  275. package/dist/esm/_virtual/extends.js +0 -1
  276. package/dist/esm/components/Icon/images/document.png.js +0 -1
  277. package/dist/esm/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
  278. package/dist/esm/components/TUIChat/hooks/useCreateMessage.js +0 -1
  279. package/dist/esm/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
  280. package/dist/esm/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
  281. package/src/components/TUIChat/hooks/useCreateMessage.tsx +0 -198
  282. package/src/components/TUIChat/hooks/useMessageReceviedListener.tsx +0 -26
  283. package/src/components/TUIMessageList/hooks/useEnrichedMessageList.tsx +0 -16
@@ -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 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
+ 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{useTranslation as u}from"react-i18next";import{TUIConversationService as l}from"@tencentcloud/chat-uikit-engine";import{Input as m}from"../Input/Input.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as v}from"../Icon/type.js";import{ConversationCreateSelectView as h}from"./ConversationCreateSelectView.js";import{Avatar as d}from"../Avatar/Avatar.js";import{defaultUserAvatar as f}from"../Avatar/default.js";import{useConversationCreate as C}from"./hooks/useConversationCreate.js";import{useTUIKitContext as x}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{PageStateTypes as I}from"./ConversationCreate.js";import{useConversation as g}from"../../hooks/useConversation.js";import{Toast as N}from"../Toast/index.js";function k(k){var j=this,b=k.isCreateGroup,T=k.selectList,y=k.setSelectList,A=k.className,D=k.conversationList,L=k.setIsCreateGroup,S=k.setConversationCreated,w=k.setPageState,U=u().t,E=a(""),R=E[0],F=E[1],G=x(),M=G.chat,P=G.setActiveConversation,z=a({}),H=z[0],K=z[1],O=C(M,D,(function(e){K(e)})).getFriendListSortSearchResult,V=g(M).createConversation,_=s(new Map);return i(o,{children:[c(m,{className:"tui-conversation-create-search-input",placeholder:U("TUIConversation.Search"),clearable:!0,value:R,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,F(t),n=K,[4,O(t)];case 1:return n.apply(void 0,[r.sent()]),[2]}}))}))},prefix:c(p,{type:v.SEARCH,height:16,width:16})}),b&&c(h,{selectList:T,setSelectList:y}),!b&&i("div",e({role:"presentation",className:"tui-user",onClick:function(){L(!0),_.current.clear(),y([])}},{children:[c(p,{type:v.ADD}),c("div",e({className:"tui-user-name active"},{children:U("TUIConversation.New group chat")}))]})),c("div",e({className:"tui-conversation-create ".concat(A)},{children:c("div",e({className:"tui-conversation-create-container"},{children:c("div",e({className:"tui-group-container"},{children:Object.keys(H).map((function(o){return 0!==H[o].length&&i("div",e({className:"tui-group-box"},{children:[c("div",e({className:"title"},{children:o})),H[o].map((function(a,s){var u=a.userID,m=a.nick,p=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 b?[2]:(t=e.userID,[4,V("C2C".concat(t))]);case 1:return n=r.sent(),S(!1),P(n),l.switchConversation(null==n?void 0:n.conversationID),[2]}}))}))}(a)}},{children:[c(d,{size:30,image:p||f}),c("div",e({className:"tui-user-name text-ellipsis"},{children:m||"".concat(u)})),b&&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?T.push({profile:t,domList:r}):T.splice(T.findIndex((function(e){return e.profile.userID===i})),1),y(n([],T,!0))}(e,a,_.current.get(u))},type:"checkbox",ref:function(e){!function(e,t){if(t){_.current.has(e)||_.current.set(e,[]);var r=_.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&&c("div",e({className:"tui-conversation-create-next-container"},{children:c("div",e({role:"presentation",className:"tui-conversation-create-next",onClick:function(){T&&0===T.length?N({text:U("TUIConversation.Participant cannot be empty"),type:"error"}):w(I.CREATE_DETAIL)}},{children:U("TUIConversation.Next")}))}))]})}export{k as ConversationCreateUserSelectList};
@@ -1 +1 @@
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
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useTranslation as n}from"react-i18next";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 u(s){var u=s.groupType,p=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===u?"group-type-info-box--active":""," "),onClick:function(){!function(e){p(e),d(r.CREATE_DETAIL)}(s)}},{children:[t("div",e({className:"group-type-info-title"},{children:[s===u&&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{u as ConversationGroupTypeInfo,s as GroupType,c as typeInfoList};
@@ -1 +1 @@
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
+ import{__awaiter as e,__generator as t}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"@tencentcloud/chat-uikit-engine";import"react-i18next";import"../../../utils/env.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"../../../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"../../TUIProfile/TUIProfileDefault.js";import"../../../locales/index.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(e){var t=e.trim(),r=t.charCodeAt(0);return r>40869||r<19968?t.charAt(0):i.charAt(r-19968)},d=function(){return e(void 0,void 0,void 0,(function(){var e,r,o,i;return t(this,(function(t){switch(t.label){case 0:return u.filter((function(e){return e.type===n.TYPES.CONV_C2C})).slice(0,5).map((function(e){return e.userProfile})),[4,c.getFriendList()];case 1:return e=t.sent(),r=e.code,o=e.data,0===r&&(i=v(o.map((function(e){return e.profile}))),l(i),a&&a(i,l)),[2]}}))}))},v=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,n=m(t||o);n>="a"&&n<="z"?r[n.toLocaleUpperCase()].push(e):n<"A"||n>"z"?r["#"].push(e):r[n].push(e)})),Object.keys(r).forEach((function(e){r[e].sort((function(e,t){var r=e.nick,o=e.userID,n=t.nick,i=t.userID;return r||o<n||i||r||o===n||i?1:-1}))})),r},h=s(c).getUserProfile;return o((function(){d()}),[c]),{getFirstLetter:m,queryFriendList:d,getFriendListSortSearchResult:function(r){return e(void 0,void 0,void 0,(function(){var e,o,n,i;return t(this,(function(t){switch(t.label){case 0:return r?[4,h([r])]:[2,p];case 1:return e=t.sent().data,o={},n=!1,Object.keys(p).forEach((function(e){o[e]=p[e].filter((function(e){var t,o,i=e.nick,s=e.userID,c=i.toLocaleLowerCase(),u=r.toLocaleLowerCase(),a=s.toLocaleLowerCase();return o="TencentCloudDemo"===(null===(t=process.env)||void 0===t?void 0:t.REACT_APP_ONLINE)?c?c.includes(u):a.includes(u):a===u,n=n||o,o}))})),"TencentCloudDemo"===(null===(i=process.env)||void 0===i?void 0:i.REACT_APP_ONLINE)?[2,o]:[2,n?o:v(e)]}}))}))},friendListSortResult:p}};export{c as useConversationCreate};
@@ -25,6 +25,8 @@ interface ConversationPreviewProps {
25
25
  setActiveConversation?: TUIKitContextValue['setActiveConversation'];
26
26
  searchValue?: string;
27
27
  conversationUpdateCount?: number;
28
+ activeConversationID?: string;
29
+ setActiveConversationID?: (conversationID: string) => void;
28
30
  }
29
31
  declare function ConversationPreview<T extends ConversationPreviewProps>(props: T): React.ReactElement;
30
32
 
@@ -1 +1 @@
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
+ 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)),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)),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 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
+ 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,useEffect as a}from"react";import{useTranslation as c}from"react-i18next";import{TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{isPC as l}from"../../utils/env.js";import{Avatar as m}from"../Avatar/Avatar.js";import{Icon as v}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Plugins as d}from"../Plugins/index.js";import{useConversation as p}from"../../hooks/useConversation.js";import{useTUIKitContext as h}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function f(t){var f,C=t.conversation,I=t.Avatar,N=void 0===I?m:I,T=t.displayImage,x=t.displayTitle,g=t.displayMessage,w=t.displayTime,j=t.unread,b=t.active,y=t.activeConversationID,D=t.setActiveConversationID,P=t.setActiveConversation,k=c().t,M=i(null),U=h("ConversationPreviewContent"),A=U.chat,E=U.conversation,F=p(A),z=F.pinConversation,K=F.deleteConversation,L=b?"conversation-preview-content--active":"",O=j&&j>=1?"conversation-preview-content--unread":"",R=C.isPinned?"conversation-preview-content--pin":"",S=r(!1),q=S[0],B=S[1],G=i(null);a((function(){y!==C.conversationID&&B(!1)}),[y]);var H=function(e){if(!l){var n=C.conversationID;switch(D(n),e){case"touchstart":f=setTimeout(o,500);break;case"touchend":clearTimeout(f),setTimeout((function(){}),200)}}function o(){clearTimeout(f),B(!0)}},J=function(e,n){var o=C.conversationID,t=C.isPinned;switch(e.stopPropagation(),B(!1),G.current.closeMore(),n){case"pin":z({conversationID:o,isPinned:!t});break;case"delete":K(o),C===E&&P(null)}};return n("button",e({type:"button","aria-selected":b,role:"option",className:"conversation-preview-container ".concat(L," ").concat(O," ").concat(R),onClick:function(){s.switchConversation(null==C?void 0:C.conversationID),P&&P(C),(null==M?void 0:M.current)&&M.current.blur()},onMouseEnter:function(){B(!0)},onMouseLeave:function(){B(!1)},onTouchStart:function(){return H("touchstart")},onTouchEnd:function(){return H("touchend")},ref:M},{children:[o("div",e({className:"avatar"},{children:o(N,{image:T,name:x,size:40})})),n("div",e({className:"content"},{children:[o("div",e({className:"title text-ellipsis"},{children:x})),o("div",e({className:"message"},{children:g}))]})),n("div",e({className:"external"},{children:[o("div",j?e({className:"unread"},{children:j<=99?j:"99+"}):{className:"unread"}),o("div",q?e({className:"".concat(q?"more--hover":"more")},{children:o(d,{customClass:"more-handle-box",ref:G,plugins:[o("div",e({role:"presentation",className:"more-handle-item",onClick:function(e){J(e,"pin")}},{children:k(C.isPinned?"TUIConversation.Unpin":"TUIConversation.Pin")})),o("div",e({className:"more-handle-item",style:{color:"#FF584C"},onClick:function(e){J(e,"delete")},role:"presentation"},{children:k("TUIConversation.Delete")}))],showNumber:0,MoreIcon:o(v,{className:"icon-more",width:16,height:16,type:u.MORE})})}):e({className:"time"},{children:w}))]}))]}))}var C=t.memo(f);export{C as ConversationPreviewContent,f as unMemoConversationPreviewContent};
@@ -1 +1 @@
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
+ import{__assign as e}from"tslib";import{jsxs as r,jsx as a}from"react/jsx-runtime";import o from"@tencentcloud/chat";import"react";import"../Icon/config.js";import"../Icon/type.js";import{defaultGroupAvatarWork as t,defaultUserAvatar as i}from"../Avatar/default.js";import{formatEmojiString as s}from"../TUIMessage/utils/emojiMap.js";import{getTimeStamp as c}from"../untils.js";var n=function(t,i,s){void 0===s&&(s="#147AFF");var c=u(t),n=c.name,l=c.nick,p=c.groupID,d=c.userID,m=t.type,f=t.remark,v="";switch(m){case o.TYPES.CONV_C2C:v=f||l||d;break;case o.TYPES.CONV_GROUP:v=n||p;break;default:v=""}var C,h;return i?(h=(C=v).toLocaleLowerCase().indexOf(i.toLocaleLowerCase()),r("div",{children:[a("span",{children:C.slice(0,h)}),a("span",e({style:{color:s}},{children:C.slice(h,h+i.length)})),a("span",{children:C.slice(h+i.length)})]})):v},l=function(e){var r=e.type,a=u(e).avatar,s=a;if(!a)switch(r){case o.TYPES.CONV_C2C:s=i;break;case o.TYPES.CONV_GROUP:default:s=t}return s},p=function(t,i,c){var n,l=t.lastMessage,p=t.type,u=l.fromAccount,d=l.nick,m=l.nameCard,f=l.isRevoked,v=l.messageForShow;l.type===o.TYPES.MSG_CUSTOM&&(null===(n=l.payload)||void 0===n?void 0:n.description)&&(v=l.payload.description);var C="";switch(p){case o.TYPES.CONV_GROUP:C=(null==l?void 0:l.fromAccount)===(null==i?void 0:i.userID)?"You":"".concat(m||d||u||""),C="".concat(C?"".concat(C,":"):"");break;case o.TYPES.CONV_C2C:C=f?"you ":""}return r("div",e({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[a("span",{children:C}),a("span",{children:l.isRevoked?"recalled a message":s(v,1)})]}))},u=function(e){if(!e)return null;var r={},a=e.type,t=e.groupProfile,i=e.userProfile;switch(a){case o.TYPES.CONV_C2C:r=i;break;case o.TYPES.CONV_GROUP:r=t;case o.TYPES.CONV_SYSTEM:}return r},d=function(e,r){var a=e.lastMessage;return c(1e3*a.lastTime,r)};export{l as getDisplayImage,p as getDisplayMessage,d as getDisplayTime,n as getDisplayTitle,u as getMessageProfile};
@@ -1,6 +1,5 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { InputProps } from '../Input/Input.js';
3
2
 
4
- declare function ConversationSearchInput(props: InputProps): react_jsx_runtime.JSX.Element;
3
+ declare function ConversationSearchInput(props: InputProps): JSX.Element;
5
4
 
6
5
  export { ConversationSearchInput };
@@ -1 +1 @@
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
+ import{jsx as e}from"react/jsx-runtime";import{useTranslation as r}from"react-i18next";import{Icon as o}from"../Icon/Icon.js";import{IconTypes as t}from"../Icon/type.js";import{Input as a}from"../Input/Input.js";function n(n){var c=n.className,i=void 0===c?"":c,p=n.placeholder,m=n.clearable,l=n.value,s=n.onChange,h=n.prefix,f=void 0===h?e(o,{type:t.SEARCH,height:16,width:16}):h,u=r().t;return e(a,{className:"conversation-search-input ".concat(i),placeholder:p||u("TUIConversation.Search"),clearable:m,value:l,onChange:s,prefix:f})}export{n as ConversationSearchInput};
@@ -1 +1 @@
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
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{ConversationPreview as s}from"../ConversationPreview/ConversationPreview.js";import"react";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import"../../utils/env.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"../../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"../TUIProfile/TUIProfileDefault.js";import"../../locales/index.js";function n(n){var a=n.result,c=n.searchValue,m=n.Preview;return t("div",{children:0===(null==a?void 0:a.length)?o("div",e({className:"conversation-search-result no-result"},{children:[t(r,{className:"no-result-icon",type:i.CRY,width:42,height:42}),t("span",e({className:"no-result-message"},{children:'No results for "'.concat(c,'"')}))]})):a.map((function(o){return t(s,e({searchValue:c},{conversation:o,Preview:m}),o.conversationID)}))})}export{n as ConversationSearchResult};
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { PropsWithChildren } from 'react';
3
2
 
4
3
  interface DivWithEditProps {
@@ -12,6 +11,6 @@ interface DivWithEditProps {
12
11
  toggle?: (name: string) => void;
13
12
  close?: () => void;
14
13
  }
15
- declare function DivWithEdit<T extends DivWithEditProps>(props: PropsWithChildren<T>): react_jsx_runtime.JSX.Element;
14
+ declare function DivWithEdit<T extends DivWithEditProps>(props: PropsWithChildren<T>): JSX.Element;
16
15
 
17
16
  export { DivWithEdit };
@@ -1,11 +1,10 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { PropsWithChildren } from 'react';
3
2
 
4
3
  interface EmptyStateIndicatorProps {
5
4
  /** List Type: conversation | message */
6
5
  listType?: 'conversation' | 'message' | 'chat';
7
6
  }
8
- declare function UnMemoizedEmptyStateIndicator<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>): react_jsx_runtime.JSX.Element;
7
+ declare function UnMemoizedEmptyStateIndicator<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>): JSX.Element;
9
8
  declare const EmptyStateIndicator: typeof UnMemoizedEmptyStateIndicator;
10
9
 
11
10
  export { EmptyStateIndicator, EmptyStateIndicatorProps };
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React from 'react';
3
2
  import { IconTypes } from './type.js';
4
3
 
@@ -10,6 +9,6 @@ interface IconProps {
10
9
  onClick?: (event: React.BaseSyntheticEvent) => void;
11
10
  className?: string;
12
11
  }
13
- declare function Icon(props: React.PropsWithChildren<IconProps>): react_jsx_runtime.JSX.Element;
12
+ declare function Icon(props: React.PropsWithChildren<IconProps>): JSX.Element;
14
13
 
15
14
  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 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};
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/files.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%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6893%2018.3914C21.131%2016.6584%2021.998%2014.4305%2021.998%2012.0001C21.998%206.47721%2017.5209%202.00006%2011.998%202.00006C6.4752%202.00006%201.99805%206.47721%201.99805%2012.0001C1.99805%2017.5229%206.4752%2022.0001%2011.998%2022.0001C14.1036%2022.0001%2016.0571%2021.3493%2017.6686%2020.238C17.6858%2020.2471%2017.7041%2020.2552%2017.7233%2020.262L19.9382%2021.0464C20.2554%2021.1587%2020.5611%2020.853%2020.4488%2020.5358L19.6893%2018.3914Z%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%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -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%3Cmask%20id%3D%22path-1-inside-1_91_53001%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6894%2018.3919C21.131%2016.659%2021.998%2014.4311%2021.998%2012.0007C21.998%206.47788%2017.5209%202.00073%2011.998%202.00073C6.4752%202.00073%201.99805%206.47788%201.99805%2012.0007C1.99805%2017.5236%206.4752%2022.0007%2011.998%2022.0007C14.1037%2022.0007%2016.0574%2021.3499%2017.6689%2020.2385C17.6861%2020.2475%2017.7042%2020.2555%2017.7233%2020.2623L19.9382%2021.0467C20.2554%2021.159%2020.5611%2020.8533%2020.4488%2020.5361L19.6894%2018.3919Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M19.6894%2018.3919L18.9207%2017.7524L18.5569%2018.1897L18.7468%2018.7258L19.6894%2018.3919ZM17.6689%2020.2385L18.1349%2019.3537L17.5993%2019.0716L17.1011%2019.4153L17.6689%2020.2385ZM17.7233%2020.2623L18.0571%2019.3196L18.0571%2019.3196L17.7233%2020.2623ZM19.9382%2021.0467L20.272%2020.104H20.272L19.9382%2021.0467ZM20.4488%2020.5361L19.5062%2020.8699V20.8699L20.4488%2020.5361ZM20.998%2012.0007C20.998%2014.1889%2020.2184%2016.1924%2018.9207%2017.7524L20.4582%2019.0315C22.0437%2017.1256%2022.998%2014.6733%2022.998%2012.0007H20.998ZM11.998%203.00073C16.9686%203.00073%2020.998%207.03017%2020.998%2012.0007H22.998C22.998%205.9256%2018.0732%201.00073%2011.998%201.00073V3.00073ZM2.99805%2012.0007C2.99805%207.03017%207.02748%203.00073%2011.998%203.00073V1.00073C5.92291%201.00073%200.998047%205.9256%200.998047%2012.0007H2.99805ZM11.998%2021.0007C7.02748%2021.0007%202.99805%2016.9713%202.99805%2012.0007H0.998047C0.998047%2018.0759%205.92291%2023.0007%2011.998%2023.0007V21.0007ZM17.1011%2019.4153C15.6512%2020.4153%2013.8945%2021.0007%2011.998%2021.0007V23.0007C14.3129%2023.0007%2016.4635%2022.2846%2018.2366%2021.0617L17.1011%2019.4153ZM18.0571%2019.3196C18.0834%2019.3289%2018.1094%2019.3403%2018.1349%2019.3537L17.2028%2021.1233C17.2627%2021.1548%2017.325%2021.1821%2017.3895%2021.2049L18.0571%2019.3196ZM20.272%2020.104L18.0571%2019.3196L17.3895%2021.2049L19.6044%2021.9893L20.272%2020.104ZM19.5062%2020.8699C19.3376%2020.3941%2019.7962%2019.9355%2020.272%2020.104L19.6044%2021.9893C20.7146%2022.3825%2021.7846%2021.3125%2021.3914%2020.2023L19.5062%2020.8699ZM18.7468%2018.7258L19.5062%2020.8699L21.3914%2020.2023L20.6321%2018.0581L18.7468%2018.7258Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_91_53001%29%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -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%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%209.00028C5.60156%2012.5349%208.46692%2015.4003%2012.0016%2015.4003C15.5362%2015.4003%2018.4016%2012.5349%2018.4016%209.00028C18.4016%205.46564%2015.5362%202.60028%2012.0016%202.60028C8.46692%202.60028%205.60156%205.46564%205.60156%209.00028ZM5.20078%2016.4003C3.8753%2016.4003%202.80078%2017.4748%202.80078%2018.8003C2.80078%2020.1257%203.87529%2021.2003%205.20078%2021.2003H18.8008C20.1263%2021.2003%2021.2008%2020.1257%2021.2008%2018.8003C21.2008%2017.4748%2020.1263%2016.4003%2018.8008%2016.4003H5.20078Z%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%2F%3E%3C%2Fsvg%3E";export{l as default};
@@ -0,0 +1 @@
1
+ var C="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%3Cmask%20id%3D%22path-1-inside-1_251_63695%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%208.99998C5.60156%2012.5346%208.46692%2015.4%2012.0016%2015.4C15.5362%2015.4%2018.4016%2012.5346%2018.4016%208.99998C18.4016%205.46534%2015.5362%202.59998%2012.0016%202.59998C8.46692%202.59998%205.60156%205.46534%205.60156%208.99998ZM5.20078%2016.3999C3.8753%2016.3999%202.80078%2017.4745%202.80078%2018.7999C2.80078%2020.1254%203.87529%2021.1999%205.20078%2021.1999H18.8008C20.1263%2021.1999%2021.2008%2020.1254%2021.2008%2018.7999C21.2008%2017.4745%2020.1263%2016.3999%2018.8008%2016.3999H5.20078Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M12.0016%2014.4C9.01921%2014.4%206.60156%2011.9823%206.60156%208.99998H4.60156C4.60156%2013.0869%207.91464%2016.4%2012.0016%2016.4V14.4ZM17.4016%208.99998C17.4016%2011.9823%2014.9839%2014.4%2012.0016%2014.4V16.4C16.0885%2016.4%2019.4016%2013.0869%2019.4016%208.99998H17.4016ZM12.0016%203.59998C14.9839%203.59998%2017.4016%206.01762%2017.4016%208.99998H19.4016C19.4016%204.91305%2016.0885%201.59998%2012.0016%201.59998V3.59998ZM6.60156%208.99998C6.60156%206.01762%209.01921%203.59998%2012.0016%203.59998V1.59998C7.91464%201.59998%204.60156%204.91305%204.60156%208.99998H6.60156ZM3.80078%2018.7999C3.80078%2018.0267%204.42758%2017.3999%205.20078%2017.3999V15.3999C3.32301%2015.3999%201.80078%2016.9222%201.80078%2018.7999H3.80078ZM5.20078%2020.1999C4.42758%2020.1999%203.80078%2019.5731%203.80078%2018.7999H1.80078C1.80078%2020.6777%203.32301%2022.1999%205.20078%2022.1999V20.1999ZM18.8008%2020.1999H5.20078V22.1999H18.8008V20.1999ZM20.2008%2018.7999C20.2008%2019.5731%2019.574%2020.1999%2018.8008%2020.1999V22.1999C20.6785%2022.1999%2022.2008%2020.6777%2022.2008%2018.7999H20.2008ZM18.8008%2017.3999C19.574%2017.3999%2020.2008%2018.0267%2020.2008%2018.7999H22.2008C22.2008%2016.9222%2020.6786%2015.3999%2018.8008%2015.3999V17.3999ZM5.20078%2017.3999H18.8008V15.3999H5.20078V17.3999Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_251_63695%29%22%2F%3E%3C%2Fsvg%3E";export{C as default};
@@ -0,0 +1 @@
1
+ var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAAA0BJREFUaEPtWd9LU3EUP+d7N91QFkJolBDoLOdM0GnzwYcV9CAZPVRCCZkP9WRQVPQSNaL/oKJfDxH0kPUQCRbRg4uwNJmC6fLXgsDCDBKWsul2vyfuxpW7MnR332sad0/b937P55zP55z7/XB3ETSfykpvUYwSJ4BDPQAWEXGr9vpK3xFRRoBRkFjnts15nYFAILFSTLbXUQUod9cdSHA6R8TzsgVV4hHZF4Zw51hz00u/389FYC6HkSSgFB+X5ctGJEFkYbDgrckP/a8NwU+OjSx3qMozhmMA1uvWQttIKBCYyySpz+ezff0+10wExznnm7SxKVx8wwCmM8FU9hLAogVg2m6vGQ4G78a18eh0ey6STIeVRSWJw+5p+31TpgkrfL78+MxcCwC1cE72TOP/tp8hm0cGt8eG+zsQkZKj6nR5nhJRcYpATvtEqLdPVMJdDQ0F0R/RNiA8RMRzROEyxgYKC7ae7+np/IlOV+1b9bTJ3eLYk+nYrKYor7fRMRuZ2csRSpBAxyGB+RzIDURFaj6J4fPxUPAKlpbX9KuL4dGButUU9C/2+P1+9vBx11Hi8hkNibMbhoBadJmr9gIn3pz8LWFPGgG7xdqUjZEZ1RlEFgegb8Cgl1FOt8wXbqa8BmfTCCCyeVFGZiCZtBrTCBiV1EjcPwhkY2RGFZrylZgbIH6ac9qZZmTaU0iUkRlFxOM5ZY1Eg/e1JNI6INrIjCBSVlHv5XzxhoqdRsAoIxNJRBmnhelI97IE1rORaUXQjv2GMzKFiElA5EzrwTI7oEc1kTFmB0SqqQfL7IAe1UTGmB0QqaYeLLMDelQTGWN2QKSaerDMDuhRTWTM/9sByEnsDw8NzYhUSzRWaVVVISxaupaeiZ0uzzsisigLkmS5MT7y/oHopCLxdrh3t8pyol3BRMSE8vf6IyJemlxguBCLlOybmnoSFZlUFFZx8RG7zfHpFXHKTRFgYXRWeysoGl9SXSHBULonS7EX62WclLGRZFsjJ/mkWnySgN3amnzJV+aqvsQJD4pSai1wGNKziY+D15Zes24kEmrxyS5o1VLGCWLK61bart7Ya6HmanIoNywAfgabdHVysC+kxvwC0SKlujS63bMAAAAASUVORK5CYII=";export{A as default};
@@ -1 +1 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAyCAYAAAD/VJ3gAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPZSURBVHgB7ZpNTxNRFIbPHWvAriDUnRpcqLiy4MoYk7aJhsQFkmgipJEhBOkO8A/48QdgWTHEwSBhhZi4MC4oxhjdKLgCcSFBluDHAoRQejy3tYilc+9MO7cf0z5kwnTmzLT37XnnzJxbgCpVqiiEpVd0faAuDr+7UGN+cCmI8IsBmzuM+NowostWjkkKpOu9/jjTYvSyDioABFhG3G2fMB7Ny2KZrkca4wznKkWcf+BPD7JmWSZpOwzuVZ44HFa3A3BXFqUxwDaoUBjDa7IYrTKzJ4187BpUEVIVSEJVIAlVgSR4IAd8vgZovRyCE8ePJV+vfFuFl69mYG19HdyGbYEuXbwA4Y7r4PV697adbTqd3D4yOgYf5j6Bm7BlMZ45t3tu/SdOGq/3CO3rAl9DA7gJWwKFO24I93ORWq+EwE3YEqjpzClpzPnmc+AmHK9iG5ub4CZsCbSysiqNWVv/Dm7ClkBv3r6XxvBy7yZsCvQuuZgx9fwFLH5eAjdh+z5oZPQJLCx+gfa2q3DUlyrpC4tLyewSiVeu5HQnnc6k9P3QpuoLM8Is9YbHqME1O0kdwJvUBfVAgnrnrIuaOtKeTj7kJFAa5cJQWxQR7z81Rob3b51MtUn5Mt2pR3SN4ZCqvlbJPqzyxnoCE8FMcTKZMKIGj+NiggJKUyCEsQ2sbbYy68DhcapEKjGBuKUSg+NGVJ82hm0NVpVIeV2DnCQ1V5UwnatKTmyyrWe0GqBl1oO17UaGiPzYTr03qDk4x1cKGYT0Z4gsFdYjgR22RXN3SXE4gTjbjnHRMmOdzqQiC4Q/KGvukKW6zSwV7unrp/nfGJX5xoxj/YUQqWgCkaW+0iBCZlWKDzzcHYlBggmqmHqRiiFQ2lItNiwlOp1SkQosUD6WEp5XmUiM0hihAHBL7SKEJrP8WIAyhspp7f4qlSNs3oM1QSOL+FTd/Nmq2/jjKBOdsRAZxC01zC2VVZyePv4vaN1SwrdyPJMUC7RnqcFMS9EggLKXf3sDZKkZe5YSvqejIikTiFsqjqwlW5XilqK0qqfVGapSQ+A4zomkQiBLlqIBfIS8LSX8GI6I5PBFmlsKH2TLGm4puggz0LBfTdaYIb5wyx6IHRNIVqUOQU39LtueAqVZY4a5SDKcsFiJWEqEud1k5JlBpWgpEfYzKecMKm6VyhX7mZSLQGVgKRH2RLJpsXKzlAhrdrPcUUxVKUZV6uFy5r59lpoicQJQFqD/7+PNSVGUFYuVuaXMsfJ440ndTZr1by1YCpC3J4aEj8Qli/xO2oPIphkD/cChrrPUQfjYZTF/AEBNjHm4XhcNAAAAAElFTkSuQmCC";export{A as default};
1
+ var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAABLlJREFUaEPlmVtsFFUYx893ZpfeaRNjK7ZJLexuu7NFSmeXNgG1Gn0ooQajpdjiBR9MJFxsvRSxbVb0xRiFUKOJLxrBW5aERIhGCbItUMDtFKTt2psiRiNYH7iVXnbn+8xsO9tl09JtdyuzcV5mds+Zc37/7zYz5wALOQoLS7JGyP8sQ1bKGGQRoTG0/XZdA3AfY3SJcXYqEQyfdHWdvqSxgHZRYHNU+JFeIsKU2wUaybwAfMjA4d2ebs9BtX9AgArvU5SmSAbQSx+jIOxURUAgbBTlK83ynEMvY8ZmY2Zit9ftvq4HYLGsLNX394iNMd8WRMoPWB74UKIgVIHJJtWTQk+of6rwC5OkjbL8kU8P4OEMkvS88eqw/HFQhAD7wWSVDhBRzriABZv7vadO6xFeYzKLpSWIY++PewH+AJPV3qZVm4S7Fj6ol7CZzohqOI1evHp0Iox8sKSg2KN1/qWnw6Fn62tsocz/TwGVlZXCT94LNYj+RwAgl4gucG44vEzM/czlcinz7cWoPKDCn+08/wEyLA4H5Yx3FC3N2zTfIqISYLGteFpR/Fums7IgGJr7un/8dD69EJUAk7V4LxErCFQBzj9MT1r05ZXhv9YT4gvjlYH1DPzc8ZRuBZhFqRWRklTAjJTsB2T54A1Jqki+PPRny8TDcLjfK9+vWwFx74G4z4H/ogoREeTb7CsBgHq6PG3qOTQko0pidaD5fA6o8BbR3oBEj6pzCRxq+7zy8ZgKmK8EHYd37EDCtdocBoG/2NvdfkL3AlR4s016jZA9psFygK/7vO1vxTyEYu2BcXh7PSE9ro0NjB/asH7Nm06nE8PnizoHYi0g9KNqIu6/qV5X8cZU8Gq7rgSYbfZXUcHKkLD5tqaqwjkdvK4ELBEdLzNUqibh+Xc1VWuabgWvGwEmcUUdof/JYMxz/v1yW15TJG+yMQshkyhVAmOrgbHf05JYsyzL/0SSHyabvZYUrNb6ChwOL7MtbowEPiYeUFcHrg3LDQrS6qAFAS4KxpStvedaz99KhNnq2IakbJgMG+FIdlZKg9vt9kciPmoBRUVlGddHh94hUorCJwQO1xYwXuf1es5OBWMWpa2IFHzV5sB/yM5KfX028FEJKCgqvcc/6t9NhNlBC3JwM8ZKtFdsAD7GjdDUd85zJFSERbRvVhCfmbyPH83OTN0xW/g5C7DYHA4kfJuQ0iYgCAzCnoEuzz7LUqkAFbabkO7Q2rjAd/V3t3+h/rZYHZsUUjZOJiy05GSmbZ8L/JwEWKzSWmRsOxEJ6gCcwwgJvGGg0xP4iFGP/OUr71ZGR/cQYm4QVOCfM6QRInouBL41JzOtfq7wsxYQnnQAbJAboK6vU+4Jj3NJejj9yo3L7xHhvVPlAAA7lp5sr4926TLiMmoRpVUK0q6QeO9NTUiuPXPm2OB0FaO8vDxh4LfBnUj40E19BDiRkSi9Ei38rDwQKgA4tNyZvrjx5EnX8Ezlzul08n2uQ9u0Wq9WG2NhXqPX5Rqb6d5I2iP2QCABRWmVeq5eV9E20yM+fHKr9b5FfgMl9Xce/zUSsEj73CQg7hd34395Pd43OOJ+i0lNnLje5NMyP663WTUR8bjR/S+/EAdi6i5GNAAAAABJRU5ErkJggg==";export{A as default};
@@ -1 +1 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAwCAYAAABdXlfVAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKgSURBVHgB7ZtNbtNAFMf/bwJSlukNml6AcAM4QcMOpEg4sGi7SugBoFyAhlUbFsSVEsSu6QngCJwAeoQuitKqzjzeELviw6nHkSPFmflJzuTLlvzzvOd5Y5sQEwTdWqSuOgA1wFxDWSC6YMZ4NDg6wZIg8/Is2GtWSA/kY3nk/AMTBvd1dT8MexcoGBUEu5tlF2QgRvtGTV5jCagbwkHZBSUQU/epHHQUjCLwNtaICnQTBaPWpRfFEEEVvj8Knky8JAvuwfMXrZc7pumQpq4mPh197O97STGtYNc0j6DxxrSM2dlSmmxJzNwbhf1X8ze+05N02UFJkUoDDN6I6PpQRtbP0/6TmZMIdJbx+zeUFBNaUWXSmdLV93mCDE6GWxJarEl6Dzey/u+UpGAmpx4pfifFXlMEWa3nhCSTdyS7yizHdUeSrCShfANoJyRFNDGzHV9ETiOe+MiFE5JoJqZmF1z/Y3F2w+Zdv2vodar9UskeJxEftl7sbctYInUyi5gLr7pXDYtwkyQnIuZHcv4YLxu+wLXAS7LAS7LAS7LAS7LAS7LAS7LAS7LAS7LAS7LAS7LAS7LACUlyxccsZ1gQJyQNw77Mt5lpW/1E3pwjJ86E2zD8YJYxMeoy//82z7rO5aRheIwIOIgYW7a9ysnE/VlEyfJDpl3rzCRXp/nOWwidPruNwiNMwb2I6aHk9rk3pjo/BIh71bmEXqAZ7bQQ9OOkmE8iSwPhlPE46VWJMC/pD5Je9RPV4JKrG6PB8Zb53t+flMI47JnmNpn7nmSByjr9lQxJJ7r4JwJknLBwTbOKTKHGKBg1hXkiYE16E+O9SbwoGPV7o8ztRQq/lYL59BLVXDWZLbcX8s0zGZKgurI8QIkwB1d24kRqsq9YEr8AgL/kGzCNCZMAAAAASUVORK5CYII=";export{A as default};
1
+ var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAAAqlJREFUaEPtmUFoE0EUhufNNBpRWi9tPAhWm9RmU7S6Dekxolc1gqDgxV48tHoS7E0WwWPwoCcp1KAWC0KlHnI0WJGGsj1Ik9ZUbxWsB8HQ0nQ3mSebZsMaKrRmN9mR5LRkZ2f/771/3j5mgFh+/f0RXwGLNwknQ4SAD5F7rPebdQ1AdUJwjVAy54W2Z4uL6TVTC5gXfaHwxSLHu4j8YLOE7ua9AHSjjUJ8OTP/1hhfBjDE66XS/d1M4JYxHsYeGBBQtk2pNGVGnlL4TIjnsafLm8mmUutuECxFo4f0H4UQIfodzvFkOfJAN7yMXQN/SB7DEl41/jTEtx+Qh1X1qe4G4bUaZPmWJ7+pTlQhGLwGf1CeRsSj2wD7bq9k59JuFG9qCkhDEc61J9tZgFXwBwc/mtVm/5H2c26xzd+CaNhp63v+XcVGOvT0nZ03B39dXgi7OfqmNqvmFkAzMtbKQDOibn1nKwM7ZaA3KMc4IVcYgfcnujtfJJPJLacy5UgGApI8yzl6K/X5GwUez2UXZp2AcATAOmm11WX0A2Es/uVTetVOkIYBVLKhAfKE/7gvYZetHAcASqaRk5jZrtttK8cBjJZEOh0OaRq/h4iS1T5gg60aAmCIVhSFvnw1EyOUjnDOO6prA6hGCU7kltTxf1kbDQMwxQ0MRA+va/mRWlsxgIe5JfXNXiEaDiDLFzp+bf4crQWgDB6tZNRJ1wIYFpqcmrmMQEdrLWRUphvXL40risJdCRA6E5G2CsUxIRex8GX0j7IJVAMgCf+xTnE+ZEK2EoHgYIpXdvUAqHjNXO+p8Hks8mFAkurp7npuV9+zU4Vy5Duw11JYz/gWQD3Rs+PZVgbsiGI9c/xfGRB+c1f87XXRDziEP2IyqoHQh3xmORP6mNWEEPGg+zdk8RZTNE1sngAAAABJRU5ErkJggg==";export{A as default};
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import React from 'react';
3
2
 
4
3
  interface Props {
@@ -7,7 +6,7 @@ interface Props {
7
6
  checkedColor?: string;
8
7
  className?: string;
9
8
  }
10
- declare function Switch(props: Props): react_jsx_runtime.JSX.Element;
9
+ declare function Switch(props: Props): JSX.Element;
11
10
  declare namespace Switch {
12
11
  var defaultProps: {
13
12
  checkedColor: string;
@@ -1,5 +1,6 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import { Conversation, Message } from '@tencentcloud/chat';
3
+ import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
3
4
  import { UnknowPorps } from '../../context/ComponentContext.js';
4
5
  import { TUIChatHeaderDefaultProps } from '../TUIChatHeader/TUIChatHeaderDefault.js';
5
6
  import { TUIMessageProps } from '../TUIMessage/TUIMessage.js';
@@ -18,9 +19,13 @@ interface TUIChatProps {
18
19
  InputPlugins?: React.ComponentType<UnknowPorps>;
19
20
  InputQuote?: React.ComponentType<UnknowPorps>;
20
21
  MessagePlugins?: React.ComponentType<UnknowPorps>;
22
+ MessageCustomPlugins?: React.ComponentType<UnknowPorps>;
23
+ MessageTextPlugins?: React.ComponentType<UnknowPorps>;
21
24
  onMessageRecevied?: (updateMessage: (event?: Array<Message>) => void, event: any) => void;
22
25
  sendMessage?: (message: Message, options?: any) => Promise<Message>;
23
26
  revokeMessage?: (message: Message) => Promise<Message>;
27
+ selectedConversation?: (conversation: Conversation) => Promise<Conversation>;
28
+ filterMessage?: (messageList: Array<IMessageModel>) => Array<IMessageModel>;
24
29
  messageConfig?: TUIMessageProps;
25
30
  cloudCustomData?: string;
26
31
  TUIMessageInputConfig?: TUIMessageInputBasicProps;
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as t,__generator as s}from"tslib";import a,{createElement as o,useReducer as r,useRef as n,useEffect as i,useMemo as c}from"react";import{jsx as g,jsxs as u,Fragment as m}from"react/jsx-runtime";import{useTUIKitContext as d}from"../../context/TUIKitContext.js";import{TUIChatStateContextProvider as M}from"../../context/TUIChatStateContext.js";import{TUIChatActionProvider as p}from"../../context/TUIChatActionContext.js";import{ComponentProvider as l}from"../../context/ComponentContext.js";import I from"./hooks/useCreateTUIChatStateContext.js";import{TUIMessage as h}from"../TUIMessage/TUIMessage.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import{CONSTANT_DISPATCH_TYPE as T}from"../../constants.js";import{useMessageReceviedListener as f}from"./hooks/useMessageReceviedListener.js";import{chatReducer as v,initialState as C}from"./TUIChatState.js";import{useCreateMessage as S}from"./hooks/useCreateMessage.js";import{useHandleMessageList as E}from"./hooks/useHandleMessageList.js";import{useHandleMessage as x}from"./hooks/useHandleMessage.js";import{TUIChatHeader as U}from"../TUIChatHeader/TUIChatHeader.js";import"@tencentcloud/chat";import"../Icon/config.js";import"../Icon/type.js";import"date-fns";import"date-fns/locale";import"../../context/TUIMessageContext.js";import{TUIMessageList as j}from"../TUIMessageList/TUIMessageList.js";import{TUIMessageInput as L}from"../TUIMessageInput/TUIMessageInput.js";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{EmptyStateIndicator as _}from"../EmptyStateIndicator/EmptyStateIndicator.js";import{Toast as y}from"../Toast/index.js";function A(t){var s=t.conversation,a=t.EmptyPlaceholder,r=void 0===a?g(_,{listType:"chat"}):a,n=d("TUIChat"),i=n.conversation,c=n.chat,u=s||i;return(null==u?void 0:u.conversationID)?o(R,e({chat:c},t,{conversation:u,key:u.conversationID})):r}function R(a){var o=this,d=a.chat,_=a.conversation,A=a.className,R=a.children,D=a.TUIMessage,P=a.TUIChatHeader,H=a.TUIMessageInput,b=a.InputPlugins,k=a.MessagePlugins,w=a.MessageContext,F=a.InputQuote,G=a.onMessageRecevied,N=a.sendMessage,O=a.revokeMessage,q=a.messageConfig,Q=a.cloudCustomData,V=a.TUIMessageInputConfig,X=a.TUIMessageListConfig,K=r(v,e(e({},C),{conversation:_})),Y=K[0],z=K[1],B=n(null),J=n(),W=I(e({chat:d,conversation:_,messageListRef:B,textareaRef:J,messageConfig:q,cloudCustomData:Q,TUIMessageInputConfig:V,TUIMessageListConfig:X},Y)),Z=S({chat:d,conversation:_,cloudCustomData:Q}),$=Z.createTextMessage,ee=Z.createFaceMessage,te=Z.createImageMessage,se=Z.createVideoMessage,ae=Z.createFileMessage,oe=Z.createForwardMessage,re=Z.createCustomMessage,ne=Z.createAudioMessage,ie=Z.createTextAtMessage,ce=Z.createLocationMessage,ge=Z.createMergerMessage,ue=E({chat:d,conversation:_,state:Y,dispatch:z}),me=ue.getMessageList,de=ue.updateMessage,Me=ue.editLocalMessage,pe=ue.removeMessage,le=ue.updateUploadPendingMessageList,Ie=x({state:Y,dispatch:z}),he=Ie.operateMessage,Te=Ie.setAudioSource,fe=Ie.setVideoSource,ve=Ie.setHighlightedMessageId,Ce=function(e,a){return t(o,void 0,void 0,(function(){var t;return s(this,(function(s){switch(s.label){case 0:de([e]),s.label=1;case 1:return s.trys.push([1,6,,7]),N?[4,N(e,a)]:[3,3];case 2:return s.sent(),[3,5];case 3:return[4,d.sendMessage(e,a)];case 4:s.sent(),s.label=5;case 5:return Me(e),[3,7];case 6:throw t=s.sent(),y({text:t,type:"error"}),Me(e),new Error(t);case 7:return[2]}}))}))},Se=function(){return t(o,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return Y.isCompleted?(z({type:T.SET_NO_MORE,value:!0}),[2]):[4,me({nextReqMessageID:Y.nextReqMessageID})];case 1:return(e=t.sent())?(z({type:T.SET_HISTORY_MESSAGELIST,value:e.data.messageList}),z({type:T.SET_IS_COMPLETE,value:e.data.isCompleted}),z({type:T.SET_NEXT_REQ_MESSAGE_ID,value:e.data.nextReqMessageID}),[2]):[2]}}))}))};f(de,G),i((function(){t(o,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,me()];case 1:return(e=t.sent())?(e.data.messageList.length>0&&z({type:T.SET_MESSAGELIST,value:e.data.messageList}),z({type:T.SET_MESSAGELIST,value:e.data.messageList}),z({type:T.SET_IS_COMPLETE,value:e.data.isCompleted}),z({type:T.SET_NEXT_REQ_MESSAGE_ID,value:e.data.nextReqMessageID}),[2]):[2]}}))}))}),[_]);var Ee=c((function(){return{sendMessage:Ce,removeMessage:pe,updateMessage:de,createTextMessage:$,createFaceMessage:ee,createImageMessage:te,createVideoMessage:se,createFileMessage:ae,createForwardMessage:oe,createCustomMessage:re,createAudioMessage:ne,createTextAtMessage:ie,createLocationMessage:ce,createMergerMessage:ge,editLocalMessage:Me,operateMessage:he,loadMore:Se,revokeMessage:O,setAudioSource:Te,setVideoSource:fe,setHighlightedMessageId:ve,updateUploadPendingMessageList:le}}),[Ce,pe,de,$,ee,te,se,ae,oe,re,ne,ie,ce,ge,Me,he,Se,O,Te,fe,ve,le]),xe=c((function(){return{TUIMessage:D||h,MessageContext:w,InputPlugins:b,MessagePlugins:k,TUIChatHeader:P,TUIMessageInput:H,InputQuote:F}}),[]);return g("div",e({className:"chat ".concat(A)},{children:g(M,e({value:W},{children:g(p,e({value:Ee},{children:g(l,e({value:xe},{children:R||u(m,{children:[g(U,{}),g(j,{}),g(L,{})]})}))}))}))}))}var D=a.memo(A);export{D as TUIChat};
1
+ import{__assign as e,__awaiter as t,__generator as s}from"tslib";import o,{createElement as a,useReducer as n,useRef as i,useEffect as r,useMemo as u}from"react";import{jsx as c,jsxs as g,Fragment as m}from"react/jsx-runtime";import{TUIStore as p,StoreName as d,TUIChatService as l}from"@tencentcloud/chat-uikit-engine";import{JSONStringToParse as M}from"../untils.js";import{useTUIKitContext as I}from"../../context/TUIKitContext.js";import{TUIChatStateContextProvider as f}from"../../context/TUIChatStateContext.js";import{TUIChatActionProvider as h}from"../../context/TUIChatActionContext.js";import{ComponentProvider as v}from"../../context/ComponentContext.js";import T from"./hooks/useCreateTUIChatStateContext.js";import{TUIMessage as C}from"../TUIMessage/TUIMessage.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import{CONSTANT_DISPATCH_TYPE as U}from"../../constants.js";import{chatReducer as j,initialState as S}from"./TUIChatState.js";import{useHandleMessageList as x}from"./hooks/useHandleMessageList.js";import{useHandleMessage as L}from"./hooks/useHandleMessage.js";import{TUIChatHeader as E}from"../TUIChatHeader/TUIChatHeader.js";import"@tencentcloud/chat";import"../Icon/config.js";import"../Icon/type.js";import"../../utils/env.js";import"../../context/TUIMessageContext.js";import{TUIMessageList as P}from"../TUIMessageList/TUIMessageList.js";import{TUIMessageInput as y}from"../TUIMessageInput/TUIMessageInput.js";import"react-i18next";import{EmptyStateIndicator as H}from"../EmptyStateIndicator/EmptyStateIndicator.js";function A(t){var s=t.conversation,o=t.EmptyPlaceholder,n=void 0===o?c(H,{listType:"chat"}):o,i=I("TUIChat"),r=i.conversation,u=i.chat,g=s||r;return(null==g?void 0:g.conversationID)?a(D,e({chat:u},t,{conversation:g,key:g.conversationID})):n}function D(o){var a=this,I=o.chat,H=o.conversation,A=o.className,D=o.children,k=o.TUIMessage,_=o.TUIChatHeader,R=o.TUIMessageInput,N=o.InputPlugins,w=o.MessagePlugins,F=o.MessageContext,G=o.MessageCustomPlugins,O=o.MessageTextPlugins,Q=o.InputQuote;o.onMessageRecevied,o.sendMessage;var V=o.revokeMessage;o.selectedConversation;var b=o.filterMessage,K=o.messageConfig,q=o.cloudCustomData,z=o.TUIMessageInputConfig,B=o.TUIMessageListConfig,J=n(j,e(e({},S),{conversation:H})),W=J[0],X=J[1],Y=i(null),Z=i(),$=T(e({chat:I,conversation:H,messageListRef:Y,textareaRef:Z,messageConfig:K,cloudCustomData:q,TUIMessageInputConfig:z,TUIMessageListConfig:B},W)),ee=x({chat:I,conversation:H,state:W,dispatch:X,filterMessage:b}),te=ee.editLocalMessage,se=ee.updateUploadPendingMessageList,oe=L({state:W,dispatch:X}),ae=oe.operateMessage,ne=oe.setAudioSource,ie=oe.setVideoSource,re=oe.setHighlightedMessageId,ue=oe.setActiveMessageID;r((function(){return p.watch(d.CHAT,{messageList:ce,isCompleted:ge}),function(){p.unwatch(d.CHAT,{messageList:ce,isCompleted:ge})}}),[]);var ce=function(e){var t=e.filter((function(e){return!e.isDeleted}));X({type:U.SET_MESSAGELIST,value:b?b(t):t})},ge=function(e){e&&X({type:U.SET_NO_MORE,value:e})},me=function(){return t(a,void 0,void 0,(function(){return s(this,(function(e){return l.getMessageList(),[2]}))}))},pe=function(e){return t(a,void 0,void 0,(function(){var t;return s(this,(function(s){return"TIMCustomElem"===e.type&&7===(null===(t=M(e.payload.data))||void 0===t?void 0:t.src)||W.firstSendMessage||X({type:U.SET_FIRST_SEND_MESSAGE,value:e}),[2]}))}))},de=u((function(){return{editLocalMessage:te,operateMessage:ae,loadMore:me,revokeMessage:V,setAudioSource:ne,setVideoSource:ie,setHighlightedMessageId:re,setActiveMessageID:ue,updateUploadPendingMessageList:se,setFirstSendMessage:pe}}),[te,ae,me,V,ne,ie,re,ue,se,pe]),le=u((function(){return{TUIMessage:k||C,MessageContext:F,InputPlugins:N,MessagePlugins:w,MessageCustomPlugins:G,MessageTextPlugins:O,TUIChatHeader:_,TUIMessageInput:R,InputQuote:Q}}),[]);return c("div",e({className:"chat ".concat(A)},{children:c(f,e({value:$},{children:c(h,e({value:de},{children:c(v,e({value:le},{children:D||g(m,{children:[c(E,{}),c(P,{}),c(y,{})]})}))}))}))}))}var k=o.memo(A);export{k as TUIChat};
@@ -1 +1 @@
1
- import{__assign as e,__spreadArray as s}from"tslib";import{CONSTANT_DISPATCH_TYPE as a}from"../../constants.js";import{handleUploadPendingMessage as t,handleMessageList as r,handleMessage as E,handleRemoveMessage as u,handleEditMessage as n}from"./unitls.js";var S=function(S,o){switch(null==o?void 0:o.type){case a.SET_CONVERSATION_PRPFILE:return e(e({},S),{conversation:o.value});case a.SET_MESSAGELIST:return e(e({},S),r(s([],S.messageList.concat(E(o.value).filter((function(e){return!S.messageList.includes(e)}))),!0),S));case a.SET_UPDATE_MESSAGE:return e(e({},S),r(s(s([],S.messageList,!0),E(o.value),!0),S));case a.SET_EDIT_MESSAGE:return e(e({},S),{messageList:s([],n(S.messageList,o.value),!0)});case a.SET_REMOVE_MESSAGE:return e(e({},S),{messageList:s([],u(S.messageList,o.value),!0)});case a.SET_HISTORY_MESSAGELIST:return e(e({},S),r(s(s([],E(o.value),!0),S.messageList,!0),S));case a.SET_NEXT_REQ_MESSAGE_ID:return e(e({},S),{nextReqMessageID:o.value});case a.SET_IS_COMPLETE:return e(e({},S),{isCompleted:o.value});case a.RESET:return e({},i);case a.SET_HIGH_LIGHTED_MESSAGE_ID:return e(e({},S),{highlightedMessageId:o.value});case a.OPERATE_MESSAGE:return e(e({},S),{operateData:e({},o.value)});case a.SET_NO_MORE:return e(e({},S),{noMore:o.value});case a.SET_AUDIO_SOURCE:return e(e({},S),{audioSource:o.value});case a.SET_VIDEO_SOURCE:return e(e({},S),{vidoeSource:o.value});case a.UPDATE_UPLOAD_PENDING_MESSAGE_LIST:return e(e({},S),{uploadPendingMessageList:s([],t(S.uploadPendingMessageList,o.value),!0)});default:return S}},i={conversation:{},messageList:[],nextReqMessageID:"",isCompleted:!1,init:!1,highlightedMessageId:"",lastMessageID:"",isSameLastMessageID:!1,operateData:{},noMore:!1,audioSource:null,vidoeSource:null,uploadPendingMessageList:[]};export{S as chatReducer,i as initialState};
1
+ import{__assign as e,__spreadArray as s}from"tslib";import{CONSTANT_DISPATCH_TYPE as a}from"../../constants.js";import{handleUploadPendingMessage as t,handleEditMessage as r}from"./unitls.js";var E=function(E,S){switch(null==S?void 0:S.type){case a.SET_CONVERSATION_PRPFILE:return e(e({},E),{conversation:S.value});case a.SET_MESSAGELIST:return e(e({},E),{messageList:S.value});case a.SET_EDIT_MESSAGE:return e(e({},E),{messageList:s([],r(E.messageList,S.value),!0)});case a.SET_IS_COMPLETE:return e(e({},E),{isCompleted:S.value});case a.RESET:return e({},u);case a.SET_HIGH_LIGHTED_MESSAGE_ID:return e(e({},E),{highlightedMessageId:S.value});case a.OPERATE_MESSAGE:return e(e({},E),{operateData:e({},S.value)});case a.SET_NO_MORE:return e(e({},E),{noMore:S.value});case a.SET_AUDIO_SOURCE:return e(e({},E),{audioSource:S.value});case a.SET_VIDEO_SOURCE:return e(e({},E),{vidoeSource:S.value});case a.UPDATE_UPLOAD_PENDING_MESSAGE_LIST:return e(e({},E),{uploadPendingMessageList:s([],t(E.uploadPendingMessageList,S.value),!0)});case a.SET_FIRST_SEND_MESSAGE:return e(e({},E),{firstSendMessage:S.value});case a.SET_ACTIVE_MESSAGE_ID:return e(e({},E),{activeMessageID:S.value})}},u={conversation:{},messageList:[],nextReqMessageID:"",isCompleted:!1,init:!1,highlightedMessageId:"",lastMessageID:"",isSameLastMessageID:!1,operateData:{},noMore:!1,audioSource:null,vidoeSource:null,uploadPendingMessageList:[],firstSendMessage:null,activeMessageID:""};export{E as chatReducer,u as initialState};
@@ -1 +1 @@
1
- import{useCallback as e}from"react";import{CONSTANT_DISPATCH_TYPE as t}from"../../../constants.js";function o(o){o.state;var n=o.dispatch;return{operateMessage:e((function(e){n({type:t.OPERATE_MESSAGE,value:e})}),[n]),setAudioSource:e((function(e){n({type:t.SET_AUDIO_SOURCE,value:e})}),[n]),setVideoSource:e((function(e){n({type:t.SET_VIDEO_SOURCE,value:e})}),[n]),setHighlightedMessageId:e((function(e){n({type:t.SET_HIGH_LIGHTED_MESSAGE_ID,value:e})}),[n])}}export{o as useHandleMessage};
1
+ import{useCallback as e}from"react";import{CONSTANT_DISPATCH_TYPE as t}from"../../../constants.js";function o(o){o.state;var E=o.dispatch;return{operateMessage:e((function(e){E({type:t.OPERATE_MESSAGE,value:e})}),[E]),setAudioSource:e((function(e){E({type:t.SET_AUDIO_SOURCE,value:e})}),[E]),setVideoSource:e((function(e){E({type:t.SET_VIDEO_SOURCE,value:e})}),[E]),setHighlightedMessageId:e((function(e){E({type:t.SET_HIGH_LIGHTED_MESSAGE_ID,value:e})}),[E]),setActiveMessageID:e((function(e){E({type:t.SET_ACTIVE_MESSAGE_ID,value:e})}),[E])}}export{o as useHandleMessage};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__assign as n}from"tslib";import{useCallback as o}from"react";import i from"@tencentcloud/chat";import{CONSTANT_DISPATCH_TYPE as r}from"../../../constants.js";function a(a){var s=this,u=a.chat,c=a.conversation;a.state;var E=a.dispatch,p=c.conversationID,f=c.groupProfile,v=c.type===i.TYPES.CONV_C2C,l={conversationID:p};return{getMessageList:o((function(o){return t(s,void 0,void 0,(function(){var t,r;return e(this,(function(e){return t=o||{},f&&(r=f.type),v||r!==i.TYPES.GRP_AVCHATROOM?[2,u.getMessageList(n(n({},l),t))]:[2,null]}))}))}),[u]),updateMessage:o((function(t){E({type:r.SET_UPDATE_MESSAGE,value:t.filter((function(t){return(null==t?void 0:t.conversationID)===p}))})}),[E]),removeMessage:o((function(t){E({type:r.SET_REMOVE_MESSAGE,value:t})}),[E]),editLocalMessage:o((function(t){E({type:r.SET_EDIT_MESSAGE,value:t})}),[E]),updateUploadPendingMessageList:o((function(t){E({type:r.UPDATE_UPLOAD_PENDING_MESSAGE_LIST,value:t})}),[E])}}export{a as useHandleMessageList};
1
+ import{useCallback as t}from"react";import{CONSTANT_DISPATCH_TYPE as e}from"../../../constants.js";function a(a){a.chat,a.conversation,a.state;var n=a.dispatch;return a.filterMessage,{editLocalMessage:t((function(t){n({type:e.SET_EDIT_MESSAGE,value:t})}),[n]),updateUploadPendingMessageList:t((function(t){n({type:e.UPDATE_UPLOAD_PENDING_MESSAGE_LIST,value:t})}),[n])}}export{a as useHandleMessageList};
@@ -1 +1 @@
1
- import{__spreadArray as n}from"tslib";import e from"@tencentcloud/chat";import s from"../../constants.js";import{JSONStringToParse as t}from"../untils.js";var i=function(n){var i=null;return n.filter((function(n){var l;return n.type===e.TYPES.MSG_CUSTOM&&(i=t(null===(l=null==n?void 0:n.payload)||void 0===l?void 0:l.data)),!i||(null==i?void 0:i.businessID)!==s.TYPE_TYPING}))},l=function(n,e){var s,t={messageList:[],lastMessageID:"",isSameLastMessageID:!1};return t.messageList=n,t.messageList.length>=1&&(t.lastMessageID=null===(s=null==t?void 0:t.messageList[t.messageList.length-1])||void 0===s?void 0:s.ID),t.messageList=t.messageList.filter((function(n){return!(null==n?void 0:n.isDeleted)})),t.isSameLastMessageID=(null==t?void 0:t.lastMessageID)===(null==e?void 0:e.lastMessageID),t},r=function(e,s){var t=n([],e,!0),i=t.findIndex((function(n){return(null==n?void 0:n.ID)===(null==s?void 0:s.ID)}));return t[i]=s,t},u=function(e,s){var t=n([],e,!0),i=t.findIndex((function(n){return(null==n?void 0:n.ID)===(null==s?void 0:s.ID)}));return t.splice(i,1),t},o=function(e,s){var t=n([],e,!0);t.some((function(n){return n.ID===s.ID}))||t.push(s);var i=t.findIndex((function(n){return(null==n?void 0:n.ID)===(null==s?void 0:s.ID)}));return t[i]=s,t};export{r as handleEditMessage,i as handleMessage,l as handleMessageList,u as handleRemoveMessage,o as handleUploadPendingMessage};
1
+ import{__spreadArray as n}from"tslib";import"@tencentcloud/chat";import"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat-uikit-engine";import"react/jsx-runtime";import"react";import"../Icon/config.js";import"../Icon/type.js";var t=function(t,o){var r=n([],t,!0),i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r},o=function(t,o){var r=n([],t,!0);r.some((function(n){return n.ID===o.ID}))||r.push(o);var i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r};export{t as handleEditMessage,o as handleUploadPendingMessage};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as a}from"react/jsx-runtime";import i,{useState as r,useEffect as o}from"react";import n from"@tencentcloud/chat";import{Avatar as c}from"../Avatar/Avatar.js";import{handleDisplayAvatar as l}from"../untils.js";import{Icon as s}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{useTUIKitContext as d}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function u(i){var u=i.title,h=void 0===u?"":u,v=i.avatar;i.isOnline;var f=i.conversation,p=i.isLive,S=i.opateIcon,N=r(h),T=N[0],C=N[1],E=r(""),I=E[0],P=E[1];o((function(){switch(C(h),v&&P(v),null==f?void 0:f.type){case n.TYPES.CONV_C2C:O(f.userProfile,null==f?void 0:f.remark);break;case n.TYPES.CONV_GROUP:Y(f.groupProfile);break;case n.TYPES.CONV_SYSTEM:C("System Notice");break;default:C("")}}),[f]);var O=function(e,a){T||C(a||(null==e?void 0:e.nick)||(null==e?void 0:e.userID)),v||P(t(c,{size:32,image:l(e.avatar)}))},Y=function(e){T||C((null==e?void 0:e.name)||(null==e?void 0:e.groupID)),v||P(t(c,{size:32,image:l(e.avatar,n.TYPES.CONV_GROUP)}))},g=d().setTUIManageShow;return a("header",e({className:"tui-chat-header ".concat(p?"tui-chat-live-header":"")},{children:[t("div",e({className:"tui-chat-header-left ".concat((null==f?void 0:f.type)===n.TYPES.CONV_SYSTEM?"system":"")},{children:(null==f?void 0:f.type)!==n.TYPES.CONV_SYSTEM&&I})),t("div",e({className:"header-content"},{children:t("h3",e({className:"title"},{children:T}))})),t("div",e({className:"tui-chat-header-right"},{children:t("div",e({className:"header-handle"},{children:S||t(s,{className:"header-handle-more",onClick:function(){g(!0)},type:m.ELLIPSE,width:18,height:5})}))}))]}),null==f?void 0:f.conversationID)}var h=i.memo(u);function v(a){var i=e({},a);return t(h,e({},i))}export{v as TUIChatHeaderDefault};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";import r,{useState as a,useEffect as o}from"react";import n from"@tencentcloud/chat";import{TUIConversationService as c}from"@tencentcloud/chat-uikit-engine";import{Avatar as l}from"../Avatar/Avatar.js";import{handleDisplayAvatar as s}from"../untils.js";import{isH5 as m}from"../../utils/env.js";import{Icon as d}from"../Icon/Icon.js";import{IconTypes as h}from"../Icon/type.js";import{useTUIKitContext as u}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function v(r){var v=r.title,p=void 0===v?"":v,f=r.avatar;r.isOnline;var S=r.conversation,C=r.isLive,N=r.opateIcon,g=a(p),T=g[0],E=g[1],I=a(""),P=I[0],y=I[1];o((function(){switch(E(p),f&&y(f),null==S?void 0:S.type){case n.TYPES.CONV_C2C:O(S.userProfile,null==S?void 0:S.remark);break;case n.TYPES.CONV_GROUP:Y(S.groupProfile);break;case n.TYPES.CONV_SYSTEM:E("System Notice");break;default:E("")}}),[S]);var O=function(e,i){T||E(i||(null==e?void 0:e.nick)||(null==e?void 0:e.userID)),f||y(t(l,{size:32,image:s(e.avatar)}))},Y=function(e){T||E((null==e?void 0:e.name)||(null==e?void 0:e.groupID)),f||y(t(l,{size:32,image:s(e.avatar,n.TYPES.CONV_GROUP)}))},j=u().setTUIManageShow;return i("header",e({className:"tui-chat-header ".concat(C?"tui-chat-live-header":"")},{children:[m&&t("div",e({style:{paddingRight:"10px"}},{children:t(d,{onClick:function(){c.switchConversation("")},type:h.BACK,width:9,height:16})})),t("div",e({className:"tui-chat-header-left ".concat((null==S?void 0:S.type)===n.TYPES.CONV_SYSTEM?"system":"")},{children:(null==S?void 0:S.type)!==n.TYPES.CONV_SYSTEM&&P})),t("div",e({className:"header-content"},{children:t("h3",e({className:"title"},{children:T}))})),t("div",e({className:"tui-chat-header-right"},{children:t("div",e({className:"header-handle"},{children:N||t(d,{className:"header-handle-more",onClick:function(){j(!0)},type:h.ELLIPSE,width:18,height:5})}))}))]}),null==S?void 0:S.conversationID)}var p=r.memo(v);function f(i){var r=e({},i);return t(p,e({},r))}export{f as TUIChatHeaderDefault};
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsx as i,jsxs as o,Fragment as e}from"react/jsx-runtime";import n,{useState as s,useMemo 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 c}from"../../node_modules/react-i18next/dist/es/useTranslation.js";import{TUIContactContextProvider as a}from"../../context/TUIContactContext.js";import{useTUIKitContext as d}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import m from"./hooks/useTUIContact.js";import{TUIContactList as l}from"./TUIContactList/TUIContactList.js";import{TUIContactSearch as h}from"../TUIContactSearch/TUIContactSearch.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as f}from"../Icon/type.js";function u(n){var u=n.children,C=c().t,I=d("TUIContact").setActiveContact,j=s(!1),x=j[0],L=j[1],T=m(),U=T.friendList,v=T.blockList,b=T.blocklistProfile,k=T.friendApplicationList,w=T.isShowContactList,A=T.setShowContactList,N=r((function(){return{friendList:U,blockList:v,blocklistProfile:b,friendApplicationList:k,isShowContactList:w,setShowContactList:A}}),[U,b,k,w,A]);return i(a,t({value:N},{children:u||o("div",t({className:"tui-contacts"},{children:[!x&&o(e,{children:[o("div",t({className:"tui-contacts-header"},{children:[i("div",t({className:"tui-contact-input"},{children:i(h,{})})),i(p,{onClick:function(){I(),L(!0)},type:f.ADDFRIEND,width:24,height:24})]})),i(l,{})]}),x&&o(e,{children:[o("div",t({className:"tui-contacts-add-header"},{children:[i(p,{onClick:function(){I(),L(!1)},type:f.BACK,width:9,height:16}),i("div",t({className:"tui-contacts-add-header-title"},{children:C("TUIContact.Add Friend")}))]})),i(h,{})]})]}))}))}var C=n.memo(u);export{C as TUIContact,u as UnMemoizedTUIContact};
1
+ import{__assign as t}from"tslib";import{jsx as i,jsxs as o,Fragment as c}from"react/jsx-runtime";import e,{useState as n,useMemo as r}from"react";import{useTranslation as s}from"react-i18next";import{TUIContactContextProvider as a}from"../../context/TUIContactContext.js";import{useTUIKitContext as m}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import d from"./hooks/useTUIContact.js";import{TUIContactList as l}from"./TUIContactList/TUIContactList.js";import{TUIContactSearch as h}from"../TUIContactSearch/TUIContactSearch.js";import{Icon as f}from"../Icon/Icon.js";import{IconTypes as p}from"../Icon/type.js";function C(e){var C=e.children,u=s().t,I=m("TUIContact").setActiveContact,L=n(!1),T=L[0],U=L[1],j=d(),v=j.friendList,x=j.blockList,k=j.blocklistProfile,w=j.friendApplicationList,A=j.isShowContactList,N=j.setShowContactList,S=r((function(){return{friendList:v,blockList:x,blocklistProfile:k,friendApplicationList:w,isShowContactList:A,setShowContactList:N}}),[v,k,w,A,N]);return i(a,t({value:S},{children:C||o("div",t({className:"tui-contacts"},{children:[!T&&o(c,{children:[o("div",t({className:"tui-contacts-header"},{children:[i("div",t({className:"tui-contact-input"},{children:i(h,{})})),i(f,{onClick:function(){I(),U(!0)},type:p.ADDFRIEND,width:24,height:24})]})),i(l,{})]}),T&&o(c,{children:[o("div",t({className:"tui-contacts-add-header"},{children:[i(f,{onClick:function(){I(),U(!1)},type:p.BACK,width:9,height:16}),i("div",t({className:"tui-contacts-add-header-title"},{children:u("TUIContact.Add Friend")}))]})),i(h,{})]})]}))}))}var u=e.memo(C);export{u as TUIContact,C as UnMemoizedTUIContact};
@@ -1 +1 @@
1
- import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as i,Fragment as o,jsx as r}from"react/jsx-runtime";import a,{useState 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 s}from"../../../node_modules/react-i18next/dist/es/useTranslation.js";import m from"./hooks/useContactInfo.js";import{BasicInfo as l}from"./basicInfo.js";import{DivWithEdit as d}from"../../DivWithEdit/DivWithEdit.js";function u(a){var u=this,f=a.profile,h=f.userID,p=s().t,v=c(""),b=v[0],N=v[1],x=c(""),g=x[0],I=x[1],j=c(""),k=j[0],C=j[1],T=c(!1),w=T[0],D=T[1],E=m().addFriend;return i(o,{children:[r(l,{profile:f}),w?r("div",t({className:"tui-contact-info-content"},{children:i("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:p("TUIContact.verification info")})),r("p",t({className:"content-item-text"},{children:k}))]}))})):i("div",t({className:"tui-contact-info-content"},{children:[i("div",t({className:"content-item-wording"},{children:[r("p",t({className:"content-item-label"},{children:p("TUIContact.Enter the verification info")})),r("textarea",{className:"content-item-wording-text",value:k,onChange:function(t){C(t.target.value)}})]})),i("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:p("TUIContact.remark")})),r(d,{name:"remark",className:"content-item-text",value:g,type:"text",toggle:function(){N("remark")},isEdit:"remark"===b,confirm:function(t){I(null==t?void 0:t.value),N("")},close:function(){N("")}})]})),r("div",t({className:"content-btn-container"},{children:r("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){return e(u,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,E({userID:h,remark:g,wording:k})];case 1:return t.sent(),D(!0),[2]}}))}))}},{children:p("TUIContact.Send application")}))}))]}))]})}var f=a.memo(u);export{f as AddFriendInfo,u as UnMemoizedAddFriendInfo};
1
+ import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as i,Fragment as o,jsx as c}from"react/jsx-runtime";import r,{useState as a}from"react";import{useTranslation as m}from"react-i18next";import l from"./hooks/useContactInfo.js";import{BasicInfo as s}from"./basicInfo.js";import{DivWithEdit as d}from"../../DivWithEdit/DivWithEdit.js";function f(r){var f=this,u=r.profile,h=u.userID,v=m().t,p=a(""),N=p[0],b=p[1],x=a(""),I=x[0],g=x[1],k=a(""),C=k[0],j=k[1],w=a(!1),D=w[0],E=w[1],T=l().addFriend;return i(o,{children:[c(s,{profile:u}),D?c("div",t({className:"tui-contact-info-content"},{children:i("div",t({className:"content-item"},{children:[c("p",t({className:"content-item-label"},{children:v("TUIContact.verification info")})),c("p",t({className:"content-item-text"},{children:C}))]}))})):i("div",t({className:"tui-contact-info-content"},{children:[i("div",t({className:"content-item-wording"},{children:[c("p",t({className:"content-item-label"},{children:v("TUIContact.Enter the verification info")})),c("textarea",{className:"content-item-wording-text",value:C,onChange:function(t){j(t.target.value)}})]})),i("div",t({className:"content-item"},{children:[c("p",t({className:"content-item-label"},{children:v("TUIContact.remark")})),c(d,{name:"remark",className:"content-item-text",value:I,type:"text",toggle:function(){b("remark")},isEdit:"remark"===N,confirm:function(t){g(null==t?void 0:t.value),b("")},close:function(){b("")}})]})),c("div",t({className:"content-btn-container"},{children:c("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){return e(f,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,T({userID:h,remark:I,wording:C})];case 1:return t.sent(),E(!0),[2]}}))}))}},{children:v("TUIContact.Send application")}))}))]}))]})}var u=r.memo(f);export{u as AddFriendInfo,f as UnMemoizedAddFriendInfo};
@@ -1 +1 @@
1
- import{__assign as e}from"tslib";import{jsx as r,jsxs as t}from"react/jsx-runtime";import a 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 i}from"../../../node_modules/react-i18next/dist/es/useTranslation.js";import{Avatar as n}from"../../Avatar/Avatar.js";import{defaultUserAvatar as s}from"../../Avatar/default.js";function o(a){var o=a.profile,m=i().t,d=o.userID,c=o.nick,l=o.selfSignature,h=o.avatar;return r("div",e({className:"tui-contact-info-header"},{children:t("div",e({className:"header-container"},{children:[t("div",e({className:"header-container-avatar"},{children:[r(n,{size:60,image:h||s}),r("div",e({className:"header-container-name"},{children:c||d}))]})),r("div",e({className:"header-container-text"},{children:"ID:".concat(d)})),t("div",e({className:"header-container-text"},{children:[m("TUIContact.Signature"),":",l||""]}))]}))}))}var m=a.memo(o);export{m as BasicInfo,o as UnMemoizedBasicInfo};
1
+ import{__assign as a}from"tslib";import{jsx as e,jsxs as r}from"react/jsx-runtime";import t from"react";import{useTranslation as i}from"react-i18next";import{Avatar as n}from"../../Avatar/Avatar.js";import{defaultUserAvatar as c}from"../../Avatar/default.js";function o(t){var o=t.profile,m=i().t,d=o.userID,s=o.nick,l=o.selfSignature,v=o.avatar;return e("div",a({className:"tui-contact-info-header"},{children:r("div",a({className:"header-container"},{children:[r("div",a({className:"header-container-avatar"},{children:[e(n,{size:60,image:v||c}),e("div",a({className:"header-container-name"},{children:s||d}))]})),e("div",a({className:"header-container-text"},{children:"ID:".concat(d)})),r("div",a({className:"header-container-text"},{children:[m("TUIContact.Signature"),":",l||""]}))]}))}))}var m=t.memo(o);export{m as BasicInfo,o as UnMemoizedBasicInfo};
@@ -1 +1 @@
1
- import{__assign as t,__awaiter as e,__generator as o}from"tslib";import{jsxs as n,Fragment as i,jsx as r}from"react/jsx-runtime";import s,{useState as c,useEffect as m}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 a}from"../../../node_modules/react-i18next/dist/es/useTranslation.js";import{useTUIKitContext as l}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as d}from"./basicInfo.js";import{Switch as f}from"../../Switch/Switch.js";import u from"./hooks/useContactInfo.js";function p(s){var p=this,h=s.profile,x=l("TUIContact"),j=x.contactData,v=x.setActiveContact,b=a().t,C=c(!1),I=C[0],T=C[1],g=u().removeFromBlocklist;m((function(){T(!0)}),[j]);return n(i,{children:[r(d,{profile:h}),r("div",t({className:"tui-contact-info-content"},{children:n("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:b("TUIContact.block")})),r(f,{className:"content-item-text",onChange:function(){return e(p,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,g(h.userID)];case 1:return t.sent(),T(!1),v(),[2]}}))}))},checked:I})]}))}))]})}var h=s.memo(p);export{h as BlockInfo,p as UnMemoizedBlockInfo};
1
+ import{__assign as t,__awaiter as o,__generator as e}from"tslib";import{jsxs as n,Fragment as r,jsx as c}from"react/jsx-runtime";import i,{useState as m,useEffect as s}from"react";import{useTranslation as a}from"react-i18next";import{useTUIKitContext as f}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as l}from"./basicInfo.js";import{Switch as u}from"../../Switch/Switch.js";import p from"./hooks/useContactInfo.js";function h(i){var h=this,d=i.profile,v=f("TUIContact"),x=v.contactData,C=v.setActiveContact,I=a().t,j=m(!1),b=j[0],k=j[1],N=p().removeFromBlocklist;s((function(){k(!0)}),[x]);return n(r,{children:[c(l,{profile:d}),c("div",t({className:"tui-contact-info-content"},{children:n("div",t({className:"content-item"},{children:[c("p",t({className:"content-item-label"},{children:I("TUIContact.block")})),c(u,{className:"content-item-text",onChange:function(){return o(h,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,N(d.userID)];case 1:return t.sent(),k(!1),C(),[2]}}))}))},checked:b})]}))}))]})}var d=i.memo(h);export{d as BlockInfo,h as UnMemoizedBlockInfo};
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsxs as e,Fragment as n,jsx as i}from"react/jsx-runtime";import o 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 a}from"../../../node_modules/react-i18next/dist/es/useTranslation.js";import c from"@tencentcloud/chat";import{useTUIKitContext as r}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{Avatar as s}from"../../Avatar/Avatar.js";import{defaultUserAvatar as m}from"../../Avatar/default.js";import d from"./hooks/useContactInfo.js";function l(o){var l=r("TUIContact").setActiveContact,p=a().t,f=o.application,h=f.userID,u=f.nick,v=f.avatar,N=f.type,x=f.wording,b=d(),I=b.acceptFriendApplication,C=b.refuseFriendApplication;return e(n,{children:[i("div",t({className:"tui-contact-info-header"},{children:e("div",t({className:"header-container"},{children:[e("div",t({className:"header-container-avatar"},{children:[i(s,{size:60,image:v||m}),i("div",t({className:"header-container-name"},{children:u||h}))]})),i("div",t({className:"header-container-text"},{children:"ID:".concat(h)}))]}))})),i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-item"},{children:[i("p",t({className:"content-item-label"},{children:p("TUIContact.verification info")})),i("p",t({className:"content-item-text"},{children:x}))]}))})),N===c.TYPES.SNS_APPLICATION_SENT_TO_ME&&i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-btn-container"},{children:[i("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){l(),C(h)}},{children:p("TUIContact.Refuse")})),i("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){l(),I(h)}},{children:p("TUIContact.Agree")}))]}))}))]})}var p=o.memo(l);export{p as FriendApplicationInfo,l as UnMemoizedFriendApplication};
1
+ import{__assign as t}from"tslib";import{jsxs as e,Fragment as n,jsx as i}from"react/jsx-runtime";import a from"react";import{useTranslation as c}from"react-i18next";import o from"@tencentcloud/chat";import{useTUIKitContext as r}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as s}from"../../Avatar/default.js";import l from"./hooks/useContactInfo.js";function d(a){var d=r("TUIContact").setActiveContact,f=c().t,h=a.application,p=h.userID,v=h.nick,u=h.avatar,N=h.type,I=h.wording,b=l(),x=b.acceptFriendApplication,C=b.refuseFriendApplication;return e(n,{children:[i("div",t({className:"tui-contact-info-header"},{children:e("div",t({className:"header-container"},{children:[e("div",t({className:"header-container-avatar"},{children:[i(m,{size:60,image:u||s}),i("div",t({className:"header-container-name"},{children:v||p}))]})),i("div",t({className:"header-container-text"},{children:"ID:".concat(p)}))]}))})),i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-item"},{children:[i("p",t({className:"content-item-label"},{children:f("TUIContact.verification info")})),i("p",t({className:"content-item-text"},{children:I}))]}))})),N===o.TYPES.SNS_APPLICATION_SENT_TO_ME&&i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-btn-container"},{children:[i("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){d(),C(p)}},{children:f("TUIContact.Refuse")})),i("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){d(),x(p)}},{children:f("TUIContact.Agree")}))]}))}))]})}var f=a.memo(d);export{f as FriendApplicationInfo,d as UnMemoizedFriendApplication};
@@ -1 +1 @@
1
- import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as o,Fragment as i,jsx as r}from"react/jsx-runtime";import c,{useState as s,useEffect as a}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 m}from"../../../node_modules/react-i18next/dist/es/useTranslation.js";import{useTUIKitContext as l}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as d}from"./basicInfo.js";import{Switch as u}from"../../Switch/Switch.js";import f from"./hooks/useContactInfo.js";import{DivWithEdit as h}from"../../DivWithEdit/DivWithEdit.js";import{useConversation as v}from"../../../hooks/useConversation.js";function p(c){var p=this,b=l("TUIContact"),C=b.chat,x=b.contactData,k=b.setActiveContact,I=b.setActiveConversation,j=m().t,N=c.friend,T=c.openChat,g=N.userID,U=N.profile,D=N.remark,w=s(""),_=w[0],y=w[1],E=s(""),S=E[0],A=E[1],F=s(!1),M=F[0],W=F[1],B=f(),K=B.addToBlocklist,q=B.deleteFriend,z=v(C).createConversation;a((function(){W(!1),A(D)}),[x,D]);return o(i,{children:[r(d,{profile:U}),o("div",t({className:"tui-contact-info-content"},{children:[o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.remark")})),r(h,{name:"remark",className:"content-item-text",value:S,type:"text",toggle:function(){y("remark")},isEdit:"remark"===_,confirm:function(t){C.updateFriend({userID:g,remark:null==t?void 0:t.value}),A(null==t?void 0:t.value),y("")},close:function(){y("")}})]})),o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.block")})),r(u,{className:"content-item-text",onChange:function(){return e(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,K(g)];case 1:return t.sent(),W(!0),k(),[2]}}))}))},checked:M})]})),o("div",t({className:"content-btn-container"},{children:[r("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){return e(p,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,q(g)];case 1:return t.sent(),k(),[2]}}))}))}},{children:j("TUIContact.Delete friend")})),r("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){return e(p,void 0,void 0,(function(){var t;return n(this,(function(e){switch(e.label){case 0:return[4,z("C2C".concat(g))];case 1:return t=e.sent(),I(t),T(),[2]}}))}))}},{children:j("TUIContact.Send Message")}))]}))]}))]})}var b=c.memo(p);export{b as FriendInfo,p as UnMemoizedFriendInfo};
1
+ import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as o,Fragment as i,jsx as r}from"react/jsx-runtime";import c,{useState as a,useEffect as s}from"react";import{useTranslation as m}from"react-i18next";import{TUIConversationService as l}from"@tencentcloud/chat-uikit-engine";import{useTUIKitContext as u}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as d}from"./basicInfo.js";import{Switch as f}from"../../Switch/Switch.js";import h from"./hooks/useContactInfo.js";import{DivWithEdit as v}from"../../DivWithEdit/DivWithEdit.js";import{useConversation as p}from"../../../hooks/useConversation.js";function C(c){var C=this,b=u("TUIContact"),k=b.chat,I=b.contactData,x=b.setActiveContact,N=b.setActiveConversation,j=m().t,T=c.friend,U=c.openChat,g=T.userID,w=T.profile,D=T.remark,E=a(""),S=E[0],A=E[1],F=a(""),M=F[0],W=F[1],y=a(!1),B=y[0],K=y[1],q=h(),z=q.addToBlocklist,G=q.deleteFriend,H=p(k).createConversation;s((function(){K(!1),W(D)}),[I,D]);return o(i,{children:[r(d,{profile:w}),o("div",t({className:"tui-contact-info-content"},{children:[o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.remark")})),r(v,{name:"remark",className:"content-item-text",value:M,type:"text",toggle:function(){A("remark")},isEdit:"remark"===S,confirm:function(t){k.updateFriend({userID:g,remark:null==t?void 0:t.value}),W(null==t?void 0:t.value),A("")},close:function(){A("")}})]})),o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.block")})),r(f,{className:"content-item-text",onChange:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,z(g)];case 1:return t.sent(),K(!0),x(),[2]}}))}))},checked:B})]})),o("div",t({className:"content-btn-container"},{children:[r("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,G(g)];case 1:return t.sent(),x(),[2]}}))}))}},{children:j("TUIContact.Delete friend")})),r("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){return e(C,void 0,void 0,(function(){var t,e;return n(this,(function(n){switch(n.label){case 0:return t="C2C".concat(g),[4,H(t)];case 1:return e=n.sent(),l.switchConversation(t),N(e),U(),[2]}}))}))}},{children:j("TUIContact.Send Message")}))]}))]}))]})}var b=c.memo(C);export{b as FriendInfo,C as UnMemoizedFriendInfo};
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsxs as i,jsx as e}from"react/jsx-runtime";import n,{useState as a}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 s from"@tencentcloud/chat";import{useTUIKitContext as o}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as r}from"../../../context/TUIContactContext.js";import l from"../TUIContactInfo/hooks/useContactInfo.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as d}from"../../Avatar/default.js";import u from"../../Icon/images/right-arrow.svg.js";import p from"../../Icon/images/down-arrow.png.js";function f(){var n=o().setActiveContact,f=c().t,v=r("TUIContactList"),h=v.isShowContactList,N=v.friendList,I=v.blocklistProfile,x=v.friendApplicationList,C=l().acceptFriendApplication,b=a(!1),g=b[0],T=b[1],k=a(!1),j=k[0],A=k[1],_=a(!1),U=_[0],P=_[1];return h&&i("div",t({className:"tui-contacts-list"},{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return T(!g)}},{children:[e("p",t({className:"tui-contacts-list-title"},{children:f("TUIContact.New Contacts")})),e("div",t({className:"tui-contacts-list-icon"},{children:e("img",{src:g?p:u,alt:""})}))]})),g&&x.map((function(a,c){var o=a.userID,r=a.avatar,l=a.nick,u=a.wording,p=a.type;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(t){t.stopPropagation(),n({type:"friendApplication",data:a})}},{children:[e(m,{size:30,image:r||d}),i("div",t({className:"tui-contacts-list-item-card"},{children:[i("div",{children:[e("p",t({className:"tui-contacts-list-item-name text-ellipsis"},{children:l||o})),""!==u&&e("p",t({className:"tui-contacts-list-item-text text-ellipsis"},{children:u}))]}),p===s.TYPES.SNS_APPLICATION_SENT_BY_ME&&e("p",t({className:"tui-contacts-list-btn-text text-ellipsis"},{children:f("TUIContact.waiting for verification")})),p===s.TYPES.SNS_APPLICATION_SENT_TO_ME&&e("div",t({className:"application-btn",role:"button",tabIndex:0,onClick:function(t){!function(t,i){t.stopPropagation(),C(i),n()}(t,o)}},{children:f("TUIContact.Agree")}))]}))]}),o)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return P(!U)}},{children:[e("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Blocked List")})),e("div",t({className:"tui-contacts-list-icon"},{children:e("img",{src:U?p:u,alt:""})}))]})),U&&I.map((function(a,c){var s=a.userID,o=a.avatar,r=a.nick;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(){n({type:"block",data:a})}},{children:[e(m,{size:30,image:o||d}),e("div",t({className:"tui-contacts-list-item-container"},{children:e("p",t({className:"tui-contacts-list-item-name"},{children:r||s}))}))]}),s)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return A(!j)}},{children:[e("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Friend")})),e("div",t({className:"tui-contacts-list-icon"},{children:e("img",{src:j?p:u,alt:""})}))]})),j&&N.map((function(a,c){var s=a.profile,o=s.userID,r=s.avatar,l=s.nick;return i("div",t({className:"tui-contacts-list-item",role:"button",tabIndex:0,onClick:function(){n({type:"friend",data:a})}},{children:[e(m,{size:30,image:r||d}),e("div",t({className:"tui-contacts-list-item-container"},{children:e("p",t({className:"tui-contacts-list-item-name"},{children:a.remark||l||o}))}))]}),o)}))]}))}var v=n.memo(f);export{v as TUIContactList};
1
+ import{__assign as t}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import c,{useState as a}from"react";import{useTranslation as e}from"react-i18next";import o from"@tencentcloud/chat";import{useTUIKitContext as s}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as r}from"../../../context/TUIContactContext.js";import l from"../TUIContactInfo/hooks/useContactInfo.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as d}from"../../Avatar/default.js";import u from"../../Icon/images/right-arrow.svg.js";import p from"../../Icon/images/down-arrow.png.js";function f(){var c=s().setActiveContact,f=e().t,v=r("TUIContactList"),N=v.isShowContactList,I=v.friendList,h=v.blocklistProfile,C=v.friendApplicationList,x=l().acceptFriendApplication,b=a(!1),g=b[0],T=b[1],k=a(!1),A=k[0],U=k[1],j=a(!1),P=j[0],S=j[1];return N&&i("div",t({className:"tui-contacts-list"},{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return T(!g)}},{children:[n("p",t({className:"tui-contacts-list-title"},{children:f("TUIContact.New Contacts")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:g?p:u,alt:""})}))]})),g&&C.map((function(a,e){var s=a.userID,r=a.avatar,l=a.nick,u=a.wording,p=a.type;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(t){t.stopPropagation(),c({type:"friendApplication",data:a})}},{children:[n(m,{size:30,image:r||d}),i("div",t({className:"tui-contacts-list-item-card"},{children:[i("div",{children:[n("p",t({className:"tui-contacts-list-item-name text-ellipsis"},{children:l||s})),""!==u&&n("p",t({className:"tui-contacts-list-item-text text-ellipsis"},{children:u}))]}),p===o.TYPES.SNS_APPLICATION_SENT_BY_ME&&n("p",t({className:"tui-contacts-list-btn-text text-ellipsis"},{children:f("TUIContact.waiting for verification")})),p===o.TYPES.SNS_APPLICATION_SENT_TO_ME&&n("div",t({className:"application-btn",role:"button",tabIndex:0,onClick:function(t){!function(t,i){t.stopPropagation(),x(i),c()}(t,s)}},{children:f("TUIContact.Agree")}))]}))]}),s)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return S(!P)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Blocked List")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:P?p:u,alt:""})}))]})),P&&h.map((function(a,e){var o=a.userID,s=a.avatar,r=a.nick;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(){c({type:"block",data:a})}},{children:[n(m,{size:30,image:s||d}),n("div",t({className:"tui-contacts-list-item-container"},{children:n("p",t({className:"tui-contacts-list-item-name"},{children:r||o}))}))]}),o)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return U(!A)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Friends")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:A?p:u,alt:""})}))]})),A&&I.map((function(a,e){var o=a.profile,s=o.userID,r=o.avatar,l=o.nick;return i("div",t({className:"tui-contacts-list-item",role:"button",tabIndex:0,onClick:function(){c({type:"friend",data:a})}},{children:[n(m,{size:30,image:r||d}),n("div",t({className:"tui-contacts-list-item-container"},{children:n("p",t({className:"tui-contacts-list-item-name"},{children:a.remark||l||s}))}))]}),s)}))]}))}var v=c.memo(f);export{v as TUIContactList};