@sendbird/uikit-react 3.7.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1500) hide show
  1. package/App.js +295 -563
  2. package/App.js.map +1 -1
  3. package/CHANGELOG.md +79 -0
  4. package/Channel/components/ChannelHeader.js +51 -97
  5. package/Channel/components/ChannelHeader.js.map +1 -1
  6. package/Channel/components/ChannelUI.js +89 -132
  7. package/Channel/components/ChannelUI.js.map +1 -1
  8. package/Channel/components/FileViewer.js +73 -142
  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 +287 -388
  13. package/Channel/components/Message.js.map +1 -1
  14. package/Channel/components/MessageInput.js +172 -238
  15. package/Channel/components/MessageInput.js.map +1 -1
  16. package/Channel/components/MessageList.js +263 -323
  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 +179 -264
  21. package/Channel/components/SuggestedMentionList.js.map +1 -1
  22. package/Channel/components/TypingIndicator.js +74 -80
  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 +17 -16
  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 +60 -104
  35. package/Channel.js.map +1 -1
  36. package/ChannelList/components/AddChannel.js +34 -53
  37. package/ChannelList/components/AddChannel.js.map +1 -1
  38. package/ChannelList/components/ChannelListHeader.js +30 -57
  39. package/ChannelList/components/ChannelListHeader.js.map +1 -1
  40. package/ChannelList/components/ChannelListUI.js +103 -160
  41. package/ChannelList/components/ChannelListUI.js.map +1 -1
  42. package/ChannelList/components/ChannelPreview.js +103 -168
  43. package/ChannelList/components/ChannelPreview.js.map +1 -1
  44. package/ChannelList/components/ChannelPreviewAction.js +53 -111
  45. package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
  46. package/ChannelList/context.js +9 -9
  47. package/ChannelList.js +37 -60
  48. package/ChannelList.js.map +1 -1
  49. package/ChannelSettings/components/ChannelProfile.js +46 -78
  50. package/ChannelSettings/components/ChannelProfile.js.map +1 -1
  51. package/ChannelSettings/components/ChannelSettingsUI.js +80 -112
  52. package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
  53. package/ChannelSettings/components/EditDetailsModal.js +80 -134
  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 +414 -792
  58. package/ChannelSettings/components/ModerationPanel.js.map +1 -1
  59. package/ChannelSettings/components/UserListItem.js +46 -90
  60. package/ChannelSettings/components/UserListItem.js.map +1 -1
  61. package/ChannelSettings/components/UserPanel.js +39 -58
  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 +21 -39
  66. package/ChannelSettings.js.map +1 -1
  67. package/CreateChannel/components/CreateChannelUI.js +24 -34
  68. package/CreateChannel/components/CreateChannelUI.js.map +1 -1
  69. package/CreateChannel/components/InviteUsers.js +144 -181
  70. package/CreateChannel/components/InviteUsers.js.map +1 -1
  71. package/CreateChannel/components/SelectChannelType.js +65 -114
  72. package/CreateChannel/components/SelectChannelType.js.map +1 -1
  73. package/CreateChannel/context.js +4 -4
  74. package/CreateChannel.js +19 -34
  75. package/CreateChannel.js.map +1 -1
  76. package/CreateOpenChannel/components/CreateOpenChannelUI.js +52 -109
  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 +16 -32
  81. package/CreateOpenChannel.js.map +1 -1
  82. package/EditUserProfile/components/EditUserProfileUI.js +82 -143
  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 +16 -25
  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 +72 -124
  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 +58 -121
  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 +33 -74
  101. package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
  102. package/OpenChannel/components/OpenChannelInput.js +41 -59
  103. package/OpenChannel/components/OpenChannelInput.js.map +1 -1
  104. package/OpenChannel/components/OpenChannelMessage.js +159 -247
  105. package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
  106. package/OpenChannel/components/OpenChannelMessageList.js +86 -121
  107. package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
  108. package/OpenChannel/components/OpenChannelUI.js +61 -83
  109. package/OpenChannel/components/OpenChannelUI.js.map +1 -1
  110. package/OpenChannel/context.js +8 -8
  111. package/OpenChannel.js +38 -58
  112. package/OpenChannel.js.map +1 -1
  113. package/OpenChannelList/components/OpenChannelListUI.js +93 -166
  114. package/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
  115. package/OpenChannelList/components/OpenChannelPreview.js +20 -59
  116. package/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
  117. package/OpenChannelList/context.js +3 -3
  118. package/OpenChannelList.js +23 -42
  119. package/OpenChannelList.js.map +1 -1
  120. package/OpenChannelSettings/components/EditDetailsModal.js +71 -125
  121. package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
  122. package/OpenChannelSettings/components/OpenChannelProfile.js +36 -62
  123. package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
  124. package/OpenChannelSettings/components/OpenChannelSettingsUI.js +54 -86
  125. package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
  126. package/OpenChannelSettings/components/OperatorUI.js +456 -830
  127. package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
  128. package/OpenChannelSettings/components/ParticipantUI.js +17 -20
  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 +22 -35
  133. package/OpenChannelSettings.js.map +1 -1
  134. package/README.md +0 -10
  135. package/SendbirdProvider.js +991 -1235
  136. package/SendbirdProvider.js.map +1 -1
  137. package/Thread/components/ParentMessageInfo.js +196 -350
  138. package/Thread/components/ParentMessageInfo.js.map +1 -1
  139. package/Thread/components/ParentMessageInfoItem.js +107 -197
  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 +116 -152
  144. package/Thread/components/ThreadList.js.map +1 -1
  145. package/Thread/components/ThreadListItem.js +271 -531
  146. package/Thread/components/ThreadListItem.js.map +1 -1
  147. package/Thread/components/ThreadMessageInput.js +155 -213
  148. package/Thread/components/ThreadMessageInput.js.map +1 -1
  149. package/Thread/components/ThreadUI.js +195 -271
  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 +1223 -1634
  154. package/Thread/context.js.map +1 -1
  155. package/Thread.js +61 -100
  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/chunks/bundle--Hrow3p-.js +42 -0
  165. package/chunks/bundle--Hrow3p-.js.map +1 -0
  166. package/chunks/bundle-06CfHADE.js +26 -0
  167. package/chunks/bundle-06CfHADE.js.map +1 -0
  168. package/{index-09847c0f.js → chunks/bundle-0BwB1B7t.js} +1 -1
  169. package/chunks/bundle-0BwB1B7t.js.map +1 -0
  170. package/{consts-57c888b9.js → chunks/bundle-0plqkdfC.js} +1 -1
  171. package/chunks/bundle-0plqkdfC.js.map +1 -0
  172. package/{types-781e0bab.js → chunks/bundle-1uIyPhfL.js} +6 -6
  173. package/chunks/bundle-1uIyPhfL.js.map +1 -0
  174. package/chunks/bundle-2oi09sb6.js +277 -0
  175. package/chunks/bundle-2oi09sb6.js.map +1 -0
  176. package/chunks/bundle-3KS1YB09.js +25 -0
  177. package/chunks/bundle-3KS1YB09.js.map +1 -0
  178. package/chunks/bundle-3oeQjqp5.js +14 -0
  179. package/chunks/bundle-3oeQjqp5.js.map +1 -0
  180. package/chunks/bundle-4zdVdGkr.js +213 -0
  181. package/chunks/bundle-4zdVdGkr.js.map +1 -0
  182. package/chunks/bundle-5Z7nY-qa.js +355 -0
  183. package/chunks/bundle-5Z7nY-qa.js.map +1 -0
  184. package/chunks/bundle-62G-DTVs.js +211 -0
  185. package/chunks/bundle-62G-DTVs.js.map +1 -0
  186. package/chunks/bundle-6G8kMIS1.js +1455 -0
  187. package/chunks/bundle-6G8kMIS1.js.map +1 -0
  188. package/chunks/bundle-7-9WA7QK.js +222 -0
  189. package/chunks/bundle-7-9WA7QK.js.map +1 -0
  190. package/chunks/bundle-7DHTLnV3.js +98 -0
  191. package/chunks/bundle-7DHTLnV3.js.map +1 -0
  192. package/chunks/bundle-9uR-6efo.js +77 -0
  193. package/chunks/bundle-9uR-6efo.js.map +1 -0
  194. package/{tslib.es6-c2fb729e.js → chunks/bundle-AVOWwEQ4.js} +2 -2
  195. package/chunks/bundle-AVOWwEQ4.js.map +1 -0
  196. package/chunks/bundle-DwZzB6nL.js +16 -0
  197. package/chunks/bundle-DwZzB6nL.js.map +1 -0
  198. package/chunks/bundle-EZnDY3Tc.js +131 -0
  199. package/chunks/bundle-EZnDY3Tc.js.map +1 -0
  200. package/chunks/bundle-F63fi8fP.js +24 -0
  201. package/chunks/bundle-F63fi8fP.js.map +1 -0
  202. package/chunks/bundle-FQAabli1.js +5 -0
  203. package/chunks/bundle-FQAabli1.js.map +1 -0
  204. package/chunks/bundle-G3cS-S1W.js +24 -0
  205. package/chunks/bundle-G3cS-S1W.js.map +1 -0
  206. package/chunks/bundle-GqUhOzeC.js +16 -0
  207. package/chunks/bundle-GqUhOzeC.js.map +1 -0
  208. package/chunks/bundle-J7RD0FpU.js +96 -0
  209. package/chunks/bundle-J7RD0FpU.js.map +1 -0
  210. package/{index-f8a9cb51.js → chunks/bundle-J7om32yx.js} +12 -3
  211. package/chunks/bundle-J7om32yx.js.map +1 -0
  212. package/{const-73db0277.js → chunks/bundle-JGFwpJZJ.js} +10 -10
  213. package/chunks/bundle-JGFwpJZJ.js.map +1 -0
  214. package/chunks/bundle-KaSW5xxP.js +176 -0
  215. package/chunks/bundle-KaSW5xxP.js.map +1 -0
  216. package/{index-2d27aeef.js → chunks/bundle-LPkaaUo4.js} +202 -64
  217. package/chunks/bundle-LPkaaUo4.js.map +1 -0
  218. package/chunks/bundle-Lh7-eKPZ.js +125 -0
  219. package/chunks/bundle-Lh7-eKPZ.js.map +1 -0
  220. package/chunks/bundle-NcHt88Fs.js +8 -0
  221. package/chunks/bundle-NcHt88Fs.js.map +1 -0
  222. package/chunks/bundle-OoXqnc0l.js +657 -0
  223. package/chunks/bundle-OoXqnc0l.js.map +1 -0
  224. package/chunks/bundle-PK1dgVwp.js +57 -0
  225. package/chunks/bundle-PK1dgVwp.js.map +1 -0
  226. package/chunks/bundle-QKq7b-WA.js +76 -0
  227. package/chunks/bundle-QKq7b-WA.js.map +1 -0
  228. package/chunks/bundle-QeQV8Aqe.js +28 -0
  229. package/chunks/bundle-QeQV8Aqe.js.map +1 -0
  230. package/chunks/bundle-TWJd6cza.js +826 -0
  231. package/chunks/bundle-TWJd6cza.js.map +1 -0
  232. package/{consts-d9c5f25a.js → chunks/bundle-UjngV2Kp.js} +28 -28
  233. package/chunks/bundle-UjngV2Kp.js.map +1 -0
  234. package/chunks/bundle-VSkY75XQ.js +72 -0
  235. package/chunks/bundle-VSkY75XQ.js.map +1 -0
  236. package/chunks/bundle-YwxAxKwQ.js +1519 -0
  237. package/chunks/bundle-YwxAxKwQ.js.map +1 -0
  238. package/{index-682a192c.js → chunks/bundle-ZZuBYhV1.js} +4 -2
  239. package/chunks/bundle-ZZuBYhV1.js.map +1 -0
  240. package/chunks/bundle-_2iSz8ke.js +353 -0
  241. package/chunks/bundle-_2iSz8ke.js.map +1 -0
  242. package/{consts-be37687e.js → chunks/bundle-_nlJSeuz.js} +1 -1
  243. package/chunks/bundle-_nlJSeuz.js.map +1 -0
  244. package/chunks/bundle-fQ2M7pMu.js +151 -0
  245. package/chunks/bundle-fQ2M7pMu.js.map +1 -0
  246. package/chunks/bundle-fbmUkwMs.js +173 -0
  247. package/chunks/bundle-fbmUkwMs.js.map +1 -0
  248. package/chunks/bundle-gYyMZyCn.js +62 -0
  249. package/chunks/bundle-gYyMZyCn.js.map +1 -0
  250. package/{uuid-c15b8b3b.js → chunks/bundle-iPDlyZXo.js} +11 -13
  251. package/chunks/bundle-iPDlyZXo.js.map +1 -0
  252. package/chunks/bundle-jUubN32Z.js +36 -0
  253. package/chunks/bundle-jUubN32Z.js.map +1 -0
  254. package/chunks/bundle-kBtT3HBi.js +230 -0
  255. package/chunks/bundle-kBtT3HBi.js.map +1 -0
  256. package/chunks/bundle-kPOY92Qs.js +132 -0
  257. package/chunks/bundle-kPOY92Qs.js.map +1 -0
  258. package/{consts-4ec7d640.js → chunks/bundle-kaJaYGwQ.js} +1 -1
  259. package/chunks/bundle-kaJaYGwQ.js.map +1 -0
  260. package/chunks/bundle-lDOyfwhb.js +78 -0
  261. package/chunks/bundle-lDOyfwhb.js.map +1 -0
  262. package/{index-e4277f9c.js → chunks/bundle-ltzZCtkR.js} +42 -15
  263. package/chunks/bundle-ltzZCtkR.js.map +1 -0
  264. package/chunks/bundle-ndy1oWfZ.js +12 -0
  265. package/chunks/bundle-ndy1oWfZ.js.map +1 -0
  266. package/chunks/bundle-r7_GdraW.js +233 -0
  267. package/chunks/bundle-r7_GdraW.js.map +1 -0
  268. package/{resolvedReplyType-fb987595.js → chunks/bundle-rX7vrYxX.js} +27 -27
  269. package/chunks/bundle-rX7vrYxX.js.map +1 -0
  270. package/chunks/bundle-tK1qgIcU.js +18 -0
  271. package/chunks/bundle-tK1qgIcU.js.map +1 -0
  272. package/chunks/bundle-um2Azmnd.js +31 -0
  273. package/chunks/bundle-um2Azmnd.js.map +1 -0
  274. package/chunks/bundle-w-pB0qJ8.js +36 -0
  275. package/chunks/bundle-w-pB0qJ8.js.map +1 -0
  276. package/chunks/bundle-x3udz03j.js +77 -0
  277. package/chunks/bundle-x3udz03j.js.map +1 -0
  278. package/chunks/bundle-zch8NdOh.js +220 -0
  279. package/chunks/bundle-zch8NdOh.js.map +1 -0
  280. package/chunks/bundle-zqQY3xFx.js +69 -0
  281. package/chunks/bundle-zqQY3xFx.js.map +1 -0
  282. package/cjs/App.js +295 -567
  283. package/cjs/App.js.map +1 -1
  284. package/cjs/Channel/components/ChannelHeader.js +51 -101
  285. package/cjs/Channel/components/ChannelHeader.js.map +1 -1
  286. package/cjs/Channel/components/ChannelUI.js +89 -136
  287. package/cjs/Channel/components/ChannelUI.js.map +1 -1
  288. package/cjs/Channel/components/FileViewer.js +74 -147
  289. package/cjs/Channel/components/FileViewer.js.map +1 -1
  290. package/cjs/Channel/components/FrozenNotification.js +10 -19
  291. package/cjs/Channel/components/FrozenNotification.js.map +1 -1
  292. package/cjs/Channel/components/Message.js +286 -391
  293. package/cjs/Channel/components/Message.js.map +1 -1
  294. package/cjs/Channel/components/MessageInput.js +172 -242
  295. package/cjs/Channel/components/MessageInput.js.map +1 -1
  296. package/cjs/Channel/components/MessageList.js +261 -325
  297. package/cjs/Channel/components/MessageList.js.map +1 -1
  298. package/cjs/Channel/components/RemoveMessageModal.js +38 -54
  299. package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
  300. package/cjs/Channel/components/SuggestedMentionList.js +178 -267
  301. package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
  302. package/cjs/Channel/components/TypingIndicator.js +74 -84
  303. package/cjs/Channel/components/TypingIndicator.js.map +1 -1
  304. package/cjs/Channel/components/UnreadCount.js +26 -34
  305. package/cjs/Channel/components/UnreadCount.js.map +1 -1
  306. package/cjs/Channel/context.js +17 -18
  307. package/cjs/Channel/context.js.map +1 -1
  308. package/cjs/Channel/hooks/useInitialMessagesFetch.js +111 -0
  309. package/cjs/Channel/hooks/useInitialMessagesFetch.js.map +1 -0
  310. package/cjs/Channel/utils/compareMessagesForGrouping.js +19 -18
  311. package/cjs/Channel/utils/compareMessagesForGrouping.js.map +1 -1
  312. package/cjs/Channel/utils/getMessagePartsInfo.js +26 -39
  313. package/cjs/Channel/utils/getMessagePartsInfo.js.map +1 -1
  314. package/cjs/Channel.js +60 -108
  315. package/cjs/Channel.js.map +1 -1
  316. package/cjs/ChannelList/components/AddChannel.js +35 -58
  317. package/cjs/ChannelList/components/AddChannel.js.map +1 -1
  318. package/cjs/ChannelList/components/ChannelListHeader.js +30 -61
  319. package/cjs/ChannelList/components/ChannelListHeader.js.map +1 -1
  320. package/cjs/ChannelList/components/ChannelListUI.js +103 -164
  321. package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
  322. package/cjs/ChannelList/components/ChannelPreview.js +103 -172
  323. package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
  324. package/cjs/ChannelList/components/ChannelPreviewAction.js +53 -115
  325. package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
  326. package/cjs/ChannelList/context.js +9 -11
  327. package/cjs/ChannelList/context.js.map +1 -1
  328. package/cjs/ChannelList.js +37 -64
  329. package/cjs/ChannelList.js.map +1 -1
  330. package/cjs/ChannelSettings/components/ChannelProfile.js +46 -82
  331. package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
  332. package/cjs/ChannelSettings/components/ChannelSettingsUI.js +80 -116
  333. package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
  334. package/cjs/ChannelSettings/components/EditDetailsModal.js +80 -138
  335. package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
  336. package/cjs/ChannelSettings/components/LeaveChannel.js +53 -84
  337. package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
  338. package/cjs/ChannelSettings/components/ModerationPanel.js +413 -795
  339. package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
  340. package/cjs/ChannelSettings/components/UserListItem.js +46 -94
  341. package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
  342. package/cjs/ChannelSettings/components/UserPanel.js +39 -62
  343. package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
  344. package/cjs/ChannelSettings/context.js +62 -90
  345. package/cjs/ChannelSettings/context.js.map +1 -1
  346. package/cjs/ChannelSettings.js +21 -43
  347. package/cjs/ChannelSettings.js.map +1 -1
  348. package/cjs/CreateChannel/components/CreateChannelUI.js +24 -38
  349. package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
  350. package/cjs/CreateChannel/components/InviteUsers.js +144 -185
  351. package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
  352. package/cjs/CreateChannel/components/SelectChannelType.js +65 -118
  353. package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
  354. package/cjs/CreateChannel/context.js +4 -6
  355. package/cjs/CreateChannel/context.js.map +1 -1
  356. package/cjs/CreateChannel.js +19 -38
  357. package/cjs/CreateChannel.js.map +1 -1
  358. package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +52 -113
  359. package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
  360. package/cjs/CreateOpenChannel/context.js +42 -57
  361. package/cjs/CreateOpenChannel/context.js.map +1 -1
  362. package/cjs/CreateOpenChannel.js +16 -36
  363. package/cjs/CreateOpenChannel.js.map +1 -1
  364. package/cjs/EditUserProfile/components/EditUserProfileUI.js +82 -147
  365. package/cjs/EditUserProfile/components/EditUserProfileUI.js.map +1 -1
  366. package/cjs/EditUserProfile/context.js +13 -26
  367. package/cjs/EditUserProfile/context.js.map +1 -1
  368. package/cjs/EditUserProfile.js +16 -29
  369. package/cjs/EditUserProfile.js.map +1 -1
  370. package/cjs/Message/context.js +21 -30
  371. package/cjs/Message/context.js.map +1 -1
  372. package/cjs/Message/hooks/useDirtyGetMentions.js +52 -65
  373. package/cjs/Message/hooks/useDirtyGetMentions.js.map +1 -1
  374. package/cjs/MessageSearch/components/MessageSearchUI.js +73 -129
  375. package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
  376. package/cjs/MessageSearch/context.js +237 -345
  377. package/cjs/MessageSearch/context.js.map +1 -1
  378. package/cjs/MessageSearch.js +58 -125
  379. package/cjs/MessageSearch.js.map +1 -1
  380. package/cjs/OpenChannel/components/FrozenChannelNotification.js +9 -17
  381. package/cjs/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
  382. package/cjs/OpenChannel/components/OpenChannelHeader.js +33 -78
  383. package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
  384. package/cjs/OpenChannel/components/OpenChannelInput.js +41 -63
  385. package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
  386. package/cjs/OpenChannel/components/OpenChannelMessage.js +159 -251
  387. package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
  388. package/cjs/OpenChannel/components/OpenChannelMessageList.js +86 -125
  389. package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
  390. package/cjs/OpenChannel/components/OpenChannelUI.js +61 -87
  391. package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
  392. package/cjs/OpenChannel/context.js +8 -10
  393. package/cjs/OpenChannel/context.js.map +1 -1
  394. package/cjs/OpenChannel.js +38 -62
  395. package/cjs/OpenChannel.js.map +1 -1
  396. package/cjs/OpenChannelList/components/OpenChannelListUI.js +93 -170
  397. package/cjs/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
  398. package/cjs/OpenChannelList/components/OpenChannelPreview.js +20 -63
  399. package/cjs/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
  400. package/cjs/OpenChannelList/context.js +4 -4
  401. package/cjs/OpenChannelList.js +23 -46
  402. package/cjs/OpenChannelList.js.map +1 -1
  403. package/cjs/OpenChannelSettings/components/EditDetailsModal.js +71 -129
  404. package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
  405. package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +36 -66
  406. package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
  407. package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +54 -90
  408. package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
  409. package/cjs/OpenChannelSettings/components/OperatorUI.js +456 -834
  410. package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
  411. package/cjs/OpenChannelSettings/components/ParticipantUI.js +17 -20
  412. package/cjs/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
  413. package/cjs/OpenChannelSettings/context.js +115 -131
  414. package/cjs/OpenChannelSettings/context.js.map +1 -1
  415. package/cjs/OpenChannelSettings.js +22 -39
  416. package/cjs/OpenChannelSettings.js.map +1 -1
  417. package/cjs/SendbirdProvider.js +992 -1242
  418. package/cjs/SendbirdProvider.js.map +1 -1
  419. package/cjs/Thread/components/ParentMessageInfo.js +196 -354
  420. package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
  421. package/cjs/Thread/components/ParentMessageInfoItem.js +107 -201
  422. package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
  423. package/cjs/Thread/components/ThreadHeader.js +23 -55
  424. package/cjs/Thread/components/ThreadHeader.js.map +1 -1
  425. package/cjs/Thread/components/ThreadList.js +116 -156
  426. package/cjs/Thread/components/ThreadList.js.map +1 -1
  427. package/cjs/Thread/components/ThreadListItem.js +271 -535
  428. package/cjs/Thread/components/ThreadListItem.js.map +1 -1
  429. package/cjs/Thread/components/ThreadMessageInput.js +155 -217
  430. package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
  431. package/cjs/Thread/components/ThreadUI.js +195 -275
  432. package/cjs/Thread/components/ThreadUI.js.map +1 -1
  433. package/cjs/Thread/context/types.js +21 -23
  434. package/cjs/Thread/context/types.js.map +1 -1
  435. package/cjs/Thread/context.js +1223 -1640
  436. package/cjs/Thread/context.js.map +1 -1
  437. package/cjs/Thread.js +61 -104
  438. package/cjs/Thread.js.map +1 -1
  439. package/cjs/VoicePlayer/context.js +3 -5
  440. package/cjs/VoicePlayer/context.js.map +1 -1
  441. package/cjs/VoicePlayer/useVoicePlayer.js +56 -79
  442. package/cjs/VoicePlayer/useVoicePlayer.js.map +1 -1
  443. package/cjs/VoiceRecorder/context.js +121 -155
  444. package/cjs/VoiceRecorder/context.js.map +1 -1
  445. package/cjs/VoiceRecorder/useVoiceRecorder.js +95 -110
  446. package/cjs/VoiceRecorder/useVoiceRecorder.js.map +1 -1
  447. package/cjs/chunks/bundle-2KPLdyEL.js +128 -0
  448. package/cjs/chunks/bundle-2KPLdyEL.js.map +1 -0
  449. package/cjs/chunks/bundle-3qeMVUne.js +38 -0
  450. package/cjs/chunks/bundle-3qeMVUne.js.map +1 -0
  451. package/cjs/{consts-f54b15c2.js → chunks/bundle-4iro9CUN.js} +27 -27
  452. package/cjs/chunks/bundle-4iro9CUN.js.map +1 -0
  453. package/cjs/chunks/bundle-5l7POen0.js +215 -0
  454. package/cjs/chunks/bundle-5l7POen0.js.map +1 -0
  455. package/cjs/chunks/bundle-6fWeHUzf.js +46 -0
  456. package/cjs/chunks/bundle-6fWeHUzf.js.map +1 -0
  457. package/cjs/chunks/bundle-80bw1Z-w.js +20 -0
  458. package/cjs/chunks/bundle-80bw1Z-w.js.map +1 -0
  459. package/cjs/chunks/bundle-8lUFYwiz.js +163 -0
  460. package/cjs/chunks/bundle-8lUFYwiz.js.map +1 -0
  461. package/cjs/chunks/bundle-A9-xoiFy.js +18 -0
  462. package/cjs/chunks/bundle-A9-xoiFy.js.map +1 -0
  463. package/cjs/chunks/bundle-ACXel153.js +27 -0
  464. package/cjs/chunks/bundle-ACXel153.js.map +1 -0
  465. package/cjs/chunks/bundle-BUF_nc4Q.js +707 -0
  466. package/cjs/chunks/bundle-BUF_nc4Q.js.map +1 -0
  467. package/cjs/chunks/bundle-Bekm94S6.js +137 -0
  468. package/cjs/chunks/bundle-Bekm94S6.js.map +1 -0
  469. package/cjs/chunks/bundle-Ch6xNfpK.js +1460 -0
  470. package/cjs/chunks/bundle-Ch6xNfpK.js.map +1 -0
  471. package/cjs/chunks/bundle-Co06yFqb.js +178 -0
  472. package/cjs/chunks/bundle-Co06yFqb.js.map +1 -0
  473. package/cjs/{consts-b711321c.js → chunks/bundle-DRPbz-J2.js} +1 -1
  474. package/cjs/chunks/bundle-DRPbz-J2.js.map +1 -0
  475. package/cjs/chunks/bundle-DTSMqW5p.js +39 -0
  476. package/cjs/chunks/bundle-DTSMqW5p.js.map +1 -0
  477. package/cjs/{index-e8928da6.js → chunks/bundle-EVv3xRW8.js} +42 -15
  478. package/cjs/chunks/bundle-EVv3xRW8.js.map +1 -0
  479. package/cjs/chunks/bundle-FCrfVx0P.js +79 -0
  480. package/cjs/chunks/bundle-FCrfVx0P.js.map +1 -0
  481. package/cjs/chunks/bundle-FI-ZNmbG.js +30 -0
  482. package/cjs/chunks/bundle-FI-ZNmbG.js.map +1 -0
  483. package/cjs/chunks/bundle-LoNtsKOJ.js +217 -0
  484. package/cjs/chunks/bundle-LoNtsKOJ.js.map +1 -0
  485. package/cjs/{types-feda9656.js → chunks/bundle-M6v8bdc6.js} +6 -6
  486. package/cjs/chunks/bundle-M6v8bdc6.js.map +1 -0
  487. package/cjs/{consts-61d83828.js → chunks/bundle-MB8QdyyQ.js} +1 -1
  488. package/cjs/chunks/bundle-MB8QdyyQ.js.map +1 -0
  489. package/cjs/chunks/bundle-MwYMtlCB.js +109 -0
  490. package/cjs/chunks/bundle-MwYMtlCB.js.map +1 -0
  491. package/cjs/chunks/bundle-NOQysszZ.js +10 -0
  492. package/cjs/chunks/bundle-NOQysszZ.js.map +1 -0
  493. package/cjs/chunks/bundle-OfmF0BBb.js +99 -0
  494. package/cjs/chunks/bundle-OfmF0BBb.js.map +1 -0
  495. package/cjs/{consts-b3c4f548.js → chunks/bundle-PoR4V_kd.js} +1 -1
  496. package/cjs/chunks/bundle-PoR4V_kd.js.map +1 -0
  497. package/cjs/{index-54279ec2.js → chunks/bundle-RG3ZDmvE.js} +1 -1
  498. package/cjs/chunks/bundle-RG3ZDmvE.js.map +1 -0
  499. package/cjs/chunks/bundle-RV4B0RCM.js +27 -0
  500. package/cjs/chunks/bundle-RV4B0RCM.js.map +1 -0
  501. package/cjs/chunks/bundle-TCdgqawd.js +75 -0
  502. package/cjs/chunks/bundle-TCdgqawd.js.map +1 -0
  503. package/cjs/{const-c9e7a340.js → chunks/bundle-VHUezYnn.js} +10 -10
  504. package/cjs/chunks/bundle-VHUezYnn.js.map +1 -0
  505. package/cjs/chunks/bundle-Y0ibVW_O.js +139 -0
  506. package/cjs/chunks/bundle-Y0ibVW_O.js.map +1 -0
  507. package/cjs/chunks/bundle-YRW87MiX.js +22 -0
  508. package/cjs/chunks/bundle-YRW87MiX.js.map +1 -0
  509. package/cjs/{uuid-9a117e16.js → chunks/bundle-Z8uBiYyS.js} +11 -13
  510. package/cjs/chunks/bundle-Z8uBiYyS.js.map +1 -0
  511. package/cjs/chunks/bundle-ZYvG_yE0.js +26 -0
  512. package/cjs/chunks/bundle-ZYvG_yE0.js.map +1 -0
  513. package/cjs/chunks/bundle-_R3HdLLP.js +831 -0
  514. package/cjs/chunks/bundle-_R3HdLLP.js.map +1 -0
  515. package/cjs/chunks/bundle-_yIYQoui.js +1523 -0
  516. package/cjs/chunks/bundle-_yIYQoui.js.map +1 -0
  517. package/cjs/chunks/bundle-a_NGo240.js +16 -0
  518. package/cjs/chunks/bundle-a_NGo240.js.map +1 -0
  519. package/cjs/chunks/bundle-bQffWPr0.js +84 -0
  520. package/cjs/chunks/bundle-bQffWPr0.js.map +1 -0
  521. package/cjs/{index-7627b546.js → chunks/bundle-cKt6NzI1.js} +12 -3
  522. package/cjs/chunks/bundle-cKt6NzI1.js.map +1 -0
  523. package/cjs/chunks/bundle-fTDV9UxX.js +84 -0
  524. package/cjs/chunks/bundle-fTDV9UxX.js.map +1 -0
  525. package/cjs/chunks/bundle-h48X_8mu.js +224 -0
  526. package/cjs/chunks/bundle-h48X_8mu.js.map +1 -0
  527. package/cjs/chunks/bundle-kkxTVcGD.js +79 -0
  528. package/cjs/chunks/bundle-kkxTVcGD.js.map +1 -0
  529. package/cjs/chunks/bundle-leALuaxJ.js +228 -0
  530. package/cjs/chunks/bundle-leALuaxJ.js.map +1 -0
  531. package/cjs/chunks/bundle-lj7KorhP.js +81 -0
  532. package/cjs/chunks/bundle-lj7KorhP.js.map +1 -0
  533. package/cjs/chunks/bundle-lkluBCYi.js +74 -0
  534. package/cjs/chunks/bundle-lkluBCYi.js.map +1 -0
  535. package/cjs/{tslib.es6-c74b513f.js → chunks/bundle-mc8PQfi_.js} +1 -1
  536. package/cjs/chunks/bundle-mc8PQfi_.js.map +1 -0
  537. package/cjs/chunks/bundle-n6O0NYfY.js +279 -0
  538. package/cjs/chunks/bundle-n6O0NYfY.js.map +1 -0
  539. package/cjs/chunks/bundle-o5pJIgS7.js +35 -0
  540. package/cjs/chunks/bundle-o5pJIgS7.js.map +1 -0
  541. package/cjs/chunks/bundle-o66lc7qg.js +69 -0
  542. package/cjs/chunks/bundle-o66lc7qg.js.map +1 -0
  543. package/cjs/chunks/bundle-oISd80pA.js +28 -0
  544. package/cjs/chunks/bundle-oISd80pA.js.map +1 -0
  545. package/cjs/chunks/bundle-oiMScSG6.js +236 -0
  546. package/cjs/chunks/bundle-oiMScSG6.js.map +1 -0
  547. package/cjs/{index-3448df64.js → chunks/bundle-pLajF9mf.js} +202 -64
  548. package/cjs/chunks/bundle-pLajF9mf.js.map +1 -0
  549. package/cjs/chunks/bundle-t70SIG3R.js +181 -0
  550. package/cjs/chunks/bundle-t70SIG3R.js.map +1 -0
  551. package/cjs/chunks/bundle-tooLK5gn.js +360 -0
  552. package/cjs/chunks/bundle-tooLK5gn.js.map +1 -0
  553. package/cjs/chunks/bundle-u4ZfKyD_.js +15 -0
  554. package/cjs/chunks/bundle-u4ZfKyD_.js.map +1 -0
  555. package/cjs/{index-134e9852.js → chunks/bundle-uE1K1eGs.js} +4 -2
  556. package/cjs/chunks/bundle-uE1K1eGs.js.map +1 -0
  557. package/cjs/chunks/bundle-vWOLHFBL.js +356 -0
  558. package/cjs/chunks/bundle-vWOLHFBL.js.map +1 -0
  559. package/cjs/chunks/bundle-viTxhrPr.js +8 -0
  560. package/cjs/chunks/bundle-viTxhrPr.js.map +1 -0
  561. package/cjs/{resolvedReplyType-c4564ebe.js → chunks/bundle-wPu8WyIh.js} +26 -26
  562. package/cjs/chunks/bundle-wPu8WyIh.js.map +1 -0
  563. package/cjs/chunks/bundle-xy995kna.js +236 -0
  564. package/cjs/chunks/bundle-xy995kna.js.map +1 -0
  565. package/cjs/handlers/OpenChannelHandler.js +2 -2
  566. package/cjs/handlers/OpenChannelHandler.js.map +1 -1
  567. package/cjs/handlers/SessionHandler.js +2 -2
  568. package/cjs/handlers/SessionHandler.js.map +1 -1
  569. package/cjs/hooks/useModal.js +47 -72
  570. package/cjs/hooks/useModal.js.map +1 -1
  571. package/cjs/index.js +61 -65
  572. package/cjs/index.js.map +1 -1
  573. package/cjs/lame.all.js +14799 -681
  574. package/cjs/lame.all.js.map +1 -1
  575. package/cjs/package.json +1 -3
  576. package/cjs/pubSub/topics.js +12 -17
  577. package/cjs/pubSub/topics.js.map +1 -1
  578. package/cjs/sendbirdSelectors.js +551 -619
  579. package/cjs/sendbirdSelectors.js.map +1 -1
  580. package/cjs/ui/Accordion.js +40 -57
  581. package/cjs/ui/Accordion.js.map +1 -1
  582. package/cjs/ui/AccordionGroup.js +9 -22
  583. package/cjs/ui/AccordionGroup.js.map +1 -1
  584. package/cjs/ui/AdminMessage.js +13 -23
  585. package/cjs/ui/AdminMessage.js.map +1 -1
  586. package/cjs/ui/Avatar.js +9 -199
  587. package/cjs/ui/Avatar.js.map +1 -1
  588. package/cjs/ui/Badge.js +18 -26
  589. package/cjs/ui/Badge.js.map +1 -1
  590. package/cjs/ui/BottomSheet.js +28 -38
  591. package/cjs/ui/BottomSheet.js.map +1 -1
  592. package/cjs/ui/Button.js +41 -63
  593. package/cjs/ui/Button.js.map +1 -1
  594. package/cjs/ui/ChannelAvatar.js +21 -48
  595. package/cjs/ui/ChannelAvatar.js.map +1 -1
  596. package/cjs/ui/Checkbox.js +15 -28
  597. package/cjs/ui/Checkbox.js.map +1 -1
  598. package/cjs/ui/ConnectionStatus.js +11 -22
  599. package/cjs/ui/ConnectionStatus.js.map +1 -1
  600. package/cjs/ui/ContextMenu.js +196 -285
  601. package/cjs/ui/ContextMenu.js.map +1 -1
  602. package/cjs/ui/DateSeparator.js +13 -28
  603. package/cjs/ui/DateSeparator.js.map +1 -1
  604. package/cjs/ui/EmojiReactions.js +144 -331
  605. package/cjs/ui/EmojiReactions.js.map +1 -1
  606. package/cjs/ui/FileMessageItemBody.js +30 -53
  607. package/cjs/ui/FileMessageItemBody.js.map +1 -1
  608. package/cjs/ui/FileViewer.js +18 -17
  609. package/cjs/ui/FileViewer.js.map +1 -1
  610. package/cjs/ui/Icon.js +558 -729
  611. package/cjs/ui/Icon.js.map +1 -1
  612. package/cjs/ui/IconButton.js +18 -49
  613. package/cjs/ui/IconButton.js.map +1 -1
  614. package/cjs/ui/ImageRenderer.js +103 -154
  615. package/cjs/ui/ImageRenderer.js.map +1 -1
  616. package/cjs/ui/Input.js +16 -42
  617. package/cjs/ui/Input.js.map +1 -1
  618. package/cjs/ui/Label.js +4 -4
  619. package/cjs/ui/LinkLabel.js +22 -51
  620. package/cjs/ui/LinkLabel.js.map +1 -1
  621. package/cjs/ui/Loader.js +11 -25
  622. package/cjs/ui/Loader.js.map +1 -1
  623. package/cjs/ui/MentionLabel.js +49 -83
  624. package/cjs/ui/MentionLabel.js.map +1 -1
  625. package/cjs/ui/MentionUserLabel.js +4 -19
  626. package/cjs/ui/MentionUserLabel.js.map +1 -1
  627. package/cjs/ui/MessageContent.js +245 -414
  628. package/cjs/ui/MessageContent.js.map +1 -1
  629. package/cjs/ui/MessageInput/hooks/usePaste.js +6 -6
  630. package/cjs/ui/MessageInput.js +447 -625
  631. package/cjs/ui/MessageInput.js.map +1 -1
  632. package/cjs/ui/MessageItemMenu.js +110 -166
  633. package/cjs/ui/MessageItemMenu.js.map +1 -1
  634. package/cjs/ui/MessageItemReactionMenu.js +39 -102
  635. package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
  636. package/cjs/ui/MessageSearchFileItem.js +78 -115
  637. package/cjs/ui/MessageSearchFileItem.js.map +1 -1
  638. package/cjs/ui/MessageSearchItem.js +50 -84
  639. package/cjs/ui/MessageSearchItem.js.map +1 -1
  640. package/cjs/ui/MessageStatus.js +13 -13
  641. package/cjs/ui/Modal.js +18 -131
  642. package/cjs/ui/Modal.js.map +1 -1
  643. package/cjs/ui/MutedAvatarOverlay.js +14 -30
  644. package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
  645. package/cjs/ui/OGMessageItemBody.js +66 -111
  646. package/cjs/ui/OGMessageItemBody.js.map +1 -1
  647. package/cjs/ui/OpenChannelAdminMessage.js +9 -18
  648. package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
  649. package/cjs/ui/OpenChannelAvatar.js +15 -30
  650. package/cjs/ui/OpenChannelAvatar.js.map +1 -1
  651. package/cjs/ui/OpenchannelConversationHeader.js +22 -61
  652. package/cjs/ui/OpenchannelConversationHeader.js.map +1 -1
  653. package/cjs/ui/OpenchannelFileMessage.js +114 -238
  654. package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
  655. package/cjs/ui/OpenchannelOGMessage.js +157 -332
  656. package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
  657. package/cjs/ui/OpenchannelThumbnailMessage.js +152 -317
  658. package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
  659. package/cjs/ui/OpenchannelUserMessage.js +126 -268
  660. package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
  661. package/cjs/ui/PlaceHolder.js +46 -105
  662. package/cjs/ui/PlaceHolder.js.map +1 -1
  663. package/cjs/ui/PlaybackTime.js +12 -26
  664. package/cjs/ui/PlaybackTime.js.map +1 -1
  665. package/cjs/ui/ProgressBar.js +13 -31
  666. package/cjs/ui/ProgressBar.js.map +1 -1
  667. package/cjs/ui/QuoteMessage.js +70 -146
  668. package/cjs/ui/QuoteMessage.js.map +1 -1
  669. package/cjs/ui/QuoteMessageInput.js +71 -102
  670. package/cjs/ui/QuoteMessageInput.js.map +1 -1
  671. package/cjs/ui/ReactionBadge.js +20 -46
  672. package/cjs/ui/ReactionBadge.js.map +1 -1
  673. package/cjs/ui/ReactionButton.js +17 -39
  674. package/cjs/ui/ReactionButton.js.map +1 -1
  675. package/cjs/ui/SortByRow.js +23 -35
  676. package/cjs/ui/SortByRow.js.map +1 -1
  677. package/cjs/ui/TextButton.js +9 -29
  678. package/cjs/ui/TextButton.js.map +1 -1
  679. package/cjs/ui/TextMessageItemBody.js +43 -59
  680. package/cjs/ui/TextMessageItemBody.js.map +1 -1
  681. package/cjs/ui/ThreadReplies.js +33 -71
  682. package/cjs/ui/ThreadReplies.js.map +1 -1
  683. package/cjs/ui/ThumbnailMessageItemBody.js +34 -74
  684. package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
  685. package/cjs/ui/Toggle.js +110 -189
  686. package/cjs/ui/Toggle.js.map +1 -1
  687. package/cjs/ui/Tooltip.js +9 -20
  688. package/cjs/ui/Tooltip.js.map +1 -1
  689. package/cjs/ui/TooltipWrapper.js +13 -45
  690. package/cjs/ui/TooltipWrapper.js.map +1 -1
  691. package/cjs/ui/UnknownMessageItemBody.js +20 -34
  692. package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
  693. package/cjs/ui/UserListItem.js +51 -118
  694. package/cjs/ui/UserListItem.js.map +1 -1
  695. package/cjs/ui/UserProfile.js +45 -74
  696. package/cjs/ui/UserProfile.js.map +1 -1
  697. package/cjs/ui/VoiceMessageItemBody.js +53 -106
  698. package/cjs/ui/VoiceMessageItemBody.js.map +1 -1
  699. package/cjs/ui/VoiceMessgeInput.js +9 -11
  700. package/cjs/ui/VoiceMessgeInput.js.map +1 -1
  701. package/cjs/ui/Word.js +60 -89
  702. package/cjs/ui/Word.js.map +1 -1
  703. package/cjs/useSendbirdStateContext.js +16 -15
  704. package/cjs/useSendbirdStateContext.js.map +1 -1
  705. package/cjs/utils/message/getOutgoingMessageState.js +32 -31
  706. package/cjs/utils/message/getOutgoingMessageState.js.map +1 -1
  707. package/cjs/utils/message/isVoiceMessage.js +3 -5
  708. package/cjs/utils/message/isVoiceMessage.js.map +1 -1
  709. package/cjs/withSendbird.js +18 -23
  710. package/cjs/withSendbird.js.map +1 -1
  711. package/dist/index.css +1014 -903
  712. package/dist/index.css.map +1 -1
  713. package/handlers/OpenChannelHandler.js +2 -2
  714. package/handlers/OpenChannelHandler.js.map +1 -1
  715. package/handlers/SessionHandler.js +2 -2
  716. package/handlers/SessionHandler.js.map +1 -1
  717. package/hooks/useModal.js +47 -65
  718. package/hooks/useModal.js.map +1 -1
  719. package/index.js +58 -60
  720. package/index.js.map +1 -1
  721. package/lame.all.js +14797 -679
  722. package/lame.all.js.map +1 -1
  723. package/package.json +1454 -79
  724. package/pubSub/topics.js +1 -17
  725. package/pubSub/topics.js.map +1 -1
  726. package/sendbirdSelectors.js +550 -618
  727. package/sendbirdSelectors.js.map +1 -1
  728. package/types/hooks/VoicePlayer/dux/actionTypes.d.ts +14 -0
  729. package/types/hooks/VoicePlayer/dux/initialState.d.ts +30 -0
  730. package/types/hooks/VoicePlayer/dux/reducer.d.ts +25 -0
  731. package/types/hooks/VoicePlayer/index.d.ts +19 -0
  732. package/types/hooks/VoicePlayer/useVoicePlayer.d.ts +16 -0
  733. package/types/hooks/VoicePlayer/utils.d.ts +2 -0
  734. package/types/hooks/VoiceRecorder/WebAudioUtils.d.ts +4 -0
  735. package/types/hooks/VoiceRecorder/index.d.ts +20 -0
  736. package/types/hooks/VoiceRecorder/useVoiceRecorder.d.ts +18 -0
  737. package/types/hooks/useAppendDomNode.d.ts +2 -0
  738. package/types/hooks/useDebounce.d.ts +1 -0
  739. package/types/hooks/useHandleOnScrollCallback/index.d.ts +11 -0
  740. package/types/hooks/useLongPress.d.ts +21 -0
  741. package/types/hooks/useModal/ModalRoot/index.d.ts +4 -0
  742. package/types/hooks/useModal/index.d.ts +15 -0
  743. package/types/hooks/useMouseHover.d.ts +7 -0
  744. package/types/hooks/useOutsideAlerter.d.ts +7 -0
  745. package/types/hooks/useSendbirdStateContext.d.ts +3 -0
  746. package/types/hooks/useUnmount.d.ts +2 -0
  747. package/types/index.d.ts +13 -0
  748. package/types/lib/LocalizationContext.d.ts +19 -0
  749. package/types/lib/Logger/index.d.ts +24 -0
  750. package/types/lib/MediaQueryContext.d.ts +14 -0
  751. package/types/lib/Sendbird.d.ts +65 -0
  752. package/types/lib/SendbirdSdkContext.d.ts +9 -0
  753. package/types/lib/SendbirdState.d.ts +7 -0
  754. package/types/lib/UserProfileContext.d.ts +22 -0
  755. package/types/lib/VoiceMessageProvider.d.ts +7 -0
  756. package/types/lib/dux/sdk/actionTypes.d.ts +16 -0
  757. package/types/lib/dux/sdk/initialState.d.ts +9 -0
  758. package/types/lib/dux/sdk/reducers.d.ts +3 -0
  759. package/types/lib/dux/user/actionTypes.d.ts +14 -0
  760. package/types/lib/dux/user/initialState.d.ts +8 -0
  761. package/types/lib/dux/user/reducers.d.ts +3 -0
  762. package/types/lib/handlers/ConnectionHandler.d.ts +5 -0
  763. package/types/lib/handlers/GroupChannelHandler.d.ts +7 -0
  764. package/types/lib/handlers/OpenChannelHandler.d.ts +5 -0
  765. package/types/lib/handlers/SessionHandler.d.ts +5 -0
  766. package/types/lib/handlers/UserEventHandler.d.ts +5 -0
  767. package/types/lib/hooks/schedulerFactory.d.ts +11 -0
  768. package/types/lib/hooks/useConnect/__test__/data.mocks.d.ts +15 -0
  769. package/types/lib/hooks/useConnect/connect.d.ts +2 -0
  770. package/types/lib/hooks/useConnect/disconnectSdk.d.ts +2 -0
  771. package/types/lib/hooks/useConnect/index.d.ts +2 -0
  772. package/types/lib/hooks/useConnect/setupConnection.d.ts +18 -0
  773. package/types/lib/hooks/useConnect/types.d.ts +42 -0
  774. package/types/lib/hooks/useMarkAsDeliveredScheduler.d.ts +15 -0
  775. package/types/lib/hooks/useMarkAsReadScheduler.d.ts +15 -0
  776. package/types/lib/hooks/useOnlineStatus.d.ts +4 -0
  777. package/types/lib/hooks/useTheme.d.ts +2 -0
  778. package/types/lib/pubSub/index.d.ts +19 -0
  779. package/types/lib/pubSub/topics.d.ts +86 -0
  780. package/types/lib/selectors.d.ts +248 -0
  781. package/types/lib/types.d.ts +166 -0
  782. package/types/lib/utils/resolvedReplyType.d.ts +28 -0
  783. package/types/lib/utils/uikitConfigMapper.d.ts +5 -0
  784. package/types/modules/App/AppLayout.d.ts +3 -0
  785. package/types/modules/App/DesktopLayout.d.ts +3 -0
  786. package/types/modules/App/MobileLayout.d.ts +4 -0
  787. package/types/modules/App/index.d.ts +44 -0
  788. package/types/modules/App/types.d.ts +72 -0
  789. package/types/modules/Channel/components/ChannelHeader/index.d.ts +7 -0
  790. package/types/modules/Channel/components/ChannelHeader/utils.d.ts +4 -0
  791. package/types/modules/Channel/components/ChannelUI/index.d.ts +19 -0
  792. package/types/modules/Channel/components/FileViewer/index.d.ts +21 -0
  793. package/types/modules/Channel/components/FrozenNotification/index.d.ts +7 -0
  794. package/types/modules/Channel/components/Message/index.d.ts +15 -0
  795. package/types/modules/Channel/components/MessageInput/VoiceMessageInputWrapper.d.ts +10 -0
  796. package/types/modules/Channel/components/MessageInput/index.d.ts +11 -0
  797. package/types/modules/Channel/components/MessageInput/useHandleUploadFiles.d.ts +19 -0
  798. package/types/modules/Channel/components/MessageList/getMessagePartsInfo.d.ts +20 -0
  799. package/types/modules/Channel/components/MessageList/hooks/useScrollBehavior.d.ts +1 -0
  800. package/types/modules/Channel/components/MessageList/hooks/useSetScrollToBottom.d.ts +7 -0
  801. package/types/modules/Channel/components/MessageList/index.d.ts +12 -0
  802. package/types/modules/Channel/components/RemoveMessageModal.d.ts +9 -0
  803. package/types/modules/Channel/components/SuggestedMentionList/SuggestedUserMentionItem.d.ts +21 -0
  804. package/types/modules/Channel/components/SuggestedMentionList/index.d.ts +20 -0
  805. package/types/modules/Channel/components/SuggestedMentionList/utils.d.ts +3 -0
  806. package/types/modules/Channel/components/SuggestedReplies/index.d.ts +10 -0
  807. package/types/modules/Channel/components/TypingIndicator.d.ts +8 -0
  808. package/types/modules/Channel/components/UnreadCount/index.d.ts +12 -0
  809. package/types/modules/Channel/context/ChannelProvider.d.ts +131 -0
  810. package/types/modules/Channel/context/compareMessagesForGrouping.d.ts +10 -0
  811. package/types/modules/Channel/context/const.d.ts +9 -0
  812. package/types/modules/Channel/context/dux/actionTypes.d.ts +93 -0
  813. package/types/modules/Channel/context/dux/initialState.d.ts +25 -0
  814. package/types/modules/Channel/context/dux/reducers.d.ts +3 -0
  815. package/types/modules/Channel/context/hooks/useDeleteMessageCallback.d.ts +14 -0
  816. package/types/modules/Channel/context/hooks/useGetChannel.d.ts +18 -0
  817. package/types/modules/Channel/context/hooks/useHandleChannelEvents.d.ts +29 -0
  818. package/types/modules/Channel/context/hooks/useHandleChannelPubsubEvents.d.ts +11 -0
  819. package/types/modules/Channel/context/hooks/useHandleReconnect.d.ts +23 -0
  820. package/types/modules/Channel/context/hooks/useInitialMessagesFetch.d.ts +20 -0
  821. package/types/modules/Channel/context/hooks/useReconnectOnIdle.d.ts +5 -0
  822. package/types/modules/Channel/context/hooks/useResendMessageCallback.d.ts +14 -0
  823. package/types/modules/Channel/context/hooks/useScrollCallback.d.ts +21 -0
  824. package/types/modules/Channel/context/hooks/useScrollDownCallback.d.ts +23 -0
  825. package/types/modules/Channel/context/hooks/useScrollToMessage.d.ts +14 -0
  826. package/types/modules/Channel/context/hooks/useSendFileMessageCallback.d.ts +21 -0
  827. package/types/modules/Channel/context/hooks/useSendMessageCallback.d.ts +27 -0
  828. package/types/modules/Channel/context/hooks/useSendMultipleFilesMessage.d.ts +32 -0
  829. package/types/modules/Channel/context/hooks/useSendVoiceMessageCallback.d.ts +21 -0
  830. package/types/modules/Channel/context/hooks/useStatefulFileInfoList.d.ts +3 -0
  831. package/types/modules/Channel/context/hooks/useThreadMessageKindKeySelector.d.ts +7 -0
  832. package/types/modules/Channel/context/hooks/useToggleReactionCallback.d.ts +11 -0
  833. package/types/modules/Channel/context/hooks/useUpdateMessageCallback.d.ts +26 -0
  834. package/types/modules/Channel/context/utils.d.ts +18 -0
  835. package/types/modules/Channel/index.d.ts +7 -0
  836. package/types/modules/ChannelList/components/AddChannel/index.d.ts +3 -0
  837. package/types/modules/ChannelList/components/ChannelListHeader/index.d.ts +11 -0
  838. package/types/modules/ChannelList/components/ChannelListUI/index.d.ts +23 -0
  839. package/types/modules/ChannelList/components/ChannelPreview/index.d.ts +16 -0
  840. package/types/modules/ChannelList/components/ChannelPreview/utils.d.ts +10 -0
  841. package/types/modules/ChannelList/components/ChannelPreviewAction.d.ts +9 -0
  842. package/types/modules/ChannelList/components/LeaveChannel/index.d.ts +9 -0
  843. package/types/modules/ChannelList/components/Placeholder.d.ts +7 -0
  844. package/types/modules/ChannelList/context/ChannelListProvider.d.ts +75 -0
  845. package/types/modules/ChannelList/context/hooks/useActiveChannelUrl.d.ts +15 -0
  846. package/types/modules/ChannelList/context/hooks/useFetchChannelList.d.ts +17 -0
  847. package/types/modules/ChannelList/dux/actionTypes.d.ts +66 -0
  848. package/types/modules/ChannelList/dux/getNextChannel.d.ts +14 -0
  849. package/types/modules/ChannelList/dux/initialState.d.ts +12 -0
  850. package/types/modules/ChannelList/dux/reducers.d.ts +3 -0
  851. package/types/modules/ChannelList/index.d.ts +7 -0
  852. package/types/modules/ChannelList/utils.d.ts +35 -0
  853. package/types/modules/ChannelSettings/components/ChannelProfile/index.d.ts +4 -0
  854. package/types/modules/ChannelSettings/components/ChannelSettingsUI/index.d.ts +10 -0
  855. package/types/modules/ChannelSettings/components/EditDetailsModal/index.d.ts +7 -0
  856. package/types/modules/ChannelSettings/components/LeaveChannel/index.d.ts +8 -0
  857. package/types/modules/ChannelSettings/components/ModerationPanel/AddOperatorsModal.d.ts +7 -0
  858. package/types/modules/ChannelSettings/components/ModerationPanel/BannedUserList.d.ts +3 -0
  859. package/types/modules/ChannelSettings/components/ModerationPanel/BannedUsersModal.d.ts +6 -0
  860. package/types/modules/ChannelSettings/components/ModerationPanel/InviteUsersModal.d.ts +7 -0
  861. package/types/modules/ChannelSettings/components/ModerationPanel/MemberList.d.ts +3 -0
  862. package/types/modules/ChannelSettings/components/ModerationPanel/MembersModal.d.ts +6 -0
  863. package/types/modules/ChannelSettings/components/ModerationPanel/MutedMemberList.d.ts +3 -0
  864. package/types/modules/ChannelSettings/components/ModerationPanel/MutedMembersModal.d.ts +6 -0
  865. package/types/modules/ChannelSettings/components/ModerationPanel/OperatorList.d.ts +3 -0
  866. package/types/modules/ChannelSettings/components/ModerationPanel/OperatorsModal.d.ts +6 -0
  867. package/types/modules/ChannelSettings/components/ModerationPanel/index.d.ts +3 -0
  868. package/types/modules/ChannelSettings/components/UserListItem/index.d.ts +19 -0
  869. package/types/modules/ChannelSettings/components/UserPanel/index.d.ts +4 -0
  870. package/types/modules/ChannelSettings/context/ChannelSettingsProvider.d.ts +47 -0
  871. package/types/modules/ChannelSettings/index.d.ts +7 -0
  872. package/types/modules/CreateChannel/components/CreateChannelUI/index.d.ts +8 -0
  873. package/types/modules/CreateChannel/components/InviteUsers/index.d.ts +9 -0
  874. package/types/modules/CreateChannel/components/InviteUsers/utils.d.ts +12 -0
  875. package/types/modules/CreateChannel/components/SelectChannelType.d.ts +6 -0
  876. package/types/modules/CreateChannel/context/CreateChannelProvider.d.ts +37 -0
  877. package/types/modules/CreateChannel/index.d.ts +7 -0
  878. package/types/modules/CreateChannel/types.d.ts +5 -0
  879. package/types/modules/CreateChannel/utils.d.ts +3 -0
  880. package/types/modules/CreateOpenChannel/components/CreateOpenChannelUI/index.d.ts +9 -0
  881. package/types/modules/CreateOpenChannel/context/CreateOpenChannelProvider.d.ts +22 -0
  882. package/types/modules/CreateOpenChannel/index.d.ts +7 -0
  883. package/types/modules/EditUserProfile/components/EditUserProfileUI/index.d.ts +3 -0
  884. package/types/modules/EditUserProfile/context/EditUserProfileProvider.d.ts +16 -0
  885. package/types/modules/EditUserProfile/index.d.ts +4 -0
  886. package/types/modules/Message/components/TextFragment/index.d.ts +6 -0
  887. package/types/modules/Message/consts.d.ts +1 -0
  888. package/types/modules/Message/context/MessageProvider.d.ts +11 -0
  889. package/types/modules/Message/hooks/useDirtyGetMentions.d.ts +14 -0
  890. package/types/modules/Message/utils/getMentionNodes.d.ts +1 -0
  891. package/types/modules/Message/utils/tokens/keyGenerator.d.ts +1 -0
  892. package/types/modules/Message/utils/tokens/tokenize.d.ts +18 -0
  893. package/types/modules/Message/utils/tokens/types.d.ts +37 -0
  894. package/types/modules/MessageSearch/components/MessageSearchUI/index.d.ts +15 -0
  895. package/types/modules/MessageSearch/context/MessageSearchProvider.d.ts +41 -0
  896. package/types/modules/MessageSearch/context/dux/actionTypes.d.ts +8 -0
  897. package/types/modules/MessageSearch/context/dux/initialState.d.ts +14 -0
  898. package/types/modules/MessageSearch/context/dux/reducers.d.ts +7 -0
  899. package/types/modules/MessageSearch/context/hooks/useGetSearchedMessages.d.ts +24 -0
  900. package/types/modules/MessageSearch/context/hooks/useScrollCallback.d.ts +20 -0
  901. package/types/modules/MessageSearch/context/hooks/useSearchStringEffect.d.ts +11 -0
  902. package/types/modules/MessageSearch/context/hooks/useSetChannel.d.ts +16 -0
  903. package/types/modules/MessageSearch/index.d.ts +10 -0
  904. package/types/modules/OpenChannel/components/FrozenChannelNotification/index.d.ts +4 -0
  905. package/types/modules/OpenChannel/components/OpenChannelHeader/index.d.ts +3 -0
  906. package/types/modules/OpenChannel/components/OpenChannelInput/index.d.ts +6 -0
  907. package/types/modules/OpenChannel/components/OpenChannelMessage/RemoveMessageModal.d.ts +10 -0
  908. package/types/modules/OpenChannel/components/OpenChannelMessage/index.d.ts +12 -0
  909. package/types/modules/OpenChannel/components/OpenChannelMessage/utils.d.ts +37 -0
  910. package/types/modules/OpenChannel/components/OpenChannelMessageList/index.d.ts +9 -0
  911. package/types/modules/OpenChannel/components/OpenChannelUI/index.d.ts +13 -0
  912. package/types/modules/OpenChannel/context/OpenChannelProvider.d.ts +52 -0
  913. package/types/modules/OpenChannel/context/dux/actionTypes.d.ts +37 -0
  914. package/types/modules/OpenChannel/context/dux/initialState.d.ts +19 -0
  915. package/types/modules/OpenChannel/context/dux/reducers.d.ts +7 -0
  916. package/types/modules/OpenChannel/context/hooks/useCheckScrollBottom.d.ts +10 -0
  917. package/types/modules/OpenChannel/context/hooks/useDeleteMessageCallback.d.ts +17 -0
  918. package/types/modules/OpenChannel/context/hooks/useFileUploadCallback.d.ts +27 -0
  919. package/types/modules/OpenChannel/context/hooks/useHandleChannelEvents.d.ts +20 -0
  920. package/types/modules/OpenChannel/context/hooks/useInitialMessagesFetch.d.ts +14 -0
  921. package/types/modules/OpenChannel/context/hooks/useResendMessageCallback.d.ts +17 -0
  922. package/types/modules/OpenChannel/context/hooks/useScrollCallback.d.ts +18 -0
  923. package/types/modules/OpenChannel/context/hooks/useSendMessageCallback.d.ts +22 -0
  924. package/types/modules/OpenChannel/context/hooks/useSetChannel.d.ts +20 -0
  925. package/types/modules/OpenChannel/context/hooks/useTrimMessageList.d.ts +17 -0
  926. package/types/modules/OpenChannel/context/hooks/useUpdateMessageCallback.d.ts +17 -0
  927. package/types/modules/OpenChannel/context/utils.d.ts +16 -0
  928. package/types/modules/OpenChannel/index.d.ts +7 -0
  929. package/types/modules/OpenChannelApp/Community.d.ts +11 -0
  930. package/types/modules/OpenChannelApp/Streaming.d.ts +11 -0
  931. package/types/modules/OpenChannelApp/assets/Icons.d.ts +7 -0
  932. package/types/modules/OpenChannelApp/components/CommunityChannelList.d.ts +7 -0
  933. package/types/modules/OpenChannelApp/components/DummyStream.d.ts +20 -0
  934. package/types/modules/OpenChannelApp/components/Login.d.ts +12 -0
  935. package/types/modules/OpenChannelApp/components/OpenChannelPreview.d.ts +11 -0
  936. package/types/modules/OpenChannelApp/components/Profile.d.ts +8 -0
  937. package/types/modules/OpenChannelApp/components/StreamingChannelList.d.ts +7 -0
  938. package/types/modules/OpenChannelApp/index.d.ts +16 -0
  939. package/types/modules/OpenChannelApp/stories/utils.d.ts +6 -0
  940. package/types/modules/OpenChannelList/components/OpenChannelListUI/index.d.ts +18 -0
  941. package/types/modules/OpenChannelList/components/OpenChannelPreview/index.d.ts +11 -0
  942. package/types/modules/OpenChannelList/context/OpenChannelListInterfaces.d.ts +42 -0
  943. package/types/modules/OpenChannelList/context/OpenChannelListProvider.d.ts +9 -0
  944. package/types/modules/OpenChannelList/context/dux/actionTypes.d.ts +14 -0
  945. package/types/modules/OpenChannelList/context/dux/initialState.d.ts +10 -0
  946. package/types/modules/OpenChannelList/context/dux/reducer.d.ts +6 -0
  947. package/types/modules/OpenChannelList/context/hooks/createChannelListQuery.d.ts +13 -0
  948. package/types/modules/OpenChannelList/context/hooks/useFetchNextCallback.d.ts +15 -0
  949. package/types/modules/OpenChannelList/context/hooks/useRefreshOpenChannelList.d.ts +14 -0
  950. package/types/modules/OpenChannelList/context/hooks/useSetupOpenChannelList.d.ts +14 -0
  951. package/types/modules/OpenChannelList/index.d.ts +7 -0
  952. package/types/modules/OpenChannelSettings/components/EditDetailsModal.d.ts +6 -0
  953. package/types/modules/OpenChannelSettings/components/InvalidChannel.d.ts +6 -0
  954. package/types/modules/OpenChannelSettings/components/OpenChannelProfile/index.d.ts +3 -0
  955. package/types/modules/OpenChannelSettings/components/OpenChannelSettingsUI/index.d.ts +8 -0
  956. package/types/modules/OpenChannelSettings/components/OperatorUI/AddOperatorsModal.d.ts +7 -0
  957. package/types/modules/OpenChannelSettings/components/OperatorUI/BannedUserList.d.ts +3 -0
  958. package/types/modules/OpenChannelSettings/components/OperatorUI/BannedUsersModal.d.ts +6 -0
  959. package/types/modules/OpenChannelSettings/components/OperatorUI/DeleteOpenChannel.d.ts +2 -0
  960. package/types/modules/OpenChannelSettings/components/OperatorUI/MutedParticipantList.d.ts +3 -0
  961. package/types/modules/OpenChannelSettings/components/OperatorUI/MutedParticipantsModal.d.ts +6 -0
  962. package/types/modules/OpenChannelSettings/components/OperatorUI/OperatorList.d.ts +3 -0
  963. package/types/modules/OpenChannelSettings/components/OperatorUI/OperatorsModal.d.ts +6 -0
  964. package/types/modules/OpenChannelSettings/components/OperatorUI/index.d.ts +7 -0
  965. package/types/modules/OpenChannelSettings/components/ParticipantUI/ParticipantItem.d.ts +17 -0
  966. package/types/modules/OpenChannelSettings/components/ParticipantUI/ParticipantsModal.d.ts +6 -0
  967. package/types/modules/OpenChannelSettings/components/ParticipantUI/index.d.ts +6 -0
  968. package/types/modules/OpenChannelSettings/context/OpenChannelSettingsProvider.d.ts +27 -0
  969. package/types/modules/OpenChannelSettings/index.d.ts +7 -0
  970. package/types/modules/Thread/components/ParentMessageInfo/ParentMessageInfoItem.d.ts +9 -0
  971. package/types/modules/Thread/components/ParentMessageInfo/index.d.ts +6 -0
  972. package/types/modules/Thread/components/RemoveMessageModal.d.ts +9 -0
  973. package/types/modules/Thread/components/ThreadHeader/index.d.ts +14 -0
  974. package/types/modules/Thread/components/ThreadList/ThreadListItem.d.ts +14 -0
  975. package/types/modules/Thread/components/ThreadList/ThreadListItemContent.d.ts +30 -0
  976. package/types/modules/Thread/components/ThreadList/index.d.ts +18 -0
  977. package/types/modules/Thread/components/ThreadMessageInput/index.d.ts +11 -0
  978. package/types/modules/Thread/components/ThreadUI/index.d.ts +23 -0
  979. package/types/modules/Thread/components/ThreadUI/useMemorizedHeader.d.ts +6 -0
  980. package/types/modules/Thread/components/ThreadUI/useMemorizedParentMessageInfo.d.ts +11 -0
  981. package/types/modules/Thread/components/ThreadUI/useMemorizedThreadList.d.ts +8 -0
  982. package/types/modules/Thread/consts.d.ts +2 -0
  983. package/types/modules/Thread/context/ThreadProvider.d.ts +43 -0
  984. package/types/modules/Thread/context/dux/actionTypes.d.ts +38 -0
  985. package/types/modules/Thread/context/dux/initialState.d.ts +22 -0
  986. package/types/modules/Thread/context/dux/reducer.d.ts +8 -0
  987. package/types/modules/Thread/context/hooks/useDeleteMessageCallback.d.ts +12 -0
  988. package/types/modules/Thread/context/hooks/useGetAllEmoji.d.ts +11 -0
  989. package/types/modules/Thread/context/hooks/useGetChannel.d.ts +18 -0
  990. package/types/modules/Thread/context/hooks/useGetNextThreadsCallback.d.ts +17 -0
  991. package/types/modules/Thread/context/hooks/useGetParentMessage.d.ts +15 -0
  992. package/types/modules/Thread/context/hooks/useGetPrevThreadsCallback.d.ts +17 -0
  993. package/types/modules/Thread/context/hooks/useGetThreadList.d.ts +14 -0
  994. package/types/modules/Thread/context/hooks/useHandleChannelEvents.d.ts +13 -0
  995. package/types/modules/Thread/context/hooks/useHandleThreadPubsubEvents.d.ts +16 -0
  996. package/types/modules/Thread/context/hooks/useResendMessageCallback.d.ts +14 -0
  997. package/types/modules/Thread/context/hooks/useSendFileMessage.d.ts +17 -0
  998. package/types/modules/Thread/context/hooks/useSendMultipleFilesMessage.d.ts +8 -0
  999. package/types/modules/Thread/context/hooks/useSendUserMessageCallback.d.ts +25 -0
  1000. package/types/modules/Thread/context/hooks/useSendVoiceMessageCallback.d.ts +17 -0
  1001. package/types/modules/Thread/context/hooks/useToggleReactionsCallback.d.ts +10 -0
  1002. package/types/modules/Thread/context/hooks/useUpdateMessageCallback.d.ts +14 -0
  1003. package/types/modules/Thread/context/utils.d.ts +15 -0
  1004. package/types/modules/Thread/index.d.ts +8 -0
  1005. package/types/modules/Thread/types.d.ts +18 -0
  1006. package/types/modules/internalInterfaces.d.ts +6 -0
  1007. package/types/types.d.ts +55 -0
  1008. package/types/ui/Accordion/AccordionGroup.d.ts +7 -0
  1009. package/types/ui/Accordion/context.d.ts +8 -0
  1010. package/types/ui/Accordion/index.d.ts +13 -0
  1011. package/types/ui/AdminMessage/adminMessageDummyData.mock.d.ts +29 -0
  1012. package/types/ui/AdminMessage/index.d.ts +9 -0
  1013. package/types/ui/Avatar/MutedAvatarOverlay.d.ts +8 -0
  1014. package/types/ui/Avatar/index.d.ts +27 -0
  1015. package/types/ui/Badge/index.d.ts +8 -0
  1016. package/types/ui/BottomSheet/index.d.ts +9 -0
  1017. package/types/ui/Button/index.d.ts +13 -0
  1018. package/types/ui/Button/types.d.ts +10 -0
  1019. package/types/ui/Button/utils.d.ts +3 -0
  1020. package/types/ui/ChannelAvatar/OpenChannelAvatar.d.ts +10 -0
  1021. package/types/ui/ChannelAvatar/index.d.ts +12 -0
  1022. package/types/ui/ChannelAvatar/utils.d.ts +6 -0
  1023. package/types/ui/Checkbox/index.d.ts +9 -0
  1024. package/types/ui/ConnectionStatus/index.d.ts +4 -0
  1025. package/types/ui/ContextMenu/EmojiListItems.d.ts +15 -0
  1026. package/types/ui/ContextMenu/MenuItems.d.ts +29 -0
  1027. package/types/ui/ContextMenu/index.d.ts +24 -0
  1028. package/types/ui/DateSeparator/index.d.ts +10 -0
  1029. package/types/ui/Docs/Introduction.d.ts +2 -0
  1030. package/types/ui/EmojiReactions/AddReactionBadgeItem.d.ts +5 -0
  1031. package/types/ui/EmojiReactions/ReactionItem.d.ts +17 -0
  1032. package/types/ui/EmojiReactions/index.d.ts +21 -0
  1033. package/types/ui/FileMessageItemBody/index.d.ts +13 -0
  1034. package/types/ui/FileViewer/DeleteButton.d.ts +5 -0
  1035. package/types/ui/FileViewer/Slider.d.ts +3 -0
  1036. package/types/ui/FileViewer/data.mock.d.ts +84 -0
  1037. package/types/ui/FileViewer/hooks/useKeyDown.d.ts +8 -0
  1038. package/types/ui/FileViewer/index.d.ts +17 -0
  1039. package/types/ui/FileViewer/types.d.ts +44 -0
  1040. package/types/ui/FileViewer/utils.d.ts +4 -0
  1041. package/types/ui/Icon/colors.d.ts +42 -0
  1042. package/types/ui/Icon/index.d.ts +96 -0
  1043. package/types/ui/Icon/type.d.ts +61 -0
  1044. package/types/ui/Icon/utils.d.ts +4 -0
  1045. package/types/ui/IconButton/index.d.ts +17 -0
  1046. package/types/ui/ImageGrid/index.d.ts +11 -0
  1047. package/types/ui/ImageRenderer/index.d.ts +27 -0
  1048. package/types/ui/ImageRenderer/useDynamicSideLength.d.ts +8 -0
  1049. package/types/ui/ImageRenderer/utils.d.ts +1 -0
  1050. package/types/ui/Input/index.d.ts +15 -0
  1051. package/types/ui/Label/index.d.ts +37 -0
  1052. package/types/ui/Label/stringFormatterUtils.d.ts +2 -0
  1053. package/types/ui/Label/stringSet.d.ts +189 -0
  1054. package/types/ui/Label/types.d.ts +24 -0
  1055. package/types/ui/Label/utils.d.ts +4 -0
  1056. package/types/ui/LegacyEditUserProfile/index.d.ts +20 -0
  1057. package/types/ui/LinkLabel/index.d.ts +37 -0
  1058. package/types/ui/Loader/index.d.ts +9 -0
  1059. package/types/ui/MentionLabel/index.d.ts +10 -0
  1060. package/types/ui/MentionUserLabel/consts.d.ts +1 -0
  1061. package/types/ui/MentionUserLabel/index.d.ts +11 -0
  1062. package/types/ui/MentionUserLabel/renderToString.d.ts +6 -0
  1063. package/types/ui/MessageContent/MessageBody/index.d.ts +18 -0
  1064. package/types/ui/MessageContent/MessageHeader/index.d.ts +10 -0
  1065. package/types/ui/MessageContent/MessageProfile/index.d.ts +15 -0
  1066. package/types/ui/MessageContent/index.d.ts +44 -0
  1067. package/types/ui/MessageInput/const.d.ts +15 -0
  1068. package/types/ui/MessageInput/hooks/usePaste/consts.d.ts +5 -0
  1069. package/types/ui/MessageInput/hooks/usePaste/index.d.ts +4 -0
  1070. package/types/ui/MessageInput/hooks/usePaste/insertTemplate.d.ts +2 -0
  1071. package/types/ui/MessageInput/hooks/usePaste/types.d.ts +15 -0
  1072. package/types/ui/MessageInput/hooks/usePaste/utils.d.ts +10 -0
  1073. package/types/ui/MessageInput/index.d.ts +47 -0
  1074. package/types/ui/MessageInput/messageInputUtils.d.ts +21 -0
  1075. package/types/ui/MessageInput/utils.d.ts +9 -0
  1076. package/types/ui/MessageItemMenu/index.d.ts +26 -0
  1077. package/types/ui/MessageItemReactionMenu/index.d.ts +16 -0
  1078. package/types/ui/MessageSearchFileItem/index.d.ts +12 -0
  1079. package/types/ui/MessageSearchFileItem/mockFileMessage.d.ts +180 -0
  1080. package/types/ui/MessageSearchFileItem/utils.d.ts +12 -0
  1081. package/types/ui/MessageSearchItem/getCreatedAt.d.ts +8 -0
  1082. package/types/ui/MessageSearchItem/index.d.ts +11 -0
  1083. package/types/ui/MessageSearchItem/messageDummyDate.mock.d.ts +5 -0
  1084. package/types/ui/MessageStatus/index.d.ts +15 -0
  1085. package/types/ui/MessageStatus/messageDummyData.mock.d.ts +7 -0
  1086. package/types/ui/MobileMenu/MobileBottomSheet.d.ts +4 -0
  1087. package/types/ui/MobileMenu/MobileContextMenu.d.ts +4 -0
  1088. package/types/ui/MobileMenu/MobileEmojisBottomSheet.d.ts +11 -0
  1089. package/types/ui/MobileMenu/ReactedMembersBottomSheet.d.ts +14 -0
  1090. package/types/ui/MobileMenu/index.d.ts +5 -0
  1091. package/types/ui/MobileMenu/types.d.ts +32 -0
  1092. package/types/ui/Modal/index.d.ts +40 -0
  1093. package/types/ui/MultipleFilesMessageItemBody/const.d.ts +17 -0
  1094. package/types/ui/MultipleFilesMessageItemBody/index.d.ts +21 -0
  1095. package/types/ui/OGMessageItemBody/consts.d.ts +1 -0
  1096. package/types/ui/OGMessageItemBody/index.d.ts +14 -0
  1097. package/types/ui/OpenChannelAdminMessage/index.d.ts +9 -0
  1098. package/types/ui/OpenChannelMobileMenu/index.d.ts +15 -0
  1099. package/types/ui/OpenchannelConversationHeader/index.d.ts +11 -0
  1100. package/types/ui/OpenchannelFileMessage/index.d.ts +17 -0
  1101. package/types/ui/OpenchannelFileMessage/mockMessages.d.ts +75 -0
  1102. package/types/ui/OpenchannelFileMessage/utils.d.ts +2 -0
  1103. package/types/ui/OpenchannelOGMessage/index.d.ts +18 -0
  1104. package/types/ui/OpenchannelOGMessage/utils.d.ts +4 -0
  1105. package/types/ui/OpenchannelThumbnailMessage/index.d.ts +18 -0
  1106. package/types/ui/OpenchannelThumbnailMessage/utils.d.ts +6 -0
  1107. package/types/ui/OpenchannelUserMessage/index.d.ts +18 -0
  1108. package/types/ui/OpenchannelUserMessage/utils.d.ts +5 -0
  1109. package/types/ui/PlaceHolder/index.d.ts +19 -0
  1110. package/types/ui/PlaybackTime/index.d.ts +11 -0
  1111. package/types/ui/ProgressBar/index.d.ts +16 -0
  1112. package/types/ui/QuoteMessage/index.d.ts +13 -0
  1113. package/types/ui/QuoteMessage/utils.d.ts +7 -0
  1114. package/types/ui/QuoteMessageInput/QuoteMessageThumbnail.d.ts +8 -0
  1115. package/types/ui/QuoteMessageInput/index.d.ts +10 -0
  1116. package/types/ui/QuoteMessageInput/mockMessage.d.ts +362 -0
  1117. package/types/ui/ReactionBadge/index.d.ts +12 -0
  1118. package/types/ui/ReactionButton/index.d.ts +13 -0
  1119. package/types/ui/SortByRow/index.d.ts +10 -0
  1120. package/types/ui/TextButton/index.d.ts +13 -0
  1121. package/types/ui/TextMessageItemBody/consts.d.ts +1 -0
  1122. package/types/ui/TextMessageItemBody/index.d.ts +13 -0
  1123. package/types/ui/ThreadReplies/index.d.ts +9 -0
  1124. package/types/ui/ThumbnailMessageItemBody/index.d.ts +15 -0
  1125. package/types/ui/Toggle/ToggleContainer.d.ts +7 -0
  1126. package/types/ui/Toggle/ToggleContext.d.ts +19 -0
  1127. package/types/ui/Toggle/ToggleUI.d.ts +12 -0
  1128. package/types/ui/Toggle/index.d.ts +11 -0
  1129. package/types/ui/Toggle/utils.d.ts +1 -0
  1130. package/types/ui/Tooltip/index.d.ts +7 -0
  1131. package/types/ui/TooltipWrapper/index.d.ts +8 -0
  1132. package/types/ui/TypingIndicatorMessage/TypingDots.d.ts +4 -0
  1133. package/types/ui/TypingIndicatorMessage/index.d.ts +6 -0
  1134. package/types/ui/UnknownMessageItemBody/index.d.ts +12 -0
  1135. package/types/ui/UserListItem/index.d.ts +21 -0
  1136. package/types/ui/UserProfile/index.d.ts +17 -0
  1137. package/types/ui/VoiceMessageInput/controlerIcons.d.ts +7 -0
  1138. package/types/ui/VoiceMessageInput/index.d.ts +16 -0
  1139. package/types/ui/VoiceMessageInput/types.d.ts +7 -0
  1140. package/types/ui/VoiceMessageItemBody/index.d.ts +12 -0
  1141. package/types/ui/Word/index.d.ts +17 -0
  1142. package/types/utils/cloneMessage.d.ts +2 -0
  1143. package/types/utils/color.d.ts +12 -0
  1144. package/types/utils/compareIds.d.ts +1 -0
  1145. package/types/utils/compressImages.d.ts +11 -0
  1146. package/types/utils/consts.d.ts +23 -0
  1147. package/types/utils/createStatefulFileInfoList.d.ts +11 -0
  1148. package/types/utils/exports/getOutgoingMessageState.d.ts +13 -0
  1149. package/types/utils/getIsReactionEnabled.d.ts +11 -0
  1150. package/types/utils/index.d.ts +142 -0
  1151. package/types/utils/isVoiceMessage.d.ts +1 -0
  1152. package/types/utils/numberToPx.d.ts +2 -0
  1153. package/types/utils/openChannelUtils.d.ts +44 -0
  1154. package/types/utils/pxToNumber.d.ts +2 -0
  1155. package/types/utils/testMocks/error.d.ts +9 -0
  1156. package/types/utils/testMocks/message.d.ts +23 -0
  1157. package/types/utils/testMocks/messageRequestHandler.d.ts +15 -0
  1158. package/types/utils/typeHelpers/objectValues.d.ts +16 -0
  1159. package/types/utils/typeHelpers/partialDeep.d.ts +14 -0
  1160. package/types/utils/typeHelpers/reducers/createAction.d.ts +17 -0
  1161. package/types/utils/useDidMountEffect.d.ts +2 -0
  1162. package/types/utils/utils.d.ts +10 -0
  1163. package/types/utils/uuid.d.ts +2 -0
  1164. package/ui/Accordion.js +39 -52
  1165. package/ui/Accordion.js.map +1 -1
  1166. package/ui/AccordionGroup.js +9 -18
  1167. package/ui/AccordionGroup.js.map +1 -1
  1168. package/ui/AdminMessage.js +13 -19
  1169. package/ui/AdminMessage.js.map +1 -1
  1170. package/ui/Avatar.js +7 -197
  1171. package/ui/Avatar.js.map +1 -1
  1172. package/ui/Badge.js +18 -22
  1173. package/ui/Badge.js.map +1 -1
  1174. package/ui/BottomSheet.js +28 -34
  1175. package/ui/BottomSheet.js.map +1 -1
  1176. package/ui/Button.js +42 -53
  1177. package/ui/Button.js.map +1 -1
  1178. package/ui/ChannelAvatar.js +21 -44
  1179. package/ui/ChannelAvatar.js.map +1 -1
  1180. package/ui/Checkbox.js +15 -24
  1181. package/ui/Checkbox.js.map +1 -1
  1182. package/ui/ConnectionStatus.js +11 -18
  1183. package/ui/ConnectionStatus.js.map +1 -1
  1184. package/ui/ContextMenu.js +195 -280
  1185. package/ui/ContextMenu.js.map +1 -1
  1186. package/ui/DateSeparator.js +13 -24
  1187. package/ui/DateSeparator.js.map +1 -1
  1188. package/ui/EmojiReactions.js +144 -327
  1189. package/ui/EmojiReactions.js.map +1 -1
  1190. package/ui/FileMessageItemBody.js +30 -49
  1191. package/ui/FileMessageItemBody.js.map +1 -1
  1192. package/ui/FileViewer.js +17 -16
  1193. package/ui/FileViewer.js.map +1 -1
  1194. package/ui/Icon.js +541 -707
  1195. package/ui/Icon.js.map +1 -1
  1196. package/ui/IconButton.js +18 -45
  1197. package/ui/IconButton.js.map +1 -1
  1198. package/ui/ImageRenderer.js +102 -149
  1199. package/ui/ImageRenderer.js.map +1 -1
  1200. package/ui/Input.js +15 -37
  1201. package/ui/Input.js.map +1 -1
  1202. package/ui/Label.js +3 -3
  1203. package/ui/LinkLabel.js +21 -45
  1204. package/ui/LinkLabel.js.map +1 -1
  1205. package/ui/Loader.js +11 -21
  1206. package/ui/Loader.js.map +1 -1
  1207. package/ui/MentionLabel.js +49 -79
  1208. package/ui/MentionLabel.js.map +1 -1
  1209. package/ui/MentionUserLabel.js +4 -15
  1210. package/ui/MentionUserLabel.js.map +1 -1
  1211. package/ui/MessageContent.js +248 -413
  1212. package/ui/MessageContent.js.map +1 -1
  1213. package/ui/MessageInput/hooks/usePaste.js +5 -5
  1214. package/ui/MessageInput.js +448 -621
  1215. package/ui/MessageInput.js.map +1 -1
  1216. package/ui/MessageItemMenu.js +110 -162
  1217. package/ui/MessageItemMenu.js.map +1 -1
  1218. package/ui/MessageItemReactionMenu.js +39 -98
  1219. package/ui/MessageItemReactionMenu.js.map +1 -1
  1220. package/ui/MessageSearchFileItem.js +78 -111
  1221. package/ui/MessageSearchFileItem.js.map +1 -1
  1222. package/ui/MessageSearchItem.js +50 -80
  1223. package/ui/MessageSearchItem.js.map +1 -1
  1224. package/ui/MessageStatus.js +12 -12
  1225. package/ui/Modal.js +13 -126
  1226. package/ui/Modal.js.map +1 -1
  1227. package/ui/MutedAvatarOverlay.js +14 -26
  1228. package/ui/MutedAvatarOverlay.js.map +1 -1
  1229. package/ui/OGMessageItemBody.js +66 -107
  1230. package/ui/OGMessageItemBody.js.map +1 -1
  1231. package/ui/OpenChannelAdminMessage.js +9 -14
  1232. package/ui/OpenChannelAdminMessage.js.map +1 -1
  1233. package/ui/OpenChannelAvatar.js +15 -26
  1234. package/ui/OpenChannelAvatar.js.map +1 -1
  1235. package/ui/OpenchannelConversationHeader.js +22 -57
  1236. package/ui/OpenchannelConversationHeader.js.map +1 -1
  1237. package/ui/OpenchannelFileMessage.js +114 -234
  1238. package/ui/OpenchannelFileMessage.js.map +1 -1
  1239. package/ui/OpenchannelOGMessage.js +157 -328
  1240. package/ui/OpenchannelOGMessage.js.map +1 -1
  1241. package/ui/OpenchannelThumbnailMessage.js +152 -313
  1242. package/ui/OpenchannelThumbnailMessage.js.map +1 -1
  1243. package/ui/OpenchannelUserMessage.js +126 -264
  1244. package/ui/OpenchannelUserMessage.js.map +1 -1
  1245. package/ui/PlaceHolder.js +45 -100
  1246. package/ui/PlaceHolder.js.map +1 -1
  1247. package/ui/PlaybackTime.js +11 -21
  1248. package/ui/PlaybackTime.js.map +1 -1
  1249. package/ui/ProgressBar.js +12 -26
  1250. package/ui/ProgressBar.js.map +1 -1
  1251. package/ui/QuoteMessage.js +70 -142
  1252. package/ui/QuoteMessage.js.map +1 -1
  1253. package/ui/QuoteMessageInput.js +71 -98
  1254. package/ui/QuoteMessageInput.js.map +1 -1
  1255. package/ui/ReactionBadge.js +20 -42
  1256. package/ui/ReactionBadge.js.map +1 -1
  1257. package/ui/ReactionButton.js +17 -35
  1258. package/ui/ReactionButton.js.map +1 -1
  1259. package/ui/SortByRow.js +23 -31
  1260. package/ui/SortByRow.js.map +1 -1
  1261. package/ui/TextButton.js +9 -25
  1262. package/ui/TextButton.js.map +1 -1
  1263. package/ui/TextMessageItemBody.js +43 -55
  1264. package/ui/TextMessageItemBody.js.map +1 -1
  1265. package/ui/ThreadReplies.js +33 -67
  1266. package/ui/ThreadReplies.js.map +1 -1
  1267. package/ui/ThumbnailMessageItemBody.js +34 -70
  1268. package/ui/ThumbnailMessageItemBody.js.map +1 -1
  1269. package/ui/Toggle.js +110 -183
  1270. package/ui/Toggle.js.map +1 -1
  1271. package/ui/Tooltip.js +9 -16
  1272. package/ui/Tooltip.js.map +1 -1
  1273. package/ui/TooltipWrapper.js +13 -41
  1274. package/ui/TooltipWrapper.js.map +1 -1
  1275. package/ui/UnknownMessageItemBody.js +20 -30
  1276. package/ui/UnknownMessageItemBody.js.map +1 -1
  1277. package/ui/UserListItem.js +51 -114
  1278. package/ui/UserListItem.js.map +1 -1
  1279. package/ui/UserProfile.js +46 -71
  1280. package/ui/UserProfile.js.map +1 -1
  1281. package/ui/VoiceMessageItemBody.js +52 -101
  1282. package/ui/VoiceMessageItemBody.js.map +1 -1
  1283. package/ui/VoiceMessgeInput.js +9 -9
  1284. package/ui/Word.js +60 -85
  1285. package/ui/Word.js.map +1 -1
  1286. package/useSendbirdStateContext.js +15 -14
  1287. package/useSendbirdStateContext.js.map +1 -1
  1288. package/utils/message/getOutgoingMessageState.js +32 -29
  1289. package/utils/message/getOutgoingMessageState.js.map +1 -1
  1290. package/utils/message/isVoiceMessage.js +3 -3
  1291. package/utils/message/isVoiceMessage.js.map +1 -1
  1292. package/withSendbird.js +17 -18
  1293. package/withSendbird.js.map +1 -1
  1294. package/ChannelListProvider-eccd99c6.js +0 -1051
  1295. package/ChannelListProvider-eccd99c6.js.map +0 -1
  1296. package/ChannelProvider-9ba5893a.js +0 -2079
  1297. package/ChannelProvider-9ba5893a.js.map +0 -1
  1298. package/CreateChannelProvider-a2885972.js +0 -48
  1299. package/CreateChannelProvider-a2885972.js.map +0 -1
  1300. package/LocalizationContext-287ee149.js +0 -20
  1301. package/LocalizationContext-287ee149.js.map +0 -1
  1302. package/MediaQueryContext-114ca049.js +0 -85
  1303. package/MediaQueryContext-114ca049.js.map +0 -1
  1304. package/MemberList-4e71a841.js +0 -422
  1305. package/MemberList-4e71a841.js.map +0 -1
  1306. package/OpenChannelListProvider-45d4ab54.js +0 -407
  1307. package/OpenChannelListProvider-45d4ab54.js.map +0 -1
  1308. package/OpenChannelProvider-9818f9ed.js +0 -1850
  1309. package/OpenChannelProvider-9818f9ed.js.map +0 -1
  1310. package/RemoveMessageModal-007c2f04.js +0 -33
  1311. package/RemoveMessageModal-007c2f04.js.map +0 -1
  1312. package/UserProfileContext-2001a468.js +0 -34
  1313. package/UserProfileContext-2001a468.js.map +0 -1
  1314. package/WebAudioUtils-31f7c8eb.js +0 -126
  1315. package/WebAudioUtils-31f7c8eb.js.map +0 -1
  1316. package/_rollupPluginBabelHelpers-e92eb032.js +0 -66
  1317. package/_rollupPluginBabelHelpers-e92eb032.js.map +0 -1
  1318. package/actionTypes-324495ed.js +0 -8
  1319. package/actionTypes-324495ed.js.map +0 -1
  1320. package/cjs/ChannelListProvider-d0ad5a84.js +0 -1060
  1321. package/cjs/ChannelListProvider-d0ad5a84.js.map +0 -1
  1322. package/cjs/ChannelProvider-fc111e5f.js +0 -2087
  1323. package/cjs/ChannelProvider-fc111e5f.js.map +0 -1
  1324. package/cjs/CreateChannelProvider-c3c843e4.js +0 -55
  1325. package/cjs/CreateChannelProvider-c3c843e4.js.map +0 -1
  1326. package/cjs/LocalizationContext-58b6ed7c.js +0 -28
  1327. package/cjs/LocalizationContext-58b6ed7c.js.map +0 -1
  1328. package/cjs/MediaQueryContext-6141d955.js +0 -92
  1329. package/cjs/MediaQueryContext-6141d955.js.map +0 -1
  1330. package/cjs/MemberList-2bd3db33.js +0 -428
  1331. package/cjs/MemberList-2bd3db33.js.map +0 -1
  1332. package/cjs/OpenChannelListProvider-a8560978.js +0 -416
  1333. package/cjs/OpenChannelListProvider-a8560978.js.map +0 -1
  1334. package/cjs/OpenChannelProvider-39f13647.js +0 -1859
  1335. package/cjs/OpenChannelProvider-39f13647.js.map +0 -1
  1336. package/cjs/RemoveMessageModal-afc3e268.js +0 -39
  1337. package/cjs/RemoveMessageModal-afc3e268.js.map +0 -1
  1338. package/cjs/UserProfileContext-c6d7abb7.js +0 -41
  1339. package/cjs/UserProfileContext-c6d7abb7.js.map +0 -1
  1340. package/cjs/WebAudioUtils-36803ab2.js +0 -129
  1341. package/cjs/WebAudioUtils-36803ab2.js.map +0 -1
  1342. package/cjs/_rollupPluginBabelHelpers-f5b0dfb9.js +0 -69
  1343. package/cjs/_rollupPluginBabelHelpers-f5b0dfb9.js.map +0 -1
  1344. package/cjs/actionTypes-327123b5.js +0 -10
  1345. package/cjs/actionTypes-327123b5.js.map +0 -1
  1346. package/cjs/color-5bf5a8f5.js +0 -36
  1347. package/cjs/color-5bf5a8f5.js.map +0 -1
  1348. package/cjs/compareIds-28c6af62.js +0 -18
  1349. package/cjs/compareIds-28c6af62.js.map +0 -1
  1350. package/cjs/const-876980e8.js +0 -22
  1351. package/cjs/const-876980e8.js.map +0 -1
  1352. package/cjs/const-c9e7a340.js.map +0 -1
  1353. package/cjs/consts-61d83828.js.map +0 -1
  1354. package/cjs/consts-b3c4f548.js.map +0 -1
  1355. package/cjs/consts-b711321c.js.map +0 -1
  1356. package/cjs/consts-f54b15c2.js.map +0 -1
  1357. package/cjs/context-6684538e.js +0 -19
  1358. package/cjs/context-6684538e.js.map +0 -1
  1359. package/cjs/dist/index.css +0 -7702
  1360. package/cjs/dist/index.css.map +0 -1
  1361. package/cjs/index-134e9852.js.map +0 -1
  1362. package/cjs/index-3448df64.js.map +0 -1
  1363. package/cjs/index-45933be9.js +0 -197
  1364. package/cjs/index-45933be9.js.map +0 -1
  1365. package/cjs/index-4c378655.js +0 -163
  1366. package/cjs/index-4c378655.js.map +0 -1
  1367. package/cjs/index-4e939c26.js +0 -369
  1368. package/cjs/index-4e939c26.js.map +0 -1
  1369. package/cjs/index-520e12b8.js +0 -173
  1370. package/cjs/index-520e12b8.js.map +0 -1
  1371. package/cjs/index-54279ec2.js.map +0 -1
  1372. package/cjs/index-692ea6aa.js +0 -76
  1373. package/cjs/index-692ea6aa.js.map +0 -1
  1374. package/cjs/index-7627b546.js.map +0 -1
  1375. package/cjs/index-a95c4ab4.js +0 -308
  1376. package/cjs/index-a95c4ab4.js.map +0 -1
  1377. package/cjs/index-b5a9b4b7.js +0 -129
  1378. package/cjs/index-b5a9b4b7.js.map +0 -1
  1379. package/cjs/index-b8ba4548.js +0 -20
  1380. package/cjs/index-b8ba4548.js.map +0 -1
  1381. package/cjs/index-bc6623d7.js +0 -289
  1382. package/cjs/index-bc6623d7.js.map +0 -1
  1383. package/cjs/index-cc2e05a4.js +0 -227
  1384. package/cjs/index-cc2e05a4.js.map +0 -1
  1385. package/cjs/index-ce07a2a3.js +0 -59
  1386. package/cjs/index-ce07a2a3.js.map +0 -1
  1387. package/cjs/index-dbe8dd84.js +0 -741
  1388. package/cjs/index-dbe8dd84.js.map +0 -1
  1389. package/cjs/index-e5e6d9b0.js +0 -468
  1390. package/cjs/index-e5e6d9b0.js.map +0 -1
  1391. package/cjs/index-e8928da6.js.map +0 -1
  1392. package/cjs/resolvedReplyType-c4564ebe.js.map +0 -1
  1393. package/cjs/stringFormatterUtils-92dbef3c.js +0 -16
  1394. package/cjs/stringFormatterUtils-92dbef3c.js.map +0 -1
  1395. package/cjs/stringSet-1539ac47.js +0 -212
  1396. package/cjs/stringSet-1539ac47.js.map +0 -1
  1397. package/cjs/tokenize-d5286fa8.js +0 -159
  1398. package/cjs/tokenize-d5286fa8.js.map +0 -1
  1399. package/cjs/tslib.es6-c74b513f.js.map +0 -1
  1400. package/cjs/types-d0d770c3.js +0 -15
  1401. package/cjs/types-d0d770c3.js.map +0 -1
  1402. package/cjs/types-feda9656.js.map +0 -1
  1403. package/cjs/useHandleUploadFiles-39e8d107.js +0 -284
  1404. package/cjs/useHandleUploadFiles-39e8d107.js.map +0 -1
  1405. package/cjs/useLongPress-18b7af79.js +0 -105
  1406. package/cjs/useLongPress-18b7af79.js.map +0 -1
  1407. package/cjs/useSendMultipleFilesMessage-d6a3d5cf.js +0 -316
  1408. package/cjs/useSendMultipleFilesMessage-d6a3d5cf.js.map +0 -1
  1409. package/cjs/useStatefulFileInfoList-c510792f.js +0 -228
  1410. package/cjs/useStatefulFileInfoList-c510792f.js.map +0 -1
  1411. package/cjs/utils-1d0f1e0c.js +0 -28
  1412. package/cjs/utils-1d0f1e0c.js.map +0 -1
  1413. package/cjs/utils-9193a195.js +0 -170
  1414. package/cjs/utils-9193a195.js.map +0 -1
  1415. package/cjs/utils-93ca9d57.js +0 -62
  1416. package/cjs/utils-93ca9d57.js.map +0 -1
  1417. package/cjs/utils-98441ba6.js +0 -35
  1418. package/cjs/utils-98441ba6.js.map +0 -1
  1419. package/cjs/utils-e6c4b2b0.js +0 -27
  1420. package/cjs/utils-e6c4b2b0.js.map +0 -1
  1421. package/cjs/utils-eb6d90e0.js +0 -10
  1422. package/cjs/utils-eb6d90e0.js.map +0 -1
  1423. package/cjs/uuid-9a117e16.js.map +0 -1
  1424. package/color-57373b4c.js +0 -34
  1425. package/color-57373b4c.js.map +0 -1
  1426. package/compareIds-7e517404.js +0 -16
  1427. package/compareIds-7e517404.js.map +0 -1
  1428. package/const-73db0277.js.map +0 -1
  1429. package/const-93731a4c.js +0 -18
  1430. package/const-93731a4c.js.map +0 -1
  1431. package/consts-4ec7d640.js.map +0 -1
  1432. package/consts-57c888b9.js.map +0 -1
  1433. package/consts-be37687e.js.map +0 -1
  1434. package/consts-d9c5f25a.js.map +0 -1
  1435. package/context-729493c4.js +0 -12
  1436. package/context-729493c4.js.map +0 -1
  1437. package/index-04bd1a59.js +0 -13
  1438. package/index-04bd1a59.js.map +0 -1
  1439. package/index-09847c0f.js.map +0 -1
  1440. package/index-0f017704.js +0 -280
  1441. package/index-0f017704.js.map +0 -1
  1442. package/index-2d27aeef.js.map +0 -1
  1443. package/index-493689bd.js +0 -156
  1444. package/index-493689bd.js.map +0 -1
  1445. package/index-494f9e79.js +0 -73
  1446. package/index-494f9e79.js.map +0 -1
  1447. package/index-4b4e9682.js +0 -161
  1448. package/index-4b4e9682.js.map +0 -1
  1449. package/index-62d5f020.js +0 -362
  1450. package/index-62d5f020.js.map +0 -1
  1451. package/index-682a192c.js.map +0 -1
  1452. package/index-686a551d.js +0 -182
  1453. package/index-686a551d.js.map +0 -1
  1454. package/index-6b3b1eca.js +0 -217
  1455. package/index-6b3b1eca.js.map +0 -1
  1456. package/index-776554c0.js +0 -692
  1457. package/index-776554c0.js.map +0 -1
  1458. package/index-92741c7e.js +0 -118
  1459. package/index-92741c7e.js.map +0 -1
  1460. package/index-a0638563.js +0 -53
  1461. package/index-a0638563.js.map +0 -1
  1462. package/index-c22e4772.js +0 -462
  1463. package/index-c22e4772.js.map +0 -1
  1464. package/index-e04159fe.js +0 -298
  1465. package/index-e04159fe.js.map +0 -1
  1466. package/index-e4277f9c.js.map +0 -1
  1467. package/index-f8a9cb51.js.map +0 -1
  1468. package/index.d.ts +0 -2963
  1469. package/resolvedReplyType-fb987595.js.map +0 -1
  1470. package/stringFormatterUtils-abbe70ba.js +0 -14
  1471. package/stringFormatterUtils-abbe70ba.js.map +0 -1
  1472. package/stringSet-6422c6b9.js +0 -210
  1473. package/stringSet-6422c6b9.js.map +0 -1
  1474. package/tokenize-eae44765.js +0 -154
  1475. package/tokenize-eae44765.js.map +0 -1
  1476. package/tslib.es6-c2fb729e.js.map +0 -1
  1477. package/types-781e0bab.js.map +0 -1
  1478. package/types-9d43ac6e.js +0 -15
  1479. package/types-9d43ac6e.js.map +0 -1
  1480. package/useHandleUploadFiles-5ede1bfe.js +0 -277
  1481. package/useHandleUploadFiles-5ede1bfe.js.map +0 -1
  1482. package/useLongPress-f8655a14.js +0 -103
  1483. package/useLongPress-f8655a14.js.map +0 -1
  1484. package/useSendMultipleFilesMessage-b8256698.js +0 -283
  1485. package/useSendMultipleFilesMessage-b8256698.js.map +0 -1
  1486. package/useStatefulFileInfoList-5e68b93f.js +0 -219
  1487. package/useStatefulFileInfoList-5e68b93f.js.map +0 -1
  1488. package/utils-2c1f072b.js +0 -31
  1489. package/utils-2c1f072b.js.map +0 -1
  1490. package/utils-6c50a6d1.js +0 -7
  1491. package/utils-6c50a6d1.js.map +0 -1
  1492. package/utils-aa4086dc.js +0 -157
  1493. package/utils-aa4086dc.js.map +0 -1
  1494. package/utils-bfc0ab3b.js +0 -57
  1495. package/utils-bfc0ab3b.js.map +0 -1
  1496. package/utils-fa321757.js +0 -26
  1497. package/utils-fa321757.js.map +0 -1
  1498. package/utils-fc1f5aa0.js +0 -25
  1499. package/utils-fc1f5aa0.js.map +0 -1
  1500. package/uuid-c15b8b3b.js.map +0 -1
@@ -1,1294 +1,1050 @@
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-AVOWwEQ4.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-0BwB1B7t.js';
7
+ import { U as USER_ACTIONS } from './chunks/bundle-NcHt88Fs.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-iPDlyZXo.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-OoXqnc0l.js';
13
+ import { n as noop } from './chunks/bundle-FQAabli1.js';
14
+ import { b as VoicePlayerProvider } from './chunks/bundle-kBtT3HBi.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-GqUhOzeC.js';
17
+ import { u as useMediaQueryContext, M as MediaQueryProvider } from './chunks/bundle-QKq7b-WA.js';
18
+ import { g as getStringSet } from './chunks/bundle-4zdVdGkr.js';
19
+ import { k as DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, l as VOICE_RECORDER_DEFAULT_MAX, e as VOICE_RECORDER_DEFAULT_MIN } from './chunks/bundle-UjngV2Kp.js';
20
+ import { a as getCaseResolvedReplyType, g as getCaseResolvedThreadReplySelectType } from './chunks/bundle-rX7vrYxX.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-gYyMZyCn.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-lDOyfwhb.js';
32
29
  import './ui/Icon.js';
33
- import './index-e4277f9c.js';
34
- import './_rollupPluginBabelHelpers-e92eb032.js';
30
+ import './chunks/bundle-ltzZCtkR.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.1';
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
+ // we use pubsub to sync events between multiple components(example - ChannelList, Channel)
638
+ // for example, if customer sends a message from their custom component
639
+ // without pubsub,we would not be able to listen to it
640
+ // in our ChannelList or Conversation
641
+ var pubSubFactory = function () {
642
+ var topics = {};
643
+ return {
644
+ __getTopics: function () { return topics; },
645
+ subscribe: function (topic, listener) {
646
+ var _a;
647
+ (_a = topics[topic]) !== null && _a !== void 0 ? _a : (topics[topic] = new Set());
648
+ topics[topic].add(listener);
649
+ return {
650
+ remove: function () {
651
+ topics[topic].delete(listener);
652
+ },
653
+ };
654
+ },
655
+ publish: function (topic, info) {
656
+ if (topics[topic]) {
657
+ topics[topic].forEach(function (fn) {
658
+ setTimeout(function () { return fn(info !== undefined ? info : {}); }, 0);
659
+ });
660
+ }
661
+ },
662
+ };
797
663
  };
798
664
 
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
- }, []);
665
+ function useAppendDomNode(ids, rootSelector) {
666
+ if (ids === void 0) { ids = []; }
667
+ if (rootSelector === void 0) { rootSelector = 'unknown'; }
668
+ useEffect(function () {
669
+ var root = document.querySelector(rootSelector);
670
+ if (root) {
671
+ ids.forEach(function (id) {
672
+ var elem = document.createElement('div');
673
+ elem.setAttribute('id', id);
674
+ root.appendChild(elem);
675
+ });
676
+ }
677
+ return function () {
678
+ if (root) {
679
+ ids.forEach(function (id) {
680
+ var target = document.getElementById(id);
681
+ if (target)
682
+ root.removeChild(target);
683
+ });
684
+ }
685
+ };
686
+ }, []);
824
687
  }
825
688
 
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));
689
+ var VoiceMessageProvider = function (_a) {
690
+ var children = _a.children, _b = _a.isVoiceMessageEnabled, isVoiceMessageEnabled = _b === void 0 ? true : _b;
691
+ if (!isVoiceMessageEnabled) {
692
+ return (React__default.createElement(VoicePlayerProvider, null, children));
693
+ }
694
+ return (React__default.createElement(VoiceRecorderProvider, null,
695
+ React__default.createElement(VoicePlayerProvider, null, children)));
834
696
  };
835
697
 
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
- };
698
+ function uikitConfigMapper(_a) {
699
+ 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;
700
+ var legacyConfig = _a.legacyConfig, _1 = _a.uikitOptions, uikitOptions = _1 === void 0 ? {} : _1;
701
+ 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;
702
+ return {
703
+ common: {
704
+ enableUsingDefaultUserProfile: (_c = (_b = uikitOptions.common) === null || _b === void 0 ? void 0 : _b.enableUsingDefaultUserProfile) !== null && _c !== void 0 ? _c : (typeof disableUserProfile === 'boolean'
705
+ ? !disableUserProfile
706
+ : undefined),
707
+ },
708
+ groupChannel: {
709
+ enableOgtag: (_d = uikitOptions.groupChannel) === null || _d === void 0 ? void 0 : _d.enableOgtag,
710
+ enableMention: (_f = (_e = uikitOptions.groupChannel) === null || _e === void 0 ? void 0 : _e.enableMention) !== null && _f !== void 0 ? _f : isMentionEnabled,
711
+ enableReactions: (_h = (_g = uikitOptions.groupChannel) === null || _g === void 0 ? void 0 : _g.enableReactions) !== null && _h !== void 0 ? _h : isReactionEnabled,
712
+ enableTypingIndicator: (_j = uikitOptions.groupChannel) === null || _j === void 0 ? void 0 : _j.enableTypingIndicator,
713
+ enableVoiceMessage: (_l = (_k = uikitOptions.groupChannel) === null || _k === void 0 ? void 0 : _k.enableVoiceMessage) !== null && _l !== void 0 ? _l : isVoiceMessageEnabled,
714
+ replyType: (_o = (_m = uikitOptions.groupChannel) === null || _m === void 0 ? void 0 : _m.replyType) !== null && _o !== void 0 ? _o : (replyType != null ? getCaseResolvedReplyType(replyType).lowerCase : undefined),
715
+ threadReplySelectType: (_p = uikitOptions.groupChannel) === null || _p === void 0 ? void 0 : _p.threadReplySelectType,
716
+ input: {
717
+ enableDocument: (_r = (_q = uikitOptions.groupChannel) === null || _q === void 0 ? void 0 : _q.input) === null || _r === void 0 ? void 0 : _r.enableDocument,
718
+ },
719
+ },
720
+ groupChannelList: {
721
+ enableTypingIndicator: (_t = (_s = uikitOptions.groupChannelList) === null || _s === void 0 ? void 0 : _s.enableTypingIndicator) !== null && _t !== void 0 ? _t : isTypingIndicatorEnabledOnChannelList,
722
+ enableMessageReceiptStatus: (_v = (_u = uikitOptions.groupChannelList) === null || _u === void 0 ? void 0 : _u.enableMessageReceiptStatus) !== null && _v !== void 0 ? _v : isMessageReceiptStatusEnabledOnChannelList,
723
+ },
724
+ groupChannelSettings: {
725
+ enableMessageSearch: (_x = (_w = uikitOptions.groupChannelSettings) === null || _w === void 0 ? void 0 : _w.enableMessageSearch) !== null && _x !== void 0 ? _x : showSearchIcon,
726
+ },
727
+ openChannel: {
728
+ enableOgtag: (_y = uikitOptions.openChannel) === null || _y === void 0 ? void 0 : _y.enableOgtag,
729
+ input: {
730
+ enableDocument: (_0 = (_z = uikitOptions.openChannel) === null || _z === void 0 ? void 0 : _z.input) === null || _0 === void 0 ? void 0 : _0.enableDocument,
731
+ },
732
+ },
733
+ };
879
734
  }
880
735
 
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
- };
736
+ var TIMEOUT = 2000;
737
+ /*
738
+ * This is a factory function that returns a scheduler.
739
+ * The scheduler is a queue that calls the callback function on intervals.
740
+ * If interval is empty, the callback function is called immediately.
741
+ * If interval is not empty, the callback function is called after the interval.
742
+ */
743
+ function schedulerFactory(_a) {
744
+ var logger = _a.logger, timeout = _a.timeout, cb = _a.cb;
745
+ var queue = [];
746
+ var interval = null;
747
+ var push = function (channel) {
748
+ var channelPresent = queue.find(function (c) { return c.url === channel.url; });
749
+ if (!channelPresent) {
750
+ queue.push(channel);
751
+ }
752
+ else {
753
+ logger.info('Channel: Mark as read already in queue', { channel: channel });
754
+ }
755
+ // start the interval if it's not already running
756
+ if (interval) {
757
+ return;
758
+ }
759
+ var item = queue.shift();
760
+ if (item) {
761
+ cb(item);
762
+ }
763
+ interval = setInterval(function () {
764
+ if (queue.length === 0 && interval) {
765
+ clearInterval(interval);
766
+ interval = null;
767
+ return;
768
+ }
769
+ var item = queue.shift();
770
+ if (item) {
771
+ cb(item);
772
+ }
773
+ }, (timeout || TIMEOUT));
774
+ };
775
+ var clear = function () {
776
+ queue = [];
777
+ if (interval) {
778
+ clearInterval(interval);
779
+ interval = null;
780
+ }
781
+ };
782
+ return {
783
+ push: push,
784
+ clear: clear,
785
+ getQueue: function () { return queue; },
786
+ };
939
787
  }
940
788
 
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);
789
+ // this hook accepts a callback to run component is unmounted
790
+ function useUnmount(callback, deps) {
791
+ if (deps === void 0) { deps = []; }
792
+ useLayoutEffect(function () {
793
+ return function () {
794
+ callback();
795
+ };
796
+ }, deps);
951
797
  }
952
798
 
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;
799
+ function useMarkAsReadScheduler(_a, _b) {
800
+ var isConnected = _a.isConnected;
801
+ var logger = _b.logger;
802
+ var markAsReadScheduler = useMemo(function () { return schedulerFactory({
803
+ logger: logger,
804
+ cb: function (channel) {
805
+ try {
806
+ channel.markAsRead();
807
+ }
808
+ catch (error) {
809
+ logger.warning('Channel: Mark as delivered failed', { channel: channel, error: error });
810
+ }
811
+ },
812
+ }); }, []);
813
+ useEffect(function () {
814
+ // for simplicity, we clear the queue when the connection is lost
815
+ if (!isConnected) {
816
+ markAsReadScheduler.clear();
817
+ }
818
+ }, [isConnected]);
819
+ useUnmount(function () { markAsReadScheduler.clear(); });
820
+ return markAsReadScheduler;
981
821
  }
982
822
 
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;
823
+ function useMarkAsDeliveredScheduler(_a, _b) {
824
+ var isConnected = _a.isConnected;
825
+ var logger = _b.logger;
826
+ var markAsDeliveredScheduler = useMemo(function () { return schedulerFactory({
827
+ logger: logger,
828
+ cb: function (channel) {
829
+ try {
830
+ channel.markAsDelivered();
831
+ }
832
+ catch (error) {
833
+ logger.warning('Channel: Mark as delivered failed', { channel: channel, error: error });
834
+ }
835
+ },
836
+ }); }, []);
837
+ useEffect(function () {
838
+ // for simplicity, we clear the queue when the connection is lost
839
+ if (!isConnected) {
840
+ markAsDeliveredScheduler.clear();
841
+ }
842
+ }, [isConnected]);
843
+ useUnmount(function () { markAsDeliveredScheduler.clear(); });
844
+ return markAsDeliveredScheduler;
1011
845
  }
1012
846
 
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)))));
847
+ function SendbirdProvider(props) {
848
+ var localConfigs = uikitConfigMapper({
849
+ legacyConfig: {
850
+ replyType: props.replyType,
851
+ isMentionEnabled: props.isMentionEnabled,
852
+ isReactionEnabled: props.isReactionEnabled,
853
+ disableUserProfile: props.disableUserProfile,
854
+ isVoiceMessageEnabled: props.isVoiceMessageEnabled,
855
+ isTypingIndicatorEnabledOnChannelList: props.isTypingIndicatorEnabledOnChannelList,
856
+ isMessageReceiptStatusEnabledOnChannelList: props.isMessageReceiptStatusEnabledOnChannelList,
857
+ showSearchIcon: props.showSearchIcon,
858
+ },
859
+ uikitOptions: props.uikitOptions,
860
+ });
861
+ return (React__default.createElement(UIKitConfigProvider, { localConfigs: {
862
+ common: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.common,
863
+ groupChannel: {
864
+ channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannel,
865
+ channelList: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelList,
866
+ setting: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.groupChannelSettings,
867
+ },
868
+ openChannel: {
869
+ channel: localConfigs === null || localConfigs === void 0 ? void 0 : localConfigs.openChannel,
870
+ },
871
+ } },
872
+ React__default.createElement(SendbirdSDK, __assign({}, props))));
873
+ }
874
+ var SendbirdSDK = function (_a) {
875
+ var _b, _c, _d;
876
+ 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;
877
+ 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;
878
+ var isMobile = useMediaQueryContext().isMobile;
879
+ var _0 = useState(LoggerFactory(logLevel)), logger = _0[0], setLogger = _0[1];
880
+ var pubSub = useState(function () { return customPubSub !== null && customPubSub !== void 0 ? customPubSub : pubSubFactory(); })[0];
881
+ var _1 = useReducer(reducer$1, initialState$1), sdkStore = _1[0], sdkDispatcher = _1[1];
882
+ var _2 = useReducer(reducer, initialState), userStore = _2[0], userDispatcher = _2[1];
883
+ var _3 = useUIKitConfig(), configs = _3.configs, configsWithAppAttr = _3.configsWithAppAttr, initDashboardConfigs = _3.initDashboardConfigs;
884
+ var sdkInitialized = sdkStore.initialized;
885
+ var sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk;
886
+ var _4 = (_b = sdk === null || sdk === void 0 ? void 0 : sdk.appInfo) !== null && _b !== void 0 ? _b : {}, uploadSizeLimit = _4.uploadSizeLimit, multipleFilesMessageFileCountLimit = _4.multipleFilesMessageFileCountLimit;
887
+ useTheme(colorSet);
888
+ var reconnect = useConnect({
889
+ appId: appId,
890
+ userId: userId,
891
+ accessToken: accessToken,
892
+ isUserIdUsedForNickname: isUserIdUsedForNickname,
893
+ isMobile: isMobile,
894
+ }, {
895
+ logger: logger,
896
+ nickname: nickname,
897
+ profileUrl: profileUrl,
898
+ configureSession: configureSession,
899
+ customApiHost: customApiHost,
900
+ customWebSocketHost: customWebSocketHost,
901
+ sdkInitParams: sdkInitParams,
902
+ customExtensionParams: customExtensionParams,
903
+ sdk: sdk,
904
+ sdkDispatcher: sdkDispatcher,
905
+ userDispatcher: userDispatcher,
906
+ initDashboardConfigs: initDashboardConfigs,
907
+ });
908
+ useUnmount(function () {
909
+ if (typeof sdk.disconnect === 'function') {
910
+ disconnectSdk({
911
+ logger: logger,
912
+ sdkDispatcher: sdkDispatcher,
913
+ userDispatcher: userDispatcher,
914
+ sdk: sdk,
915
+ });
916
+ }
917
+ }, [sdk.disconnect]);
918
+ // to create a pubsub to communicate between parent and child
919
+ useEffect(function () {
920
+ setLogger(LoggerFactory(logLevel));
921
+ }, [logLevel]);
922
+ useAppendDomNode([
923
+ 'sendbird-modal-root',
924
+ 'sendbird-dropdown-portal',
925
+ 'sendbird-emoji-list-portal',
926
+ ], 'body');
927
+ // should move to reducer
928
+ var _5 = useState(theme), currentTheme = _5[0], setCurrentTheme = _5[1];
929
+ useEffect(function () {
930
+ setCurrentTheme(theme);
931
+ }, [theme]);
932
+ useEffect(function () {
933
+ var body = document.querySelector('body');
934
+ body.classList.remove('sendbird-experimental__rem__units');
935
+ if (isREMUnitEnabled) {
936
+ body.classList.add('sendbird-experimental__rem__units');
937
+ }
938
+ }, [isREMUnitEnabled]);
939
+ // add-remove theme from body
940
+ useEffect(function () {
941
+ logger.info('Setup theme', "Theme: ".concat(currentTheme));
942
+ try {
943
+ var body = document.querySelector('body');
944
+ body.classList.remove('sendbird-theme--light');
945
+ body.classList.remove('sendbird-theme--dark');
946
+ body.classList.add("sendbird-theme--".concat(currentTheme || 'light'));
947
+ logger.info('Finish setup theme');
948
+ // eslint-disable-next-line no-empty
949
+ }
950
+ catch (e) {
951
+ logger.warning('Setup theme failed', "".concat(e));
952
+ }
953
+ return function () {
954
+ try {
955
+ var body = document.querySelector('body');
956
+ body.classList.remove('sendbird-theme--light');
957
+ body.classList.remove('sendbird-theme--dark');
958
+ // eslint-disable-next-line no-empty
959
+ }
960
+ catch (_a) { }
961
+ };
962
+ }, [currentTheme]);
963
+ var isOnline = useOnlineStatus(sdkStore.sdk, logger);
964
+ var markAsReadScheduler = useMarkAsReadScheduler({ isConnected: isOnline }, { logger: logger });
965
+ var markAsDeliveredScheduler = useMarkAsDeliveredScheduler({ isConnected: isOnline }, { logger: logger });
966
+ var localeStringSet = React__default.useMemo(function () {
967
+ if (!stringSet) {
968
+ return getStringSet('en');
969
+ }
970
+ return __assign(__assign({}, getStringSet('en')), stringSet);
971
+ }, [stringSet]);
972
+ /**
973
+ * Feature Configuration - TODO
974
+ * This will be moved into the UIKitConfigProvider, aftering Dashboard applies
975
+ */
976
+ var uikitMultipleFilesMessageLimit = useMemo(function () {
977
+ return Math.min(DEFAULT_MULTIPLE_FILES_MESSAGE_LIMIT, multipleFilesMessageFileCountLimit !== null && multipleFilesMessageFileCountLimit !== void 0 ? multipleFilesMessageFileCountLimit : Number.MAX_SAFE_INTEGER);
978
+ }, [multipleFilesMessageFileCountLimit]);
979
+ var uikitUploadSizeLimit = useMemo(function () {
980
+ return uploadSizeLimit;
981
+ }, [uploadSizeLimit]);
982
+ return (React__default.createElement(SendbirdSdkContext.Provider, { value: {
983
+ stores: {
984
+ sdkStore: sdkStore,
985
+ userStore: userStore,
986
+ },
987
+ dispatchers: {
988
+ sdkDispatcher: sdkDispatcher,
989
+ userDispatcher: userDispatcher,
990
+ reconnect: reconnect,
991
+ },
992
+ config: {
993
+ disableMarkAsDelivered: disableMarkAsDelivered,
994
+ renderUserProfile: renderUserProfile,
995
+ onUserProfileMessage: onUserProfileMessage,
996
+ allowProfileEdit: allowProfileEdit,
997
+ isOnline: isOnline,
998
+ userId: userId,
999
+ appId: appId,
1000
+ accessToken: accessToken,
1001
+ theme: currentTheme,
1002
+ setCurrentTheme: setCurrentTheme,
1003
+ setCurrenttheme: setCurrentTheme,
1004
+ isMultipleFilesMessageEnabled: isMultipleFilesMessageEnabled,
1005
+ uikitUploadSizeLimit: uikitUploadSizeLimit,
1006
+ uikitMultipleFilesMessageLimit: uikitMultipleFilesMessageLimit,
1007
+ userListQuery: userListQuery,
1008
+ logger: logger,
1009
+ pubSub: pubSub,
1010
+ imageCompression: __assign({ compressionRate: 0.7 }, imageCompression),
1011
+ voiceRecord: {
1012
+ maxRecordingTime: (_c = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.maxRecordingTime) !== null && _c !== void 0 ? _c : VOICE_RECORDER_DEFAULT_MAX,
1013
+ minRecordingTime: (_d = voiceRecord === null || voiceRecord === void 0 ? void 0 : voiceRecord.minRecordingTime) !== null && _d !== void 0 ? _d : VOICE_RECORDER_DEFAULT_MIN,
1014
+ },
1015
+ userMention: {
1016
+ maxMentionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxMentionCount) || 10,
1017
+ maxSuggestionCount: (userMention === null || userMention === void 0 ? void 0 : userMention.maxSuggestionCount) || 15,
1018
+ },
1019
+ markAsReadScheduler: markAsReadScheduler,
1020
+ markAsDeliveredScheduler: markAsDeliveredScheduler,
1021
+ // From UIKitConfigProvider.localConfigs
1022
+ disableUserProfile: !configs.common.enableUsingDefaultUserProfile,
1023
+ isReactionEnabled: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableReactions,
1024
+ isMentionEnabled: configs.groupChannel.channel.enableMention,
1025
+ isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage,
1026
+ replyType: getCaseResolvedReplyType(configs.groupChannel.channel.replyType).upperCase,
1027
+ isTypingIndicatorEnabledOnChannelList: configs.groupChannel.channelList.enableTypingIndicator,
1028
+ isMessageReceiptStatusEnabledOnChannelList: configs.groupChannel.channelList.enableMessageReceiptStatus,
1029
+ showSearchIcon: sdkInitialized && configsWithAppAttr(sdk).groupChannel.setting.enableMessageSearch,
1030
+ // Remote configs set from dashboard by UIKit feature configuration
1031
+ groupChannel: {
1032
+ enableOgtag: sdkInitialized && configsWithAppAttr(sdk).groupChannel.channel.enableOgtag,
1033
+ enableTypingIndicator: configs.groupChannel.channel.enableTypingIndicator,
1034
+ enableDocument: configs.groupChannel.channel.input.enableDocument,
1035
+ threadReplySelectType: getCaseResolvedThreadReplySelectType(configs.groupChannel.channel.threadReplySelectType).lowerCase,
1036
+ },
1037
+ openChannel: {
1038
+ enableOgtag: sdkInitialized && configsWithAppAttr(sdk).openChannel.channel.enableOgtag,
1039
+ enableDocument: configs.openChannel.channel.input.enableDocument,
1040
+ },
1041
+ },
1042
+ eventHandlers: eventHandlers,
1043
+ } },
1044
+ React__default.createElement(MediaQueryProvider, { logger: logger, breakpoint: breakpoint },
1045
+ React__default.createElement(LocalizationProvider, { stringSet: localeStringSet, dateLocale: dateLocale },
1046
+ React__default.createElement(VoiceMessageProvider, { isVoiceMessageEnabled: configs.groupChannel.channel.enableVoiceMessage },
1047
+ React__default.createElement(GlobalModalProvider, null, children))))));
1292
1048
  };
1293
1049
 
1294
1050
  export { SendbirdProvider, SendbirdProvider as default };