@sendbird/uikit-react 3.7.0 → 3.8.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 (1485) hide show
  1. package/App.js +287 -555
  2. package/App.js.map +1 -1
  3. package/CHANGELOG.md +25 -0
  4. package/Channel/components/ChannelHeader.js +50 -96
  5. package/Channel/components/ChannelHeader.js.map +1 -1
  6. package/Channel/components/ChannelUI.js +80 -123
  7. package/Channel/components/ChannelUI.js.map +1 -1
  8. package/Channel/components/FileViewer.js +72 -141
  9. package/Channel/components/FileViewer.js.map +1 -1
  10. package/Channel/components/FrozenNotification.js +10 -15
  11. package/Channel/components/FrozenNotification.js.map +1 -1
  12. package/Channel/components/Message.js +276 -377
  13. package/Channel/components/Message.js.map +1 -1
  14. package/Channel/components/MessageInput.js +171 -237
  15. package/Channel/components/MessageInput.js.map +1 -1
  16. package/Channel/components/MessageList.js +225 -312
  17. package/Channel/components/MessageList.js.map +1 -1
  18. package/Channel/components/RemoveMessageModal.js +38 -50
  19. package/Channel/components/RemoveMessageModal.js.map +1 -1
  20. package/Channel/components/SuggestedMentionList.js +142 -263
  21. package/Channel/components/SuggestedMentionList.js.map +1 -1
  22. package/Channel/components/TypingIndicator.js +73 -79
  23. package/Channel/components/TypingIndicator.js.map +1 -1
  24. package/Channel/components/UnreadCount.js +27 -31
  25. package/Channel/components/UnreadCount.js.map +1 -1
  26. package/Channel/context.js +16 -15
  27. package/Channel/context.js.map +1 -1
  28. package/Channel/hooks/useInitialMessagesFetch.js +109 -0
  29. package/Channel/hooks/useInitialMessagesFetch.js.map +1 -0
  30. package/Channel/utils/compareMessagesForGrouping.js +19 -16
  31. package/Channel/utils/compareMessagesForGrouping.js.map +1 -1
  32. package/Channel/utils/getMessagePartsInfo.js +26 -37
  33. package/Channel/utils/getMessagePartsInfo.js.map +1 -1
  34. package/Channel.js +51 -95
  35. package/Channel.js.map +1 -1
  36. package/ChannelList/components/AddChannel.js +32 -51
  37. package/ChannelList/components/AddChannel.js.map +1 -1
  38. package/ChannelList/components/ChannelListHeader.js +29 -56
  39. package/ChannelList/components/ChannelListHeader.js.map +1 -1
  40. package/ChannelList/components/ChannelListUI.js +101 -158
  41. package/ChannelList/components/ChannelListUI.js.map +1 -1
  42. package/ChannelList/components/ChannelPreview.js +101 -166
  43. package/ChannelList/components/ChannelPreview.js.map +1 -1
  44. package/ChannelList/components/ChannelPreviewAction.js +52 -110
  45. package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
  46. package/ChannelList/context.js +8 -8
  47. package/ChannelList.js +35 -58
  48. package/ChannelList.js.map +1 -1
  49. package/ChannelSettings/components/ChannelProfile.js +45 -77
  50. package/ChannelSettings/components/ChannelProfile.js.map +1 -1
  51. package/ChannelSettings/components/ChannelSettingsUI.js +78 -110
  52. package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
  53. package/ChannelSettings/components/EditDetailsModal.js +79 -133
  54. package/ChannelSettings/components/EditDetailsModal.js.map +1 -1
  55. package/ChannelSettings/components/LeaveChannel.js +53 -80
  56. package/ChannelSettings/components/LeaveChannel.js.map +1 -1
  57. package/ChannelSettings/components/ModerationPanel.js +412 -790
  58. package/ChannelSettings/components/ModerationPanel.js.map +1 -1
  59. package/ChannelSettings/components/UserListItem.js +44 -88
  60. package/ChannelSettings/components/UserListItem.js.map +1 -1
  61. package/ChannelSettings/components/UserPanel.js +37 -56
  62. package/ChannelSettings/components/UserPanel.js.map +1 -1
  63. package/ChannelSettings/context.js +62 -84
  64. package/ChannelSettings/context.js.map +1 -1
  65. package/ChannelSettings.js +19 -37
  66. package/ChannelSettings.js.map +1 -1
  67. package/CreateChannel/components/CreateChannelUI.js +22 -32
  68. package/CreateChannel/components/CreateChannelUI.js.map +1 -1
  69. package/CreateChannel/components/InviteUsers.js +142 -179
  70. package/CreateChannel/components/InviteUsers.js.map +1 -1
  71. package/CreateChannel/components/SelectChannelType.js +64 -113
  72. package/CreateChannel/components/SelectChannelType.js.map +1 -1
  73. package/CreateChannel/context.js +3 -3
  74. package/CreateChannel.js +17 -32
  75. package/CreateChannel.js.map +1 -1
  76. package/CreateOpenChannel/components/CreateOpenChannelUI.js +51 -108
  77. package/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
  78. package/CreateOpenChannel/context.js +42 -51
  79. package/CreateOpenChannel/context.js.map +1 -1
  80. package/CreateOpenChannel.js +15 -31
  81. package/CreateOpenChannel.js.map +1 -1
  82. package/EditUserProfile/components/EditUserProfileUI.js +81 -142
  83. package/EditUserProfile/components/EditUserProfileUI.js.map +1 -1
  84. package/EditUserProfile/context.js +13 -20
  85. package/EditUserProfile/context.js.map +1 -1
  86. package/EditUserProfile.js +15 -24
  87. package/EditUserProfile.js.map +1 -1
  88. package/Message/context.js +21 -24
  89. package/Message/context.js.map +1 -1
  90. package/Message/hooks/useDirtyGetMentions.js +52 -63
  91. package/Message/hooks/useDirtyGetMentions.js.map +1 -1
  92. package/MessageSearch/components/MessageSearchUI.js +71 -123
  93. package/MessageSearch/components/MessageSearchUI.js.map +1 -1
  94. package/MessageSearch/context.js +237 -339
  95. package/MessageSearch/context.js.map +1 -1
  96. package/MessageSearch.js +57 -120
  97. package/MessageSearch.js.map +1 -1
  98. package/OpenChannel/components/FrozenChannelNotification.js +9 -13
  99. package/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
  100. package/OpenChannel/components/OpenChannelHeader.js +31 -72
  101. package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
  102. package/OpenChannel/components/OpenChannelInput.js +40 -58
  103. package/OpenChannel/components/OpenChannelInput.js.map +1 -1
  104. package/OpenChannel/components/OpenChannelMessage.js +157 -245
  105. package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
  106. package/OpenChannel/components/OpenChannelMessageList.js +84 -119
  107. package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
  108. package/OpenChannel/components/OpenChannelUI.js +59 -81
  109. package/OpenChannel/components/OpenChannelUI.js.map +1 -1
  110. package/OpenChannel/context.js +7 -7
  111. package/OpenChannel.js +36 -56
  112. package/OpenChannel.js.map +1 -1
  113. package/OpenChannelList/components/OpenChannelListUI.js +91 -164
  114. package/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
  115. package/OpenChannelList/components/OpenChannelPreview.js +19 -58
  116. package/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
  117. package/OpenChannelList/context.js +2 -2
  118. package/OpenChannelList.js +21 -40
  119. package/OpenChannelList.js.map +1 -1
  120. package/OpenChannelSettings/components/EditDetailsModal.js +69 -123
  121. package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
  122. package/OpenChannelSettings/components/OpenChannelProfile.js +34 -60
  123. package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
  124. package/OpenChannelSettings/components/OpenChannelSettingsUI.js +52 -84
  125. package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
  126. package/OpenChannelSettings/components/OperatorUI.js +454 -828
  127. package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
  128. package/OpenChannelSettings/components/ParticipantUI.js +15 -18
  129. package/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
  130. package/OpenChannelSettings/context.js +115 -125
  131. package/OpenChannelSettings/context.js.map +1 -1
  132. package/OpenChannelSettings.js +20 -33
  133. package/OpenChannelSettings.js.map +1 -1
  134. package/README.md +0 -10
  135. package/SendbirdProvider.js +1000 -1235
  136. package/SendbirdProvider.js.map +1 -1
  137. package/Thread/components/ParentMessageInfo.js +194 -348
  138. package/Thread/components/ParentMessageInfo.js.map +1 -1
  139. package/Thread/components/ParentMessageInfoItem.js +104 -195
  140. package/Thread/components/ParentMessageInfoItem.js.map +1 -1
  141. package/Thread/components/ThreadHeader.js +23 -51
  142. package/Thread/components/ThreadHeader.js.map +1 -1
  143. package/Thread/components/ThreadList.js +114 -150
  144. package/Thread/components/ThreadList.js.map +1 -1
  145. package/Thread/components/ThreadListItem.js +268 -528
  146. package/Thread/components/ThreadListItem.js.map +1 -1
  147. package/Thread/components/ThreadMessageInput.js +153 -211
  148. package/Thread/components/ThreadMessageInput.js.map +1 -1
  149. package/Thread/components/ThreadUI.js +192 -268
  150. package/Thread/components/ThreadUI.js.map +1 -1
  151. package/Thread/context/types.js +21 -21
  152. package/Thread/context/types.js.map +1 -1
  153. package/Thread/context.js +1201 -1632
  154. package/Thread/context.js.map +1 -1
  155. package/Thread.js +59 -98
  156. package/Thread.js.map +1 -1
  157. package/VoicePlayer/context.js +3 -3
  158. package/VoicePlayer/useVoicePlayer.js +56 -77
  159. package/VoicePlayer/useVoicePlayer.js.map +1 -1
  160. package/VoiceRecorder/context.js +121 -151
  161. package/VoiceRecorder/context.js.map +1 -1
  162. package/VoiceRecorder/useVoiceRecorder.js +95 -108
  163. package/VoiceRecorder/useVoiceRecorder.js.map +1 -1
  164. package/{consts-57c888b9.js → chunks/bundle--F_1NyoU.js} +1 -1
  165. package/chunks/bundle--F_1NyoU.js.map +1 -0
  166. package/chunks/bundle-1P01-roD.js +277 -0
  167. package/chunks/bundle-1P01-roD.js.map +1 -0
  168. package/{index-682a192c.js → chunks/bundle-3mdR5HDw.js} +4 -2
  169. package/chunks/bundle-3mdR5HDw.js.map +1 -0
  170. package/chunks/bundle-53PRRrlp.js +230 -0
  171. package/chunks/bundle-53PRRrlp.js.map +1 -0
  172. package/{resolvedReplyType-fb987595.js → chunks/bundle-5iuNyt5M.js} +27 -27
  173. package/chunks/bundle-5iuNyt5M.js.map +1 -0
  174. package/chunks/bundle-5yKxJk_M.js +213 -0
  175. package/chunks/bundle-5yKxJk_M.js.map +1 -0
  176. package/chunks/bundle-7FyFbzI4.js +31 -0
  177. package/chunks/bundle-7FyFbzI4.js.map +1 -0
  178. package/chunks/bundle-8zJE_DCx.js +24 -0
  179. package/chunks/bundle-8zJE_DCx.js.map +1 -0
  180. package/{index-09847c0f.js → chunks/bundle-9KsbryQI.js} +1 -1
  181. package/chunks/bundle-9KsbryQI.js.map +1 -0
  182. package/{const-73db0277.js → chunks/bundle-AI8e02c3.js} +10 -10
  183. package/chunks/bundle-AI8e02c3.js.map +1 -0
  184. package/chunks/bundle-ANPmLOz8.js +173 -0
  185. package/chunks/bundle-ANPmLOz8.js.map +1 -0
  186. package/chunks/bundle-Ael7hqI7.js +227 -0
  187. package/chunks/bundle-Ael7hqI7.js.map +1 -0
  188. package/chunks/bundle-EHReigfD.js +657 -0
  189. package/chunks/bundle-EHReigfD.js.map +1 -0
  190. package/{index-e4277f9c.js → chunks/bundle-FTgSGiKe.js} +42 -15
  191. package/chunks/bundle-FTgSGiKe.js.map +1 -0
  192. package/chunks/bundle-H2I60B2B.js +12 -0
  193. package/chunks/bundle-H2I60B2B.js.map +1 -0
  194. package/chunks/bundle-LUte5Kb5.js +1594 -0
  195. package/chunks/bundle-LUte5Kb5.js.map +1 -0
  196. package/chunks/bundle-M2ljBW6p.js +69 -0
  197. package/chunks/bundle-M2ljBW6p.js.map +1 -0
  198. package/chunks/bundle-NCqCEOuY.js +355 -0
  199. package/chunks/bundle-NCqCEOuY.js.map +1 -0
  200. package/chunks/bundle-PgBVk3py.js +1455 -0
  201. package/chunks/bundle-PgBVk3py.js.map +1 -0
  202. package/chunks/bundle-Q8dtkDOa.js +8 -0
  203. package/chunks/bundle-Q8dtkDOa.js.map +1 -0
  204. package/chunks/bundle-TZXZa-F1.js +226 -0
  205. package/chunks/bundle-TZXZa-F1.js.map +1 -0
  206. package/{consts-d9c5f25a.js → chunks/bundle-WCTKBopn.js} +28 -28
  207. package/chunks/bundle-WCTKBopn.js.map +1 -0
  208. package/chunks/bundle-YEttY5xG.js +26 -0
  209. package/chunks/bundle-YEttY5xG.js.map +1 -0
  210. package/chunks/bundle-Zl1hrCWc.js +36 -0
  211. package/chunks/bundle-Zl1hrCWc.js.map +1 -0
  212. package/chunks/bundle-ZmvX8uZ5.js +163 -0
  213. package/chunks/bundle-ZmvX8uZ5.js.map +1 -0
  214. package/chunks/bundle-_YRJ7d9_.js +827 -0
  215. package/chunks/bundle-_YRJ7d9_.js.map +1 -0
  216. package/chunks/bundle-_qiqf8_l.js +14 -0
  217. package/chunks/bundle-_qiqf8_l.js.map +1 -0
  218. package/chunks/bundle-bJrywUB-.js +233 -0
  219. package/chunks/bundle-bJrywUB-.js.map +1 -0
  220. package/{uuid-c15b8b3b.js → chunks/bundle-bofQNMJb.js} +11 -13
  221. package/chunks/bundle-bofQNMJb.js.map +1 -0
  222. package/chunks/bundle-btDN-R-c.js +77 -0
  223. package/chunks/bundle-btDN-R-c.js.map +1 -0
  224. package/chunks/bundle-cviP1IM2.js +132 -0
  225. package/chunks/bundle-cviP1IM2.js.map +1 -0
  226. package/{index-f8a9cb51.js → chunks/bundle-dLuEa16_.js} +12 -3
  227. package/chunks/bundle-dLuEa16_.js.map +1 -0
  228. package/chunks/bundle-ftY5T58h.js +96 -0
  229. package/chunks/bundle-ftY5T58h.js.map +1 -0
  230. package/{index-2d27aeef.js → chunks/bundle-h3JIYRTG.js} +202 -64
  231. package/chunks/bundle-h3JIYRTG.js.map +1 -0
  232. package/{tslib.es6-c2fb729e.js → chunks/bundle-hKtwSqbO.js} +2 -2
  233. package/chunks/bundle-hKtwSqbO.js.map +1 -0
  234. package/chunks/bundle-hjECCUV3.js +25 -0
  235. package/chunks/bundle-hjECCUV3.js.map +1 -0
  236. package/{consts-be37687e.js → chunks/bundle-khKXutc3.js} +1 -1
  237. package/chunks/bundle-khKXutc3.js.map +1 -0
  238. package/{consts-4ec7d640.js → chunks/bundle-kp1MMNMf.js} +1 -1
  239. package/chunks/bundle-kp1MMNMf.js.map +1 -0
  240. package/chunks/bundle-mL_86Tua.js +28 -0
  241. package/chunks/bundle-mL_86Tua.js.map +1 -0
  242. package/{types-781e0bab.js → chunks/bundle-mpeh7m6z.js} +6 -6
  243. package/chunks/bundle-mpeh7m6z.js.map +1 -0
  244. package/chunks/bundle-prRsVvhT.js +98 -0
  245. package/chunks/bundle-prRsVvhT.js.map +1 -0
  246. package/chunks/bundle-qst5L6aH.js +55 -0
  247. package/chunks/bundle-qst5L6aH.js.map +1 -0
  248. package/chunks/bundle-qunsoajv.js +211 -0
  249. package/chunks/bundle-qunsoajv.js.map +1 -0
  250. package/chunks/bundle-rLxuFUa1.js +62 -0
  251. package/chunks/bundle-rLxuFUa1.js.map +1 -0
  252. package/chunks/bundle-rYAZn3lj.js +125 -0
  253. package/chunks/bundle-rYAZn3lj.js.map +1 -0
  254. package/chunks/bundle-r_VxbiS3.js +36 -0
  255. package/chunks/bundle-r_VxbiS3.js.map +1 -0
  256. package/chunks/bundle-sOjc_nNQ.js +18 -0
  257. package/chunks/bundle-sOjc_nNQ.js.map +1 -0
  258. package/chunks/bundle-ubky9D9H.js +24 -0
  259. package/chunks/bundle-ubky9D9H.js.map +1 -0
  260. package/chunks/bundle-v0OWADVv.js +16 -0
  261. package/chunks/bundle-v0OWADVv.js.map +1 -0
  262. package/chunks/bundle-v9a1_z0P.js +5 -0
  263. package/chunks/bundle-v9a1_z0P.js.map +1 -0
  264. package/chunks/bundle-vnmGzWMt.js +222 -0
  265. package/chunks/bundle-vnmGzWMt.js.map +1 -0
  266. package/chunks/bundle-w2v7oZ9G.js +72 -0
  267. package/chunks/bundle-w2v7oZ9G.js.map +1 -0
  268. package/chunks/bundle-w9T6A0ez.js +176 -0
  269. package/chunks/bundle-w9T6A0ez.js.map +1 -0
  270. package/chunks/bundle-wMgBBDf9.js +78 -0
  271. package/chunks/bundle-wMgBBDf9.js.map +1 -0
  272. package/chunks/bundle-x-4ukZm_.js +76 -0
  273. package/chunks/bundle-x-4ukZm_.js.map +1 -0
  274. package/chunks/bundle-zLBuOeRY.js +131 -0
  275. package/chunks/bundle-zLBuOeRY.js.map +1 -0
  276. package/chunks/bundle-zoxfINxQ.js +16 -0
  277. package/chunks/bundle-zoxfINxQ.js.map +1 -0
  278. package/cjs/App.js +287 -559
  279. package/cjs/App.js.map +1 -1
  280. package/cjs/Channel/components/ChannelHeader.js +50 -100
  281. package/cjs/Channel/components/ChannelHeader.js.map +1 -1
  282. package/cjs/Channel/components/ChannelUI.js +80 -127
  283. package/cjs/Channel/components/ChannelUI.js.map +1 -1
  284. package/cjs/Channel/components/FileViewer.js +73 -146
  285. package/cjs/Channel/components/FileViewer.js.map +1 -1
  286. package/cjs/Channel/components/FrozenNotification.js +10 -19
  287. package/cjs/Channel/components/FrozenNotification.js.map +1 -1
  288. package/cjs/Channel/components/Message.js +275 -380
  289. package/cjs/Channel/components/Message.js.map +1 -1
  290. package/cjs/Channel/components/MessageInput.js +171 -241
  291. package/cjs/Channel/components/MessageInput.js.map +1 -1
  292. package/cjs/Channel/components/MessageList.js +225 -316
  293. package/cjs/Channel/components/MessageList.js.map +1 -1
  294. package/cjs/Channel/components/RemoveMessageModal.js +38 -54
  295. package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
  296. package/cjs/Channel/components/SuggestedMentionList.js +142 -267
  297. package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
  298. package/cjs/Channel/components/TypingIndicator.js +73 -83
  299. package/cjs/Channel/components/TypingIndicator.js.map +1 -1
  300. package/cjs/Channel/components/UnreadCount.js +26 -34
  301. package/cjs/Channel/components/UnreadCount.js.map +1 -1
  302. package/cjs/Channel/context.js +16 -17
  303. package/cjs/Channel/context.js.map +1 -1
  304. package/cjs/Channel/hooks/useInitialMessagesFetch.js +111 -0
  305. package/cjs/Channel/hooks/useInitialMessagesFetch.js.map +1 -0
  306. package/cjs/Channel/utils/compareMessagesForGrouping.js +19 -18
  307. package/cjs/Channel/utils/compareMessagesForGrouping.js.map +1 -1
  308. package/cjs/Channel/utils/getMessagePartsInfo.js +26 -39
  309. package/cjs/Channel/utils/getMessagePartsInfo.js.map +1 -1
  310. package/cjs/Channel.js +51 -99
  311. package/cjs/Channel.js.map +1 -1
  312. package/cjs/ChannelList/components/AddChannel.js +33 -56
  313. package/cjs/ChannelList/components/AddChannel.js.map +1 -1
  314. package/cjs/ChannelList/components/ChannelListHeader.js +29 -60
  315. package/cjs/ChannelList/components/ChannelListHeader.js.map +1 -1
  316. package/cjs/ChannelList/components/ChannelListUI.js +101 -162
  317. package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
  318. package/cjs/ChannelList/components/ChannelPreview.js +101 -170
  319. package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
  320. package/cjs/ChannelList/components/ChannelPreviewAction.js +52 -114
  321. package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
  322. package/cjs/ChannelList/context.js +8 -10
  323. package/cjs/ChannelList/context.js.map +1 -1
  324. package/cjs/ChannelList.js +35 -62
  325. package/cjs/ChannelList.js.map +1 -1
  326. package/cjs/ChannelSettings/components/ChannelProfile.js +45 -81
  327. package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
  328. package/cjs/ChannelSettings/components/ChannelSettingsUI.js +78 -114
  329. package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
  330. package/cjs/ChannelSettings/components/EditDetailsModal.js +79 -137
  331. package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
  332. package/cjs/ChannelSettings/components/LeaveChannel.js +53 -84
  333. package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
  334. package/cjs/ChannelSettings/components/ModerationPanel.js +411 -793
  335. package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
  336. package/cjs/ChannelSettings/components/UserListItem.js +44 -92
  337. package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
  338. package/cjs/ChannelSettings/components/UserPanel.js +37 -60
  339. package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
  340. package/cjs/ChannelSettings/context.js +62 -90
  341. package/cjs/ChannelSettings/context.js.map +1 -1
  342. package/cjs/ChannelSettings.js +19 -41
  343. package/cjs/ChannelSettings.js.map +1 -1
  344. package/cjs/CreateChannel/components/CreateChannelUI.js +22 -36
  345. package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
  346. package/cjs/CreateChannel/components/InviteUsers.js +142 -183
  347. package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
  348. package/cjs/CreateChannel/components/SelectChannelType.js +64 -117
  349. package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
  350. package/cjs/CreateChannel/context.js +3 -5
  351. package/cjs/CreateChannel/context.js.map +1 -1
  352. package/cjs/CreateChannel.js +17 -36
  353. package/cjs/CreateChannel.js.map +1 -1
  354. package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +51 -112
  355. package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
  356. package/cjs/CreateOpenChannel/context.js +42 -57
  357. package/cjs/CreateOpenChannel/context.js.map +1 -1
  358. package/cjs/CreateOpenChannel.js +15 -35
  359. package/cjs/CreateOpenChannel.js.map +1 -1
  360. package/cjs/EditUserProfile/components/EditUserProfileUI.js +81 -146
  361. package/cjs/EditUserProfile/components/EditUserProfileUI.js.map +1 -1
  362. package/cjs/EditUserProfile/context.js +13 -26
  363. package/cjs/EditUserProfile/context.js.map +1 -1
  364. package/cjs/EditUserProfile.js +15 -28
  365. package/cjs/EditUserProfile.js.map +1 -1
  366. package/cjs/Message/context.js +21 -30
  367. package/cjs/Message/context.js.map +1 -1
  368. package/cjs/Message/hooks/useDirtyGetMentions.js +52 -65
  369. package/cjs/Message/hooks/useDirtyGetMentions.js.map +1 -1
  370. package/cjs/MessageSearch/components/MessageSearchUI.js +72 -128
  371. package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
  372. package/cjs/MessageSearch/context.js +237 -345
  373. package/cjs/MessageSearch/context.js.map +1 -1
  374. package/cjs/MessageSearch.js +57 -124
  375. package/cjs/MessageSearch.js.map +1 -1
  376. package/cjs/OpenChannel/components/FrozenChannelNotification.js +9 -17
  377. package/cjs/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
  378. package/cjs/OpenChannel/components/OpenChannelHeader.js +31 -76
  379. package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
  380. package/cjs/OpenChannel/components/OpenChannelInput.js +40 -62
  381. package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
  382. package/cjs/OpenChannel/components/OpenChannelMessage.js +157 -249
  383. package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
  384. package/cjs/OpenChannel/components/OpenChannelMessageList.js +84 -123
  385. package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
  386. package/cjs/OpenChannel/components/OpenChannelUI.js +59 -85
  387. package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
  388. package/cjs/OpenChannel/context.js +7 -9
  389. package/cjs/OpenChannel/context.js.map +1 -1
  390. package/cjs/OpenChannel.js +36 -60
  391. package/cjs/OpenChannel.js.map +1 -1
  392. package/cjs/OpenChannelList/components/OpenChannelListUI.js +91 -168
  393. package/cjs/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
  394. package/cjs/OpenChannelList/components/OpenChannelPreview.js +19 -62
  395. package/cjs/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
  396. package/cjs/OpenChannelList/context.js +3 -3
  397. package/cjs/OpenChannelList.js +21 -44
  398. package/cjs/OpenChannelList.js.map +1 -1
  399. package/cjs/OpenChannelSettings/components/EditDetailsModal.js +69 -127
  400. package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
  401. package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +34 -64
  402. package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
  403. package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +52 -88
  404. package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
  405. package/cjs/OpenChannelSettings/components/OperatorUI.js +454 -832
  406. package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
  407. package/cjs/OpenChannelSettings/components/ParticipantUI.js +15 -18
  408. package/cjs/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
  409. package/cjs/OpenChannelSettings/context.js +115 -131
  410. package/cjs/OpenChannelSettings/context.js.map +1 -1
  411. package/cjs/OpenChannelSettings.js +20 -37
  412. package/cjs/OpenChannelSettings.js.map +1 -1
  413. package/cjs/SendbirdProvider.js +1001 -1242
  414. package/cjs/SendbirdProvider.js.map +1 -1
  415. package/cjs/Thread/components/ParentMessageInfo.js +194 -352
  416. package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
  417. package/cjs/Thread/components/ParentMessageInfoItem.js +104 -199
  418. package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
  419. package/cjs/Thread/components/ThreadHeader.js +23 -55
  420. package/cjs/Thread/components/ThreadHeader.js.map +1 -1
  421. package/cjs/Thread/components/ThreadList.js +114 -154
  422. package/cjs/Thread/components/ThreadList.js.map +1 -1
  423. package/cjs/Thread/components/ThreadListItem.js +268 -532
  424. package/cjs/Thread/components/ThreadListItem.js.map +1 -1
  425. package/cjs/Thread/components/ThreadMessageInput.js +153 -215
  426. package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
  427. package/cjs/Thread/components/ThreadUI.js +192 -272
  428. package/cjs/Thread/components/ThreadUI.js.map +1 -1
  429. package/cjs/Thread/context/types.js +21 -23
  430. package/cjs/Thread/context/types.js.map +1 -1
  431. package/cjs/Thread/context.js +1201 -1638
  432. package/cjs/Thread/context.js.map +1 -1
  433. package/cjs/Thread.js +59 -102
  434. package/cjs/Thread.js.map +1 -1
  435. package/cjs/VoicePlayer/context.js +3 -5
  436. package/cjs/VoicePlayer/context.js.map +1 -1
  437. package/cjs/VoicePlayer/useVoicePlayer.js +56 -79
  438. package/cjs/VoicePlayer/useVoicePlayer.js.map +1 -1
  439. package/cjs/VoiceRecorder/context.js +121 -155
  440. package/cjs/VoiceRecorder/context.js.map +1 -1
  441. package/cjs/VoiceRecorder/useVoiceRecorder.js +95 -110
  442. package/cjs/VoiceRecorder/useVoiceRecorder.js.map +1 -1
  443. package/cjs/chunks/bundle-11ybpGNN.js +139 -0
  444. package/cjs/chunks/bundle-11ybpGNN.js.map +1 -0
  445. package/cjs/chunks/bundle-1yOirqug.js +8 -0
  446. package/cjs/chunks/bundle-1yOirqug.js.map +1 -0
  447. package/cjs/{index-3448df64.js → chunks/bundle-28p7K0N-.js} +202 -64
  448. package/cjs/chunks/bundle-28p7K0N-.js.map +1 -0
  449. package/cjs/chunks/bundle-41ZfOrRZ.js +224 -0
  450. package/cjs/chunks/bundle-41ZfOrRZ.js.map +1 -0
  451. package/cjs/chunks/bundle-4DATo50q.js +1598 -0
  452. package/cjs/chunks/bundle-4DATo50q.js.map +1 -0
  453. package/cjs/chunks/bundle-4bb_98h6.js +27 -0
  454. package/cjs/chunks/bundle-4bb_98h6.js.map +1 -0
  455. package/cjs/chunks/bundle-4q81wd8X.js +176 -0
  456. package/cjs/chunks/bundle-4q81wd8X.js.map +1 -0
  457. package/cjs/{index-134e9852.js → chunks/bundle-4rFcKXQa.js} +4 -2
  458. package/cjs/chunks/bundle-4rFcKXQa.js.map +1 -0
  459. package/cjs/chunks/bundle-6OOGDxxE.js +18 -0
  460. package/cjs/chunks/bundle-6OOGDxxE.js.map +1 -0
  461. package/cjs/chunks/bundle-6o4fw0w0.js +234 -0
  462. package/cjs/chunks/bundle-6o4fw0w0.js.map +1 -0
  463. package/cjs/chunks/bundle-6ziaqiUd.js +84 -0
  464. package/cjs/chunks/bundle-6ziaqiUd.js.map +1 -0
  465. package/cjs/chunks/bundle-B2MaAm21.js +28 -0
  466. package/cjs/chunks/bundle-B2MaAm21.js.map +1 -0
  467. package/cjs/chunks/bundle-BJe68nS0.js +236 -0
  468. package/cjs/chunks/bundle-BJe68nS0.js.map +1 -0
  469. package/cjs/chunks/bundle-BN7IOLFq.js +128 -0
  470. package/cjs/chunks/bundle-BN7IOLFq.js.map +1 -0
  471. package/cjs/{index-7627b546.js → chunks/bundle-CUP2x37z.js} +12 -3
  472. package/cjs/chunks/bundle-CUP2x37z.js.map +1 -0
  473. package/cjs/chunks/bundle-DZeKHvMp.js +26 -0
  474. package/cjs/chunks/bundle-DZeKHvMp.js.map +1 -0
  475. package/cjs/chunks/bundle-Dwrq46Xb.js +832 -0
  476. package/cjs/chunks/bundle-Dwrq46Xb.js.map +1 -0
  477. package/cjs/chunks/bundle-ELeM0_1Y.js +10 -0
  478. package/cjs/chunks/bundle-ELeM0_1Y.js.map +1 -0
  479. package/cjs/chunks/bundle-F7GEQVgT.js +1460 -0
  480. package/cjs/chunks/bundle-F7GEQVgT.js.map +1 -0
  481. package/cjs/chunks/bundle-FHx0K-3z.js +707 -0
  482. package/cjs/chunks/bundle-FHx0K-3z.js.map +1 -0
  483. package/cjs/chunks/bundle-FLCJVplO.js +137 -0
  484. package/cjs/chunks/bundle-FLCJVplO.js.map +1 -0
  485. package/cjs/{index-54279ec2.js → chunks/bundle-I_9_5a8a.js} +1 -1
  486. package/cjs/chunks/bundle-I_9_5a8a.js.map +1 -0
  487. package/cjs/chunks/bundle-JggdKsJa.js +181 -0
  488. package/cjs/chunks/bundle-JggdKsJa.js.map +1 -0
  489. package/cjs/{consts-f54b15c2.js → chunks/bundle-L9ushBZQ.js} +27 -27
  490. package/cjs/chunks/bundle-L9ushBZQ.js.map +1 -0
  491. package/cjs/chunks/bundle-P0kNl8GH.js +236 -0
  492. package/cjs/chunks/bundle-P0kNl8GH.js.map +1 -0
  493. package/cjs/{const-c9e7a340.js → chunks/bundle-P_B0eyVT.js} +10 -10
  494. package/cjs/chunks/bundle-P_B0eyVT.js.map +1 -0
  495. package/cjs/chunks/bundle-QfhZ2YNP.js +109 -0
  496. package/cjs/chunks/bundle-QfhZ2YNP.js.map +1 -0
  497. package/cjs/chunks/bundle-QmSa90PC.js +20 -0
  498. package/cjs/chunks/bundle-QmSa90PC.js.map +1 -0
  499. package/cjs/{consts-b711321c.js → chunks/bundle-RaQV-Bpr.js} +1 -1
  500. package/cjs/chunks/bundle-RaQV-Bpr.js.map +1 -0
  501. package/cjs/chunks/bundle-RlFjml8m.js +178 -0
  502. package/cjs/chunks/bundle-RlFjml8m.js.map +1 -0
  503. package/cjs/chunks/bundle-TEIqVGqn.js +75 -0
  504. package/cjs/chunks/bundle-TEIqVGqn.js.map +1 -0
  505. package/cjs/chunks/bundle-UooP2IDU.js +69 -0
  506. package/cjs/chunks/bundle-UooP2IDU.js.map +1 -0
  507. package/cjs/chunks/bundle-Y9TkHVI5.js +79 -0
  508. package/cjs/chunks/bundle-Y9TkHVI5.js.map +1 -0
  509. package/cjs/chunks/bundle-YNHu-c84.js +15 -0
  510. package/cjs/chunks/bundle-YNHu-c84.js.map +1 -0
  511. package/cjs/chunks/bundle-_fjTT1-g.js +279 -0
  512. package/cjs/chunks/bundle-_fjTT1-g.js.map +1 -0
  513. package/cjs/chunks/bundle-b4fiCQuI.js +217 -0
  514. package/cjs/chunks/bundle-b4fiCQuI.js.map +1 -0
  515. package/cjs/chunks/bundle-c6O8NjZI.js +81 -0
  516. package/cjs/chunks/bundle-c6O8NjZI.js.map +1 -0
  517. package/cjs/chunks/bundle-cttYM0DR.js +30 -0
  518. package/cjs/chunks/bundle-cttYM0DR.js.map +1 -0
  519. package/cjs/chunks/bundle-dXhGOQQM.js +22 -0
  520. package/cjs/chunks/bundle-dXhGOQQM.js.map +1 -0
  521. package/cjs/chunks/bundle-e-fvbugV.js +35 -0
  522. package/cjs/chunks/bundle-e-fvbugV.js.map +1 -0
  523. package/cjs/chunks/bundle-e0il9C3T.js +230 -0
  524. package/cjs/chunks/bundle-e0il9C3T.js.map +1 -0
  525. package/cjs/{consts-61d83828.js → chunks/bundle-g0lpRY8_.js} +1 -1
  526. package/cjs/chunks/bundle-g0lpRY8_.js.map +1 -0
  527. package/cjs/{uuid-9a117e16.js → chunks/bundle-gMxOq93o.js} +11 -13
  528. package/cjs/chunks/bundle-gMxOq93o.js.map +1 -0
  529. package/cjs/{consts-b3c4f548.js → chunks/bundle-gS0bojlA.js} +1 -1
  530. package/cjs/chunks/bundle-gS0bojlA.js.map +1 -0
  531. package/cjs/{resolvedReplyType-c4564ebe.js → chunks/bundle-g_OXBrgT.js} +26 -26
  532. package/cjs/chunks/bundle-g_OXBrgT.js.map +1 -0
  533. package/cjs/{tslib.es6-c74b513f.js → chunks/bundle-hK4x7nmG.js} +1 -1
  534. package/cjs/chunks/bundle-hK4x7nmG.js.map +1 -0
  535. package/cjs/chunks/bundle-iwsbhMUN.js +38 -0
  536. package/cjs/chunks/bundle-iwsbhMUN.js.map +1 -0
  537. package/cjs/chunks/bundle-kBUglm2K.js +360 -0
  538. package/cjs/chunks/bundle-kBUglm2K.js.map +1 -0
  539. package/cjs/chunks/bundle-kWUEW1ZN.js +39 -0
  540. package/cjs/chunks/bundle-kWUEW1ZN.js.map +1 -0
  541. package/cjs/{types-feda9656.js → chunks/bundle-lii4Ueh3.js} +6 -6
  542. package/cjs/chunks/bundle-lii4Ueh3.js.map +1 -0
  543. package/cjs/{index-e8928da6.js → chunks/bundle-n1yh-qDb.js} +42 -15
  544. package/cjs/chunks/bundle-n1yh-qDb.js.map +1 -0
  545. package/cjs/chunks/bundle-p1cCW0sH.js +74 -0
  546. package/cjs/chunks/bundle-p1cCW0sH.js.map +1 -0
  547. package/cjs/chunks/bundle-tRBVL0r6.js +99 -0
  548. package/cjs/chunks/bundle-tRBVL0r6.js.map +1 -0
  549. package/cjs/chunks/bundle-tmB_l3Q9.js +16 -0
  550. package/cjs/chunks/bundle-tmB_l3Q9.js.map +1 -0
  551. package/cjs/chunks/bundle-tywVawyg.js +79 -0
  552. package/cjs/chunks/bundle-tywVawyg.js.map +1 -0
  553. package/cjs/chunks/bundle-z-Bvsn0B.js +215 -0
  554. package/cjs/chunks/bundle-z-Bvsn0B.js.map +1 -0
  555. package/cjs/chunks/bundle-zr9ZXBrm.js +27 -0
  556. package/cjs/chunks/bundle-zr9ZXBrm.js.map +1 -0
  557. package/cjs/handlers/OpenChannelHandler.js +2 -2
  558. package/cjs/handlers/OpenChannelHandler.js.map +1 -1
  559. package/cjs/handlers/SessionHandler.js +2 -2
  560. package/cjs/handlers/SessionHandler.js.map +1 -1
  561. package/cjs/hooks/useModal.js +47 -72
  562. package/cjs/hooks/useModal.js.map +1 -1
  563. package/cjs/index.js +59 -63
  564. package/cjs/index.js.map +1 -1
  565. package/cjs/lame.all.js +14799 -681
  566. package/cjs/lame.all.js.map +1 -1
  567. package/cjs/package.json +1 -3
  568. package/cjs/pubSub/topics.js +15 -15
  569. package/cjs/pubSub/topics.js.map +1 -1
  570. package/cjs/sendbirdSelectors.js +535 -618
  571. package/cjs/sendbirdSelectors.js.map +1 -1
  572. package/cjs/ui/Accordion.js +40 -57
  573. package/cjs/ui/Accordion.js.map +1 -1
  574. package/cjs/ui/AccordionGroup.js +9 -22
  575. package/cjs/ui/AccordionGroup.js.map +1 -1
  576. package/cjs/ui/AdminMessage.js +13 -23
  577. package/cjs/ui/AdminMessage.js.map +1 -1
  578. package/cjs/ui/Avatar.js +70 -194
  579. package/cjs/ui/Avatar.js.map +1 -1
  580. package/cjs/ui/Badge.js +18 -26
  581. package/cjs/ui/Badge.js.map +1 -1
  582. package/cjs/ui/BottomSheet.js +28 -38
  583. package/cjs/ui/BottomSheet.js.map +1 -1
  584. package/cjs/ui/Button.js +41 -63
  585. package/cjs/ui/Button.js.map +1 -1
  586. package/cjs/ui/ChannelAvatar.js +20 -47
  587. package/cjs/ui/ChannelAvatar.js.map +1 -1
  588. package/cjs/ui/Checkbox.js +15 -28
  589. package/cjs/ui/Checkbox.js.map +1 -1
  590. package/cjs/ui/ConnectionStatus.js +11 -22
  591. package/cjs/ui/ConnectionStatus.js.map +1 -1
  592. package/cjs/ui/ContextMenu.js +196 -285
  593. package/cjs/ui/ContextMenu.js.map +1 -1
  594. package/cjs/ui/DateSeparator.js +13 -28
  595. package/cjs/ui/DateSeparator.js.map +1 -1
  596. package/cjs/ui/EmojiReactions.js +142 -329
  597. package/cjs/ui/EmojiReactions.js.map +1 -1
  598. package/cjs/ui/FileMessageItemBody.js +30 -53
  599. package/cjs/ui/FileMessageItemBody.js.map +1 -1
  600. package/cjs/ui/FileViewer.js +18 -17
  601. package/cjs/ui/FileViewer.js.map +1 -1
  602. package/cjs/ui/Icon.js +558 -729
  603. package/cjs/ui/Icon.js.map +1 -1
  604. package/cjs/ui/IconButton.js +18 -49
  605. package/cjs/ui/IconButton.js.map +1 -1
  606. package/cjs/ui/ImageRenderer.js +103 -154
  607. package/cjs/ui/ImageRenderer.js.map +1 -1
  608. package/cjs/ui/Input.js +16 -42
  609. package/cjs/ui/Input.js.map +1 -1
  610. package/cjs/ui/Label.js +4 -4
  611. package/cjs/ui/LinkLabel.js +22 -51
  612. package/cjs/ui/LinkLabel.js.map +1 -1
  613. package/cjs/ui/Loader.js +11 -25
  614. package/cjs/ui/Loader.js.map +1 -1
  615. package/cjs/ui/MentionLabel.js +47 -81
  616. package/cjs/ui/MentionLabel.js.map +1 -1
  617. package/cjs/ui/MentionUserLabel.js +4 -19
  618. package/cjs/ui/MentionUserLabel.js.map +1 -1
  619. package/cjs/ui/MessageContent.js +191 -402
  620. package/cjs/ui/MessageContent.js.map +1 -1
  621. package/cjs/ui/MessageInput/hooks/usePaste.js +6 -6
  622. package/cjs/ui/MessageInput.js +447 -625
  623. package/cjs/ui/MessageInput.js.map +1 -1
  624. package/cjs/ui/MessageItemMenu.js +110 -166
  625. package/cjs/ui/MessageItemMenu.js.map +1 -1
  626. package/cjs/ui/MessageItemReactionMenu.js +39 -102
  627. package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
  628. package/cjs/ui/MessageSearchFileItem.js +77 -114
  629. package/cjs/ui/MessageSearchFileItem.js.map +1 -1
  630. package/cjs/ui/MessageSearchItem.js +49 -83
  631. package/cjs/ui/MessageSearchItem.js.map +1 -1
  632. package/cjs/ui/MessageStatus.js +13 -13
  633. package/cjs/ui/Modal.js +18 -131
  634. package/cjs/ui/Modal.js.map +1 -1
  635. package/cjs/ui/MutedAvatarOverlay.js +14 -30
  636. package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
  637. package/cjs/ui/OGMessageItemBody.js +64 -109
  638. package/cjs/ui/OGMessageItemBody.js.map +1 -1
  639. package/cjs/ui/OpenChannelAdminMessage.js +9 -18
  640. package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
  641. package/cjs/ui/OpenChannelAvatar.js +14 -29
  642. package/cjs/ui/OpenChannelAvatar.js.map +1 -1
  643. package/cjs/ui/OpenchannelConversationHeader.js +21 -60
  644. package/cjs/ui/OpenchannelConversationHeader.js.map +1 -1
  645. package/cjs/ui/OpenchannelFileMessage.js +112 -236
  646. package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
  647. package/cjs/ui/OpenchannelOGMessage.js +155 -330
  648. package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
  649. package/cjs/ui/OpenchannelThumbnailMessage.js +150 -315
  650. package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
  651. package/cjs/ui/OpenchannelUserMessage.js +124 -266
  652. package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
  653. package/cjs/ui/PlaceHolder.js +46 -105
  654. package/cjs/ui/PlaceHolder.js.map +1 -1
  655. package/cjs/ui/PlaybackTime.js +12 -26
  656. package/cjs/ui/PlaybackTime.js.map +1 -1
  657. package/cjs/ui/ProgressBar.js +13 -31
  658. package/cjs/ui/ProgressBar.js.map +1 -1
  659. package/cjs/ui/QuoteMessage.js +70 -146
  660. package/cjs/ui/QuoteMessage.js.map +1 -1
  661. package/cjs/ui/QuoteMessageInput.js +71 -102
  662. package/cjs/ui/QuoteMessageInput.js.map +1 -1
  663. package/cjs/ui/ReactionBadge.js +20 -46
  664. package/cjs/ui/ReactionBadge.js.map +1 -1
  665. package/cjs/ui/ReactionButton.js +17 -39
  666. package/cjs/ui/ReactionButton.js.map +1 -1
  667. package/cjs/ui/SortByRow.js +23 -35
  668. package/cjs/ui/SortByRow.js.map +1 -1
  669. package/cjs/ui/TextButton.js +9 -29
  670. package/cjs/ui/TextButton.js.map +1 -1
  671. package/cjs/ui/TextMessageItemBody.js +41 -57
  672. package/cjs/ui/TextMessageItemBody.js.map +1 -1
  673. package/cjs/ui/ThreadReplies.js +32 -70
  674. package/cjs/ui/ThreadReplies.js.map +1 -1
  675. package/cjs/ui/ThumbnailMessageItemBody.js +34 -74
  676. package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
  677. package/cjs/ui/Toggle.js +110 -189
  678. package/cjs/ui/Toggle.js.map +1 -1
  679. package/cjs/ui/Tooltip.js +9 -20
  680. package/cjs/ui/Tooltip.js.map +1 -1
  681. package/cjs/ui/TooltipWrapper.js +13 -45
  682. package/cjs/ui/TooltipWrapper.js.map +1 -1
  683. package/cjs/ui/UnknownMessageItemBody.js +20 -34
  684. package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
  685. package/cjs/ui/UserListItem.js +49 -116
  686. package/cjs/ui/UserListItem.js.map +1 -1
  687. package/cjs/ui/UserProfile.js +43 -72
  688. package/cjs/ui/UserProfile.js.map +1 -1
  689. package/cjs/ui/VoiceMessageItemBody.js +53 -106
  690. package/cjs/ui/VoiceMessageItemBody.js.map +1 -1
  691. package/cjs/ui/VoiceMessgeInput.js +9 -11
  692. package/cjs/ui/VoiceMessgeInput.js.map +1 -1
  693. package/cjs/ui/Word.js +58 -87
  694. package/cjs/ui/Word.js.map +1 -1
  695. package/cjs/useSendbirdStateContext.js +16 -15
  696. package/cjs/useSendbirdStateContext.js.map +1 -1
  697. package/cjs/utils/message/getOutgoingMessageState.js +32 -31
  698. package/cjs/utils/message/getOutgoingMessageState.js.map +1 -1
  699. package/cjs/utils/message/isVoiceMessage.js +3 -5
  700. package/cjs/utils/message/isVoiceMessage.js.map +1 -1
  701. package/cjs/withSendbird.js +18 -23
  702. package/cjs/withSendbird.js.map +1 -1
  703. package/dist/index.css +202 -149
  704. package/dist/index.css.map +1 -1
  705. package/handlers/OpenChannelHandler.js +2 -2
  706. package/handlers/OpenChannelHandler.js.map +1 -1
  707. package/handlers/SessionHandler.js +2 -2
  708. package/handlers/SessionHandler.js.map +1 -1
  709. package/hooks/useModal.js +47 -65
  710. package/hooks/useModal.js.map +1 -1
  711. package/index.js +56 -58
  712. package/index.js.map +1 -1
  713. package/lame.all.js +14797 -679
  714. package/lame.all.js.map +1 -1
  715. package/package.json +1454 -79
  716. package/pubSub/topics.js +14 -14
  717. package/pubSub/topics.js.map +1 -1
  718. package/sendbirdSelectors.js +534 -617
  719. package/sendbirdSelectors.js.map +1 -1
  720. package/types/hooks/VoicePlayer/dux/actionTypes.d.ts +14 -0
  721. package/types/hooks/VoicePlayer/dux/initialState.d.ts +30 -0
  722. package/types/hooks/VoicePlayer/dux/reducer.d.ts +25 -0
  723. package/types/hooks/VoicePlayer/index.d.ts +19 -0
  724. package/types/hooks/VoicePlayer/useVoicePlayer.d.ts +16 -0
  725. package/types/hooks/VoicePlayer/utils.d.ts +2 -0
  726. package/types/hooks/VoiceRecorder/WebAudioUtils.d.ts +4 -0
  727. package/types/hooks/VoiceRecorder/index.d.ts +20 -0
  728. package/types/hooks/VoiceRecorder/useVoiceRecorder.d.ts +18 -0
  729. package/types/hooks/useAppendDomNode.d.ts +2 -0
  730. package/types/hooks/useDebounce.d.ts +1 -0
  731. package/types/hooks/useHandleOnScrollCallback/index.d.ts +11 -0
  732. package/types/hooks/useLongPress.d.ts +21 -0
  733. package/types/hooks/useModal/ModalRoot/index.d.ts +4 -0
  734. package/types/hooks/useModal/index.d.ts +15 -0
  735. package/types/hooks/useMouseHover.d.ts +7 -0
  736. package/types/hooks/useOutsideAlerter.d.ts +7 -0
  737. package/types/hooks/useSendbirdStateContext.d.ts +3 -0
  738. package/types/hooks/useUnmount.d.ts +2 -0
  739. package/types/index.d.ts +13 -0
  740. package/types/lib/LocalizationContext.d.ts +19 -0
  741. package/types/lib/Logger/index.d.ts +24 -0
  742. package/types/lib/MediaQueryContext.d.ts +14 -0
  743. package/types/lib/Sendbird.d.ts +65 -0
  744. package/types/lib/SendbirdSdkContext.d.ts +9 -0
  745. package/types/lib/SendbirdState.d.ts +7 -0
  746. package/types/lib/UserProfileContext.d.ts +22 -0
  747. package/types/lib/VoiceMessageProvider.d.ts +7 -0
  748. package/types/lib/dux/sdk/actionTypes.d.ts +16 -0
  749. package/types/lib/dux/sdk/initialState.d.ts +9 -0
  750. package/types/lib/dux/sdk/reducers.d.ts +3 -0
  751. package/types/lib/dux/user/actionTypes.d.ts +14 -0
  752. package/types/lib/dux/user/initialState.d.ts +8 -0
  753. package/types/lib/dux/user/reducers.d.ts +3 -0
  754. package/types/lib/handlers/ConnectionHandler.d.ts +5 -0
  755. package/types/lib/handlers/GroupChannelHandler.d.ts +7 -0
  756. package/types/lib/handlers/OpenChannelHandler.d.ts +5 -0
  757. package/types/lib/handlers/SessionHandler.d.ts +5 -0
  758. package/types/lib/handlers/UserEventHandler.d.ts +5 -0
  759. package/types/lib/hooks/schedulerFactory.d.ts +11 -0
  760. package/types/lib/hooks/useConnect/__test__/data.mocks.d.ts +15 -0
  761. package/types/lib/hooks/useConnect/connect.d.ts +2 -0
  762. package/types/lib/hooks/useConnect/disconnectSdk.d.ts +2 -0
  763. package/types/lib/hooks/useConnect/index.d.ts +2 -0
  764. package/types/lib/hooks/useConnect/setupConnection.d.ts +18 -0
  765. package/types/lib/hooks/useConnect/types.d.ts +42 -0
  766. package/types/lib/hooks/useMarkAsDeliveredScheduler.d.ts +15 -0
  767. package/types/lib/hooks/useMarkAsReadScheduler.d.ts +15 -0
  768. package/types/lib/hooks/useOnlineStatus.d.ts +4 -0
  769. package/types/lib/hooks/useTheme.d.ts +2 -0
  770. package/types/lib/pubSub/index.d.ts +9 -0
  771. package/types/lib/pubSub/topics.d.ts +16 -0
  772. package/types/lib/selectors.d.ts +247 -0
  773. package/types/lib/types.d.ts +165 -0
  774. package/types/lib/utils/resolvedReplyType.d.ts +28 -0
  775. package/types/lib/utils/uikitConfigMapper.d.ts +5 -0
  776. package/types/modules/App/AppLayout.d.ts +3 -0
  777. package/types/modules/App/DesktopLayout.d.ts +3 -0
  778. package/types/modules/App/MobileLayout.d.ts +4 -0
  779. package/types/modules/App/index.d.ts +44 -0
  780. package/types/modules/App/types.d.ts +72 -0
  781. package/types/modules/Channel/components/ChannelHeader/index.d.ts +7 -0
  782. package/types/modules/Channel/components/ChannelHeader/utils.d.ts +4 -0
  783. package/types/modules/Channel/components/ChannelUI/index.d.ts +19 -0
  784. package/types/modules/Channel/components/FileViewer/index.d.ts +21 -0
  785. package/types/modules/Channel/components/FrozenNotification/index.d.ts +7 -0
  786. package/types/modules/Channel/components/Message/index.d.ts +15 -0
  787. package/types/modules/Channel/components/MessageInput/VoiceMessageInputWrapper.d.ts +10 -0
  788. package/types/modules/Channel/components/MessageInput/index.d.ts +11 -0
  789. package/types/modules/Channel/components/MessageInput/useHandleUploadFiles.d.ts +19 -0
  790. package/types/modules/Channel/components/MessageList/getMessagePartsInfo.d.ts +20 -0
  791. package/types/modules/Channel/components/MessageList/hooks/useScrollBehavior.d.ts +1 -0
  792. package/types/modules/Channel/components/MessageList/hooks/useSetScrollToBottom.d.ts +7 -0
  793. package/types/modules/Channel/components/MessageList/index.d.ts +12 -0
  794. package/types/modules/Channel/components/RemoveMessageModal.d.ts +9 -0
  795. package/types/modules/Channel/components/SuggestedMentionList/SuggestedUserMentionItem.d.ts +21 -0
  796. package/types/modules/Channel/components/SuggestedMentionList/index.d.ts +20 -0
  797. package/types/modules/Channel/components/SuggestedReplies/index.d.ts +10 -0
  798. package/types/modules/Channel/components/TypingIndicator.d.ts +8 -0
  799. package/types/modules/Channel/components/UnreadCount/index.d.ts +12 -0
  800. package/types/modules/Channel/context/ChannelProvider.d.ts +129 -0
  801. package/types/modules/Channel/context/compareMessagesForGrouping.d.ts +10 -0
  802. package/types/modules/Channel/context/const.d.ts +9 -0
  803. package/types/modules/Channel/context/dux/actionTypes.d.ts +87 -0
  804. package/types/modules/Channel/context/dux/initialState.d.ts +24 -0
  805. package/types/modules/Channel/context/dux/reducers.d.ts +3 -0
  806. package/types/modules/Channel/context/hooks/useDeleteMessageCallback.d.ts +14 -0
  807. package/types/modules/Channel/context/hooks/useGetChannel.d.ts +18 -0
  808. package/types/modules/Channel/context/hooks/useHandleChannelEvents.d.ts +29 -0
  809. package/types/modules/Channel/context/hooks/useHandleChannelPubsubEvents.d.ts +10 -0
  810. package/types/modules/Channel/context/hooks/useHandleReconnect.d.ts +23 -0
  811. package/types/modules/Channel/context/hooks/useInitialMessagesFetch.d.ts +20 -0
  812. package/types/modules/Channel/context/hooks/useReconnectOnIdle.d.ts +5 -0
  813. package/types/modules/Channel/context/hooks/useResendMessageCallback.d.ts +14 -0
  814. package/types/modules/Channel/context/hooks/useScrollCallback.d.ts +21 -0
  815. package/types/modules/Channel/context/hooks/useScrollDownCallback.d.ts +23 -0
  816. package/types/modules/Channel/context/hooks/useScrollToMessage.d.ts +14 -0
  817. package/types/modules/Channel/context/hooks/useSendFileMessageCallback.d.ts +21 -0
  818. package/types/modules/Channel/context/hooks/useSendMessageCallback.d.ts +27 -0
  819. package/types/modules/Channel/context/hooks/useSendMultipleFilesMessage.d.ts +32 -0
  820. package/types/modules/Channel/context/hooks/useSendVoiceMessageCallback.d.ts +20 -0
  821. package/types/modules/Channel/context/hooks/useStatefulFileInfoList.d.ts +3 -0
  822. package/types/modules/Channel/context/hooks/useThreadMessageKindKeySelector.d.ts +7 -0
  823. package/types/modules/Channel/context/hooks/useToggleReactionCallback.d.ts +11 -0
  824. package/types/modules/Channel/context/hooks/useUpdateMessageCallback.d.ts +26 -0
  825. package/types/modules/Channel/context/utils.d.ts +18 -0
  826. package/types/modules/Channel/index.d.ts +7 -0
  827. package/types/modules/ChannelList/components/AddChannel/index.d.ts +3 -0
  828. package/types/modules/ChannelList/components/ChannelListHeader/index.d.ts +11 -0
  829. package/types/modules/ChannelList/components/ChannelListUI/index.d.ts +23 -0
  830. package/types/modules/ChannelList/components/ChannelPreview/index.d.ts +16 -0
  831. package/types/modules/ChannelList/components/ChannelPreview/utils.d.ts +10 -0
  832. package/types/modules/ChannelList/components/ChannelPreviewAction.d.ts +9 -0
  833. package/types/modules/ChannelList/components/LeaveChannel/index.d.ts +9 -0
  834. package/types/modules/ChannelList/components/Placeholder.d.ts +7 -0
  835. package/types/modules/ChannelList/context/ChannelListProvider.d.ts +75 -0
  836. package/types/modules/ChannelList/context/hooks/useActiveChannelUrl.d.ts +15 -0
  837. package/types/modules/ChannelList/context/hooks/useFetchChannelList.d.ts +17 -0
  838. package/types/modules/ChannelList/dux/actionTypes.d.ts +66 -0
  839. package/types/modules/ChannelList/dux/getNextChannel.d.ts +14 -0
  840. package/types/modules/ChannelList/dux/initialState.d.ts +12 -0
  841. package/types/modules/ChannelList/dux/reducers.d.ts +3 -0
  842. package/types/modules/ChannelList/index.d.ts +7 -0
  843. package/types/modules/ChannelList/utils.d.ts +35 -0
  844. package/types/modules/ChannelSettings/components/ChannelProfile/index.d.ts +4 -0
  845. package/types/modules/ChannelSettings/components/ChannelSettingsUI/index.d.ts +10 -0
  846. package/types/modules/ChannelSettings/components/EditDetailsModal/index.d.ts +7 -0
  847. package/types/modules/ChannelSettings/components/LeaveChannel/index.d.ts +8 -0
  848. package/types/modules/ChannelSettings/components/ModerationPanel/AddOperatorsModal.d.ts +7 -0
  849. package/types/modules/ChannelSettings/components/ModerationPanel/BannedUserList.d.ts +3 -0
  850. package/types/modules/ChannelSettings/components/ModerationPanel/BannedUsersModal.d.ts +6 -0
  851. package/types/modules/ChannelSettings/components/ModerationPanel/InviteUsersModal.d.ts +7 -0
  852. package/types/modules/ChannelSettings/components/ModerationPanel/MemberList.d.ts +3 -0
  853. package/types/modules/ChannelSettings/components/ModerationPanel/MembersModal.d.ts +6 -0
  854. package/types/modules/ChannelSettings/components/ModerationPanel/MutedMemberList.d.ts +3 -0
  855. package/types/modules/ChannelSettings/components/ModerationPanel/MutedMembersModal.d.ts +6 -0
  856. package/types/modules/ChannelSettings/components/ModerationPanel/OperatorList.d.ts +3 -0
  857. package/types/modules/ChannelSettings/components/ModerationPanel/OperatorsModal.d.ts +6 -0
  858. package/types/modules/ChannelSettings/components/ModerationPanel/index.d.ts +3 -0
  859. package/types/modules/ChannelSettings/components/UserListItem/index.d.ts +19 -0
  860. package/types/modules/ChannelSettings/components/UserPanel/index.d.ts +4 -0
  861. package/types/modules/ChannelSettings/context/ChannelSettingsProvider.d.ts +47 -0
  862. package/types/modules/ChannelSettings/index.d.ts +7 -0
  863. package/types/modules/CreateChannel/components/CreateChannelUI/index.d.ts +8 -0
  864. package/types/modules/CreateChannel/components/InviteUsers/index.d.ts +9 -0
  865. package/types/modules/CreateChannel/components/InviteUsers/utils.d.ts +12 -0
  866. package/types/modules/CreateChannel/components/SelectChannelType.d.ts +6 -0
  867. package/types/modules/CreateChannel/context/CreateChannelProvider.d.ts +37 -0
  868. package/types/modules/CreateChannel/index.d.ts +7 -0
  869. package/types/modules/CreateChannel/types.d.ts +5 -0
  870. package/types/modules/CreateChannel/utils.d.ts +3 -0
  871. package/types/modules/CreateOpenChannel/components/CreateOpenChannelUI/index.d.ts +9 -0
  872. package/types/modules/CreateOpenChannel/context/CreateOpenChannelProvider.d.ts +22 -0
  873. package/types/modules/CreateOpenChannel/index.d.ts +7 -0
  874. package/types/modules/EditUserProfile/components/EditUserProfileUI/index.d.ts +3 -0
  875. package/types/modules/EditUserProfile/context/EditUserProfileProvider.d.ts +16 -0
  876. package/types/modules/EditUserProfile/index.d.ts +4 -0
  877. package/types/modules/Message/components/TextFragment/index.d.ts +6 -0
  878. package/types/modules/Message/consts.d.ts +1 -0
  879. package/types/modules/Message/context/MessageProvider.d.ts +11 -0
  880. package/types/modules/Message/hooks/useDirtyGetMentions.d.ts +14 -0
  881. package/types/modules/Message/utils/getMentionNodes.d.ts +1 -0
  882. package/types/modules/Message/utils/tokens/keyGenerator.d.ts +1 -0
  883. package/types/modules/Message/utils/tokens/tokenize.d.ts +18 -0
  884. package/types/modules/Message/utils/tokens/types.d.ts +37 -0
  885. package/types/modules/MessageSearch/components/MessageSearchUI/index.d.ts +15 -0
  886. package/types/modules/MessageSearch/context/MessageSearchProvider.d.ts +41 -0
  887. package/types/modules/MessageSearch/context/dux/actionTypes.d.ts +8 -0
  888. package/types/modules/MessageSearch/context/dux/initialState.d.ts +14 -0
  889. package/types/modules/MessageSearch/context/dux/reducers.d.ts +7 -0
  890. package/types/modules/MessageSearch/context/hooks/useGetSearchedMessages.d.ts +24 -0
  891. package/types/modules/MessageSearch/context/hooks/useScrollCallback.d.ts +20 -0
  892. package/types/modules/MessageSearch/context/hooks/useSearchStringEffect.d.ts +11 -0
  893. package/types/modules/MessageSearch/context/hooks/useSetChannel.d.ts +16 -0
  894. package/types/modules/MessageSearch/index.d.ts +10 -0
  895. package/types/modules/OpenChannel/components/FrozenChannelNotification/index.d.ts +4 -0
  896. package/types/modules/OpenChannel/components/OpenChannelHeader/index.d.ts +3 -0
  897. package/types/modules/OpenChannel/components/OpenChannelInput/index.d.ts +6 -0
  898. package/types/modules/OpenChannel/components/OpenChannelMessage/RemoveMessageModal.d.ts +10 -0
  899. package/types/modules/OpenChannel/components/OpenChannelMessage/index.d.ts +12 -0
  900. package/types/modules/OpenChannel/components/OpenChannelMessage/utils.d.ts +37 -0
  901. package/types/modules/OpenChannel/components/OpenChannelMessageList/index.d.ts +9 -0
  902. package/types/modules/OpenChannel/components/OpenChannelUI/index.d.ts +13 -0
  903. package/types/modules/OpenChannel/context/OpenChannelProvider.d.ts +52 -0
  904. package/types/modules/OpenChannel/context/dux/actionTypes.d.ts +37 -0
  905. package/types/modules/OpenChannel/context/dux/initialState.d.ts +19 -0
  906. package/types/modules/OpenChannel/context/dux/reducers.d.ts +7 -0
  907. package/types/modules/OpenChannel/context/hooks/useCheckScrollBottom.d.ts +10 -0
  908. package/types/modules/OpenChannel/context/hooks/useDeleteMessageCallback.d.ts +17 -0
  909. package/types/modules/OpenChannel/context/hooks/useFileUploadCallback.d.ts +27 -0
  910. package/types/modules/OpenChannel/context/hooks/useHandleChannelEvents.d.ts +20 -0
  911. package/types/modules/OpenChannel/context/hooks/useInitialMessagesFetch.d.ts +14 -0
  912. package/types/modules/OpenChannel/context/hooks/useResendMessageCallback.d.ts +17 -0
  913. package/types/modules/OpenChannel/context/hooks/useScrollCallback.d.ts +18 -0
  914. package/types/modules/OpenChannel/context/hooks/useSendMessageCallback.d.ts +22 -0
  915. package/types/modules/OpenChannel/context/hooks/useSetChannel.d.ts +20 -0
  916. package/types/modules/OpenChannel/context/hooks/useTrimMessageList.d.ts +17 -0
  917. package/types/modules/OpenChannel/context/hooks/useUpdateMessageCallback.d.ts +17 -0
  918. package/types/modules/OpenChannel/context/utils.d.ts +16 -0
  919. package/types/modules/OpenChannel/index.d.ts +7 -0
  920. package/types/modules/OpenChannelApp/Community.d.ts +11 -0
  921. package/types/modules/OpenChannelApp/Streaming.d.ts +11 -0
  922. package/types/modules/OpenChannelApp/assets/Icons.d.ts +7 -0
  923. package/types/modules/OpenChannelApp/components/CommunityChannelList.d.ts +7 -0
  924. package/types/modules/OpenChannelApp/components/DummyStream.d.ts +20 -0
  925. package/types/modules/OpenChannelApp/components/Login.d.ts +12 -0
  926. package/types/modules/OpenChannelApp/components/OpenChannelPreview.d.ts +11 -0
  927. package/types/modules/OpenChannelApp/components/Profile.d.ts +8 -0
  928. package/types/modules/OpenChannelApp/components/StreamingChannelList.d.ts +7 -0
  929. package/types/modules/OpenChannelApp/index.d.ts +16 -0
  930. package/types/modules/OpenChannelApp/stories/utils.d.ts +6 -0
  931. package/types/modules/OpenChannelList/components/OpenChannelListUI/index.d.ts +18 -0
  932. package/types/modules/OpenChannelList/components/OpenChannelPreview/index.d.ts +11 -0
  933. package/types/modules/OpenChannelList/context/OpenChannelListInterfaces.d.ts +42 -0
  934. package/types/modules/OpenChannelList/context/OpenChannelListProvider.d.ts +9 -0
  935. package/types/modules/OpenChannelList/context/dux/actionTypes.d.ts +14 -0
  936. package/types/modules/OpenChannelList/context/dux/initialState.d.ts +10 -0
  937. package/types/modules/OpenChannelList/context/dux/reducer.d.ts +6 -0
  938. package/types/modules/OpenChannelList/context/hooks/createChannelListQuery.d.ts +13 -0
  939. package/types/modules/OpenChannelList/context/hooks/useFetchNextCallback.d.ts +15 -0
  940. package/types/modules/OpenChannelList/context/hooks/useRefreshOpenChannelList.d.ts +14 -0
  941. package/types/modules/OpenChannelList/context/hooks/useSetupOpenChannelList.d.ts +14 -0
  942. package/types/modules/OpenChannelList/index.d.ts +7 -0
  943. package/types/modules/OpenChannelSettings/components/EditDetailsModal.d.ts +6 -0
  944. package/types/modules/OpenChannelSettings/components/InvalidChannel.d.ts +6 -0
  945. package/types/modules/OpenChannelSettings/components/OpenChannelProfile/index.d.ts +3 -0
  946. package/types/modules/OpenChannelSettings/components/OpenChannelSettingsUI/index.d.ts +8 -0
  947. package/types/modules/OpenChannelSettings/components/OperatorUI/AddOperatorsModal.d.ts +7 -0
  948. package/types/modules/OpenChannelSettings/components/OperatorUI/BannedUserList.d.ts +3 -0
  949. package/types/modules/OpenChannelSettings/components/OperatorUI/BannedUsersModal.d.ts +6 -0
  950. package/types/modules/OpenChannelSettings/components/OperatorUI/DeleteOpenChannel.d.ts +2 -0
  951. package/types/modules/OpenChannelSettings/components/OperatorUI/MutedParticipantList.d.ts +3 -0
  952. package/types/modules/OpenChannelSettings/components/OperatorUI/MutedParticipantsModal.d.ts +6 -0
  953. package/types/modules/OpenChannelSettings/components/OperatorUI/OperatorList.d.ts +3 -0
  954. package/types/modules/OpenChannelSettings/components/OperatorUI/OperatorsModal.d.ts +6 -0
  955. package/types/modules/OpenChannelSettings/components/OperatorUI/index.d.ts +7 -0
  956. package/types/modules/OpenChannelSettings/components/ParticipantUI/ParticipantItem.d.ts +17 -0
  957. package/types/modules/OpenChannelSettings/components/ParticipantUI/ParticipantsModal.d.ts +6 -0
  958. package/types/modules/OpenChannelSettings/components/ParticipantUI/index.d.ts +6 -0
  959. package/types/modules/OpenChannelSettings/context/OpenChannelSettingsProvider.d.ts +27 -0
  960. package/types/modules/OpenChannelSettings/index.d.ts +7 -0
  961. package/types/modules/Thread/components/ParentMessageInfo/ParentMessageInfoItem.d.ts +9 -0
  962. package/types/modules/Thread/components/ParentMessageInfo/index.d.ts +6 -0
  963. package/types/modules/Thread/components/RemoveMessageModal.d.ts +9 -0
  964. package/types/modules/Thread/components/ThreadHeader/index.d.ts +14 -0
  965. package/types/modules/Thread/components/ThreadList/ThreadListItem.d.ts +14 -0
  966. package/types/modules/Thread/components/ThreadList/ThreadListItemContent.d.ts +30 -0
  967. package/types/modules/Thread/components/ThreadList/index.d.ts +18 -0
  968. package/types/modules/Thread/components/ThreadMessageInput/index.d.ts +11 -0
  969. package/types/modules/Thread/components/ThreadUI/index.d.ts +23 -0
  970. package/types/modules/Thread/components/ThreadUI/useMemorizedHeader.d.ts +6 -0
  971. package/types/modules/Thread/components/ThreadUI/useMemorizedParentMessageInfo.d.ts +11 -0
  972. package/types/modules/Thread/components/ThreadUI/useMemorizedThreadList.d.ts +8 -0
  973. package/types/modules/Thread/consts.d.ts +2 -0
  974. package/types/modules/Thread/context/ThreadProvider.d.ts +43 -0
  975. package/types/modules/Thread/context/dux/actionTypes.d.ts +37 -0
  976. package/types/modules/Thread/context/dux/initialState.d.ts +21 -0
  977. package/types/modules/Thread/context/dux/reducer.d.ts +8 -0
  978. package/types/modules/Thread/context/hooks/useDeleteMessageCallback.d.ts +12 -0
  979. package/types/modules/Thread/context/hooks/useGetAllEmoji.d.ts +11 -0
  980. package/types/modules/Thread/context/hooks/useGetChannel.d.ts +18 -0
  981. package/types/modules/Thread/context/hooks/useGetNextThreadsCallback.d.ts +17 -0
  982. package/types/modules/Thread/context/hooks/useGetParentMessage.d.ts +15 -0
  983. package/types/modules/Thread/context/hooks/useGetPrevThreadsCallback.d.ts +17 -0
  984. package/types/modules/Thread/context/hooks/useGetThreadList.d.ts +14 -0
  985. package/types/modules/Thread/context/hooks/useHandleChannelEvents.d.ts +13 -0
  986. package/types/modules/Thread/context/hooks/useHandleThreadPubsubEvents.d.ts +15 -0
  987. package/types/modules/Thread/context/hooks/useResendMessageCallback.d.ts +13 -0
  988. package/types/modules/Thread/context/hooks/useSendFileMessage.d.ts +16 -0
  989. package/types/modules/Thread/context/hooks/useSendMultipleFilesMessage.d.ts +8 -0
  990. package/types/modules/Thread/context/hooks/useSendUserMessageCallback.d.ts +24 -0
  991. package/types/modules/Thread/context/hooks/useSendVoiceMessageCallback.d.ts +16 -0
  992. package/types/modules/Thread/context/hooks/useToggleReactionsCallback.d.ts +10 -0
  993. package/types/modules/Thread/context/hooks/useUpdateMessageCallback.d.ts +13 -0
  994. package/types/modules/Thread/context/utils.d.ts +15 -0
  995. package/types/modules/Thread/index.d.ts +8 -0
  996. package/types/modules/Thread/types.d.ts +18 -0
  997. package/types/modules/internalInterfaces.d.ts +4 -0
  998. package/types/types.d.ts +55 -0
  999. package/types/ui/Accordion/AccordionGroup.d.ts +7 -0
  1000. package/types/ui/Accordion/context.d.ts +8 -0
  1001. package/types/ui/Accordion/index.d.ts +13 -0
  1002. package/types/ui/AdminMessage/adminMessageDummyData.mock.d.ts +29 -0
  1003. package/types/ui/AdminMessage/index.d.ts +9 -0
  1004. package/types/ui/Avatar/MutedAvatarOverlay.d.ts +8 -0
  1005. package/types/ui/Avatar/index.d.ts +27 -0
  1006. package/types/ui/Badge/index.d.ts +8 -0
  1007. package/types/ui/BottomSheet/index.d.ts +9 -0
  1008. package/types/ui/Button/index.d.ts +13 -0
  1009. package/types/ui/Button/types.d.ts +10 -0
  1010. package/types/ui/Button/utils.d.ts +3 -0
  1011. package/types/ui/ChannelAvatar/OpenChannelAvatar.d.ts +10 -0
  1012. package/types/ui/ChannelAvatar/index.d.ts +12 -0
  1013. package/types/ui/ChannelAvatar/utils.d.ts +6 -0
  1014. package/types/ui/Checkbox/index.d.ts +9 -0
  1015. package/types/ui/ConnectionStatus/index.d.ts +4 -0
  1016. package/types/ui/ContextMenu/EmojiListItems.d.ts +15 -0
  1017. package/types/ui/ContextMenu/MenuItems.d.ts +29 -0
  1018. package/types/ui/ContextMenu/index.d.ts +24 -0
  1019. package/types/ui/DateSeparator/index.d.ts +10 -0
  1020. package/types/ui/Docs/Introduction.d.ts +2 -0
  1021. package/types/ui/EmojiReactions/AddReactionBadgeItem.d.ts +5 -0
  1022. package/types/ui/EmojiReactions/ReactionItem.d.ts +17 -0
  1023. package/types/ui/EmojiReactions/index.d.ts +21 -0
  1024. package/types/ui/FileMessageItemBody/index.d.ts +13 -0
  1025. package/types/ui/FileViewer/DeleteButton.d.ts +5 -0
  1026. package/types/ui/FileViewer/Slider.d.ts +3 -0
  1027. package/types/ui/FileViewer/data.mock.d.ts +84 -0
  1028. package/types/ui/FileViewer/hooks/useKeyDown.d.ts +8 -0
  1029. package/types/ui/FileViewer/index.d.ts +17 -0
  1030. package/types/ui/FileViewer/types.d.ts +44 -0
  1031. package/types/ui/FileViewer/utils.d.ts +4 -0
  1032. package/types/ui/Icon/colors.d.ts +42 -0
  1033. package/types/ui/Icon/index.d.ts +96 -0
  1034. package/types/ui/Icon/type.d.ts +61 -0
  1035. package/types/ui/Icon/utils.d.ts +4 -0
  1036. package/types/ui/IconButton/index.d.ts +17 -0
  1037. package/types/ui/ImageGrid/index.d.ts +11 -0
  1038. package/types/ui/ImageRenderer/index.d.ts +27 -0
  1039. package/types/ui/ImageRenderer/useDynamicSideLength.d.ts +8 -0
  1040. package/types/ui/ImageRenderer/utils.d.ts +1 -0
  1041. package/types/ui/Input/index.d.ts +15 -0
  1042. package/types/ui/Label/index.d.ts +37 -0
  1043. package/types/ui/Label/stringFormatterUtils.d.ts +2 -0
  1044. package/types/ui/Label/stringSet.d.ts +189 -0
  1045. package/types/ui/Label/types.d.ts +24 -0
  1046. package/types/ui/Label/utils.d.ts +4 -0
  1047. package/types/ui/LegacyEditUserProfile/index.d.ts +20 -0
  1048. package/types/ui/LinkLabel/index.d.ts +37 -0
  1049. package/types/ui/Loader/index.d.ts +9 -0
  1050. package/types/ui/MentionLabel/index.d.ts +10 -0
  1051. package/types/ui/MentionUserLabel/consts.d.ts +1 -0
  1052. package/types/ui/MentionUserLabel/index.d.ts +11 -0
  1053. package/types/ui/MentionUserLabel/renderToString.d.ts +6 -0
  1054. package/types/ui/MessageContent/index.d.ts +39 -0
  1055. package/types/ui/MessageInput/const.d.ts +15 -0
  1056. package/types/ui/MessageInput/hooks/usePaste/consts.d.ts +5 -0
  1057. package/types/ui/MessageInput/hooks/usePaste/index.d.ts +4 -0
  1058. package/types/ui/MessageInput/hooks/usePaste/insertTemplate.d.ts +2 -0
  1059. package/types/ui/MessageInput/hooks/usePaste/types.d.ts +15 -0
  1060. package/types/ui/MessageInput/hooks/usePaste/utils.d.ts +10 -0
  1061. package/types/ui/MessageInput/index.d.ts +47 -0
  1062. package/types/ui/MessageInput/messageInputUtils.d.ts +21 -0
  1063. package/types/ui/MessageInput/utils.d.ts +9 -0
  1064. package/types/ui/MessageItemMenu/index.d.ts +26 -0
  1065. package/types/ui/MessageItemReactionMenu/index.d.ts +16 -0
  1066. package/types/ui/MessageSearchFileItem/index.d.ts +12 -0
  1067. package/types/ui/MessageSearchFileItem/mockFileMessage.d.ts +180 -0
  1068. package/types/ui/MessageSearchFileItem/utils.d.ts +12 -0
  1069. package/types/ui/MessageSearchItem/getCreatedAt.d.ts +8 -0
  1070. package/types/ui/MessageSearchItem/index.d.ts +11 -0
  1071. package/types/ui/MessageSearchItem/messageDummyDate.mock.d.ts +5 -0
  1072. package/types/ui/MessageStatus/index.d.ts +15 -0
  1073. package/types/ui/MessageStatus/messageDummyData.mock.d.ts +7 -0
  1074. package/types/ui/MobileMenu/MobileBottomSheet.d.ts +4 -0
  1075. package/types/ui/MobileMenu/MobileContextMenu.d.ts +4 -0
  1076. package/types/ui/MobileMenu/MobileEmojisBottomSheet.d.ts +11 -0
  1077. package/types/ui/MobileMenu/ReactedMembersBottomSheet.d.ts +14 -0
  1078. package/types/ui/MobileMenu/index.d.ts +5 -0
  1079. package/types/ui/MobileMenu/types.d.ts +32 -0
  1080. package/types/ui/Modal/index.d.ts +40 -0
  1081. package/types/ui/MultipleFilesMessageItemBody/const.d.ts +17 -0
  1082. package/types/ui/MultipleFilesMessageItemBody/index.d.ts +21 -0
  1083. package/types/ui/OGMessageItemBody/consts.d.ts +1 -0
  1084. package/types/ui/OGMessageItemBody/index.d.ts +14 -0
  1085. package/types/ui/OpenChannelAdminMessage/index.d.ts +9 -0
  1086. package/types/ui/OpenChannelMobileMenu/index.d.ts +15 -0
  1087. package/types/ui/OpenchannelConversationHeader/index.d.ts +11 -0
  1088. package/types/ui/OpenchannelFileMessage/index.d.ts +17 -0
  1089. package/types/ui/OpenchannelFileMessage/mockMessages.d.ts +75 -0
  1090. package/types/ui/OpenchannelFileMessage/utils.d.ts +2 -0
  1091. package/types/ui/OpenchannelOGMessage/index.d.ts +18 -0
  1092. package/types/ui/OpenchannelOGMessage/utils.d.ts +4 -0
  1093. package/types/ui/OpenchannelThumbnailMessage/index.d.ts +18 -0
  1094. package/types/ui/OpenchannelThumbnailMessage/utils.d.ts +6 -0
  1095. package/types/ui/OpenchannelUserMessage/index.d.ts +18 -0
  1096. package/types/ui/OpenchannelUserMessage/utils.d.ts +5 -0
  1097. package/types/ui/PlaceHolder/index.d.ts +19 -0
  1098. package/types/ui/PlaybackTime/index.d.ts +11 -0
  1099. package/types/ui/ProgressBar/index.d.ts +16 -0
  1100. package/types/ui/QuoteMessage/index.d.ts +13 -0
  1101. package/types/ui/QuoteMessage/utils.d.ts +7 -0
  1102. package/types/ui/QuoteMessageInput/QuoteMessageThumbnail.d.ts +8 -0
  1103. package/types/ui/QuoteMessageInput/index.d.ts +10 -0
  1104. package/types/ui/QuoteMessageInput/mockMessage.d.ts +362 -0
  1105. package/types/ui/ReactionBadge/index.d.ts +12 -0
  1106. package/types/ui/ReactionButton/index.d.ts +13 -0
  1107. package/types/ui/SortByRow/index.d.ts +10 -0
  1108. package/types/ui/TextButton/index.d.ts +13 -0
  1109. package/types/ui/TextMessageItemBody/consts.d.ts +1 -0
  1110. package/types/ui/TextMessageItemBody/index.d.ts +13 -0
  1111. package/types/ui/ThreadReplies/index.d.ts +9 -0
  1112. package/types/ui/ThumbnailMessageItemBody/index.d.ts +15 -0
  1113. package/types/ui/Toggle/ToggleContainer.d.ts +7 -0
  1114. package/types/ui/Toggle/ToggleContext.d.ts +19 -0
  1115. package/types/ui/Toggle/ToggleUI.d.ts +12 -0
  1116. package/types/ui/Toggle/index.d.ts +11 -0
  1117. package/types/ui/Toggle/utils.d.ts +1 -0
  1118. package/types/ui/Tooltip/index.d.ts +7 -0
  1119. package/types/ui/TooltipWrapper/index.d.ts +8 -0
  1120. package/types/ui/UnknownMessageItemBody/index.d.ts +12 -0
  1121. package/types/ui/UserListItem/index.d.ts +21 -0
  1122. package/types/ui/UserProfile/index.d.ts +17 -0
  1123. package/types/ui/VoiceMessageInput/controlerIcons.d.ts +7 -0
  1124. package/types/ui/VoiceMessageInput/index.d.ts +16 -0
  1125. package/types/ui/VoiceMessageInput/types.d.ts +7 -0
  1126. package/types/ui/VoiceMessageItemBody/index.d.ts +12 -0
  1127. package/types/ui/Word/index.d.ts +17 -0
  1128. package/types/utils/cloneMessage.d.ts +2 -0
  1129. package/types/utils/color.d.ts +12 -0
  1130. package/types/utils/compareIds.d.ts +1 -0
  1131. package/types/utils/consts.d.ts +23 -0
  1132. package/types/utils/createStatefulFileInfoList.d.ts +11 -0
  1133. package/types/utils/exports/getOutgoingMessageState.d.ts +13 -0
  1134. package/types/utils/getIsReactionEnabled.d.ts +11 -0
  1135. package/types/utils/index.d.ts +142 -0
  1136. package/types/utils/isVoiceMessage.d.ts +1 -0
  1137. package/types/utils/numberToPx.d.ts +2 -0
  1138. package/types/utils/openChannelUtils.d.ts +44 -0
  1139. package/types/utils/pxToNumber.d.ts +2 -0
  1140. package/types/utils/testMocks/error.d.ts +9 -0
  1141. package/types/utils/testMocks/message.d.ts +23 -0
  1142. package/types/utils/testMocks/messageRequestHandler.d.ts +15 -0
  1143. package/types/utils/typeHelpers/objectValues.d.ts +16 -0
  1144. package/types/utils/typeHelpers/partialDeep.d.ts +14 -0
  1145. package/types/utils/typeHelpers/reducers/createAction.d.ts +17 -0
  1146. package/types/utils/useDidMountEffect.d.ts +2 -0
  1147. package/types/utils/utils.d.ts +10 -0
  1148. package/types/utils/uuid.d.ts +2 -0
  1149. package/ui/Accordion.js +39 -52
  1150. package/ui/Accordion.js.map +1 -1
  1151. package/ui/AccordionGroup.js +9 -18
  1152. package/ui/AccordionGroup.js.map +1 -1
  1153. package/ui/AdminMessage.js +13 -19
  1154. package/ui/AdminMessage.js.map +1 -1
  1155. package/ui/Avatar.js +69 -189
  1156. package/ui/Avatar.js.map +1 -1
  1157. package/ui/Badge.js +18 -22
  1158. package/ui/Badge.js.map +1 -1
  1159. package/ui/BottomSheet.js +28 -34
  1160. package/ui/BottomSheet.js.map +1 -1
  1161. package/ui/Button.js +42 -53
  1162. package/ui/Button.js.map +1 -1
  1163. package/ui/ChannelAvatar.js +20 -43
  1164. package/ui/ChannelAvatar.js.map +1 -1
  1165. package/ui/Checkbox.js +15 -24
  1166. package/ui/Checkbox.js.map +1 -1
  1167. package/ui/ConnectionStatus.js +11 -18
  1168. package/ui/ConnectionStatus.js.map +1 -1
  1169. package/ui/ContextMenu.js +195 -280
  1170. package/ui/ContextMenu.js.map +1 -1
  1171. package/ui/DateSeparator.js +13 -24
  1172. package/ui/DateSeparator.js.map +1 -1
  1173. package/ui/EmojiReactions.js +142 -325
  1174. package/ui/EmojiReactions.js.map +1 -1
  1175. package/ui/FileMessageItemBody.js +30 -49
  1176. package/ui/FileMessageItemBody.js.map +1 -1
  1177. package/ui/FileViewer.js +17 -16
  1178. package/ui/FileViewer.js.map +1 -1
  1179. package/ui/Icon.js +541 -707
  1180. package/ui/Icon.js.map +1 -1
  1181. package/ui/IconButton.js +18 -45
  1182. package/ui/IconButton.js.map +1 -1
  1183. package/ui/ImageRenderer.js +102 -149
  1184. package/ui/ImageRenderer.js.map +1 -1
  1185. package/ui/Input.js +15 -37
  1186. package/ui/Input.js.map +1 -1
  1187. package/ui/Label.js +3 -3
  1188. package/ui/LinkLabel.js +21 -45
  1189. package/ui/LinkLabel.js.map +1 -1
  1190. package/ui/Loader.js +11 -21
  1191. package/ui/Loader.js.map +1 -1
  1192. package/ui/MentionLabel.js +47 -77
  1193. package/ui/MentionLabel.js.map +1 -1
  1194. package/ui/MentionUserLabel.js +4 -15
  1195. package/ui/MentionUserLabel.js.map +1 -1
  1196. package/ui/MessageContent.js +191 -398
  1197. package/ui/MessageContent.js.map +1 -1
  1198. package/ui/MessageInput/hooks/usePaste.js +5 -5
  1199. package/ui/MessageInput.js +448 -621
  1200. package/ui/MessageInput.js.map +1 -1
  1201. package/ui/MessageItemMenu.js +110 -162
  1202. package/ui/MessageItemMenu.js.map +1 -1
  1203. package/ui/MessageItemReactionMenu.js +39 -98
  1204. package/ui/MessageItemReactionMenu.js.map +1 -1
  1205. package/ui/MessageSearchFileItem.js +77 -110
  1206. package/ui/MessageSearchFileItem.js.map +1 -1
  1207. package/ui/MessageSearchItem.js +49 -79
  1208. package/ui/MessageSearchItem.js.map +1 -1
  1209. package/ui/MessageStatus.js +12 -12
  1210. package/ui/Modal.js +13 -126
  1211. package/ui/Modal.js.map +1 -1
  1212. package/ui/MutedAvatarOverlay.js +14 -26
  1213. package/ui/MutedAvatarOverlay.js.map +1 -1
  1214. package/ui/OGMessageItemBody.js +64 -105
  1215. package/ui/OGMessageItemBody.js.map +1 -1
  1216. package/ui/OpenChannelAdminMessage.js +9 -14
  1217. package/ui/OpenChannelAdminMessage.js.map +1 -1
  1218. package/ui/OpenChannelAvatar.js +14 -25
  1219. package/ui/OpenChannelAvatar.js.map +1 -1
  1220. package/ui/OpenchannelConversationHeader.js +21 -56
  1221. package/ui/OpenchannelConversationHeader.js.map +1 -1
  1222. package/ui/OpenchannelFileMessage.js +112 -232
  1223. package/ui/OpenchannelFileMessage.js.map +1 -1
  1224. package/ui/OpenchannelOGMessage.js +155 -326
  1225. package/ui/OpenchannelOGMessage.js.map +1 -1
  1226. package/ui/OpenchannelThumbnailMessage.js +150 -311
  1227. package/ui/OpenchannelThumbnailMessage.js.map +1 -1
  1228. package/ui/OpenchannelUserMessage.js +124 -262
  1229. package/ui/OpenchannelUserMessage.js.map +1 -1
  1230. package/ui/PlaceHolder.js +45 -100
  1231. package/ui/PlaceHolder.js.map +1 -1
  1232. package/ui/PlaybackTime.js +11 -21
  1233. package/ui/PlaybackTime.js.map +1 -1
  1234. package/ui/ProgressBar.js +12 -26
  1235. package/ui/ProgressBar.js.map +1 -1
  1236. package/ui/QuoteMessage.js +70 -142
  1237. package/ui/QuoteMessage.js.map +1 -1
  1238. package/ui/QuoteMessageInput.js +71 -98
  1239. package/ui/QuoteMessageInput.js.map +1 -1
  1240. package/ui/ReactionBadge.js +20 -42
  1241. package/ui/ReactionBadge.js.map +1 -1
  1242. package/ui/ReactionButton.js +17 -35
  1243. package/ui/ReactionButton.js.map +1 -1
  1244. package/ui/SortByRow.js +23 -31
  1245. package/ui/SortByRow.js.map +1 -1
  1246. package/ui/TextButton.js +9 -25
  1247. package/ui/TextButton.js.map +1 -1
  1248. package/ui/TextMessageItemBody.js +41 -53
  1249. package/ui/TextMessageItemBody.js.map +1 -1
  1250. package/ui/ThreadReplies.js +32 -66
  1251. package/ui/ThreadReplies.js.map +1 -1
  1252. package/ui/ThumbnailMessageItemBody.js +34 -70
  1253. package/ui/ThumbnailMessageItemBody.js.map +1 -1
  1254. package/ui/Toggle.js +110 -183
  1255. package/ui/Toggle.js.map +1 -1
  1256. package/ui/Tooltip.js +9 -16
  1257. package/ui/Tooltip.js.map +1 -1
  1258. package/ui/TooltipWrapper.js +13 -41
  1259. package/ui/TooltipWrapper.js.map +1 -1
  1260. package/ui/UnknownMessageItemBody.js +20 -30
  1261. package/ui/UnknownMessageItemBody.js.map +1 -1
  1262. package/ui/UserListItem.js +49 -112
  1263. package/ui/UserListItem.js.map +1 -1
  1264. package/ui/UserProfile.js +44 -69
  1265. package/ui/UserProfile.js.map +1 -1
  1266. package/ui/VoiceMessageItemBody.js +52 -101
  1267. package/ui/VoiceMessageItemBody.js.map +1 -1
  1268. package/ui/VoiceMessgeInput.js +9 -9
  1269. package/ui/Word.js +58 -83
  1270. package/ui/Word.js.map +1 -1
  1271. package/useSendbirdStateContext.js +15 -14
  1272. package/useSendbirdStateContext.js.map +1 -1
  1273. package/utils/message/getOutgoingMessageState.js +32 -29
  1274. package/utils/message/getOutgoingMessageState.js.map +1 -1
  1275. package/utils/message/isVoiceMessage.js +3 -3
  1276. package/utils/message/isVoiceMessage.js.map +1 -1
  1277. package/withSendbird.js +17 -18
  1278. package/withSendbird.js.map +1 -1
  1279. package/ChannelListProvider-eccd99c6.js +0 -1051
  1280. package/ChannelListProvider-eccd99c6.js.map +0 -1
  1281. package/ChannelProvider-9ba5893a.js +0 -2079
  1282. package/ChannelProvider-9ba5893a.js.map +0 -1
  1283. package/CreateChannelProvider-a2885972.js +0 -48
  1284. package/CreateChannelProvider-a2885972.js.map +0 -1
  1285. package/LocalizationContext-287ee149.js +0 -20
  1286. package/LocalizationContext-287ee149.js.map +0 -1
  1287. package/MediaQueryContext-114ca049.js +0 -85
  1288. package/MediaQueryContext-114ca049.js.map +0 -1
  1289. package/MemberList-4e71a841.js +0 -422
  1290. package/MemberList-4e71a841.js.map +0 -1
  1291. package/OpenChannelListProvider-45d4ab54.js +0 -407
  1292. package/OpenChannelListProvider-45d4ab54.js.map +0 -1
  1293. package/OpenChannelProvider-9818f9ed.js +0 -1850
  1294. package/OpenChannelProvider-9818f9ed.js.map +0 -1
  1295. package/RemoveMessageModal-007c2f04.js +0 -33
  1296. package/RemoveMessageModal-007c2f04.js.map +0 -1
  1297. package/UserProfileContext-2001a468.js +0 -34
  1298. package/UserProfileContext-2001a468.js.map +0 -1
  1299. package/WebAudioUtils-31f7c8eb.js +0 -126
  1300. package/WebAudioUtils-31f7c8eb.js.map +0 -1
  1301. package/_rollupPluginBabelHelpers-e92eb032.js +0 -66
  1302. package/_rollupPluginBabelHelpers-e92eb032.js.map +0 -1
  1303. package/actionTypes-324495ed.js +0 -8
  1304. package/actionTypes-324495ed.js.map +0 -1
  1305. package/cjs/ChannelListProvider-d0ad5a84.js +0 -1060
  1306. package/cjs/ChannelListProvider-d0ad5a84.js.map +0 -1
  1307. package/cjs/ChannelProvider-fc111e5f.js +0 -2087
  1308. package/cjs/ChannelProvider-fc111e5f.js.map +0 -1
  1309. package/cjs/CreateChannelProvider-c3c843e4.js +0 -55
  1310. package/cjs/CreateChannelProvider-c3c843e4.js.map +0 -1
  1311. package/cjs/LocalizationContext-58b6ed7c.js +0 -28
  1312. package/cjs/LocalizationContext-58b6ed7c.js.map +0 -1
  1313. package/cjs/MediaQueryContext-6141d955.js +0 -92
  1314. package/cjs/MediaQueryContext-6141d955.js.map +0 -1
  1315. package/cjs/MemberList-2bd3db33.js +0 -428
  1316. package/cjs/MemberList-2bd3db33.js.map +0 -1
  1317. package/cjs/OpenChannelListProvider-a8560978.js +0 -416
  1318. package/cjs/OpenChannelListProvider-a8560978.js.map +0 -1
  1319. package/cjs/OpenChannelProvider-39f13647.js +0 -1859
  1320. package/cjs/OpenChannelProvider-39f13647.js.map +0 -1
  1321. package/cjs/RemoveMessageModal-afc3e268.js +0 -39
  1322. package/cjs/RemoveMessageModal-afc3e268.js.map +0 -1
  1323. package/cjs/UserProfileContext-c6d7abb7.js +0 -41
  1324. package/cjs/UserProfileContext-c6d7abb7.js.map +0 -1
  1325. package/cjs/WebAudioUtils-36803ab2.js +0 -129
  1326. package/cjs/WebAudioUtils-36803ab2.js.map +0 -1
  1327. package/cjs/_rollupPluginBabelHelpers-f5b0dfb9.js +0 -69
  1328. package/cjs/_rollupPluginBabelHelpers-f5b0dfb9.js.map +0 -1
  1329. package/cjs/actionTypes-327123b5.js +0 -10
  1330. package/cjs/actionTypes-327123b5.js.map +0 -1
  1331. package/cjs/color-5bf5a8f5.js +0 -36
  1332. package/cjs/color-5bf5a8f5.js.map +0 -1
  1333. package/cjs/compareIds-28c6af62.js +0 -18
  1334. package/cjs/compareIds-28c6af62.js.map +0 -1
  1335. package/cjs/const-876980e8.js +0 -22
  1336. package/cjs/const-876980e8.js.map +0 -1
  1337. package/cjs/const-c9e7a340.js.map +0 -1
  1338. package/cjs/consts-61d83828.js.map +0 -1
  1339. package/cjs/consts-b3c4f548.js.map +0 -1
  1340. package/cjs/consts-b711321c.js.map +0 -1
  1341. package/cjs/consts-f54b15c2.js.map +0 -1
  1342. package/cjs/context-6684538e.js +0 -19
  1343. package/cjs/context-6684538e.js.map +0 -1
  1344. package/cjs/dist/index.css +0 -7702
  1345. package/cjs/dist/index.css.map +0 -1
  1346. package/cjs/index-134e9852.js.map +0 -1
  1347. package/cjs/index-3448df64.js.map +0 -1
  1348. package/cjs/index-45933be9.js +0 -197
  1349. package/cjs/index-45933be9.js.map +0 -1
  1350. package/cjs/index-4c378655.js +0 -163
  1351. package/cjs/index-4c378655.js.map +0 -1
  1352. package/cjs/index-4e939c26.js +0 -369
  1353. package/cjs/index-4e939c26.js.map +0 -1
  1354. package/cjs/index-520e12b8.js +0 -173
  1355. package/cjs/index-520e12b8.js.map +0 -1
  1356. package/cjs/index-54279ec2.js.map +0 -1
  1357. package/cjs/index-692ea6aa.js +0 -76
  1358. package/cjs/index-692ea6aa.js.map +0 -1
  1359. package/cjs/index-7627b546.js.map +0 -1
  1360. package/cjs/index-a95c4ab4.js +0 -308
  1361. package/cjs/index-a95c4ab4.js.map +0 -1
  1362. package/cjs/index-b5a9b4b7.js +0 -129
  1363. package/cjs/index-b5a9b4b7.js.map +0 -1
  1364. package/cjs/index-b8ba4548.js +0 -20
  1365. package/cjs/index-b8ba4548.js.map +0 -1
  1366. package/cjs/index-bc6623d7.js +0 -289
  1367. package/cjs/index-bc6623d7.js.map +0 -1
  1368. package/cjs/index-cc2e05a4.js +0 -227
  1369. package/cjs/index-cc2e05a4.js.map +0 -1
  1370. package/cjs/index-ce07a2a3.js +0 -59
  1371. package/cjs/index-ce07a2a3.js.map +0 -1
  1372. package/cjs/index-dbe8dd84.js +0 -741
  1373. package/cjs/index-dbe8dd84.js.map +0 -1
  1374. package/cjs/index-e5e6d9b0.js +0 -468
  1375. package/cjs/index-e5e6d9b0.js.map +0 -1
  1376. package/cjs/index-e8928da6.js.map +0 -1
  1377. package/cjs/resolvedReplyType-c4564ebe.js.map +0 -1
  1378. package/cjs/stringFormatterUtils-92dbef3c.js +0 -16
  1379. package/cjs/stringFormatterUtils-92dbef3c.js.map +0 -1
  1380. package/cjs/stringSet-1539ac47.js +0 -212
  1381. package/cjs/stringSet-1539ac47.js.map +0 -1
  1382. package/cjs/tokenize-d5286fa8.js +0 -159
  1383. package/cjs/tokenize-d5286fa8.js.map +0 -1
  1384. package/cjs/tslib.es6-c74b513f.js.map +0 -1
  1385. package/cjs/types-d0d770c3.js +0 -15
  1386. package/cjs/types-d0d770c3.js.map +0 -1
  1387. package/cjs/types-feda9656.js.map +0 -1
  1388. package/cjs/useHandleUploadFiles-39e8d107.js +0 -284
  1389. package/cjs/useHandleUploadFiles-39e8d107.js.map +0 -1
  1390. package/cjs/useLongPress-18b7af79.js +0 -105
  1391. package/cjs/useLongPress-18b7af79.js.map +0 -1
  1392. package/cjs/useSendMultipleFilesMessage-d6a3d5cf.js +0 -316
  1393. package/cjs/useSendMultipleFilesMessage-d6a3d5cf.js.map +0 -1
  1394. package/cjs/useStatefulFileInfoList-c510792f.js +0 -228
  1395. package/cjs/useStatefulFileInfoList-c510792f.js.map +0 -1
  1396. package/cjs/utils-1d0f1e0c.js +0 -28
  1397. package/cjs/utils-1d0f1e0c.js.map +0 -1
  1398. package/cjs/utils-9193a195.js +0 -170
  1399. package/cjs/utils-9193a195.js.map +0 -1
  1400. package/cjs/utils-93ca9d57.js +0 -62
  1401. package/cjs/utils-93ca9d57.js.map +0 -1
  1402. package/cjs/utils-98441ba6.js +0 -35
  1403. package/cjs/utils-98441ba6.js.map +0 -1
  1404. package/cjs/utils-e6c4b2b0.js +0 -27
  1405. package/cjs/utils-e6c4b2b0.js.map +0 -1
  1406. package/cjs/utils-eb6d90e0.js +0 -10
  1407. package/cjs/utils-eb6d90e0.js.map +0 -1
  1408. package/cjs/uuid-9a117e16.js.map +0 -1
  1409. package/color-57373b4c.js +0 -34
  1410. package/color-57373b4c.js.map +0 -1
  1411. package/compareIds-7e517404.js +0 -16
  1412. package/compareIds-7e517404.js.map +0 -1
  1413. package/const-73db0277.js.map +0 -1
  1414. package/const-93731a4c.js +0 -18
  1415. package/const-93731a4c.js.map +0 -1
  1416. package/consts-4ec7d640.js.map +0 -1
  1417. package/consts-57c888b9.js.map +0 -1
  1418. package/consts-be37687e.js.map +0 -1
  1419. package/consts-d9c5f25a.js.map +0 -1
  1420. package/context-729493c4.js +0 -12
  1421. package/context-729493c4.js.map +0 -1
  1422. package/index-04bd1a59.js +0 -13
  1423. package/index-04bd1a59.js.map +0 -1
  1424. package/index-09847c0f.js.map +0 -1
  1425. package/index-0f017704.js +0 -280
  1426. package/index-0f017704.js.map +0 -1
  1427. package/index-2d27aeef.js.map +0 -1
  1428. package/index-493689bd.js +0 -156
  1429. package/index-493689bd.js.map +0 -1
  1430. package/index-494f9e79.js +0 -73
  1431. package/index-494f9e79.js.map +0 -1
  1432. package/index-4b4e9682.js +0 -161
  1433. package/index-4b4e9682.js.map +0 -1
  1434. package/index-62d5f020.js +0 -362
  1435. package/index-62d5f020.js.map +0 -1
  1436. package/index-682a192c.js.map +0 -1
  1437. package/index-686a551d.js +0 -182
  1438. package/index-686a551d.js.map +0 -1
  1439. package/index-6b3b1eca.js +0 -217
  1440. package/index-6b3b1eca.js.map +0 -1
  1441. package/index-776554c0.js +0 -692
  1442. package/index-776554c0.js.map +0 -1
  1443. package/index-92741c7e.js +0 -118
  1444. package/index-92741c7e.js.map +0 -1
  1445. package/index-a0638563.js +0 -53
  1446. package/index-a0638563.js.map +0 -1
  1447. package/index-c22e4772.js +0 -462
  1448. package/index-c22e4772.js.map +0 -1
  1449. package/index-e04159fe.js +0 -298
  1450. package/index-e04159fe.js.map +0 -1
  1451. package/index-e4277f9c.js.map +0 -1
  1452. package/index-f8a9cb51.js.map +0 -1
  1453. package/index.d.ts +0 -2963
  1454. package/resolvedReplyType-fb987595.js.map +0 -1
  1455. package/stringFormatterUtils-abbe70ba.js +0 -14
  1456. package/stringFormatterUtils-abbe70ba.js.map +0 -1
  1457. package/stringSet-6422c6b9.js +0 -210
  1458. package/stringSet-6422c6b9.js.map +0 -1
  1459. package/tokenize-eae44765.js +0 -154
  1460. package/tokenize-eae44765.js.map +0 -1
  1461. package/tslib.es6-c2fb729e.js.map +0 -1
  1462. package/types-781e0bab.js.map +0 -1
  1463. package/types-9d43ac6e.js +0 -15
  1464. package/types-9d43ac6e.js.map +0 -1
  1465. package/useHandleUploadFiles-5ede1bfe.js +0 -277
  1466. package/useHandleUploadFiles-5ede1bfe.js.map +0 -1
  1467. package/useLongPress-f8655a14.js +0 -103
  1468. package/useLongPress-f8655a14.js.map +0 -1
  1469. package/useSendMultipleFilesMessage-b8256698.js +0 -283
  1470. package/useSendMultipleFilesMessage-b8256698.js.map +0 -1
  1471. package/useStatefulFileInfoList-5e68b93f.js +0 -219
  1472. package/useStatefulFileInfoList-5e68b93f.js.map +0 -1
  1473. package/utils-2c1f072b.js +0 -31
  1474. package/utils-2c1f072b.js.map +0 -1
  1475. package/utils-6c50a6d1.js +0 -7
  1476. package/utils-6c50a6d1.js.map +0 -1
  1477. package/utils-aa4086dc.js +0 -157
  1478. package/utils-aa4086dc.js.map +0 -1
  1479. package/utils-bfc0ab3b.js +0 -57
  1480. package/utils-bfc0ab3b.js.map +0 -1
  1481. package/utils-fa321757.js +0 -26
  1482. package/utils-fa321757.js.map +0 -1
  1483. package/utils-fc1f5aa0.js +0 -25
  1484. package/utils-fc1f5aa0.js.map +0 -1
  1485. package/uuid-c15b8b3b.js.map +0 -1
@@ -1,1294 +1,1059 @@
1
- import { _ as __assign, a as __awaiter, b as __generator, c as __spreadArray } from './tslib.es6-c2fb729e.js';
1
+ import { _ as __assign, c as __awaiter, d as __generator, a as __spreadArray } from './chunks/bundle-hKtwSqbO.js';
2
2
  import React__default, { useLayoutEffect, useState, useEffect, useCallback, useMemo, useReducer } from 'react';
3
3
  import { UIKitConfigProvider, useUIKitConfig } from '@sendbird/uikit-tools';
4
4
  import { SendbirdSdkContext } from './withSendbird.js';
5
5
  import cssVars from 'css-vars-ponyfill';
6
- import { K } from './index-09847c0f.js';
7
- import { U as USER_ACTIONS } from './actionTypes-324495ed.js';
6
+ import { K } from './chunks/bundle-9KsbryQI.js';
7
+ import { U as USER_ACTIONS } from './chunks/bundle-Q8dtkDOa.js';
8
8
  import SendbirdChat, { ConnectionHandler, SendbirdProduct, SendbirdPlatform, DeviceOsPlatform } from '@sendbird/chat';
9
- import { u as uuidv4 } from './uuid-c15b8b3b.js';
9
+ import { u as uuidv4 } from './chunks/bundle-bofQNMJb.js';
10
10
  import { OpenChannelModule } from '@sendbird/chat/openChannel';
11
11
  import { GroupChannelModule } from '@sendbird/chat/groupChannel';
12
- import { i as isTextuallyNull } from './index-776554c0.js';
13
- import { n as noop } from './utils-6c50a6d1.js';
14
- import { V as VoicePlayerProvider } from './index-e04159fe.js';
12
+ import { X as isTextuallyNull } from './chunks/bundle-EHReigfD.js';
13
+ import { n as noop } from './chunks/bundle-v9a1_z0P.js';
14
+ import { b as VoicePlayerProvider } from './chunks/bundle-53PRRrlp.js';
15
15
  import { VoiceRecorderProvider } from './VoiceRecorder/context.js';
16
- import { L as LocalizationProvider } from './LocalizationContext-287ee149.js';
17
- import { u as useMediaQueryContext, M as MediaQueryProvider } from './MediaQueryContext-114ca049.js';
18
- import { g as getStringSet } from './stringSet-6422c6b9.js';
19
- import { D as DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, V as VOICE_RECORDER_DEFAULT_MAX, a as VOICE_RECORDER_DEFAULT_MIN } from './consts-d9c5f25a.js';
20
- import { g as getCaseResolvedReplyType, a as getCaseResolvedThreadReplySelectType } from './resolvedReplyType-fb987595.js';
16
+ import { a as LocalizationProvider } from './chunks/bundle-v0OWADVv.js';
17
+ import { u as useMediaQueryContext, M as MediaQueryProvider } from './chunks/bundle-x-4ukZm_.js';
18
+ import { g as getStringSet } from './chunks/bundle-5yKxJk_M.js';
19
+ import { k as DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, l as VOICE_RECORDER_DEFAULT_MAX, d as VOICE_RECORDER_DEFAULT_MIN } from './chunks/bundle-WCTKBopn.js';
20
+ import { a as getCaseResolvedReplyType, g as getCaseResolvedThreadReplySelectType } from './chunks/bundle-5iuNyt5M.js';
21
21
  import { GlobalModalProvider } from './hooks/useModal.js';
22
22
  export { useSendbirdStateContext } from './useSendbirdStateContext.js';
23
23
  import './utils/message/getOutgoingMessageState.js';
24
- import './ui/Modal.js';
24
+ import './chunks/bundle-rLxuFUa1.js';
25
25
  import 'react-dom';
26
- import './index-04bd1a59.js';
27
26
  import './ui/IconButton.js';
28
27
  import './ui/Button.js';
29
- import './index-92741c7e.js';
30
- import 'prop-types';
31
- import './types-9d43ac6e.js';
28
+ import './chunks/bundle-wMgBBDf9.js';
32
29
  import './ui/Icon.js';
33
- import './index-e4277f9c.js';
34
- import './_rollupPluginBabelHelpers-e92eb032.js';
30
+ import './chunks/bundle-FTgSGiKe.js';
35
31
 
36
- var isEmpty = function (obj) {
37
- if (obj === null || obj === undefined) {
38
- return true;
39
- }
40
- for (var prop in obj) {
41
- if (obj.hasOwnProperty(prop)) {
42
- return false;
43
- }
44
- }
45
- return JSON.stringify(obj) === JSON.stringify({});
46
- };
47
- var useTheme = function (overrides) {
48
- useLayoutEffect(function () {
49
- if (!isEmpty(overrides)) {
50
- cssVars({
51
- variables: __assign({
52
- '--sendbird-dark-primary-500': '#4d2aa6',
53
- '--sendbird-dark-primary-400': '#6440C4',
54
- '--sendbird-dark-primary-300': '#7B53EF',
55
- '--sendbird-dark-primary-200': '#9E8CF5',
56
- '--sendbird-dark-primary-100': '#E2DFFF',
57
- '--sendbird-dark-secondary-500': '#007A7A',
58
- '--sendbird-dark-secondary-400': '#189A8D',
59
- '--sendbird-dark-secondary-300': '#2EBA9F',
60
- '--sendbird-dark-secondary-200': '#6FD6BE',
61
- '--sendbird-dark-secondary-100': '#AEF2DC',
62
- '--sendbird-dark-information-100': '#b2d9ff',
63
- '--sendbird-dark-error-500': '#A30E2D',
64
- '--sendbird-dark-error-400': '#C11F41',
65
- '--sendbird-dark-error-300': '#E53157',
66
- '--sendbird-dark-error-200': '#FF6183',
67
- '--sendbird-dark-error-100': '#FFABBD',
68
- '--sendbird-dark-background-700': '#000000',
69
- '--sendbird-dark-background-600': '#161616',
70
- '--sendbird-dark-background-500': '#2C2C2C',
71
- '--sendbird-dark-background-400': '#393939',
72
- '--sendbird-dark-background-300': '#A8A8A8',
73
- '--sendbird-dark-background-200': '#D9D9D9',
74
- '--sendbird-dark-background-100': '#F0F0F0',
75
- '--sendbird-dark-background-50': '#FFFFFF',
76
- '--sendbird-dark-overlay': 'rgba(0, 0, 0, 0.32)',
77
- '--sendbird-dark-onlight-01': 'rgba(0, 0, 0, 0.88)',
78
- '--sendbird-dark-onlight-02': 'rgba(0, 0, 0, 0.50)',
79
- '--sendbird-dark-onlight-03': 'rgba(0, 0, 0, 0.38)',
80
- '--sendbird-dark-onlight-04': 'rgba(0, 0, 0, 0.12)',
81
- '--sendbird-dark-ondark-01': 'rgba(255, 255, 255, 0.88)',
82
- '--sendbird-dark-ondark-02': 'rgba(255, 255, 255, 0.50)',
83
- '--sendbird-dark-ondark-03': 'rgba(255, 255, 255, 0.38)',
84
- '--sendbird-dark-ondark-04': 'rgba(255, 255, 255, 0.12)',
85
- '--sendbird-dark-shadow-01': '0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)',
86
- '--sendbird-dark-shadow-02': '0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)',
87
- '--sendbird-dark-shadow-03': '0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)',
88
- '--sendbird-dark-shadow-04': '0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)',
89
- '--sendbird-dark-shadow-message-input': '0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)',
90
- '--sendbird-light-primary-500': '#4d2aa6',
91
- '--sendbird-light-primary-400': '#6440C4',
92
- '--sendbird-light-primary-300': '#7B53EF',
93
- '--sendbird-light-primary-200': '#9E8CF5',
94
- '--sendbird-light-primary-100': '#E2DFFF',
95
- '--sendbird-light-secondary-500': '#007A7A',
96
- '--sendbird-light-secondary-400': '#189A8D',
97
- '--sendbird-light-secondary-300': '#2EBA9F',
98
- '--sendbird-light-secondary-200': '#6FD6BE',
99
- '--sendbird-light-secondary-100': '#AEF2DC',
100
- '--sendbird-light-information-100': '#b2d9ff',
101
- '--sendbird-light-error-500': '#A30E2D',
102
- '--sendbird-light-error-400': '#C11F41',
103
- '--sendbird-light-error-300': '#E53157',
104
- '--sendbird-light-error-200': '#FF6183',
105
- '--sendbird-light-error-100': '#FFABBD',
106
- '--sendbird-light-background-700': '#000000',
107
- '--sendbird-light-background-600': '#161616',
108
- '--sendbird-light-background-500': '#2C2C2C',
109
- '--sendbird-light-background-400': '#393939',
110
- '--sendbird-light-background-300': '#A8A8A8',
111
- '--sendbird-light-background-200': '#D9D9D9',
112
- '--sendbird-light-background-100': '#F0F0F0',
113
- '--sendbird-light-background-50': ' #FFFFFF',
114
- '--sendbird-light-overlay': 'rgba(0, 0, 0, 0.32)',
115
- '--sendbird-light-onlight-01': 'rgba(0, 0, 0, 0.88)',
116
- '--sendbird-light-onlight-02': 'rgba(0, 0, 0, 0.50)',
117
- '--sendbird-light-onlight-03': 'rgba(0, 0, 0, 0.38)',
118
- '--sendbird-light-onlight-04': 'rgba(0, 0, 0, 0.12)',
119
- '--sendbird-light-ondark-01': 'rgba(255, 255, 255, 0.88)',
120
- '--sendbird-light-ondark-02': 'rgba(255, 255, 255, 0.50)',
121
- '--sendbird-light-ondark-03': 'rgba(255, 255, 255, 0.38)',
122
- '--sendbird-light-ondark-04': 'rgba(255, 255, 255, 0.12)',
123
- '--sendbird-light-shadow-01': '0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)',
124
- '--sendbird-light-shadow-02': '0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)',
125
- '--sendbird-light-shadow-03': '0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)',
126
- '--sendbird-light-shadow-04': '0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)',
127
- '--sendbird-light-shadow-message-input': '0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)'
128
- }, overrides)
129
- });
130
- }
131
- }, [overrides]);
32
+ var isEmpty = function (obj) {
33
+ if (obj === null || obj === undefined) {
34
+ return true;
35
+ }
36
+ for (var prop in obj) {
37
+ if (obj.hasOwnProperty(prop)) {
38
+ return false;
39
+ }
40
+ }
41
+ return JSON.stringify(obj) === JSON.stringify({});
42
+ };
43
+ var useTheme = function (overrides) {
44
+ useLayoutEffect(function () {
45
+ if (!isEmpty(overrides)) {
46
+ cssVars({
47
+ variables: __assign({
48
+ '--sendbird-dark-primary-500': '#4d2aa6',
49
+ '--sendbird-dark-primary-400': '#6440C4',
50
+ '--sendbird-dark-primary-300': '#7B53EF',
51
+ '--sendbird-dark-primary-200': '#9E8CF5',
52
+ '--sendbird-dark-primary-100': '#E2DFFF',
53
+ '--sendbird-dark-secondary-500': '#007A7A',
54
+ '--sendbird-dark-secondary-400': '#189A8D',
55
+ '--sendbird-dark-secondary-300': '#2EBA9F',
56
+ '--sendbird-dark-secondary-200': '#6FD6BE',
57
+ '--sendbird-dark-secondary-100': '#AEF2DC',
58
+ '--sendbird-dark-information-100': '#b2d9ff',
59
+ '--sendbird-dark-error-500': '#A30E2D',
60
+ '--sendbird-dark-error-400': '#C11F41',
61
+ '--sendbird-dark-error-300': '#E53157',
62
+ '--sendbird-dark-error-200': '#FF6183',
63
+ '--sendbird-dark-error-100': '#FFABBD',
64
+ '--sendbird-dark-background-700': '#000000',
65
+ '--sendbird-dark-background-600': '#161616',
66
+ '--sendbird-dark-background-500': '#2C2C2C',
67
+ '--sendbird-dark-background-400': '#393939',
68
+ '--sendbird-dark-background-300': '#A8A8A8',
69
+ '--sendbird-dark-background-200': '#D9D9D9',
70
+ '--sendbird-dark-background-100': '#F0F0F0',
71
+ '--sendbird-dark-background-50': '#FFFFFF',
72
+ '--sendbird-dark-overlay': 'rgba(0, 0, 0, 0.32)',
73
+ '--sendbird-dark-onlight-01': 'rgba(0, 0, 0, 0.88)',
74
+ '--sendbird-dark-onlight-02': 'rgba(0, 0, 0, 0.50)',
75
+ '--sendbird-dark-onlight-03': 'rgba(0, 0, 0, 0.38)',
76
+ '--sendbird-dark-onlight-04': 'rgba(0, 0, 0, 0.12)',
77
+ '--sendbird-dark-ondark-01': 'rgba(255, 255, 255, 0.88)',
78
+ '--sendbird-dark-ondark-02': 'rgba(255, 255, 255, 0.50)',
79
+ '--sendbird-dark-ondark-03': 'rgba(255, 255, 255, 0.38)',
80
+ '--sendbird-dark-ondark-04': 'rgba(255, 255, 255, 0.12)',
81
+ '--sendbird-dark-shadow-01': '0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)',
82
+ '--sendbird-dark-shadow-02': '0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)',
83
+ '--sendbird-dark-shadow-03': '0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)',
84
+ '--sendbird-dark-shadow-04': '0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)',
85
+ '--sendbird-dark-shadow-message-input': '0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)',
86
+ '--sendbird-light-primary-500': '#4d2aa6',
87
+ '--sendbird-light-primary-400': '#6440C4',
88
+ '--sendbird-light-primary-300': '#7B53EF',
89
+ '--sendbird-light-primary-200': '#9E8CF5',
90
+ '--sendbird-light-primary-100': '#E2DFFF',
91
+ '--sendbird-light-secondary-500': '#007A7A',
92
+ '--sendbird-light-secondary-400': '#189A8D',
93
+ '--sendbird-light-secondary-300': '#2EBA9F',
94
+ '--sendbird-light-secondary-200': '#6FD6BE',
95
+ '--sendbird-light-secondary-100': '#AEF2DC',
96
+ '--sendbird-light-information-100': '#b2d9ff',
97
+ '--sendbird-light-error-500': '#A30E2D',
98
+ '--sendbird-light-error-400': '#C11F41',
99
+ '--sendbird-light-error-300': '#E53157',
100
+ '--sendbird-light-error-200': '#FF6183',
101
+ '--sendbird-light-error-100': '#FFABBD',
102
+ '--sendbird-light-background-700': '#000000',
103
+ '--sendbird-light-background-600': '#161616',
104
+ '--sendbird-light-background-500': '#2C2C2C',
105
+ '--sendbird-light-background-400': '#393939',
106
+ '--sendbird-light-background-300': '#A8A8A8',
107
+ '--sendbird-light-background-200': '#D9D9D9',
108
+ '--sendbird-light-background-100': '#F0F0F0',
109
+ '--sendbird-light-background-50': ' #FFFFFF',
110
+ '--sendbird-light-overlay': 'rgba(0, 0, 0, 0.32)',
111
+ '--sendbird-light-onlight-01': 'rgba(0, 0, 0, 0.88)',
112
+ '--sendbird-light-onlight-02': 'rgba(0, 0, 0, 0.50)',
113
+ '--sendbird-light-onlight-03': 'rgba(0, 0, 0, 0.38)',
114
+ '--sendbird-light-onlight-04': 'rgba(0, 0, 0, 0.12)',
115
+ '--sendbird-light-ondark-01': 'rgba(255, 255, 255, 0.88)',
116
+ '--sendbird-light-ondark-02': 'rgba(255, 255, 255, 0.50)',
117
+ '--sendbird-light-ondark-03': 'rgba(255, 255, 255, 0.38)',
118
+ '--sendbird-light-ondark-04': 'rgba(255, 255, 255, 0.12)',
119
+ '--sendbird-light-shadow-01': '0 1px 5px 0 rgba(33, 34, 66, 0.04), 0 0 3px 0 rgba(0, 0, 0, 0.08), 0 2px 1px 0 rgba(0, 0, 0, 0.12)',
120
+ '--sendbird-light-shadow-02': '0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(0, 0, 0, 0.08), 0 8px 10px 1px rgba(0, 0, 0, 0.12)',
121
+ '--sendbird-light-shadow-03': '0 6px 10px -5px rgba(0, 0, 0, 0.04), 0 6px 30px 5px rgba(0, 0, 0, 0.08), 0 16px 24px 2px rgba(0, 0, 0, 0.12)',
122
+ '--sendbird-light-shadow-04': '0 9px 15px -7px rgba(0, 0, 0, 0.04), 0 9px 46px 8px rgba(0, 0, 0, 0.08), 0 24px 38px 3px rgba(0, 0, 0, 0.12)',
123
+ '--sendbird-light-shadow-message-input': '0 1px 5px 0 rgba(33, 34, 66, 0.12), 0 0 1px 0 rgba(33, 34, 66, 0.16), 0 2px 1px 0 rgba(33, 34, 66, 0.08), 0 1px 5px 0 rgba(0, 0, 0, 0.12)',
124
+ }, overrides),
125
+ });
126
+ }
127
+ }, [overrides]);
132
128
  };
133
129
 
134
- var SDK_ACTIONS = {
135
- INIT_SDK: 'INIT_SDK',
136
- SET_SDK_LOADING: 'SET_SDK_LOADING',
137
- RESET_SDK: 'RESET_SDK',
138
- SDK_ERROR: 'SDK_ERROR'
130
+ var SDK_ACTIONS = {
131
+ INIT_SDK: 'INIT_SDK',
132
+ SET_SDK_LOADING: 'SET_SDK_LOADING',
133
+ RESET_SDK: 'RESET_SDK',
134
+ SDK_ERROR: 'SDK_ERROR',
139
135
  };
140
136
 
141
- var initialState$1 = {
142
- initialized: false,
143
- loading: false,
144
- sdk: {},
145
- error: false
137
+ var initialState$1 = {
138
+ initialized: false,
139
+ loading: false,
140
+ sdk: {},
141
+ error: false,
146
142
  };
147
143
 
148
- function reducer$1(state, action) {
149
- return K(action).with({
150
- type: SDK_ACTIONS.SET_SDK_LOADING
151
- }, function (_a) {
152
- var payload = _a.payload;
153
- return __assign(__assign({}, state), {
154
- initialized: false,
155
- loading: payload
156
- });
157
- }).with({
158
- type: SDK_ACTIONS.SDK_ERROR
159
- }, function () {
160
- return __assign(__assign({}, state), {
161
- initialized: false,
162
- loading: false,
163
- error: true
164
- });
165
- }).with({
166
- type: SDK_ACTIONS.INIT_SDK
167
- }, function (_a) {
168
- var payload = _a.payload;
169
- return {
170
- sdk: payload,
171
- initialized: true,
172
- loading: false,
173
- error: false
174
- };
175
- }).with({
176
- type: SDK_ACTIONS.RESET_SDK
177
- }, function () {
178
- return initialState$1;
179
- }).otherwise(function () {
180
- return state;
181
- });
144
+ function reducer$1(state, action) {
145
+ return K(action)
146
+ .with({ type: SDK_ACTIONS.SET_SDK_LOADING }, function (_a) {
147
+ var payload = _a.payload;
148
+ return __assign(__assign({}, state), { initialized: false, loading: payload });
149
+ })
150
+ .with({ type: SDK_ACTIONS.SDK_ERROR }, function () {
151
+ return __assign(__assign({}, state), { initialized: false, loading: false, error: true });
152
+ })
153
+ .with({ type: SDK_ACTIONS.INIT_SDK }, function (_a) {
154
+ var payload = _a.payload;
155
+ return {
156
+ sdk: payload,
157
+ initialized: true,
158
+ loading: false,
159
+ error: false,
160
+ };
161
+ })
162
+ .with({ type: SDK_ACTIONS.RESET_SDK }, function () {
163
+ return initialState$1;
164
+ })
165
+ .otherwise(function () {
166
+ return state;
167
+ });
182
168
  }
183
169
 
184
- var initialState = {
185
- initialized: false,
186
- loading: false,
187
- user: {}
170
+ var initialState = {
171
+ initialized: false,
172
+ loading: false,
173
+ user: {},
188
174
  };
189
175
 
190
- function reducer(state, action) {
191
- return K(action).with({
192
- type: USER_ACTIONS.INIT_USER
193
- }, function (_a) {
194
- var payload = _a.payload;
195
- return {
196
- initialized: true,
197
- loading: false,
198
- user: payload
199
- };
200
- }).with({
201
- type: USER_ACTIONS.RESET_USER
202
- }, function () {
203
- return initialState;
204
- }).with({
205
- type: USER_ACTIONS.UPDATE_USER_INFO
206
- }, function (_a) {
207
- var payload = _a.payload;
208
- return __assign(__assign({}, state), {
209
- user: payload
210
- });
211
- }).otherwise(function () {
212
- return state;
213
- });
214
- }
215
-
216
- function useOnlineStatus(sdk, logger) {
217
- var _a, _b;
218
- var _c = useState((_b = (_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.onLine) !== null && _b !== void 0 ? _b : true),
219
- isOnline = _c[0],
220
- setIsOnline = _c[1];
221
- useEffect(function () {
222
- var uniqueHandlerId = uuidv4();
223
- try {
224
- logger.warning('sdk changed', uniqueHandlerId);
225
- var handler = new ConnectionHandler({
226
- onDisconnected: function () {
227
- setIsOnline(false);
228
- logger.warning('onDisconnected', {
229
- isOnline: isOnline
230
- });
231
- },
232
- onReconnectStarted: function () {
233
- setIsOnline(false);
234
- logger.warning('onReconnectStarted', {
235
- isOnline: isOnline
236
- });
237
- },
238
- onReconnectSucceeded: function () {
239
- setIsOnline(true);
240
- logger.warning('onReconnectSucceeded', {
241
- isOnline: isOnline
242
- });
243
- },
244
- onReconnectFailed: function () {
245
- sdk.reconnect();
246
- logger.warning('onReconnectFailed');
247
- }
248
- });
249
- if (sdk === null || sdk === void 0 ? void 0 : sdk.addConnectionHandler) {
250
- // workaround -> addConnectionHandler invalidates session handler
251
- // provided through configureSession
252
- sdk.addConnectionHandler(uniqueHandlerId, handler);
253
- logger.info('Added ConnectionHandler', uniqueHandlerId);
254
- }
255
- } catch (_a) {
256
- //
257
- }
258
- return function () {
259
- try {
260
- sdk.removeConnectionHandler(uniqueHandlerId);
261
- logger.info('Removed ConnectionHandler', uniqueHandlerId);
262
- } catch (_a) {
263
- //
264
- }
265
- };
266
- }, [sdk]);
267
- useEffect(function () {
268
- var tryReconnect = function () {
269
- try {
270
- logger.warning('Try reconnecting SDK');
271
- if (sdk.connectionState !== 'OPEN') {
272
- // connection is not broken yet
273
- sdk.reconnect();
274
- }
275
- } catch (_a) {
276
- //
277
- }
278
- };
279
- // addEventListener version
280
- window.addEventListener('online', tryReconnect);
281
- return function () {
282
- window.removeEventListener('online', tryReconnect);
283
- };
284
- }, [sdk]);
285
- // add offline-class to body
286
- useEffect(function () {
287
- var body = document.querySelector('body');
288
- if (!isOnline) {
289
- try {
290
- body.classList.add('sendbird__offline');
291
- logger.info('Added class sendbird__offline to body');
292
- } catch (e) {
293
- //
294
- }
295
- } else {
296
- try {
297
- body.classList.remove('sendbird__offline');
298
- logger.info('Removed class sendbird__offline from body');
299
- } catch (e) {
300
- //
301
- }
302
- }
303
- }, [isOnline]);
304
- return isOnline;
176
+ function reducer(state, action) {
177
+ return K(action)
178
+ .with({ type: USER_ACTIONS.INIT_USER }, function (_a) {
179
+ var payload = _a.payload;
180
+ return {
181
+ initialized: true,
182
+ loading: false,
183
+ user: payload,
184
+ };
185
+ })
186
+ .with({ type: USER_ACTIONS.RESET_USER }, function () {
187
+ return initialState;
188
+ })
189
+ .with({ type: USER_ACTIONS.UPDATE_USER_INFO }, function (_a) {
190
+ var payload = _a.payload;
191
+ return __assign(__assign({}, state), { user: payload });
192
+ })
193
+ .otherwise(function () {
194
+ return state;
195
+ });
305
196
  }
306
197
 
307
- function disconnectSdk(_a) {
308
- var sdkDispatcher = _a.sdkDispatcher,
309
- userDispatcher = _a.userDispatcher,
310
- sdk = _a.sdk;
311
- return __awaiter(this, void 0, void 0, function () {
312
- return __generator(this, function (_b) {
313
- return [2 /*return*/, new Promise(function (resolve) {
314
- sdkDispatcher({
315
- type: SDK_ACTIONS.SET_SDK_LOADING,
316
- payload: true
317
- });
318
- if (sdk === null || sdk === void 0 ? void 0 : sdk.disconnect) {
319
- sdk.disconnect().then(function () {
320
- sdkDispatcher({
321
- type: SDK_ACTIONS.RESET_SDK
322
- });
323
- userDispatcher({
324
- type: USER_ACTIONS.RESET_USER
325
- });
326
- }).finally(function () {
327
- resolve(true);
328
- });
329
- } else {
330
- resolve(true);
331
- }
332
- })];
333
- });
334
- });
198
+ function useOnlineStatus(sdk, logger) {
199
+ var _a, _b;
200
+ var _c = useState((_b = (_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.onLine) !== null && _b !== void 0 ? _b : true), isOnline = _c[0], setIsOnline = _c[1];
201
+ useEffect(function () {
202
+ var uniqueHandlerId = uuidv4();
203
+ try {
204
+ logger.warning('sdk changed', uniqueHandlerId);
205
+ var handler = new ConnectionHandler({
206
+ onDisconnected: function () {
207
+ setIsOnline(false);
208
+ logger.warning('onDisconnected', { isOnline: isOnline });
209
+ },
210
+ onReconnectStarted: function () {
211
+ setIsOnline(false);
212
+ logger.warning('onReconnectStarted', { isOnline: isOnline });
213
+ },
214
+ onReconnectSucceeded: function () {
215
+ setIsOnline(true);
216
+ logger.warning('onReconnectSucceeded', { isOnline: isOnline });
217
+ },
218
+ onReconnectFailed: function () {
219
+ sdk.reconnect();
220
+ logger.warning('onReconnectFailed');
221
+ },
222
+ });
223
+ if (sdk === null || sdk === void 0 ? void 0 : sdk.addConnectionHandler) {
224
+ // workaround -> addConnectionHandler invalidates session handler
225
+ // provided through configureSession
226
+ sdk.addConnectionHandler(uniqueHandlerId, handler);
227
+ logger.info('Added ConnectionHandler', uniqueHandlerId);
228
+ }
229
+ }
230
+ catch (_a) {
231
+ //
232
+ }
233
+ return function () {
234
+ try {
235
+ sdk.removeConnectionHandler(uniqueHandlerId);
236
+ logger.info('Removed ConnectionHandler', uniqueHandlerId);
237
+ }
238
+ catch (_a) {
239
+ //
240
+ }
241
+ };
242
+ }, [sdk]);
243
+ useEffect(function () {
244
+ var tryReconnect = function () {
245
+ try {
246
+ logger.warning('Try reconnecting SDK');
247
+ if (sdk.connectionState !== 'OPEN') { // connection is not broken yet
248
+ sdk.reconnect();
249
+ }
250
+ }
251
+ catch (_a) {
252
+ //
253
+ }
254
+ };
255
+ // addEventListener version
256
+ window.addEventListener('online', tryReconnect);
257
+ return function () {
258
+ window.removeEventListener('online', tryReconnect);
259
+ };
260
+ }, [sdk]);
261
+ // add offline-class to body
262
+ useEffect(function () {
263
+ var body = document.querySelector('body');
264
+ if (!isOnline) {
265
+ try {
266
+ body.classList.add('sendbird__offline');
267
+ logger.info('Added class sendbird__offline to body');
268
+ }
269
+ catch (e) {
270
+ //
271
+ }
272
+ }
273
+ else {
274
+ try {
275
+ body.classList.remove('sendbird__offline');
276
+ logger.info('Removed class sendbird__offline from body');
277
+ }
278
+ catch (e) {
279
+ //
280
+ }
281
+ }
282
+ }, [isOnline]);
283
+ return isOnline;
335
284
  }
336
285
 
337
- var APP_VERSION_STRING = '3.7.0';
338
- var INIT_SDK = SDK_ACTIONS.INIT_SDK,
339
- SET_SDK_LOADING = SDK_ACTIONS.SET_SDK_LOADING,
340
- RESET_SDK = SDK_ACTIONS.RESET_SDK,
341
- SDK_ERROR = SDK_ACTIONS.SDK_ERROR;
342
- var INIT_USER = USER_ACTIONS.INIT_USER,
343
- UPDATE_USER_INFO = USER_ACTIONS.UPDATE_USER_INFO,
344
- RESET_USER = USER_ACTIONS.RESET_USER;
345
- function getMissingParamError(_a) {
346
- var userId = _a.userId,
347
- appId = _a.appId;
348
- return "SendbirdProvider | useConnect/setupConnection/Connection failed UserId: ".concat(userId, " or appId: ").concat(appId, " missing");
286
+ function disconnectSdk(_a) {
287
+ var sdkDispatcher = _a.sdkDispatcher, userDispatcher = _a.userDispatcher, sdk = _a.sdk;
288
+ return __awaiter(this, void 0, void 0, function () {
289
+ return __generator(this, function (_b) {
290
+ return [2 /*return*/, new Promise(function (resolve) {
291
+ sdkDispatcher({ type: SDK_ACTIONS.SET_SDK_LOADING, payload: true });
292
+ if (sdk === null || sdk === void 0 ? void 0 : sdk.disconnect) {
293
+ sdk.disconnect()
294
+ .then(function () {
295
+ sdkDispatcher({ type: SDK_ACTIONS.RESET_SDK });
296
+ userDispatcher({ type: USER_ACTIONS.RESET_USER });
297
+ })
298
+ .finally(function () {
299
+ resolve(true);
300
+ });
301
+ }
302
+ else {
303
+ resolve(true);
304
+ }
305
+ })];
306
+ });
307
+ });
349
308
  }
350
- function getConnectSbError(error) {
351
- return "SendbirdProvider | useConnect/setupConnection/Connection failed. ".concat((error === null || error === void 0 ? void 0 : error.code) || '', " ").concat((error === null || error === void 0 ? void 0 : error.message) || '');
352
- }
353
- function setUpParams(_a) {
354
- var appId = _a.appId,
355
- customApiHost = _a.customApiHost,
356
- customWebSocketHost = _a.customWebSocketHost,
357
- sdkInitParams = _a.sdkInitParams;
358
- var params = __assign(__assign({
359
- modules: [new GroupChannelModule(), new OpenChannelModule()],
360
- newInstance: true
361
- }, sdkInitParams !== null && sdkInitParams !== void 0 ? sdkInitParams : {}), {
362
- // appId shouldn't be overrided
363
- appId: appId
364
- });
365
- if (customApiHost) {
366
- params['customApiHost'] = customApiHost;
367
- }
368
- if (customWebSocketHost) {
369
- params['customWebSocketHost'] = customWebSocketHost;
370
- }
371
- var newSdk = SendbirdChat.init(params);
372
- return newSdk;
373
- }
374
- // Steps
375
- // 1. Check if minimum userID/appID is provided
376
- // 1.a. If not, throw error > !reject
377
- // 1.b. If yes, continue
378
- // 2. Set up params with custom host if provided
379
- // 3. Set up session handler if provided
380
- // 4. Set up version
381
- // 5. Connect to Sendbird -> either using user ID or (user ID + access token)
382
- // 6. If connected, connectCbSucess
383
- // 6.a check if nickname is to be updated -> no > !resolve immediately
384
- // 6.b check if nickname is to be updated -> yes > update nickname > !resolve
385
- // 7. If not connected, connectCbError > !reject
386
- function setUpConnection(_a) {
387
- var logger = _a.logger,
388
- sdkDispatcher = _a.sdkDispatcher,
389
- userDispatcher = _a.userDispatcher,
390
- initDashboardConfigs = _a.initDashboardConfigs,
391
- userId = _a.userId,
392
- appId = _a.appId,
393
- customApiHost = _a.customApiHost,
394
- customWebSocketHost = _a.customWebSocketHost,
395
- configureSession = _a.configureSession,
396
- nickname = _a.nickname,
397
- profileUrl = _a.profileUrl,
398
- accessToken = _a.accessToken,
399
- isUserIdUsedForNickname = _a.isUserIdUsedForNickname,
400
- sdkInitParams = _a.sdkInitParams,
401
- customExtensionParams = _a.customExtensionParams,
402
- _b = _a.isMobile,
403
- isMobile = _b === void 0 ? false : _b;
404
- return __awaiter(this, void 0, void 0, function () {
405
- var _this = this;
406
- return __generator(this, function (_c) {
407
- return [2 /*return*/, new Promise(function (resolve, reject) {
408
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
409
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/init', {
410
- userId: userId,
411
- appId: appId
412
- });
413
- sdkDispatcher({
414
- type: SET_SDK_LOADING,
415
- payload: true
416
- });
417
- if (userId && appId) {
418
- var newSdk_1 = setUpParams({
419
- appId: appId,
420
- customApiHost: customApiHost,
421
- customWebSocketHost: customWebSocketHost,
422
- sdkInitParams: sdkInitParams
423
- });
424
- if (configureSession && typeof configureSession === 'function') {
425
- var sessionHandler = configureSession(newSdk_1);
426
- (_b = logger === null || logger === void 0 ? void 0 : logger.info) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/setupConnection/configureSession', sessionHandler);
427
- newSdk_1.setSessionHandler(sessionHandler);
428
- }
429
- (_c = logger === null || logger === void 0 ? void 0 : logger.info) === null || _c === void 0 ? void 0 : _c.call(logger, 'SendbirdProvider | useConnect/setupConnection/setVersion', {
430
- version: APP_VERSION_STRING
431
- });
432
- /**
433
- * Keep optional chaining to the addSendbirdExtensions
434
- * for supporting the ChatSDK v4.9.5 or less
435
- */
436
- (_d = newSdk_1 === null || newSdk_1 === void 0 ? void 0 : newSdk_1.addSendbirdExtensions) === null || _d === void 0 ? void 0 : _d.call(newSdk_1, [{
437
- product: (_e = SendbirdProduct === null || SendbirdProduct === void 0 ? void 0 : SendbirdProduct.UIKIT_CHAT) !== null && _e !== void 0 ? _e : 'uikit-chat',
438
- version: APP_VERSION_STRING,
439
- platform: (_f = SendbirdPlatform === null || SendbirdPlatform === void 0 ? void 0 : SendbirdPlatform.JS) !== null && _f !== void 0 ? _f : 'js'
440
- }], {
441
- platform: isMobile ? (_g = DeviceOsPlatform === null || DeviceOsPlatform === void 0 ? void 0 : DeviceOsPlatform.MOBILE_WEB) !== null && _g !== void 0 ? _g : 'mobile_web' : (_h = DeviceOsPlatform === null || DeviceOsPlatform === void 0 ? void 0 : DeviceOsPlatform.WEB) !== null && _h !== void 0 ? _h : 'web'
442
- }, customExtensionParams);
443
- newSdk_1.addExtension('sb_uikit', APP_VERSION_STRING);
444
- var connectCbSucess_1 = function (user) {
445
- return __awaiter(_this, void 0, void 0, function () {
446
- var _a, _b;
447
- return __generator(this, function (_c) {
448
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/connectCbSucess', user);
449
- sdkDispatcher({
450
- type: INIT_SDK,
451
- payload: newSdk_1
452
- });
453
- userDispatcher({
454
- type: INIT_USER,
455
- payload: user
456
- });
457
- initDashboardConfigs(newSdk_1).then(function (config) {
458
- var _a;
459
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration success', {
460
- config: config
461
- });
462
- }).catch(function (error) {
463
- var _a;
464
- (_a = logger === null || logger === void 0 ? void 0 : logger.error) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration failed', {
465
- error: error
466
- });
467
- });
468
- // use nickname/profileUrl if provided
469
- // or set userID as nickname
470
- if ((nickname !== user.nickname || profileUrl !== user.profileUrl) && !(isTextuallyNull(nickname) && isTextuallyNull(profileUrl))) {
471
- (_b = logger === null || logger === void 0 ? void 0 : logger.info) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo', {
472
- nickname: nickname,
473
- profileUrl: profileUrl
474
- });
475
- newSdk_1.updateCurrentUserInfo({
476
- nickname: nickname || user.nickname || (isUserIdUsedForNickname ? user.userId : ''),
477
- profileUrl: profileUrl || user.profileUrl
478
- }).then(function (namedUser) {
479
- var _a;
480
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo success', {
481
- nickname: nickname,
482
- profileUrl: profileUrl
483
- });
484
- userDispatcher({
485
- type: UPDATE_USER_INFO,
486
- payload: namedUser
487
- });
488
- }).finally(function () {
489
- resolve();
490
- });
491
- } else {
492
- resolve();
493
- }
494
- return [2 /*return*/];
495
- });
496
- });
497
- };
498
309
 
499
- var connectCbError_1 = function (e) {
500
- var _a;
501
- var errorMessage = getConnectSbError(e);
502
- (_a = logger === null || logger === void 0 ? void 0 : logger.error) === null || _a === void 0 ? void 0 : _a.call(logger, errorMessage, {
503
- e: e,
504
- appId: appId,
505
- userId: userId
506
- });
507
- sdkDispatcher({
508
- type: RESET_SDK
509
- });
510
- userDispatcher({
511
- type: RESET_USER
512
- });
513
- sdkDispatcher({
514
- type: SDK_ERROR
515
- });
516
- // exit promise with error
517
- reject(errorMessage);
518
- };
519
- (_j = logger === null || logger === void 0 ? void 0 : logger.info) === null || _j === void 0 ? void 0 : _j.call(logger, "SendbirdProvider | useConnect/setupConnection/connect connecting using ".concat(accessToken !== null && accessToken !== void 0 ? accessToken : userId));
520
- newSdk_1.connect(userId, accessToken).then(function (res) {
521
- return connectCbSucess_1(res);
522
- }).catch(function (err) {
523
- return connectCbError_1(err);
524
- });
525
- } else {
526
- var errorMessage = getMissingParamError({
527
- userId: userId,
528
- appId: appId
529
- });
530
- sdkDispatcher({
531
- type: SDK_ERROR
532
- });
533
- (_k = logger === null || logger === void 0 ? void 0 : logger.error) === null || _k === void 0 ? void 0 : _k.call(logger, errorMessage);
534
- // exit promise with error
535
- reject(errorMessage);
536
- }
537
- })];
538
- });
539
- });
310
+ var APP_VERSION_STRING = '3.8.0';
311
+ var INIT_SDK = SDK_ACTIONS.INIT_SDK, SET_SDK_LOADING = SDK_ACTIONS.SET_SDK_LOADING, RESET_SDK = SDK_ACTIONS.RESET_SDK, SDK_ERROR = SDK_ACTIONS.SDK_ERROR;
312
+ var INIT_USER = USER_ACTIONS.INIT_USER, UPDATE_USER_INFO = USER_ACTIONS.UPDATE_USER_INFO, RESET_USER = USER_ACTIONS.RESET_USER;
313
+ function getMissingParamError(_a) {
314
+ var userId = _a.userId, appId = _a.appId;
315
+ return "SendbirdProvider | useConnect/setupConnection/Connection failed UserId: ".concat(userId, " or appId: ").concat(appId, " missing");
316
+ }
317
+ function getConnectSbError(error) {
318
+ return "SendbirdProvider | useConnect/setupConnection/Connection failed. ".concat((error === null || error === void 0 ? void 0 : error.code) || '', " ").concat((error === null || error === void 0 ? void 0 : error.message) || '');
319
+ }
320
+ function setUpParams(_a) {
321
+ var appId = _a.appId, customApiHost = _a.customApiHost, customWebSocketHost = _a.customWebSocketHost, _b = _a.sdkInitParams, sdkInitParams = _b === void 0 ? {} : _b;
322
+ var params = Object.assign(sdkInitParams, {
323
+ appId: appId,
324
+ modules: [new GroupChannelModule(), new OpenChannelModule()],
325
+ newInstance: true,
326
+ });
327
+ if (customApiHost)
328
+ params.customApiHost = customApiHost;
329
+ if (customWebSocketHost)
330
+ params.customWebSocketHost = customWebSocketHost;
331
+ return SendbirdChat.init(params);
332
+ }
333
+ // Steps
334
+ // 1. Check if minimum userID/appID is provided
335
+ // 1.a. If not, throw error > !reject
336
+ // 1.b. If yes, continue
337
+ // 2. Set up params with custom host if provided
338
+ // 3. Set up session handler if provided
339
+ // 4. Set up version
340
+ // 5. Connect to Sendbird -> either using user ID or (user ID + access token)
341
+ // 6. If connected, connectCbSucess
342
+ // 6.a check if nickname is to be updated -> no > !resolve immediately
343
+ // 6.b check if nickname is to be updated -> yes > update nickname > !resolve
344
+ // 7. If not connected, connectCbError > !reject
345
+ function setUpConnection(_a) {
346
+ var logger = _a.logger, sdkDispatcher = _a.sdkDispatcher, userDispatcher = _a.userDispatcher, initDashboardConfigs = _a.initDashboardConfigs, userId = _a.userId, appId = _a.appId, customApiHost = _a.customApiHost, customWebSocketHost = _a.customWebSocketHost, configureSession = _a.configureSession, nickname = _a.nickname, profileUrl = _a.profileUrl, accessToken = _a.accessToken, isUserIdUsedForNickname = _a.isUserIdUsedForNickname, sdkInitParams = _a.sdkInitParams, customExtensionParams = _a.customExtensionParams, _b = _a.isMobile, isMobile = _b === void 0 ? false : _b;
347
+ return __awaiter(this, void 0, void 0, function () {
348
+ var _this = this;
349
+ return __generator(this, function (_c) {
350
+ return [2 /*return*/, new Promise(function (resolve, reject) {
351
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
352
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/init', { userId: userId, appId: appId });
353
+ sdkDispatcher({ type: SET_SDK_LOADING, payload: true });
354
+ if (userId && appId) {
355
+ var newSdk_1 = setUpParams({
356
+ appId: appId,
357
+ customApiHost: customApiHost,
358
+ customWebSocketHost: customWebSocketHost,
359
+ sdkInitParams: sdkInitParams,
360
+ });
361
+ if (configureSession && typeof configureSession === 'function') {
362
+ var sessionHandler = configureSession(newSdk_1);
363
+ (_b = logger === null || logger === void 0 ? void 0 : logger.info) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/setupConnection/configureSession', sessionHandler);
364
+ newSdk_1.setSessionHandler(sessionHandler);
365
+ }
366
+ (_c = logger === null || logger === void 0 ? void 0 : logger.info) === null || _c === void 0 ? void 0 : _c.call(logger, 'SendbirdProvider | useConnect/setupConnection/setVersion', { version: APP_VERSION_STRING });
367
+ /**
368
+ * Keep optional chaining to the addSendbirdExtensions
369
+ * for supporting the ChatSDK v4.9.5 or less
370
+ */
371
+ (_d = newSdk_1 === null || newSdk_1 === void 0 ? void 0 : newSdk_1.addSendbirdExtensions) === null || _d === void 0 ? void 0 : _d.call(newSdk_1, [
372
+ {
373
+ product: (_e = SendbirdProduct === null || SendbirdProduct === void 0 ? void 0 : SendbirdProduct.UIKIT_CHAT) !== null && _e !== void 0 ? _e : 'uikit-chat',
374
+ version: APP_VERSION_STRING,
375
+ platform: (_f = SendbirdPlatform === null || SendbirdPlatform === void 0 ? void 0 : SendbirdPlatform.JS) !== null && _f !== void 0 ? _f : 'js',
376
+ },
377
+ ], {
378
+ platform: (isMobile
379
+ ? (_g = DeviceOsPlatform === null || DeviceOsPlatform === void 0 ? void 0 : DeviceOsPlatform.MOBILE_WEB) !== null && _g !== void 0 ? _g : 'mobile_web'
380
+ : (_h = DeviceOsPlatform === null || DeviceOsPlatform === void 0 ? void 0 : DeviceOsPlatform.WEB) !== null && _h !== void 0 ? _h : 'web'),
381
+ }, customExtensionParams);
382
+ newSdk_1.addExtension('sb_uikit', APP_VERSION_STRING);
383
+ var connectCbSucess_1 = function (user) { return __awaiter(_this, void 0, void 0, function () {
384
+ var _a, _b;
385
+ return __generator(this, function (_c) {
386
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/connectCbSucess', user);
387
+ sdkDispatcher({ type: INIT_SDK, payload: newSdk_1 });
388
+ userDispatcher({ type: INIT_USER, payload: user });
389
+ initDashboardConfigs(newSdk_1)
390
+ .then(function (config) {
391
+ var _a;
392
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration success', {
393
+ config: config,
394
+ });
395
+ })
396
+ .catch(function (error) {
397
+ var _a;
398
+ (_a = logger === null || logger === void 0 ? void 0 : logger.error) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/getUIKitConfiguration failed', {
399
+ error: error,
400
+ });
401
+ });
402
+ // use nickname/profileUrl if provided
403
+ // or set userID as nickname
404
+ if ((nickname !== user.nickname || profileUrl !== user.profileUrl)
405
+ && !(isTextuallyNull(nickname) && isTextuallyNull(profileUrl))) {
406
+ (_b = logger === null || logger === void 0 ? void 0 : logger.info) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo', {
407
+ nickname: nickname,
408
+ profileUrl: profileUrl,
409
+ });
410
+ newSdk_1.updateCurrentUserInfo({
411
+ nickname: nickname || user.nickname || (isUserIdUsedForNickname ? user.userId : ''),
412
+ profileUrl: profileUrl || user.profileUrl,
413
+ }).then(function (namedUser) {
414
+ var _a;
415
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/setupConnection/updateCurrentUserInfo success', {
416
+ nickname: nickname,
417
+ profileUrl: profileUrl,
418
+ });
419
+ userDispatcher({ type: UPDATE_USER_INFO, payload: namedUser });
420
+ }).finally(function () {
421
+ resolve();
422
+ });
423
+ }
424
+ else {
425
+ resolve();
426
+ }
427
+ return [2 /*return*/];
428
+ });
429
+ }); };
430
+ var connectCbError_1 = function (e) {
431
+ var _a;
432
+ var errorMessage = getConnectSbError(e);
433
+ (_a = logger === null || logger === void 0 ? void 0 : logger.error) === null || _a === void 0 ? void 0 : _a.call(logger, errorMessage, {
434
+ e: e,
435
+ appId: appId,
436
+ userId: userId,
437
+ });
438
+ sdkDispatcher({ type: RESET_SDK });
439
+ userDispatcher({ type: RESET_USER });
440
+ sdkDispatcher({ type: SDK_ERROR });
441
+ // exit promise with error
442
+ reject(errorMessage);
443
+ };
444
+ (_j = logger === null || logger === void 0 ? void 0 : logger.info) === null || _j === void 0 ? void 0 : _j.call(logger, "SendbirdProvider | useConnect/setupConnection/connect connecting using ".concat(accessToken !== null && accessToken !== void 0 ? accessToken : userId));
445
+ newSdk_1.connect(userId, accessToken)
446
+ .then(function (res) { return connectCbSucess_1(res); })
447
+ .catch(function (err) { return connectCbError_1(err); });
448
+ }
449
+ else {
450
+ var errorMessage = getMissingParamError({ userId: userId, appId: appId });
451
+ sdkDispatcher({ type: SDK_ERROR });
452
+ (_k = logger === null || logger === void 0 ? void 0 : logger.error) === null || _k === void 0 ? void 0 : _k.call(logger, errorMessage);
453
+ // exit promise with error
454
+ reject(errorMessage);
455
+ }
456
+ })];
457
+ });
458
+ });
540
459
  }
541
460
 
542
- function connect(_a) {
543
- var logger = _a.logger,
544
- sdkDispatcher = _a.sdkDispatcher,
545
- userDispatcher = _a.userDispatcher,
546
- initDashboardConfigs = _a.initDashboardConfigs,
547
- userId = _a.userId,
548
- appId = _a.appId,
549
- customApiHost = _a.customApiHost,
550
- customWebSocketHost = _a.customWebSocketHost,
551
- configureSession = _a.configureSession,
552
- nickname = _a.nickname,
553
- profileUrl = _a.profileUrl,
554
- accessToken = _a.accessToken,
555
- sdk = _a.sdk,
556
- sdkInitParams = _a.sdkInitParams,
557
- customExtensionParams = _a.customExtensionParams,
558
- isMobile = _a.isMobile;
559
- return __awaiter(this, void 0, void 0, function () {
560
- return __generator(this, function (_b) {
561
- switch (_b.label) {
562
- case 0:
563
- return [4 /*yield*/, disconnectSdk({
564
- logger: logger,
565
- sdkDispatcher: sdkDispatcher,
566
- userDispatcher: userDispatcher,
567
- sdk: sdk
568
- })];
569
- case 1:
570
- _b.sent();
571
- return [4 /*yield*/, setUpConnection({
572
- logger: logger,
573
- sdkDispatcher: sdkDispatcher,
574
- userDispatcher: userDispatcher,
575
- initDashboardConfigs: initDashboardConfigs,
576
- userId: userId,
577
- appId: appId,
578
- customApiHost: customApiHost,
579
- customWebSocketHost: customWebSocketHost,
580
- configureSession: configureSession,
581
- nickname: nickname,
582
- profileUrl: profileUrl,
583
- accessToken: accessToken,
584
- sdkInitParams: sdkInitParams,
585
- customExtensionParams: customExtensionParams,
586
- isMobile: isMobile
587
- })];
588
- case 2:
589
- _b.sent();
590
- return [2 /*return*/];
591
- }
592
- });
593
- });
461
+ function connect(_a) {
462
+ var logger = _a.logger, sdkDispatcher = _a.sdkDispatcher, userDispatcher = _a.userDispatcher, initDashboardConfigs = _a.initDashboardConfigs, userId = _a.userId, appId = _a.appId, customApiHost = _a.customApiHost, customWebSocketHost = _a.customWebSocketHost, configureSession = _a.configureSession, nickname = _a.nickname, profileUrl = _a.profileUrl, accessToken = _a.accessToken, sdk = _a.sdk, sdkInitParams = _a.sdkInitParams, customExtensionParams = _a.customExtensionParams, isMobile = _a.isMobile;
463
+ return __awaiter(this, void 0, void 0, function () {
464
+ return __generator(this, function (_b) {
465
+ switch (_b.label) {
466
+ case 0: return [4 /*yield*/, disconnectSdk({
467
+ logger: logger,
468
+ sdkDispatcher: sdkDispatcher,
469
+ userDispatcher: userDispatcher,
470
+ sdk: sdk,
471
+ })];
472
+ case 1:
473
+ _b.sent();
474
+ return [4 /*yield*/, setUpConnection({
475
+ logger: logger,
476
+ sdkDispatcher: sdkDispatcher,
477
+ userDispatcher: userDispatcher,
478
+ initDashboardConfigs: initDashboardConfigs,
479
+ userId: userId,
480
+ appId: appId,
481
+ customApiHost: customApiHost,
482
+ customWebSocketHost: customWebSocketHost,
483
+ configureSession: configureSession,
484
+ nickname: nickname,
485
+ profileUrl: profileUrl,
486
+ accessToken: accessToken,
487
+ sdkInitParams: sdkInitParams,
488
+ customExtensionParams: customExtensionParams,
489
+ isMobile: isMobile,
490
+ })];
491
+ case 2:
492
+ _b.sent();
493
+ return [2 /*return*/];
494
+ }
495
+ });
496
+ });
594
497
  }
595
498
 
596
- function useConnect(triggerTypes, staticTypes) {
597
- var _a;
598
- var userId = triggerTypes.userId,
599
- appId = triggerTypes.appId,
600
- accessToken = triggerTypes.accessToken,
601
- isMobile = triggerTypes.isMobile,
602
- isUserIdUsedForNickname = triggerTypes.isUserIdUsedForNickname;
603
- var logger = staticTypes.logger,
604
- nickname = staticTypes.nickname,
605
- profileUrl = staticTypes.profileUrl,
606
- configureSession = staticTypes.configureSession,
607
- customApiHost = staticTypes.customApiHost,
608
- customWebSocketHost = staticTypes.customWebSocketHost,
609
- sdk = staticTypes.sdk,
610
- sdkDispatcher = staticTypes.sdkDispatcher,
611
- userDispatcher = staticTypes.userDispatcher,
612
- initDashboardConfigs = staticTypes.initDashboardConfigs,
613
- sdkInitParams = staticTypes.sdkInitParams,
614
- customExtensionParams = staticTypes.customExtensionParams;
615
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect', __assign(__assign({}, triggerTypes), staticTypes));
616
- useEffect(function () {
617
- var _a, _b;
618
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/useEffect', {
619
- userId: userId,
620
- appId: appId,
621
- accessToken: accessToken
622
- });
623
- try {
624
- connect({
625
- userId: userId,
626
- appId: appId,
627
- accessToken: accessToken,
628
- logger: logger,
629
- nickname: nickname,
630
- profileUrl: profileUrl,
631
- configureSession: configureSession,
632
- customApiHost: customApiHost,
633
- customWebSocketHost: customWebSocketHost,
634
- sdk: sdk,
635
- sdkDispatcher: sdkDispatcher,
636
- userDispatcher: userDispatcher,
637
- initDashboardConfigs: initDashboardConfigs,
638
- isUserIdUsedForNickname: isUserIdUsedForNickname,
639
- sdkInitParams: sdkInitParams,
640
- customExtensionParams: customExtensionParams,
641
- isMobile: isMobile
642
- });
643
- } catch (error) {
644
- (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/useEffect', error);
645
- }
646
- }, [userId, appId, accessToken]);
647
- var reconnect = useCallback(function () {
648
- var _a, _b;
649
- (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/reconnect/useCallback', {
650
- sdk: sdk
651
- });
652
- try {
653
- connect({
654
- userId: userId,
655
- appId: appId,
656
- accessToken: accessToken,
657
- logger: logger,
658
- nickname: nickname,
659
- profileUrl: profileUrl,
660
- configureSession: configureSession,
661
- customApiHost: customApiHost,
662
- customWebSocketHost: customWebSocketHost,
663
- sdk: sdk,
664
- sdkDispatcher: sdkDispatcher,
665
- userDispatcher: userDispatcher,
666
- initDashboardConfigs: initDashboardConfigs,
667
- isUserIdUsedForNickname: isUserIdUsedForNickname,
668
- sdkInitParams: sdkInitParams,
669
- customExtensionParams: customExtensionParams,
670
- isMobile: isMobile
671
- });
672
- } catch (error) {
673
- (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/reconnect/useCallback', error);
674
- }
675
- }, [sdk]);
676
- return reconnect;
499
+ function useConnect(triggerTypes, staticTypes) {
500
+ var _this = this;
501
+ var _a;
502
+ var userId = triggerTypes.userId, appId = triggerTypes.appId, accessToken = triggerTypes.accessToken, isMobile = triggerTypes.isMobile, isUserIdUsedForNickname = triggerTypes.isUserIdUsedForNickname;
503
+ var logger = staticTypes.logger, nickname = staticTypes.nickname, profileUrl = staticTypes.profileUrl, configureSession = staticTypes.configureSession, customApiHost = staticTypes.customApiHost, customWebSocketHost = staticTypes.customWebSocketHost, sdk = staticTypes.sdk, sdkDispatcher = staticTypes.sdkDispatcher, userDispatcher = staticTypes.userDispatcher, initDashboardConfigs = staticTypes.initDashboardConfigs, sdkInitParams = staticTypes.sdkInitParams, customExtensionParams = staticTypes.customExtensionParams;
504
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect', __assign(__assign({}, triggerTypes), staticTypes));
505
+ useEffect(function () {
506
+ var _a;
507
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/useEffect', { userId: userId, appId: appId, accessToken: accessToken });
508
+ connect({
509
+ userId: userId,
510
+ appId: appId,
511
+ accessToken: accessToken,
512
+ logger: logger,
513
+ nickname: nickname,
514
+ profileUrl: profileUrl,
515
+ configureSession: configureSession,
516
+ customApiHost: customApiHost,
517
+ customWebSocketHost: customWebSocketHost,
518
+ sdk: sdk,
519
+ sdkDispatcher: sdkDispatcher,
520
+ userDispatcher: userDispatcher,
521
+ initDashboardConfigs: initDashboardConfigs,
522
+ isUserIdUsedForNickname: isUserIdUsedForNickname,
523
+ sdkInitParams: sdkInitParams,
524
+ customExtensionParams: customExtensionParams,
525
+ isMobile: isMobile,
526
+ }).catch(function (error) {
527
+ var _a;
528
+ (_a = logger === null || logger === void 0 ? void 0 : logger.error) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/useEffect', error);
529
+ });
530
+ }, [userId, appId, accessToken]);
531
+ var reconnect = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
532
+ var error_1;
533
+ var _a, _b;
534
+ return __generator(this, function (_c) {
535
+ switch (_c.label) {
536
+ case 0:
537
+ (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, 'SendbirdProvider | useConnect/reconnect/useCallback', { sdk: sdk });
538
+ _c.label = 1;
539
+ case 1:
540
+ _c.trys.push([1, 3, , 4]);
541
+ return [4 /*yield*/, connect({
542
+ userId: userId,
543
+ appId: appId,
544
+ accessToken: accessToken,
545
+ logger: logger,
546
+ nickname: nickname,
547
+ profileUrl: profileUrl,
548
+ configureSession: configureSession,
549
+ customApiHost: customApiHost,
550
+ customWebSocketHost: customWebSocketHost,
551
+ sdk: sdk,
552
+ sdkDispatcher: sdkDispatcher,
553
+ userDispatcher: userDispatcher,
554
+ initDashboardConfigs: initDashboardConfigs,
555
+ isUserIdUsedForNickname: isUserIdUsedForNickname,
556
+ sdkInitParams: sdkInitParams,
557
+ customExtensionParams: customExtensionParams,
558
+ isMobile: isMobile,
559
+ })];
560
+ case 2:
561
+ _c.sent();
562
+ return [3 /*break*/, 4];
563
+ case 3:
564
+ error_1 = _c.sent();
565
+ (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, 'SendbirdProvider | useConnect/reconnect/useCallback', error_1);
566
+ return [3 /*break*/, 4];
567
+ case 4: return [2 /*return*/];
568
+ }
569
+ });
570
+ }); }, [sdk]);
571
+ return reconnect;
677
572
  }
678
573
 
679
- // Logger, pretty much explains it
680
- // const [logger, setLogger] = useState(LoggerFactory(logLevel));
681
- var LOG_LEVELS = {
682
- DEBUG: 'debug',
683
- WARNING: 'warning',
684
- ERROR: 'error',
685
- INFO: 'info',
686
- ALL: 'all'
687
- };
688
- var colorLog = function (level) {
689
- switch (level) {
690
- case LOG_LEVELS.WARNING:
691
- return 'color: Orange';
692
- case LOG_LEVELS.ERROR:
693
- return 'color: Red';
694
- default:
695
- return 'color: Gray';
696
- }
697
- };
698
- var printLog = function (_a) {
699
- var level = _a.level,
700
- title = _a.title,
701
- _b = _a.description,
702
- description = _b === void 0 ? '' : _b,
703
- _c = _a.payload,
704
- payload = _c === void 0 ? [] : _c;
705
- // eslint-disable-next-line no-console
706
- console.log.apply(console, __spreadArray(["%c SendbirdUIKit | ".concat(level, " | ").concat(new Date().toISOString(), " | ").concat(title, " ").concat(description && '|'), colorLog(level), description], payload, false));
707
- };
708
- var getDefaultLogger = function () {
709
- return {
710
- info: noop,
711
- error: noop,
712
- warning: noop
713
- };
714
- };
715
- var LoggerFactory = function (lvl, customInterface) {
716
- var logInterface = customInterface || printLog;
717
- var lvlArray = Array.isArray(lvl) ? lvl : [lvl];
718
- var applyLog = function (lgLvl) {
719
- return function (title, description) {
720
- var payload = [];
721
- for (var _i = 2; _i < arguments.length; _i++) {
722
- payload[_i - 2] = arguments[_i];
723
- }
724
- return logInterface({
725
- level: lgLvl,
726
- title: title,
727
- description: description,
728
- payload: payload
729
- });
730
- };
731
- };
732
- return lvlArray.reduce(function (accumulator, currentLvl) {
733
- if (currentLvl === LOG_LEVELS.DEBUG || currentLvl === LOG_LEVELS.ALL) {
734
- return __assign(__assign({}, accumulator), {
735
- info: applyLog(LOG_LEVELS.INFO),
736
- error: applyLog(LOG_LEVELS.ERROR),
737
- warning: applyLog(LOG_LEVELS.WARNING)
738
- });
739
- }
740
- if (currentLvl === LOG_LEVELS.INFO) {
741
- return __assign(__assign({}, accumulator), {
742
- info: applyLog(LOG_LEVELS.INFO)
743
- });
744
- }
745
- if (currentLvl === LOG_LEVELS.ERROR) {
746
- return __assign(__assign({}, accumulator), {
747
- error: applyLog(LOG_LEVELS.ERROR)
748
- });
749
- }
750
- if (currentLvl === LOG_LEVELS.WARNING) {
751
- return __assign(__assign({}, accumulator), {
752
- warning: applyLog(LOG_LEVELS.WARNING)
753
- });
754
- }
755
- return __assign({}, accumulator);
756
- }, getDefaultLogger());
757
- };
574
+ // Logger, pretty much explains it
575
+ // in SendbirdProvider
576
+ // const [logger, setLogger] = useState(LoggerFactory(logLevel));
577
+ var LOG_LEVELS = {
578
+ DEBUG: 'debug',
579
+ WARNING: 'warning',
580
+ ERROR: 'error',
581
+ INFO: 'info',
582
+ ALL: 'all',
583
+ };
584
+ var colorLog = function (level) {
585
+ switch (level) {
586
+ case LOG_LEVELS.WARNING:
587
+ return ('color: Orange');
588
+ case LOG_LEVELS.ERROR:
589
+ return ('color: Red');
590
+ default:
591
+ return ('color: Gray');
592
+ }
593
+ };
594
+ var printLog = function (_a) {
595
+ var level = _a.level, title = _a.title, _b = _a.description, description = _b === void 0 ? '' : _b, _c = _a.payload, payload = _c === void 0 ? [] : _c;
596
+ // eslint-disable-next-line no-console
597
+ console.log.apply(console, __spreadArray(["%c SendbirdUIKit | ".concat(level, " | ").concat(new Date().toISOString(), " | ").concat(title, " ").concat(description && '|'), colorLog(level), description], payload, false));
598
+ };
599
+ var getDefaultLogger = function () { return ({
600
+ info: noop,
601
+ error: noop,
602
+ warning: noop,
603
+ }); };
604
+ var LoggerFactory = function (lvl, customInterface) {
605
+ var logInterface = customInterface || printLog;
606
+ var lvlArray = Array.isArray(lvl) ? lvl : [lvl];
607
+ var applyLog = function (lgLvl) { return function (title, description) {
608
+ var payload = [];
609
+ for (var _i = 2; _i < arguments.length; _i++) {
610
+ payload[_i - 2] = arguments[_i];
611
+ }
612
+ return logInterface({
613
+ level: lgLvl,
614
+ title: title,
615
+ description: description,
616
+ payload: payload,
617
+ });
618
+ }; };
619
+ return lvlArray.reduce(function (accumulator, currentLvl) {
620
+ if (currentLvl === LOG_LEVELS.DEBUG || currentLvl === LOG_LEVELS.ALL) {
621
+ return (__assign(__assign({}, accumulator), { info: applyLog(LOG_LEVELS.INFO), error: applyLog(LOG_LEVELS.ERROR), warning: applyLog(LOG_LEVELS.WARNING) }));
622
+ }
623
+ if (currentLvl === LOG_LEVELS.INFO) {
624
+ return (__assign(__assign({}, accumulator), { info: applyLog(LOG_LEVELS.INFO) }));
625
+ }
626
+ if (currentLvl === LOG_LEVELS.ERROR) {
627
+ return (__assign(__assign({}, accumulator), { error: applyLog(LOG_LEVELS.ERROR) }));
628
+ }
629
+ if (currentLvl === LOG_LEVELS.WARNING) {
630
+ return (__assign(__assign({}, accumulator), { warning: applyLog(LOG_LEVELS.WARNING) }));
631
+ }
632
+ return __assign({}, accumulator);
633
+ }, getDefaultLogger());
634
+ };
758
635
  // TODO: Make this to hook, useLogger
759
636
 
760
- // https://davidwalsh.name/pubsub-javascript
761
- // we use pubsub to sync events between multiple components(example - ChannelList, Channel)
762
- // for example, if customer sends a message from their custom component
763
- // without pubsub,we would not be able to listen to it
764
- // in our ChannelList or Conversation
765
- var pubSubFactory = function () {
766
- var topics = {};
767
- var hOP = topics.hasOwnProperty;
768
- return {
769
- __getTopics: function () {
770
- return topics;
771
- },
772
- subscribe: function (topic, listener) {
773
- // Create the topic's object if not yet created
774
- if (!hOP.call(topics, topic)) {
775
- topics[topic] = [];
776
- }
777
- // Add the listener to queue
778
- var index = topics[topic].push(listener) - 1;
779
- // Provide handle back for removal of topic
780
- return {
781
- remove: function () {
782
- topics[topic].splice(index, 1);
783
- }
784
- };
785
- },
786
- publish: function (topic, info) {
787
- // If the topic doesn't exist, or there's no listeners in queue, just leave
788
- if (!hOP.call(topics, topic)) {
789
- return;
790
- }
791
- // Cycle through topics queue, fire!
792
- topics[topic].forEach(function (item) {
793
- item(info !== undefined ? info : {});
794
- });
795
- }
796
- };
637
+ // https://davidwalsh.name/pubsub-javascript
638
+ // we use pubsub to sync events between multiple components(example - ChannelList, Channel)
639
+ // for example, if customer sends a message from their custom component
640
+ // without pubsub,we would not be able to listen to it
641
+ // in our ChannelList or Conversation
642
+ var pubSubFactory = function () {
643
+ var topics = {};
644
+ var hOP = topics.hasOwnProperty;
645
+ return {
646
+ __getTopics: function () { return topics; },
647
+ subscribe: function (topic, listener) {
648
+ // Create the topic's object if not yet created
649
+ if (!hOP.call(topics, topic)) {
650
+ topics[topic] = [];
651
+ }
652
+ // Add the listener to queue
653
+ var index = topics[topic].push(listener) - 1;
654
+ // Provide handle back for removal of topic
655
+ return {
656
+ remove: function () {
657
+ topics[topic].splice(index, 1);
658
+ },
659
+ };
660
+ },
661
+ publish: function (topic, info) {
662
+ // If the topic doesn't exist, or there's no listeners in queue, just leave
663
+ if (!hOP.call(topics, topic)) {
664
+ return;
665
+ }
666
+ // Cycle through topics queue, fire!
667
+ topics[topic].forEach(function (item) {
668
+ item(info !== undefined ? info : {});
669
+ });
670
+ },
671
+ };
797
672
  };
798
673
 
799
- function useAppendDomNode(ids, rootSelector) {
800
- if (ids === void 0) {
801
- ids = [];
802
- }
803
- if (rootSelector === void 0) {
804
- rootSelector = 'unknown';
805
- }
806
- useEffect(function () {
807
- var root = document.querySelector(rootSelector);
808
- if (root) {
809
- ids.forEach(function (id) {
810
- var elem = document.createElement('div');
811
- elem.setAttribute('id', id);
812
- root.appendChild(elem);
813
- });
814
- }
815
- return function () {
816
- if (root) {
817
- ids.forEach(function (id) {
818
- var target = document.getElementById(id);
819
- if (target) root.removeChild(target);
820
- });
821
- }
822
- };
823
- }, []);
674
+ function useAppendDomNode(ids, rootSelector) {
675
+ if (ids === void 0) { ids = []; }
676
+ if (rootSelector === void 0) { rootSelector = 'unknown'; }
677
+ useEffect(function () {
678
+ var root = document.querySelector(rootSelector);
679
+ if (root) {
680
+ ids.forEach(function (id) {
681
+ var elem = document.createElement('div');
682
+ elem.setAttribute('id', id);
683
+ root.appendChild(elem);
684
+ });
685
+ }
686
+ return function () {
687
+ if (root) {
688
+ ids.forEach(function (id) {
689
+ var target = document.getElementById(id);
690
+ if (target)
691
+ root.removeChild(target);
692
+ });
693
+ }
694
+ };
695
+ }, []);
824
696
  }
825
697
 
826
- var VoiceMessageProvider = function (_a) {
827
- var children = _a.children,
828
- _b = _a.isVoiceMessageEnabled,
829
- isVoiceMessageEnabled = _b === void 0 ? true : _b;
830
- if (!isVoiceMessageEnabled) {
831
- return /*#__PURE__*/React__default.createElement(VoicePlayerProvider, null, children);
832
- }
833
- return /*#__PURE__*/React__default.createElement(VoiceRecorderProvider, null, /*#__PURE__*/React__default.createElement(VoicePlayerProvider, null, children));
698
+ var VoiceMessageProvider = function (_a) {
699
+ var children = _a.children, _b = _a.isVoiceMessageEnabled, isVoiceMessageEnabled = _b === void 0 ? true : _b;
700
+ if (!isVoiceMessageEnabled) {
701
+ return (React__default.createElement(VoicePlayerProvider, null, children));
702
+ }
703
+ return (React__default.createElement(VoiceRecorderProvider, null,
704
+ React__default.createElement(VoicePlayerProvider, null, children)));
834
705
  };
835
706
 
836
- function uikitConfigMapper(_a) {
837
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
838
- var legacyConfig = _a.legacyConfig,
839
- _1 = _a.uikitOptions,
840
- uikitOptions = _1 === void 0 ? {} : _1;
841
- var replyType = legacyConfig.replyType,
842
- isMentionEnabled = legacyConfig.isMentionEnabled,
843
- isReactionEnabled = legacyConfig.isReactionEnabled,
844
- disableUserProfile = legacyConfig.disableUserProfile,
845
- isVoiceMessageEnabled = legacyConfig.isVoiceMessageEnabled,
846
- isTypingIndicatorEnabledOnChannelList = legacyConfig.isTypingIndicatorEnabledOnChannelList,
847
- isMessageReceiptStatusEnabledOnChannelList = legacyConfig.isMessageReceiptStatusEnabledOnChannelList,
848
- showSearchIcon = legacyConfig.showSearchIcon;
849
- return {
850
- common: {
851
- enableUsingDefaultUserProfile: (_c = (_b = uikitOptions.common) === null || _b === void 0 ? void 0 : _b.enableUsingDefaultUserProfile) !== null && _c !== void 0 ? _c : typeof disableUserProfile === 'boolean' ? !disableUserProfile : undefined
852
- },
853
- groupChannel: {
854
- enableOgtag: (_d = uikitOptions.groupChannel) === null || _d === void 0 ? void 0 : _d.enableOgtag,
855
- enableMention: (_f = (_e = uikitOptions.groupChannel) === null || _e === void 0 ? void 0 : _e.enableMention) !== null && _f !== void 0 ? _f : isMentionEnabled,
856
- enableReactions: (_h = (_g = uikitOptions.groupChannel) === null || _g === void 0 ? void 0 : _g.enableReactions) !== null && _h !== void 0 ? _h : isReactionEnabled,
857
- enableTypingIndicator: (_j = uikitOptions.groupChannel) === null || _j === void 0 ? void 0 : _j.enableTypingIndicator,
858
- enableVoiceMessage: (_l = (_k = uikitOptions.groupChannel) === null || _k === void 0 ? void 0 : _k.enableVoiceMessage) !== null && _l !== void 0 ? _l : isVoiceMessageEnabled,
859
- replyType: (_o = (_m = uikitOptions.groupChannel) === null || _m === void 0 ? void 0 : _m.replyType) !== null && _o !== void 0 ? _o : replyType != null ? getCaseResolvedReplyType(replyType).lowerCase : undefined,
860
- threadReplySelectType: (_p = uikitOptions.groupChannel) === null || _p === void 0 ? void 0 : _p.threadReplySelectType,
861
- input: {
862
- enableDocument: (_r = (_q = uikitOptions.groupChannel) === null || _q === void 0 ? void 0 : _q.input) === null || _r === void 0 ? void 0 : _r.enableDocument
863
- }
864
- },
865
- groupChannelList: {
866
- enableTypingIndicator: (_t = (_s = uikitOptions.groupChannelList) === null || _s === void 0 ? void 0 : _s.enableTypingIndicator) !== null && _t !== void 0 ? _t : isTypingIndicatorEnabledOnChannelList,
867
- enableMessageReceiptStatus: (_v = (_u = uikitOptions.groupChannelList) === null || _u === void 0 ? void 0 : _u.enableMessageReceiptStatus) !== null && _v !== void 0 ? _v : isMessageReceiptStatusEnabledOnChannelList
868
- },
869
- groupChannelSettings: {
870
- enableMessageSearch: (_x = (_w = uikitOptions.groupChannelSettings) === null || _w === void 0 ? void 0 : _w.enableMessageSearch) !== null && _x !== void 0 ? _x : showSearchIcon
871
- },
872
- openChannel: {
873
- enableOgtag: (_y = uikitOptions.openChannel) === null || _y === void 0 ? void 0 : _y.enableOgtag,
874
- input: {
875
- enableDocument: (_0 = (_z = uikitOptions.openChannel) === null || _z === void 0 ? void 0 : _z.input) === null || _0 === void 0 ? void 0 : _0.enableDocument
876
- }
877
- }
878
- };
707
+ function uikitConfigMapper(_a) {
708
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
709
+ var legacyConfig = _a.legacyConfig, _1 = _a.uikitOptions, uikitOptions = _1 === void 0 ? {} : _1;
710
+ var replyType = legacyConfig.replyType, isMentionEnabled = legacyConfig.isMentionEnabled, isReactionEnabled = legacyConfig.isReactionEnabled, disableUserProfile = legacyConfig.disableUserProfile, isVoiceMessageEnabled = legacyConfig.isVoiceMessageEnabled, isTypingIndicatorEnabledOnChannelList = legacyConfig.isTypingIndicatorEnabledOnChannelList, isMessageReceiptStatusEnabledOnChannelList = legacyConfig.isMessageReceiptStatusEnabledOnChannelList, showSearchIcon = legacyConfig.showSearchIcon;
711
+ return {
712
+ common: {
713
+ enableUsingDefaultUserProfile: (_c = (_b = uikitOptions.common) === null || _b === void 0 ? void 0 : _b.enableUsingDefaultUserProfile) !== null && _c !== void 0 ? _c : (typeof disableUserProfile === 'boolean'
714
+ ? !disableUserProfile
715
+ : undefined),
716
+ },
717
+ groupChannel: {
718
+ enableOgtag: (_d = uikitOptions.groupChannel) === null || _d === void 0 ? void 0 : _d.enableOgtag,
719
+ enableMention: (_f = (_e = uikitOptions.groupChannel) === null || _e === void 0 ? void 0 : _e.enableMention) !== null && _f !== void 0 ? _f : isMentionEnabled,
720
+ enableReactions: (_h = (_g = uikitOptions.groupChannel) === null || _g === void 0 ? void 0 : _g.enableReactions) !== null && _h !== void 0 ? _h : isReactionEnabled,
721
+ enableTypingIndicator: (_j = uikitOptions.groupChannel) === null || _j === void 0 ? void 0 : _j.enableTypingIndicator,
722
+ enableVoiceMessage: (_l = (_k = uikitOptions.groupChannel) === null || _k === void 0 ? void 0 : _k.enableVoiceMessage) !== null && _l !== void 0 ? _l : isVoiceMessageEnabled,
723
+ replyType: (_o = (_m = uikitOptions.groupChannel) === null || _m === void 0 ? void 0 : _m.replyType) !== null && _o !== void 0 ? _o : (replyType != null ? getCaseResolvedReplyType(replyType).lowerCase : undefined),
724
+ threadReplySelectType: (_p = uikitOptions.groupChannel) === null || _p === void 0 ? void 0 : _p.threadReplySelectType,
725
+ input: {
726
+ enableDocument: (_r = (_q = uikitOptions.groupChannel) === null || _q === void 0 ? void 0 : _q.input) === null || _r === void 0 ? void 0 : _r.enableDocument,
727
+ },
728
+ },
729
+ groupChannelList: {
730
+ enableTypingIndicator: (_t = (_s = uikitOptions.groupChannelList) === null || _s === void 0 ? void 0 : _s.enableTypingIndicator) !== null && _t !== void 0 ? _t : isTypingIndicatorEnabledOnChannelList,
731
+ enableMessageReceiptStatus: (_v = (_u = uikitOptions.groupChannelList) === null || _u === void 0 ? void 0 : _u.enableMessageReceiptStatus) !== null && _v !== void 0 ? _v : isMessageReceiptStatusEnabledOnChannelList,
732
+ },
733
+ groupChannelSettings: {
734
+ enableMessageSearch: (_x = (_w = uikitOptions.groupChannelSettings) === null || _w === void 0 ? void 0 : _w.enableMessageSearch) !== null && _x !== void 0 ? _x : showSearchIcon,
735
+ },
736
+ openChannel: {
737
+ enableOgtag: (_y = uikitOptions.openChannel) === null || _y === void 0 ? void 0 : _y.enableOgtag,
738
+ input: {
739
+ enableDocument: (_0 = (_z = uikitOptions.openChannel) === null || _z === void 0 ? void 0 : _z.input) === null || _0 === void 0 ? void 0 : _0.enableDocument,
740
+ },
741
+ },
742
+ };
879
743
  }
880
744
 
881
- var TIMEOUT = 2000;
882
- /*
883
- * This is a factory function that returns a scheduler.
884
- * The scheduler is a queue that calls the callback function on intervals.
885
- * If interval is empty, the callback function is called immediately.
886
- * If interval is not empty, the callback function is called after the interval.
887
- */
888
- function schedulerFactory(_a) {
889
- var logger = _a.logger,
890
- timeout = _a.timeout,
891
- cb = _a.cb;
892
- var queue = [];
893
- var interval = null;
894
- var push = function (channel) {
895
- var channelPresent = queue.find(function (c) {
896
- return c.url === channel.url;
897
- });
898
- if (!channelPresent) {
899
- queue.push(channel);
900
- } else {
901
- logger.info('Channel: Mark as read already in queue', {
902
- channel: channel
903
- });
904
- }
905
- // start the interval if it's not already running
906
- if (interval) {
907
- return;
908
- }
909
- var item = queue.shift();
910
- if (item) {
911
- cb(item);
912
- }
913
- interval = setInterval(function () {
914
- if (queue.length === 0 && interval) {
915
- clearInterval(interval);
916
- interval = null;
917
- return;
918
- }
919
- var item = queue.shift();
920
- if (item) {
921
- cb(item);
922
- }
923
- }, timeout || TIMEOUT);
924
- };
925
- var clear = function () {
926
- queue = [];
927
- if (interval) {
928
- clearInterval(interval);
929
- interval = null;
930
- }
931
- };
932
- return {
933
- push: push,
934
- clear: clear,
935
- getQueue: function () {
936
- return queue;
937
- }
938
- };
745
+ var TIMEOUT = 2000;
746
+ /*
747
+ * This is a factory function that returns a scheduler.
748
+ * The scheduler is a queue that calls the callback function on intervals.
749
+ * If interval is empty, the callback function is called immediately.
750
+ * If interval is not empty, the callback function is called after the interval.
751
+ */
752
+ function schedulerFactory(_a) {
753
+ var logger = _a.logger, timeout = _a.timeout, cb = _a.cb;
754
+ var queue = [];
755
+ var interval = null;
756
+ var push = function (channel) {
757
+ var channelPresent = queue.find(function (c) { return c.url === channel.url; });
758
+ if (!channelPresent) {
759
+ queue.push(channel);
760
+ }
761
+ else {
762
+ logger.info('Channel: Mark as read already in queue', { channel: channel });
763
+ }
764
+ // start the interval if it's not already running
765
+ if (interval) {
766
+ return;
767
+ }
768
+ var item = queue.shift();
769
+ if (item) {
770
+ cb(item);
771
+ }
772
+ interval = setInterval(function () {
773
+ if (queue.length === 0 && interval) {
774
+ clearInterval(interval);
775
+ interval = null;
776
+ return;
777
+ }
778
+ var item = queue.shift();
779
+ if (item) {
780
+ cb(item);
781
+ }
782
+ }, (timeout || TIMEOUT));
783
+ };
784
+ var clear = function () {
785
+ queue = [];
786
+ if (interval) {
787
+ clearInterval(interval);
788
+ interval = null;
789
+ }
790
+ };
791
+ return {
792
+ push: push,
793
+ clear: clear,
794
+ getQueue: function () { return queue; },
795
+ };
939
796
  }
940
797
 
941
- // this hook accepts a callback to run component is unmounted
942
- function useUnmount(callback, deps) {
943
- if (deps === void 0) {
944
- deps = [];
945
- }
946
- useLayoutEffect(function () {
947
- return function () {
948
- callback();
949
- };
950
- }, deps);
798
+ // this hook accepts a callback to run component is unmounted
799
+ function useUnmount(callback, deps) {
800
+ if (deps === void 0) { deps = []; }
801
+ useLayoutEffect(function () {
802
+ return function () {
803
+ callback();
804
+ };
805
+ }, deps);
951
806
  }
952
807
 
953
- function useMarkAsReadScheduler(_a, _b) {
954
- var isConnected = _a.isConnected;
955
- var logger = _b.logger;
956
- var markAsReadScheduler = useMemo(function () {
957
- return schedulerFactory({
958
- logger: logger,
959
- cb: function (channel) {
960
- try {
961
- channel.markAsRead();
962
- } catch (error) {
963
- logger.warning('Channel: Mark as delivered failed', {
964
- channel: channel,
965
- error: error
966
- });
967
- }
968
- }
969
- });
970
- }, []);
971
- useEffect(function () {
972
- // for simplicity, we clear the queue when the connection is lost
973
- if (!isConnected) {
974
- markAsReadScheduler.clear();
975
- }
976
- }, [isConnected]);
977
- useUnmount(function () {
978
- markAsReadScheduler.clear();
979
- });
980
- return markAsReadScheduler;
808
+ function useMarkAsReadScheduler(_a, _b) {
809
+ var isConnected = _a.isConnected;
810
+ var logger = _b.logger;
811
+ var markAsReadScheduler = useMemo(function () { return schedulerFactory({
812
+ logger: logger,
813
+ cb: function (channel) {
814
+ try {
815
+ channel.markAsRead();
816
+ }
817
+ catch (error) {
818
+ logger.warning('Channel: Mark as delivered failed', { channel: channel, error: error });
819
+ }
820
+ },
821
+ }); }, []);
822
+ useEffect(function () {
823
+ // for simplicity, we clear the queue when the connection is lost
824
+ if (!isConnected) {
825
+ markAsReadScheduler.clear();
826
+ }
827
+ }, [isConnected]);
828
+ useUnmount(function () { markAsReadScheduler.clear(); });
829
+ return markAsReadScheduler;
981
830
  }
982
831
 
983
- function useMarkAsDeliveredScheduler(_a, _b) {
984
- var isConnected = _a.isConnected;
985
- var logger = _b.logger;
986
- var markAsDeliveredScheduler = useMemo(function () {
987
- return schedulerFactory({
988
- logger: logger,
989
- cb: function (channel) {
990
- try {
991
- channel.markAsDelivered();
992
- } catch (error) {
993
- logger.warning('Channel: Mark as delivered failed', {
994
- channel: channel,
995
- error: error
996
- });
997
- }
998
- }
999
- });
1000
- }, []);
1001
- useEffect(function () {
1002
- // for simplicity, we clear the queue when the connection is lost
1003
- if (!isConnected) {
1004
- markAsDeliveredScheduler.clear();
1005
- }
1006
- }, [isConnected]);
1007
- useUnmount(function () {
1008
- markAsDeliveredScheduler.clear();
1009
- });
1010
- return markAsDeliveredScheduler;
832
+ function useMarkAsDeliveredScheduler(_a, _b) {
833
+ var isConnected = _a.isConnected;
834
+ var logger = _b.logger;
835
+ var markAsDeliveredScheduler = useMemo(function () { return schedulerFactory({
836
+ logger: logger,
837
+ cb: function (channel) {
838
+ try {
839
+ channel.markAsDelivered();
840
+ }
841
+ catch (error) {
842
+ logger.warning('Channel: Mark as delivered failed', { channel: channel, error: error });
843
+ }
844
+ },
845
+ }); }, []);
846
+ useEffect(function () {
847
+ // for simplicity, we clear the queue when the connection is lost
848
+ if (!isConnected) {
849
+ markAsDeliveredScheduler.clear();
850
+ }
851
+ }, [isConnected]);
852
+ useUnmount(function () { markAsDeliveredScheduler.clear(); });
853
+ return markAsDeliveredScheduler;
1011
854
  }
1012
855
 
1013
- function SendbirdProvider(props) {
1014
- var localConfigs = uikitConfigMapper({
1015
- legacyConfig: {
1016
- replyType: props.replyType,
1017
- isMentionEnabled: props.isMentionEnabled,
1018
- isReactionEnabled: props.isReactionEnabled,
1019
- disableUserProfile: props.disableUserProfile,
1020
- isVoiceMessageEnabled: props.isVoiceMessageEnabled,
1021
- isTypingIndicatorEnabledOnChannelList: props.isTypingIndicatorEnabledOnChannelList,
1022
- isMessageReceiptStatusEnabledOnChannelList: props.isMessageReceiptStatusEnabledOnChannelList,
1023
- showSearchIcon: props.showSearchIcon
1024
- },
1025
- uikitOptions: props.uikitOptions
1026
- });
1027
- return /*#__PURE__*/React__default.createElement(UIKitConfigProvider, {
1028
- localConfigs: {
1029
- common: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.common,
1030
- groupChannel: {
1031
- channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannel,
1032
- channelList: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelList,
1033
- setting: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelSettings
1034
- },
1035
- openChannel: {
1036
- channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.openChannel
1037
- }
1038
- }
1039
- }, /*#__PURE__*/React__default.createElement(SendbirdSDK, props));
1040
- }
1041
- var SendbirdSDK = function (_a) {
1042
- var _b, _c, _d;
1043
- var appId = _a.appId,
1044
- userId = _a.userId,
1045
- children = _a.children,
1046
- _e = _a.accessToken,
1047
- accessToken = _e === void 0 ? '' : _e,
1048
- _f = _a.customApiHost,
1049
- customApiHost = _f === void 0 ? '' : _f,
1050
- _g = _a.customWebSocketHost,
1051
- customWebSocketHost = _g === void 0 ? '' : _g,
1052
- _h = _a.configureSession,
1053
- configureSession = _h === void 0 ? null : _h,
1054
- _j = _a.theme,
1055
- theme = _j === void 0 ? 'light' : _j,
1056
- _k = _a.config,
1057
- config = _k === void 0 ? {} : _k,
1058
- _l = _a.nickname,
1059
- nickname = _l === void 0 ? '' : _l,
1060
- _m = _a.colorSet,
1061
- colorSet = _m === void 0 ? null : _m,
1062
- _o = _a.stringSet,
1063
- stringSet = _o === void 0 ? null : _o,
1064
- _p = _a.dateLocale,
1065
- dateLocale = _p === void 0 ? null : _p,
1066
- _q = _a.profileUrl,
1067
- profileUrl = _q === void 0 ? '' : _q,
1068
- voiceRecord = _a.voiceRecord,
1069
- _r = _a.userListQuery,
1070
- userListQuery = _r === void 0 ? null : _r,
1071
- _s = _a.imageCompression,
1072
- imageCompression = _s === void 0 ? {} : _s,
1073
- _t = _a.allowProfileEdit,
1074
- allowProfileEdit = _t === void 0 ? false : _t,
1075
- _u = _a.disableMarkAsDelivered,
1076
- disableMarkAsDelivered = _u === void 0 ? false : _u,
1077
- _v = _a.renderUserProfile,
1078
- renderUserProfile = _v === void 0 ? null : _v,
1079
- _w = _a.onUserProfileMessage,
1080
- onUserProfileMessage = _w === void 0 ? null : _w,
1081
- _x = _a.breakpoint,
1082
- breakpoint = _x === void 0 ? false : _x,
1083
- _y = _a.isUserIdUsedForNickname,
1084
- isUserIdUsedForNickname = _y === void 0 ? true : _y,
1085
- sdkInitParams = _a.sdkInitParams,
1086
- customExtensionParams = _a.customExtensionParams,
1087
- _z = _a.isMultipleFilesMessageEnabled,
1088
- isMultipleFilesMessageEnabled = _z === void 0 ? false : _z,
1089
- eventHandlers = _a.eventHandlers;
1090
- var _0 = config.logLevel,
1091
- logLevel = _0 === void 0 ? '' : _0,
1092
- _1 = config.userMention,
1093
- userMention = _1 === void 0 ? {} : _1,
1094
- _2 = config.isREMUnitEnabled,
1095
- isREMUnitEnabled = _2 === void 0 ? false : _2,
1096
- customPubSub = config.pubSub;
1097
- var isMobile = useMediaQueryContext().isMobile;
1098
- var _3 = useState(LoggerFactory(logLevel)),
1099
- logger = _3[0],
1100
- setLogger = _3[1];
1101
- var pubSub = useState(function () {
1102
- return customPubSub !== null && customPubSub !== void 0 ? customPubSub : pubSubFactory();
1103
- })[0];
1104
- var _4 = useReducer(reducer$1, initialState$1),
1105
- sdkStore = _4[0],
1106
- sdkDispatcher = _4[1];
1107
- var _5 = useReducer(reducer, initialState),
1108
- userStore = _5[0],
1109
- userDispatcher = _5[1];
1110
- var _6 = useUIKitConfig(),
1111
- configs = _6.configs,
1112
- configsWithAppAttr = _6.configsWithAppAttr,
1113
- initDashboardConfigs = _6.initDashboardConfigs;
1114
- var sdkInitialized = sdkStore.initialized;
1115
- var sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk;
1116
- var _7 = (_b = sdk === null || sdk === void 0 ? void 0 : sdk.appInfo) !== null && _b !== void 0 ? _b : {},
1117
- uploadSizeLimit = _7.uploadSizeLimit,
1118
- multipleFilesMessageFileCountLimit = _7.multipleFilesMessageFileCountLimit;
1119
- useTheme(colorSet);
1120
- var reconnect = useConnect({
1121
- appId: appId,
1122
- userId: userId,
1123
- accessToken: accessToken,
1124
- isUserIdUsedForNickname: isUserIdUsedForNickname,
1125
- isMobile: isMobile
1126
- }, {
1127
- logger: logger,
1128
- nickname: nickname,
1129
- profileUrl: profileUrl,
1130
- configureSession: configureSession,
1131
- customApiHost: customApiHost,
1132
- customWebSocketHost: customWebSocketHost,
1133
- sdkInitParams: sdkInitParams,
1134
- customExtensionParams: customExtensionParams,
1135
- sdk: sdk,
1136
- sdkDispatcher: sdkDispatcher,
1137
- userDispatcher: userDispatcher,
1138
- initDashboardConfigs: initDashboardConfigs
1139
- });
1140
- useUnmount(function () {
1141
- if (typeof sdk.disconnect === 'function') {
1142
- disconnectSdk({
1143
- logger: logger,
1144
- sdkDispatcher: sdkDispatcher,
1145
- userDispatcher: userDispatcher,
1146
- sdk: sdk
1147
- });
1148
- }
1149
- }, [sdk.disconnect]);
1150
- // to create a pubsub to communicate between parent and child
1151
- useEffect(function () {
1152
- setLogger(LoggerFactory(logLevel));
1153
- }, [logLevel]);
1154
- useAppendDomNode(['sendbird-modal-root', 'sendbird-dropdown-portal', 'sendbird-emoji-list-portal'], 'body');
1155
- // should move to reducer
1156
- var _8 = useState(theme),
1157
- currentTheme = _8[0],
1158
- setCurrentTheme = _8[1];
1159
- useEffect(function () {
1160
- setCurrentTheme(theme);
1161
- }, [theme]);
1162
- useEffect(function () {
1163
- var body = document.querySelector('body');
1164
- body.classList.remove('sendbird-experimental__rem__units');
1165
- if (isREMUnitEnabled) {
1166
- body.classList.add('sendbird-experimental__rem__units');
1167
- }
1168
- }, [isREMUnitEnabled]);
1169
- // add-remove theme from body
1170
- useEffect(function () {
1171
- logger.info('Setup theme', "Theme: ".concat(currentTheme));
1172
- try {
1173
- var body = document.querySelector('body');
1174
- body.classList.remove('sendbird-theme--light');
1175
- body.classList.remove('sendbird-theme--dark');
1176
- body.classList.add("sendbird-theme--".concat(currentTheme || 'light'));
1177
- logger.info('Finish setup theme');
1178
- // eslint-disable-next-line no-empty
1179
- } catch (e) {
1180
- logger.warning('Setup theme failed', "".concat(e));
1181
- }
1182
- return function () {
1183
- try {
1184
- var body = document.querySelector('body');
1185
- body.classList.remove('sendbird-theme--light');
1186
- body.classList.remove('sendbird-theme--dark');
1187
- // eslint-disable-next-line no-empty
1188
- } catch (_a) {}
1189
- };
1190
- }, [currentTheme]);
1191
- var isOnline = useOnlineStatus(sdkStore.sdk, logger);
1192
- var markAsReadScheduler = useMarkAsReadScheduler({
1193
- isConnected: isOnline
1194
- }, {
1195
- logger: logger
1196
- });
1197
- var markAsDeliveredScheduler = useMarkAsDeliveredScheduler({
1198
- isConnected: isOnline
1199
- }, {
1200
- logger: logger
1201
- });
1202
- var localeStringSet = React__default.useMemo(function () {
1203
- if (!stringSet) {
1204
- return getStringSet('en');
1205
- }
1206
- return __assign(__assign({}, getStringSet('en')), stringSet);
1207
- }, [stringSet]);
1208
- /**
1209
- * Feature Configuration - TODO
1210
- * This will be moved into the UIKitConfigProvider, aftering Dashboard applies
1211
- */
1212
- var uikitMultipleFilesMessageLimit = useMemo(function () {
1213
- return Math.min(DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, multipleFilesMessageFileCountLimit !== null && multipleFilesMessageFileCountLimit !== void 0 ? multipleFilesMessageFileCountLimit : Number.MAX_SAFE_INTEGER);
1214
- }, [multipleFilesMessageFileCountLimit]);
1215
- var uikitUploadSizeLimit = useMemo(function () {
1216
- return uploadSizeLimit;
1217
- }, [uploadSizeLimit]);
1218
- return /*#__PURE__*/React__default.createElement(SendbirdSdkContext.Provider, {
1219
- value: {
1220
- stores: {
1221
- sdkStore: sdkStore,
1222
- userStore: userStore
1223
- },
1224
- dispatchers: {
1225
- sdkDispatcher: sdkDispatcher,
1226
- userDispatcher: userDispatcher,
1227
- reconnect: reconnect
1228
- },
1229
- config: {
1230
- disableMarkAsDelivered: disableMarkAsDelivered,
1231
- renderUserProfile: renderUserProfile,
1232
- onUserProfileMessage: onUserProfileMessage,
1233
- allowProfileEdit: allowProfileEdit,
1234
- isOnline: isOnline,
1235
- userId: userId,
1236
- appId: appId,
1237
- accessToken: accessToken,
1238
- theme: currentTheme,
1239
- setCurrentTheme: setCurrentTheme,
1240
- setCurrenttheme: setCurrentTheme,
1241
- isMultipleFilesMessageEnabled: isMultipleFilesMessageEnabled,
1242
- uikitUploadSizeLimit: uikitUploadSizeLimit,
1243
- uikitMultipleFilesMessageLimit: uikitMultipleFilesMessageLimit,
1244
- userListQuery: userListQuery,
1245
- logger: logger,
1246
- pubSub: pubSub,
1247
- imageCompression: __assign({
1248
- compressionRate: 0.7
1249
- }, imageCompression),
1250
- voiceRecord: {
1251
- maxRecordingTime: (_c = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.maxRecordingTime) !== null && _c !== void 0 ? _c : VOICE_RECORDER_DEFAULT_MAX,
1252
- minRecordingTime: (_d = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.minRecordingTime) !== null && _d !== void 0 ? _d : VOICE_RECORDER_DEFAULT_MIN
1253
- },
1254
- userMention: {
1255
- maxMentionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxMentionCount) || 10,
1256
- maxSuggestionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxSuggestionCount) || 15
1257
- },
1258
- markAsReadScheduler: markAsReadScheduler,
1259
- markAsDeliveredScheduler: markAsDeliveredScheduler,
1260
- // From UIKitConfigProvider.localConfigs
1261
- disableUserProfile: !configs.common.enableUsingDefaultUserProfile,
1262
- isReactionEnabled: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableReactions,
1263
- isMentionEnabled: configs.groupChannel.channel.enableMention,
1264
- isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage,
1265
- replyType: getCaseResolvedReplyType(configs.groupChannel.channel.replyType).upperCase,
1266
- isTypingIndicatorEnabledOnChannelList: configs.groupChannel.channelList.enableTypingIndicator,
1267
- isMessageReceiptStatusEnabledOnChannelList: configs.groupChannel.channelList.enableMessageReceiptStatus,
1268
- showSearchIcon: sdkInitialized && configsWithAppAttr(sdk).groupChannel.setting.enableMessageSearch,
1269
- // Remote configs set from dashboard by UIKit feature configuration
1270
- groupChannel: {
1271
- enableOgtag: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableOgtag,
1272
- enableTypingIndicator: configs.groupChannel.channel.enableTypingIndicator,
1273
- enableDocument: configs.groupChannel.channel.input.enableDocument,
1274
- threadReplySelectType: getCaseResolvedThreadReplySelectType(configs.groupChannel.channel.threadReplySelectType).lowerCase
1275
- },
1276
- openChannel: {
1277
- enableOgtag: sdkInitialized && configsWithAppAttr(sdk).openChannel.channel.enableOgtag,
1278
- enableDocument: configs.openChannel.channel.input.enableDocument
1279
- }
1280
- },
1281
- eventHandlers: eventHandlers
1282
- }
1283
- }, /*#__PURE__*/React__default.createElement(MediaQueryProvider, {
1284
- logger: logger,
1285
- breakpoint: breakpoint
1286
- }, /*#__PURE__*/React__default.createElement(LocalizationProvider, {
1287
- stringSet: localeStringSet,
1288
- dateLocale: dateLocale
1289
- }, /*#__PURE__*/React__default.createElement(VoiceMessageProvider, {
1290
- isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage
1291
- }, /*#__PURE__*/React__default.createElement(GlobalModalProvider, null, children)))));
856
+ function SendbirdProvider(props) {
857
+ var localConfigs = uikitConfigMapper({
858
+ legacyConfig: {
859
+ replyType: props.replyType,
860
+ isMentionEnabled: props.isMentionEnabled,
861
+ isReactionEnabled: props.isReactionEnabled,
862
+ disableUserProfile: props.disableUserProfile,
863
+ isVoiceMessageEnabled: props.isVoiceMessageEnabled,
864
+ isTypingIndicatorEnabledOnChannelList: props.isTypingIndicatorEnabledOnChannelList,
865
+ isMessageReceiptStatusEnabledOnChannelList: props.isMessageReceiptStatusEnabledOnChannelList,
866
+ showSearchIcon: props.showSearchIcon,
867
+ },
868
+ uikitOptions: props.uikitOptions,
869
+ });
870
+ return (React__default.createElement(UIKitConfigProvider, { localConfigs: {
871
+ common: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.common,
872
+ groupChannel: {
873
+ channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannel,
874
+ channelList: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelList,
875
+ setting: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelSettings,
876
+ },
877
+ openChannel: {
878
+ channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.openChannel,
879
+ },
880
+ } },
881
+ React__default.createElement(SendbirdSDK, __assign({}, props))));
882
+ }
883
+ var SendbirdSDK = function (_a) {
884
+ var _b, _c, _d;
885
+ var appId = _a.appId, userId = _a.userId, children = _a.children, accessToken = _a.accessToken, customApiHost = _a.customApiHost, customWebSocketHost = _a.customWebSocketHost, _e = _a.configureSession, configureSession = _e === void 0 ? null : _e, _f = _a.theme, theme = _f === void 0 ? 'light' : _f, _g = _a.config, config = _g === void 0 ? {} : _g, _h = _a.nickname, nickname = _h === void 0 ? '' : _h, _j = _a.colorSet, colorSet = _j === void 0 ? null : _j, _k = _a.stringSet, stringSet = _k === void 0 ? null : _k, _l = _a.dateLocale, dateLocale = _l === void 0 ? null : _l, _m = _a.profileUrl, profileUrl = _m === void 0 ? '' : _m, voiceRecord = _a.voiceRecord, _o = _a.userListQuery, userListQuery = _o === void 0 ? null : _o, _p = _a.imageCompression, imageCompression = _p === void 0 ? {} : _p, _q = _a.allowProfileEdit, allowProfileEdit = _q === void 0 ? false : _q, _r = _a.disableMarkAsDelivered, disableMarkAsDelivered = _r === void 0 ? false : _r, _s = _a.renderUserProfile, renderUserProfile = _s === void 0 ? null : _s, _t = _a.onUserProfileMessage, onUserProfileMessage = _t === void 0 ? null : _t, _u = _a.breakpoint, breakpoint = _u === void 0 ? false : _u, _v = _a.isUserIdUsedForNickname, isUserIdUsedForNickname = _v === void 0 ? true : _v, sdkInitParams = _a.sdkInitParams, customExtensionParams = _a.customExtensionParams, _w = _a.isMultipleFilesMessageEnabled, isMultipleFilesMessageEnabled = _w === void 0 ? false : _w, eventHandlers = _a.eventHandlers;
886
+ var _x = config.logLevel, logLevel = _x === void 0 ? '' : _x, _y = config.userMention, userMention = _y === void 0 ? {} : _y, _z = config.isREMUnitEnabled, isREMUnitEnabled = _z === void 0 ? false : _z, customPubSub = config.pubSub;
887
+ var isMobile = useMediaQueryContext().isMobile;
888
+ var _0 = useState(LoggerFactory(logLevel)), logger = _0[0], setLogger = _0[1];
889
+ var pubSub = useState(function () { return customPubSub !== null && customPubSub !== void 0 ? customPubSub : pubSubFactory(); })[0];
890
+ var _1 = useReducer(reducer$1, initialState$1), sdkStore = _1[0], sdkDispatcher = _1[1];
891
+ var _2 = useReducer(reducer, initialState), userStore = _2[0], userDispatcher = _2[1];
892
+ var _3 = useUIKitConfig(), configs = _3.configs, configsWithAppAttr = _3.configsWithAppAttr, initDashboardConfigs = _3.initDashboardConfigs;
893
+ var sdkInitialized = sdkStore.initialized;
894
+ var sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk;
895
+ var _4 = (_b = sdk === null || sdk === void 0 ? void 0 : sdk.appInfo) !== null && _b !== void 0 ? _b : {}, uploadSizeLimit = _4.uploadSizeLimit, multipleFilesMessageFileCountLimit = _4.multipleFilesMessageFileCountLimit;
896
+ useTheme(colorSet);
897
+ var reconnect = useConnect({
898
+ appId: appId,
899
+ userId: userId,
900
+ accessToken: accessToken,
901
+ isUserIdUsedForNickname: isUserIdUsedForNickname,
902
+ isMobile: isMobile,
903
+ }, {
904
+ logger: logger,
905
+ nickname: nickname,
906
+ profileUrl: profileUrl,
907
+ configureSession: configureSession,
908
+ customApiHost: customApiHost,
909
+ customWebSocketHost: customWebSocketHost,
910
+ sdkInitParams: sdkInitParams,
911
+ customExtensionParams: customExtensionParams,
912
+ sdk: sdk,
913
+ sdkDispatcher: sdkDispatcher,
914
+ userDispatcher: userDispatcher,
915
+ initDashboardConfigs: initDashboardConfigs,
916
+ });
917
+ useUnmount(function () {
918
+ if (typeof sdk.disconnect === 'function') {
919
+ disconnectSdk({
920
+ logger: logger,
921
+ sdkDispatcher: sdkDispatcher,
922
+ userDispatcher: userDispatcher,
923
+ sdk: sdk,
924
+ });
925
+ }
926
+ }, [sdk.disconnect]);
927
+ // to create a pubsub to communicate between parent and child
928
+ useEffect(function () {
929
+ setLogger(LoggerFactory(logLevel));
930
+ }, [logLevel]);
931
+ useAppendDomNode([
932
+ 'sendbird-modal-root',
933
+ 'sendbird-dropdown-portal',
934
+ 'sendbird-emoji-list-portal',
935
+ ], 'body');
936
+ // should move to reducer
937
+ var _5 = useState(theme), currentTheme = _5[0], setCurrentTheme = _5[1];
938
+ useEffect(function () {
939
+ setCurrentTheme(theme);
940
+ }, [theme]);
941
+ useEffect(function () {
942
+ var body = document.querySelector('body');
943
+ body.classList.remove('sendbird-experimental__rem__units');
944
+ if (isREMUnitEnabled) {
945
+ body.classList.add('sendbird-experimental__rem__units');
946
+ }
947
+ }, [isREMUnitEnabled]);
948
+ // add-remove theme from body
949
+ useEffect(function () {
950
+ logger.info('Setup theme', "Theme: ".concat(currentTheme));
951
+ try {
952
+ var body = document.querySelector('body');
953
+ body.classList.remove('sendbird-theme--light');
954
+ body.classList.remove('sendbird-theme--dark');
955
+ body.classList.add("sendbird-theme--".concat(currentTheme || 'light'));
956
+ logger.info('Finish setup theme');
957
+ // eslint-disable-next-line no-empty
958
+ }
959
+ catch (e) {
960
+ logger.warning('Setup theme failed', "".concat(e));
961
+ }
962
+ return function () {
963
+ try {
964
+ var body = document.querySelector('body');
965
+ body.classList.remove('sendbird-theme--light');
966
+ body.classList.remove('sendbird-theme--dark');
967
+ // eslint-disable-next-line no-empty
968
+ }
969
+ catch (_a) { }
970
+ };
971
+ }, [currentTheme]);
972
+ var isOnline = useOnlineStatus(sdkStore.sdk, logger);
973
+ var markAsReadScheduler = useMarkAsReadScheduler({ isConnected: isOnline }, { logger: logger });
974
+ var markAsDeliveredScheduler = useMarkAsDeliveredScheduler({ isConnected: isOnline }, { logger: logger });
975
+ var localeStringSet = React__default.useMemo(function () {
976
+ if (!stringSet) {
977
+ return getStringSet('en');
978
+ }
979
+ return __assign(__assign({}, getStringSet('en')), stringSet);
980
+ }, [stringSet]);
981
+ /**
982
+ * Feature Configuration - TODO
983
+ * This will be moved into the UIKitConfigProvider, aftering Dashboard applies
984
+ */
985
+ var uikitMultipleFilesMessageLimit = useMemo(function () {
986
+ return Math.min(DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, multipleFilesMessageFileCountLimit !== null && multipleFilesMessageFileCountLimit !== void 0 ? multipleFilesMessageFileCountLimit : Number.MAX_SAFE_INTEGER);
987
+ }, [multipleFilesMessageFileCountLimit]);
988
+ var uikitUploadSizeLimit = useMemo(function () {
989
+ return uploadSizeLimit;
990
+ }, [uploadSizeLimit]);
991
+ return (React__default.createElement(SendbirdSdkContext.Provider, { value: {
992
+ stores: {
993
+ sdkStore: sdkStore,
994
+ userStore: userStore,
995
+ },
996
+ dispatchers: {
997
+ sdkDispatcher: sdkDispatcher,
998
+ userDispatcher: userDispatcher,
999
+ reconnect: reconnect,
1000
+ },
1001
+ config: {
1002
+ disableMarkAsDelivered: disableMarkAsDelivered,
1003
+ renderUserProfile: renderUserProfile,
1004
+ onUserProfileMessage: onUserProfileMessage,
1005
+ allowProfileEdit: allowProfileEdit,
1006
+ isOnline: isOnline,
1007
+ userId: userId,
1008
+ appId: appId,
1009
+ accessToken: accessToken,
1010
+ theme: currentTheme,
1011
+ setCurrentTheme: setCurrentTheme,
1012
+ setCurrenttheme: setCurrentTheme,
1013
+ isMultipleFilesMessageEnabled: isMultipleFilesMessageEnabled,
1014
+ uikitUploadSizeLimit: uikitUploadSizeLimit,
1015
+ uikitMultipleFilesMessageLimit: uikitMultipleFilesMessageLimit,
1016
+ userListQuery: userListQuery,
1017
+ logger: logger,
1018
+ pubSub: pubSub,
1019
+ imageCompression: __assign({ compressionRate: 0.7 }, imageCompression),
1020
+ voiceRecord: {
1021
+ maxRecordingTime: (_c = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.maxRecordingTime) !== null && _c !== void 0 ? _c : VOICE_RECORDER_DEFAULT_MAX,
1022
+ minRecordingTime: (_d = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.minRecordingTime) !== null && _d !== void 0 ? _d : VOICE_RECORDER_DEFAULT_MIN,
1023
+ },
1024
+ userMention: {
1025
+ maxMentionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxMentionCount) || 10,
1026
+ maxSuggestionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxSuggestionCount) || 15,
1027
+ },
1028
+ markAsReadScheduler: markAsReadScheduler,
1029
+ markAsDeliveredScheduler: markAsDeliveredScheduler,
1030
+ // From UIKitConfigProvider.localConfigs
1031
+ disableUserProfile: !configs.common.enableUsingDefaultUserProfile,
1032
+ isReactionEnabled: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableReactions,
1033
+ isMentionEnabled: configs.groupChannel.channel.enableMention,
1034
+ isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage,
1035
+ replyType: getCaseResolvedReplyType(configs.groupChannel.channel.replyType).upperCase,
1036
+ isTypingIndicatorEnabledOnChannelList: configs.groupChannel.channelList.enableTypingIndicator,
1037
+ isMessageReceiptStatusEnabledOnChannelList: configs.groupChannel.channelList.enableMessageReceiptStatus,
1038
+ showSearchIcon: sdkInitialized && configsWithAppAttr(sdk).groupChannel.setting.enableMessageSearch,
1039
+ // Remote configs set from dashboard by UIKit feature configuration
1040
+ groupChannel: {
1041
+ enableOgtag: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableOgtag,
1042
+ enableTypingIndicator: configs.groupChannel.channel.enableTypingIndicator,
1043
+ enableDocument: configs.groupChannel.channel.input.enableDocument,
1044
+ threadReplySelectType: getCaseResolvedThreadReplySelectType(configs.groupChannel.channel.threadReplySelectType).lowerCase,
1045
+ },
1046
+ openChannel: {
1047
+ enableOgtag: sdkInitialized && configsWithAppAttr(sdk).openChannel.channel.enableOgtag,
1048
+ enableDocument: configs.openChannel.channel.input.enableDocument,
1049
+ },
1050
+ },
1051
+ eventHandlers: eventHandlers,
1052
+ } },
1053
+ React__default.createElement(MediaQueryProvider, { logger: logger, breakpoint: breakpoint },
1054
+ React__default.createElement(LocalizationProvider, { stringSet: localeStringSet, dateLocale: dateLocale },
1055
+ React__default.createElement(VoiceMessageProvider, { isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage },
1056
+ React__default.createElement(GlobalModalProvider, null, children))))));
1292
1057
  };
1293
1058
 
1294
1059
  export { SendbirdProvider, SendbirdProvider as default };