@sendbird/uikit-react 3.16.8 → 3.16.10

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 (860) hide show
  1. package/App.js +88 -88
  2. package/CHANGELOG.md +10 -0
  3. package/Channel/components/ChannelHeader.js +32 -32
  4. package/Channel/components/ChannelUI.js +67 -67
  5. package/Channel/components/FileViewer.js +30 -30
  6. package/Channel/components/FrozenNotification.js +6 -6
  7. package/Channel/components/Message.js +56 -56
  8. package/Channel/components/MessageInput.js +43 -43
  9. package/Channel/components/MessageInputWrapper.js +43 -43
  10. package/Channel/components/MessageList.js +60 -60
  11. package/Channel/components/RemoveMessageModal.js +29 -29
  12. package/Channel/components/SuggestedMentionList.js +29 -29
  13. package/Channel/components/TypingIndicator.js +9 -9
  14. package/Channel/components/UnreadCount.js +8 -8
  15. package/Channel/context.js +23 -23
  16. package/Channel/hooks/useHandleUploadFiles.js +18 -18
  17. package/Channel/hooks/useInitialMessagesFetch.js +8 -8
  18. package/Channel/utils/compareMessagesForGrouping.js +8 -8
  19. package/Channel/utils/getMessagePartsInfo.js +9 -9
  20. package/Channel.js +67 -67
  21. package/ChannelList/components/AddChannel.js +88 -88
  22. package/ChannelList/components/ChannelListHeader.js +13 -13
  23. package/ChannelList/components/ChannelListUI.js +88 -88
  24. package/ChannelList/components/ChannelPreview.js +32 -32
  25. package/ChannelList/components/ChannelPreviewAction.js +17 -17
  26. package/ChannelList/context.js +14 -14
  27. package/ChannelList.js +88 -88
  28. package/ChannelSettings/components/ChannelProfile.js +23 -23
  29. package/ChannelSettings/components/ChannelSettingMenuList.js +14 -14
  30. package/ChannelSettings/components/ChannelSettingsHeader.js +11 -11
  31. package/ChannelSettings/components/ChannelSettingsMenuItem.js +2 -2
  32. package/ChannelSettings/components/ChannelSettingsUI.js +31 -31
  33. package/ChannelSettings/components/EditDetailsModal.js +19 -19
  34. package/ChannelSettings/components/LeaveChannel.js +20 -20
  35. package/ChannelSettings/components/ModerationPanel.js +29 -29
  36. package/ChannelSettings/components/UserListItem.js +19 -19
  37. package/ChannelSettings/components/UserPanel.js +28 -28
  38. package/ChannelSettings/context.js +9 -9
  39. package/ChannelSettings/hooks/useMenuList.js +29 -29
  40. package/ChannelSettings.js +31 -31
  41. package/CreateChannel/components/CreateChannelUI.js +88 -88
  42. package/CreateChannel/components/InviteUsers.js +88 -88
  43. package/CreateChannel/components/SelectChannelType.js +88 -88
  44. package/CreateChannel/context.js +88 -88
  45. package/CreateChannel.js +88 -88
  46. package/CreateOpenChannel/components/CreateOpenChannelUI.js +15 -15
  47. package/CreateOpenChannel/context.js +4 -4
  48. package/CreateOpenChannel.js +15 -15
  49. package/EditUserProfile/components/EditUserProfileUI.js +15 -15
  50. package/EditUserProfile/context.js +1 -1
  51. package/EditUserProfile.js +15 -15
  52. package/GroupChannel/components/FileViewer.js +28 -28
  53. package/GroupChannel/components/FrozenNotification.js +6 -6
  54. package/GroupChannel/components/GroupChannelHeader.js +29 -29
  55. package/GroupChannel/components/GroupChannelUI.js +63 -63
  56. package/GroupChannel/components/Message.js +54 -54
  57. package/GroupChannel/components/MessageInputWrapper.js +41 -41
  58. package/GroupChannel/components/MessageList.js +56 -56
  59. package/GroupChannel/components/RemoveMessageModal.js +27 -27
  60. package/GroupChannel/components/SuggestedMentionList.js +15 -15
  61. package/GroupChannel/components/TypingIndicator.js +9 -9
  62. package/GroupChannel/components/UnreadCount.js +8 -8
  63. package/GroupChannel/context.js +15 -15
  64. package/GroupChannel.js +63 -63
  65. package/GroupChannelList/components/AddGroupChannel.js +88 -88
  66. package/GroupChannelList/components/GroupChannelListHeader.js +13 -13
  67. package/GroupChannelList/components/GroupChannelListItem.js +32 -32
  68. package/GroupChannelList/components/GroupChannelListUI.js +88 -88
  69. package/GroupChannelList/components/GroupChannelPreviewAction.js +17 -17
  70. package/GroupChannelList/context.js +10 -10
  71. package/GroupChannelList.js +88 -88
  72. package/MessageSearch/components/MessageSearchUI.js +20 -20
  73. package/MessageSearch/context.js +6 -6
  74. package/MessageSearch.js +22 -22
  75. package/OpenChannel/components/FrozenChannelNotification.js +5 -5
  76. package/OpenChannel/components/OpenChannelHeader.js +20 -20
  77. package/OpenChannel/components/OpenChannelInput.js +29 -29
  78. package/OpenChannel/components/OpenChannelMessage.js +39 -39
  79. package/OpenChannel/components/OpenChannelMessageList.js +43 -43
  80. package/OpenChannel/components/OpenChannelUI.js +43 -43
  81. package/OpenChannel/context.js +19 -19
  82. package/OpenChannel.js +43 -43
  83. package/OpenChannelList/components/OpenChannelListUI.js +17 -17
  84. package/OpenChannelList/components/OpenChannelPreview.js +6 -6
  85. package/OpenChannelList/context.js +6 -6
  86. package/OpenChannelList.js +17 -17
  87. package/OpenChannelSettings/components/EditDetailsModal.js +18 -18
  88. package/OpenChannelSettings/components/OpenChannelProfile.js +18 -18
  89. package/OpenChannelSettings/components/OpenChannelSettingsUI.js +24 -24
  90. package/OpenChannelSettings/components/OperatorUI.js +24 -24
  91. package/OpenChannelSettings/components/ParticipantUI.js +22 -22
  92. package/OpenChannelSettings/context.js +6 -6
  93. package/OpenChannelSettings.js +24 -24
  94. package/SendbirdProvider.js +23 -23
  95. package/Thread/components/ParentMessageInfo.js +49 -49
  96. package/Thread/components/ParentMessageInfoItem.js +34 -34
  97. package/Thread/components/ThreadHeader.js +8 -8
  98. package/Thread/components/ThreadList.js +56 -56
  99. package/Thread/components/ThreadListItem.js +56 -56
  100. package/Thread/components/ThreadMessageInput.js +46 -46
  101. package/Thread/components/ThreadUI.js +62 -62
  102. package/Thread/context.js +15 -15
  103. package/Thread.js +62 -62
  104. package/VoicePlayer/context.js +6 -6
  105. package/VoicePlayer/useVoicePlayer.js +14 -14
  106. package/VoiceRecorder/context.js +13 -13
  107. package/VoiceRecorder/useVoiceRecorder.js +12 -12
  108. package/chunks/{bundle-B_A8Uj8b.js → bundle-3CHYtOfL.js} +3 -3
  109. package/chunks/{bundle-B_A8Uj8b.js.map → bundle-3CHYtOfL.js.map} +1 -1
  110. package/chunks/{bundle-SvjGCfne.js → bundle-3CVJzoCD.js} +3 -3
  111. package/chunks/{bundle-SvjGCfne.js.map → bundle-3CVJzoCD.js.map} +1 -1
  112. package/chunks/{bundle-6PF_dVw5.js → bundle-ACCb-8jH.js} +7 -7
  113. package/chunks/{bundle-6PF_dVw5.js.map → bundle-ACCb-8jH.js.map} +1 -1
  114. package/chunks/{bundle-CddXYET0.js → bundle-Aco00fYQ.js} +5 -5
  115. package/chunks/{bundle-CddXYET0.js.map → bundle-Aco00fYQ.js.map} +1 -1
  116. package/chunks/{bundle-NfL9hHdo.js → bundle-B2xZfK-0.js} +1 -1
  117. package/chunks/bundle-B2xZfK-0.js.map +1 -0
  118. package/chunks/{bundle-BodstWU6.js → bundle-B3WRbBWS.js} +4 -4
  119. package/chunks/{bundle-BodstWU6.js.map → bundle-B3WRbBWS.js.map} +1 -1
  120. package/chunks/{bundle-CUOEzxFF.js → bundle-B3evQLd6.js} +1 -1
  121. package/chunks/bundle-B3evQLd6.js.map +1 -0
  122. package/chunks/{bundle-C_Bj-oeJ.js → bundle-B5sQzSv9.js} +3 -3
  123. package/chunks/{bundle-C_Bj-oeJ.js.map → bundle-B5sQzSv9.js.map} +1 -1
  124. package/chunks/{bundle-K9rk8Bfi.js → bundle-B6R3QLUf.js} +8 -8
  125. package/chunks/bundle-B6R3QLUf.js.map +1 -0
  126. package/chunks/{bundle-CAJl5N4R.js → bundle-B8vkzJuS.js} +4 -4
  127. package/chunks/bundle-B8vkzJuS.js.map +1 -0
  128. package/chunks/{bundle-BkjPzgla.js → bundle-BAYOQ4lI.js} +1 -1
  129. package/chunks/bundle-BAYOQ4lI.js.map +1 -0
  130. package/chunks/{bundle-lzpjHgR_.js → bundle-BBPPwBP-.js} +5 -5
  131. package/chunks/{bundle-lzpjHgR_.js.map → bundle-BBPPwBP-.js.map} +1 -1
  132. package/chunks/{bundle-B7-mUZu7.js → bundle-BCC98_OB.js} +1 -1
  133. package/chunks/bundle-BCC98_OB.js.map +1 -0
  134. package/chunks/{bundle-Q-b7_fsl.js → bundle-BCO1ipEu.js} +7 -7
  135. package/chunks/bundle-BCO1ipEu.js.map +1 -0
  136. package/chunks/{bundle-Bz9CQOX4.js → bundle-BDhzQNdy.js} +7 -7
  137. package/chunks/{bundle-Bz9CQOX4.js.map → bundle-BDhzQNdy.js.map} +1 -1
  138. package/chunks/{bundle-C_glFM4Z.js → bundle-BGUnAtSK.js} +9 -9
  139. package/chunks/{bundle-C_glFM4Z.js.map → bundle-BGUnAtSK.js.map} +1 -1
  140. package/chunks/{bundle-uV_TEAvL.js → bundle-BKsKPtjg.js} +6 -6
  141. package/chunks/{bundle-uV_TEAvL.js.map → bundle-BKsKPtjg.js.map} +1 -1
  142. package/chunks/{bundle-DA4za5Rj.js → bundle-BOofcNOh.js} +4 -4
  143. package/chunks/bundle-BOofcNOh.js.map +1 -0
  144. package/chunks/{bundle-CLx3vwwI.js → bundle-BTCLPh_U.js} +1 -1
  145. package/chunks/bundle-BTCLPh_U.js.map +1 -0
  146. package/chunks/{bundle-pOfT343E.js → bundle-BZcIM6nq.js} +4 -4
  147. package/chunks/bundle-BZcIM6nq.js.map +1 -0
  148. package/chunks/{bundle-C63EZHDP.js → bundle-BsU9k0LR.js} +5 -5
  149. package/chunks/{bundle-C63EZHDP.js.map → bundle-BsU9k0LR.js.map} +1 -1
  150. package/chunks/{bundle-CieSinpC.js → bundle-Bu_CIwDm.js} +5 -5
  151. package/chunks/bundle-Bu_CIwDm.js.map +1 -0
  152. package/chunks/{bundle-Bx-11rmr.js → bundle-Bv2JmaC2.js} +1 -1
  153. package/chunks/bundle-Bv2JmaC2.js.map +1 -0
  154. package/chunks/{bundle-QZcjovdG.js → bundle-Bx8Sqjji.js} +1 -1
  155. package/chunks/bundle-Bx8Sqjji.js.map +1 -0
  156. package/chunks/{bundle-D90Dai1z.js → bundle-C1jXTlgM.js} +3 -3
  157. package/chunks/bundle-C1jXTlgM.js.map +1 -0
  158. package/chunks/{bundle-DTS-uU1_.js → bundle-C4olSBX9.js} +14 -14
  159. package/chunks/{bundle-DTS-uU1_.js.map → bundle-C4olSBX9.js.map} +1 -1
  160. package/chunks/{bundle-19RRma1T.js → bundle-C6gxsmD2.js} +10 -10
  161. package/chunks/{bundle-19RRma1T.js.map → bundle-C6gxsmD2.js.map} +1 -1
  162. package/chunks/{bundle-CwfU7XnU.js → bundle-C9Yf8_3z.js} +1 -1
  163. package/chunks/bundle-C9Yf8_3z.js.map +1 -0
  164. package/chunks/{bundle-29anv6Qs.js → bundle-CAqNV7Jw.js} +1 -1
  165. package/chunks/bundle-CAqNV7Jw.js.map +1 -0
  166. package/chunks/{bundle-DgT_60cR.js → bundle-CDtkDyUw.js} +1 -1
  167. package/chunks/bundle-CDtkDyUw.js.map +1 -0
  168. package/chunks/{bundle-CDV8AYgt.js → bundle-CEq1fSuU.js} +3 -3
  169. package/chunks/bundle-CEq1fSuU.js.map +1 -0
  170. package/chunks/{bundle-B0UH4qgo.js → bundle-CGpoAabY.js} +1 -1
  171. package/chunks/bundle-CGpoAabY.js.map +1 -0
  172. package/chunks/{bundle-FqbH02lt.js → bundle-CHc1MI8A.js} +1 -1
  173. package/chunks/bundle-CHc1MI8A.js.map +1 -0
  174. package/chunks/{bundle-BVUryxPg.js → bundle-CKuLtDzG.js} +2 -2
  175. package/chunks/{bundle-BVUryxPg.js.map → bundle-CKuLtDzG.js.map} +1 -1
  176. package/chunks/{bundle-C0VuTt3c.js → bundle-CRws5m69.js} +6 -6
  177. package/chunks/bundle-CRws5m69.js.map +1 -0
  178. package/chunks/{bundle-DIDUURtl.js → bundle-CUmaXfSc.js} +3 -3
  179. package/chunks/{bundle-DIDUURtl.js.map → bundle-CUmaXfSc.js.map} +1 -1
  180. package/chunks/{bundle-BrjY7wQc.js → bundle-CWD0lpsm.js} +2 -2
  181. package/chunks/{bundle-BrjY7wQc.js.map → bundle-CWD0lpsm.js.map} +1 -1
  182. package/chunks/{bundle-Bs0S8wQP.js → bundle-CXy1tE2N.js} +4 -4
  183. package/chunks/bundle-CXy1tE2N.js.map +1 -0
  184. package/chunks/{bundle-Dr92I1-B.js → bundle-CbWfQs4h.js} +1 -1
  185. package/chunks/bundle-CbWfQs4h.js.map +1 -0
  186. package/chunks/{bundle-CSJ53xaT.js → bundle-CdFl8VL-.js} +465 -392
  187. package/chunks/bundle-CdFl8VL-.js.map +1 -0
  188. package/chunks/{bundle-DlgrDAZX.js → bundle-CkomHGIj.js} +2 -2
  189. package/chunks/{bundle-DlgrDAZX.js.map → bundle-CkomHGIj.js.map} +1 -1
  190. package/chunks/{bundle-DyJdx5kB.js → bundle-Cl49DqSv.js} +1 -1
  191. package/chunks/bundle-Cl49DqSv.js.map +1 -0
  192. package/chunks/{bundle-DuSlvN3-.js → bundle-CmS7TEQp.js} +1 -1
  193. package/chunks/{bundle-DuSlvN3-.js.map → bundle-CmS7TEQp.js.map} +1 -1
  194. package/chunks/{bundle-BcieCrHN.js → bundle-CtHkArHb.js} +3 -3
  195. package/chunks/bundle-CtHkArHb.js.map +1 -0
  196. package/chunks/{bundle-9MYFaUTM.js → bundle-CuuC8Lgb.js} +11 -11
  197. package/chunks/{bundle-9MYFaUTM.js.map → bundle-CuuC8Lgb.js.map} +1 -1
  198. package/chunks/{bundle-Bo4ebSiS.js → bundle-D-bmcHk9.js} +12 -12
  199. package/chunks/{bundle-Bo4ebSiS.js.map → bundle-D-bmcHk9.js.map} +1 -1
  200. package/chunks/{bundle-DytwP8RF.js → bundle-D13EwQ7_.js} +7 -7
  201. package/chunks/{bundle-DytwP8RF.js.map → bundle-D13EwQ7_.js.map} +1 -1
  202. package/chunks/{bundle-3w_Dk0EP.js → bundle-D6tIALJA.js} +2 -2
  203. package/chunks/bundle-D6tIALJA.js.map +1 -0
  204. package/chunks/{bundle-B14ovUBm.js → bundle-D8RfKZgw.js} +33 -33
  205. package/chunks/{bundle-B14ovUBm.js.map → bundle-D8RfKZgw.js.map} +1 -1
  206. package/chunks/{bundle-DXIpH3W2.js → bundle-DG90mvnD.js} +1 -1
  207. package/chunks/bundle-DG90mvnD.js.map +1 -0
  208. package/chunks/{bundle-DG85l4tk.js → bundle-DH6qrVST.js} +14 -14
  209. package/chunks/{bundle-DG85l4tk.js.map → bundle-DH6qrVST.js.map} +1 -1
  210. package/chunks/{bundle-CekAYJN_.js → bundle-DHMhzdxb.js} +3 -3
  211. package/chunks/bundle-DHMhzdxb.js.map +1 -0
  212. package/chunks/{bundle-BOQAPdnF.js → bundle-DIah6iEu.js} +1 -1
  213. package/chunks/bundle-DIah6iEu.js.map +1 -0
  214. package/chunks/{bundle-DYGSQKvt.js → bundle-DKux8SCz.js} +2 -2
  215. package/chunks/bundle-DKux8SCz.js.map +1 -0
  216. package/chunks/{bundle-DrPUrygn.js → bundle-DOmw9Gpn.js} +2 -2
  217. package/chunks/{bundle-DrPUrygn.js.map → bundle-DOmw9Gpn.js.map} +1 -1
  218. package/chunks/{bundle-Be1fe9ZF.js → bundle-DTJNwlmx.js} +1 -1
  219. package/chunks/bundle-DTJNwlmx.js.map +1 -0
  220. package/chunks/{bundle-ahZJSNwR.js → bundle-DUJfOwP_.js} +15 -15
  221. package/chunks/{bundle-ahZJSNwR.js.map → bundle-DUJfOwP_.js.map} +1 -1
  222. package/chunks/{bundle-DD67EHrK.js → bundle-DUX1Cjzd.js} +3 -3
  223. package/chunks/bundle-DUX1Cjzd.js.map +1 -0
  224. package/chunks/{bundle-UWwF1Hyj.js → bundle-DYQiIYiA.js} +12 -12
  225. package/chunks/bundle-DYQiIYiA.js.map +1 -0
  226. package/chunks/{bundle-BRZ-fk0E.js → bundle-Dd9BwqXA.js} +10 -10
  227. package/chunks/{bundle-BRZ-fk0E.js.map → bundle-Dd9BwqXA.js.map} +1 -1
  228. package/chunks/{bundle-CMa_LzhI.js → bundle-DeDylv-S.js} +4 -4
  229. package/chunks/bundle-DeDylv-S.js.map +1 -0
  230. package/chunks/{bundle-BsjPoFDW.js → bundle-Dhfbe9sC.js} +1 -1
  231. package/chunks/{bundle-BsjPoFDW.js.map → bundle-Dhfbe9sC.js.map} +1 -1
  232. package/chunks/{bundle-S-aXl3jq.js → bundle-DiEyJmQO.js} +12 -12
  233. package/chunks/{bundle-S-aXl3jq.js.map → bundle-DiEyJmQO.js.map} +1 -1
  234. package/chunks/{bundle-C5UyLngq.js → bundle-DlIBbbMW.js} +5 -5
  235. package/chunks/bundle-DlIBbbMW.js.map +1 -0
  236. package/chunks/{bundle-B-UR5uUY.js → bundle-DoyzmJ4N.js} +1 -1
  237. package/chunks/{bundle-B-UR5uUY.js.map → bundle-DoyzmJ4N.js.map} +1 -1
  238. package/chunks/{bundle-DrefLz0G.js → bundle-DqEFK1h_.js} +1 -1
  239. package/chunks/{bundle-DrefLz0G.js.map → bundle-DqEFK1h_.js.map} +1 -1
  240. package/chunks/{bundle-D-UKgtlz.js → bundle-DqzK0oqW.js} +1 -1
  241. package/chunks/bundle-DqzK0oqW.js.map +1 -0
  242. package/chunks/{bundle-DzzUrNmL.js → bundle-Ds9YPch2.js} +1 -1
  243. package/chunks/bundle-Ds9YPch2.js.map +1 -0
  244. package/chunks/{bundle-BbdfL5hx.js → bundle-Dsv3ZewI.js} +1 -1
  245. package/chunks/{bundle-BbdfL5hx.js.map → bundle-Dsv3ZewI.js.map} +1 -1
  246. package/chunks/{bundle-BSNODDBN.js → bundle-DtNksMAv.js} +2 -2
  247. package/chunks/bundle-DtNksMAv.js.map +1 -0
  248. package/chunks/{bundle-BEAKdhJw.js → bundle-Dub55x6v.js} +1 -1
  249. package/chunks/bundle-Dub55x6v.js.map +1 -0
  250. package/chunks/{bundle-Dokasjr1.js → bundle-DvgpzYAA.js} +1 -1
  251. package/chunks/bundle-DvgpzYAA.js.map +1 -0
  252. package/chunks/{bundle-B_wXyf2_.js → bundle-Dx_38OXn.js} +4 -4
  253. package/chunks/bundle-Dx_38OXn.js.map +1 -0
  254. package/chunks/{bundle-DPMmCwJa.js → bundle-DzLymkLP.js} +4 -4
  255. package/chunks/bundle-DzLymkLP.js.map +1 -0
  256. package/chunks/{bundle-DzoOdl4j.js → bundle-DzcjF4A8.js} +6 -6
  257. package/chunks/bundle-DzcjF4A8.js.map +1 -0
  258. package/chunks/{bundle-sRAn8KYg.js → bundle-EGZmMlDM.js} +8 -8
  259. package/chunks/bundle-EGZmMlDM.js.map +1 -0
  260. package/chunks/{bundle-ClNB_q5u.js → bundle-JgyblkJN.js} +1 -1
  261. package/chunks/bundle-JgyblkJN.js.map +1 -0
  262. package/chunks/{bundle-DDSun-_c.js → bundle-QM2xJiUK.js} +4 -4
  263. package/chunks/{bundle-DDSun-_c.js.map → bundle-QM2xJiUK.js.map} +1 -1
  264. package/chunks/{bundle-CyyqWqaj.js → bundle-QXr6AixH.js} +7 -7
  265. package/chunks/bundle-QXr6AixH.js.map +1 -0
  266. package/chunks/{bundle-OVaef-VB.js → bundle-RS55OcKI.js} +9 -9
  267. package/chunks/bundle-RS55OcKI.js.map +1 -0
  268. package/chunks/{bundle-BgDkvAUr.js → bundle-SYD-r_6g.js} +3 -3
  269. package/chunks/{bundle-BgDkvAUr.js.map → bundle-SYD-r_6g.js.map} +1 -1
  270. package/chunks/{bundle-4D4_7cbS.js → bundle-T9VvSLxm.js} +1 -1
  271. package/chunks/bundle-T9VvSLxm.js.map +1 -0
  272. package/chunks/{bundle-2DKN7_KU.js → bundle-dMfcSy1Y.js} +1 -1
  273. package/chunks/bundle-dMfcSy1Y.js.map +1 -0
  274. package/chunks/{bundle-DTtdpBmF.js → bundle-fPmYhgod.js} +8 -8
  275. package/chunks/bundle-fPmYhgod.js.map +1 -0
  276. package/chunks/{bundle-CKfMCXxd.js → bundle-jrAqoPyl.js} +12 -12
  277. package/chunks/{bundle-CKfMCXxd.js.map → bundle-jrAqoPyl.js.map} +1 -1
  278. package/chunks/{bundle-2EbTbHya.js → bundle-k5pprEL4.js} +1 -1
  279. package/chunks/{bundle-2EbTbHya.js.map → bundle-k5pprEL4.js.map} +1 -1
  280. package/chunks/{bundle-C7tB0Kjq.js → bundle-nKIgcO8K.js} +12 -12
  281. package/chunks/{bundle-C7tB0Kjq.js.map → bundle-nKIgcO8K.js.map} +1 -1
  282. package/chunks/{bundle-i3mSZHsu.js → bundle-nXrIKErN.js} +4 -4
  283. package/chunks/{bundle-BiU5GOJa.js.map → bundle-nXrIKErN.js.map} +1 -1
  284. package/chunks/{bundle-BiU5GOJa.js → bundle-nrt9J4FH.js} +5 -5
  285. package/chunks/{bundle-i3mSZHsu.js.map → bundle-nrt9J4FH.js.map} +1 -1
  286. package/chunks/{bundle-Cs90CrUq.js → bundle-tHlm6elM.js} +8 -8
  287. package/chunks/bundle-tHlm6elM.js.map +1 -0
  288. package/chunks/{bundle-ZIcy4GZM.js → bundle-zMH_A6RI.js} +4 -4
  289. package/chunks/{bundle-ZIcy4GZM.js.map → bundle-zMH_A6RI.js.map} +1 -1
  290. package/cjs/App.js +88 -88
  291. package/cjs/Channel/components/ChannelHeader.js +32 -32
  292. package/cjs/Channel/components/ChannelUI.js +67 -67
  293. package/cjs/Channel/components/FileViewer.js +30 -30
  294. package/cjs/Channel/components/FrozenNotification.js +6 -6
  295. package/cjs/Channel/components/Message.js +56 -56
  296. package/cjs/Channel/components/MessageInput.js +43 -43
  297. package/cjs/Channel/components/MessageInputWrapper.js +43 -43
  298. package/cjs/Channel/components/MessageList.js +60 -60
  299. package/cjs/Channel/components/RemoveMessageModal.js +29 -29
  300. package/cjs/Channel/components/SuggestedMentionList.js +29 -29
  301. package/cjs/Channel/components/TypingIndicator.js +9 -9
  302. package/cjs/Channel/components/UnreadCount.js +8 -8
  303. package/cjs/Channel/context.js +23 -23
  304. package/cjs/Channel/hooks/useHandleUploadFiles.js +18 -18
  305. package/cjs/Channel/hooks/useInitialMessagesFetch.js +8 -8
  306. package/cjs/Channel/utils/compareMessagesForGrouping.js +8 -8
  307. package/cjs/Channel/utils/getMessagePartsInfo.js +9 -9
  308. package/cjs/Channel.js +67 -67
  309. package/cjs/ChannelList/components/AddChannel.js +88 -88
  310. package/cjs/ChannelList/components/ChannelListHeader.js +13 -13
  311. package/cjs/ChannelList/components/ChannelListUI.js +88 -88
  312. package/cjs/ChannelList/components/ChannelPreview.js +32 -32
  313. package/cjs/ChannelList/components/ChannelPreviewAction.js +17 -17
  314. package/cjs/ChannelList/context.js +14 -14
  315. package/cjs/ChannelList.js +88 -88
  316. package/cjs/ChannelSettings/components/ChannelProfile.js +23 -23
  317. package/cjs/ChannelSettings/components/ChannelSettingMenuList.js +14 -14
  318. package/cjs/ChannelSettings/components/ChannelSettingsHeader.js +11 -11
  319. package/cjs/ChannelSettings/components/ChannelSettingsMenuItem.js +2 -2
  320. package/cjs/ChannelSettings/components/ChannelSettingsUI.js +31 -31
  321. package/cjs/ChannelSettings/components/EditDetailsModal.js +19 -19
  322. package/cjs/ChannelSettings/components/LeaveChannel.js +20 -20
  323. package/cjs/ChannelSettings/components/ModerationPanel.js +29 -29
  324. package/cjs/ChannelSettings/components/UserListItem.js +19 -19
  325. package/cjs/ChannelSettings/components/UserPanel.js +28 -28
  326. package/cjs/ChannelSettings/context.js +9 -9
  327. package/cjs/ChannelSettings/hooks/useMenuList.js +29 -29
  328. package/cjs/ChannelSettings.js +31 -31
  329. package/cjs/CreateChannel/components/CreateChannelUI.js +88 -88
  330. package/cjs/CreateChannel/components/InviteUsers.js +88 -88
  331. package/cjs/CreateChannel/components/SelectChannelType.js +88 -88
  332. package/cjs/CreateChannel/context.js +88 -88
  333. package/cjs/CreateChannel.js +88 -88
  334. package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +15 -15
  335. package/cjs/CreateOpenChannel/context.js +4 -4
  336. package/cjs/CreateOpenChannel.js +15 -15
  337. package/cjs/EditUserProfile/components/EditUserProfileUI.js +15 -15
  338. package/cjs/EditUserProfile/context.js +1 -1
  339. package/cjs/EditUserProfile.js +15 -15
  340. package/cjs/GroupChannel/components/FileViewer.js +28 -28
  341. package/cjs/GroupChannel/components/FrozenNotification.js +6 -6
  342. package/cjs/GroupChannel/components/GroupChannelHeader.js +29 -29
  343. package/cjs/GroupChannel/components/GroupChannelUI.js +63 -63
  344. package/cjs/GroupChannel/components/Message.js +54 -54
  345. package/cjs/GroupChannel/components/MessageInputWrapper.js +40 -40
  346. package/cjs/GroupChannel/components/MessageList.js +56 -56
  347. package/cjs/GroupChannel/components/RemoveMessageModal.js +27 -27
  348. package/cjs/GroupChannel/components/SuggestedMentionList.js +15 -15
  349. package/cjs/GroupChannel/components/TypingIndicator.js +9 -9
  350. package/cjs/GroupChannel/components/UnreadCount.js +8 -8
  351. package/cjs/GroupChannel/context.js +15 -15
  352. package/cjs/GroupChannel.js +63 -63
  353. package/cjs/GroupChannelList/components/AddGroupChannel.js +88 -88
  354. package/cjs/GroupChannelList/components/GroupChannelListHeader.js +13 -13
  355. package/cjs/GroupChannelList/components/GroupChannelListItem.js +32 -32
  356. package/cjs/GroupChannelList/components/GroupChannelListUI.js +88 -88
  357. package/cjs/GroupChannelList/components/GroupChannelPreviewAction.js +17 -17
  358. package/cjs/GroupChannelList/context.js +10 -10
  359. package/cjs/GroupChannelList.js +88 -88
  360. package/cjs/MessageSearch/components/MessageSearchUI.js +20 -20
  361. package/cjs/MessageSearch/context.js +6 -6
  362. package/cjs/MessageSearch.js +22 -22
  363. package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -5
  364. package/cjs/OpenChannel/components/OpenChannelHeader.js +20 -20
  365. package/cjs/OpenChannel/components/OpenChannelInput.js +29 -29
  366. package/cjs/OpenChannel/components/OpenChannelMessage.js +39 -39
  367. package/cjs/OpenChannel/components/OpenChannelMessageList.js +43 -43
  368. package/cjs/OpenChannel/components/OpenChannelUI.js +43 -43
  369. package/cjs/OpenChannel/context.js +19 -19
  370. package/cjs/OpenChannel.js +43 -43
  371. package/cjs/OpenChannelList/components/OpenChannelListUI.js +17 -17
  372. package/cjs/OpenChannelList/components/OpenChannelPreview.js +6 -6
  373. package/cjs/OpenChannelList/context.js +6 -6
  374. package/cjs/OpenChannelList.js +17 -17
  375. package/cjs/OpenChannelSettings/components/EditDetailsModal.js +18 -18
  376. package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +18 -18
  377. package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +24 -24
  378. package/cjs/OpenChannelSettings/components/OperatorUI.js +24 -24
  379. package/cjs/OpenChannelSettings/components/ParticipantUI.js +22 -22
  380. package/cjs/OpenChannelSettings/context.js +6 -6
  381. package/cjs/OpenChannelSettings.js +24 -24
  382. package/cjs/SendbirdProvider.js +23 -23
  383. package/cjs/Thread/components/ParentMessageInfo.js +49 -49
  384. package/cjs/Thread/components/ParentMessageInfoItem.js +34 -34
  385. package/cjs/Thread/components/ThreadHeader.js +8 -8
  386. package/cjs/Thread/components/ThreadList.js +56 -56
  387. package/cjs/Thread/components/ThreadListItem.js +56 -56
  388. package/cjs/Thread/components/ThreadMessageInput.js +46 -46
  389. package/cjs/Thread/components/ThreadUI.js +62 -62
  390. package/cjs/Thread/context.js +15 -15
  391. package/cjs/Thread.js +62 -62
  392. package/cjs/VoicePlayer/context.js +6 -6
  393. package/cjs/VoicePlayer/useVoicePlayer.js +14 -14
  394. package/cjs/VoiceRecorder/context.js +13 -13
  395. package/cjs/VoiceRecorder/useVoiceRecorder.js +12 -12
  396. package/cjs/chunks/{bundle-Ct_lW8hI.js → bundle-0qwHnz49.js} +14 -14
  397. package/cjs/chunks/bundle-0qwHnz49.js.map +1 -0
  398. package/cjs/chunks/{bundle-ZS9cLNMS.js → bundle-2gRetthH.js} +3 -3
  399. package/cjs/chunks/bundle-2gRetthH.js.map +1 -0
  400. package/cjs/chunks/{bundle-CDhba0Ik.js → bundle-3pIN38MR.js} +1 -1
  401. package/cjs/chunks/bundle-3pIN38MR.js.map +1 -0
  402. package/cjs/chunks/{bundle-DDPA24Ym.js → bundle-ADlxsvPE.js} +1 -1
  403. package/cjs/chunks/bundle-ADlxsvPE.js.map +1 -0
  404. package/cjs/chunks/{bundle-D83t7kQt.js → bundle-B-dq4NhE.js} +1 -1
  405. package/cjs/chunks/bundle-B-dq4NhE.js.map +1 -0
  406. package/cjs/chunks/{bundle-CHbACwVy.js → bundle-B5ykUWcV.js} +1 -1
  407. package/cjs/chunks/bundle-B5ykUWcV.js.map +1 -0
  408. package/cjs/chunks/{bundle-B_kiHl24.js → bundle-BKHLxS6l.js} +4 -4
  409. package/cjs/chunks/bundle-BKHLxS6l.js.map +1 -0
  410. package/cjs/chunks/{bundle-B5DImaot.js → bundle-BL4JFX3Z.js} +8 -8
  411. package/cjs/chunks/bundle-BL4JFX3Z.js.map +1 -0
  412. package/cjs/chunks/{bundle-IKpW2l2j.js → bundle-BOHGouy_.js} +7 -7
  413. package/cjs/chunks/bundle-BOHGouy_.js.map +1 -0
  414. package/cjs/chunks/{bundle-D4ttYKan.js → bundle-BQozUdAi.js} +12 -12
  415. package/cjs/chunks/{bundle-D4ttYKan.js.map → bundle-BQozUdAi.js.map} +1 -1
  416. package/cjs/chunks/{bundle-Be5cYG-8.js → bundle-BROd4sV1.js} +1 -1
  417. package/cjs/chunks/bundle-BROd4sV1.js.map +1 -0
  418. package/cjs/chunks/{bundle-B0xh7srZ.js → bundle-BRv5cK_w.js} +1 -1
  419. package/cjs/chunks/bundle-BRv5cK_w.js.map +1 -0
  420. package/cjs/chunks/{bundle-l-Hf-1I0.js → bundle-BXj7tx0V.js} +12 -12
  421. package/cjs/chunks/{bundle-l-Hf-1I0.js.map → bundle-BXj7tx0V.js.map} +1 -1
  422. package/cjs/chunks/{bundle-D8mb9MKq.js → bundle-BbP1ND3d.js} +7 -7
  423. package/cjs/chunks/{bundle-D8mb9MKq.js.map → bundle-BbP1ND3d.js.map} +1 -1
  424. package/cjs/chunks/{bundle-DJsZItzb.js → bundle-Bc0FSDdg.js} +4 -4
  425. package/cjs/chunks/bundle-Bc0FSDdg.js.map +1 -0
  426. package/cjs/chunks/{bundle-C5ckuHVD.js → bundle-BcNQT2_6.js} +10 -10
  427. package/cjs/chunks/bundle-BcNQT2_6.js.map +1 -0
  428. package/cjs/chunks/{bundle-CtcrPWbo.js → bundle-BewOM8Bd.js} +1 -1
  429. package/cjs/chunks/bundle-BewOM8Bd.js.map +1 -0
  430. package/cjs/chunks/{bundle-wHImRt4w.js → bundle-BhW0sWmd.js} +12 -12
  431. package/cjs/chunks/bundle-BhW0sWmd.js.map +1 -0
  432. package/cjs/chunks/{bundle-DCtoNM-7.js → bundle-BihVHC5Q.js} +2 -2
  433. package/cjs/chunks/bundle-BihVHC5Q.js.map +1 -0
  434. package/cjs/chunks/{bundle-Iem46lqC.js → bundle-BikLdyZe.js} +4 -4
  435. package/cjs/chunks/bundle-BikLdyZe.js.map +1 -0
  436. package/cjs/chunks/{bundle-DSRFKM2R.js → bundle-Bj-0Jsyi.js} +1 -1
  437. package/cjs/chunks/bundle-Bj-0Jsyi.js.map +1 -0
  438. package/cjs/chunks/{bundle-BijTJ0c2.js → bundle-Bj_ZknNa.js} +7 -7
  439. package/cjs/chunks/bundle-Bj_ZknNa.js.map +1 -0
  440. package/cjs/chunks/{bundle-JUvZGt3Q.js → bundle-BmFe2W3e.js} +1 -1
  441. package/cjs/chunks/bundle-BmFe2W3e.js.map +1 -0
  442. package/cjs/chunks/{bundle-DXcy9R4M.js → bundle-BnDEMyZ4.js} +1 -1
  443. package/cjs/chunks/{bundle-DXcy9R4M.js.map → bundle-BnDEMyZ4.js.map} +1 -1
  444. package/cjs/chunks/{bundle-DA3KLmoV.js → bundle-BsisXiqs.js} +12 -12
  445. package/cjs/chunks/{bundle-DA3KLmoV.js.map → bundle-BsisXiqs.js.map} +1 -1
  446. package/cjs/chunks/{bundle-BFyUna1U.js → bundle-Bvla2Wqv.js} +4 -4
  447. package/cjs/chunks/{bundle-BFyUna1U.js.map → bundle-Bvla2Wqv.js.map} +1 -1
  448. package/cjs/chunks/{bundle-CWWDc-jq.js → bundle-ByGirtv0.js} +3 -3
  449. package/cjs/chunks/bundle-ByGirtv0.js.map +1 -0
  450. package/cjs/chunks/{bundle-Ddc4NjWH.js → bundle-ByzBZitI.js} +1 -1
  451. package/cjs/chunks/bundle-ByzBZitI.js.map +1 -0
  452. package/cjs/chunks/{bundle-C7NIZXsi.js → bundle-C19uVjCa.js} +5 -5
  453. package/cjs/chunks/{bundle-C7NIZXsi.js.map → bundle-C19uVjCa.js.map} +1 -1
  454. package/cjs/chunks/{bundle-jK41VUwI.js → bundle-C2HYdhmz.js} +2 -2
  455. package/cjs/chunks/{bundle-jK41VUwI.js.map → bundle-C2HYdhmz.js.map} +1 -1
  456. package/cjs/chunks/{bundle-Wz8wcC8J.js → bundle-C562G-JW.js} +2 -2
  457. package/cjs/chunks/bundle-C562G-JW.js.map +1 -0
  458. package/cjs/chunks/{bundle-bbeoas0y.js → bundle-C596sNVY.js} +3 -3
  459. package/cjs/chunks/{bundle-bbeoas0y.js.map → bundle-C596sNVY.js.map} +1 -1
  460. package/cjs/chunks/{bundle-B4NcyELU.js → bundle-C6W6XKUm.js} +14 -14
  461. package/cjs/chunks/{bundle-B4NcyELU.js.map → bundle-C6W6XKUm.js.map} +1 -1
  462. package/cjs/chunks/{bundle-DjML1ul2.js → bundle-C8f_4-N0.js} +1 -1
  463. package/cjs/chunks/bundle-C8f_4-N0.js.map +1 -0
  464. package/cjs/chunks/{bundle-BWWIsE09.js → bundle-C9sWmnis.js} +4 -4
  465. package/cjs/chunks/bundle-C9sWmnis.js.map +1 -0
  466. package/cjs/chunks/{bundle-B84lWsGH.js → bundle-CCW4ftK3.js} +1 -1
  467. package/cjs/chunks/bundle-CCW4ftK3.js.map +1 -0
  468. package/cjs/chunks/{bundle-BmhAGvYn.js → bundle-CFF7qA3s.js} +6 -6
  469. package/cjs/chunks/bundle-CFF7qA3s.js.map +1 -0
  470. package/cjs/chunks/{bundle-D8786bwt.js → bundle-CILnAeBz.js} +4 -4
  471. package/cjs/chunks/bundle-CILnAeBz.js.map +1 -0
  472. package/cjs/chunks/{bundle-CT350f9x.js → bundle-CItVMA2G.js} +5 -5
  473. package/cjs/chunks/bundle-CItVMA2G.js.map +1 -0
  474. package/cjs/chunks/{bundle-Byf3JHBz.js → bundle-CIulWkOG.js} +1 -1
  475. package/cjs/chunks/{bundle-Byf3JHBz.js.map → bundle-CIulWkOG.js.map} +1 -1
  476. package/cjs/chunks/{bundle-BtJsON3R.js → bundle-CJhoVxdz.js} +1 -1
  477. package/cjs/chunks/bundle-CJhoVxdz.js.map +1 -0
  478. package/cjs/chunks/{bundle-Bkuc5bwC.js → bundle-CMD6ZoBq.js} +7 -7
  479. package/cjs/chunks/bundle-CMD6ZoBq.js.map +1 -0
  480. package/cjs/chunks/{bundle-D_w5bnPd.js → bundle-CMlV_h38.js} +5 -5
  481. package/cjs/chunks/bundle-CMlV_h38.js.map +1 -0
  482. package/cjs/chunks/{bundle-BGJJ5sP3.js → bundle-CSR_gGWO.js} +12 -12
  483. package/cjs/chunks/{bundle-BGJJ5sP3.js.map → bundle-CSR_gGWO.js.map} +1 -1
  484. package/cjs/chunks/{bundle-BuqLUmbr.js → bundle-CXEoZwsy.js} +10 -10
  485. package/cjs/chunks/{bundle-BuqLUmbr.js.map → bundle-CXEoZwsy.js.map} +1 -1
  486. package/cjs/chunks/{bundle-KpCtn3E5.js → bundle-CZ9J_2gz.js} +1 -1
  487. package/cjs/chunks/bundle-CZ9J_2gz.js.map +1 -0
  488. package/cjs/chunks/{bundle-CzQWSkYD.js → bundle-CZLKAZCV.js} +1 -1
  489. package/cjs/chunks/bundle-CZLKAZCV.js.map +1 -0
  490. package/cjs/chunks/{bundle-BIZUP_xN.js → bundle-CZimBvba.js} +2 -2
  491. package/cjs/chunks/bundle-CZimBvba.js.map +1 -0
  492. package/cjs/chunks/{bundle-DphM1mNA.js → bundle-C_10r9lQ.js} +1 -1
  493. package/cjs/chunks/bundle-C_10r9lQ.js.map +1 -0
  494. package/cjs/chunks/{bundle-BqhdTNA2.js → bundle-CbBu6KFu.js} +4 -4
  495. package/cjs/chunks/bundle-CbBu6KFu.js.map +1 -0
  496. package/cjs/chunks/{bundle-CoLGyVM7.js → bundle-Cc8WRa-f.js} +1 -1
  497. package/cjs/chunks/bundle-Cc8WRa-f.js.map +1 -0
  498. package/cjs/chunks/{bundle-u7llDhg-.js → bundle-CdMrvui6.js} +1 -1
  499. package/cjs/chunks/bundle-CdMrvui6.js.map +1 -0
  500. package/cjs/chunks/{bundle-48-ANevp.js → bundle-CfXO3dEz.js} +465 -392
  501. package/cjs/chunks/bundle-CfXO3dEz.js.map +1 -0
  502. package/cjs/chunks/{bundle-CWTqtnQO.js → bundle-CfoP-Q6S.js} +1 -1
  503. package/cjs/chunks/bundle-CfoP-Q6S.js.map +1 -0
  504. package/cjs/chunks/{bundle-p5AMM6bU.js → bundle-ChahVmSf.js} +5 -5
  505. package/cjs/chunks/{bundle-p5AMM6bU.js.map → bundle-ChahVmSf.js.map} +1 -1
  506. package/cjs/chunks/{bundle-CjxRN7kP.js → bundle-CiHUpz7L.js} +1 -1
  507. package/cjs/chunks/{bundle-CjxRN7kP.js.map → bundle-CiHUpz7L.js.map} +1 -1
  508. package/cjs/chunks/{bundle-CmAcdA9c.js → bundle-CmnwqpcH.js} +1 -1
  509. package/cjs/chunks/bundle-CmnwqpcH.js.map +1 -0
  510. package/cjs/chunks/{bundle-0zoyDqJ2.js → bundle-Cpu4qnT0.js} +5 -5
  511. package/cjs/chunks/{bundle-0zoyDqJ2.js.map → bundle-Cpu4qnT0.js.map} +1 -1
  512. package/cjs/chunks/{bundle-ya6_vMhO.js → bundle-CvAcqCBF.js} +1 -1
  513. package/cjs/chunks/bundle-CvAcqCBF.js.map +1 -0
  514. package/cjs/chunks/{bundle-DgQ9fMEI.js → bundle-CyENaxLd.js} +1 -1
  515. package/cjs/chunks/bundle-CyENaxLd.js.map +1 -0
  516. package/cjs/chunks/{bundle-B7aEyxDJ.js → bundle-Cz2GZ925.js} +2 -2
  517. package/cjs/chunks/bundle-Cz2GZ925.js.map +1 -0
  518. package/cjs/chunks/{bundle-Cqyxf0LC.js → bundle-D1t8v8Qh.js} +3 -3
  519. package/cjs/chunks/bundle-D1t8v8Qh.js.map +1 -0
  520. package/cjs/chunks/{bundle-Dd5sHG-K.js → bundle-D2LA3NOU.js} +2 -2
  521. package/cjs/chunks/bundle-D2LA3NOU.js.map +1 -0
  522. package/cjs/chunks/{bundle-Dv7MCQ5s.js → bundle-DCIXGFFW.js} +3 -3
  523. package/cjs/chunks/bundle-DCIXGFFW.js.map +1 -0
  524. package/cjs/chunks/{bundle-CroWYp-8.js → bundle-DDSgAZ7n.js} +8 -8
  525. package/cjs/chunks/{bundle-CroWYp-8.js.map → bundle-DDSgAZ7n.js.map} +1 -1
  526. package/cjs/chunks/{bundle-DXwnWGR6.js → bundle-DGI3KmLP.js} +9 -9
  527. package/cjs/chunks/{bundle-DXwnWGR6.js.map → bundle-DGI3KmLP.js.map} +1 -1
  528. package/cjs/chunks/{bundle-CsYWZ0_f.js → bundle-DGxNAz2j.js} +33 -33
  529. package/cjs/chunks/{bundle-CsYWZ0_f.js.map → bundle-DGxNAz2j.js.map} +1 -1
  530. package/cjs/chunks/{bundle-BJXK4UV6.js → bundle-DONg2mag.js} +3 -3
  531. package/cjs/chunks/{bundle-BJXK4UV6.js.map → bundle-DONg2mag.js.map} +1 -1
  532. package/cjs/chunks/{bundle-C3Wsgq6X.js → bundle-DZW3Wbi6.js} +2 -2
  533. package/cjs/chunks/{bundle-C3Wsgq6X.js.map → bundle-DZW3Wbi6.js.map} +1 -1
  534. package/cjs/chunks/{bundle-CXS1Xff3.js → bundle-DaY1BIwC.js} +6 -6
  535. package/cjs/chunks/bundle-DaY1BIwC.js.map +1 -0
  536. package/cjs/chunks/{bundle-CATF4h3Q.js → bundle-Dc_jkavG.js} +4 -4
  537. package/cjs/chunks/bundle-Dc_jkavG.js.map +1 -0
  538. package/cjs/chunks/{bundle-CynaFF2G.js → bundle-DdoxXpVR.js} +1 -1
  539. package/cjs/chunks/bundle-DdoxXpVR.js.map +1 -0
  540. package/cjs/chunks/{bundle-WotxJ_Ab.js → bundle-DfzBeTAr.js} +8 -8
  541. package/cjs/chunks/bundle-DfzBeTAr.js.map +1 -0
  542. package/cjs/chunks/{bundle-Czozc_b7.js → bundle-DjuWyqTw.js} +5 -5
  543. package/cjs/chunks/{bundle-Czozc_b7.js.map → bundle-DjuWyqTw.js.map} +1 -1
  544. package/cjs/chunks/{bundle-BLORPb9I.js → bundle-DlPLN3bg.js} +1 -1
  545. package/cjs/chunks/bundle-DlPLN3bg.js.map +1 -0
  546. package/cjs/chunks/{bundle-COEM7gAr.js → bundle-DlkOn50n.js} +9 -9
  547. package/cjs/chunks/{bundle-COEM7gAr.js.map → bundle-DlkOn50n.js.map} +1 -1
  548. package/cjs/chunks/{bundle-C3rM3Ztv.js → bundle-DnOhDHp5.js} +7 -7
  549. package/cjs/chunks/bundle-DnOhDHp5.js.map +1 -0
  550. package/cjs/chunks/{bundle-By9bOgFx.js → bundle-DnSd191t.js} +11 -11
  551. package/cjs/chunks/{bundle-By9bOgFx.js.map → bundle-DnSd191t.js.map} +1 -1
  552. package/cjs/chunks/{bundle-COpa1hF1.js → bundle-DrGYNNB5.js} +6 -6
  553. package/cjs/chunks/{bundle-COpa1hF1.js.map → bundle-DrGYNNB5.js.map} +1 -1
  554. package/cjs/chunks/{bundle-BmW2Yn3Q.js → bundle-Duo0iypu.js} +15 -15
  555. package/cjs/chunks/{bundle-BmW2Yn3Q.js.map → bundle-Duo0iypu.js.map} +1 -1
  556. package/cjs/chunks/{bundle-CgxoBZ0q.js → bundle-Gk_s8UCU.js} +8 -8
  557. package/cjs/chunks/bundle-Gk_s8UCU.js.map +1 -0
  558. package/cjs/chunks/{bundle-C_bbb-dp.js → bundle-KtYdczLz.js} +3 -3
  559. package/cjs/chunks/bundle-KtYdczLz.js.map +1 -0
  560. package/cjs/chunks/{bundle-Sibh5a_G.js → bundle-O9GJGA-U.js} +4 -4
  561. package/cjs/chunks/bundle-O9GJGA-U.js.map +1 -0
  562. package/cjs/chunks/{bundle-EaE84c1u.js → bundle-S6k2tN15.js} +1 -1
  563. package/cjs/chunks/bundle-S6k2tN15.js.map +1 -0
  564. package/cjs/chunks/{bundle-Dr-ZZhAr.js → bundle-Sfn_RLlP.js} +3 -3
  565. package/cjs/chunks/{bundle-Dr-ZZhAr.js.map → bundle-Sfn_RLlP.js.map} +1 -1
  566. package/cjs/chunks/{bundle-C4xLg4S4.js → bundle-XIN-6-ar.js} +1 -1
  567. package/cjs/chunks/bundle-XIN-6-ar.js.map +1 -0
  568. package/cjs/chunks/{bundle-tKhabQAd.js → bundle-_hlObuTm.js} +4 -4
  569. package/cjs/chunks/bundle-_hlObuTm.js.map +1 -0
  570. package/cjs/chunks/{bundle-BfLPNtFS.js → bundle-ajPzzYnD.js} +3 -3
  571. package/cjs/chunks/bundle-ajPzzYnD.js.map +1 -0
  572. package/cjs/chunks/{bundle-BLSItw7_.js → bundle-fL2sLECf.js} +1 -1
  573. package/cjs/chunks/bundle-fL2sLECf.js.map +1 -0
  574. package/cjs/chunks/{bundle-VtTkC7o3.js → bundle-tJJa3vGc.js} +4 -4
  575. package/cjs/chunks/{bundle-VtTkC7o3.js.map → bundle-tJJa3vGc.js.map} +1 -1
  576. package/cjs/chunks/{bundle-CXN-DL6s.js → bundle-wbXcvXS5.js} +3 -3
  577. package/cjs/chunks/bundle-wbXcvXS5.js.map +1 -0
  578. package/cjs/hooks/useConnectionState.js +5 -5
  579. package/cjs/hooks/useLocalization.js +4 -4
  580. package/cjs/hooks/useModal.js +13 -13
  581. package/cjs/index.js +89 -89
  582. package/cjs/pubSub/topics.js +1 -1
  583. package/cjs/sendbirdSelectors.js +2 -2
  584. package/cjs/ui/Accordion.js +2 -2
  585. package/cjs/ui/AccordionGroup.js +1 -1
  586. package/cjs/ui/AdminMessage.js +3 -3
  587. package/cjs/ui/Avatar.js +4 -4
  588. package/cjs/ui/Badge.js +5 -5
  589. package/cjs/ui/BottomSheet.js +13 -13
  590. package/cjs/ui/Button.js +3 -3
  591. package/cjs/ui/ChannelAvatar.js +5 -5
  592. package/cjs/ui/ConnectionStatus.js +6 -6
  593. package/cjs/ui/ContextMenu.js +14 -14
  594. package/cjs/ui/DateSeparator.js +4 -4
  595. package/cjs/ui/EmojiReactions.js +23 -23
  596. package/cjs/ui/FallbackTemplateMessageItemBody.tsx.js +10 -10
  597. package/cjs/ui/FileMessageItemBody.js +13 -13
  598. package/cjs/ui/FileViewer.js +19 -19
  599. package/cjs/ui/Header.js +6 -6
  600. package/cjs/ui/Icon.js +2 -2
  601. package/cjs/ui/IconButton.js +1 -1
  602. package/cjs/ui/ImageRenderer.js +2 -2
  603. package/cjs/ui/Input.js +3 -3
  604. package/cjs/ui/Label.js +3 -3
  605. package/cjs/ui/LinkLabel.js +4 -4
  606. package/cjs/ui/Loader.js +2 -2
  607. package/cjs/ui/LoadingTemplateMessageItemBody.tsx.js +2 -2
  608. package/cjs/ui/MentionLabel.js +19 -19
  609. package/cjs/ui/MentionUserLabel.js +2 -2
  610. package/cjs/ui/MessageContent.js +42 -42
  611. package/cjs/ui/MessageFeedbackFailedModal.js +13 -13
  612. package/cjs/ui/MessageFeedbackModal.js +13 -13
  613. package/cjs/ui/MessageInput/hooks/usePaste.js +7 -7
  614. package/cjs/ui/MessageInput.js +20 -20
  615. package/cjs/ui/MessageItemMenu.js +15 -15
  616. package/cjs/ui/MessageItemReactionMenu.js +16 -16
  617. package/cjs/ui/MessageMenu.js +16 -16
  618. package/cjs/ui/MessageSearchFileItem.js +17 -17
  619. package/cjs/ui/MessageSearchItem.js +12 -12
  620. package/cjs/ui/MessageStatus.js +15 -15
  621. package/cjs/ui/MessageTemplate.js +1 -1
  622. package/cjs/ui/MobileFeedbackMenu.js +13 -13
  623. package/cjs/ui/MobileMenu.js +18 -18
  624. package/cjs/ui/Modal.js +12 -12
  625. package/cjs/ui/MutedAvatarOverlay.js +2 -2
  626. package/cjs/ui/OGMessageItemBody.js +23 -23
  627. package/cjs/ui/OpenChannelAdminMessage.js +3 -3
  628. package/cjs/ui/OpenChannelAvatar.js +8 -8
  629. package/cjs/ui/OpenchannelConversationHeader.js +8 -8
  630. package/cjs/ui/OpenchannelFileMessage.js +24 -24
  631. package/cjs/ui/OpenchannelOGMessage.js +26 -26
  632. package/cjs/ui/OpenchannelThumbnailMessage.js +23 -23
  633. package/cjs/ui/OpenchannelUserMessage.js +24 -24
  634. package/cjs/ui/PlaceHolder.js +6 -6
  635. package/cjs/ui/PlaybackTime.js +3 -3
  636. package/cjs/ui/ProgressBar.js +1 -1
  637. package/cjs/ui/QuoteMessage.js +12 -12
  638. package/cjs/ui/QuoteMessageInput.js +12 -12
  639. package/cjs/ui/ReactionBadge.js +3 -3
  640. package/cjs/ui/ReactionButton.js +4 -4
  641. package/cjs/ui/SortByRow.js +2 -2
  642. package/cjs/ui/TemplateMessageItemBody.js +14 -14
  643. package/cjs/ui/TextButton.js +2 -2
  644. package/cjs/ui/TextMessageItemBody.js +22 -22
  645. package/cjs/ui/ThreadReplies.js +8 -8
  646. package/cjs/ui/ThumbnailMessageItemBody.js +10 -10
  647. package/cjs/ui/Toggle.js +4 -4
  648. package/cjs/ui/Tooltip.js +3 -3
  649. package/cjs/ui/TooltipWrapper.js +1 -1
  650. package/cjs/ui/TypingIndicatorBubble.js +4 -4
  651. package/cjs/ui/UnknownMessageItemBody.js +10 -10
  652. package/cjs/ui/UserListItem.js +19 -19
  653. package/cjs/ui/UserListItemMenu.js +16 -16
  654. package/cjs/ui/UserProfile.js +13 -13
  655. package/cjs/ui/VoiceMessageInput.js +9 -9
  656. package/cjs/ui/VoiceMessageItemBody.js +14 -14
  657. package/cjs/ui/Word.js +19 -19
  658. package/cjs/useSendbirdStateContext.js +4 -4
  659. package/cjs/utils/message/isVoiceMessage.js +6 -6
  660. package/cjs/withSendbird.js +23 -23
  661. package/dist/index.css +5 -19
  662. package/hooks/useConnectionState.js +5 -5
  663. package/hooks/useLocalization.js +4 -4
  664. package/hooks/useModal.js +14 -14
  665. package/index.js +89 -89
  666. package/package.json +4 -4
  667. package/pubSub/topics.js +1 -1
  668. package/sendbirdSelectors.js +2 -2
  669. package/ui/Accordion.js +2 -2
  670. package/ui/AccordionGroup.js +1 -1
  671. package/ui/AdminMessage.js +3 -3
  672. package/ui/Avatar.js +4 -4
  673. package/ui/Badge.js +5 -5
  674. package/ui/BottomSheet.js +13 -13
  675. package/ui/Button.js +3 -3
  676. package/ui/ChannelAvatar.js +5 -5
  677. package/ui/ConnectionStatus.js +6 -6
  678. package/ui/ContextMenu.js +14 -14
  679. package/ui/DateSeparator.js +4 -4
  680. package/ui/EmojiReactions.js +23 -23
  681. package/ui/FallbackTemplateMessageItemBody.tsx.js +10 -10
  682. package/ui/FileMessageItemBody.js +13 -13
  683. package/ui/FileViewer.js +19 -19
  684. package/ui/Header.js +6 -6
  685. package/ui/Icon.js +2 -2
  686. package/ui/IconButton.js +1 -1
  687. package/ui/ImageRenderer.js +2 -2
  688. package/ui/Input.js +3 -3
  689. package/ui/Label.js +3 -3
  690. package/ui/LinkLabel.js +4 -4
  691. package/ui/Loader.js +2 -2
  692. package/ui/LoadingTemplateMessageItemBody.tsx.js +2 -2
  693. package/ui/MentionLabel.js +19 -19
  694. package/ui/MentionUserLabel.js +2 -2
  695. package/ui/MessageContent.js +42 -42
  696. package/ui/MessageFeedbackFailedModal.js +13 -13
  697. package/ui/MessageFeedbackModal.js +13 -13
  698. package/ui/MessageInput/hooks/usePaste.js +7 -7
  699. package/ui/MessageInput.js +20 -20
  700. package/ui/MessageItemMenu.js +15 -15
  701. package/ui/MessageItemReactionMenu.js +16 -16
  702. package/ui/MessageMenu.js +16 -16
  703. package/ui/MessageSearchFileItem.js +17 -17
  704. package/ui/MessageSearchItem.js +12 -12
  705. package/ui/MessageStatus.js +15 -15
  706. package/ui/MessageTemplate.js +1 -1
  707. package/ui/MobileFeedbackMenu.js +13 -13
  708. package/ui/MobileMenu.js +18 -18
  709. package/ui/Modal.js +12 -12
  710. package/ui/MutedAvatarOverlay.js +2 -2
  711. package/ui/OGMessageItemBody.js +23 -23
  712. package/ui/OpenChannelAdminMessage.js +3 -3
  713. package/ui/OpenChannelAvatar.js +8 -8
  714. package/ui/OpenchannelConversationHeader.js +8 -8
  715. package/ui/OpenchannelFileMessage.js +24 -24
  716. package/ui/OpenchannelOGMessage.js +26 -26
  717. package/ui/OpenchannelThumbnailMessage.js +23 -23
  718. package/ui/OpenchannelUserMessage.js +24 -24
  719. package/ui/PlaceHolder.js +6 -6
  720. package/ui/PlaybackTime.js +3 -3
  721. package/ui/ProgressBar.js +1 -1
  722. package/ui/QuoteMessage.js +12 -12
  723. package/ui/QuoteMessageInput.js +12 -12
  724. package/ui/ReactionBadge.js +3 -3
  725. package/ui/ReactionButton.js +4 -4
  726. package/ui/SortByRow.js +2 -2
  727. package/ui/TemplateMessageItemBody.js +14 -14
  728. package/ui/TextButton.js +2 -2
  729. package/ui/TextMessageItemBody.js +22 -22
  730. package/ui/ThreadReplies.js +8 -8
  731. package/ui/ThumbnailMessageItemBody.js +10 -10
  732. package/ui/Toggle.js +4 -4
  733. package/ui/Tooltip.js +3 -3
  734. package/ui/TooltipWrapper.js +1 -1
  735. package/ui/TypingIndicatorBubble.js +4 -4
  736. package/ui/UnknownMessageItemBody.js +10 -10
  737. package/ui/UserListItem.js +19 -19
  738. package/ui/UserListItemMenu.js +17 -17
  739. package/ui/UserProfile.js +13 -13
  740. package/ui/VoiceMessageInput.js +9 -9
  741. package/ui/VoiceMessageItemBody.js +14 -14
  742. package/ui/Word.js +19 -19
  743. package/useSendbirdStateContext.js +4 -4
  744. package/utils/message/isVoiceMessage.js +6 -6
  745. package/withSendbird.js +23 -23
  746. package/chunks/bundle-29anv6Qs.js.map +0 -1
  747. package/chunks/bundle-2DKN7_KU.js.map +0 -1
  748. package/chunks/bundle-3w_Dk0EP.js.map +0 -1
  749. package/chunks/bundle-4D4_7cbS.js.map +0 -1
  750. package/chunks/bundle-B0UH4qgo.js.map +0 -1
  751. package/chunks/bundle-B7-mUZu7.js.map +0 -1
  752. package/chunks/bundle-BEAKdhJw.js.map +0 -1
  753. package/chunks/bundle-BOQAPdnF.js.map +0 -1
  754. package/chunks/bundle-BSNODDBN.js.map +0 -1
  755. package/chunks/bundle-B_wXyf2_.js.map +0 -1
  756. package/chunks/bundle-BcieCrHN.js.map +0 -1
  757. package/chunks/bundle-Be1fe9ZF.js.map +0 -1
  758. package/chunks/bundle-BkjPzgla.js.map +0 -1
  759. package/chunks/bundle-Bs0S8wQP.js.map +0 -1
  760. package/chunks/bundle-Bx-11rmr.js.map +0 -1
  761. package/chunks/bundle-C0VuTt3c.js.map +0 -1
  762. package/chunks/bundle-C5UyLngq.js.map +0 -1
  763. package/chunks/bundle-CAJl5N4R.js.map +0 -1
  764. package/chunks/bundle-CDV8AYgt.js.map +0 -1
  765. package/chunks/bundle-CLx3vwwI.js.map +0 -1
  766. package/chunks/bundle-CMa_LzhI.js.map +0 -1
  767. package/chunks/bundle-CSJ53xaT.js.map +0 -1
  768. package/chunks/bundle-CUOEzxFF.js.map +0 -1
  769. package/chunks/bundle-CekAYJN_.js.map +0 -1
  770. package/chunks/bundle-CieSinpC.js.map +0 -1
  771. package/chunks/bundle-ClNB_q5u.js.map +0 -1
  772. package/chunks/bundle-Cs90CrUq.js.map +0 -1
  773. package/chunks/bundle-CwfU7XnU.js.map +0 -1
  774. package/chunks/bundle-CyyqWqaj.js.map +0 -1
  775. package/chunks/bundle-D-UKgtlz.js.map +0 -1
  776. package/chunks/bundle-D90Dai1z.js.map +0 -1
  777. package/chunks/bundle-DA4za5Rj.js.map +0 -1
  778. package/chunks/bundle-DD67EHrK.js.map +0 -1
  779. package/chunks/bundle-DPMmCwJa.js.map +0 -1
  780. package/chunks/bundle-DTtdpBmF.js.map +0 -1
  781. package/chunks/bundle-DXIpH3W2.js.map +0 -1
  782. package/chunks/bundle-DYGSQKvt.js.map +0 -1
  783. package/chunks/bundle-DgT_60cR.js.map +0 -1
  784. package/chunks/bundle-Dokasjr1.js.map +0 -1
  785. package/chunks/bundle-Dr92I1-B.js.map +0 -1
  786. package/chunks/bundle-DyJdx5kB.js.map +0 -1
  787. package/chunks/bundle-DzoOdl4j.js.map +0 -1
  788. package/chunks/bundle-DzzUrNmL.js.map +0 -1
  789. package/chunks/bundle-FqbH02lt.js.map +0 -1
  790. package/chunks/bundle-K9rk8Bfi.js.map +0 -1
  791. package/chunks/bundle-NfL9hHdo.js.map +0 -1
  792. package/chunks/bundle-OVaef-VB.js.map +0 -1
  793. package/chunks/bundle-Q-b7_fsl.js.map +0 -1
  794. package/chunks/bundle-QZcjovdG.js.map +0 -1
  795. package/chunks/bundle-UWwF1Hyj.js.map +0 -1
  796. package/chunks/bundle-pOfT343E.js.map +0 -1
  797. package/chunks/bundle-sRAn8KYg.js.map +0 -1
  798. package/cjs/chunks/bundle-48-ANevp.js.map +0 -1
  799. package/cjs/chunks/bundle-B0xh7srZ.js.map +0 -1
  800. package/cjs/chunks/bundle-B5DImaot.js.map +0 -1
  801. package/cjs/chunks/bundle-B7aEyxDJ.js.map +0 -1
  802. package/cjs/chunks/bundle-B84lWsGH.js.map +0 -1
  803. package/cjs/chunks/bundle-BIZUP_xN.js.map +0 -1
  804. package/cjs/chunks/bundle-BLORPb9I.js.map +0 -1
  805. package/cjs/chunks/bundle-BLSItw7_.js.map +0 -1
  806. package/cjs/chunks/bundle-BWWIsE09.js.map +0 -1
  807. package/cjs/chunks/bundle-B_kiHl24.js.map +0 -1
  808. package/cjs/chunks/bundle-Be5cYG-8.js.map +0 -1
  809. package/cjs/chunks/bundle-BfLPNtFS.js.map +0 -1
  810. package/cjs/chunks/bundle-BijTJ0c2.js.map +0 -1
  811. package/cjs/chunks/bundle-Bkuc5bwC.js.map +0 -1
  812. package/cjs/chunks/bundle-BmhAGvYn.js.map +0 -1
  813. package/cjs/chunks/bundle-BqhdTNA2.js.map +0 -1
  814. package/cjs/chunks/bundle-BtJsON3R.js.map +0 -1
  815. package/cjs/chunks/bundle-C3rM3Ztv.js.map +0 -1
  816. package/cjs/chunks/bundle-C4xLg4S4.js.map +0 -1
  817. package/cjs/chunks/bundle-C5ckuHVD.js.map +0 -1
  818. package/cjs/chunks/bundle-CATF4h3Q.js.map +0 -1
  819. package/cjs/chunks/bundle-CDhba0Ik.js.map +0 -1
  820. package/cjs/chunks/bundle-CHbACwVy.js.map +0 -1
  821. package/cjs/chunks/bundle-CT350f9x.js.map +0 -1
  822. package/cjs/chunks/bundle-CWTqtnQO.js.map +0 -1
  823. package/cjs/chunks/bundle-CWWDc-jq.js.map +0 -1
  824. package/cjs/chunks/bundle-CXN-DL6s.js.map +0 -1
  825. package/cjs/chunks/bundle-CXS1Xff3.js.map +0 -1
  826. package/cjs/chunks/bundle-C_bbb-dp.js.map +0 -1
  827. package/cjs/chunks/bundle-CgxoBZ0q.js.map +0 -1
  828. package/cjs/chunks/bundle-CmAcdA9c.js.map +0 -1
  829. package/cjs/chunks/bundle-CoLGyVM7.js.map +0 -1
  830. package/cjs/chunks/bundle-Cqyxf0LC.js.map +0 -1
  831. package/cjs/chunks/bundle-Ct_lW8hI.js.map +0 -1
  832. package/cjs/chunks/bundle-CtcrPWbo.js.map +0 -1
  833. package/cjs/chunks/bundle-CynaFF2G.js.map +0 -1
  834. package/cjs/chunks/bundle-CzQWSkYD.js.map +0 -1
  835. package/cjs/chunks/bundle-D83t7kQt.js.map +0 -1
  836. package/cjs/chunks/bundle-D8786bwt.js.map +0 -1
  837. package/cjs/chunks/bundle-DCtoNM-7.js.map +0 -1
  838. package/cjs/chunks/bundle-DDPA24Ym.js.map +0 -1
  839. package/cjs/chunks/bundle-DJsZItzb.js.map +0 -1
  840. package/cjs/chunks/bundle-DSRFKM2R.js.map +0 -1
  841. package/cjs/chunks/bundle-D_w5bnPd.js.map +0 -1
  842. package/cjs/chunks/bundle-Dd5sHG-K.js.map +0 -1
  843. package/cjs/chunks/bundle-Ddc4NjWH.js.map +0 -1
  844. package/cjs/chunks/bundle-DgQ9fMEI.js.map +0 -1
  845. package/cjs/chunks/bundle-DjML1ul2.js.map +0 -1
  846. package/cjs/chunks/bundle-DphM1mNA.js.map +0 -1
  847. package/cjs/chunks/bundle-Dv7MCQ5s.js.map +0 -1
  848. package/cjs/chunks/bundle-EaE84c1u.js.map +0 -1
  849. package/cjs/chunks/bundle-IKpW2l2j.js.map +0 -1
  850. package/cjs/chunks/bundle-Iem46lqC.js.map +0 -1
  851. package/cjs/chunks/bundle-JUvZGt3Q.js.map +0 -1
  852. package/cjs/chunks/bundle-KpCtn3E5.js.map +0 -1
  853. package/cjs/chunks/bundle-Sibh5a_G.js.map +0 -1
  854. package/cjs/chunks/bundle-WotxJ_Ab.js.map +0 -1
  855. package/cjs/chunks/bundle-Wz8wcC8J.js.map +0 -1
  856. package/cjs/chunks/bundle-ZS9cLNMS.js.map +0 -1
  857. package/cjs/chunks/bundle-tKhabQAd.js.map +0 -1
  858. package/cjs/chunks/bundle-u7llDhg-.js.map +0 -1
  859. package/cjs/chunks/bundle-wHImRt4w.js.map +0 -1
  860. package/cjs/chunks/bundle-ya6_vMhO.js.map +0 -1
@@ -127,7 +127,7 @@ const outCarouselStyle = (carouselstyle) => {
127
127
  if (!carouselstyle)
128
128
  return {};
129
129
  return {
130
- carouselStyle: Object.assign(Object.assign({}, carouselstyle), outSingle('spacing', carouselstyle)),
130
+ carouselStyle: Object.assign(Object.assign(Object.assign({}, carouselstyle), outSingle('spacing', carouselstyle)), outSingle('maxChildWidth', carouselstyle)),
131
131
  };
132
132
  };
133
133
  const outViewProps = (view) => {
@@ -174,28 +174,15 @@ const createParser = (params) => {
174
174
  mapCarouselProps: (params === null || params === void 0 ? void 0 : params.mapCarouselProps) || defaultMapper,
175
175
  };
176
176
  const transforms = [colorTransform, numberTransform, ...((_a = params === null || params === void 0 ? void 0 : params.transforms) !== null && _a !== void 0 ? _a : [])];
177
- const transformDirty = new Set();
178
177
  return {
179
178
  setTransforms(newTransforms) {
180
179
  transforms.length = 0;
181
180
  transforms.push(...newTransforms);
182
- transformDirty.clear();
183
181
  },
184
182
  addTransforms(newTransforms) {
185
183
  transforms.push(...newTransforms);
186
184
  },
187
185
  parse(rawItem, options) {
188
- // Note: it is for mutable transforms
189
- // const uniqId =
190
- // typeof options.depth === 'number' && typeof options.elemIdx === 'number'
191
- // ? `id-${options.depth}-${options.elemIdx}`
192
- // : rawItem.id ?? rawItem.elementId ?? JSON.stringify(rawItem);
193
- //
194
- // let item = rawItem;
195
- // if (!transformDirty.has(uniqId)) {
196
- // item = transforms.reduce((it, transform) => transform(it), rawItem);
197
- // transformDirty.add(uniqId);
198
- // }
199
186
  const item = transforms.reduce((it, transform) => transform.run(it), rawItem);
200
187
  switch (item.type) {
201
188
  case ComponentType.Box: {
@@ -382,14 +369,15 @@ const createMessageTemplate = (opts) => {
382
369
  if (!isTemplateVersionSupported(templateVersion)) {
383
370
  throw new Error(`Cannot parse template item due to unsupported template version: ${templateVersion}, ${SUPPORTED_TEMPLATE_VERSIONS}`);
384
371
  }
385
- return (React__default.default.createElement(React__default.default.Fragment, null, templateItems.map((rawItem, index, siblings) => {
386
- const result = parser.parse(rawItem, { parentLayout, depth, elemIdx: index, siblings });
372
+ return (React__default.default.createElement(React__default.default.Fragment, null, templateItems.map((rawProperties, index, siblings) => {
373
+ const result = parser.parse(rawProperties, { parentLayout, depth, elemIdx: index, siblings });
387
374
  const item = result.transformed;
388
375
  const rendererProps = {
389
376
  key: index,
390
377
  siblings,
391
378
  parentLayout,
392
379
  parsedProperties: result.properties,
380
+ rawProperties,
393
381
  };
394
382
  switch (item.type) {
395
383
  case ComponentType.Carousel: {
@@ -425,7 +413,7 @@ const createMessageTemplate = (opts) => {
425
413
  MessageTemplate: ({ templateVersion, templateItems, parentLayout = defaultProperties.rootLayout, }) => {
426
414
  const items = setTemplateItemId(templateItems);
427
415
  return (React__default.default.createElement(SizeContextProvider, null,
428
- React__default.default.createElement(Container, null,
416
+ React__default.default.createElement(Container, { className: 'sb-message-template__parent' },
429
417
  React__default.default.createElement(MessageTemplateBase, { isRoot: true, parentLayout: parentLayout, templateItems: items, templateVersion: templateVersion }))));
430
418
  },
431
419
  MessageTemplateBase,
@@ -1290,11 +1278,276 @@ var ActionType;
1290
1278
  },
1291
1279
  });
1292
1280
 
1281
+ function isWrappedText(view) {
1282
+ var _a;
1283
+ return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
1284
+ }
1285
+ // Compares the size spec to the option and returns whether they are equal or not.
1286
+ const isSizeCompatibleWithOption = ({ size, option, }) => {
1287
+ if (option === 'wrap') {
1288
+ return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
1289
+ }
1290
+ if (option === 'fill') {
1291
+ return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
1292
+ }
1293
+ return size.type === 'fixed';
1294
+ };
1295
+ const isGif = (url) => {
1296
+ var _a;
1297
+ if (typeof url !== 'string')
1298
+ return false;
1299
+ const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
1300
+ return extension === 'gif';
1301
+ };
1302
+ const clx = (...names) => {
1303
+ return names.filter((it) => !!it).join(' ');
1304
+ };
1305
+ const hasValidURLProtocol = (url = '') => {
1306
+ return ['http://', 'https://', 'ftp://'].some((protocol) => url.startsWith(protocol));
1307
+ };
1308
+ /**
1309
+ * @param url - url to be checked
1310
+ * @returns url with http:// protocol if it doesn't have any protocol
1311
+ * @example
1312
+ * returnUrl('www.sendbird.com') // returns 'http://www.sendbird.com'
1313
+ * returnUrl('https://www.sendbird.com') // returns 'https://www.sendbird.com'
1314
+ * returnUrl('ftp://www.sendbird.com') // returns 'ftp://www.sendbird.com'
1315
+ * returnUrl('sendbird.com') // returns 'https://sendbird.com'
1316
+ **/
1317
+ const getValidURL = (url = '') => {
1318
+ if (hasValidURLProtocol(url))
1319
+ return url;
1320
+ return `https://${url}`;
1321
+ };
1322
+
1323
+ function getDefaultStyles(overrides) {
1324
+ return Object.assign({ display: 'flex', overflow: 'hidden', boxSizing: 'border-box' }, overrides);
1325
+ }
1326
+ function setViewProps(styles, props, options) {
1327
+ setViewSize(styles, props, options);
1328
+ setViewStyle(styles, props);
1329
+ }
1330
+ function setBorderStyle(styles, borderWidth, borderColor, radius) {
1331
+ if (borderWidth) {
1332
+ styles['--border-width'] = `${borderWidth}px`;
1333
+ styles['--border-color'] = borderColor || 'transparent';
1334
+ }
1335
+ if (radius) {
1336
+ styles['borderRadius'] = radius;
1337
+ styles['--border-radius'] = `${radius}px`;
1338
+ }
1339
+ }
1340
+ function setViewStyle(styles, props) {
1341
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1342
+ const { viewStyle } = props;
1343
+ styles['marginBlockStart'] = (_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top;
1344
+ styles['marginBlockEnd'] = (_b = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _b === void 0 ? void 0 : _b.bottom;
1345
+ styles['marginInlineStart'] = (_c = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _c === void 0 ? void 0 : _c.left;
1346
+ styles['marginInlineEnd'] = (_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right;
1347
+ const marginHorizontal = ((_f = (_e = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _e === void 0 ? void 0 : _e.left) !== null && _f !== void 0 ? _f : 0) + ((_h = (_g = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _g === void 0 ? void 0 : _g.right) !== null && _h !== void 0 ? _h : 0);
1348
+ if (marginHorizontal > 0 && styles.width === '100%')
1349
+ styles.width = `calc(100% - ${marginHorizontal}px)`;
1350
+ if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
1351
+ styles['backgroundColor'] = viewStyle.backgroundColor;
1352
+ // use JSON.stringify to escape special characters in image URL
1353
+ if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundImageUrl) {
1354
+ styles['backgroundImage'] = `url(${JSON.stringify(viewStyle.backgroundImageUrl)})`;
1355
+ styles['backgroundSize'] = '100% 100%';
1356
+ styles['backgroundPosition'] = 'center';
1357
+ }
1358
+ setBorderStyle(styles, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderWidth, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderColor, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.radius);
1359
+ }
1360
+ function getViewSizeStyle(width, height, parentLayout) {
1361
+ const style = {};
1362
+ if (width.type === 'flex' && width.value == FlexSizeSpecValue.FillParent) {
1363
+ style['width'] = '100%';
1364
+ if (parentLayout === Layout.Row) {
1365
+ style['flex'] = 1;
1366
+ }
1367
+ }
1368
+ else if (width.type === 'flex' && width.value == FlexSizeSpecValue.WrapContent) {
1369
+ style['width'] = 'fit-content';
1370
+ if (parentLayout === Layout.Row) {
1371
+ style['flexShrink'] = 0;
1372
+ }
1373
+ }
1374
+ else if (width.type === 'fixed' && width.value >= 0) {
1375
+ style['width'] = width.value;
1376
+ if (parentLayout === Layout.Row) {
1377
+ style['flexShrink'] = 0;
1378
+ }
1379
+ }
1380
+ if (height.type === 'flex' && height.value == FlexSizeSpecValue.FillParent) {
1381
+ style['height'] = '100%';
1382
+ if (parentLayout === Layout.Column) {
1383
+ style['flex'] = 1;
1384
+ }
1385
+ }
1386
+ else if (height.type === 'flex' && height.value == FlexSizeSpecValue.WrapContent) {
1387
+ style['height'] = 'fit-content';
1388
+ if (parentLayout === Layout.Column) {
1389
+ style['flexShrink'] = 0;
1390
+ }
1391
+ }
1392
+ else if (height.type === 'fixed' && height.value >= 0) {
1393
+ style['height'] = height.value;
1394
+ if (parentLayout === Layout.Column) {
1395
+ style['flexShrink'] = 0;
1396
+ }
1397
+ }
1398
+ return style;
1399
+ }
1400
+ function setViewSize(styles, props, options) {
1401
+ var _a, _b;
1402
+ const { width: defaultWidth, height: defaultHeight } = defaultProperties.view.size;
1403
+ const { parentLayout } = options;
1404
+ const sizeStyle = getViewSizeStyle((_a = props.width) !== null && _a !== void 0 ? _a : defaultWidth, (_b = props.height) !== null && _b !== void 0 ? _b : defaultHeight, parentLayout);
1405
+ Object.assign(styles, sizeStyle);
1406
+ }
1407
+ function setAlign(styles, layout = defaultProperties.box.layout, align = defaultProperties.box.align) {
1408
+ if (layout === Layout.Row) {
1409
+ styles['flexDirection'] = 'row';
1410
+ styles['alignItems'] = alignInFlex(align.vertical);
1411
+ styles['justifyContent'] = alignInFlex(align.horizontal);
1412
+ }
1413
+ if (layout === Layout.Column) {
1414
+ styles['flexDirection'] = 'column';
1415
+ styles['alignItems'] = alignInFlex(align.horizontal);
1416
+ styles['justifyContent'] = alignInFlex(align.vertical);
1417
+ }
1418
+ }
1419
+ function setTextAlign(styles, align = defaultProperties.box.align.horizontal) {
1420
+ switch (align) {
1421
+ case AlignValue.Left:
1422
+ styles.textAlign = 'start';
1423
+ break;
1424
+ case AlignValue.Right:
1425
+ styles.textAlign = 'end';
1426
+ break;
1427
+ case AlignValue.Center:
1428
+ styles.textAlign = 'center';
1429
+ break;
1430
+ default:
1431
+ styles.textAlign = 'start';
1432
+ break;
1433
+ }
1434
+ }
1435
+ function setImageStyle(styles, imageStyle) {
1436
+ const { contentMode = MediaContentMode.AspectFit } = imageStyle || {};
1437
+ if (contentMode) {
1438
+ switch (contentMode) {
1439
+ case MediaContentMode.AspectFill:
1440
+ styles['objectFit'] = 'cover';
1441
+ break;
1442
+ case MediaContentMode.AspectFit:
1443
+ styles['objectFit'] = 'contain';
1444
+ break;
1445
+ case MediaContentMode.ScalesToFill:
1446
+ styles['objectFit'] = 'fill';
1447
+ break;
1448
+ }
1449
+ }
1450
+ }
1451
+ // uses image meta-data to render images that doesn't break the UI
1452
+ // https://sendbird.atlassian.net/wiki/spaces/UK/pages/2008220608/Message+template+-+Image+policy
1453
+ function setImageAspectRatio(styles, props) {
1454
+ var _a, _b, _c, _d;
1455
+ const imageMetaData = props === null || props === void 0 ? void 0 : props.metaData;
1456
+ if (!(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelHeight) || !(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelWidth)) {
1457
+ return;
1458
+ }
1459
+ if (((_a = props === null || props === void 0 ? void 0 : props.width) === null || _a === void 0 ? void 0 : _a.type) === 'fixed' || ((_b = props === null || props === void 0 ? void 0 : props.height) === null || _b === void 0 ? void 0 : _b.type) === 'fixed') {
1460
+ return;
1461
+ }
1462
+ styles['aspectRatio'] = `${(_c = props === null || props === void 0 ? void 0 : props.metaData) === null || _c === void 0 ? void 0 : _c.pixelWidth} / ${(_d = props === null || props === void 0 ? void 0 : props.metaData) === null || _d === void 0 ? void 0 : _d.pixelHeight}`;
1463
+ }
1464
+ function webkitLineClampStyles(numberOfLines) {
1465
+ return {
1466
+ WebkitLineClamp: numberOfLines,
1467
+ WebkitBoxOrient: 'vertical',
1468
+ display: '-webkit-box',
1469
+ overflow: 'hidden',
1470
+ overflowWrap: 'anywhere',
1471
+ flex: 1,
1472
+ };
1473
+ }
1474
+ function setTextStyle(styles, props, options) {
1475
+ const { textStyle, width } = props;
1476
+ // TODO: Change default as design
1477
+ const { size, color, weight } = textStyle || {};
1478
+ if (size)
1479
+ styles['fontSize'] = size;
1480
+ if (color)
1481
+ styles['color'] = color;
1482
+ if (weight)
1483
+ styles['fontWeight'] = weight;
1484
+ if ((width === null || width === void 0 ? void 0 : width.type) === 'flex' && (width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
1485
+ styles['width'] = 'fit-content';
1486
+ styles['maxWidth'] = '100%';
1487
+ }
1488
+ if (props.type === ComponentType.Text) {
1489
+ const { siblings, elemIdx } = options;
1490
+ // To push out any subsequent components from the container,
1491
+ // if a prior one is long enough to occupy an entire line
1492
+ // @link https://sendbird.atlassian.net/browse/NOTI-709
1493
+ if (siblings != null && siblings.length >= 2 && siblings.every(isWrappedText)) {
1494
+ styles.flexShrink = siblings.length - 1 === elemIdx ? 1 : 0;
1495
+ }
1496
+ }
1497
+ }
1498
+
1499
+ const parser = createParser({
1500
+ mapBoxProps(props, options) {
1501
+ const styles = getDefaultStyles();
1502
+ setViewProps(styles, props, options);
1503
+ setAlign(styles, props.layout, props.align);
1504
+ return styles;
1505
+ },
1506
+ mapTextProps(props, options) {
1507
+ var _a;
1508
+ const styles = getDefaultStyles({ whiteSpace: 'pre-line', wordBreak: 'break-word' });
1509
+ // Better not set flex 1 to text
1510
+ setViewProps(styles, props, options);
1511
+ setTextStyle(styles, props, options);
1512
+ setAlign(styles, Layout.Row, props.align);
1513
+ setTextAlign(styles, (_a = props.align) === null || _a === void 0 ? void 0 : _a.horizontal);
1514
+ return styles;
1515
+ },
1516
+ mapImageProps(props, options) {
1517
+ const styles = getDefaultStyles();
1518
+ setViewProps(styles, props, options);
1519
+ setImageStyle(styles, props.imageStyle);
1520
+ setImageAspectRatio(styles, props);
1521
+ return styles;
1522
+ },
1523
+ mapTextButtonProps(props, options) {
1524
+ const styles = getDefaultStyles({ whiteSpace: 'pre-line', alignItems: 'center', justifyContent: 'center' });
1525
+ setViewProps(styles, props, options);
1526
+ setTextStyle(styles, props, options);
1527
+ return styles;
1528
+ },
1529
+ mapImageButtonProps(props, options) {
1530
+ const styles = getDefaultStyles();
1531
+ setViewProps(styles, props, options);
1532
+ setImageStyle(styles, props.imageStyle);
1533
+ setImageAspectRatio(styles, props);
1534
+ return styles;
1535
+ },
1536
+ mapCarouselProps(props, options) {
1537
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1538
+ const styles = getDefaultStyles();
1539
+ setViewProps(styles, props, options);
1540
+ styles['paddingBlockStart'] = (_b = (_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.padding) === null || _b === void 0 ? void 0 : _b.top;
1541
+ styles['paddingBlockEnd'] = (_d = (_c = props.viewStyle) === null || _c === void 0 ? void 0 : _c.padding) === null || _d === void 0 ? void 0 : _d.bottom;
1542
+ styles['paddingInlineStart'] = (_f = (_e = props.viewStyle) === null || _e === void 0 ? void 0 : _e.padding) === null || _f === void 0 ? void 0 : _f.left;
1543
+ styles['paddingInlineEnd'] = (_h = (_g = props.viewStyle) === null || _g === void 0 ? void 0 : _g.padding) === null || _h === void 0 ? void 0 : _h.right;
1544
+ return styles;
1545
+ },
1546
+ });
1547
+
1293
1548
  const SWIPE_THRESHOLD = 24;
1549
+ const CLICK_THRESHOLD = 5;
1294
1550
  function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlineEnd }) {
1295
- // TODO: RTL support
1296
- const paddingStart = paddingInlineStart;
1297
- const paddingEnd = paddingInlineEnd;
1298
1551
  const carouselRef = React.useRef(null);
1299
1552
  const childrenRefs = React.useRef(Array.from({ length: childrenLength }, () => React__default.default.createRef()));
1300
1553
  const isDragging = React.useRef(false);
@@ -1306,22 +1559,32 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1306
1559
  offset: 0,
1307
1560
  translateX: 0,
1308
1561
  currentIndex: 0,
1562
+ didMove: false,
1309
1563
  });
1310
1564
  const [childWidths, setChildWidths] = React.useState(() => childrenRefs.current.map(() => 0));
1565
+ const [isRTL, setIsRTL] = React.useState(false);
1566
+ const directionMultiplier = isRTL ? -1 : 1;
1311
1567
  const itemPositions = React.useMemo(() => {
1312
- let currentPosition = paddingStart;
1568
+ let currentPosition = paddingInlineStart;
1313
1569
  return childWidths.map((width, i) => {
1314
- const start = currentPosition - (i > 0 ? spacing : 0);
1570
+ const spacingOffset = i > 0 ? spacing : 0;
1571
+ const start = currentPosition - spacingOffset;
1315
1572
  const end = start - width;
1316
1573
  currentPosition = end;
1317
1574
  return { start, end };
1318
1575
  });
1319
- }, [childWidths, spacing, paddingStart]);
1576
+ }, [childWidths, spacing, paddingInlineStart]);
1320
1577
  const totalContentWidth = React.useMemo(() => {
1321
1578
  const totalItemWidth = childWidths.reduce((acc, width) => acc + width, 0);
1322
1579
  const totalSpacing = spacing * (childrenLength - 1);
1323
1580
  return totalItemWidth + totalSpacing;
1324
1581
  }, [childWidths, spacing, childrenLength]);
1582
+ React.useLayoutEffect(() => {
1583
+ if (carouselRef.current) {
1584
+ const dir = getComputedStyle(carouselRef.current).direction;
1585
+ setIsRTL(dir === 'rtl');
1586
+ }
1587
+ }, []);
1325
1588
  React.useLayoutEffect(() => {
1326
1589
  setChildWidths(childrenRefs.current.map((ref) => { var _a, _b; return (_b = (_a = ref.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0; }));
1327
1590
  }, [childrenLength]);
@@ -1365,9 +1628,9 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1365
1628
  function clampTranslateX(translateX) {
1366
1629
  var _a, _b;
1367
1630
  const containerWidth = (_b = (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
1368
- const start = paddingStart;
1369
- const end = Math.min(0, containerWidth - totalContentWidth) - paddingEnd;
1370
- return Math.min(start, Math.max(end, translateX));
1631
+ const start = paddingInlineStart;
1632
+ const end = Math.min(0, containerWidth - totalContentWidth) - paddingInlineEnd;
1633
+ return Math.min(start, Math.max(translateX, end));
1371
1634
  }
1372
1635
  drag.current.currentIndex = newIndex;
1373
1636
  drag.current.translateX = clampTranslateX(itemPositions[newIndex].start);
@@ -1381,7 +1644,8 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1381
1644
  };
1382
1645
  const animate = () => {
1383
1646
  if (carouselRef.current) {
1384
- carouselRef.current.style.transform = `translateX(${drag.current.translateX + drag.current.offset}px)`;
1647
+ const tx = (drag.current.translateX + drag.current.offset) * directionMultiplier;
1648
+ carouselRef.current.style.transform = `translateX(${tx}px)`;
1385
1649
  }
1386
1650
  if (animationFrame.current) {
1387
1651
  animationFrame.current = requestAnimationFrame(animate);
@@ -1403,26 +1667,38 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1403
1667
  drag.current.sx = event.clientX;
1404
1668
  drag.current.sy = event.clientY;
1405
1669
  drag.current.offset = 0;
1670
+ drag.current.didMove = false;
1406
1671
  animationFrame.current = requestAnimationFrame(animate);
1407
1672
  };
1408
1673
  const onMouseMove = (event) => {
1409
1674
  if (!isDragging.current || drag.current.sx === null)
1410
1675
  return;
1411
- drag.current.offset = event.clientX - drag.current.sx;
1676
+ drag.current.offset = (event.clientX - drag.current.sx) * directionMultiplier;
1677
+ if (Math.abs(drag.current.offset) > CLICK_THRESHOLD) {
1678
+ drag.current.didMove = true;
1679
+ }
1412
1680
  };
1413
- const onMouseUp = () => {
1681
+ const onMouseUp = (event) => {
1414
1682
  if (!isDragging.current)
1415
1683
  return;
1416
1684
  scrollStop();
1417
1685
  dragRelease();
1418
1686
  dragStop();
1687
+ if (drag.current.didMove) {
1688
+ event.preventDefault();
1689
+ event.stopPropagation();
1690
+ }
1419
1691
  };
1420
- const onMouseLeave = () => {
1692
+ const onMouseLeave = (event) => {
1421
1693
  if (!isDragging.current)
1422
1694
  return;
1423
1695
  scrollStop();
1424
1696
  dragRelease();
1425
1697
  dragStop();
1698
+ if (drag.current.didMove) {
1699
+ event.preventDefault();
1700
+ event.stopPropagation();
1701
+ }
1426
1702
  };
1427
1703
  const onTouchStart = (event) => {
1428
1704
  scrollStop();
@@ -1431,6 +1707,7 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1431
1707
  drag.current.sx = touch.clientX;
1432
1708
  drag.current.sy = touch.clientY;
1433
1709
  drag.current.offset = 0;
1710
+ drag.current.didMove = false;
1434
1711
  animationFrame.current = requestAnimationFrame(animate);
1435
1712
  };
1436
1713
  const onTouchMove = (event) => {
@@ -1439,7 +1716,10 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1439
1716
  const { clientX, clientY } = event.touches[0];
1440
1717
  const { sx, sy } = drag.current;
1441
1718
  if (isDragging.current) {
1442
- drag.current.offset = clientX - sx;
1719
+ drag.current.offset = (clientX - sx) * directionMultiplier;
1720
+ if (Math.abs(drag.current.offset) > CLICK_THRESHOLD) {
1721
+ drag.current.didMove = true;
1722
+ }
1443
1723
  return;
1444
1724
  }
1445
1725
  const isVerticalScroll = Math.abs(clientY - sy) > Math.abs(clientX - sx);
@@ -1447,16 +1727,26 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1447
1727
  scrollStart();
1448
1728
  }
1449
1729
  else {
1450
- drag.current.offset = clientX - sx;
1730
+ drag.current.offset = (clientX - sx) * directionMultiplier;
1451
1731
  blockScroll();
1452
1732
  dragStart();
1453
1733
  }
1454
1734
  };
1455
- const onTouchEnd = () => {
1735
+ const onTouchEnd = (event) => {
1456
1736
  unblockScroll();
1457
1737
  scrollStop();
1458
1738
  dragRelease();
1459
1739
  dragStop();
1740
+ if (drag.current.didMove) {
1741
+ event.preventDefault();
1742
+ event.stopPropagation();
1743
+ }
1744
+ };
1745
+ const onClickCapture = (event) => {
1746
+ if (drag.current.didMove) {
1747
+ event.preventDefault();
1748
+ event.stopPropagation();
1749
+ }
1460
1750
  };
1461
1751
  return {
1462
1752
  carouselRef,
@@ -1469,6 +1759,7 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1469
1759
  onTouchStart,
1470
1760
  onTouchMove,
1471
1761
  onTouchEnd,
1762
+ onClickCapture,
1472
1763
  },
1473
1764
  };
1474
1765
  }
@@ -1484,52 +1775,32 @@ var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
1484
1775
  }
1485
1776
  return t;
1486
1777
  };
1487
- const Carousel = ({ children, style, spacing = defaultProperties.carousel.style.spacing, maxChildWidth = defaultProperties.carousel.style.maxChildWidth, }) => {
1488
- const _a = style !== null && style !== void 0 ? style : {}, { paddingInlineStart = 0, paddingInlineEnd = 0 } = _a, restStyle = __rest$4(_a, ["paddingInlineStart", "paddingInlineEnd"]);
1778
+ const RMTCarousel = (_a) => {
1779
+ var { children, style, spacing = defaultProperties.carousel.style.spacing, maxChildWidth = defaultProperties.carousel.style.maxChildWidth, inlineStyle } = _a, props = __rest$4(_a, ["children", "style", "spacing", "maxChildWidth", "inlineStyle"]);
1780
+ const _b = style !== null && style !== void 0 ? style : {}, { paddingInlineStart = 0, paddingInlineEnd = 0 } = _b, restStyle = __rest$4(_b, ["paddingInlineStart", "paddingInlineEnd"]);
1489
1781
  const { carouselRef, childrenRefs, handlers } = useCarousel({
1490
1782
  spacing,
1491
1783
  childrenLength: children.length,
1492
1784
  paddingInlineStart: Number(paddingInlineStart),
1493
1785
  paddingInlineEnd: Number(paddingInlineEnd),
1494
1786
  });
1495
- return (React__default.default.createElement("div", Object.assign({}, handlers, { ref: carouselRef, className: 'sb-message-template__carousel', style: Object.assign(Object.assign({}, restStyle), { gap: spacing, width: '100%', overflow: 'visible' }) }), children.map((item, index) => (React__default.default.createElement(CarouselChild, { ref: childrenRefs.current[index], key: index, maxChildWidth: maxChildWidth }, item)))));
1787
+ return (React__default.default.createElement("div", Object.assign({}, handlers, { ref: carouselRef, style: Object.assign(Object.assign(Object.assign({}, restStyle), { gap: spacing, width: '100%', overflow: 'visible' }), inlineStyle) }, props), children.map((item, index) => (React__default.default.createElement(RMTCarouselChild, { ref: childrenRefs.current[index], key: index, maxChildWidth: maxChildWidth }, item)))));
1496
1788
  };
1497
- const CarouselChild = React__default.default.forwardRef(function CarouselChild({ maxChildWidth, children }, ref) {
1789
+ const RMTCarouselChild = React__default.default.forwardRef(function CarouselChild({ maxChildWidth, children }, ref) {
1498
1790
  const maxWidth = shouldSetMaxChildWidth(children.props, maxChildWidth) ? maxChildWidth : 'fit-content';
1499
1791
  return (React__default.default.createElement("div", { ref: ref, style: { maxWidth, width: '100%', flexShrink: 0, overflow: 'hidden', userSelect: 'none' } }, children));
1500
1792
  });
1501
1793
  // Note: Set the maxChildWidth because it's impossible to determine the maximum width of items in the Carousel Child template when they have FillParent
1502
1794
  function shouldSetMaxChildWidth(props, maxChildWidth) {
1503
1795
  return !!props.templateItems.find((it) => {
1504
- var _a, _b, _c, _d;
1505
- const hasFillWidth = ((_a = it.width) === null || _a === void 0 ? void 0 : _a.type) === 'flex' && ((_b = it.width) === null || _b === void 0 ? void 0 : _b.value) === FlexSizeSpecValue.FillParent;
1506
- const overMaxChildWidth = ((_c = it.width) === null || _c === void 0 ? void 0 : _c.type) === 'fixed' && ((_d = it.width) === null || _d === void 0 ? void 0 : _d.value) >= maxChildWidth;
1796
+ var _a;
1797
+ const width = (_a = it.width) !== null && _a !== void 0 ? _a : defaultProperties.view.size.width;
1798
+ const hasFillWidth = width.type === 'flex' && width.value === FlexSizeSpecValue.FillParent;
1799
+ const overMaxChildWidth = width.type === 'fixed' && width.value >= maxChildWidth;
1507
1800
  return hasFillWidth || overMaxChildWidth;
1508
1801
  });
1509
1802
  }
1510
1803
 
1511
- function isWrappedText(view) {
1512
- var _a;
1513
- return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
1514
- }
1515
- // Compares the size spec to the option and returns whether they are equal or not.
1516
- const isSizeCompatibleWithOption = ({ size, option, }) => {
1517
- if (option === 'wrap') {
1518
- return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
1519
- }
1520
- if (option === 'fill') {
1521
- return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
1522
- }
1523
- return size.type === 'fixed';
1524
- };
1525
- const isGif = (url) => {
1526
- var _a;
1527
- if (typeof url !== 'string')
1528
- return false;
1529
- const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
1530
- return extension === 'gif';
1531
- };
1532
-
1533
1804
  var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
1534
1805
  var t = {};
1535
1806
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -1541,7 +1812,7 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
1541
1812
  }
1542
1813
  return t;
1543
1814
  };
1544
- const CanvasReactMessageTemplateImage = (props) => {
1815
+ const RMTImageCanvas = (props) => {
1545
1816
  const { imageSize, canvasRef, canvasProps } = useCanvasMessageTemplateImage(props);
1546
1817
  return (React__default.default.createElement("canvas", Object.assign({}, canvasProps, { ref: canvasRef, width: imageSize === null || imageSize === void 0 ? void 0 : imageSize.width, height: imageSize === null || imageSize === void 0 ? void 0 : imageSize.height, onError: props.onError })));
1547
1818
  };
@@ -1557,7 +1828,6 @@ const useCanvasMessageTemplateImage = (_a) => {
1557
1828
  }, [fallbackImageSize, metaData === null || metaData === void 0 ? void 0 : metaData.pixelHeight, metaData === null || metaData === void 0 ? void 0 : metaData.pixelWidth]);
1558
1829
  React.useEffect(() => {
1559
1830
  if (imageSize == null) {
1560
- console.log('Canvas_ReactMessageTemplateImage: no metaData, render fit to container');
1561
1831
  if (canvasRef.current) {
1562
1832
  canvasRef.current.style.width = '100%';
1563
1833
  canvasRef.current.style.height = '100%';
@@ -1580,234 +1850,89 @@ const useCanvasMessageTemplateImage = (_a) => {
1580
1850
  ctx.globalCompositeOperation = 'source-over';
1581
1851
  ctx.fillStyle = '#000';
1582
1852
  // draw
1583
- ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
1584
- ctx.globalCompositeOperation = 'source-atop';
1585
- ctx.fillStyle = tintColor;
1586
- ctx.fillRect(0, 0, imageWidth, imageHeight);
1587
- }
1588
- }
1589
- };
1590
- const onImageError = (event) => {
1591
- var _a;
1592
- // @ts-ignore
1593
- (_a = props.onError) === null || _a === void 0 ? void 0 : _a.call(props, event);
1594
- };
1595
- img.addEventListener('load', onImageLoad);
1596
- img.addEventListener('error', onImageError);
1597
- img.src = props.src;
1598
- return () => {
1599
- img.removeEventListener('load', onImageLoad);
1600
- img.removeEventListener('error', onImageError);
1601
- };
1602
- }
1603
- return;
1604
- }, [props.src, imageSize, tintColor]);
1605
- return {
1606
- canvasRef,
1607
- canvasProps: props,
1608
- imageSize,
1609
- };
1610
- };
1611
-
1612
- const ImgReactMessageTemplateImage = (props) => {
1613
- return React__default.default.createElement("img", Object.assign({}, props, { onError: props.onError, referrerPolicy: "no-referrer" }));
1614
- };
1615
-
1616
- const PlaceholderReactMessageTemplateImage = (props) => {
1617
- return React__default.default.createElement("div", { style: Object.assign(Object.assign({}, props.style), { backgroundColor: 'transparent' }) });
1618
- };
1619
-
1620
- var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
1621
- var t = {};
1622
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1623
- t[p] = s[p];
1624
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1625
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1626
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1627
- t[p[i]] = s[p[i]];
1628
- }
1629
- return t;
1630
- };
1631
- const ReactMessageTemplateImage = (_a) => {
1632
- var { tintColor, metaData } = _a, props = __rest$2(_a, ["tintColor", "metaData"]);
1633
- const { hasError, onError } = useImageLoadError(props.src);
1634
- if (props.onError)
1635
- console.warn('`onError` is intercepted and not executed in the ReactMessageTemplateImage.');
1636
- if (hasError) {
1637
- return React__default.default.createElement(PlaceholderReactMessageTemplateImage, Object.assign({}, props));
1638
- }
1639
- else if (tintColor && !isGif(props.src)) {
1640
- return React__default.default.createElement(CanvasReactMessageTemplateImage, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
1641
- }
1642
- else {
1643
- return React__default.default.createElement(ImgReactMessageTemplateImage, Object.assign({}, props, { onError: onError }));
1644
- }
1645
- };
1646
- const useImageLoadError = (source) => {
1647
- const [hasError, setHasError] = React.useState(false);
1648
- React.useEffect(() => setHasError(false), [source]);
1649
- return {
1650
- hasError,
1651
- onError: React.useCallback(() => setHasError(true), []),
1652
- };
1653
- };
1654
-
1655
- function getDefaultStyles(overrides) {
1656
- return Object.assign({ display: 'flex', overflow: 'hidden', boxSizing: 'border-box' }, overrides);
1657
- }
1658
- function setViewProps(styles, props, options) {
1659
- setViewSize(styles, props, options);
1660
- setViewStyle(styles, props);
1661
- }
1662
- function setBorderStyle(styles, borderWidth, borderColor, radius) {
1663
- if (borderWidth) {
1664
- styles['--border-width'] = `${borderWidth}px`;
1665
- styles['--border-color'] = borderColor || 'transparent';
1666
- }
1667
- if (radius) {
1668
- styles['borderRadius'] = radius;
1669
- styles['--border-radius'] = `${radius}px`;
1670
- }
1671
- }
1672
- function setViewStyle(styles, props) {
1673
- var _a, _b, _c, _d, _e, _f, _g, _h;
1674
- const { viewStyle } = props;
1675
- styles['marginBlockStart'] = (_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top;
1676
- styles['marginBlockEnd'] = (_b = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _b === void 0 ? void 0 : _b.bottom;
1677
- styles['marginInlineStart'] = (_c = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _c === void 0 ? void 0 : _c.left;
1678
- styles['marginInlineEnd'] = (_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right;
1679
- const marginHorizontal = ((_f = (_e = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _e === void 0 ? void 0 : _e.left) !== null && _f !== void 0 ? _f : 0) + ((_h = (_g = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _g === void 0 ? void 0 : _g.right) !== null && _h !== void 0 ? _h : 0);
1680
- if (marginHorizontal > 0 && styles.width === '100%')
1681
- styles.width = `calc(100% - ${marginHorizontal}px)`;
1682
- if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
1683
- styles['backgroundColor'] = viewStyle.backgroundColor;
1684
- // use JSON.stringify to escape special characters in image URL
1685
- if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundImageUrl) {
1686
- styles['backgroundImage'] = `url(${JSON.stringify(viewStyle.backgroundImageUrl)})`;
1687
- styles['backgroundSize'] = '100% 100%';
1688
- styles['backgroundPosition'] = 'center';
1689
- }
1690
- setBorderStyle(styles, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderWidth, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderColor, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.radius);
1691
- }
1692
- function getViewSizeStyle(width, height, parentLayout) {
1693
- const style = {};
1694
- if (width.type === 'flex' && width.value == FlexSizeSpecValue.FillParent) {
1695
- style['width'] = '100%';
1696
- if (parentLayout === Layout.Row) {
1697
- style['flex'] = 1;
1698
- }
1699
- }
1700
- else if (width.type === 'fixed' && width.value >= 0) {
1701
- style['width'] = width.value;
1702
- }
1703
- if (height.type === 'flex' && height.value == FlexSizeSpecValue.FillParent) {
1704
- style['height'] = '100%';
1705
- if (parentLayout === Layout.Column) {
1706
- style['flex'] = 1;
1853
+ ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
1854
+ ctx.globalCompositeOperation = 'source-atop';
1855
+ ctx.fillStyle = tintColor;
1856
+ ctx.fillRect(0, 0, imageWidth, imageHeight);
1857
+ }
1858
+ }
1859
+ };
1860
+ const onImageError = (event) => {
1861
+ var _a;
1862
+ // @ts-ignore
1863
+ (_a = props.onError) === null || _a === void 0 ? void 0 : _a.call(props, event);
1864
+ };
1865
+ img.addEventListener('load', onImageLoad);
1866
+ img.addEventListener('error', onImageError);
1867
+ img.src = props.src;
1868
+ return () => {
1869
+ img.removeEventListener('load', onImageLoad);
1870
+ img.removeEventListener('error', onImageError);
1871
+ };
1707
1872
  }
1708
- }
1709
- else if (height.type === 'fixed' && height.value >= 0) {
1710
- style['height'] = height.value;
1711
- }
1712
- return style;
1713
- }
1714
- function setViewSize(styles, props, options) {
1715
- var _a, _b;
1716
- const { width: defaultWidth, height: defaultHeight } = defaultProperties.view.size;
1717
- const { parentLayout } = options;
1718
- const sizeStyle = getViewSizeStyle((_a = props.width) !== null && _a !== void 0 ? _a : defaultWidth, (_b = props.height) !== null && _b !== void 0 ? _b : defaultHeight, parentLayout);
1719
- Object.assign(styles, sizeStyle);
1720
- }
1721
- function setAlign(styles, layout = defaultProperties.box.layout, align = defaultProperties.box.align) {
1722
- if (layout === Layout.Row) {
1723
- styles['flexDirection'] = 'row';
1724
- styles['alignItems'] = alignInFlex(align.vertical);
1725
- styles['justifyContent'] = alignInFlex(align.horizontal);
1726
- }
1727
- if (layout === Layout.Column) {
1728
- styles['flexDirection'] = 'column';
1729
- styles['alignItems'] = alignInFlex(align.horizontal);
1730
- styles['justifyContent'] = alignInFlex(align.vertical);
1731
- }
1732
- }
1733
- function setTextAlign(styles, align = defaultProperties.box.align.horizontal) {
1734
- styles.textAlign = align;
1735
- }
1736
- function setImageStyle(styles, imageStyle) {
1737
- const { contentMode = MediaContentMode.AspectFit } = imageStyle || {};
1738
- if (contentMode) {
1739
- switch (contentMode) {
1740
- case MediaContentMode.AspectFill:
1741
- styles['objectFit'] = 'cover';
1742
- break;
1743
- case MediaContentMode.AspectFit:
1744
- styles['objectFit'] = 'contain';
1745
- break;
1746
- case MediaContentMode.ScalesToFill:
1747
- styles['objectFit'] = 'fill';
1748
- break;
1873
+ return;
1874
+ }, [props.src, imageSize, tintColor]);
1875
+ return {
1876
+ canvasRef,
1877
+ canvasProps: props,
1878
+ imageSize,
1879
+ };
1880
+ };
1881
+
1882
+ const RMTImageDefault = (props) => {
1883
+ return React__default.default.createElement("img", Object.assign({}, props, { onError: props.onError, draggable: false, referrerPolicy: "no-referrer" }));
1884
+ };
1885
+
1886
+ const RMTImagePlaceholder = (props) => {
1887
+ return React__default.default.createElement("div", { style: Object.assign(Object.assign({}, props.style), { backgroundColor: 'transparent' }) });
1888
+ };
1889
+
1890
+ var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
1891
+ var t = {};
1892
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1893
+ t[p] = s[p];
1894
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1895
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1896
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1897
+ t[p[i]] = s[p[i]];
1749
1898
  }
1899
+ return t;
1900
+ };
1901
+ const RMTImage = (_a) => {
1902
+ var { tintColor, metaData } = _a, props = __rest$2(_a, ["tintColor", "metaData"]);
1903
+ const { hasError, onError } = useImageLoadError(props.src);
1904
+ if (props.onError)
1905
+ console.warn('`onError` is intercepted and not executed in the ReactMessageTemplateImage.');
1906
+ if (hasError) {
1907
+ return React__default.default.createElement(RMTImagePlaceholder, Object.assign({}, props));
1750
1908
  }
1751
- }
1752
- // uses image meta-data to render images that doesn't break the UI
1753
- // https://sendbird.atlassian.net/wiki/spaces/UK/pages/2008220608/Message+template+-+Image+policy
1754
- function setImageAspectRatio(styles, props) {
1755
- var _a, _b, _c, _d;
1756
- const imageMetaData = props === null || props === void 0 ? void 0 : props.metaData;
1757
- if (!(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelHeight) || !(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelWidth)) {
1758
- return;
1909
+ else if (tintColor && !isGif(props.src)) {
1910
+ return React__default.default.createElement(RMTImageCanvas, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
1759
1911
  }
1760
- if (((_a = props === null || props === void 0 ? void 0 : props.width) === null || _a === void 0 ? void 0 : _a.type) === 'fixed' || ((_b = props === null || props === void 0 ? void 0 : props.height) === null || _b === void 0 ? void 0 : _b.type) === 'fixed') {
1761
- return;
1912
+ else {
1913
+ return React__default.default.createElement(RMTImageDefault, Object.assign({}, props, { onError: onError }));
1762
1914
  }
1763
- styles['aspectRatio'] = `${(_c = props === null || props === void 0 ? void 0 : props.metaData) === null || _c === void 0 ? void 0 : _c.pixelWidth} / ${(_d = props === null || props === void 0 ? void 0 : props.metaData) === null || _d === void 0 ? void 0 : _d.pixelHeight}`;
1764
- }
1765
- function webkitLineClampStyles(numberOfLines) {
1915
+ };
1916
+ const useImageLoadError = (source) => {
1917
+ const [hasError, setHasError] = React.useState(false);
1918
+ React.useEffect(() => setHasError(false), [source]);
1766
1919
  return {
1767
- WebkitLineClamp: numberOfLines,
1768
- WebkitBoxOrient: 'vertical',
1769
- display: '-webkit-box',
1770
- overflow: 'hidden',
1771
- overflowWrap: 'anywhere',
1772
- flex: 1,
1920
+ hasError,
1921
+ onError: React.useCallback(() => setHasError(true), []),
1773
1922
  };
1774
- }
1775
- function setTextStyle(styles, props, options) {
1776
- const { textStyle, width } = props;
1777
- // TODO: Change default as design
1778
- const { size, color, weight } = textStyle || {};
1779
- if (size)
1780
- styles['fontSize'] = size;
1781
- if (color)
1782
- styles['color'] = color;
1783
- if (weight)
1784
- styles['fontWeight'] = weight;
1785
- if ((width === null || width === void 0 ? void 0 : width.type) === 'flex' && (width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
1786
- styles['width'] = 'fit-content';
1787
- styles['maxWidth'] = '100%';
1788
- }
1789
- if (props.type === ComponentType.Text) {
1790
- const { siblings, elemIdx } = options;
1791
- // To push out any subsequent components from the container,
1792
- // if a prior one is long enough to occupy an entire line
1793
- // @link https://sendbird.atlassian.net/browse/NOTI-709
1794
- if (siblings != null && siblings.length >= 2 && siblings.every(isWrappedText)) {
1795
- styles.flexShrink = siblings.length - 1 === elemIdx ? 1 : 0;
1796
- }
1797
- }
1798
- }
1923
+ };
1799
1924
 
1800
1925
  // create a context provider for MessageComponent
1801
1926
  // - this is a wrapper for MessageComponent
1802
1927
  const MessageContext = React__default.default.createContext(null);
1803
- const MessageProvider = (props) => {
1804
- const { message, handleWebAction, handleCustomAction, handlePredefinedAction, children } = props;
1928
+ const MessageProvider = ({ message, handleWebAction, handleCustomAction, handlePredefinedAction, highlight, children, }) => {
1805
1929
  const value = React__default.default.useMemo(() => ({
1806
1930
  message,
1807
1931
  handleWebAction,
1808
1932
  handleCustomAction,
1809
1933
  handlePredefinedAction,
1810
- }), [message === null || message === void 0 ? void 0 : message.updatedAt]);
1934
+ highlight,
1935
+ }), [message === null || message === void 0 ? void 0 : message.updatedAt, highlight === null || highlight === void 0 ? void 0 : highlight.getContainerClassName, highlight === null || highlight === void 0 ? void 0 : highlight.getContainerInlineStyle, highlight === null || highlight === void 0 ? void 0 : highlight.renderText]);
1811
1936
  return React__default.default.createElement(MessageContext.Provider, { value: value }, children);
1812
1937
  };
1813
1938
  const useMessageContext = () => {
@@ -1818,6 +1943,18 @@ const useMessageContext = () => {
1818
1943
  return context;
1819
1944
  };
1820
1945
 
1946
+ /**
1947
+ * This hook is used to highlight each item in the message template by extending its style.
1948
+ * */
1949
+ function useHighlightStyle(raw) {
1950
+ const { highlight } = useMessageContext();
1951
+ return {
1952
+ className: (highlight === null || highlight === void 0 ? void 0 : highlight.getContainerClassName) ? highlight.getContainerClassName(raw) : undefined,
1953
+ style: (highlight === null || highlight === void 0 ? void 0 : highlight.getContainerInlineStyle) ? highlight.getContainerInlineStyle(raw) : undefined,
1954
+ renderText: (highlight === null || highlight === void 0 ? void 0 : highlight.renderText) ? highlight.renderText : (it) => it,
1955
+ };
1956
+ }
1957
+
1821
1958
  /**
1822
1959
  * Preserves a reference to the given callback function as an argument while the component is mounted.
1823
1960
  * Wraps the given callback in React's Ref to preserve the reference.
@@ -2023,28 +2160,13 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
2023
2160
  }
2024
2161
  return t;
2025
2162
  };
2026
- const hasValidUrlProtocol = (url = '') => ['http://', 'https://', 'ftp://'].some((protocol) => url.startsWith(protocol));
2027
- /**
2028
- * @param url - url to be checked
2029
- * @returns url with http:// protocol if it doesn't have any protocol
2030
- * @example
2031
- * returnUrl('www.sendbird.com') // returns 'http://www.sendbird.com'
2032
- * returnUrl('https://www.sendbird.com') // returns 'https://www.sendbird.com'
2033
- * returnUrl('ftp://www.sendbird.com') // returns 'ftp://www.sendbird.com'
2034
- * returnUrl('sendbird.com') // returns 'https://sendbird.com'
2035
- **/
2036
- const returnUrl = (url = '') => {
2037
- if (hasValidUrlProtocol(url)) {
2038
- return url;
2039
- }
2040
- return `https://${url}`;
2041
- };
2042
2163
  // todo: semantic html here is not perfect, need to revisit. Same for Button
2043
- const ActionHandler = ({ children, props, className, style }) => {
2164
+ const ActionHandler = ({ children, props, className, style, inlineStyle }) => {
2044
2165
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2045
2166
  const { recalculatedStyle, elemRef } = useRecalculateWidth({ style, props });
2046
2167
  const { message, handleWebAction, handleCustomAction, handlePredefinedAction } = useMessageContext();
2047
2168
  const borderClass = ((_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.borderWidth) ? 'sb-message-template__border' : '';
2169
+ const actionClass = props.action ? 'sb-message-template__action' : '';
2048
2170
  const paddingStyles = {
2049
2171
  paddingBlockStart: (_c = (_b = props.viewStyle) === null || _b === void 0 ? void 0 : _b.padding) === null || _c === void 0 ? void 0 : _c.top,
2050
2172
  paddingBlockEnd: (_e = (_d = props.viewStyle) === null || _d === void 0 ? void 0 : _d.padding) === null || _e === void 0 ? void 0 : _e.bottom,
@@ -2058,7 +2180,7 @@ const ActionHandler = ({ children, props, className, style }) => {
2058
2180
  handleWebAction(e, props.action, message);
2059
2181
  }
2060
2182
  else {
2061
- (_c = window === null || window === void 0 ? void 0 : window.open(returnUrl((_b = props === null || props === void 0 ? void 0 : props.action) === null || _b === void 0 ? void 0 : _b.data), '_blank', 'noopener noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();
2183
+ (_c = window === null || window === void 0 ? void 0 : window.open(getValidURL((_b = props === null || props === void 0 ? void 0 : props.action) === null || _b === void 0 ? void 0 : _b.data), '_blank', 'noopener noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();
2062
2184
  }
2063
2185
  }
2064
2186
  else if (((_d = props.action) === null || _d === void 0 ? void 0 : _d.type) === 'custom') {
@@ -2066,7 +2188,7 @@ const ActionHandler = ({ children, props, className, style }) => {
2066
2188
  handleCustomAction(e, props.action, message);
2067
2189
  }
2068
2190
  else {
2069
- (_f = window === null || window === void 0 ? void 0 : window.open(returnUrl((_e = props === null || props === void 0 ? void 0 : props.action) === null || _e === void 0 ? void 0 : _e.data), '_blank', 'noopener noreferrer')) === null || _f === void 0 ? void 0 : _f.focus();
2191
+ (_f = window === null || window === void 0 ? void 0 : window.open(getValidURL((_e = props === null || props === void 0 ? void 0 : props.action) === null || _e === void 0 ? void 0 : _e.data), '_blank', 'noopener noreferrer')) === null || _f === void 0 ? void 0 : _f.focus();
2070
2192
  }
2071
2193
  }
2072
2194
  else if (((_g = props.action) === null || _g === void 0 ? void 0 : _g.type) === 'uikit') {
@@ -2074,135 +2196,86 @@ const ActionHandler = ({ children, props, className, style }) => {
2074
2196
  }
2075
2197
  };
2076
2198
  if (props.type === ComponentType.TextButton) {
2077
- return (React__default.default.createElement("button", { className: clx(className, borderClass), "data-sb-template-id": props.elementId, style: Object.assign(Object.assign({}, style), paddingStyles), onClick: onClick }, children));
2199
+ return (React__default.default.createElement("button", { className: clx(className, borderClass, actionClass), "data-sb-template-id": props.elementId, style: Object.assign(Object.assign(Object.assign({}, style), paddingStyles), inlineStyle), onClick: onClick }, children));
2078
2200
  }
2079
2201
  const { display, flexDirection, justifyContent, alignItems, objectFit } = recalculatedStyle, wrapperStyles = __rest(recalculatedStyle, ["display", "flexDirection", "justifyContent", "alignItems", "objectFit"]);
2080
- return (React__default.default.createElement("div", { ref: elemRef, className: clx(className, borderClass, props.action && 'sb-message-template__action'), "data-sb-template-id": props.elementId, style: wrapperStyles, onClick: onClick },
2202
+ return (React__default.default.createElement("div", { ref: elemRef, className: clx(className, borderClass, actionClass), "data-sb-template-id": props.elementId, style: Object.assign(Object.assign({}, wrapperStyles), inlineStyle), onClick: onClick },
2081
2203
  React__default.default.createElement("div", { style: Object.assign({ display,
2082
2204
  flexDirection,
2083
2205
  justifyContent,
2084
2206
  alignItems,
2085
2207
  objectFit, width: '100%', height: '100%' }, paddingStyles) }, children)));
2086
2208
  };
2087
- function clx(...names) {
2088
- return names.filter((it) => !!it).join(' ');
2089
- }
2090
2209
 
2091
- /**
2092
- * Text that is fixed or fill parent should be wrapped in a div with max-width: 100% and max-height: 100%
2093
- * This is to prevent text from overflowing the padding of the container
2094
- */
2095
- function isFixedOrFill(view) {
2096
- var _a, _b, _c, _d;
2097
- const heightType = (_a = view === null || view === void 0 ? void 0 : view.height) === null || _a === void 0 ? void 0 : _a.type;
2098
- const widthType = (_b = view === null || view === void 0 ? void 0 : view.width) === null || _b === void 0 ? void 0 : _b.type;
2099
- const isFixedDiamension = heightType === 'fixed' || widthType === 'fixed';
2100
- const isFill = (heightType === 'flex' && ((_c = view === null || view === void 0 ? void 0 : view.height) === null || _c === void 0 ? void 0 : _c.value) === FlexSizeSpecValue.FillParent) ||
2101
- (widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
2102
- return isFixedDiamension || isFill;
2103
- }
2104
- function convertNewlinesToBr(text) {
2105
- return text.split('\n').map((line, index) => (React__default.default.createElement(React__default.default.Fragment, { key: index },
2106
- line,
2107
- React__default.default.createElement("br", null))));
2108
- }
2109
- function renderText(view) {
2110
- const { text, maxTextLines } = view;
2111
- const isToBeWrapped = isFixedOrFill(view);
2112
- const hasMaxLines = typeof maxTextLines === 'number' && maxTextLines > 0;
2113
- const convertedText = convertNewlinesToBr(text);
2114
- if (hasMaxLines || isToBeWrapped) {
2115
- const wrapperStyling = Object.assign(Object.assign({}, ((hasMaxLines || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
2116
- return (React__default.default.createElement("div", { style: wrapperStyling }, hasMaxLines ? React__default.default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
2117
- }
2118
- return hasMaxLines ? React__default.default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
2119
- }
2120
2210
  const renderer = createRenderer({
2121
2211
  views: {
2122
2212
  box(props) {
2123
- return (React__default.default.createElement(ActionHandler, { className: "sb-message-template__box", elementId: props.elementId, style: props.parsedProperties, props: props }, props.children));
2213
+ const highlight = useHighlightStyle(props.rawProperties);
2214
+ return (React__default.default.createElement(ActionHandler, { className: clx('sb-message-template__box', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props }, props.children));
2124
2215
  },
2125
2216
  text(props) {
2126
- return (React__default.default.createElement(ActionHandler, { className: "sb-message-template__text", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
2217
+ const highlight = useHighlightStyle(props.rawProperties);
2218
+ return (React__default.default.createElement(ActionHandler, { className: clx('sb-message-template__text', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props, highlight.renderText)));
2127
2219
  },
2128
2220
  image(props) {
2129
2221
  var _a;
2222
+ const highlight = useHighlightStyle(props.rawProperties);
2130
2223
  // todo: add image backup
2131
- return (React__default.default.createElement(ActionHandler, { className: "sb-message-template__image-container", elementId: props.elementId, style: props.parsedProperties, props: props },
2132
- React__default.default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
2224
+ return (React__default.default.createElement(ActionHandler, { className: clx('sb-message-template__image-container', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props },
2225
+ React__default.default.createElement(RMTImage, { className: 'sb-message-template__image', alt: 'image', src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
2133
2226
  },
2134
2227
  textButton(props) {
2135
- return (React__default.default.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(Object.assign({ maxTextLines: defaultProperties.textButton.maxTextLines }, props))));
2228
+ const highlight = useHighlightStyle(props.rawProperties);
2229
+ return (React__default.default.createElement(ActionHandler, { className: clx('sb-message-template__text-button', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(Object.assign({ maxTextLines: defaultProperties.textButton.maxTextLines }, props), highlight.renderText)));
2136
2230
  },
2137
2231
  imageButton(props) {
2138
2232
  var _a;
2139
- return (React__default.default.createElement(ActionHandler, { className: "sb-message-template__image-container sb-message-template__image-button", elementId: props.elementId, style: props.parsedProperties, props: props },
2140
- React__default.default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image-button", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
2233
+ const highlight = useHighlightStyle(props.rawProperties);
2234
+ return (React__default.default.createElement(ActionHandler, { className: clx('sb-message-template__image-container', 'sb-message-template__image-button', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props },
2235
+ React__default.default.createElement(RMTImage, { className: 'sb-message-template__image', alt: 'image-button', src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
2141
2236
  },
2142
2237
  carouselView(props) {
2143
2238
  var _a, _b;
2144
- return (React__default.default.createElement(Carousel, { maxChildWidth: (_a = props.carouselStyle) === null || _a === void 0 ? void 0 : _a.maxChildWidth, spacing: (_b = props.carouselStyle) === null || _b === void 0 ? void 0 : _b.spacing, style: props.parsedProperties }, props.children));
2239
+ const highlight = useHighlightStyle(props.rawProperties);
2240
+ return (React__default.default.createElement(RMTCarousel, { className: clx('sb-message-template__carousel', highlight.className), inlineStyle: highlight.style, maxChildWidth: (_a = props.carouselStyle) === null || _a === void 0 ? void 0 : _a.maxChildWidth, spacing: (_b = props.carouselStyle) === null || _b === void 0 ? void 0 : _b.spacing, style: props.parsedProperties }, props.children));
2145
2241
  },
2146
2242
  },
2147
2243
  });
2148
- const parser = createParser({
2149
- mapBoxProps(props, options) {
2150
- const styles = getDefaultStyles();
2151
- setViewProps(styles, props, options);
2152
- setAlign(styles, props.layout, props.align);
2153
- return styles;
2154
- },
2155
- mapTextProps(props, options) {
2156
- var _a;
2157
- const styles = getDefaultStyles({ whiteSpace: 'pre-line', wordBreak: 'break-word' });
2158
- // Better not set flex 1 to text
2159
- setViewProps(styles, props, options);
2160
- setTextStyle(styles, props, options);
2161
- setAlign(styles, Layout.Row, props.align);
2162
- setTextAlign(styles, (_a = props.align) === null || _a === void 0 ? void 0 : _a.horizontal);
2163
- return styles;
2164
- },
2165
- mapImageProps(props, options) {
2166
- const styles = getDefaultStyles();
2167
- setViewProps(styles, props, options);
2168
- setImageStyle(styles, props.imageStyle);
2169
- setImageAspectRatio(styles, props);
2170
- return styles;
2171
- },
2172
- mapTextButtonProps(props, options) {
2173
- const styles = getDefaultStyles({ whiteSpace: 'pre-line', alignItems: 'center', justifyContent: 'center' });
2174
- setViewProps(styles, props, options);
2175
- setTextStyle(styles, props, options);
2176
- return styles;
2177
- },
2178
- mapImageButtonProps(props, options) {
2179
- const styles = getDefaultStyles();
2180
- setViewProps(styles, props, options);
2181
- setImageStyle(styles, props.imageStyle);
2182
- setImageAspectRatio(styles, props);
2183
- return styles;
2184
- },
2185
- mapCarouselProps(props, options) {
2186
- var _a, _b, _c, _d, _e, _f, _g, _h;
2187
- const styles = getDefaultStyles();
2188
- setViewProps(styles, props, options);
2189
- styles['paddingBlockStart'] = (_b = (_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.padding) === null || _b === void 0 ? void 0 : _b.top;
2190
- styles['paddingBlockEnd'] = (_d = (_c = props.viewStyle) === null || _c === void 0 ? void 0 : _c.padding) === null || _d === void 0 ? void 0 : _d.bottom;
2191
- styles['paddingInlineStart'] = (_f = (_e = props.viewStyle) === null || _e === void 0 ? void 0 : _e.padding) === null || _f === void 0 ? void 0 : _f.left;
2192
- styles['paddingInlineEnd'] = (_h = (_g = props.viewStyle) === null || _g === void 0 ? void 0 : _g.padding) === null || _h === void 0 ? void 0 : _h.right;
2193
- return styles;
2194
- },
2195
- });
2244
+ function convertNewlinesToBr(text, highlightText) {
2245
+ return text.split('\n').map((line, index) => (React__default.default.createElement(React__default.default.Fragment, { key: index },
2246
+ highlightText(line),
2247
+ React__default.default.createElement("br", null))));
2248
+ }
2249
+ function renderText(view, highlightText) {
2250
+ const { text, maxTextLines } = view;
2251
+ const isToBeWrapped = isFixedOrFill(view);
2252
+ const hasMaxLines = typeof maxTextLines === 'number' && maxTextLines > 0;
2253
+ const convertedText = convertNewlinesToBr(text, highlightText);
2254
+ if (hasMaxLines || isToBeWrapped) {
2255
+ const wrapperStyling = Object.assign(Object.assign({}, ((hasMaxLines || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
2256
+ return (React__default.default.createElement("div", { style: wrapperStyling }, hasMaxLines ? React__default.default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
2257
+ }
2258
+ return hasMaxLines ? React__default.default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
2259
+ }
2260
+ /**
2261
+ * Text that is fixed or fill parent should be wrapped in a div with max-width: 100% and max-height: 100%
2262
+ * This is to prevent text from overflowing the padding of the container
2263
+ */
2264
+ function isFixedOrFill(view) {
2265
+ var _a, _b, _c, _d;
2266
+ const heightType = (_a = view === null || view === void 0 ? void 0 : view.height) === null || _a === void 0 ? void 0 : _a.type;
2267
+ const widthType = (_b = view === null || view === void 0 ? void 0 : view.width) === null || _b === void 0 ? void 0 : _b.type;
2268
+ const isFixedDimension = heightType === 'fixed' || widthType === 'fixed';
2269
+ const isFill = (heightType === 'flex' && ((_c = view === null || view === void 0 ? void 0 : view.height) === null || _c === void 0 ? void 0 : _c.value) === FlexSizeSpecValue.FillParent) ||
2270
+ (widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
2271
+ return isFixedDimension || isFill;
2272
+ }
2273
+
2196
2274
  createMessageTemplate({
2197
2275
  renderer,
2198
2276
  parser,
2199
2277
  Container: ({ children, className }) => {
2200
- return (React__default.default.createElement("div", { className: `sb-message-template__parent ${className}`, style: {
2201
- display: 'flex',
2202
- flexDirection: 'column',
2203
- maxWidth: 400,
2204
- marginBlockEnd: 24,
2205
- } }, children));
2278
+ return (React__default.default.createElement("div", { className: `sb-message-template__parent ${className}`, style: { display: 'flex', flexDirection: 'column', maxWidth: 400, marginBlockEnd: 24 } }, children));
2206
2279
  },
2207
2280
  });
2208
2281
 
@@ -2224,4 +2297,4 @@ function MessageTemplate(_a) {
2224
2297
 
2225
2298
  exports.MessageProvider = MessageProvider;
2226
2299
  exports.MessageTemplate = MessageTemplate;
2227
- //# sourceMappingURL=bundle-48-ANevp.js.map
2300
+ //# sourceMappingURL=bundle-CfXO3dEz.js.map