@tencentcloud/chat-uikit-react 2.3.0 → 2.3.1

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 (269) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/cjs/components/Chat/Chat.js +1 -1
  3. package/dist/cjs/components/Chat/index.js +1 -1
  4. package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -1
  5. package/dist/cjs/components/ChatHeader/ChatHeaderDefault.js +1 -1
  6. package/dist/cjs/components/ChatSetting/ChatSetting.js +1 -1
  7. package/dist/cjs/components/Contact/Contact.js +1 -1
  8. package/dist/cjs/components/Contact/ContactInfo/ContactInfo.js +1 -1
  9. package/dist/cjs/components/Contact/ContactInfo/addFriendInfo.js +1 -1
  10. package/dist/cjs/components/Contact/ContactInfo/basicInfo.js +1 -1
  11. package/dist/cjs/components/Contact/ContactInfo/blockInfo.js +1 -1
  12. package/dist/cjs/components/Contact/ContactInfo/friendApplication.js +1 -1
  13. package/dist/cjs/components/Contact/ContactInfo/friendInfo.js +1 -1
  14. package/dist/cjs/components/Contact/ContactInfo/groupInfo.js +1 -1
  15. package/dist/cjs/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
  16. package/dist/cjs/components/Contact/ContactList/ContactList.js +1 -1
  17. package/dist/cjs/components/Contact/hooks/useTUIContact.js +1 -1
  18. package/dist/cjs/components/ContactSearch/ContactSearch.js +1 -1
  19. package/dist/cjs/components/ContactSearch/hooks/useContactSearch.js +1 -1
  20. package/dist/cjs/components/ConversationActions/ConversationActions.js +1 -1
  21. package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
  22. package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
  23. package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  24. package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  25. package/dist/cjs/components/ConversationList/ConversationList.js +1 -1
  26. package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
  27. package/dist/cjs/components/ConversationPreview/utils.js +1 -1
  28. package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
  29. package/dist/cjs/components/MessageElement/Message.js +1 -1
  30. package/dist/cjs/components/MessageElement/MessageAudio.js +1 -1
  31. package/dist/cjs/components/MessageElement/MessageAvatar.js +1 -1
  32. package/dist/cjs/components/MessageElement/MessageBubble.js +1 -1
  33. package/dist/cjs/components/MessageElement/MessageContext.js +1 -1
  34. package/dist/cjs/components/MessageElement/MessageCustom.js +1 -1
  35. package/dist/cjs/components/MessageElement/MessageDefault.js +1 -1
  36. package/dist/cjs/components/MessageElement/MessageName.js +1 -1
  37. package/dist/cjs/components/MessageElement/MessagePlugins.js +1 -1
  38. package/dist/cjs/components/MessageElement/MessageProgress.js +1 -1
  39. package/dist/cjs/components/MessageElement/MessageRevoke.js +1 -1
  40. package/dist/cjs/components/MessageElement/MessageStatus.js +1 -1
  41. package/dist/cjs/components/MessageElement/MessageSystem.js +1 -1
  42. package/dist/cjs/components/MessageElement/MessageText.js +1 -1
  43. package/dist/cjs/components/MessageElement/MessageTip.js +1 -1
  44. package/dist/cjs/components/MessageElement/hooks/useMessageHandler.js +1 -1
  45. package/dist/cjs/components/MessageElement/hooks/useMessageReply.js +1 -1
  46. package/dist/cjs/components/MessageElement/utils/decodeText.js +1 -1
  47. package/dist/cjs/components/MessageElement/utils/emojiMap.js +1 -1
  48. package/dist/cjs/components/MessageElement/utils/index.js +1 -1
  49. package/dist/cjs/components/MessageInput/EmojiPicker.js +1 -1
  50. package/dist/cjs/components/MessageInput/Forward.js +1 -1
  51. package/dist/cjs/components/MessageInput/InputPluginsDefalut.js +1 -1
  52. package/dist/cjs/components/MessageInput/InputQuoteDefalut.js +1 -1
  53. package/dist/cjs/components/MessageInput/MessageInput.js +1 -1
  54. package/dist/cjs/components/MessageInput/MessageInputDefault.js +1 -1
  55. package/dist/cjs/components/MessageInput/hooks/useEmojiPicker.js +1 -1
  56. package/dist/cjs/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
  57. package/dist/cjs/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
  58. package/dist/cjs/components/MessageInput/hooks/useMessageInputText.js +1 -1
  59. package/dist/cjs/components/MessageList/MessageList.js +1 -1
  60. package/dist/cjs/components/MessageList/hooks/useMessageListElement.js +1 -1
  61. package/dist/cjs/components/Profile/Profile.js +1 -1
  62. package/dist/cjs/components/Profile/ProfileDefault.js +1 -1
  63. package/dist/cjs/context/UIKitContext.js +1 -1
  64. package/dist/cjs/index.css +2 -2
  65. package/dist/cjs/index.d.css +213 -207
  66. package/dist/cjs/index.d.ts +0 -3
  67. package/dist/cjs/index.js +1 -1
  68. package/dist/cjs/locales/en-US/emoji.js +1 -0
  69. package/dist/cjs/locales/en-US/index.js +1 -1
  70. package/dist/cjs/locales/index.js +1 -1
  71. package/dist/cjs/locales/ja-JP/emoji.js +1 -0
  72. package/dist/cjs/locales/ja-JP/index.js +1 -1
  73. package/dist/cjs/locales/ko-KR/emoji.js +1 -0
  74. package/dist/cjs/locales/ko-KR/index.js +1 -1
  75. package/dist/cjs/locales/zh-CN/emoji.js +1 -0
  76. package/dist/cjs/locales/zh-CN/index.js +1 -1
  77. package/dist/cjs/locales/zh-TW/emoji.js +1 -0
  78. package/dist/cjs/locales/zh-TW/index.js +1 -1
  79. package/dist/cjs/node_modules/zustand/esm/react.mjs.js +1 -0
  80. package/dist/cjs/node_modules/zustand/esm/vanilla.mjs.js +1 -0
  81. package/dist/cjs/store/UIManagerStore.js +1 -0
  82. package/dist/esm/components/Chat/Chat.js +1 -1
  83. package/dist/esm/components/Chat/index.js +1 -1
  84. package/dist/esm/components/ChatHeader/ChatHeader.js +1 -1
  85. package/dist/esm/components/ChatHeader/ChatHeaderDefault.js +1 -1
  86. package/dist/esm/components/ChatSetting/ChatSetting.js +1 -1
  87. package/dist/esm/components/Contact/Contact.js +1 -1
  88. package/dist/esm/components/Contact/ContactInfo/ContactInfo.js +1 -1
  89. package/dist/esm/components/Contact/ContactInfo/addFriendInfo.js +1 -1
  90. package/dist/esm/components/Contact/ContactInfo/basicInfo.js +1 -1
  91. package/dist/esm/components/Contact/ContactInfo/blockInfo.js +1 -1
  92. package/dist/esm/components/Contact/ContactInfo/friendApplication.js +1 -1
  93. package/dist/esm/components/Contact/ContactInfo/friendInfo.js +1 -1
  94. package/dist/esm/components/Contact/ContactInfo/groupInfo.js +1 -1
  95. package/dist/esm/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
  96. package/dist/esm/components/Contact/ContactList/ContactList.js +1 -1
  97. package/dist/esm/components/Contact/hooks/useTUIContact.js +1 -1
  98. package/dist/esm/components/ContactSearch/ContactSearch.js +1 -1
  99. package/dist/esm/components/ContactSearch/hooks/useContactSearch.js +1 -1
  100. package/dist/esm/components/ConversationActions/ConversationActions.js +1 -1
  101. package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
  102. package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
  103. package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
  104. package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
  105. package/dist/esm/components/ConversationList/ConversationList.js +1 -1
  106. package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
  107. package/dist/esm/components/ConversationPreview/utils.js +1 -1
  108. package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
  109. package/dist/esm/components/MessageElement/Message.js +1 -1
  110. package/dist/esm/components/MessageElement/MessageAudio.js +1 -1
  111. package/dist/esm/components/MessageElement/MessageAvatar.js +1 -1
  112. package/dist/esm/components/MessageElement/MessageBubble.js +1 -1
  113. package/dist/esm/components/MessageElement/MessageContext.js +1 -1
  114. package/dist/esm/components/MessageElement/MessageCustom.js +1 -1
  115. package/dist/esm/components/MessageElement/MessageDefault.js +1 -1
  116. package/dist/esm/components/MessageElement/MessageName.js +1 -1
  117. package/dist/esm/components/MessageElement/MessagePlugins.js +1 -1
  118. package/dist/esm/components/MessageElement/MessageProgress.js +1 -1
  119. package/dist/esm/components/MessageElement/MessageRevoke.js +1 -1
  120. package/dist/esm/components/MessageElement/MessageStatus.js +1 -1
  121. package/dist/esm/components/MessageElement/MessageSystem.js +1 -1
  122. package/dist/esm/components/MessageElement/MessageText.js +1 -1
  123. package/dist/esm/components/MessageElement/MessageTip.js +1 -1
  124. package/dist/esm/components/MessageElement/hooks/useMessageHandler.js +1 -1
  125. package/dist/esm/components/MessageElement/hooks/useMessageReply.js +1 -1
  126. package/dist/esm/components/MessageElement/utils/decodeText.js +1 -1
  127. package/dist/esm/components/MessageElement/utils/emojiMap.js +1 -1
  128. package/dist/esm/components/MessageElement/utils/index.js +1 -1
  129. package/dist/esm/components/MessageInput/EmojiPicker.js +1 -1
  130. package/dist/esm/components/MessageInput/Forward.js +1 -1
  131. package/dist/esm/components/MessageInput/InputPluginsDefalut.js +1 -1
  132. package/dist/esm/components/MessageInput/InputQuoteDefalut.js +1 -1
  133. package/dist/esm/components/MessageInput/MessageInput.js +1 -1
  134. package/dist/esm/components/MessageInput/MessageInputDefault.js +1 -1
  135. package/dist/esm/components/MessageInput/hooks/useEmojiPicker.js +1 -1
  136. package/dist/esm/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
  137. package/dist/esm/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
  138. package/dist/esm/components/MessageInput/hooks/useMessageInputText.js +1 -1
  139. package/dist/esm/components/MessageList/MessageList.js +1 -1
  140. package/dist/esm/components/MessageList/hooks/useMessageListElement.js +1 -1
  141. package/dist/esm/components/Profile/Profile.js +1 -1
  142. package/dist/esm/components/Profile/ProfileDefault.js +1 -1
  143. package/dist/esm/context/UIKitContext.js +1 -1
  144. package/dist/esm/index.css +2 -2
  145. package/dist/esm/index.d.css +213 -207
  146. package/dist/esm/index.d.ts +0 -3
  147. package/dist/esm/index.js +1 -1
  148. package/dist/esm/locales/en-US/emoji.js +1 -0
  149. package/dist/esm/locales/en-US/index.js +1 -1
  150. package/dist/esm/locales/index.js +1 -1
  151. package/dist/esm/locales/ja-JP/emoji.js +1 -0
  152. package/dist/esm/locales/ja-JP/index.js +1 -1
  153. package/dist/esm/locales/ko-KR/emoji.js +1 -0
  154. package/dist/esm/locales/ko-KR/index.js +1 -1
  155. package/dist/esm/locales/zh-CN/emoji.js +1 -0
  156. package/dist/esm/locales/zh-CN/index.js +1 -1
  157. package/dist/esm/locales/zh-TW/emoji.js +1 -0
  158. package/dist/esm/locales/zh-TW/index.js +1 -1
  159. package/dist/esm/node_modules/zustand/esm/react.mjs.js +1 -0
  160. package/dist/esm/node_modules/zustand/esm/vanilla.mjs.js +1 -0
  161. package/dist/esm/store/UIManagerStore.js +1 -0
  162. package/package.json +5 -3
  163. package/src/components/Chat/Chat.tsx +3 -3
  164. package/src/components/Chat/styles/layout.scss +1 -1
  165. package/src/components/ChatHeader/ChatHeaderDefault.tsx +4 -3
  166. package/src/components/ChatHeader/styles/layout.scss +1 -1
  167. package/src/components/ChatSetting/ChatSetting.tsx +8 -7
  168. package/src/components/ChatSetting/styles/index.scss +2 -1
  169. package/src/components/Checkbox/styles/color.scss +1 -1
  170. package/src/components/Contact/Contact.tsx +4 -4
  171. package/src/components/Contact/ContactInfo/ContactInfo.tsx +2 -2
  172. package/src/components/Contact/ContactInfo/addFriendInfo.tsx +38 -36
  173. package/src/components/Contact/ContactInfo/basicInfo.tsx +10 -10
  174. package/src/components/Contact/ContactInfo/blockInfo.tsx +4 -4
  175. package/src/components/Contact/ContactInfo/friendApplication.tsx +4 -4
  176. package/src/components/Contact/ContactInfo/friendInfo.tsx +7 -7
  177. package/src/components/Contact/ContactInfo/groupInfo.tsx +23 -23
  178. package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +2 -2
  179. package/src/components/Contact/ContactInfo/index.scss +1 -1
  180. package/src/components/Contact/ContactList/ContactList.tsx +5 -4
  181. package/src/components/Contact/ContactList/index.scss +1 -1
  182. package/src/components/Contact/hooks/useTUIContact.tsx +2 -2
  183. package/src/components/Contact/index.scss +1 -1
  184. package/src/components/ContactSearch/ContactSearch.tsx +5 -4
  185. package/src/components/ContactSearch/hooks/useContactSearch.tsx +4 -3
  186. package/src/components/ContactSearch/index.scss +1 -1
  187. package/src/components/ConversationActions/ConversationActions.scss +1 -1
  188. package/src/components/ConversationActions/ConversationActions.tsx +2 -2
  189. package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
  190. package/src/components/ConversationCreate/ConversationCreateGroupDetail.tsx +4 -4
  191. package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +4 -4
  192. package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +2 -2
  193. package/src/components/ConversationCreate/styles/ConversationCreateGroupDetail.scss +1 -1
  194. package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +1 -1
  195. package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -1
  196. package/src/components/ConversationCreate/styles/index.scss +1 -1
  197. package/src/components/ConversationList/ConversationList.scss +1 -1
  198. package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -1
  199. package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.scss +1 -1
  200. package/src/components/ConversationPreview/ConversationPreview.scss +1 -1
  201. package/src/components/ConversationPreview/ConversationPreview.tsx +3 -3
  202. package/src/components/ConversationPreview/utils.tsx +2 -2
  203. package/src/components/ConversationSearch/ConversationSearch.scss +1 -1
  204. package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss +1 -1
  205. package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx +2 -2
  206. package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss +1 -1
  207. package/src/components/DivWithEdit/styles/index.scss +1 -1
  208. package/src/components/Icon/styles/index.scss +1 -1
  209. package/src/components/Input/styles/index.scss +2 -2
  210. package/src/components/MessageElement/MessageCustom.tsx +4 -4
  211. package/src/components/MessageElement/MessagePlugins.tsx +3 -3
  212. package/src/components/MessageElement/MessageRevoke.tsx +5 -5
  213. package/src/components/MessageElement/MessageStatus.tsx +2 -1
  214. package/src/components/MessageElement/hooks/useMessageHandler.ts +9 -6
  215. package/src/components/MessageElement/hooks/useMessageReply.ts +3 -2
  216. package/src/components/MessageElement/styles/color.scss +1 -1
  217. package/src/components/MessageElement/styles/layout.scss +2 -2
  218. package/src/components/MessageElement/utils/decodeText.ts +59 -9
  219. package/src/components/MessageElement/utils/emojiMap.ts +73 -474
  220. package/src/components/MessageElement/utils/index.ts +1 -5
  221. package/src/components/MessageInput/EmojiPicker.tsx +10 -8
  222. package/src/components/MessageInput/Forward.tsx +2 -2
  223. package/src/components/MessageInput/InputPluginsDefalut.tsx +2 -2
  224. package/src/components/MessageInput/InputQuoteDefalut.tsx +6 -6
  225. package/src/components/MessageInput/MessageInput.tsx +0 -1
  226. package/src/components/MessageInput/MessageInputDefault.tsx +5 -5
  227. package/src/components/MessageInput/hooks/useEmojiPicker.tsx +11 -16
  228. package/src/components/MessageInput/hooks/useHandleForwardMessage.tsx +3 -4
  229. package/src/components/MessageInput/hooks/useMessageInputText.tsx +17 -11
  230. package/src/components/MessageInput/styles/color.scss +1 -1
  231. package/src/components/MessageInput/styles/layout.scss +2 -2
  232. package/src/components/MessageList/MessageList.tsx +2 -2
  233. package/src/components/MessageList/hooks/useMessageListElement.tsx +3 -2
  234. package/src/components/MessageList/styles/layout.scss +1 -1
  235. package/src/components/Plugins/styles/color.scss +1 -1
  236. package/src/components/Profile/Profile.tsx +2 -2
  237. package/src/components/Profile/ProfileDefault.tsx +4 -4
  238. package/src/components/Profile/myProfile/styles/index.scss +1 -1
  239. package/src/components/Profile/styles/color.scss +1 -1
  240. package/src/components/Profile/styles/layout.scss +1 -1
  241. package/src/context/UIKitContext.tsx +2 -8
  242. package/src/context/UIManagerContext.tsx +5 -5
  243. package/src/context/index.ts +0 -1
  244. package/src/locales/en-US/emoji.ts +66 -0
  245. package/src/locales/en-US/index.ts +2 -0
  246. package/src/locales/index.ts +4 -22
  247. package/src/locales/ja-JP/emoji.ts +66 -0
  248. package/src/locales/ja-JP/index.ts +2 -0
  249. package/src/locales/ko-KR/emoji.ts +66 -0
  250. package/src/locales/ko-KR/index.ts +2 -0
  251. package/src/locales/zh-CN/emoji.ts +66 -0
  252. package/src/locales/zh-CN/index.ts +2 -0
  253. package/src/locales/zh-TW/emoji.ts +65 -0
  254. package/src/locales/zh-TW/index.ts +2 -0
  255. package/src/store/UIManagerStore.ts +108 -0
  256. package/src/store/index.ts +5 -0
  257. package/.babelrc +0 -7
  258. package/.editorconfig +0 -16
  259. package/.husky/pre-commit +0 -4
  260. package/.lintstagedrc.json +0 -6
  261. package/.stylelintrc.js +0 -40
  262. package/dist/cjs/context/UIManagerContext.d.ts +0 -46
  263. package/dist/cjs/context/UIManagerContext.js +0 -1
  264. package/dist/cjs/locales/index.d.ts +0 -6
  265. package/dist/esm/context/UIManagerContext.d.ts +0 -46
  266. package/dist/esm/context/UIManagerContext.js +0 -1
  267. package/dist/esm/locales/index.d.ts +0 -6
  268. package/rollup.config.js +0 -81
  269. package/scripts/publish-npm.js +0 -22
@@ -0,0 +1,66 @@
1
+ const emojiTranslation = {
2
+ '[TUIEmoji_Smile]': '[미소]',
3
+ '[TUIEmoji_Expect]': '[기대]',
4
+ '[TUIEmoji_Blink]': '[눈길림]',
5
+ '[TUIEmoji_Guffaw]': '[대소]',
6
+ '[TUIEmoji_KindSmile]': '[친절]',
7
+ '[TUIEmoji_Haha]': '[하하]',
8
+ '[TUIEmoji_Cheerful]': '[기쁨]',
9
+ '[TUIEmoji_Speechless]': '[무언]',
10
+ '[TUIEmoji_Amazed]': '[놀람]',
11
+ '[TUIEmoji_Sorrow]': '[슬픔]',
12
+ '[TUIEmoji_Complacent]': '[만족]',
13
+ '[TUIEmoji_Silly]': '[바보]',
14
+ '[TUIEmoji_Lustful]': '[욕망]',
15
+ '[TUIEmoji_Giggle]': '[kichigae]',
16
+ '[TUIEmoji_Kiss]': '[키스]',
17
+ '[TUIEmoji_Wail]': '[울음]',
18
+ '[TUIEmoji_TearsLaugh]': '[울먹임]',
19
+ '[TUIEmoji_Trapped]': '[갇힘]',
20
+ '[TUIEmoji_Mask]': '[마스크]',
21
+ '[TUIEmoji_Fear]': '[공포]',
22
+ '[TUIEmoji_BareTeeth]': '[이빨보임]',
23
+ '[TUIEmoji_FlareUp]': '[화남]',
24
+ '[TUIEmoji_Yawn]': '[하품]',
25
+ '[TUIEmoji_Tact]': '[기지]',
26
+ '[TUIEmoji_Stareyes]': '[별눈]',
27
+ '[TUIEmoji_ShutUp]': '[조용히]',
28
+ '[TUIEmoji_Sigh]': '[한숨]',
29
+ '[TUIEmoji_Hehe]': '[헤헤]',
30
+ '[TUIEmoji_Silent]': '[침묵]',
31
+ '[TUIEmoji_Surprised]': '[놀람]',
32
+ '[TUIEmoji_Askance]': '[백안]',
33
+ '[TUIEmoji_Ok]': '[OK]',
34
+ '[TUIEmoji_Shit]': '[똥]',
35
+ '[TUIEmoji_Monster]': '[몬스터]',
36
+ '[TUIEmoji_Daemon]': '[악마]',
37
+ '[TUIEmoji_Rage]': '[분노]',
38
+ '[TUIEmoji_Fool]': '[바보]',
39
+ '[TUIEmoji_Pig]': '[돼지]',
40
+ '[TUIEmoji_Cow]': '[소]',
41
+ '[TUIEmoji_Ai]': '[AI]',
42
+ '[TUIEmoji_Skull]': '[해골]',
43
+ '[TUIEmoji_Bombs]': '[폭탄]',
44
+ '[TUIEmoji_Coffee]': '[커피]',
45
+ '[TUIEmoji_Cake]': '[케이크]',
46
+ '[TUIEmoji_Beer]': '[맥주]',
47
+ '[TUIEmoji_Flower]': '[꽃]',
48
+ '[TUIEmoji_Watermelon]': '[수박]',
49
+ '[TUIEmoji_Rich]': '[부자]',
50
+ '[TUIEmoji_Heart]': '[사랑]',
51
+ '[TUIEmoji_Moon]': '[달]',
52
+ '[TUIEmoji_Sun]': '[태양]',
53
+ '[TUIEmoji_Star]': '[별]',
54
+ '[TUIEmoji_RedPacket]': '[레드패킷]',
55
+ '[TUIEmoji_Celebrate]': '[축하]',
56
+ '[TUIEmoji_Bless]': '[복]',
57
+ '[TUIEmoji_Fortune]': '[운]',
58
+ '[TUIEmoji_Convinced]': '[복종]',
59
+ '[TUIEmoji_Prohibit]': '[금지]',
60
+ '[TUIEmoji_666]': '[666]',
61
+ '[TUIEmoji_857]': '[857]',
62
+ '[TUIEmoji_Knife]': '[칼]',
63
+ '[TUIEmoji_Like]': '[좋아요]',
64
+ };
65
+
66
+ export default emojiTranslation;
@@ -1,10 +1,12 @@
1
1
  import TUIChat from './TUIChat';
2
+ import Emoji from './emoji';
2
3
  import TUIConversation from './TUIConversation';
3
4
  import TUIContact from './TUIContact';
4
5
  import TUIProfile from './TUIProfile';
5
6
 
6
7
  export const message = {
7
8
  TUIChat,
9
+ Emoji,
8
10
  TUIConversation,
9
11
  TUIContact,
10
12
  TUIProfile,
@@ -0,0 +1,66 @@
1
+ const emojiTranslation = {
2
+ '[TUIEmoji_Smile]': '[微笑]',
3
+ '[TUIEmoji_Expect]': '[期待]',
4
+ '[TUIEmoji_Blink]': '[眨眼]',
5
+ '[TUIEmoji_Guffaw]': '[大笑]',
6
+ '[TUIEmoji_KindSmile]': '[姨母笑]',
7
+ '[TUIEmoji_Haha]': '[哈哈哈]',
8
+ '[TUIEmoji_Cheerful]': '[愉快]',
9
+ '[TUIEmoji_Speechless]': '[无语]',
10
+ '[TUIEmoji_Amazed]': '[惊讶]',
11
+ '[TUIEmoji_Sorrow]': '[悲伤]',
12
+ '[TUIEmoji_Complacent]': '[得意]',
13
+ '[TUIEmoji_Silly]': '[傻了]',
14
+ '[TUIEmoji_Lustful]': '[色]',
15
+ '[TUIEmoji_Giggle]': '[憨笑]',
16
+ '[TUIEmoji_Kiss]': '[亲亲]',
17
+ '[TUIEmoji_Wail]': '[大哭]',
18
+ '[TUIEmoji_TearsLaugh]': '[哭笑]',
19
+ '[TUIEmoji_Trapped]': '[困]',
20
+ '[TUIEmoji_Mask]': '[口罩]',
21
+ '[TUIEmoji_Fear]': '[恐惧]',
22
+ '[TUIEmoji_BareTeeth]': '[龇牙]',
23
+ '[TUIEmoji_FlareUp]': '[发怒]',
24
+ '[TUIEmoji_Yawn]': '[打哈欠]',
25
+ '[TUIEmoji_Tact]': '[机智]',
26
+ '[TUIEmoji_Stareyes]': '[星星眼]',
27
+ '[TUIEmoji_ShutUp]': '[闭嘴]',
28
+ '[TUIEmoji_Sigh]': '[叹气]',
29
+ '[TUIEmoji_Hehe]': '[呵呵]',
30
+ '[TUIEmoji_Silent]': '[收声]',
31
+ '[TUIEmoji_Surprised]': '[惊喜]',
32
+ '[TUIEmoji_Askance]': '[白眼]',
33
+ '[TUIEmoji_Ok]': '[OK]',
34
+ '[TUIEmoji_Shit]': '[便便]',
35
+ '[TUIEmoji_Monster]': '[怪兽]',
36
+ '[TUIEmoji_Daemon]': '[恶魔]',
37
+ '[TUIEmoji_Rage]': '[恶魔怒]',
38
+ '[TUIEmoji_Fool]': '[衰]',
39
+ '[TUIEmoji_Pig]': '[猪]',
40
+ '[TUIEmoji_Cow]': '[牛]',
41
+ '[TUIEmoji_Ai]': '[AI]',
42
+ '[TUIEmoji_Skull]': '[骷髅]',
43
+ '[TUIEmoji_Bombs]': '[炸弹]',
44
+ '[TUIEmoji_Coffee]': '[咖啡]',
45
+ '[TUIEmoji_Cake]': '[蛋糕]',
46
+ '[TUIEmoji_Beer]': '[啤酒]',
47
+ '[TUIEmoji_Flower]': '[花]',
48
+ '[TUIEmoji_Watermelon]': '[瓜]',
49
+ '[TUIEmoji_Rich]': '[壕]',
50
+ '[TUIEmoji_Heart]': '[爱心]',
51
+ '[TUIEmoji_Moon]': '[月亮]',
52
+ '[TUIEmoji_Sun]': '[太阳]',
53
+ '[TUIEmoji_Star]': '[星星]',
54
+ '[TUIEmoji_RedPacket]': '[红包]',
55
+ '[TUIEmoji_Celebrate]': '[庆祝]',
56
+ '[TUIEmoji_Bless]': '[福]',
57
+ '[TUIEmoji_Fortune]': '[发]',
58
+ '[TUIEmoji_Convinced]': '[服]',
59
+ '[TUIEmoji_Prohibit]': '[禁]',
60
+ '[TUIEmoji_666]': '[666]',
61
+ '[TUIEmoji_857]': '[857]',
62
+ '[TUIEmoji_Knife]': '[刀]',
63
+ '[TUIEmoji_Like]': '[赞]',
64
+ };
65
+
66
+ export default emojiTranslation;
@@ -1,10 +1,12 @@
1
1
  import TUIChat from './TUIChat';
2
+ import Emoji from './emoji';
2
3
  import TUIConversation from './TUIConversation';
3
4
  import TUIContact from './TUIContact';
4
5
  import TUIProfile from './TUIProfile';
5
6
 
6
7
  export const message = {
7
8
  TUIChat,
9
+ Emoji,
8
10
  TUIConversation,
9
11
  TUIContact,
10
12
  TUIProfile,
@@ -0,0 +1,65 @@
1
+ const emojiTranslation = {
2
+ '[TUIEmoji_Smile]': '[微笑]',
3
+ '[TUIEmoji_Expect]': '[期待]',
4
+ '[TUIEmoji_Blink]': '[眨眼]',
5
+ '[TUIEmoji_Guffaw]': '[大笑]',
6
+ '[TUIEmoji_KindSmile]': '[姨母笑]',
7
+ '[TUIEmoji_Haha]': '[哈哈哈]',
8
+ '[TUIEmoji_Cheerful]': '[愉快]',
9
+ '[TUIEmoji_Speechless]': '[無語]',
10
+ '[TUIEmoji_Amazed]': '[驚訝]',
11
+ '[TUIEmoji_Sorrow]': '[悲傷]',
12
+ '[TUIEmoji_Complacent]': '[得意]',
13
+ '[TUIEmoji_Silly]': '[傻了]',
14
+ '[TUIEmoji_Lustful]': '[色]',
15
+ '[TUIEmoji_Giggle]': '[憨笑]',
16
+ '[TUIEmoji_Kiss]': '[親親]',
17
+ '[TUIEmoji_Wail]': '[大哭]',
18
+ '[TUIEmoji_TearsLaugh]': '[哭笑]',
19
+ '[TUIEmoji_Trapped]': '[困]',
20
+ '[TUIEmoji_Mask]': '[口罩]',
21
+ '[TUIEmoji_Fear]': '[恐懼]',
22
+ '[TUIEmoji_BareTeeth]': '[齜牙]',
23
+ '[TUIEmoji_FlareUp]': '[發怒]',
24
+ '[TUIEmoji_Yawn]': '[打哈欠]',
25
+ '[TUIEmoji_Tact]': '[機智]',
26
+ '[TUIEmoji_Stareyes]': '[星星眼]',
27
+ '[TUIEmoji_ShutUp]': '[閉嘴]',
28
+ '[TUIEmoji_Sigh]': '[嘆氣]',
29
+ '[TUIEmoji_Hehe]': '[呵呵]',
30
+ '[TUIEmoji_Silent]': '[收聲]',
31
+ '[TUIEmoji_Surprised]': '[驚喜]',
32
+ '[TUIEmoji_Askance]': '[白眼]',
33
+ '[TUIEmoji_Ok]': '[OK]',
34
+ '[TUIEmoji_Shit]': '[便便]',
35
+ '[TUIEmoji_Monster]': '[怪獸]',
36
+ '[TUIEmoji_Daemon]': '[惡魔]',
37
+ '[TUIEmoji_Rage]': '[惡魔怒]',
38
+ '[TUIEmoji_Fool]': '[衰]',
39
+ '[TUIEmoji_Pig]': '[豬]',
40
+ '[TUIEmoji_Cow]': '[牛]',
41
+ '[TUIEmoji_Ai]': '[AI]',
42
+ '[TUIEmoji_Skull]': '[骷髏]',
43
+ '[TUIEmoji_Bombs]': '[炸彈]',
44
+ '[TUIEmoji_Coffee]': '[咖啡]',
45
+ '[TUIEmoji_Cake]': '[蛋糕]',
46
+ '[TUIEmoji_Flower]': '[花]',
47
+ '[TUIEmoji_Watermelon]': '[瓜]',
48
+ '[TUIEmoji_Rich]': '[壕]',
49
+ '[TUIEmoji_Heart]': '[愛心]',
50
+ '[TUIEmoji_Moon]': '[月亮]',
51
+ '[TUIEmoji_Sun]': '[太陽]',
52
+ '[TUIEmoji_Star]': '[星星]',
53
+ '[TUIEmoji_RedPacket]': '[紅包]',
54
+ '[TUIEmoji_Celebrate]': '[慶祝]',
55
+ '[TUIEmoji_Bless]': '[福]',
56
+ '[TUIEmoji_Fortune]': '[發]',
57
+ '[TUIEmoji_Convinced]': '[服]',
58
+ '[TUIEmoji_Prohibit]': '[禁]',
59
+ '[TUIEmoji_666]': '[666]',
60
+ '[TUIEmoji_857]': '[857]',
61
+ '[TUIEmoji_Knife]': '[刀]',
62
+ '[TUIEmoji_Like]': '[讚]',
63
+ };
64
+
65
+ export default emojiTranslation;
@@ -1,10 +1,12 @@
1
1
  import TUIChat from './TUIChat';
2
+ import Emoji from './emoji';
2
3
  import TUIConversation from './TUIConversation';
3
4
  import TUIContact from './TUIContact';
4
5
  import TUIProfile from './TUIProfile';
5
6
 
6
7
  export const message = {
7
8
  TUIChat,
9
+ Emoji,
8
10
  TUIConversation,
9
11
  TUIContact,
10
12
  TUIProfile,
@@ -0,0 +1,108 @@
1
+ import { useStore } from 'zustand';
2
+ import { createStore } from 'zustand/vanilla';
3
+ import { TUILogin } from '@tencentcloud/tui-core';
4
+ import { TUIStore, StoreName } from '@tencentcloud/chat-uikit-engine';
5
+ import type { IConversationModel, IGroupModel } from '@tencentcloud/chat-uikit-engine';
6
+ import type { Profile, Friend, FriendApplication } from '@tencentcloud/chat';
7
+
8
+ type BlockData = {
9
+ type: 'block';
10
+ data: Profile;
11
+ };
12
+
13
+ type FriendData = {
14
+ type: 'friend';
15
+ data: Friend;
16
+ };
17
+
18
+ type FriendApplicationData = {
19
+ type: 'friendApplication';
20
+ data: FriendApplication;
21
+ };
22
+
23
+ type AddFriendData = {
24
+ type: 'addFriend';
25
+ data: Profile;
26
+ };
27
+
28
+ type GroupData = {
29
+ type: 'group';
30
+ data: IGroupModel;
31
+ };
32
+
33
+ type ContactParams =
34
+ | BlockData
35
+ | FriendData
36
+ | FriendApplicationData
37
+ | AddFriendData
38
+ | GroupData;
39
+
40
+ interface IUIManagerState {
41
+ chat: any;
42
+ myProfile: Profile | undefined;
43
+ contactData: ContactParams | undefined;
44
+ conversation: IConversationModel | undefined;
45
+ TUIProfileShow: boolean;
46
+ TUIManageShow: boolean;
47
+ }
48
+
49
+ interface IUIManagerAction {
50
+ setMyProfile: (profile?: Profile | undefined) => void;
51
+ setActiveContact: (contact?: ContactParams) => void;
52
+ setActiveConversation: (conversation?: IConversationModel) => void;
53
+ setTUIProfileShow: (show: boolean) => void;
54
+ setTUIManageShow: (show: boolean) => void;
55
+ }
56
+
57
+ const uiManagerStore = createStore<IUIManagerState & IUIManagerAction>()(set => ({
58
+ chat: null,
59
+ myProfile: undefined,
60
+ contactData: undefined,
61
+ conversation: undefined,
62
+ TUIProfileShow: false,
63
+ TUIManageShow: false,
64
+ setMyProfile: myProfile => set(() => ({ myProfile: myProfile })),
65
+ setActiveContact: contact => set(() => ({ contactData: contact })),
66
+ setActiveConversation: conversation => set(() => ({ conversation: conversation })),
67
+ setTUIProfileShow: value => set(() => ({ TUIProfileShow: value })),
68
+ setTUIManageShow: value => set(() => ({ TUIManageShow: value })),
69
+ }));
70
+
71
+ TUIStore.watch(StoreName.USER, {
72
+ userProfile: onMyProfileUpdated,
73
+ });
74
+
75
+ TUIStore.watch(StoreName.CONV, {
76
+ currentConversation: onCurrentConversationUpdated,
77
+ });
78
+
79
+ function onMyProfileUpdated(userProfileData: Profile) {
80
+ uiManagerStore.getState().setMyProfile(userProfileData);
81
+ }
82
+
83
+ function onCurrentConversationUpdated(conversationModel: IConversationModel) {
84
+ if (conversationModel?.conversationID !== uiManagerStore.getState().conversation?.conversationID) {
85
+ uiManagerStore.getState().setTUIManageShow(false);
86
+ }
87
+ uiManagerStore.getState().setActiveConversation(conversationModel);
88
+ }
89
+
90
+ function useUIManagerStore(..._args: any[]) {
91
+ return {
92
+ chat: TUILogin.getContext().chat,
93
+ myProfile: useStore(uiManagerStore, state => state.myProfile),
94
+ contactData: useStore(uiManagerStore, state => state.contactData),
95
+ conversation: useStore(uiManagerStore, state => state.conversation),
96
+ TUIProfileShow: useStore(uiManagerStore, state => state.TUIProfileShow),
97
+ TUIManageShow: useStore(uiManagerStore, state => state.TUIManageShow),
98
+ // do not need setMyProfile, because myProfile is read-only and cannot be written
99
+ setActiveContact: useStore(uiManagerStore, state => state.setActiveContact),
100
+ setActiveConversation: useStore(uiManagerStore, state => state.setActiveConversation),
101
+ setTUIProfileShow: useStore(uiManagerStore, state => state.setTUIProfileShow),
102
+ setTUIManageShow: useStore(uiManagerStore, state => state.setTUIManageShow),
103
+ };
104
+ }
105
+ export {
106
+ useUIManagerStore,
107
+ };
108
+ export default uiManagerStore;
@@ -0,0 +1,5 @@
1
+ import { useUIManagerStore } from './UIManagerStore';
2
+
3
+ export {
4
+ useUIManagerStore,
5
+ };
package/.babelrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "presets": [
3
- "@babel/preset-typescript",
4
- "@babel/preset-react",
5
- "@babel/preset-env"
6
- ]
7
- }
package/.editorconfig DELETED
@@ -1,16 +0,0 @@
1
- # top-most EditorConfig file
2
- root = true
3
-
4
- [*]
5
- # Unix-style newlines with a newline ending every file
6
- end_of_line = lf
7
- insert_final_newline = true
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- indent_style = space
11
- indent_size = 2
12
-
13
- [*.{js,ts,css,less,html,json,vue}]
14
-
15
- [*.md]
16
- trim_trailing_whitespace = false
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx lint-staged
@@ -1,6 +0,0 @@
1
- {
2
- "src/**/*.{ts,tsx}": [
3
- "cross-env NODE_ENV=PRE_COMMIT eslint"
4
- ],
5
- "src/**/*.scss": "stylelint"
6
- }
package/.stylelintrc.js DELETED
@@ -1,40 +0,0 @@
1
- module.exports = {
2
- extends: [
3
- 'stylelint-config-standard',
4
- '@stylistic/stylelint-config',
5
- ],
6
- overrides: [
7
- {
8
- files: ['src/**/*.scss'],
9
- extends: ['stylelint-config-recommended-scss'],
10
- },
11
- ],
12
- rules: {
13
- ...getCssRules(),
14
- ...getScssRules(),
15
- ...getStylisticRules(),
16
- },
17
- };
18
-
19
- function getCssRules() {
20
- return {
21
- 'declaration-block-no-redundant-longhand-properties': [
22
- true,
23
- {
24
- ignoreShorthands: ['inset'],
25
- },
26
- ],
27
- 'color-function-notation': 'legacy',
28
- 'property-no-vendor-prefix': null,
29
- 'import-notation': null,
30
- 'selector-class-pattern': null,
31
- };
32
- }
33
-
34
- function getScssRules() {
35
- return {};
36
- }
37
-
38
- function getStylisticRules() {
39
- return {};
40
- }
@@ -1,46 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default, { PropsWithChildren } from 'react';
3
- import { Conversation, Profile, Friend, FriendApplication } from '@tencentcloud/chat';
4
- import { IGroupModel } from '@tencentcloud/chat-uikit-engine';
5
-
6
- type blockData = {
7
- type: 'block';
8
- data: Profile;
9
- };
10
- type friendData = {
11
- type: 'friend';
12
- data: Friend;
13
- };
14
- type friendApplicationData = {
15
- type: 'friendApplication';
16
- data: FriendApplication;
17
- };
18
- type addFriendData = {
19
- type: 'addFriend';
20
- data: Profile;
21
- };
22
- type GroupData = {
23
- type: 'group';
24
- data: IGroupModel;
25
- };
26
- type UseContactParams = blockData | friendData | friendApplicationData | addFriendData | GroupData | undefined;
27
- type UIManagerContextType = {
28
- conversation?: Conversation;
29
- contactData?: UseContactParams;
30
- customClasses?: unknown;
31
- myProfile?: Profile;
32
- TUIManageShow?: boolean;
33
- TUIProfileShow?: boolean;
34
- setTUIManageShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
35
- setTUIProfileShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
36
- setActiveConversation: (conversation?: Conversation) => void;
37
- setActiveContact: (useContactParams?: UseContactParams) => void;
38
- };
39
- type UIManagerProviderProps = {
40
- customClasses: string;
41
- activeConversation: Conversation;
42
- };
43
- declare function UIManagerProvider(props: PropsWithChildren<Partial<UIManagerProviderProps>>): react_jsx_runtime.JSX.Element;
44
- declare const useUIManager: (componentName?: string) => UIManagerContextType;
45
-
46
- export { UIManagerContextType, UIManagerProvider, useUIManager };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("@tencentcloud/chat-uikit-engine"),o=require("./UIKitContext.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(r).default.createContext(null);exports.UIManagerProvider=function(a){a.customClasses;var u=a.activeConversation,s=a.children,c=o.useUIKit().chat,l=r.useState(u),v=l[0],f=l[1],S=r.useState(),I=S[0],d=S[1],U=r.useState(),h=U[0],C=U[1],w=r.useState(!1),g=w[0],P=w[1],m=r.useState(!1),x=m[0],M=m[1];r.useEffect((function(){return n.TUIStore.watch(n.StoreName.USER,{userProfile:N}),n.TUIStore.watch(n.StoreName.CONV,{currentConversation:b}),function(){n.TUIStore.unwatch(n.StoreName.USER,{userProfile:N}),n.TUIStore.unwatch(n.StoreName.CONV,{currentConversation:b})}}),[]);var T=r.useCallback((function(e){e&&(null==c||c.setMessageRead({conversationID:e.conversationID})),(null==e?void 0:e.conversationID)!==(null==v?void 0:v.conversationID)&&P(!1),f(e)}),[]);function N(e){C(e)}function b(e){T(null==e?void 0:e.getConversation())}var j={conversation:v,contactData:I,setActiveConversation:T,myProfile:h,TUIManageShow:g,setTUIManageShow:P,TUIProfileShow:x,setTUIProfileShow:M,setActiveContact:function(e){d(e)}};return t.jsx(i.Provider,e.__assign({value:j},{children:s}))},exports.useUIManager=function(e){var t=r.useContext(i);if(!t)throw new Error("useUIManager must be used within a UIManagerProvider");return t};
@@ -1,6 +0,0 @@
1
- import i18next from 'i18next';
2
- export { default as i18next } from 'i18next';
3
-
4
- declare const t: i18next.TFunction<["translation", ...string[]], undefined>;
5
-
6
- export { t };
@@ -1,46 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default, { PropsWithChildren } from 'react';
3
- import { Conversation, Profile, Friend, FriendApplication } from '@tencentcloud/chat';
4
- import { IGroupModel } from '@tencentcloud/chat-uikit-engine';
5
-
6
- type blockData = {
7
- type: 'block';
8
- data: Profile;
9
- };
10
- type friendData = {
11
- type: 'friend';
12
- data: Friend;
13
- };
14
- type friendApplicationData = {
15
- type: 'friendApplication';
16
- data: FriendApplication;
17
- };
18
- type addFriendData = {
19
- type: 'addFriend';
20
- data: Profile;
21
- };
22
- type GroupData = {
23
- type: 'group';
24
- data: IGroupModel;
25
- };
26
- type UseContactParams = blockData | friendData | friendApplicationData | addFriendData | GroupData | undefined;
27
- type UIManagerContextType = {
28
- conversation?: Conversation;
29
- contactData?: UseContactParams;
30
- customClasses?: unknown;
31
- myProfile?: Profile;
32
- TUIManageShow?: boolean;
33
- TUIProfileShow?: boolean;
34
- setTUIManageShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
35
- setTUIProfileShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
36
- setActiveConversation: (conversation?: Conversation) => void;
37
- setActiveContact: (useContactParams?: UseContactParams) => void;
38
- };
39
- type UIManagerProviderProps = {
40
- customClasses: string;
41
- activeConversation: Conversation;
42
- };
43
- declare function UIManagerProvider(props: PropsWithChildren<Partial<UIManagerProviderProps>>): react_jsx_runtime.JSX.Element;
44
- declare const useUIManager: (componentName?: string) => UIManagerContextType;
45
-
46
- export { UIManagerContextType, UIManagerProvider, useUIManager };
@@ -1 +0,0 @@
1
- import{__assign as t}from"tslib";import{jsx as n}from"react/jsx-runtime";import o,{useState as e,useEffect as r,useCallback as i,useContext as a}from"react";import{TUIStore as c,StoreName as u}from"@tencentcloud/chat-uikit-engine";import{useUIKit as s}from"./UIKitContext.js";var v=o.createContext(null);function l(o){o.customClasses;var a=o.activeConversation,l=o.children,f=s().chat,h=e(a),m=h[0],w=h[1],C=e(),I=C[0],d=C[1],U=e(),g=U[0],P=U[1],p=e(!1),S=p[0],D=p[1],M=e(!1),x=M[0],T=M[1];r((function(){return c.watch(u.USER,{userProfile:R}),c.watch(u.CONV,{currentConversation:b}),function(){c.unwatch(u.USER,{userProfile:R}),c.unwatch(u.CONV,{currentConversation:b})}}),[]);var E=i((function(t){t&&(null==f||f.setMessageRead({conversationID:t.conversationID})),(null==t?void 0:t.conversationID)!==(null==m?void 0:m.conversationID)&&D(!1),w(t)}),[]);function R(t){P(t)}function b(t){E(null==t?void 0:t.getConversation())}var j={conversation:m,contactData:I,setActiveConversation:E,myProfile:g,TUIManageShow:S,setTUIManageShow:D,TUIProfileShow:x,setTUIProfileShow:T,setActiveContact:function(t){d(t)}};return n(v.Provider,t({value:j},{children:l}))}var f=function(t){var n=a(v);if(!n)throw new Error("useUIManager must be used within a UIManagerProvider");return n};export{l as UIManagerProvider,f as useUIManager};
@@ -1,6 +0,0 @@
1
- import i18next from 'i18next';
2
- export { default as i18next } from 'i18next';
3
-
4
- declare const t: i18next.TFunction<["translation", ...string[]], undefined>;
5
-
6
- export { t };
package/rollup.config.js DELETED
@@ -1,81 +0,0 @@
1
- import { babel } from '@rollup/plugin-babel';
2
- import resolve from '@rollup/plugin-node-resolve';
3
- import typescript from '@rollup/plugin-typescript';
4
- import commonjs from '@rollup/plugin-commonjs';
5
- import dts from 'rollup-plugin-dts';
6
- import { terser } from 'rollup-plugin-terser';
7
- import postcss from 'rollup-plugin-postcss';
8
- import autoprefixer from 'autoprefixer';
9
- import peerDepsExternal from 'rollup-plugin-peer-deps-external';
10
- import url from '@rollup/plugin-url';
11
- import copy from 'rollup-plugin-copy';
12
-
13
- export default [
14
- {
15
- ...getBaseConfig(),
16
- plugins: [
17
- url(),
18
- postcss({
19
- extract: true,
20
- minimize: true,
21
- plugins: [
22
- autoprefixer(),
23
- ],
24
- }),
25
- copy({
26
- targets: [{
27
- src: [
28
- 'src/assets/fonts/iconfont.ttf',
29
- 'src/assets/fonts/iconfont.woff',
30
- 'src/assets/fonts/iconfont.woff2',
31
- ],
32
- dest: ['dist/cjs/assets/fonts', 'dist/esm/assets/fonts'],
33
- }],
34
- }),
35
- peerDepsExternal(),
36
- resolve(),
37
- commonjs(),
38
- typescript(),
39
- babel({
40
- extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.tsx'],
41
- }),
42
- terser(),
43
- ],
44
- external: ['react', 'date-fns', 'tslib', 'react-date-picker', 'i18next', 'react-i18next', '@tencentcloud/tui-core',
45
- '@tencentcloud/chat', '@tencentcloud/chat-uikit-engine', '@tencentcloud/universal-api', '@tencentcloud/call-uikit-react', 'classnames'],
46
- },
47
- {
48
- ...getBaseConfig(),
49
- plugins: [
50
- postcss({
51
- extract: true,
52
- plugins: [],
53
- }),
54
- dts(),
55
- ],
56
- },
57
- ];
58
-
59
- function getBaseConfig() {
60
- return {
61
- input: [
62
- './src/index.ts',
63
- ],
64
- output: [
65
- {
66
- preserveModules: true,
67
- preserveModulesRoot: './src',
68
- dir: './dist/esm/',
69
- format: 'esm',
70
- },
71
- {
72
- preserveModules: true,
73
- preserveModulesRoot: './src',
74
- dir: './dist/cjs/',
75
- format: 'cjs',
76
- exports: 'auto',
77
- // sourcemap: true,
78
- },
79
- ],
80
- };
81
- }
@@ -1,22 +0,0 @@
1
- // npm publish
2
- const fs = require('fs');
3
- const path = require('path');
4
- const os = require('os');
5
-
6
- let npmToken = '';
7
- const myArgs = process.argv.slice(2);
8
- myArgs.forEach((arg) => {
9
- if (arg.includes('=')) {
10
- const [key, value] = arg.split('=');
11
- if (key === 'npmToken' && value) {
12
- npmToken = value;
13
- }
14
- }
15
- });
16
- if (!npmToken) {
17
- console.log('not publish npmToken, cant publish npm');
18
- } else {
19
- fs.writeFileSync(path.resolve(os.homedir(), '.npmrc'), `//registry.npmjs.org/:_authToken=${npmToken}`);
20
- const content = fs.readFileSync(path.resolve(os.homedir(), '.npmrc'), { encoding: 'utf8' });
21
- console.log('content: ', content);
22
- }