@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
@@ -121,7 +121,7 @@ const outCarouselStyle = (carouselstyle) => {
121
121
  if (!carouselstyle)
122
122
  return {};
123
123
  return {
124
- carouselStyle: Object.assign(Object.assign({}, carouselstyle), outSingle('spacing', carouselstyle)),
124
+ carouselStyle: Object.assign(Object.assign(Object.assign({}, carouselstyle), outSingle('spacing', carouselstyle)), outSingle('maxChildWidth', carouselstyle)),
125
125
  };
126
126
  };
127
127
  const outViewProps = (view) => {
@@ -168,28 +168,15 @@ const createParser = (params) => {
168
168
  mapCarouselProps: (params === null || params === void 0 ? void 0 : params.mapCarouselProps) || defaultMapper,
169
169
  };
170
170
  const transforms = [colorTransform, numberTransform, ...((_a = params === null || params === void 0 ? void 0 : params.transforms) !== null && _a !== void 0 ? _a : [])];
171
- const transformDirty = new Set();
172
171
  return {
173
172
  setTransforms(newTransforms) {
174
173
  transforms.length = 0;
175
174
  transforms.push(...newTransforms);
176
- transformDirty.clear();
177
175
  },
178
176
  addTransforms(newTransforms) {
179
177
  transforms.push(...newTransforms);
180
178
  },
181
179
  parse(rawItem, options) {
182
- // Note: it is for mutable transforms
183
- // const uniqId =
184
- // typeof options.depth === 'number' && typeof options.elemIdx === 'number'
185
- // ? `id-${options.depth}-${options.elemIdx}`
186
- // : rawItem.id ?? rawItem.elementId ?? JSON.stringify(rawItem);
187
- //
188
- // let item = rawItem;
189
- // if (!transformDirty.has(uniqId)) {
190
- // item = transforms.reduce((it, transform) => transform(it), rawItem);
191
- // transformDirty.add(uniqId);
192
- // }
193
180
  const item = transforms.reduce((it, transform) => transform.run(it), rawItem);
194
181
  switch (item.type) {
195
182
  case ComponentType.Box: {
@@ -376,14 +363,15 @@ const createMessageTemplate = (opts) => {
376
363
  if (!isTemplateVersionSupported(templateVersion)) {
377
364
  throw new Error(`Cannot parse template item due to unsupported template version: ${templateVersion}, ${SUPPORTED_TEMPLATE_VERSIONS}`);
378
365
  }
379
- return (React__default.createElement(React__default.Fragment, null, templateItems.map((rawItem, index, siblings) => {
380
- const result = parser.parse(rawItem, { parentLayout, depth, elemIdx: index, siblings });
366
+ return (React__default.createElement(React__default.Fragment, null, templateItems.map((rawProperties, index, siblings) => {
367
+ const result = parser.parse(rawProperties, { parentLayout, depth, elemIdx: index, siblings });
381
368
  const item = result.transformed;
382
369
  const rendererProps = {
383
370
  key: index,
384
371
  siblings,
385
372
  parentLayout,
386
373
  parsedProperties: result.properties,
374
+ rawProperties,
387
375
  };
388
376
  switch (item.type) {
389
377
  case ComponentType.Carousel: {
@@ -419,7 +407,7 @@ const createMessageTemplate = (opts) => {
419
407
  MessageTemplate: ({ templateVersion, templateItems, parentLayout = defaultProperties.rootLayout, }) => {
420
408
  const items = setTemplateItemId(templateItems);
421
409
  return (React__default.createElement(SizeContextProvider, null,
422
- React__default.createElement(Container, null,
410
+ React__default.createElement(Container, { className: 'sb-message-template__parent' },
423
411
  React__default.createElement(MessageTemplateBase, { isRoot: true, parentLayout: parentLayout, templateItems: items, templateVersion: templateVersion }))));
424
412
  },
425
413
  MessageTemplateBase,
@@ -1284,11 +1272,276 @@ var ActionType;
1284
1272
  },
1285
1273
  });
1286
1274
 
1275
+ function isWrappedText(view) {
1276
+ var _a;
1277
+ return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
1278
+ }
1279
+ // Compares the size spec to the option and returns whether they are equal or not.
1280
+ const isSizeCompatibleWithOption = ({ size, option, }) => {
1281
+ if (option === 'wrap') {
1282
+ return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
1283
+ }
1284
+ if (option === 'fill') {
1285
+ return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
1286
+ }
1287
+ return size.type === 'fixed';
1288
+ };
1289
+ const isGif = (url) => {
1290
+ var _a;
1291
+ if (typeof url !== 'string')
1292
+ return false;
1293
+ const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
1294
+ return extension === 'gif';
1295
+ };
1296
+ const clx = (...names) => {
1297
+ return names.filter((it) => !!it).join(' ');
1298
+ };
1299
+ const hasValidURLProtocol = (url = '') => {
1300
+ return ['http://', 'https://', 'ftp://'].some((protocol) => url.startsWith(protocol));
1301
+ };
1302
+ /**
1303
+ * @param url - url to be checked
1304
+ * @returns url with http:// protocol if it doesn't have any protocol
1305
+ * @example
1306
+ * returnUrl('www.sendbird.com') // returns 'http://www.sendbird.com'
1307
+ * returnUrl('https://www.sendbird.com') // returns 'https://www.sendbird.com'
1308
+ * returnUrl('ftp://www.sendbird.com') // returns 'ftp://www.sendbird.com'
1309
+ * returnUrl('sendbird.com') // returns 'https://sendbird.com'
1310
+ **/
1311
+ const getValidURL = (url = '') => {
1312
+ if (hasValidURLProtocol(url))
1313
+ return url;
1314
+ return `https://${url}`;
1315
+ };
1316
+
1317
+ function getDefaultStyles(overrides) {
1318
+ return Object.assign({ display: 'flex', overflow: 'hidden', boxSizing: 'border-box' }, overrides);
1319
+ }
1320
+ function setViewProps(styles, props, options) {
1321
+ setViewSize(styles, props, options);
1322
+ setViewStyle(styles, props);
1323
+ }
1324
+ function setBorderStyle(styles, borderWidth, borderColor, radius) {
1325
+ if (borderWidth) {
1326
+ styles['--border-width'] = `${borderWidth}px`;
1327
+ styles['--border-color'] = borderColor || 'transparent';
1328
+ }
1329
+ if (radius) {
1330
+ styles['borderRadius'] = radius;
1331
+ styles['--border-radius'] = `${radius}px`;
1332
+ }
1333
+ }
1334
+ function setViewStyle(styles, props) {
1335
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1336
+ const { viewStyle } = props;
1337
+ styles['marginBlockStart'] = (_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top;
1338
+ styles['marginBlockEnd'] = (_b = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _b === void 0 ? void 0 : _b.bottom;
1339
+ styles['marginInlineStart'] = (_c = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _c === void 0 ? void 0 : _c.left;
1340
+ styles['marginInlineEnd'] = (_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right;
1341
+ 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);
1342
+ if (marginHorizontal > 0 && styles.width === '100%')
1343
+ styles.width = `calc(100% - ${marginHorizontal}px)`;
1344
+ if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
1345
+ styles['backgroundColor'] = viewStyle.backgroundColor;
1346
+ // use JSON.stringify to escape special characters in image URL
1347
+ if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundImageUrl) {
1348
+ styles['backgroundImage'] = `url(${JSON.stringify(viewStyle.backgroundImageUrl)})`;
1349
+ styles['backgroundSize'] = '100% 100%';
1350
+ styles['backgroundPosition'] = 'center';
1351
+ }
1352
+ 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);
1353
+ }
1354
+ function getViewSizeStyle(width, height, parentLayout) {
1355
+ const style = {};
1356
+ if (width.type === 'flex' && width.value == FlexSizeSpecValue.FillParent) {
1357
+ style['width'] = '100%';
1358
+ if (parentLayout === Layout.Row) {
1359
+ style['flex'] = 1;
1360
+ }
1361
+ }
1362
+ else if (width.type === 'flex' && width.value == FlexSizeSpecValue.WrapContent) {
1363
+ style['width'] = 'fit-content';
1364
+ if (parentLayout === Layout.Row) {
1365
+ style['flexShrink'] = 0;
1366
+ }
1367
+ }
1368
+ else if (width.type === 'fixed' && width.value >= 0) {
1369
+ style['width'] = width.value;
1370
+ if (parentLayout === Layout.Row) {
1371
+ style['flexShrink'] = 0;
1372
+ }
1373
+ }
1374
+ if (height.type === 'flex' && height.value == FlexSizeSpecValue.FillParent) {
1375
+ style['height'] = '100%';
1376
+ if (parentLayout === Layout.Column) {
1377
+ style['flex'] = 1;
1378
+ }
1379
+ }
1380
+ else if (height.type === 'flex' && height.value == FlexSizeSpecValue.WrapContent) {
1381
+ style['height'] = 'fit-content';
1382
+ if (parentLayout === Layout.Column) {
1383
+ style['flexShrink'] = 0;
1384
+ }
1385
+ }
1386
+ else if (height.type === 'fixed' && height.value >= 0) {
1387
+ style['height'] = height.value;
1388
+ if (parentLayout === Layout.Column) {
1389
+ style['flexShrink'] = 0;
1390
+ }
1391
+ }
1392
+ return style;
1393
+ }
1394
+ function setViewSize(styles, props, options) {
1395
+ var _a, _b;
1396
+ const { width: defaultWidth, height: defaultHeight } = defaultProperties.view.size;
1397
+ const { parentLayout } = options;
1398
+ const sizeStyle = getViewSizeStyle((_a = props.width) !== null && _a !== void 0 ? _a : defaultWidth, (_b = props.height) !== null && _b !== void 0 ? _b : defaultHeight, parentLayout);
1399
+ Object.assign(styles, sizeStyle);
1400
+ }
1401
+ function setAlign(styles, layout = defaultProperties.box.layout, align = defaultProperties.box.align) {
1402
+ if (layout === Layout.Row) {
1403
+ styles['flexDirection'] = 'row';
1404
+ styles['alignItems'] = alignInFlex(align.vertical);
1405
+ styles['justifyContent'] = alignInFlex(align.horizontal);
1406
+ }
1407
+ if (layout === Layout.Column) {
1408
+ styles['flexDirection'] = 'column';
1409
+ styles['alignItems'] = alignInFlex(align.horizontal);
1410
+ styles['justifyContent'] = alignInFlex(align.vertical);
1411
+ }
1412
+ }
1413
+ function setTextAlign(styles, align = defaultProperties.box.align.horizontal) {
1414
+ switch (align) {
1415
+ case AlignValue.Left:
1416
+ styles.textAlign = 'start';
1417
+ break;
1418
+ case AlignValue.Right:
1419
+ styles.textAlign = 'end';
1420
+ break;
1421
+ case AlignValue.Center:
1422
+ styles.textAlign = 'center';
1423
+ break;
1424
+ default:
1425
+ styles.textAlign = 'start';
1426
+ break;
1427
+ }
1428
+ }
1429
+ function setImageStyle(styles, imageStyle) {
1430
+ const { contentMode = MediaContentMode.AspectFit } = imageStyle || {};
1431
+ if (contentMode) {
1432
+ switch (contentMode) {
1433
+ case MediaContentMode.AspectFill:
1434
+ styles['objectFit'] = 'cover';
1435
+ break;
1436
+ case MediaContentMode.AspectFit:
1437
+ styles['objectFit'] = 'contain';
1438
+ break;
1439
+ case MediaContentMode.ScalesToFill:
1440
+ styles['objectFit'] = 'fill';
1441
+ break;
1442
+ }
1443
+ }
1444
+ }
1445
+ // uses image meta-data to render images that doesn't break the UI
1446
+ // https://sendbird.atlassian.net/wiki/spaces/UK/pages/2008220608/Message+template+-+Image+policy
1447
+ function setImageAspectRatio(styles, props) {
1448
+ var _a, _b, _c, _d;
1449
+ const imageMetaData = props === null || props === void 0 ? void 0 : props.metaData;
1450
+ if (!(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelHeight) || !(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelWidth)) {
1451
+ return;
1452
+ }
1453
+ 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') {
1454
+ return;
1455
+ }
1456
+ 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}`;
1457
+ }
1458
+ function webkitLineClampStyles(numberOfLines) {
1459
+ return {
1460
+ WebkitLineClamp: numberOfLines,
1461
+ WebkitBoxOrient: 'vertical',
1462
+ display: '-webkit-box',
1463
+ overflow: 'hidden',
1464
+ overflowWrap: 'anywhere',
1465
+ flex: 1,
1466
+ };
1467
+ }
1468
+ function setTextStyle(styles, props, options) {
1469
+ const { textStyle, width } = props;
1470
+ // TODO: Change default as design
1471
+ const { size, color, weight } = textStyle || {};
1472
+ if (size)
1473
+ styles['fontSize'] = size;
1474
+ if (color)
1475
+ styles['color'] = color;
1476
+ if (weight)
1477
+ styles['fontWeight'] = weight;
1478
+ if ((width === null || width === void 0 ? void 0 : width.type) === 'flex' && (width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
1479
+ styles['width'] = 'fit-content';
1480
+ styles['maxWidth'] = '100%';
1481
+ }
1482
+ if (props.type === ComponentType.Text) {
1483
+ const { siblings, elemIdx } = options;
1484
+ // To push out any subsequent components from the container,
1485
+ // if a prior one is long enough to occupy an entire line
1486
+ // @link https://sendbird.atlassian.net/browse/NOTI-709
1487
+ if (siblings != null && siblings.length >= 2 && siblings.every(isWrappedText)) {
1488
+ styles.flexShrink = siblings.length - 1 === elemIdx ? 1 : 0;
1489
+ }
1490
+ }
1491
+ }
1492
+
1493
+ const parser = createParser({
1494
+ mapBoxProps(props, options) {
1495
+ const styles = getDefaultStyles();
1496
+ setViewProps(styles, props, options);
1497
+ setAlign(styles, props.layout, props.align);
1498
+ return styles;
1499
+ },
1500
+ mapTextProps(props, options) {
1501
+ var _a;
1502
+ const styles = getDefaultStyles({ whiteSpace: 'pre-line', wordBreak: 'break-word' });
1503
+ // Better not set flex 1 to text
1504
+ setViewProps(styles, props, options);
1505
+ setTextStyle(styles, props, options);
1506
+ setAlign(styles, Layout.Row, props.align);
1507
+ setTextAlign(styles, (_a = props.align) === null || _a === void 0 ? void 0 : _a.horizontal);
1508
+ return styles;
1509
+ },
1510
+ mapImageProps(props, options) {
1511
+ const styles = getDefaultStyles();
1512
+ setViewProps(styles, props, options);
1513
+ setImageStyle(styles, props.imageStyle);
1514
+ setImageAspectRatio(styles, props);
1515
+ return styles;
1516
+ },
1517
+ mapTextButtonProps(props, options) {
1518
+ const styles = getDefaultStyles({ whiteSpace: 'pre-line', alignItems: 'center', justifyContent: 'center' });
1519
+ setViewProps(styles, props, options);
1520
+ setTextStyle(styles, props, options);
1521
+ return styles;
1522
+ },
1523
+ mapImageButtonProps(props, options) {
1524
+ const styles = getDefaultStyles();
1525
+ setViewProps(styles, props, options);
1526
+ setImageStyle(styles, props.imageStyle);
1527
+ setImageAspectRatio(styles, props);
1528
+ return styles;
1529
+ },
1530
+ mapCarouselProps(props, options) {
1531
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1532
+ const styles = getDefaultStyles();
1533
+ setViewProps(styles, props, options);
1534
+ styles['paddingBlockStart'] = (_b = (_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.padding) === null || _b === void 0 ? void 0 : _b.top;
1535
+ styles['paddingBlockEnd'] = (_d = (_c = props.viewStyle) === null || _c === void 0 ? void 0 : _c.padding) === null || _d === void 0 ? void 0 : _d.bottom;
1536
+ styles['paddingInlineStart'] = (_f = (_e = props.viewStyle) === null || _e === void 0 ? void 0 : _e.padding) === null || _f === void 0 ? void 0 : _f.left;
1537
+ styles['paddingInlineEnd'] = (_h = (_g = props.viewStyle) === null || _g === void 0 ? void 0 : _g.padding) === null || _h === void 0 ? void 0 : _h.right;
1538
+ return styles;
1539
+ },
1540
+ });
1541
+
1287
1542
  const SWIPE_THRESHOLD = 24;
1543
+ const CLICK_THRESHOLD = 5;
1288
1544
  function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlineEnd }) {
1289
- // TODO: RTL support
1290
- const paddingStart = paddingInlineStart;
1291
- const paddingEnd = paddingInlineEnd;
1292
1545
  const carouselRef = useRef(null);
1293
1546
  const childrenRefs = useRef(Array.from({ length: childrenLength }, () => React__default.createRef()));
1294
1547
  const isDragging = useRef(false);
@@ -1300,22 +1553,32 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1300
1553
  offset: 0,
1301
1554
  translateX: 0,
1302
1555
  currentIndex: 0,
1556
+ didMove: false,
1303
1557
  });
1304
1558
  const [childWidths, setChildWidths] = useState(() => childrenRefs.current.map(() => 0));
1559
+ const [isRTL, setIsRTL] = useState(false);
1560
+ const directionMultiplier = isRTL ? -1 : 1;
1305
1561
  const itemPositions = useMemo(() => {
1306
- let currentPosition = paddingStart;
1562
+ let currentPosition = paddingInlineStart;
1307
1563
  return childWidths.map((width, i) => {
1308
- const start = currentPosition - (i > 0 ? spacing : 0);
1564
+ const spacingOffset = i > 0 ? spacing : 0;
1565
+ const start = currentPosition - spacingOffset;
1309
1566
  const end = start - width;
1310
1567
  currentPosition = end;
1311
1568
  return { start, end };
1312
1569
  });
1313
- }, [childWidths, spacing, paddingStart]);
1570
+ }, [childWidths, spacing, paddingInlineStart]);
1314
1571
  const totalContentWidth = useMemo(() => {
1315
1572
  const totalItemWidth = childWidths.reduce((acc, width) => acc + width, 0);
1316
1573
  const totalSpacing = spacing * (childrenLength - 1);
1317
1574
  return totalItemWidth + totalSpacing;
1318
1575
  }, [childWidths, spacing, childrenLength]);
1576
+ useLayoutEffect(() => {
1577
+ if (carouselRef.current) {
1578
+ const dir = getComputedStyle(carouselRef.current).direction;
1579
+ setIsRTL(dir === 'rtl');
1580
+ }
1581
+ }, []);
1319
1582
  useLayoutEffect(() => {
1320
1583
  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; }));
1321
1584
  }, [childrenLength]);
@@ -1359,9 +1622,9 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1359
1622
  function clampTranslateX(translateX) {
1360
1623
  var _a, _b;
1361
1624
  const containerWidth = (_b = (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
1362
- const start = paddingStart;
1363
- const end = Math.min(0, containerWidth - totalContentWidth) - paddingEnd;
1364
- return Math.min(start, Math.max(end, translateX));
1625
+ const start = paddingInlineStart;
1626
+ const end = Math.min(0, containerWidth - totalContentWidth) - paddingInlineEnd;
1627
+ return Math.min(start, Math.max(translateX, end));
1365
1628
  }
1366
1629
  drag.current.currentIndex = newIndex;
1367
1630
  drag.current.translateX = clampTranslateX(itemPositions[newIndex].start);
@@ -1375,7 +1638,8 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1375
1638
  };
1376
1639
  const animate = () => {
1377
1640
  if (carouselRef.current) {
1378
- carouselRef.current.style.transform = `translateX(${drag.current.translateX + drag.current.offset}px)`;
1641
+ const tx = (drag.current.translateX + drag.current.offset) * directionMultiplier;
1642
+ carouselRef.current.style.transform = `translateX(${tx}px)`;
1379
1643
  }
1380
1644
  if (animationFrame.current) {
1381
1645
  animationFrame.current = requestAnimationFrame(animate);
@@ -1397,26 +1661,38 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1397
1661
  drag.current.sx = event.clientX;
1398
1662
  drag.current.sy = event.clientY;
1399
1663
  drag.current.offset = 0;
1664
+ drag.current.didMove = false;
1400
1665
  animationFrame.current = requestAnimationFrame(animate);
1401
1666
  };
1402
1667
  const onMouseMove = (event) => {
1403
1668
  if (!isDragging.current || drag.current.sx === null)
1404
1669
  return;
1405
- drag.current.offset = event.clientX - drag.current.sx;
1670
+ drag.current.offset = (event.clientX - drag.current.sx) * directionMultiplier;
1671
+ if (Math.abs(drag.current.offset) > CLICK_THRESHOLD) {
1672
+ drag.current.didMove = true;
1673
+ }
1406
1674
  };
1407
- const onMouseUp = () => {
1675
+ const onMouseUp = (event) => {
1408
1676
  if (!isDragging.current)
1409
1677
  return;
1410
1678
  scrollStop();
1411
1679
  dragRelease();
1412
1680
  dragStop();
1681
+ if (drag.current.didMove) {
1682
+ event.preventDefault();
1683
+ event.stopPropagation();
1684
+ }
1413
1685
  };
1414
- const onMouseLeave = () => {
1686
+ const onMouseLeave = (event) => {
1415
1687
  if (!isDragging.current)
1416
1688
  return;
1417
1689
  scrollStop();
1418
1690
  dragRelease();
1419
1691
  dragStop();
1692
+ if (drag.current.didMove) {
1693
+ event.preventDefault();
1694
+ event.stopPropagation();
1695
+ }
1420
1696
  };
1421
1697
  const onTouchStart = (event) => {
1422
1698
  scrollStop();
@@ -1425,6 +1701,7 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1425
1701
  drag.current.sx = touch.clientX;
1426
1702
  drag.current.sy = touch.clientY;
1427
1703
  drag.current.offset = 0;
1704
+ drag.current.didMove = false;
1428
1705
  animationFrame.current = requestAnimationFrame(animate);
1429
1706
  };
1430
1707
  const onTouchMove = (event) => {
@@ -1433,7 +1710,10 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1433
1710
  const { clientX, clientY } = event.touches[0];
1434
1711
  const { sx, sy } = drag.current;
1435
1712
  if (isDragging.current) {
1436
- drag.current.offset = clientX - sx;
1713
+ drag.current.offset = (clientX - sx) * directionMultiplier;
1714
+ if (Math.abs(drag.current.offset) > CLICK_THRESHOLD) {
1715
+ drag.current.didMove = true;
1716
+ }
1437
1717
  return;
1438
1718
  }
1439
1719
  const isVerticalScroll = Math.abs(clientY - sy) > Math.abs(clientX - sx);
@@ -1441,16 +1721,26 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1441
1721
  scrollStart();
1442
1722
  }
1443
1723
  else {
1444
- drag.current.offset = clientX - sx;
1724
+ drag.current.offset = (clientX - sx) * directionMultiplier;
1445
1725
  blockScroll();
1446
1726
  dragStart();
1447
1727
  }
1448
1728
  };
1449
- const onTouchEnd = () => {
1729
+ const onTouchEnd = (event) => {
1450
1730
  unblockScroll();
1451
1731
  scrollStop();
1452
1732
  dragRelease();
1453
1733
  dragStop();
1734
+ if (drag.current.didMove) {
1735
+ event.preventDefault();
1736
+ event.stopPropagation();
1737
+ }
1738
+ };
1739
+ const onClickCapture = (event) => {
1740
+ if (drag.current.didMove) {
1741
+ event.preventDefault();
1742
+ event.stopPropagation();
1743
+ }
1454
1744
  };
1455
1745
  return {
1456
1746
  carouselRef,
@@ -1463,6 +1753,7 @@ function useCarousel({ spacing, childrenLength, paddingInlineStart, paddingInlin
1463
1753
  onTouchStart,
1464
1754
  onTouchMove,
1465
1755
  onTouchEnd,
1756
+ onClickCapture,
1466
1757
  },
1467
1758
  };
1468
1759
  }
@@ -1478,52 +1769,32 @@ var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
1478
1769
  }
1479
1770
  return t;
1480
1771
  };
1481
- const Carousel = ({ children, style, spacing = defaultProperties.carousel.style.spacing, maxChildWidth = defaultProperties.carousel.style.maxChildWidth, }) => {
1482
- const _a = style !== null && style !== void 0 ? style : {}, { paddingInlineStart = 0, paddingInlineEnd = 0 } = _a, restStyle = __rest$4(_a, ["paddingInlineStart", "paddingInlineEnd"]);
1772
+ const RMTCarousel = (_a) => {
1773
+ var { children, style, spacing = defaultProperties.carousel.style.spacing, maxChildWidth = defaultProperties.carousel.style.maxChildWidth, inlineStyle } = _a, props = __rest$4(_a, ["children", "style", "spacing", "maxChildWidth", "inlineStyle"]);
1774
+ const _b = style !== null && style !== void 0 ? style : {}, { paddingInlineStart = 0, paddingInlineEnd = 0 } = _b, restStyle = __rest$4(_b, ["paddingInlineStart", "paddingInlineEnd"]);
1483
1775
  const { carouselRef, childrenRefs, handlers } = useCarousel({
1484
1776
  spacing,
1485
1777
  childrenLength: children.length,
1486
1778
  paddingInlineStart: Number(paddingInlineStart),
1487
1779
  paddingInlineEnd: Number(paddingInlineEnd),
1488
1780
  });
1489
- return (React__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.createElement(CarouselChild, { ref: childrenRefs.current[index], key: index, maxChildWidth: maxChildWidth }, item)))));
1781
+ return (React__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.createElement(RMTCarouselChild, { ref: childrenRefs.current[index], key: index, maxChildWidth: maxChildWidth }, item)))));
1490
1782
  };
1491
- const CarouselChild = React__default.forwardRef(function CarouselChild({ maxChildWidth, children }, ref) {
1783
+ const RMTCarouselChild = React__default.forwardRef(function CarouselChild({ maxChildWidth, children }, ref) {
1492
1784
  const maxWidth = shouldSetMaxChildWidth(children.props, maxChildWidth) ? maxChildWidth : 'fit-content';
1493
1785
  return (React__default.createElement("div", { ref: ref, style: { maxWidth, width: '100%', flexShrink: 0, overflow: 'hidden', userSelect: 'none' } }, children));
1494
1786
  });
1495
1787
  // Note: Set the maxChildWidth because it's impossible to determine the maximum width of items in the Carousel Child template when they have FillParent
1496
1788
  function shouldSetMaxChildWidth(props, maxChildWidth) {
1497
1789
  return !!props.templateItems.find((it) => {
1498
- var _a, _b, _c, _d;
1499
- 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;
1500
- 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;
1790
+ var _a;
1791
+ const width = (_a = it.width) !== null && _a !== void 0 ? _a : defaultProperties.view.size.width;
1792
+ const hasFillWidth = width.type === 'flex' && width.value === FlexSizeSpecValue.FillParent;
1793
+ const overMaxChildWidth = width.type === 'fixed' && width.value >= maxChildWidth;
1501
1794
  return hasFillWidth || overMaxChildWidth;
1502
1795
  });
1503
1796
  }
1504
1797
 
1505
- function isWrappedText(view) {
1506
- var _a;
1507
- return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
1508
- }
1509
- // Compares the size spec to the option and returns whether they are equal or not.
1510
- const isSizeCompatibleWithOption = ({ size, option, }) => {
1511
- if (option === 'wrap') {
1512
- return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
1513
- }
1514
- if (option === 'fill') {
1515
- return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
1516
- }
1517
- return size.type === 'fixed';
1518
- };
1519
- const isGif = (url) => {
1520
- var _a;
1521
- if (typeof url !== 'string')
1522
- return false;
1523
- const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
1524
- return extension === 'gif';
1525
- };
1526
-
1527
1798
  var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
1528
1799
  var t = {};
1529
1800
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -1535,7 +1806,7 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
1535
1806
  }
1536
1807
  return t;
1537
1808
  };
1538
- const CanvasReactMessageTemplateImage = (props) => {
1809
+ const RMTImageCanvas = (props) => {
1539
1810
  const { imageSize, canvasRef, canvasProps } = useCanvasMessageTemplateImage(props);
1540
1811
  return (React__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 })));
1541
1812
  };
@@ -1551,7 +1822,6 @@ const useCanvasMessageTemplateImage = (_a) => {
1551
1822
  }, [fallbackImageSize, metaData === null || metaData === void 0 ? void 0 : metaData.pixelHeight, metaData === null || metaData === void 0 ? void 0 : metaData.pixelWidth]);
1552
1823
  useEffect(() => {
1553
1824
  if (imageSize == null) {
1554
- console.log('Canvas_ReactMessageTemplateImage: no metaData, render fit to container');
1555
1825
  if (canvasRef.current) {
1556
1826
  canvasRef.current.style.width = '100%';
1557
1827
  canvasRef.current.style.height = '100%';
@@ -1574,234 +1844,89 @@ const useCanvasMessageTemplateImage = (_a) => {
1574
1844
  ctx.globalCompositeOperation = 'source-over';
1575
1845
  ctx.fillStyle = '#000';
1576
1846
  // draw
1577
- ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
1578
- ctx.globalCompositeOperation = 'source-atop';
1579
- ctx.fillStyle = tintColor;
1580
- ctx.fillRect(0, 0, imageWidth, imageHeight);
1581
- }
1582
- }
1583
- };
1584
- const onImageError = (event) => {
1585
- var _a;
1586
- // @ts-ignore
1587
- (_a = props.onError) === null || _a === void 0 ? void 0 : _a.call(props, event);
1588
- };
1589
- img.addEventListener('load', onImageLoad);
1590
- img.addEventListener('error', onImageError);
1591
- img.src = props.src;
1592
- return () => {
1593
- img.removeEventListener('load', onImageLoad);
1594
- img.removeEventListener('error', onImageError);
1595
- };
1596
- }
1597
- return;
1598
- }, [props.src, imageSize, tintColor]);
1599
- return {
1600
- canvasRef,
1601
- canvasProps: props,
1602
- imageSize,
1603
- };
1604
- };
1605
-
1606
- const ImgReactMessageTemplateImage = (props) => {
1607
- return React__default.createElement("img", Object.assign({}, props, { onError: props.onError, referrerPolicy: "no-referrer" }));
1608
- };
1609
-
1610
- const PlaceholderReactMessageTemplateImage = (props) => {
1611
- return React__default.createElement("div", { style: Object.assign(Object.assign({}, props.style), { backgroundColor: 'transparent' }) });
1612
- };
1613
-
1614
- var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
1615
- var t = {};
1616
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1617
- t[p] = s[p];
1618
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1619
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1620
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1621
- t[p[i]] = s[p[i]];
1622
- }
1623
- return t;
1624
- };
1625
- const ReactMessageTemplateImage = (_a) => {
1626
- var { tintColor, metaData } = _a, props = __rest$2(_a, ["tintColor", "metaData"]);
1627
- const { hasError, onError } = useImageLoadError(props.src);
1628
- if (props.onError)
1629
- console.warn('`onError` is intercepted and not executed in the ReactMessageTemplateImage.');
1630
- if (hasError) {
1631
- return React__default.createElement(PlaceholderReactMessageTemplateImage, Object.assign({}, props));
1632
- }
1633
- else if (tintColor && !isGif(props.src)) {
1634
- return React__default.createElement(CanvasReactMessageTemplateImage, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
1635
- }
1636
- else {
1637
- return React__default.createElement(ImgReactMessageTemplateImage, Object.assign({}, props, { onError: onError }));
1638
- }
1639
- };
1640
- const useImageLoadError = (source) => {
1641
- const [hasError, setHasError] = useState(false);
1642
- useEffect(() => setHasError(false), [source]);
1643
- return {
1644
- hasError,
1645
- onError: useCallback(() => setHasError(true), []),
1646
- };
1647
- };
1648
-
1649
- function getDefaultStyles(overrides) {
1650
- return Object.assign({ display: 'flex', overflow: 'hidden', boxSizing: 'border-box' }, overrides);
1651
- }
1652
- function setViewProps(styles, props, options) {
1653
- setViewSize(styles, props, options);
1654
- setViewStyle(styles, props);
1655
- }
1656
- function setBorderStyle(styles, borderWidth, borderColor, radius) {
1657
- if (borderWidth) {
1658
- styles['--border-width'] = `${borderWidth}px`;
1659
- styles['--border-color'] = borderColor || 'transparent';
1660
- }
1661
- if (radius) {
1662
- styles['borderRadius'] = radius;
1663
- styles['--border-radius'] = `${radius}px`;
1664
- }
1665
- }
1666
- function setViewStyle(styles, props) {
1667
- var _a, _b, _c, _d, _e, _f, _g, _h;
1668
- const { viewStyle } = props;
1669
- styles['marginBlockStart'] = (_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top;
1670
- styles['marginBlockEnd'] = (_b = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _b === void 0 ? void 0 : _b.bottom;
1671
- styles['marginInlineStart'] = (_c = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _c === void 0 ? void 0 : _c.left;
1672
- styles['marginInlineEnd'] = (_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right;
1673
- 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);
1674
- if (marginHorizontal > 0 && styles.width === '100%')
1675
- styles.width = `calc(100% - ${marginHorizontal}px)`;
1676
- if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
1677
- styles['backgroundColor'] = viewStyle.backgroundColor;
1678
- // use JSON.stringify to escape special characters in image URL
1679
- if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundImageUrl) {
1680
- styles['backgroundImage'] = `url(${JSON.stringify(viewStyle.backgroundImageUrl)})`;
1681
- styles['backgroundSize'] = '100% 100%';
1682
- styles['backgroundPosition'] = 'center';
1683
- }
1684
- 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);
1685
- }
1686
- function getViewSizeStyle(width, height, parentLayout) {
1687
- const style = {};
1688
- if (width.type === 'flex' && width.value == FlexSizeSpecValue.FillParent) {
1689
- style['width'] = '100%';
1690
- if (parentLayout === Layout.Row) {
1691
- style['flex'] = 1;
1692
- }
1693
- }
1694
- else if (width.type === 'fixed' && width.value >= 0) {
1695
- style['width'] = width.value;
1696
- }
1697
- if (height.type === 'flex' && height.value == FlexSizeSpecValue.FillParent) {
1698
- style['height'] = '100%';
1699
- if (parentLayout === Layout.Column) {
1700
- style['flex'] = 1;
1847
+ ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
1848
+ ctx.globalCompositeOperation = 'source-atop';
1849
+ ctx.fillStyle = tintColor;
1850
+ ctx.fillRect(0, 0, imageWidth, imageHeight);
1851
+ }
1852
+ }
1853
+ };
1854
+ const onImageError = (event) => {
1855
+ var _a;
1856
+ // @ts-ignore
1857
+ (_a = props.onError) === null || _a === void 0 ? void 0 : _a.call(props, event);
1858
+ };
1859
+ img.addEventListener('load', onImageLoad);
1860
+ img.addEventListener('error', onImageError);
1861
+ img.src = props.src;
1862
+ return () => {
1863
+ img.removeEventListener('load', onImageLoad);
1864
+ img.removeEventListener('error', onImageError);
1865
+ };
1701
1866
  }
1702
- }
1703
- else if (height.type === 'fixed' && height.value >= 0) {
1704
- style['height'] = height.value;
1705
- }
1706
- return style;
1707
- }
1708
- function setViewSize(styles, props, options) {
1709
- var _a, _b;
1710
- const { width: defaultWidth, height: defaultHeight } = defaultProperties.view.size;
1711
- const { parentLayout } = options;
1712
- const sizeStyle = getViewSizeStyle((_a = props.width) !== null && _a !== void 0 ? _a : defaultWidth, (_b = props.height) !== null && _b !== void 0 ? _b : defaultHeight, parentLayout);
1713
- Object.assign(styles, sizeStyle);
1714
- }
1715
- function setAlign(styles, layout = defaultProperties.box.layout, align = defaultProperties.box.align) {
1716
- if (layout === Layout.Row) {
1717
- styles['flexDirection'] = 'row';
1718
- styles['alignItems'] = alignInFlex(align.vertical);
1719
- styles['justifyContent'] = alignInFlex(align.horizontal);
1720
- }
1721
- if (layout === Layout.Column) {
1722
- styles['flexDirection'] = 'column';
1723
- styles['alignItems'] = alignInFlex(align.horizontal);
1724
- styles['justifyContent'] = alignInFlex(align.vertical);
1725
- }
1726
- }
1727
- function setTextAlign(styles, align = defaultProperties.box.align.horizontal) {
1728
- styles.textAlign = align;
1729
- }
1730
- function setImageStyle(styles, imageStyle) {
1731
- const { contentMode = MediaContentMode.AspectFit } = imageStyle || {};
1732
- if (contentMode) {
1733
- switch (contentMode) {
1734
- case MediaContentMode.AspectFill:
1735
- styles['objectFit'] = 'cover';
1736
- break;
1737
- case MediaContentMode.AspectFit:
1738
- styles['objectFit'] = 'contain';
1739
- break;
1740
- case MediaContentMode.ScalesToFill:
1741
- styles['objectFit'] = 'fill';
1742
- break;
1867
+ return;
1868
+ }, [props.src, imageSize, tintColor]);
1869
+ return {
1870
+ canvasRef,
1871
+ canvasProps: props,
1872
+ imageSize,
1873
+ };
1874
+ };
1875
+
1876
+ const RMTImageDefault = (props) => {
1877
+ return React__default.createElement("img", Object.assign({}, props, { onError: props.onError, draggable: false, referrerPolicy: "no-referrer" }));
1878
+ };
1879
+
1880
+ const RMTImagePlaceholder = (props) => {
1881
+ return React__default.createElement("div", { style: Object.assign(Object.assign({}, props.style), { backgroundColor: 'transparent' }) });
1882
+ };
1883
+
1884
+ var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
1885
+ var t = {};
1886
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1887
+ t[p] = s[p];
1888
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1889
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1890
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1891
+ t[p[i]] = s[p[i]];
1743
1892
  }
1893
+ return t;
1894
+ };
1895
+ const RMTImage = (_a) => {
1896
+ var { tintColor, metaData } = _a, props = __rest$2(_a, ["tintColor", "metaData"]);
1897
+ const { hasError, onError } = useImageLoadError(props.src);
1898
+ if (props.onError)
1899
+ console.warn('`onError` is intercepted and not executed in the ReactMessageTemplateImage.');
1900
+ if (hasError) {
1901
+ return React__default.createElement(RMTImagePlaceholder, Object.assign({}, props));
1744
1902
  }
1745
- }
1746
- // uses image meta-data to render images that doesn't break the UI
1747
- // https://sendbird.atlassian.net/wiki/spaces/UK/pages/2008220608/Message+template+-+Image+policy
1748
- function setImageAspectRatio(styles, props) {
1749
- var _a, _b, _c, _d;
1750
- const imageMetaData = props === null || props === void 0 ? void 0 : props.metaData;
1751
- if (!(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelHeight) || !(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelWidth)) {
1752
- return;
1903
+ else if (tintColor && !isGif(props.src)) {
1904
+ return React__default.createElement(RMTImageCanvas, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
1753
1905
  }
1754
- 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') {
1755
- return;
1906
+ else {
1907
+ return React__default.createElement(RMTImageDefault, Object.assign({}, props, { onError: onError }));
1756
1908
  }
1757
- 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}`;
1758
- }
1759
- function webkitLineClampStyles(numberOfLines) {
1909
+ };
1910
+ const useImageLoadError = (source) => {
1911
+ const [hasError, setHasError] = useState(false);
1912
+ useEffect(() => setHasError(false), [source]);
1760
1913
  return {
1761
- WebkitLineClamp: numberOfLines,
1762
- WebkitBoxOrient: 'vertical',
1763
- display: '-webkit-box',
1764
- overflow: 'hidden',
1765
- overflowWrap: 'anywhere',
1766
- flex: 1,
1914
+ hasError,
1915
+ onError: useCallback(() => setHasError(true), []),
1767
1916
  };
1768
- }
1769
- function setTextStyle(styles, props, options) {
1770
- const { textStyle, width } = props;
1771
- // TODO: Change default as design
1772
- const { size, color, weight } = textStyle || {};
1773
- if (size)
1774
- styles['fontSize'] = size;
1775
- if (color)
1776
- styles['color'] = color;
1777
- if (weight)
1778
- styles['fontWeight'] = weight;
1779
- if ((width === null || width === void 0 ? void 0 : width.type) === 'flex' && (width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
1780
- styles['width'] = 'fit-content';
1781
- styles['maxWidth'] = '100%';
1782
- }
1783
- if (props.type === ComponentType.Text) {
1784
- const { siblings, elemIdx } = options;
1785
- // To push out any subsequent components from the container,
1786
- // if a prior one is long enough to occupy an entire line
1787
- // @link https://sendbird.atlassian.net/browse/NOTI-709
1788
- if (siblings != null && siblings.length >= 2 && siblings.every(isWrappedText)) {
1789
- styles.flexShrink = siblings.length - 1 === elemIdx ? 1 : 0;
1790
- }
1791
- }
1792
- }
1917
+ };
1793
1918
 
1794
1919
  // create a context provider for MessageComponent
1795
1920
  // - this is a wrapper for MessageComponent
1796
1921
  const MessageContext = React__default.createContext(null);
1797
- const MessageProvider = (props) => {
1798
- const { message, handleWebAction, handleCustomAction, handlePredefinedAction, children } = props;
1922
+ const MessageProvider = ({ message, handleWebAction, handleCustomAction, handlePredefinedAction, highlight, children, }) => {
1799
1923
  const value = React__default.useMemo(() => ({
1800
1924
  message,
1801
1925
  handleWebAction,
1802
1926
  handleCustomAction,
1803
1927
  handlePredefinedAction,
1804
- }), [message === null || message === void 0 ? void 0 : message.updatedAt]);
1928
+ highlight,
1929
+ }), [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]);
1805
1930
  return React__default.createElement(MessageContext.Provider, { value: value }, children);
1806
1931
  };
1807
1932
  const useMessageContext = () => {
@@ -1812,6 +1937,18 @@ const useMessageContext = () => {
1812
1937
  return context;
1813
1938
  };
1814
1939
 
1940
+ /**
1941
+ * This hook is used to highlight each item in the message template by extending its style.
1942
+ * */
1943
+ function useHighlightStyle(raw) {
1944
+ const { highlight } = useMessageContext();
1945
+ return {
1946
+ className: (highlight === null || highlight === void 0 ? void 0 : highlight.getContainerClassName) ? highlight.getContainerClassName(raw) : undefined,
1947
+ style: (highlight === null || highlight === void 0 ? void 0 : highlight.getContainerInlineStyle) ? highlight.getContainerInlineStyle(raw) : undefined,
1948
+ renderText: (highlight === null || highlight === void 0 ? void 0 : highlight.renderText) ? highlight.renderText : (it) => it,
1949
+ };
1950
+ }
1951
+
1815
1952
  /**
1816
1953
  * Preserves a reference to the given callback function as an argument while the component is mounted.
1817
1954
  * Wraps the given callback in React's Ref to preserve the reference.
@@ -2017,28 +2154,13 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
2017
2154
  }
2018
2155
  return t;
2019
2156
  };
2020
- const hasValidUrlProtocol = (url = '') => ['http://', 'https://', 'ftp://'].some((protocol) => url.startsWith(protocol));
2021
- /**
2022
- * @param url - url to be checked
2023
- * @returns url with http:// protocol if it doesn't have any protocol
2024
- * @example
2025
- * returnUrl('www.sendbird.com') // returns 'http://www.sendbird.com'
2026
- * returnUrl('https://www.sendbird.com') // returns 'https://www.sendbird.com'
2027
- * returnUrl('ftp://www.sendbird.com') // returns 'ftp://www.sendbird.com'
2028
- * returnUrl('sendbird.com') // returns 'https://sendbird.com'
2029
- **/
2030
- const returnUrl = (url = '') => {
2031
- if (hasValidUrlProtocol(url)) {
2032
- return url;
2033
- }
2034
- return `https://${url}`;
2035
- };
2036
2157
  // todo: semantic html here is not perfect, need to revisit. Same for Button
2037
- const ActionHandler = ({ children, props, className, style }) => {
2158
+ const ActionHandler = ({ children, props, className, style, inlineStyle }) => {
2038
2159
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2039
2160
  const { recalculatedStyle, elemRef } = useRecalculateWidth({ style, props });
2040
2161
  const { message, handleWebAction, handleCustomAction, handlePredefinedAction } = useMessageContext();
2041
2162
  const borderClass = ((_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.borderWidth) ? 'sb-message-template__border' : '';
2163
+ const actionClass = props.action ? 'sb-message-template__action' : '';
2042
2164
  const paddingStyles = {
2043
2165
  paddingBlockStart: (_c = (_b = props.viewStyle) === null || _b === void 0 ? void 0 : _b.padding) === null || _c === void 0 ? void 0 : _c.top,
2044
2166
  paddingBlockEnd: (_e = (_d = props.viewStyle) === null || _d === void 0 ? void 0 : _d.padding) === null || _e === void 0 ? void 0 : _e.bottom,
@@ -2052,7 +2174,7 @@ const ActionHandler = ({ children, props, className, style }) => {
2052
2174
  handleWebAction(e, props.action, message);
2053
2175
  }
2054
2176
  else {
2055
- (_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();
2177
+ (_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();
2056
2178
  }
2057
2179
  }
2058
2180
  else if (((_d = props.action) === null || _d === void 0 ? void 0 : _d.type) === 'custom') {
@@ -2060,7 +2182,7 @@ const ActionHandler = ({ children, props, className, style }) => {
2060
2182
  handleCustomAction(e, props.action, message);
2061
2183
  }
2062
2184
  else {
2063
- (_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();
2185
+ (_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();
2064
2186
  }
2065
2187
  }
2066
2188
  else if (((_g = props.action) === null || _g === void 0 ? void 0 : _g.type) === 'uikit') {
@@ -2068,135 +2190,86 @@ const ActionHandler = ({ children, props, className, style }) => {
2068
2190
  }
2069
2191
  };
2070
2192
  if (props.type === ComponentType.TextButton) {
2071
- return (React__default.createElement("button", { className: clx(className, borderClass), "data-sb-template-id": props.elementId, style: Object.assign(Object.assign({}, style), paddingStyles), onClick: onClick }, children));
2193
+ return (React__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));
2072
2194
  }
2073
2195
  const { display, flexDirection, justifyContent, alignItems, objectFit } = recalculatedStyle, wrapperStyles = __rest(recalculatedStyle, ["display", "flexDirection", "justifyContent", "alignItems", "objectFit"]);
2074
- return (React__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 },
2196
+ return (React__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 },
2075
2197
  React__default.createElement("div", { style: Object.assign({ display,
2076
2198
  flexDirection,
2077
2199
  justifyContent,
2078
2200
  alignItems,
2079
2201
  objectFit, width: '100%', height: '100%' }, paddingStyles) }, children)));
2080
2202
  };
2081
- function clx(...names) {
2082
- return names.filter((it) => !!it).join(' ');
2083
- }
2084
2203
 
2085
- /**
2086
- * Text that is fixed or fill parent should be wrapped in a div with max-width: 100% and max-height: 100%
2087
- * This is to prevent text from overflowing the padding of the container
2088
- */
2089
- function isFixedOrFill(view) {
2090
- var _a, _b, _c, _d;
2091
- const heightType = (_a = view === null || view === void 0 ? void 0 : view.height) === null || _a === void 0 ? void 0 : _a.type;
2092
- const widthType = (_b = view === null || view === void 0 ? void 0 : view.width) === null || _b === void 0 ? void 0 : _b.type;
2093
- const isFixedDiamension = heightType === 'fixed' || widthType === 'fixed';
2094
- const isFill = (heightType === 'flex' && ((_c = view === null || view === void 0 ? void 0 : view.height) === null || _c === void 0 ? void 0 : _c.value) === FlexSizeSpecValue.FillParent) ||
2095
- (widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
2096
- return isFixedDiamension || isFill;
2097
- }
2098
- function convertNewlinesToBr(text) {
2099
- return text.split('\n').map((line, index) => (React__default.createElement(React__default.Fragment, { key: index },
2100
- line,
2101
- React__default.createElement("br", null))));
2102
- }
2103
- function renderText(view) {
2104
- const { text, maxTextLines } = view;
2105
- const isToBeWrapped = isFixedOrFill(view);
2106
- const hasMaxLines = typeof maxTextLines === 'number' && maxTextLines > 0;
2107
- const convertedText = convertNewlinesToBr(text);
2108
- if (hasMaxLines || isToBeWrapped) {
2109
- const wrapperStyling = Object.assign(Object.assign({}, ((hasMaxLines || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
2110
- return (React__default.createElement("div", { style: wrapperStyling }, hasMaxLines ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
2111
- }
2112
- return hasMaxLines ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
2113
- }
2114
2204
  const renderer = createRenderer({
2115
2205
  views: {
2116
2206
  box(props) {
2117
- return (React__default.createElement(ActionHandler, { className: "sb-message-template__box", elementId: props.elementId, style: props.parsedProperties, props: props }, props.children));
2207
+ const highlight = useHighlightStyle(props.rawProperties);
2208
+ return (React__default.createElement(ActionHandler, { className: clx('sb-message-template__box', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props }, props.children));
2118
2209
  },
2119
2210
  text(props) {
2120
- return (React__default.createElement(ActionHandler, { className: "sb-message-template__text", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
2211
+ const highlight = useHighlightStyle(props.rawProperties);
2212
+ return (React__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)));
2121
2213
  },
2122
2214
  image(props) {
2123
2215
  var _a;
2216
+ const highlight = useHighlightStyle(props.rawProperties);
2124
2217
  // todo: add image backup
2125
- return (React__default.createElement(ActionHandler, { className: "sb-message-template__image-container", elementId: props.elementId, style: props.parsedProperties, props: props },
2126
- React__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 })));
2218
+ return (React__default.createElement(ActionHandler, { className: clx('sb-message-template__image-container', highlight.className), inlineStyle: highlight.style, elementId: props.elementId, style: props.parsedProperties, props: props },
2219
+ React__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 })));
2127
2220
  },
2128
2221
  textButton(props) {
2129
- return (React__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))));
2222
+ const highlight = useHighlightStyle(props.rawProperties);
2223
+ return (React__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)));
2130
2224
  },
2131
2225
  imageButton(props) {
2132
2226
  var _a;
2133
- return (React__default.createElement(ActionHandler, { className: "sb-message-template__image-container sb-message-template__image-button", elementId: props.elementId, style: props.parsedProperties, props: props },
2134
- React__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 })));
2227
+ const highlight = useHighlightStyle(props.rawProperties);
2228
+ return (React__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 },
2229
+ React__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 })));
2135
2230
  },
2136
2231
  carouselView(props) {
2137
2232
  var _a, _b;
2138
- return (React__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));
2233
+ const highlight = useHighlightStyle(props.rawProperties);
2234
+ return (React__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));
2139
2235
  },
2140
2236
  },
2141
2237
  });
2142
- const parser = createParser({
2143
- mapBoxProps(props, options) {
2144
- const styles = getDefaultStyles();
2145
- setViewProps(styles, props, options);
2146
- setAlign(styles, props.layout, props.align);
2147
- return styles;
2148
- },
2149
- mapTextProps(props, options) {
2150
- var _a;
2151
- const styles = getDefaultStyles({ whiteSpace: 'pre-line', wordBreak: 'break-word' });
2152
- // Better not set flex 1 to text
2153
- setViewProps(styles, props, options);
2154
- setTextStyle(styles, props, options);
2155
- setAlign(styles, Layout.Row, props.align);
2156
- setTextAlign(styles, (_a = props.align) === null || _a === void 0 ? void 0 : _a.horizontal);
2157
- return styles;
2158
- },
2159
- mapImageProps(props, options) {
2160
- const styles = getDefaultStyles();
2161
- setViewProps(styles, props, options);
2162
- setImageStyle(styles, props.imageStyle);
2163
- setImageAspectRatio(styles, props);
2164
- return styles;
2165
- },
2166
- mapTextButtonProps(props, options) {
2167
- const styles = getDefaultStyles({ whiteSpace: 'pre-line', alignItems: 'center', justifyContent: 'center' });
2168
- setViewProps(styles, props, options);
2169
- setTextStyle(styles, props, options);
2170
- return styles;
2171
- },
2172
- mapImageButtonProps(props, options) {
2173
- const styles = getDefaultStyles();
2174
- setViewProps(styles, props, options);
2175
- setImageStyle(styles, props.imageStyle);
2176
- setImageAspectRatio(styles, props);
2177
- return styles;
2178
- },
2179
- mapCarouselProps(props, options) {
2180
- var _a, _b, _c, _d, _e, _f, _g, _h;
2181
- const styles = getDefaultStyles();
2182
- setViewProps(styles, props, options);
2183
- styles['paddingBlockStart'] = (_b = (_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.padding) === null || _b === void 0 ? void 0 : _b.top;
2184
- styles['paddingBlockEnd'] = (_d = (_c = props.viewStyle) === null || _c === void 0 ? void 0 : _c.padding) === null || _d === void 0 ? void 0 : _d.bottom;
2185
- styles['paddingInlineStart'] = (_f = (_e = props.viewStyle) === null || _e === void 0 ? void 0 : _e.padding) === null || _f === void 0 ? void 0 : _f.left;
2186
- styles['paddingInlineEnd'] = (_h = (_g = props.viewStyle) === null || _g === void 0 ? void 0 : _g.padding) === null || _h === void 0 ? void 0 : _h.right;
2187
- return styles;
2188
- },
2189
- });
2238
+ function convertNewlinesToBr(text, highlightText) {
2239
+ return text.split('\n').map((line, index) => (React__default.createElement(React__default.Fragment, { key: index },
2240
+ highlightText(line),
2241
+ React__default.createElement("br", null))));
2242
+ }
2243
+ function renderText(view, highlightText) {
2244
+ const { text, maxTextLines } = view;
2245
+ const isToBeWrapped = isFixedOrFill(view);
2246
+ const hasMaxLines = typeof maxTextLines === 'number' && maxTextLines > 0;
2247
+ const convertedText = convertNewlinesToBr(text, highlightText);
2248
+ if (hasMaxLines || isToBeWrapped) {
2249
+ const wrapperStyling = Object.assign(Object.assign({}, ((hasMaxLines || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
2250
+ return (React__default.createElement("div", { style: wrapperStyling }, hasMaxLines ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
2251
+ }
2252
+ return hasMaxLines ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
2253
+ }
2254
+ /**
2255
+ * Text that is fixed or fill parent should be wrapped in a div with max-width: 100% and max-height: 100%
2256
+ * This is to prevent text from overflowing the padding of the container
2257
+ */
2258
+ function isFixedOrFill(view) {
2259
+ var _a, _b, _c, _d;
2260
+ const heightType = (_a = view === null || view === void 0 ? void 0 : view.height) === null || _a === void 0 ? void 0 : _a.type;
2261
+ const widthType = (_b = view === null || view === void 0 ? void 0 : view.width) === null || _b === void 0 ? void 0 : _b.type;
2262
+ const isFixedDimension = heightType === 'fixed' || widthType === 'fixed';
2263
+ const isFill = (heightType === 'flex' && ((_c = view === null || view === void 0 ? void 0 : view.height) === null || _c === void 0 ? void 0 : _c.value) === FlexSizeSpecValue.FillParent) ||
2264
+ (widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
2265
+ return isFixedDimension || isFill;
2266
+ }
2267
+
2190
2268
  createMessageTemplate({
2191
2269
  renderer,
2192
2270
  parser,
2193
2271
  Container: ({ children, className }) => {
2194
- return (React__default.createElement("div", { className: `sb-message-template__parent ${className}`, style: {
2195
- display: 'flex',
2196
- flexDirection: 'column',
2197
- maxWidth: 400,
2198
- marginBlockEnd: 24,
2199
- } }, children));
2272
+ return (React__default.createElement("div", { className: `sb-message-template__parent ${className}`, style: { display: 'flex', flexDirection: 'column', maxWidth: 400, marginBlockEnd: 24 } }, children));
2200
2273
  },
2201
2274
  });
2202
2275
 
@@ -2217,4 +2290,4 @@ function MessageTemplate(_a) {
2217
2290
  }
2218
2291
 
2219
2292
  export { MessageProvider as M, MessageTemplate as a };
2220
- //# sourceMappingURL=bundle-CSJ53xaT.js.map
2293
+ //# sourceMappingURL=bundle-CdFl8VL-.js.map