@tencentcloud/chat-uikit-react 1.2.2 → 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 (241) hide show
  1. package/.eslintrc.js +2 -1
  2. package/CHANGELOG.md +8 -2
  3. package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  4. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  5. package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  6. package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +2 -0
  7. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  8. package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  9. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  10. package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
  11. package/dist/cjs/components/Icon/config.js +1 -1
  12. package/dist/cjs/components/Icon/images/chats-selected.svg.js +1 -0
  13. package/dist/cjs/components/Icon/images/chats.svg.js +1 -0
  14. package/dist/cjs/components/Icon/images/contacts-selected.svg.js +1 -0
  15. package/dist/cjs/components/Icon/images/contacts.svg.js +1 -0
  16. package/dist/cjs/components/Icon/images/files.png.js +1 -0
  17. package/dist/cjs/components/Icon/images/image.png.js +1 -1
  18. package/dist/cjs/components/Icon/images/video.png.js +1 -1
  19. package/dist/cjs/components/TUIChat/TUIChat.d.ts +5 -0
  20. package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
  21. package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
  22. package/dist/cjs/components/TUIChat/hooks/useHandleMessage.js +1 -1
  23. package/dist/cjs/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  24. package/dist/cjs/components/TUIChat/unitls.js +1 -1
  25. package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  26. package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  27. package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  28. package/dist/cjs/components/TUIConversation/TUIConversation.js +1 -1
  29. package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +1 -0
  30. package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
  31. package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
  32. package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
  33. package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
  34. package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
  35. package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
  36. package/dist/cjs/components/TUIMessage/MessageImage.js +1 -1
  37. package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
  38. package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
  39. package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
  40. package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
  41. package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
  42. package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
  43. package/dist/cjs/components/TUIMessage/MessageVideo.js +1 -1
  44. package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
  45. package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  46. package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
  47. package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
  48. package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
  49. package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  50. package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  51. package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  52. package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  53. package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  54. package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
  55. package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
  56. package/dist/cjs/components/untils.js +1 -1
  57. package/dist/cjs/constants.js +1 -1
  58. package/dist/cjs/context/ComponentContext.d.ts +2 -0
  59. package/dist/cjs/context/TUIChatActionContext.d.ts +3 -14
  60. package/dist/cjs/context/TUIChatStateContext.d.ts +2 -0
  61. package/dist/cjs/context/TUIConversationContext.js +1 -1
  62. package/dist/cjs/index.css +1 -1
  63. package/dist/cjs/index.d.css +240 -12
  64. package/dist/cjs/index.js +1 -1
  65. package/dist/cjs/locales/en/TUIChat.js +1 -1
  66. package/dist/cjs/locales/en/TUIContact.js +1 -1
  67. package/dist/cjs/locales/en/TUIProfile.js +1 -1
  68. package/dist/cjs/locales/index.js +1 -1
  69. package/dist/cjs/locales/zh_cn/TUIChat.js +1 -1
  70. package/dist/cjs/locales/zh_cn/TUIContact.js +1 -1
  71. package/dist/cjs/locales/zh_cn/TUIProfile.js +1 -1
  72. package/dist/cjs/server.js +1 -0
  73. package/dist/cjs/utils/env.js +1 -0
  74. package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
  75. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  76. package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
  77. package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +2 -0
  78. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  79. package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
  80. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  81. package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
  82. package/dist/esm/components/Icon/config.js +1 -1
  83. package/dist/esm/components/Icon/images/chats-selected.svg.js +1 -0
  84. package/dist/esm/components/Icon/images/chats.svg.js +1 -0
  85. package/dist/esm/components/Icon/images/contacts-selected.svg.js +1 -0
  86. package/dist/esm/components/Icon/images/contacts.svg.js +1 -0
  87. package/dist/esm/components/Icon/images/files.png.js +1 -0
  88. package/dist/esm/components/Icon/images/image.png.js +1 -1
  89. package/dist/esm/components/Icon/images/video.png.js +1 -1
  90. package/dist/esm/components/TUIChat/TUIChat.d.ts +5 -0
  91. package/dist/esm/components/TUIChat/TUIChat.js +1 -1
  92. package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
  93. package/dist/esm/components/TUIChat/hooks/useHandleMessage.js +1 -1
  94. package/dist/esm/components/TUIChat/hooks/useHandleMessageList.js +1 -1
  95. package/dist/esm/components/TUIChat/unitls.js +1 -1
  96. package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
  97. package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
  98. package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
  99. package/dist/esm/components/TUIConversation/TUIConversation.js +1 -1
  100. package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +1 -0
  101. package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
  102. package/dist/esm/components/TUIKit/TUIKit.js +1 -1
  103. package/dist/esm/components/TUIManage/TUIManage.js +1 -1
  104. package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
  105. package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
  106. package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
  107. package/dist/esm/components/TUIMessage/MessageImage.js +1 -1
  108. package/dist/esm/components/TUIMessage/MessageName.js +1 -1
  109. package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
  110. package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
  111. package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
  112. package/dist/esm/components/TUIMessage/MessageText.js +1 -1
  113. package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
  114. package/dist/esm/components/TUIMessage/MessageVideo.js +1 -1
  115. package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
  116. package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
  117. package/dist/esm/components/TUIMessage/utils/index.js +1 -1
  118. package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
  119. package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
  120. package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
  121. package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
  122. package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
  123. package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
  124. package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
  125. package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
  126. package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
  127. package/dist/esm/components/untils.js +1 -1
  128. package/dist/esm/constants.js +1 -1
  129. package/dist/esm/context/ComponentContext.d.ts +2 -0
  130. package/dist/esm/context/TUIChatActionContext.d.ts +3 -14
  131. package/dist/esm/context/TUIChatStateContext.d.ts +2 -0
  132. package/dist/esm/context/TUIConversationContext.js +1 -1
  133. package/dist/esm/index.css +1 -1
  134. package/dist/esm/index.d.css +240 -12
  135. package/dist/esm/index.js +1 -1
  136. package/dist/esm/locales/en/TUIChat.js +1 -1
  137. package/dist/esm/locales/en/TUIContact.js +1 -1
  138. package/dist/esm/locales/en/TUIProfile.js +1 -1
  139. package/dist/esm/locales/index.js +1 -1
  140. package/dist/esm/locales/zh_cn/TUIChat.js +1 -1
  141. package/dist/esm/locales/zh_cn/TUIContact.js +1 -1
  142. package/dist/esm/locales/zh_cn/TUIProfile.js +1 -1
  143. package/dist/esm/server.js +1 -0
  144. package/dist/esm/utils/env.js +1 -0
  145. package/package.json +7 -6
  146. package/rollup.config.js +0 -1
  147. package/scripts/publish-github.js +60 -0
  148. package/scripts/publish-intl-demo.js +14 -0
  149. package/scripts/publish-npm.js +22 -0
  150. package/src/components/Avatar/styles/index.scss +1 -0
  151. package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +6 -3
  152. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +5 -1
  153. package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +7 -2
  154. package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -0
  155. package/src/components/ConversationCreate/styles/index.scss +2 -0
  156. package/src/components/ConversationPreview/ConversationPreview.tsx +2 -0
  157. package/src/components/ConversationPreview/ConversationPreviewContent.tsx +57 -9
  158. package/src/components/ConversationPreview/styles/index.scss +4 -2
  159. package/src/components/ConversationPreview/utils.tsx +5 -1
  160. package/src/components/DivWithEdit/styles/index.scss +2 -1
  161. package/src/components/Icon/config.ts +1 -1
  162. package/src/components/Icon/images/chats-selected.svg +6 -0
  163. package/src/components/Icon/images/chats.svg +9 -0
  164. package/src/components/Icon/images/contacts-selected.svg +3 -0
  165. package/src/components/Icon/images/contacts.svg +6 -0
  166. package/src/components/Icon/images/files.png +0 -0
  167. package/src/components/Icon/images/image.png +0 -0
  168. package/src/components/Icon/images/language.svg +3 -0
  169. package/src/components/Icon/images/video.png +0 -0
  170. package/src/components/Model/styles/layout.scss +1 -1
  171. package/src/components/Profile/styles/index.scss +4 -0
  172. package/src/components/TUIChat/TUIChat.tsx +74 -120
  173. package/src/components/TUIChat/TUIChatState.tsx +18 -45
  174. package/src/components/TUIChat/hooks/useHandleMessage.tsx +8 -0
  175. package/src/components/TUIChat/hooks/useHandleMessageList.tsx +2 -41
  176. package/src/components/TUIChat/unitls.ts +0 -29
  177. package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +7 -1
  178. package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -1
  179. package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +1 -1
  180. package/src/components/TUIConversation/TUIConversation.tsx +1 -4
  181. package/src/components/TUIConversationList/TUIConversationList.tsx +91 -65
  182. package/src/components/TUIConversationList/index.scss +5 -0
  183. package/src/components/TUIKit/TUIKit.tsx +133 -9
  184. package/src/components/TUIKit/styles/h5.scss +34 -0
  185. package/src/components/TUIKit/styles/index.scss +103 -0
  186. package/src/components/TUIKit/styles/reset.scss +20 -0
  187. package/src/components/TUIManage/TUIManage.tsx +59 -35
  188. package/src/components/TUIManage/styles/index.scss +15 -1
  189. package/src/components/TUIMessage/MessageBubble.tsx +20 -3
  190. package/src/components/TUIMessage/MessageCustom.tsx +11 -2
  191. package/src/components/TUIMessage/MessageImage.tsx +2 -1
  192. package/src/components/TUIMessage/MessageName.tsx +1 -1
  193. package/src/components/TUIMessage/MessagePlugins.tsx +4 -2
  194. package/src/components/TUIMessage/MessageRevoke.tsx +2 -2
  195. package/src/components/TUIMessage/MessageText.tsx +25 -3
  196. package/src/components/TUIMessage/MessageVideo.tsx +8 -5
  197. package/src/components/TUIMessage/hooks/useMessageHandler.ts +13 -33
  198. package/src/components/TUIMessage/styles/color.scss +1 -0
  199. package/src/components/TUIMessage/styles/layout.scss +33 -6
  200. package/src/components/TUIMessage/utils/index.ts +1 -1
  201. package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +2 -2
  202. package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +2 -6
  203. package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +4 -3
  204. package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +10 -3
  205. package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +10 -14
  206. package/src/components/TUIMessageInput/styles/color.scss +1 -1
  207. package/src/components/TUIMessageInput/styles/layout.scss +7 -2
  208. package/src/components/TUIMessageList/TUIMessageList.tsx +9 -13
  209. package/src/components/TUIMessageList/index.ts +0 -1
  210. package/src/components/TUIProfile/TUIProfileDefault.tsx +65 -51
  211. package/src/components/TUIProfile/styles/layout.scss +6 -0
  212. package/src/components/untils.ts +9 -0
  213. package/src/constants.ts +4 -1
  214. package/src/context/ComponentContext.tsx +2 -0
  215. package/src/context/TUIChatActionContext.tsx +3 -23
  216. package/src/context/TUIChatStateContext.tsx +2 -0
  217. package/src/context/TUIKitContext.tsx +0 -1
  218. package/src/index.ts +3 -0
  219. package/src/locales/en/TUIChat.ts +2 -1
  220. package/src/locales/en/TUIContact.ts +1 -1
  221. package/src/locales/en/TUIProfile.ts +5 -4
  222. package/src/locales/index.ts +1 -1
  223. package/src/locales/zh_cn/TUIChat.ts +1 -0
  224. package/src/locales/zh_cn/TUIContact.ts +1 -1
  225. package/src/locales/zh_cn/TUIProfile.ts +1 -0
  226. package/src/server.ts +44 -0
  227. package/src/utils/env.ts +5 -0
  228. package/tsconfig.json +1 -0
  229. package/dist/cjs/components/Icon/images/document.png.js +0 -1
  230. package/dist/cjs/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
  231. package/dist/cjs/components/TUIChat/hooks/useCreateMessage.js +0 -1
  232. package/dist/cjs/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
  233. package/dist/cjs/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
  234. package/dist/esm/components/Icon/images/document.png.js +0 -1
  235. package/dist/esm/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
  236. package/dist/esm/components/TUIChat/hooks/useCreateMessage.js +0 -1
  237. package/dist/esm/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
  238. package/dist/esm/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
  239. package/src/components/TUIChat/hooks/useCreateMessage.tsx +0 -198
  240. package/src/components/TUIChat/hooks/useMessageReceviedListener.tsx +0 -26
  241. package/src/components/TUIMessageList/hooks/useEnrichedMessageList.tsx +0 -16
@@ -1 +1 @@
1
- "use strict";module.exports={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message"};
1
+ "use strict";module.exports={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You ","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message","Custom message":"Custom message"};
@@ -1 +1 @@
1
- "use strict";module.exports={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",Friend:"Friend","Send Message":"Send Message",Signature:"Signature","New Contacts":"New Contacts","Blocked List":"Blocked List","No Result":"No Result",ID:"ID",User:"User","Add Friend":"Add Friend",remark:"remark",block:"block","Delete friend":"Delete friend","waiting for verification":"waiting for verification","verification info":"verification info","Send application":"Send application",Agree:"Agree"};
1
+ "use strict";module.exports={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",Friends:"Friends","Send Message":"Send Message",Signature:"Signature","New Contacts":"New Contacts","Blocked List":"Blocked List","No Result":"No Result",ID:"ID",User:"User","Add Friend":"Add Friend",remark:"remark",block:"block","Delete friend":"Delete friend","waiting for verification":"waiting for verification","verification info":"verification info","Send application":"Send application",Agree:"Agree"};
@@ -1 +1 @@
1
- "use strict";module.exports={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"AllowType",NeedConfirm:"NeedConfirm",AllowAny:"AllowAny",DenyAny:"DenyAny",Birthday:"Birthday"};
1
+ "use strict";module.exports={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"Friend Request",NeedConfirm:"Anyone upon Request",AllowAny:"Allow any user to add you as friend",DenyAny:"Decline friend request from any user",Birthday:"Birthday",Unknow:"Not set"};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en/index.js"),n=require("./zh_cn/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),u={en:{translation:r.message},zh:{translation:n.message}};a.default.use(t.initReactI18next).init({resources:u,lng:"zh",interpolation:{escapeValue:!1}});var s=a.default.t;Object.defineProperty(exports,"i18next",{enumerable:!0,get:function(){return a.default}}),exports.t=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en/index.js"),n=require("./zh_cn/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),u={en:{translation:r.message},zh:{translation:n.message}};a.default.use(t.initReactI18next).init({resources:u,lng:"en",interpolation:{escapeValue:!1}});var s=a.default.t;Object.defineProperty(exports,"i18next",{enumerable:!0,get:function(){return a.default}}),exports.t=s;
@@ -1 +1 @@
1
- "use strict";module.exports={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败"};
1
+ "use strict";module.exports={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败","Custom message":"自定义消息"};
@@ -1 +1 @@
1
- "use strict";module.exports={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",Friend:"我的好友","Send Message":"发送消息",Signature:"个性签名","Successful application, waiting for the administrator to agree to join the group application":"等待管理员同意","New Contacts":"新的联系人","Blocked List":"黑名单","No Result":"无搜索结果",ID:"ID",User:"联系人","Add Friend":"添加好友",remark:"备注",block:"加入黑名单","Delete friend":"删除好友","waiting for verification":"等待验证","verification info":"验证信息","Send application":"发送申请",Agree:"同意"};
1
+ "use strict";module.exports={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",Friends:"我的好友","Send Message":"发送消息",Signature:"个性签名","Successful application, waiting for the administrator to agree to join the group application":"等待管理员同意","New Contacts":"新的联系人","Blocked List":"黑名单","No Result":"无搜索结果",ID:"ID",User:"联系人","Add Friend":"添加好友",remark:"备注",block:"加入黑名单","Delete friend":"删除好友","waiting for verification":"等待验证","verification info":"验证信息","Send application":"发送申请",Agree:"同意"};
@@ -1 +1 @@
1
- "use strict";module.exports={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日"};
1
+ "use strict";module.exports={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日",Unknown:"未设置"};
@@ -0,0 +1 @@
1
+ "use strict";var t=require("@tencentcloud/tui-core"),n=require("@tencentcloud/chat-uikit-engine");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(t),i=e(n),u=function(){function n(){o.default.registerEvent(t.TUIConstants.TUILogin.EVENT.LOGIN_STATE_CHANGED,t.TUIConstants.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS,this)}return n.prototype.onNotifyEvent=function(n,e){if(n===t.TUIConstants.TUILogin.EVENT.LOGIN_STATE_CHANGED&&e===t.TUIConstants.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS)this.login()},n.prototype.login=function(){var n=t.TUILogin.getContext(),e=n.chat,o=n.SDKAppID,u=n.userID,r=n.userSig;i.default.login({chat:e,SDKAppID:o,userID:u,userSig:r})},n}();module.exports=u;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tencentcloud/universal-api"),t="pc"===e.getPlatform(),r="h5"===e.getPlatform();exports.isH5=r,exports.isPC=t;
@@ -1 +1 @@
1
- import{__spreadArray as e,__assign as t,__awaiter as r,__generator as a}from"tslib";import{jsxs as o,Fragment as n,jsx as i}from"react/jsx-runtime";import{useState as c}from"react";import{useTranslation as s}from"react-i18next";import{Input as u}from"../Input/Input.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultUserAvatar as d,defaultGroupAvatarAVChatRoom as v,defaultGroupAvatarMeeting as f,defaultGroupAvatarPublic as g,defaultGroupAvatarWork as h}from"../Avatar/default.js";import{PageStateTypes as C}from"./ConversationCreate.js";import{ConversationGroupTypeInfo as I,typeInfoList as x,GroupType as N}from"./ConversationGroupTypeInfo.js";import{useTUIKitContext as b}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function T(T){var y=this,U=T.profileList,j=T.pageState,k=T.setPageState,P=T.createConversation,G=T.setConversationCreated,A=s().t,D=b(),R=D.setActiveConversation,w=D.myProfile,S=e([],U,!0);S.unshift(w);var L=S.map((function(e){return e.nick||e.userID})).toString(),O=c(L.length>=15?"".concat(L.slice(0,12),"..."):L),W=O[0],_=O[1],E=c(""),M=E[0],Y=E[1],q=c("Work"),z=q[0],H=q[1],K=function(e,t){var r=e.target.value;switch(t){case"name":_(r);break;case"id":Y(r);break;case"type":H(r)}};return j!==C.GROUP_TYPE?o(n,{children:[o("div",t({className:"tui-conversation-create-group-detail"},{children:[i("div",t({className:"create-group-box create-group-name"},{children:i(u,{maxLength:15,value:W,onChange:function(e){K(e,"name")},border:"bottom",customClassName:"input-group-name",clearable:!0,prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Name")}))})})),i("div",t({className:"create-group-box create-group-id"},{children:i(u,{border:"bottom",customClassName:"input-group-text",clearable:!0,value:M,onChange:function(e){K(e,"id")},prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group ID")}))})})),i("div",t({className:"create-group-box create-group-type"},{children:i(u,{disabled:!0,border:"bottom",customClassName:"input-group-text",prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Type")})),suffix:i(p,{onClick:function(){k(C.GROUP_TYPE)},type:m.ARROW_RIGHT,width:7,height:12}),value:A("TUIConversation.".concat(z)),onChange:function(e){K(e,"type")}})})),i("div",t({className:"create-group-illustrate"},{children:A("TUIConversation.".concat(x.find((function(e){return e.type===z})).des))})),o("div",t({className:"create-group-portrait"},{children:[i("div",t({className:"create-group-portrait-title"},{children:A("TUIConversation.Participants")})),i("div",t({className:"create-group-portrait-info-container"},{children:U.map((function(e){var r=e.avatar,a=e.userID,n=e.nick;return o("div",t({className:"create-group-portrait-info"},{children:[i(l,{shape:"square",size:50,image:r||d}),i("div",t({className:"create-group-portrait-info-nick"},{children:n}))]}),a)}))}))]}))]})),i("div",t({className:"tui-conversation-create-next-container"},{children:i("div",t({role:"presentation",className:"tui-conversation-create-next",onClick:function(){return r(y,void 0,void 0,(function(){var e,t,r;return a(this,(function(a){switch(a.label){case 0:return e=U.map((function(e){return{userID:e.userID}})),t=function(e){switch(e){case"Work":return h;case"Public":return g;case"Meeting":return f;case"AVChatRoom":return v;default:return""}}(z),[4,P({name:W,type:N[z],groupID:M,avatar:t,memberList:e})];case 1:return r=a.sent(),R(r),G(!1),[2]}}))}))}},{children:A("TUIConversation.Create")}))}))]}):i(I,{groupType:z,setGroupType:H,setPageState:k})}export{T as ConversationCreatGroupDetail};
1
+ import{__spreadArray as e,__assign as t,__awaiter as r,__generator as o}from"tslib";import{jsxs as a,Fragment as n,jsx as i}from"react/jsx-runtime";import{useState as c}from"react";import{useTranslation as s}from"react-i18next";import{TUIConversationService as u}from"@tencentcloud/chat-uikit-engine";import{Input as p}from"../Input/Input.js";import{Icon as l}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{Avatar as v}from"../Avatar/Avatar.js";import{defaultUserAvatar as d,defaultGroupAvatarAVChatRoom as f,defaultGroupAvatarMeeting as g,defaultGroupAvatarPublic as h,defaultGroupAvatarWork as C}from"../Avatar/default.js";import{PageStateTypes as I}from"./ConversationCreate.js";import{ConversationGroupTypeInfo as x,typeInfoList as N,GroupType as b}from"./ConversationGroupTypeInfo.js";import{useTUIKitContext as T}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function y(y){var k=this,U=y.profileList,j=y.pageState,P=y.setPageState,G=y.createConversation,D=y.setConversationCreated,A=s().t,R=T(),w=R.setActiveConversation,O=R.myProfile,S=e([],U,!0);S.unshift(O);var L=S.map((function(e){return e.nick||e.userID})).toString(),W=c(L.length>=15?"".concat(L.slice(0,12),"..."):L),_=W[0],E=W[1],M=c(""),Y=M[0],q=M[1],z=c("Work"),H=z[0],K=z[1],V=function(e,t){var r=e.target.value;switch(t){case"name":E(r);break;case"id":q(r);break;case"type":K(r)}},B=function(){P(I.GROUP_TYPE)};return j!==I.GROUP_TYPE?a(n,{children:[a("div",t({className:"tui-conversation-create-group-detail"},{children:[i("div",t({className:"create-group-box create-group-name"},{children:i(p,{maxLength:15,value:_,onChange:function(e){V(e,"name")},border:"bottom",customClassName:"input-group-name",clearable:!0,prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Name")}))})})),i("div",t({className:"create-group-box create-group-id"},{children:i(p,{border:"bottom",customClassName:"input-group-text",clearable:!0,value:Y,onChange:function(e){V(e,"id")},prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group ID")}))})})),i("div",t({className:"create-group-box create-group-type",onClick:B},{children:i(p,{readOnly:!0,border:"bottom",customClassName:"input-group-text",prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Type")})),suffix:i(l,{onClick:B,type:m.ARROW_RIGHT,width:7,height:12}),value:A("TUIConversation.".concat(H)),onChange:function(e){V(e,"type")}})})),i("div",t({className:"create-group-illustrate"},{children:A("TUIConversation.".concat(N.find((function(e){return e.type===H})).des))})),a("div",t({className:"create-group-portrait"},{children:[i("div",t({className:"create-group-portrait-title"},{children:A("TUIConversation.Participants")})),i("div",t({className:"create-group-portrait-info-container"},{children:U.map((function(e){var r=e.avatar,o=e.userID,n=e.nick;return a("div",t({className:"create-group-portrait-info"},{children:[i(v,{shape:"square",size:50,image:r||d}),i("div",t({className:"create-group-portrait-info-nick"},{children:n}))]}),o)}))}))]}))]})),i("div",t({className:"tui-conversation-create-next-container"},{children:i("div",t({role:"presentation",className:"tui-conversation-create-next",onClick:function(){return r(k,void 0,void 0,(function(){var e,t,r;return o(this,(function(o){switch(o.label){case 0:return e=U.map((function(e){return{userID:e.userID}})),t=function(e){switch(e){case"Work":return C;case"Public":return h;case"Meeting":return g;case"AVChatRoom":return f;default:return""}}(H),[4,G({name:_,type:b[H],groupID:Y,avatar:t,memberList:e})];case 1:return r=o.sent(),w(r),u.switchConversation(null==r?void 0:r.conversationID),D(!1),[2]}}))}))}},{children:A("TUIConversation.Create")}))}))]}):i(x,{groupType:H,setGroupType:K,setPageState:P})}export{y as ConversationCreatGroupDetail};
@@ -1 +1 @@
1
- import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as c}from"react/jsx-runtime";import{useState as a,useRef as s}from"react";import{useTranslation as u}from"react-i18next";import{Input as l}from"../Input/Input.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as p}from"../Icon/type.js";import{ConversationCreateSelectView as v}from"./ConversationCreateSelectView.js";import{Avatar as h}from"../Avatar/Avatar.js";import{defaultUserAvatar as d}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 I}from"../../hooks/useConversation.js";import{Toast as g}from"../Toast/index.js";function N(N){var j=this,k=N.isCreateGroup,b=N.selectList,T=N.setSelectList,y=N.className,A=N.conversationList,L=N.setIsCreateGroup,S=N.setConversationCreated,D=N.setPageState,w=u().t,U=a(""),E=U[0],R=U[1],F=C(),G=F.chat,M=F.setActiveConversation,P=a({}),z=P[0],H=P[1],K=f(G,A,(function(e){H(e)})).getFriendListSortSearchResult,O=I(G).createConversation,V=s(new Map);return i(o,{children:[c(l,{className:"tui-conversation-create-search-input",placeholder:w("TUIConversation.Search"),clearable:!0,value:E,onChange:function(e){return t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return t=e.target.value,R(t),n=H,[4,K(t)];case 1:return n.apply(void 0,[r.sent()]),[2]}}))}))},prefix:c(m,{type:p.SEARCH,height:16,width:16})}),k&&c(v,{selectList:b,setSelectList:T}),!k&&i("div",e({role:"presentation",className:"tui-user",onClick:function(){L(!0),V.current.clear(),T([])}},{children:[c(m,{type:p.ADD}),c("div",e({className:"tui-user-name active"},{children:w("TUIConversation.New group chat")}))]})),c("div",e({className:"tui-conversation-create ".concat(y)},{children:c("div",e({className:"tui-conversation-create-container"},{children:c("div",e({className:"tui-group-container"},{children:Object.keys(z).map((function(o){return 0!==z[o].length&&i("div",e({className:"tui-group-box"},{children:[c("div",e({className:"title"},{children:o})),z[o].map((function(a,s){var u=a.userID,l=a.nick,m=a.avatar;return i("label",e({role:"presentation",className:"tui-user tui-user-checkbox-label",htmlFor:"userChecked-".concat(o,"-").concat(u),onClick:function(e){!function(e){t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return k?[2]:(t=e.userID,[4,O("C2C".concat(t))]);case 1:return n=r.sent(),S(!1),M(n),[2]}}))}))}(a)}},{children:[c(h,{size:30,image:m||d}),c("div",e({className:"tui-user-name"},{children:l||"".concat(u)})),k&&c("input",{onChange:function(e){!function(e,t,r){void 0===r&&(r=[]);var i=t.userID,o=e.target.checked;r.forEach((function(e){e.checked=o})),o?b.push({profile:t,domList:r}):b.splice(b.findIndex((function(e){return e.profile.userID===i})),1),T(n([],b,!0))}(e,a,V.current.get(u))},type:"checkbox",ref:function(e){!function(e,t){if(t){V.current.has(e)||V.current.set(e,[]);var r=V.current.get(e);0!==r.length&&r.some((function(e){return e.id===t.id}))||r.push(t)}}(u,e)},id:"userChecked-".concat(o,"-").concat(u),className:"tui-user-checkbox"})]}),u)}))]}),o)}))}))}))})),k&&c("div",e({className:"tui-conversation-create-next-container"},{children:c("div",e({role:"presentation",className:"tui-conversation-create-next",onClick:function(){b&&0===b.length?g({text:w("TUIConversation.Participant cannot be empty"),type:"error"}):D(x.CREATE_DETAIL)}},{children:w("TUIConversation.Next")}))}))]})}export{N as ConversationCreateUserSelectList};
1
+ import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as 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{__awaiter as t,__generator as e}from"tslib";import{useState as r,useEffect as o}from"react";import n from"@tencentcloud/chat";import{strChineseFirstPy as i}from"../static/word.js";import"react/jsx-runtime";import"react-i18next";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 s}from"../../../hooks/useProfile.js";var c=function(c,a,u){var f=r({}),p=f[0],l=f[1],m=function(t){var e=t.trim(),r=e.charCodeAt(0);return r>40869||r<19968?e.charAt(0):i.charAt(r-19968)},d=function(){return t(void 0,void 0,void 0,(function(){var t,r,o,i;return e(this,(function(e){switch(e.label){case 0:return a.filter((function(t){return t.type===n.TYPES.CONV_C2C})).slice(0,5).map((function(t){return t.userProfile})),[4,c.getFriendList()];case 1:return t=e.sent(),r=t.code,o=t.data,0===r&&(i=h(o.map((function(t){return t.profile}))),l(i),u&&u(i,l)),[2]}}))}))},h=function(t,e){for(var r={"#":[]},o=65;o<=90;o+=1)r[String.fromCharCode(o)]=[];return t.forEach((function(t){var e=t.nick,o=t.userID,n=m(e||o);n>="a"&&n<="z"?r[n.toLocaleUpperCase()].push(t):n<"A"||n>"z"?r["#"].push(t):r[n].push(t)})),Object.keys(r).forEach((function(t){r[t].sort((function(t,e){var r=t.nick,o=t.userID,n=e.nick,i=e.userID;return r||o<n||i||r||o===n||i?1:-1}))})),r},v=s(c).getUserProfile;return o((function(){d()}),[c]),{getFirstLetter:m,queryFriendList:d,getFriendListSortSearchResult:function(r){return t(void 0,void 0,void 0,(function(){var t,o,n,i;return e(this,(function(e){switch(e.label){case 0:return r?[4,v([r])]:[2,p];case 1:return t=e.sent().data,o={},n=!1,Object.keys(p).forEach((function(t){o[t]=p[t].filter((function(t){var e=t.nick,o=t.userID,i=e.toLocaleLowerCase(),s=r.toLocaleLowerCase(),c=i?i.includes(s):o.includes(s);return n=n||c,c}))})),"TencentCloudDemo"===(null===(i=process.env)||void 0===i?void 0:i.REACT_APP_ONLINE)?[2,o]:[2,n?o:h(t)]}}))}))},friendListSortResult:p}};export{c as useConversationCreate};
1
+ import{__awaiter as e,__generator as t}from"tslib";import{useState as r,useEffect as o}from"react";import 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{useTranslation as a}from"react-i18next";import{Avatar as s}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 v}from"../../hooks/useConversation.js";import{useTUIKitContext as d}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function p(t){var p=t.conversation,u=t.Avatar,h=void 0===u?s:u,f=t.displayImage,C=t.displayTitle,N=t.displayMessage,I=t.displayTime,g=t.unread,x=t.active,P=t.setActiveConversation,j=a().t,w=i(null),y=x?"conversation-preview-content--active":"",b=g&&g>=1?"conversation-preview-content--unread":"",T=p.isPinned?"conversation-preview-content--pin":"",M=r(!1),U=M[0],k=M[1],A=d("ConversationPreviewContent"),D=A.chat,E=A.conversation,F=v(D),z=F.pinConversation,K=F.deleteConversation,L=function(e){var n=p.conversationID,o=p.isPinned;switch(e){case"pin":z({conversationID:n,isPinned:!o});break;case"delete":K(n),p===E&&P(null)}};return n("button",e({type:"button","aria-selected":x,role:"option",className:"conversation-preview-container ".concat(y," ").concat(b," ").concat(T),onClick:function(){P&&P(p),(null==w?void 0:w.current)&&w.current.blur()},onMouseEnter:function(){k(!0)},onMouseLeave:function(){k(!1)},ref:w},{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(),L("pin")}},{children:j(p.isPinned?"TUIConversation.Unpin":"TUIConversation.Pin")})),o("div",e({className:"more-handle-item",style:{color:"#FF584C"},onClick:function(e){e.stopPropagation(),L("delete")},role:"presentation"},{children:j("TUIConversation.Delete")}))],showNumber:0,MoreIcon:o(c,{className:"icon-more",width:16,height:16,type:l.MORE})})}):e({className:"time"},{children:I}))]}))]}))}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 +1 @@
1
- import{__assign as e}from"tslib";import{jsx as o,jsxs as t}from"react/jsx-runtime";import{ConversationPreview as s}from"../ConversationPreview/ConversationPreview.js";import"react";import"react-i18next";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,c=n.searchValue,m=n.Preview;return o("div",{children:0===(null==a?void 0:a.length)?t("div",e({className:"conversation-search-result no-result"},{children:[o(r,{className:"no-result-icon",type:i.CRY,width:42,height:42}),o("span",e({className:"no-result-message"},{children:'No results for "'.concat(c,'"')}))]})):a.map((function(t){return o(s,e({searchValue:c},{conversation:t,Preview:m}),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 +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,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 m}from"../../context/TUIKitContext.js";import{TUIChatStateContextProvider as d}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 T}from"../TUIMessage/TUIMessage.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import{CONSTANT_DISPATCH_TYPE as h}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 U}from"./hooks/useHandleMessage.js";import{TUIChatHeader as x}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"react-i18next";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=m("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,m=a.chat,_=a.conversation,A=a.className,R=a.children,D=a.TUIMessage,P=a.TUIChatHeader,H=a.TUIMessageInput,k=a.InputPlugins,w=a.MessagePlugins,b=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:m,conversation:_,messageListRef:B,textareaRef:J,messageConfig:q,cloudCustomData:Q,TUIMessageInputConfig:V,TUIMessageListConfig:X},Y)),Z=S({chat:m,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:m,conversation:_,state:Y,dispatch:z}),Me=ue.getMessageList,me=ue.updateMessage,de=ue.editLocalMessage,pe=ue.removeMessage,le=ue.updateUploadPendingMessageList,Ie=U({state:Y,dispatch:z}),Te=Ie.operateMessage,he=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:me([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,m.sendMessage(e,a)];case 4:s.sent(),s.label=5;case 5:return de(e),[3,7];case 6:throw t=s.sent(),y({text:t,type:"error"}),de(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:h.SET_NO_MORE,value:!0}),[2]):[4,Me({nextReqMessageID:Y.nextReqMessageID})];case 1:return(e=t.sent())?(z({type:h.SET_HISTORY_MESSAGELIST,value:e.data.messageList}),z({type:h.SET_IS_COMPLETE,value:e.data.isCompleted}),z({type:h.SET_NEXT_REQ_MESSAGE_ID,value:e.data.nextReqMessageID}),[2]):[2]}}))}))};f(me,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:h.SET_MESSAGELIST,value:e.data.messageList}),z({type:h.SET_MESSAGELIST,value:e.data.messageList}),z({type:h.SET_IS_COMPLETE,value:e.data.isCompleted}),z({type:h.SET_NEXT_REQ_MESSAGE_ID,value:e.data.nextReqMessageID}),[2]):[2]}}))}))}),[_]);var Ee=c((function(){return{sendMessage:Ce,removeMessage:pe,updateMessage:me,createTextMessage:$,createFaceMessage:ee,createImageMessage:te,createVideoMessage:se,createFileMessage:ae,createForwardMessage:oe,createCustomMessage:re,createAudioMessage:ne,createTextAtMessage:ie,createLocationMessage:ce,createMergerMessage:ge,editLocalMessage:de,operateMessage:Te,loadMore:Se,revokeMessage:O,setAudioSource:he,setVideoSource:fe,setHighlightedMessageId:ve,updateUploadPendingMessageList:le}}),[Ce,pe,me,$,ee,te,se,ae,oe,re,ne,ie,ce,ge,de,Te,Se,O,he,fe,ve,le]),Ue=c((function(){return{TUIMessage:D||T,MessageContext:b,InputPlugins:k,MessagePlugins:w,TUIChatHeader:P,TUIMessageInput:H,InputQuote:F}}),[]);return g("div",e({className:"chat ".concat(A)},{children:g(d,e({value:W},{children:g(p,e({value:Ee},{children:g(l,e({value:Ue},{children:R||u(M,{children:[g(x,{}),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,__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 l}from"react-i18next";import{useTUIKitContext as m}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as u}from"./basicInfo.js";import{Switch as d}from"../../Switch/Switch.js";import f from"./hooks/useContactInfo.js";import{DivWithEdit as v}from"../../DivWithEdit/DivWithEdit.js";import{useConversation as h}from"../../../hooks/useConversation.js";function p(c){var p=this,C=m("TUIContact"),b=C.chat,k=C.contactData,I=C.setActiveContact,x=C.setActiveConversation,N=l().t,j=c.friend,T=c.openChat,U=j.userID,D=j.profile,g=j.remark,w=a(""),E=w[0],S=w[1],A=a(""),F=A[0],M=A[1],W=a(!1),y=W[0],B=W[1],K=f(),q=K.addToBlocklist,z=K.deleteFriend,G=h(b).createConversation;s((function(){B(!1),M(g)}),[k,g]);return o(i,{children:[r(u,{profile:D}),o("div",t({className:"tui-contact-info-content"},{children:[o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:N("TUIContact.remark")})),r(v,{name:"remark",className:"content-item-text",value:F,type:"text",toggle:function(){S("remark")},isEdit:"remark"===E,confirm:function(t){b.updateFriend({userID:U,remark:null==t?void 0:t.value}),M(null==t?void 0:t.value),S("")},close:function(){S("")}})]})),o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:N("TUIContact.block")})),r(d,{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,q(U)];case 1:return t.sent(),B(!0),I(),[2]}}))}))},checked:y})]})),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,z(U)];case 1:return t.sent(),I(),[2]}}))}))}},{children:N("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,G("C2C".concat(U))];case 1:return t=e.sent(),x(t),T(),[2]}}))}))}},{children:N("TUIContact.Send Message")}))]}))]}))]})}var C=c.memo(p);export{C 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 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.Friend")})),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};
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};
@@ -1 +1 @@
1
- import{__assign as r}from"tslib";import{jsx as o,jsxs as t,Fragment as e}from"react/jsx-runtime";import i,{useMemo as n}from"react";import{TUIConversationProvider as a}from"../../context/TUIConversationContext.js";import{TUIConversationList as m}from"../TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";import{TUIProfile as s}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";function f(i){var f=i.children,l=i.createConversation,c=i.deleteConversation,v=i.filterConversation,C=n((function(){return{createConversation:l,deleteConversation:c,filterConversation:v}}),[l,c,v]);return o(a,r({value:C},{children:f||t(e,{children:[o(m,{}),o(s,{})]})}))}var l=i.memo(f);export{l as TUIConversation,f as UnMemoizedTUIConversation};
1
+ import{__assign as t}from"tslib";import{jsx as o}from"react/jsx-runtime";import r,{useMemo as e}from"react";import{TUIConversationProvider as n}from"../../context/TUIConversationContext.js";import{TUIConversationList as i}from"../TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";function a(r){var a=r.children,s=r.createConversation,m=r.deleteConversation,c=r.filterConversation,v=e((function(){return{createConversation:s,deleteConversation:m,filterConversation:c}}),[s,m,c]);return o(n,t({value:v},{children:a||o(i,{})}))}var s=r.memo(a);export{s as TUIConversation,a as UnMemoizedTUIConversation};
@@ -4,6 +4,7 @@ import { ConversationPreviewUIComponentProps } from '../ConversationPreview/Conv
4
4
  import { ConversationListContainerProps } from '../ConversationPreview/ConversationListContainer.js';
5
5
 
6
6
  interface Props {
7
+ componentVisibleOptions?: any;
7
8
  filters?: object;
8
9
  sort?: object;
9
10
  options?: object;
@@ -1 +1 @@
1
- import{__assign as o}from"tslib";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{useState as i,useRef as s}from"react";import{useTranslation as a}from"react-i18next";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import c from"./hooks/useConversationList.js";import{ConversationPreview as l}from"../ConversationPreview/ConversationPreview.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as C}from"../Icon/type.js";import"@tencentcloud/chat";import{useTUIConversationContext as u}from"../../context/TUIConversationContext.js";import{ConversationListContainer as f}from"../ConversationPreview/ConversationListContainer.js";import{ConversationSearchInput as p}from"../ConversationSearch/ConversationSearchInput.js";import{ConversationSearchResult as d}from"../ConversationSearch/ConversationSearchResult.js";import{ConversationCreate as h}from"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import{getDisplayTitle as j}from"../ConversationPreview/utils.js";import{useConversationUpdate as I}from"./hooks/useConversationUpdate.js";function L(r){var L=r.Preview,w=r.Container,g=void 0===w?f:w,T=r.onConversationListUpdated,U=r.filterConversation,x=a().t,P=v("TUIConversationList"),N=P.chat,S=P.customClasses,y=P.conversation,k=P.setActiveConversation;P.setTUIProfileShow;var A=u("TUIConversationList").filterConversation,E=U||A,R=i(0),b=R[0],F=R[1],D=c(N,(function(o,e){o.length&&k(y)}),E),G=D.conversationList,K=D.setConversationList;I(K,T,(function(){return F((function(o){return o+1}))}),E);var M=i(""),O=M[0],V=M[1],q=i(G),z=q[0],B=q[1],H=i(!1),J=H[0],Q=H[1],W=s(null);return e("div",o({className:"tui-conversation ".concat(S||""),ref:W},{children:J?e(h,{conversationList:G,setConversationCreated:Q}):t(n,{children:[t("div",o({className:"tui-conversation-header"},{children:[e(p,{value:O,clearable:!0,onChange:function(o){var e,t;if(V(null===(e=o.target)||void 0===e?void 0:e.value),null===(t=o.target)||void 0===t?void 0:t.value){var n=G.filter((function(e){var t;return j(e).toLocaleLowerCase().includes(null===(t=o.target)||void 0===t?void 0:t.value.toLocaleLowerCase())}));B(n)}else B([])}}),e("div",o({className:"tui-conversation-create-icon"},{children:e(m,{onClick:function(){V(""),Q(!0)},type:C.CREATE,height:24,width:24})}))]})),e(g,o({setConversationList:K},{children:0===G.length?t("div",o({className:"no-result"},{children:[e(m,{className:"no-result-icon",type:C.EFFORT,width:42,height:42}),e("div",o({className:"no-result-message"},{children:x("TUIConversation.No conversation")}))]})):O?e(d,{Preview:L,searchValue:O,result:z}):G.map((function(t){return e(l,o({},{activeConversation:y,conversation:t,setActiveConversation:k,Preview:L,conversationUpdateCount:b}),t.conversationID)}))}))]})}))}var w=r.memo(L);export{w as TUIConversationList,L as UnMemoTUIConversationList};
1
+ import{__assign as o}from"tslib";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i,{useState as r,useRef as s}from"react";import{useTranslation as a}from"react-i18next";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{isH5 as c}from"../../utils/env.js";import l from"./hooks/useConversationList.js";import{ConversationPreview as m}from"../ConversationPreview/ConversationPreview.js";import"@tencentcloud/chat-uikit-engine";import{Icon as C}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import"@tencentcloud/chat";import{useTUIConversationContext as h}from"../../context/TUIConversationContext.js";import{ConversationListContainer as p}from"../ConversationPreview/ConversationListContainer.js";import{ConversationSearchInput as f}from"../ConversationSearch/ConversationSearchInput.js";import{ConversationSearchResult as d}from"../ConversationSearch/ConversationSearchResult.js";import{ConversationCreate as w}from"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import{getDisplayTitle as j}from"../ConversationPreview/utils.js";import{useConversationUpdate as I}from"./hooks/useConversationUpdate.js";function L(i){var L=i.Preview,S=i.Container,g=void 0===S?p:S,x=i.onConversationListUpdated,P=i.filterConversation,T=i.componentVisibleOptions,U=void 0===T?{isProfileShow:!0,isSearchInputShow:!0,isContainerShow:!0}:T;a().t;var N=v("TUIConversationList"),k=N.chat,y=N.customClasses,A=N.conversation,b=N.setActiveConversation;N.setTUIProfileShow;var D=h("TUIConversationList").filterConversation,E=P||D,R=r(0),F=R[0],O=R[1],V=l(k,(function(o,e){o.length&&b(A)}),E),G=V.conversationList,K=V.setConversationList;I(K,x,(function(){return O((function(o){return o+1}))}),E);var M=r(""),q=M[0],z=M[1],B=r(G),H=B[0],J=B[1],Q=r(!1),W=Q[0],X=Q[1],Y=r(""),Z=Y[0],$=Y[1],_=s(null);return e("div",o({className:"tui-conversation ".concat(c?"tui-conversation-h5":""," ").concat(y||""," "),ref:_},{children:W?e(w,{conversationList:G,setConversationCreated:X}):t(n,{children:[U.isSearchInputShow&&t("div",o({className:"tui-conversation-header"},{children:[e(f,{value:q,clearable:!0,onChange:function(o){var e,t;if(z(null===(e=o.target)||void 0===e?void 0:e.value),null===(t=o.target)||void 0===t?void 0:t.value){var n=G.filter((function(e){var t;return j(e).toLocaleLowerCase().includes(null===(t=o.target)||void 0===t?void 0:t.value.toLocaleLowerCase())}));J(n)}else J([])}}),e("div",o({className:"tui-conversation-create-icon"},{children:e(C,{onClick:function(){z(""),X(!0)},type:u.CREATE,height:24,width:24})}))]})),U.isContainerShow&&e(g,o({setConversationList:K},{children:0===G.length?t("div",o({className:"no-result"},{children:[e(C,{className:"no-result-icon",type:u.EFFORT,width:42,height:42}),e("div",o({className:"no-result-message"},{children:"No conversation"}))]})):q?e(d,{Preview:L,searchValue:q,result:H}):G.map((function(t){return e(m,o({},{activeConversation:A,conversation:t,setActiveConversation:b,Preview:L,conversationUpdateCount:F,activeConversationID:Z,setActiveConversationID:$}),t.conversationID)}))}))]})}))}var S=i.memo(L);export{S as TUIConversationList,L as UnMemoTUIConversationList};
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{jsx as o,jsxs as e,Fragment as a}from"react/jsx-runtime";import{useTUIKit as i}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as r}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as n}from"../../context/TUIKitContext.js";import{TUIConversation as s}from"../TUIConversation/TUIConversation.js";import{TUIChat as c}from"../TUIChat/TUIChat.js";import"react";import{TUIManage as m}from"../TUIManage/TUIManage.js";import"../../locales/index.js";function l(l){var h=l.children,v=l.chat,I=l.customClasses,T=l.activeConversation,U=l.language;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var f=i({chat:v,activeConversation:T,language:U}),C=f.conversation,u=f.contactData,g=f.setActiveConversation,p=f.myProfile,w=f.TUIManageShow,d=f.setTUIManageShow,j=f.TUIProfileShow,S=f.setTUIProfileShow,x=f.setActiveContact,_=r({chat:v,language:U,conversation:C,contactData:u,setActiveConversation:g,customClasses:I,myProfile:p,TUIManageShow:w,setTUIManageShow:d,TUIProfileShow:j,setTUIProfileShow:S,setActiveContact:x});return o(n,t({value:_},{children:o("div",t({className:"tui-kit"},{children:h||e(a,{children:[o(s,{}),o(c,{}),o(m,{})]})}))}))}export{l as TUIKit};
1
+ import{__assign as t}from"tslib";import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as c}from"react";import{TUIStore as r,StoreName as i}from"@tencentcloud/chat-uikit-engine";import{useTranslation as s}from"react-i18next";import{isPC as m,isH5 as l}from"../../utils/env.js";import{useTUIKit as h}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as u}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as f}from"../../context/TUIKitContext.js";import{TUIConversation as I}from"../TUIConversation/TUIConversation.js";import{TUIChat as p}from"../TUIChat/TUIChat.js";import{TUIManage as v}from"../TUIManage/TUIManage.js";import{TUIProfile as d}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../Icon/config.js";import"../Icon/type.js";import{TUIContactInfo as C}from"../TUIContact/TUIContactInfo/TUIContactInfo.js";import{TUIContact as T}from"../TUIContact/TUIContact.js";import"../../locales/index.js";import U from"../Icon/images/chats.svg.js";import g from"../Icon/images/chats-selected.svg.js";import j from"../Icon/images/contacts.svg.js";import w from"../Icon/images/contacts-selected.svg.js";var x=[{id:1,name:"chats",icon:U,selectedIcon:g,value:"chats"},{id:2,name:"contacts",icon:j,selectedIcon:w,value:"contacts"}],N={className:"sample-h5-input",isTransmitter:!0};function M(n){var c=n.moduleValue,r=n.tabbarRender,i=n.setModuleValue;return o(a,{children:[o("div",t({className:"sample-chat-left-container"},{children:[e(d,{className:"sample-chat-profile"}),r,"chats"===c&&e(I,{}),"contacts"===c&&e(T,{})]})),"chats"===c&&o(a,{children:[e(p,{}),e(v,{})]}),"contacts"===c&&e(T,{children:e(C,{showChat:function(){i("chats")}})})]})}function P(n){var c=n.currentConversationID;return o(a,{children:[!c&&o("div",t({className:"sample-chat-h5-container"},{children:[e(d,{className:"sample-profile"}),e(I,{})]})),c&&o(a,{children:[e(p,{TUIMessageInputConfig:N}),e(v,{})]})]})}function b(a){var I=n(""),p=I[0],v=I[1],d=n("chats"),C=d[0],T=d[1],U=s().t,g=a.children,j=a.chat,w=a.customClasses,N=a.activeConversation,b=a.language,S=void 0===b?"en":b;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var D=h({chat:j,activeConversation:N,language:S}),_=D.conversation,k=D.contactData,V=D.setActiveConversation,A=D.myProfile,y=D.TUIManageShow,K=D.setTUIManageShow,O=D.TUIProfileShow,R=D.setTUIProfileShow,F=D.setActiveContact,q=u({chat:j,language:S,conversation:_,contactData:k,setActiveConversation:V,customClasses:w,myProfile:A,TUIManageShow:y,setTUIManageShow:K,TUIProfileShow:O,setTUIProfileShow:R,setActiveContact:F});c((function(){return r.watch(i.CONV,{currentConversationID:z}),function(){r.unwatch(i.CONV,{currentConversationID:z})}}),[]);var z=function(t){v(t)},B=e("div",t({className:"sample-chat-tab"},{children:x.map((function(a){return o("div",t({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var t;t=a.value,T(t)}},{children:[e("img",{src:C===a.value?a.selectedIcon:a.icon,alt:""}),e("p",t({className:"sample-chat-tab-text ".concat(C===a.value?"sample-chat-tab-active":"")},{children:U(a.name)}))]}),a.id)}))}));return e(f,t({value:q},{children:e("div",t({className:"tui-kit"},{children:g||m&&e(M,{moduleValue:C,tabbarRender:B,setModuleValue:T})||l&&e(P,{currentConversationID:p})}))}))}export{b as TUIKit};
@@ -1 +1 @@
1
- import{__assign as n}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as o,useEffect as a}from"react";import{useTranslation as t}from"react-i18next";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as s}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultGroupAvatarWork as c,defaultUserAvatar as m}from"../Avatar/default.js";import{Switch as d}from"../Switch/Switch.js";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{getMessageProfile as h}from"../ConversationPreview/utils.js";import{useConversationUpdate as u}from"../TUIConversationList/hooks/useConversationUpdate.js";import{useConversation as f}from"../../hooks/useConversation.js";function p(){var p=t().t,g=o(null),I=g[0],C=g[1],N=o(null),j=N[0],U=N[1],x=o(!1),T=x[0],k=x[1],D=o(0),w=D[0],A=D[1],M=v("TUIManage"),P=M.conversation,S=M.setActiveConversation,b=M.chat,y=M.TUIManageShow,L=M.setTUIManageShow;u(null,(function(){A((function(n){return n+1}))}));var z=f(b),E=z.pinConversation,K=z.deleteConversation;return a((function(){C(P),U(h(P)),k(!!P&&P.isPinned)}),[P,w]),y&&P&&e("div",n({className:"tui-manage"},{children:[e("div",n({className:"tui-manage-title"},{children:[i(r,{type:s.CANCEL,width:16,height:16,onClick:function(){L(!1)}}),i("span",{children:p("TUIConversation.Conversation Information")})]})),e("div",n({className:"tui-manage-container"},{children:[e("div",n({className:"tui-manage-info"},{children:[i("div",n({className:"info-avatar"},{children:i(l,{size:64,image:(null==j?void 0:j.avatar)||((null==j?void 0:j.groupID)?c:m)})})),i("div",n({className:"info-name"},{children:(null==j?void 0:j.nick)||(null==j?void 0:j.name)})),e("div",n({className:"info-id"},{children:["ID:",(null==j?void 0:j.userID)||(null==j?void 0:j.groupID)]}))]})),e("div",n({className:"tui-manage-handle"},{children:[e("div",n({className:"manage-handle-box"},{children:[i("div",n({className:"manage-handle-title"},{children:p("TUIConversation.Pin")})),i(d,{onChange:function(n){k(n.target.checked),E({conversationID:I.conversationID,isPinned:n.target.checked})},checked:T})]})),i("div",n({className:"manage-handle-box",role:"presentation",onClick:function(){K(I.conversationID),S(null)}},{children:i("div",n({className:"manage-handle-title red"},{children:p("TUIConversation.Delete")}))}))]}))]}))]}))}export{p as TUIManage};
1
+ import{__assign as n}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{useTranslation as a}from"react-i18next";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as s}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultGroupAvatarWork as c,defaultUserAvatar as m}from"../Avatar/default.js";import{Switch as d}from"../Switch/Switch.js";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{isH5 as h,isPC as u}from"../../utils/env.js";import{getMessageProfile as f}from"../ConversationPreview/utils.js";import{useConversationUpdate as p}from"../TUIConversationList/hooks/useConversationUpdate.js";import{useConversation as g}from"../../hooks/useConversation.js";function C(){var C=a().t,I=o(null),N=I[0],j=I[1],x=o(null),U=x[0],k=x[1],T=o(!1),D=T[0],w=T[1],A=o(0),y=A[0],M=A[1],P=v("TUIManage"),S=P.conversation,b=P.setActiveConversation,L=P.chat,K=P.TUIManageShow,z=P.setTUIManageShow;p(null,(function(){M((function(n){return n+1}))}));var B=g(L),E=B.pinConversation,q=B.deleteConversation,F=function(){z(!1)};return t((function(){j(S),k(f(S)),w(!!S&&S.isPinned)}),[S,y]),K&&S&&e("div",n({className:"tui-manage ".concat(h?"tui-h5-manage":"")},{children:[e("div",n({className:"tui-manage-title"},{children:[u&&i(r,{onClick:F,type:s.CANCEL,width:9,height:16}),h&&i(r,{onClick:F,type:s.BACK,width:9,height:16}),i("span",n({style:{marginLeft:"10px"}},{children:C("TUIConversation.Conversation Information")}))]})),e("div",n({className:"tui-manage-container"},{children:[e("div",n({className:"tui-manage-info"},{children:[i("div",n({className:"info-avatar"},{children:i(l,{size:64,image:(null==U?void 0:U.avatar)||((null==U?void 0:U.groupID)?c:m)})})),i("div",n({className:"info-name"},{children:(null==U?void 0:U.nick)||(null==U?void 0:U.name)})),e("div",n({className:"info-id"},{children:["ID:",(null==U?void 0:U.userID)||(null==U?void 0:U.groupID)]}))]})),e("div",n({className:"tui-manage-handle"},{children:[e("div",n({className:"manage-handle-box"},{children:[i("div",n({className:"manage-handle-title"},{children:C("TUIConversation.Pin")})),i(d,{onChange:function(n){w(n.target.checked),E({conversationID:N.conversationID,isPinned:n.target.checked})},checked:D})]})),u&&i("div",n({className:"manage-handle-box",role:"presentation",onClick:function(){q(N.conversationID),b(null)}},{children:i("div",n({className:"manage-handle-title red"},{children:C("TUIConversation.Delete")}))}))]}))]}))]}))}export{C as TUIManage};