@sendbird/uikit-react 3.17.11 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +93 -91
- package/App.js.map +1 -1
- package/CHANGELOG.md +20 -16
- package/Channel/components/ChannelHeader.js +33 -33
- package/Channel/components/ChannelUI.js +72 -69
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +31 -31
- package/Channel/components/FrozenNotification.js +6 -6
- package/Channel/components/Message.js +59 -58
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +56 -54
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageInputWrapper.js +54 -51
- package/Channel/components/MessageInputWrapper.js.map +1 -1
- package/Channel/components/MessageList.js +66 -65
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +30 -30
- package/Channel/components/SuggestedMentionList.js +30 -30
- package/Channel/components/TypingIndicator.js +9 -9
- package/Channel/components/UnreadCount.js +8 -8
- package/Channel/context.js +25 -26
- package/Channel/context.js.map +1 -1
- package/Channel/hooks/useHandleUploadFiles.js +35 -57
- package/Channel/hooks/useHandleUploadFiles.js.map +1 -1
- package/Channel/hooks/useInitialMessagesFetch.js +8 -8
- package/Channel/utils/compareMessagesForGrouping.js +8 -8
- package/Channel/utils/getMessagePartsInfo.js +9 -9
- package/Channel.js +72 -69
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +93 -91
- package/ChannelList/components/AddChannel.js.map +1 -1
- package/ChannelList/components/ChannelListHeader.js +13 -13
- package/ChannelList/components/ChannelListUI.js +93 -91
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +32 -32
- package/ChannelList/components/ChannelPreviewAction.js +17 -17
- package/ChannelList/context.js +14 -14
- package/ChannelList.js +93 -91
- package/ChannelList.js.map +1 -1
- package/ChannelSettings/components/ChannelProfile.js +23 -23
- package/ChannelSettings/components/ChannelSettingMenuList.js +14 -14
- package/ChannelSettings/components/ChannelSettingsHeader.js +11 -11
- package/ChannelSettings/components/ChannelSettingsMenuItem.js +2 -2
- package/ChannelSettings/components/ChannelSettingsUI.js +33 -33
- package/ChannelSettings/components/EditDetailsModal.js +19 -19
- package/ChannelSettings/components/LeaveChannel.js +20 -20
- package/ChannelSettings/components/ModerationPanel.js +31 -31
- package/ChannelSettings/components/UserListItem.js +19 -19
- package/ChannelSettings/components/UserPanel.js +29 -29
- package/ChannelSettings/context.js +9 -9
- package/ChannelSettings/hooks/useMenuList.js +29 -29
- package/ChannelSettings.js +31 -31
- package/CreateChannel/components/CreateChannelUI.js +93 -91
- package/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/CreateChannel/components/InviteUsers.js +93 -91
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +93 -91
- package/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/CreateChannel/context.js +93 -91
- package/CreateChannel/context.js.map +1 -1
- package/CreateChannel.js +93 -91
- package/CreateChannel.js.map +1 -1
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +16 -16
- package/CreateOpenChannel/context.js +4 -4
- package/CreateOpenChannel.js +15 -15
- package/EditUserProfile/components/EditUserProfileUI.js +15 -15
- package/EditUserProfile/context.js +1 -1
- package/EditUserProfile.js +15 -15
- package/GroupChannel/components/FileViewer.js +28 -28
- package/GroupChannel/components/FrozenNotification.js +6 -6
- package/GroupChannel/components/GroupChannelHeader.js +29 -29
- package/GroupChannel/components/GroupChannelUI.js +67 -64
- package/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/GroupChannel/components/Message.js +56 -55
- package/GroupChannel/components/Message.js.map +1 -1
- package/GroupChannel/components/MessageInputWrapper.js +51 -48
- package/GroupChannel/components/MessageInputWrapper.js.map +1 -1
- package/GroupChannel/components/MessageList.js +61 -60
- package/GroupChannel/components/MessageList.js.map +1 -1
- package/GroupChannel/components/RemoveMessageModal.js +27 -27
- package/GroupChannel/components/SuggestedMentionList.js +15 -15
- package/GroupChannel/components/TypingIndicator.js +9 -9
- package/GroupChannel/components/UnreadCount.js +9 -9
- package/GroupChannel/context.js +15 -15
- package/GroupChannel.js +67 -64
- package/GroupChannel.js.map +1 -1
- package/GroupChannelList/components/AddGroupChannel.js +93 -91
- package/GroupChannelList/components/AddGroupChannel.js.map +1 -1
- package/GroupChannelList/components/GroupChannelListHeader.js +13 -13
- package/GroupChannelList/components/GroupChannelListItem.js +32 -32
- package/GroupChannelList/components/GroupChannelListUI.js +93 -91
- package/GroupChannelList/components/GroupChannelListUI.js.map +1 -1
- package/GroupChannelList/components/GroupChannelPreviewAction.js +18 -18
- package/GroupChannelList/context.js +10 -10
- package/GroupChannelList.js +93 -91
- package/GroupChannelList.js.map +1 -1
- package/MessageSearch/components/MessageSearchUI.js +20 -20
- package/MessageSearch/context.js +6 -6
- package/MessageSearch.js +23 -23
- package/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/OpenChannel/components/OpenChannelHeader.js +21 -21
- package/OpenChannel/components/OpenChannelInput.js +81 -34
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +40 -42
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +45 -45
- package/OpenChannel/components/OpenChannelUI.js +46 -44
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +19 -19
- package/OpenChannel.js +48 -46
- package/OpenChannel.js.map +1 -1
- package/OpenChannelList/components/OpenChannelListUI.js +18 -18
- package/OpenChannelList/components/OpenChannelPreview.js +7 -7
- package/OpenChannelList/context.js +7 -7
- package/OpenChannelList.js +17 -17
- package/OpenChannelSettings/components/EditDetailsModal.js +18 -18
- package/OpenChannelSettings/components/OpenChannelProfile.js +18 -18
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +24 -24
- package/OpenChannelSettings/components/OperatorUI.js +26 -26
- package/OpenChannelSettings/components/ParticipantUI.js +22 -22
- package/OpenChannelSettings/context.js +6 -6
- package/OpenChannelSettings.js +24 -24
- package/SendbirdProvider.js +28 -24
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +59 -62
- package/Thread/components/ParentMessageInfo.js.map +1 -1
- package/Thread/components/ParentMessageInfoItem.js +35 -35
- package/Thread/components/ThreadHeader.js +9 -9
- package/Thread/components/ThreadList.js +58 -57
- package/Thread/components/ThreadList.js.map +1 -1
- package/Thread/components/ThreadListItem.js +66 -69
- package/Thread/components/ThreadListItem.js.map +1 -1
- package/Thread/components/ThreadMessageInput.js +220 -79
- package/Thread/components/ThreadMessageInput.js.map +1 -1
- package/Thread/components/ThreadUI.js +66 -64
- package/Thread/components/ThreadUI.js.map +1 -1
- package/Thread/context.js +15 -15
- package/Thread.js +66 -64
- package/Thread.js.map +1 -1
- package/VoicePlayer/context.js +6 -6
- package/VoicePlayer/useVoicePlayer.js +24 -18
- package/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/VoiceRecorder/context.js +14 -14
- package/VoiceRecorder/useVoiceRecorder.js +12 -12
- package/chunks/{bundle-CeLEEyFJ.js → bundle-4clodtJA.js} +25 -29
- package/chunks/bundle-4clodtJA.js.map +1 -0
- package/chunks/{bundle-8dH5t8D9.js → bundle-5y4qYKhm.js} +9 -9
- package/chunks/{bundle-8dH5t8D9.js.map → bundle-5y4qYKhm.js.map} +1 -1
- package/chunks/{bundle-Cq01dsQs.js → bundle-6I0gJidJ.js} +1 -1
- package/chunks/bundle-6I0gJidJ.js.map +1 -0
- package/chunks/{bundle-BMMEMc9R.js → bundle-9ghXmCwH.js} +1 -1
- package/chunks/bundle-9ghXmCwH.js.map +1 -0
- package/chunks/bundle-AsQ1wnFm.js +47 -0
- package/chunks/bundle-AsQ1wnFm.js.map +1 -0
- package/chunks/{bundle-CgAh8D8l.js → bundle-B40pTdZv.js} +1 -1
- package/chunks/bundle-B40pTdZv.js.map +1 -0
- package/chunks/{bundle-DOHzCh7a.js → bundle-B56O1y8C.js} +5 -5
- package/chunks/{bundle-DOHzCh7a.js.map → bundle-B56O1y8C.js.map} +1 -1
- package/chunks/{bundle-CH1SOYd0.js → bundle-B5LKcMN_.js} +2 -2
- package/chunks/bundle-B5LKcMN_.js.map +1 -0
- package/chunks/bundle-B5xkbY4c.js +111 -0
- package/chunks/bundle-B5xkbY4c.js.map +1 -0
- package/chunks/{bundle-CfGa1Ywx.js → bundle-B9yd2WEy.js} +4 -4
- package/chunks/bundle-B9yd2WEy.js.map +1 -0
- package/chunks/bundle-BCjR1Qiq.js +707 -0
- package/chunks/bundle-BCjR1Qiq.js.map +1 -0
- package/chunks/{bundle-DGZK0j-W.js → bundle-BEPoP7sp.js} +2 -2
- package/chunks/bundle-BEPoP7sp.js.map +1 -0
- package/chunks/{bundle-DCwgKOlw.js → bundle-BJShQs4P.js} +5 -5
- package/chunks/bundle-BJShQs4P.js.map +1 -0
- package/chunks/{bundle-CC_Jz6mm.js → bundle-BKXsd3zk.js} +1 -1
- package/chunks/bundle-BKXsd3zk.js.map +1 -0
- package/chunks/{bundle-C5JanUlq.js → bundle-BLMU9f-F.js} +34 -23
- package/{cjs/chunks/bundle-U6Y2jYcy.js.map → chunks/bundle-BLMU9f-F.js.map} +1 -1
- package/chunks/{bundle-CmTULFbc.js → bundle-BRJdb8OX.js} +1 -1
- package/chunks/bundle-BRJdb8OX.js.map +1 -0
- package/chunks/{bundle-DPFUYsH2.js → bundle-BShLbNAF.js} +1 -1
- package/chunks/bundle-BShLbNAF.js.map +1 -0
- package/chunks/{bundle-DKnH9j0w.js → bundle-BZSLsKkw.js} +25 -8
- package/chunks/{bundle-DKnH9j0w.js.map → bundle-BZSLsKkw.js.map} +1 -1
- package/chunks/{bundle-DoCZ7Yns.js → bundle-Banyr0qP.js} +3 -3
- package/chunks/bundle-Banyr0qP.js.map +1 -0
- package/chunks/{bundle-C6xi9dYP.js → bundle-BdprN8pt.js} +1 -1
- package/chunks/{bundle-C6xi9dYP.js.map → bundle-BdprN8pt.js.map} +1 -1
- package/chunks/{bundle-BwngnlYf.js → bundle-BfgSx7DM.js} +3 -3
- package/chunks/{bundle-BwngnlYf.js.map → bundle-BfgSx7DM.js.map} +1 -1
- package/chunks/{bundle-deCJFaXg.js → bundle-Bm5O6aP3.js} +1 -1
- package/chunks/bundle-Bm5O6aP3.js.map +1 -0
- package/chunks/{bundle-DajAePTd.js → bundle-BpM8phr1.js} +14 -14
- package/chunks/bundle-BpM8phr1.js.map +1 -0
- package/chunks/{bundle-CUFNseKN.js → bundle-Bpofr334.js} +2 -2
- package/chunks/{bundle-CUFNseKN.js.map → bundle-Bpofr334.js.map} +1 -1
- package/chunks/{bundle-DcfMvtQG.js → bundle-BqKoZDqX.js} +1 -1
- package/chunks/{bundle-DcfMvtQG.js.map → bundle-BqKoZDqX.js.map} +1 -1
- package/chunks/{bundle-BZoGlf3f.js → bundle-BrCEaRXK.js} +16 -16
- package/chunks/{bundle-BZoGlf3f.js.map → bundle-BrCEaRXK.js.map} +1 -1
- package/chunks/{bundle-CSa8zeut.js → bundle-BrqWLoDb.js} +5 -5
- package/chunks/{bundle-CSa8zeut.js.map → bundle-BrqWLoDb.js.map} +1 -1
- package/chunks/{bundle-K4xHiJfN.js → bundle-Bs8Cwq5j.js} +9 -9
- package/chunks/bundle-Bs8Cwq5j.js.map +1 -0
- package/chunks/{bundle-LKiKEQMD.js → bundle-BsY2Dawk.js} +2 -2
- package/chunks/bundle-BsY2Dawk.js.map +1 -0
- package/chunks/{bundle-DvFk9hZu.js → bundle-C1npFBfj.js} +1 -1
- package/chunks/bundle-C1npFBfj.js.map +1 -0
- package/chunks/{bundle-DUhFIvq0.js → bundle-C20UC6V7.js} +7 -7
- package/chunks/bundle-C20UC6V7.js.map +1 -0
- package/chunks/{bundle-CTVS7EpI.js → bundle-C2ARCMSL.js} +1 -1
- package/chunks/bundle-C2ARCMSL.js.map +1 -0
- package/chunks/{bundle-QqMAlWsP.js → bundle-C4anRHWY.js} +11 -11
- package/chunks/bundle-C4anRHWY.js.map +1 -0
- package/chunks/{bundle-CX6EYwvX.js → bundle-C5-D2BAP.js} +61 -17
- package/{cjs/chunks/bundle-DmR0_slE.js.map → chunks/bundle-C5-D2BAP.js.map} +1 -1
- package/chunks/{bundle-DmoshxdI.js → bundle-C60Wnv-9.js} +2 -2
- package/chunks/bundle-C60Wnv-9.js.map +1 -0
- package/chunks/{bundle-DiKiLU8g.js → bundle-CAshTR7h.js} +1 -1
- package/chunks/bundle-CAshTR7h.js.map +1 -0
- package/chunks/{bundle-DYbMoqiD.js → bundle-CD4RzjMA.js} +4 -4
- package/chunks/bundle-CD4RzjMA.js.map +1 -0
- package/chunks/{bundle-D3DfLeep.js → bundle-CFc2hy8g.js} +2 -2
- package/chunks/bundle-CFc2hy8g.js.map +1 -0
- package/chunks/{bundle-4FHXjC0T.js → bundle-CLHIHGae.js} +5 -5
- package/chunks/bundle-CLHIHGae.js.map +1 -0
- package/chunks/{bundle-CVIpQvz-.js → bundle-CLrmFXHj.js} +10 -10
- package/chunks/{bundle-CVIpQvz-.js.map → bundle-CLrmFXHj.js.map} +1 -1
- package/chunks/{bundle-CjCG01vR.js → bundle-CPOgmEXq.js} +4 -4
- package/chunks/bundle-CPOgmEXq.js.map +1 -0
- package/chunks/{bundle-C7rLZX4P.js → bundle-Cd8fnvI_.js} +1 -1
- package/chunks/bundle-Cd8fnvI_.js.map +1 -0
- package/chunks/{bundle-CE8XZeIa.js → bundle-Cdplrrlw.js} +4 -4
- package/chunks/bundle-Cdplrrlw.js.map +1 -0
- package/chunks/{bundle-CD6CGxYu.js → bundle-Cdqsdoa8.js} +4 -4
- package/chunks/bundle-Cdqsdoa8.js.map +1 -0
- package/chunks/{bundle-NRNsjiKk.js → bundle-CglqREVl.js} +1 -1
- package/chunks/bundle-CglqREVl.js.map +1 -0
- package/chunks/{bundle-DNZm2aCn.js → bundle-ChLik1Zs.js} +4 -4
- package/chunks/bundle-ChLik1Zs.js.map +1 -0
- package/chunks/{bundle-jqzUQHEL.js → bundle-CnFrQOtC.js} +21 -19
- package/{cjs/chunks/bundle-DzxR2MCH.js.map → chunks/bundle-CnFrQOtC.js.map} +1 -1
- package/chunks/{bundle-CWhu5cnC.js → bundle-Cslf3sKl.js} +3 -3
- package/chunks/bundle-Cslf3sKl.js.map +1 -0
- package/chunks/{bundle-BDaOve18.js → bundle-Cw0XZgRI.js} +7 -7
- package/chunks/bundle-Cw0XZgRI.js.map +1 -0
- package/chunks/{bundle-nJfCHTAl.js → bundle-CwMNZmx9.js} +222 -149
- package/chunks/{bundle-nJfCHTAl.js.map → bundle-CwMNZmx9.js.map} +1 -1
- package/chunks/{bundle-BS4kt0WK.js → bundle-Cyocqt10.js} +10 -12
- package/{cjs/chunks/bundle-BPerQ7Nn.js.map → chunks/bundle-Cyocqt10.js.map} +1 -1
- package/chunks/{bundle-CSLZlbio.js → bundle-D-L9ZslG.js} +8 -8
- package/chunks/{bundle-CSLZlbio.js.map → bundle-D-L9ZslG.js.map} +1 -1
- package/chunks/{bundle-C5IAP1zO.js → bundle-D0WVu0lN.js} +1 -1
- package/chunks/bundle-D0WVu0lN.js.map +1 -0
- package/chunks/{bundle-D77O6D1c.js → bundle-D3zdGXmK.js} +4 -4
- package/chunks/{bundle-D77O6D1c.js.map → bundle-D3zdGXmK.js.map} +1 -1
- package/chunks/{bundle-EUiAeGsI.js → bundle-D4O-NxY1.js} +28 -18
- package/{cjs/chunks/bundle-D3d1xmjt.js.map → chunks/bundle-D4O-NxY1.js.map} +1 -1
- package/chunks/{bundle-CTZdxGd-.js → bundle-D646l1Rn.js} +1 -1
- package/chunks/bundle-D646l1Rn.js.map +1 -0
- package/chunks/{bundle-B07oZGKu.js → bundle-D9ORMtyv.js} +7 -7
- package/chunks/bundle-D9ORMtyv.js.map +1 -0
- package/chunks/{bundle-CQA3ZHxQ.js → bundle-DC25kzte.js} +10 -10
- package/chunks/{bundle-CQA3ZHxQ.js.map → bundle-DC25kzte.js.map} +1 -1
- package/chunks/{bundle-CdzKrMjw.js → bundle-DD_FhSU8.js} +6 -6
- package/chunks/bundle-DD_FhSU8.js.map +1 -0
- package/chunks/{bundle-DKmGgarH.js → bundle-DFWI31lg.js} +4 -4
- package/chunks/bundle-DFWI31lg.js.map +1 -0
- package/chunks/{bundle-CTBJyV2C.js → bundle-DIdJF27_.js} +2 -2
- package/chunks/bundle-DIdJF27_.js.map +1 -0
- package/chunks/{bundle-DJ-TOKrq.js → bundle-DTiJ-rFi.js} +5 -5
- package/chunks/{bundle-DJ-TOKrq.js.map → bundle-DTiJ-rFi.js.map} +1 -1
- package/chunks/{bundle-CBhbbqeO.js → bundle-DVdeXT-4.js} +2 -4
- package/chunks/bundle-DVdeXT-4.js.map +1 -0
- package/chunks/{bundle-DdGdUttq.js → bundle-DWURNKdQ.js} +19 -10
- package/{cjs/chunks/bundle-DCE4aPIh.js.map → chunks/bundle-DWURNKdQ.js.map} +1 -1
- package/chunks/{bundle-CQJQkdjB.js → bundle-DX6fRIJl.js} +1 -1
- package/chunks/bundle-DX6fRIJl.js.map +1 -0
- package/chunks/{bundle-BhsIH5N9.js → bundle-DXC9ZAL8.js} +7 -7
- package/chunks/{bundle-BhsIH5N9.js.map → bundle-DXC9ZAL8.js.map} +1 -1
- package/chunks/{bundle-COVbA08i.js → bundle-DY7Cxkk0.js} +2 -2
- package/chunks/{bundle-COVbA08i.js.map → bundle-DY7Cxkk0.js.map} +1 -1
- package/chunks/{bundle-MfWZwGxM.js → bundle-DiO7lolz.js} +3 -3
- package/chunks/bundle-DiO7lolz.js.map +1 -0
- package/chunks/{bundle-yJIT2XDk.js → bundle-Dj_wODPB.js} +97 -78
- package/{cjs/chunks/bundle-D9x3No8L.js.map → chunks/bundle-Dj_wODPB.js.map} +1 -1
- package/chunks/{bundle-Dtcjhm7e.js → bundle-DmOfz_GY.js} +77 -47
- package/chunks/{bundle-EUiAeGsI.js.map → bundle-DmOfz_GY.js.map} +1 -1
- package/chunks/{bundle-BPR5PyGX.js → bundle-DmnXeBdU.js} +1 -1
- package/chunks/{bundle-BPR5PyGX.js.map → bundle-DmnXeBdU.js.map} +1 -1
- package/chunks/{bundle-DCbF_EZ6.js → bundle-DpOgiF9r.js} +1 -1
- package/chunks/bundle-DpOgiF9r.js.map +1 -0
- package/chunks/{bundle-CBGlP9zt.js → bundle-Dw9WYTqh.js} +2 -2
- package/chunks/{bundle-CBGlP9zt.js.map → bundle-Dw9WYTqh.js.map} +1 -1
- package/chunks/{bundle-apFuh3_k.js → bundle-DyguzebC.js} +2 -2
- package/chunks/{bundle-apFuh3_k.js.map → bundle-DyguzebC.js.map} +1 -1
- package/chunks/{bundle-DeDZvs38.js → bundle-DyosazG-.js} +3 -5
- package/chunks/{bundle-DeDZvs38.js.map → bundle-DyosazG-.js.map} +1 -1
- package/chunks/{bundle-D4as5hKh.js → bundle-DzB_38co.js} +7 -7
- package/chunks/{bundle-BS4kt0WK.js.map → bundle-DzB_38co.js.map} +1 -1
- package/chunks/{bundle-C9eESsTb.js → bundle-EKFQIahk.js} +3 -3
- package/chunks/{bundle-C9eESsTb.js.map → bundle-EKFQIahk.js.map} +1 -1
- package/chunks/bundle-ExNQo0Ly.js +160 -0
- package/chunks/{bundle-C9pDO7b_.js.map → bundle-ExNQo0Ly.js.map} +1 -1
- package/chunks/{bundle-BrZWYj5G.js → bundle-F_R9C4cW.js} +1 -1
- package/chunks/bundle-F_R9C4cW.js.map +1 -0
- package/chunks/{bundle-BdqzVlr4.js → bundle-FnWZX8on.js} +4 -4
- package/chunks/bundle-FnWZX8on.js.map +1 -0
- package/chunks/{bundle-u7ZSOSmF.js → bundle-Gpc6ZS8v.js} +51 -26
- package/chunks/{bundle-u7ZSOSmF.js.map → bundle-Gpc6ZS8v.js.map} +1 -1
- package/chunks/{bundle-B_1lMJw7.js → bundle-HZPwhqsr.js} +8 -8
- package/{cjs/chunks/bundle-Cj4QTkbo.js.map → chunks/bundle-HZPwhqsr.js.map} +1 -1
- package/chunks/{bundle-D67XuNKa.js → bundle-JhKiWlXT.js} +2 -2
- package/chunks/bundle-JhKiWlXT.js.map +1 -0
- package/chunks/{bundle-B4W87yRp.js → bundle-KmABwClk.js} +9 -9
- package/chunks/{bundle-B4W87yRp.js.map → bundle-KmABwClk.js.map} +1 -1
- package/chunks/{bundle-D1MmNbfE.js → bundle-LLA95Pqf.js} +1 -1
- package/chunks/bundle-LLA95Pqf.js.map +1 -0
- package/chunks/{bundle-3JP5bt3Z.js → bundle-WvDa8Nzx.js} +3 -3
- package/chunks/bundle-WvDa8Nzx.js.map +1 -0
- package/chunks/{bundle-C9pDO7b_.js → bundle-XzHJwv9S.js} +6 -6
- package/chunks/{bundle-jqzUQHEL.js.map → bundle-XzHJwv9S.js.map} +1 -1
- package/chunks/{bundle-B5yOEM4l.js → bundle-YDriVB8K.js} +2 -2
- package/chunks/bundle-YDriVB8K.js.map +1 -0
- package/chunks/{bundle-DI1Potyd.js → bundle-bbQJtRLQ.js} +11 -11
- package/chunks/{bundle-DI1Potyd.js.map → bundle-bbQJtRLQ.js.map} +1 -1
- package/chunks/{bundle-C78c_-iF.js → bundle-dSIU9ibx.js} +9 -9
- package/chunks/{bundle-C78c_-iF.js.map → bundle-dSIU9ibx.js.map} +1 -1
- package/chunks/{bundle-BVIoifvS.js → bundle-glu5FhZF.js} +13 -13
- package/chunks/{bundle-BVIoifvS.js.map → bundle-glu5FhZF.js.map} +1 -1
- package/chunks/{bundle-DlD_Odlg.js → bundle-hLkIqB36.js} +37 -37
- package/chunks/{bundle-DlD_Odlg.js.map → bundle-hLkIqB36.js.map} +1 -1
- package/chunks/{bundle-0zReDi7b.js → bundle-iPLJ9a5J.js} +1 -1
- package/chunks/bundle-iPLJ9a5J.js.map +1 -0
- package/chunks/bundle-lqEjT2ED.js +4 -0
- package/chunks/bundle-lqEjT2ED.js.map +1 -0
- package/chunks/{bundle-D8iL7lya.js → bundle-oM0Fxt9G.js} +6 -2
- package/chunks/bundle-oM0Fxt9G.js.map +1 -0
- package/chunks/{bundle-BE6zj_MW.js → bundle-zNUBt0Cg.js} +9 -11
- package/chunks/bundle-zNUBt0Cg.js.map +1 -0
- package/cjs/App.js +93 -91
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +33 -33
- package/cjs/Channel/components/ChannelUI.js +72 -69
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +31 -31
- package/cjs/Channel/components/FrozenNotification.js +6 -6
- package/cjs/Channel/components/Message.js +59 -58
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +56 -54
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageInputWrapper.js +54 -51
- package/cjs/Channel/components/MessageInputWrapper.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +65 -64
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +30 -30
- package/cjs/Channel/components/SuggestedMentionList.js +30 -30
- package/cjs/Channel/components/TypingIndicator.js +9 -9
- package/cjs/Channel/components/UnreadCount.js +8 -8
- package/cjs/Channel/context.js +25 -26
- package/cjs/Channel/context.js.map +1 -1
- package/cjs/Channel/hooks/useHandleUploadFiles.js +34 -60
- package/cjs/Channel/hooks/useHandleUploadFiles.js.map +1 -1
- package/cjs/Channel/hooks/useInitialMessagesFetch.js +8 -8
- package/cjs/Channel/utils/compareMessagesForGrouping.js +10 -10
- package/cjs/Channel/utils/getMessagePartsInfo.js +9 -9
- package/cjs/Channel.js +72 -69
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +93 -91
- package/cjs/ChannelList/components/AddChannel.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListHeader.js +13 -13
- package/cjs/ChannelList/components/ChannelListUI.js +93 -91
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +32 -32
- package/cjs/ChannelList/components/ChannelPreviewAction.js +17 -17
- package/cjs/ChannelList/context.js +14 -14
- package/cjs/ChannelList.js +93 -91
- package/cjs/ChannelList.js.map +1 -1
- package/cjs/ChannelSettings/components/ChannelProfile.js +23 -23
- package/cjs/ChannelSettings/components/ChannelSettingMenuList.js +14 -14
- package/cjs/ChannelSettings/components/ChannelSettingsHeader.js +11 -11
- package/cjs/ChannelSettings/components/ChannelSettingsMenuItem.js +2 -2
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +32 -32
- package/cjs/ChannelSettings/components/EditDetailsModal.js +19 -19
- package/cjs/ChannelSettings/components/LeaveChannel.js +20 -20
- package/cjs/ChannelSettings/components/ModerationPanel.js +33 -33
- package/cjs/ChannelSettings/components/UserListItem.js +19 -19
- package/cjs/ChannelSettings/components/UserPanel.js +28 -28
- package/cjs/ChannelSettings/context.js +9 -9
- package/cjs/ChannelSettings/hooks/useMenuList.js +29 -29
- package/cjs/ChannelSettings.js +31 -31
- package/cjs/CreateChannel/components/CreateChannelUI.js +93 -91
- package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/cjs/CreateChannel/components/InviteUsers.js +93 -91
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +93 -91
- package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/cjs/CreateChannel/context.js +93 -91
- package/cjs/CreateChannel/context.js.map +1 -1
- package/cjs/CreateChannel.js +93 -91
- package/cjs/CreateChannel.js.map +1 -1
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +15 -15
- package/cjs/CreateOpenChannel/context.js +4 -4
- package/cjs/CreateOpenChannel.js +15 -15
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +15 -15
- package/cjs/EditUserProfile/context.js +1 -1
- package/cjs/EditUserProfile.js +15 -15
- package/cjs/GroupChannel/components/FileViewer.js +28 -28
- package/cjs/GroupChannel/components/FrozenNotification.js +6 -6
- package/cjs/GroupChannel/components/GroupChannelHeader.js +29 -29
- package/cjs/GroupChannel/components/GroupChannelUI.js +67 -64
- package/cjs/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/cjs/GroupChannel/components/Message.js +56 -55
- package/cjs/GroupChannel/components/Message.js.map +1 -1
- package/cjs/GroupChannel/components/MessageInputWrapper.js +50 -47
- package/cjs/GroupChannel/components/MessageInputWrapper.js.map +1 -1
- package/cjs/GroupChannel/components/MessageList.js +60 -59
- package/cjs/GroupChannel/components/MessageList.js.map +1 -1
- package/cjs/GroupChannel/components/RemoveMessageModal.js +27 -27
- package/cjs/GroupChannel/components/SuggestedMentionList.js +15 -15
- package/cjs/GroupChannel/components/TypingIndicator.js +9 -9
- package/cjs/GroupChannel/components/UnreadCount.js +8 -8
- package/cjs/GroupChannel/context.js +15 -15
- package/cjs/GroupChannel.js +67 -64
- package/cjs/GroupChannel.js.map +1 -1
- package/cjs/GroupChannelList/components/AddGroupChannel.js +93 -91
- package/cjs/GroupChannelList/components/AddGroupChannel.js.map +1 -1
- package/cjs/GroupChannelList/components/GroupChannelListHeader.js +13 -13
- package/cjs/GroupChannelList/components/GroupChannelListItem.js +32 -32
- package/cjs/GroupChannelList/components/GroupChannelListUI.js +93 -91
- package/cjs/GroupChannelList/components/GroupChannelListUI.js.map +1 -1
- package/cjs/GroupChannelList/components/GroupChannelPreviewAction.js +17 -17
- package/cjs/GroupChannelList/context.js +10 -10
- package/cjs/GroupChannelList.js +93 -91
- package/cjs/GroupChannelList.js.map +1 -1
- package/cjs/MessageSearch/components/MessageSearchUI.js +20 -20
- package/cjs/MessageSearch/context.js +6 -6
- package/cjs/MessageSearch.js +22 -22
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/cjs/OpenChannel/components/OpenChannelHeader.js +20 -20
- package/cjs/OpenChannel/components/OpenChannelInput.js +80 -33
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +41 -43
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +47 -47
- package/cjs/OpenChannel/components/OpenChannelUI.js +46 -44
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +19 -19
- package/cjs/OpenChannel.js +48 -46
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +17 -17
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +6 -6
- package/cjs/OpenChannelList/context.js +8 -8
- package/cjs/OpenChannelList.js +17 -17
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +18 -18
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +18 -18
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +24 -24
- package/cjs/OpenChannelSettings/components/OperatorUI.js +28 -28
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +22 -22
- package/cjs/OpenChannelSettings/context.js +6 -6
- package/cjs/OpenChannelSettings.js +24 -24
- package/cjs/SendbirdProvider.js +28 -24
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +59 -62
- package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfoItem.js +34 -34
- package/cjs/Thread/components/ThreadHeader.js +8 -8
- package/cjs/Thread/components/ThreadList.js +58 -57
- package/cjs/Thread/components/ThreadList.js.map +1 -1
- package/cjs/Thread/components/ThreadListItem.js +66 -69
- package/cjs/Thread/components/ThreadListItem.js.map +1 -1
- package/cjs/Thread/components/ThreadMessageInput.js +223 -82
- package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
- package/cjs/Thread/components/ThreadUI.js +66 -64
- package/cjs/Thread/components/ThreadUI.js.map +1 -1
- package/cjs/Thread/context.js +15 -15
- package/cjs/Thread.js +66 -64
- package/cjs/Thread.js.map +1 -1
- package/cjs/VoicePlayer/context.js +6 -6
- package/cjs/VoicePlayer/useVoicePlayer.js +23 -17
- package/cjs/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/cjs/VoiceRecorder/context.js +13 -13
- package/cjs/VoiceRecorder/useVoiceRecorder.js +12 -12
- package/cjs/chunks/{bundle-mBM5xtnU.js → bundle--ZBrECLK.js} +3 -5
- package/cjs/chunks/{bundle-mBM5xtnU.js.map → bundle--ZBrECLK.js.map} +1 -1
- package/cjs/chunks/{bundle-99j0pbE6.js → bundle-1F9guuKw.js} +1 -1
- package/cjs/chunks/bundle-1F9guuKw.js.map +1 -0
- package/cjs/chunks/{bundle-DFv16RSR.js → bundle-2FCFe95u.js} +3 -3
- package/cjs/chunks/bundle-2FCFe95u.js.map +1 -0
- package/cjs/chunks/{bundle-DzxR2MCH.js → bundle-4vdcmQiE.js} +5 -5
- package/cjs/chunks/bundle-4vdcmQiE.js.map +1 -0
- package/cjs/chunks/{bundle-cTlYBGMg.js → bundle-76A2Zzye.js} +4 -4
- package/cjs/chunks/bundle-76A2Zzye.js.map +1 -0
- package/cjs/chunks/{bundle-CnoOxWnY.js → bundle-9izlRrTd.js} +3 -3
- package/cjs/chunks/bundle-9izlRrTd.js.map +1 -0
- package/cjs/chunks/{bundle-NLD3XGHp.js → bundle-AjkDYnfX.js} +4 -4
- package/cjs/chunks/{bundle-NLD3XGHp.js.map → bundle-AjkDYnfX.js.map} +1 -1
- package/cjs/chunks/{bundle-CCWL4_Bj.js → bundle-B14gP5iL.js} +1 -1
- package/cjs/chunks/bundle-B14gP5iL.js.map +1 -0
- package/cjs/chunks/{bundle-2_6pbUrU.js → bundle-B3MkpbB1.js} +2 -2
- package/cjs/chunks/bundle-B3MkpbB1.js.map +1 -0
- package/cjs/chunks/{bundle-BL5M4yXI.js → bundle-B4v0Agxd.js} +1 -1
- package/cjs/chunks/bundle-B4v0Agxd.js.map +1 -0
- package/cjs/chunks/{bundle-BM_oajIx.js → bundle-BFmC2V1o.js} +8 -8
- package/cjs/chunks/bundle-BFmC2V1o.js.map +1 -0
- package/cjs/chunks/{bundle-BOHlEif7.js → bundle-BKn9ow_B.js} +1 -1
- package/cjs/chunks/{bundle-BOHlEif7.js.map → bundle-BKn9ow_B.js.map} +1 -1
- package/cjs/chunks/{bundle-BwsikcS8.js → bundle-BNgfU9I_.js} +1 -1
- package/cjs/chunks/bundle-BNgfU9I_.js.map +1 -0
- package/cjs/chunks/{bundle-B7RDGS3d.js → bundle-BNu-mNlA.js} +8 -8
- package/cjs/chunks/bundle-BNu-mNlA.js.map +1 -0
- package/cjs/chunks/{bundle-cWZTmuuh.js → bundle-BPfnvsLX.js} +3 -3
- package/cjs/chunks/bundle-BPfnvsLX.js.map +1 -0
- package/cjs/chunks/{bundle-BQFjw5g0.js → bundle-BSCZWP_l.js} +1 -1
- package/cjs/chunks/bundle-BSCZWP_l.js.map +1 -0
- package/cjs/chunks/{bundle-oeZ9Mu_e.js → bundle-BSEj3ItE.js} +1 -1
- package/cjs/chunks/bundle-BSEj3ItE.js.map +1 -0
- package/cjs/chunks/{bundle-DqSg-zio.js → bundle-BSfAJlO9.js} +3 -3
- package/cjs/chunks/bundle-BSfAJlO9.js.map +1 -0
- package/cjs/chunks/{bundle-Cll1iNxk.js → bundle-BTzm82Jl.js} +8 -10
- package/cjs/chunks/{bundle-Cll1iNxk.js.map → bundle-BTzm82Jl.js.map} +1 -1
- package/cjs/chunks/{bundle-DvWSVzag.js → bundle-BVmEHs1Z.js} +51 -26
- package/cjs/chunks/{bundle-DvWSVzag.js.map → bundle-BVmEHs1Z.js.map} +1 -1
- package/cjs/chunks/{bundle-CdZGTXx9.js → bundle-BVn2UMtk.js} +1 -1
- package/cjs/chunks/bundle-BVn2UMtk.js.map +1 -0
- package/cjs/chunks/{bundle-DvYB_ALf.js → bundle-BX9WTltL.js} +12 -12
- package/cjs/chunks/bundle-BX9WTltL.js.map +1 -0
- package/cjs/chunks/{bundle-C-sNT-AX.js → bundle-BXuNw6bR.js} +1 -1
- package/cjs/chunks/{bundle-C-sNT-AX.js.map → bundle-BXuNw6bR.js.map} +1 -1
- package/cjs/chunks/{bundle-D9Wy18VM.js → bundle-Bcw-YfFm.js} +1 -1
- package/cjs/chunks/bundle-Bcw-YfFm.js.map +1 -0
- package/cjs/chunks/{bundle-CE-VoGP-.js → bundle-BiR_Hvsk.js} +1 -1
- package/cjs/chunks/bundle-BiR_Hvsk.js.map +1 -0
- package/cjs/chunks/bundle-BjZvm-U5.js +49 -0
- package/cjs/chunks/bundle-BjZvm-U5.js.map +1 -0
- package/cjs/chunks/{bundle-vDWY1z2Z.js → bundle-BrAZmQ3O.js} +3 -3
- package/cjs/chunks/bundle-BrAZmQ3O.js.map +1 -0
- package/cjs/chunks/{bundle-eQiz8T6M.js → bundle-BreYBYIV.js} +35 -35
- package/cjs/chunks/{bundle-eQiz8T6M.js.map → bundle-BreYBYIV.js.map} +1 -1
- package/cjs/chunks/{bundle-D8mb0bUY.js → bundle-Buar9ys-.js} +9 -9
- package/cjs/chunks/{bundle-D8mb0bUY.js.map → bundle-Buar9ys-.js.map} +1 -1
- package/cjs/chunks/{bundle-DDkOZQii.js → bundle-Bwhgb7dL.js} +1 -1
- package/cjs/chunks/bundle-Bwhgb7dL.js.map +1 -0
- package/cjs/chunks/{bundle-D9x3No8L.js → bundle-BzJwE_My.js} +97 -78
- package/{chunks/bundle-yJIT2XDk.js.map → cjs/chunks/bundle-BzJwE_My.js.map} +1 -1
- package/cjs/chunks/{bundle-TEBEFl6a.js → bundle-C0QyatLj.js} +6 -6
- package/cjs/chunks/bundle-C0QyatLj.js.map +1 -0
- package/cjs/chunks/{bundle-BJYfQ4s4.js → bundle-C8s_p9Hf.js} +7 -7
- package/cjs/chunks/bundle-C8s_p9Hf.js.map +1 -0
- package/cjs/chunks/{bundle-QaZWYrEC.js → bundle-CArwk_DH.js} +1 -1
- package/cjs/chunks/bundle-CArwk_DH.js.map +1 -0
- package/cjs/chunks/{bundle-DoGdirRr.js → bundle-CBQxHnhS.js} +2 -2
- package/cjs/chunks/{bundle-DoGdirRr.js.map → bundle-CBQxHnhS.js.map} +1 -1
- package/cjs/chunks/{bundle-D3d1xmjt.js → bundle-CID8L5Tq.js} +26 -16
- package/cjs/chunks/bundle-CID8L5Tq.js.map +1 -0
- package/cjs/chunks/{bundle-B4XlG9FO.js → bundle-CIgMOlz1.js} +2 -2
- package/cjs/chunks/bundle-CIgMOlz1.js.map +1 -0
- package/cjs/chunks/{bundle-C29AY54U.js → bundle-CIn5419q.js} +10 -10
- package/cjs/chunks/bundle-CIn5419q.js.map +1 -0
- package/cjs/chunks/{bundle-CPuSTw7t.js → bundle-CXWT21Ur.js} +2 -2
- package/cjs/chunks/bundle-CXWT21Ur.js.map +1 -0
- package/cjs/chunks/{bundle-BffvsF9C.js → bundle-CXeHa80f.js} +4 -4
- package/cjs/chunks/bundle-CXeHa80f.js.map +1 -0
- package/cjs/chunks/{bundle-BeQdqOWX.js → bundle-CZmT_dIf.js} +1 -1
- package/cjs/chunks/bundle-CZmT_dIf.js.map +1 -0
- package/cjs/chunks/{bundle-mPsaH5U9.js → bundle-CdalwlxE.js} +4 -4
- package/cjs/chunks/bundle-CdalwlxE.js.map +1 -0
- package/cjs/chunks/{bundle-UHQZNGhZ.js → bundle-CeCg868O.js} +1 -1
- package/cjs/chunks/bundle-CeCg868O.js.map +1 -0
- package/cjs/chunks/{bundle-B5ue2ic0.js → bundle-CgDPAVTm.js} +4 -4
- package/cjs/chunks/bundle-CgDPAVTm.js.map +1 -0
- package/cjs/chunks/{bundle-Bjb4mIZC.js → bundle-ClT0IexP.js} +4 -4
- package/cjs/chunks/bundle-ClT0IexP.js.map +1 -0
- package/cjs/chunks/{bundle-CDa_AAan.js → bundle-CoU1-PYo.js} +3 -3
- package/cjs/chunks/bundle-CoU1-PYo.js.map +1 -0
- package/cjs/chunks/{bundle-B6wPJMBO.js → bundle-CofqAAwu.js} +9 -9
- package/cjs/chunks/{bundle-B6wPJMBO.js.map → bundle-CofqAAwu.js.map} +1 -1
- package/cjs/chunks/{bundle-CupeqF2S.js → bundle-CsVrpeSa.js} +222 -149
- package/cjs/chunks/bundle-CsVrpeSa.js.map +1 -0
- package/cjs/chunks/{bundle-CNxWQqoS.js → bundle-CskFALvU.js} +24 -6
- package/cjs/chunks/{bundle-CNxWQqoS.js.map → bundle-CskFALvU.js.map} +1 -1
- package/cjs/chunks/{bundle-CuVdJwKh.js → bundle-CtIVPWwX.js} +5 -5
- package/cjs/chunks/bundle-CtIVPWwX.js.map +1 -0
- package/cjs/chunks/{bundle-Cco0Civb.js → bundle-CxHNqGL1.js} +12 -12
- package/cjs/chunks/{bundle-Cco0Civb.js.map → bundle-CxHNqGL1.js.map} +1 -1
- package/cjs/chunks/{bundle-BgLRyBNQ.js → bundle-Czc5a05Q.js} +7 -7
- package/cjs/chunks/bundle-Czc5a05Q.js.map +1 -0
- package/cjs/chunks/bundle-CzhNQgac.js +714 -0
- package/cjs/chunks/bundle-CzhNQgac.js.map +1 -0
- package/cjs/chunks/{bundle-Dwls0-Q0.js → bundle-D-_6Kk3L.js} +6 -2
- package/cjs/chunks/bundle-D-_6Kk3L.js.map +1 -0
- package/cjs/chunks/{bundle-5VhZKYIJ.js → bundle-D4-t2BcI.js} +1 -1
- package/cjs/chunks/bundle-D4-t2BcI.js.map +1 -0
- package/cjs/chunks/{bundle-CCpd42nC.js → bundle-D4QmbyQp.js} +2 -2
- package/cjs/chunks/bundle-D4QmbyQp.js.map +1 -0
- package/cjs/chunks/{bundle-D64wX3ZA.js → bundle-D5X7fpcq.js} +2 -4
- package/cjs/chunks/bundle-D5X7fpcq.js.map +1 -0
- package/cjs/chunks/{bundle-Czw_qpiM.js → bundle-D8gpRIxO.js} +1 -1
- package/cjs/chunks/bundle-D8gpRIxO.js.map +1 -0
- package/cjs/chunks/{bundle-8rTW0vfg.js → bundle-DDUAkmTu.js} +1 -1
- package/cjs/chunks/bundle-DDUAkmTu.js.map +1 -0
- package/cjs/chunks/{bundle-Cc0re38P.js → bundle-DEaaC1ah.js} +1 -1
- package/cjs/chunks/bundle-DEaaC1ah.js.map +1 -0
- package/cjs/chunks/{bundle-AHixe4ku.js → bundle-DGYb2_L_.js} +6 -6
- package/cjs/chunks/bundle-DGYb2_L_.js.map +1 -0
- package/cjs/chunks/{bundle-D34myP8B.js → bundle-DHLpqx03.js} +8 -8
- package/cjs/chunks/bundle-DHLpqx03.js.map +1 -0
- package/cjs/chunks/{bundle-BNq5tPbD.js → bundle-DHOzCMYH.js} +61 -16
- package/cjs/chunks/bundle-DHOzCMYH.js.map +1 -0
- package/cjs/chunks/{bundle-Dr8s7l1j.js → bundle-DKZYkV6h.js} +4 -4
- package/cjs/chunks/bundle-DKZYkV6h.js.map +1 -0
- package/cjs/chunks/{bundle-Bpc04WVm.js → bundle-DS7dko_G.js} +1 -1
- package/cjs/chunks/{bundle-Bpc04WVm.js.map → bundle-DS7dko_G.js.map} +1 -1
- package/cjs/chunks/{bundle-B5DI1itX.js → bundle-DUmpUM6Z.js} +1 -1
- package/cjs/chunks/bundle-DUmpUM6Z.js.map +1 -0
- package/cjs/chunks/{bundle-Dz379Vmq.js → bundle-DZN-28o5.js} +1 -1
- package/cjs/chunks/bundle-DZN-28o5.js.map +1 -0
- package/cjs/chunks/{bundle-DmR0_slE.js → bundle-DaeRuO3M.js} +77 -47
- package/cjs/chunks/bundle-DaeRuO3M.js.map +1 -0
- package/cjs/chunks/{bundle-BE_0v0fP.js → bundle-DgHpd49A.js} +9 -11
- package/cjs/chunks/bundle-DgHpd49A.js.map +1 -0
- package/cjs/chunks/{bundle-Dr1OK02d.js → bundle-DnOJJX7f.js} +1 -1
- package/cjs/chunks/bundle-DnOJJX7f.js.map +1 -0
- package/cjs/chunks/{bundle-U6Y2jYcy.js → bundle-DogWmRlf.js} +33 -22
- package/{chunks/bundle-C5JanUlq.js.map → cjs/chunks/bundle-DogWmRlf.js.map} +1 -1
- package/cjs/chunks/{bundle-BVWhTr3J.js → bundle-Dqt-Moft.js} +1 -1
- package/cjs/chunks/bundle-Dqt-Moft.js.map +1 -0
- package/cjs/chunks/bundle-DvHjgbFi.js +7 -0
- package/cjs/chunks/bundle-DvHjgbFi.js.map +1 -0
- package/cjs/chunks/{bundle-DTcOyI0C.js → bundle-DwLWArJq.js} +2 -2
- package/cjs/chunks/bundle-DwLWArJq.js.map +1 -0
- package/cjs/chunks/{bundle-BPerQ7Nn.js → bundle-DxZzcGya.js} +3 -3
- package/{chunks/bundle-D4as5hKh.js.map → cjs/chunks/bundle-DxZzcGya.js.map} +1 -1
- package/cjs/chunks/{bundle-VjeTD0aT.js → bundle-FGb-8cIo.js} +14 -14
- package/cjs/chunks/bundle-FGb-8cIo.js.map +1 -0
- package/cjs/chunks/{bundle-lblAS-IJ.js → bundle-FVds7Nnw.js} +7 -7
- package/cjs/chunks/bundle-FVds7Nnw.js.map +1 -0
- package/cjs/chunks/bundle-Hqqb920S.js +120 -0
- package/cjs/chunks/bundle-Hqqb920S.js.map +1 -0
- package/cjs/chunks/{bundle-BcQ3ko6U.js → bundle-IobNGCyV.js} +3 -3
- package/cjs/chunks/bundle-IobNGCyV.js.map +1 -0
- package/cjs/chunks/{bundle-BleSzbM_.js → bundle-Iy7lVhfX.js} +20 -18
- package/cjs/chunks/bundle-Iy7lVhfX.js.map +1 -0
- package/cjs/chunks/{bundle-8fa3LqxP.js → bundle-Lc8Xpc4e.js} +1 -1
- package/cjs/chunks/bundle-Lc8Xpc4e.js.map +1 -0
- package/cjs/chunks/{bundle-DMG2AtFE.js → bundle-SlJSIlpP.js} +9 -9
- package/cjs/chunks/{bundle-DMG2AtFE.js.map → bundle-SlJSIlpP.js.map} +1 -1
- package/cjs/chunks/{bundle-Cj4QTkbo.js → bundle-_yh4eC6v.js} +8 -8
- package/{chunks/bundle-B_1lMJw7.js.map → cjs/chunks/bundle-_yh4eC6v.js.map} +1 -1
- package/cjs/chunks/{bundle-Dd2G9BuN.js → bundle-bmGcb273.js} +5 -5
- package/cjs/chunks/bundle-bmGcb273.js.map +1 -0
- package/cjs/chunks/{bundle--OptrnnH.js → bundle-btgMGRIX.js} +5 -5
- package/cjs/chunks/bundle-btgMGRIX.js.map +1 -0
- package/cjs/chunks/bundle-gKWdBSmm.js +163 -0
- package/cjs/chunks/bundle-gKWdBSmm.js.map +1 -0
- package/cjs/chunks/{bundle-Cm6xW6b-.js → bundle-iF1pW7_s.js} +2 -2
- package/cjs/chunks/bundle-iF1pW7_s.js.map +1 -0
- package/cjs/chunks/{bundle-DCE4aPIh.js → bundle-iWa9rWFV.js} +17 -8
- package/cjs/chunks/bundle-iWa9rWFV.js.map +1 -0
- package/cjs/chunks/{bundle-BO7CCDGO.js → bundle-iwIElqGP.js} +2 -2
- package/{chunks/bundle-CX6EYwvX.js.map → cjs/chunks/bundle-iwIElqGP.js.map} +1 -1
- package/cjs/chunks/{bundle-DXxZOPH7.js → bundle-jAsAzWpU.js} +1 -1
- package/cjs/chunks/{bundle-BE_0v0fP.js.map → bundle-jAsAzWpU.js.map} +1 -1
- package/cjs/chunks/{bundle-BI-qtSLE.js → bundle-mNJHRgJ3.js} +1 -1
- package/cjs/chunks/bundle-mNJHRgJ3.js.map +1 -0
- package/cjs/chunks/{bundle-DNRo8vQ6.js → bundle-mOGMtPz8.js} +1 -1
- package/cjs/chunks/bundle-mOGMtPz8.js.map +1 -0
- package/cjs/chunks/{bundle-6XexheFI.js → bundle-mVBmPsCD.js} +37 -37
- package/cjs/chunks/{bundle-6XexheFI.js.map → bundle-mVBmPsCD.js.map} +1 -1
- package/cjs/chunks/{bundle-BGGRSN-Z.js → bundle-npZxEXNX.js} +11 -11
- package/cjs/chunks/{bundle-BGGRSN-Z.js.map → bundle-npZxEXNX.js.map} +1 -1
- package/cjs/chunks/{bundle-BL3oBZ_9.js → bundle-on0zTbLT.js} +24 -28
- package/cjs/chunks/bundle-on0zTbLT.js.map +1 -0
- package/cjs/chunks/{bundle-DqS61Vd8.js → bundle-y79foBWw.js} +7 -7
- package/cjs/chunks/bundle-y79foBWw.js.map +1 -0
- package/cjs/hooks/useConnectionState.js +5 -5
- package/cjs/hooks/useLocalization.js +4 -4
- package/cjs/hooks/useModal.js +13 -13
- package/cjs/index.js +95 -93
- package/cjs/index.js.map +1 -1
- package/cjs/lame.all.js +1 -1
- package/cjs/lame.all.js.map +1 -1
- package/cjs/pubSub/topics.js +1 -1
- package/cjs/sendbirdSelectors.js +2 -2
- package/cjs/ui/Accordion.js +2 -2
- package/cjs/ui/AccordionGroup.js +1 -1
- package/cjs/ui/AdminMessage.js +3 -3
- package/cjs/ui/Avatar.js +4 -4
- package/cjs/ui/Badge.js +5 -5
- package/cjs/ui/BottomSheet.js +13 -13
- package/cjs/ui/Button.js +3 -3
- package/cjs/ui/ChannelAvatar.js +5 -5
- package/cjs/ui/ConnectionStatus.js +6 -6
- package/cjs/ui/ContextMenu.js +14 -14
- package/cjs/ui/DateSeparator.js +4 -4
- package/cjs/ui/EmojiReactions.js +23 -23
- package/cjs/ui/FallbackTemplateMessageItemBody.tsx.js +10 -10
- package/cjs/ui/FileMessageItemBody.js +13 -13
- package/cjs/ui/FileViewer.js +19 -20
- package/cjs/ui/FileViewer.js.map +1 -1
- package/cjs/ui/Header.js +10 -10
- package/cjs/ui/Icon.js +2 -2
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +1 -1
- package/cjs/ui/ImageRenderer.js +2 -2
- package/cjs/ui/Input.js +3 -3
- package/cjs/ui/Label.js +3 -3
- package/cjs/ui/LinkLabel.js +4 -4
- package/cjs/ui/Loader.js +2 -2
- package/cjs/ui/LoadingTemplateMessageItemBody.tsx.js +2 -2
- package/cjs/ui/MentionLabel.js +19 -19
- package/cjs/ui/MentionUserLabel.js +2 -2
- package/cjs/ui/MessageContent.js +42 -42
- package/cjs/ui/MessageFeedbackFailedModal.js +13 -13
- package/cjs/ui/MessageFeedbackModal.js +13 -13
- package/cjs/ui/MessageInput/hooks/usePaste.js +7 -7
- package/cjs/ui/MessageInput.js +26 -467
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +15 -15
- package/cjs/ui/MessageItemReactionMenu.js +16 -16
- package/cjs/ui/MessageMenu.js +16 -16
- package/cjs/ui/MessageSearchFileItem.js +25 -25
- package/cjs/ui/MessageSearchItem.js +12 -12
- package/cjs/ui/MessageStatus.js +15 -15
- package/cjs/ui/MessageTemplate.js +1 -1
- package/cjs/ui/MobileFeedbackMenu.js +13 -13
- package/cjs/ui/MobileMenu.js +18 -18
- package/cjs/ui/Modal.js +12 -12
- package/cjs/ui/MutedAvatarOverlay.js +2 -2
- package/cjs/ui/OGMessageItemBody.js +23 -23
- package/cjs/ui/OpenChannelAdminMessage.js +3 -3
- package/cjs/ui/OpenChannelAvatar.js +8 -8
- package/cjs/ui/OpenchannelConversationHeader.js +8 -8
- package/cjs/ui/OpenchannelFileMessage.js +25 -25
- package/cjs/ui/OpenchannelOGMessage.js +28 -28
- package/cjs/ui/OpenchannelThumbnailMessage.js +24 -24
- package/cjs/ui/OpenchannelUserMessage.js +26 -26
- package/cjs/ui/PlaceHolder.js +6 -6
- package/cjs/ui/PlaybackTime.js +3 -3
- package/cjs/ui/ProgressBar.js +1 -1
- package/cjs/ui/QuoteMessage.js +12 -12
- package/cjs/ui/QuoteMessageInput.js +12 -12
- package/cjs/ui/ReactionBadge.js +3 -3
- package/cjs/ui/ReactionButton.js +4 -4
- package/cjs/ui/SortByRow.js +2 -2
- package/cjs/ui/TemplateMessageItemBody.js +14 -14
- package/cjs/ui/TextButton.js +2 -2
- package/cjs/ui/TextMessageItemBody.js +22 -22
- package/cjs/ui/ThreadReplies.js +12 -12
- package/cjs/ui/ThumbnailMessageItemBody.js +10 -10
- package/cjs/ui/Toggle.js +4 -4
- package/cjs/ui/Tooltip.js +3 -3
- package/cjs/ui/TooltipWrapper.js +1 -1
- package/cjs/ui/TypingIndicatorBubble.js +4 -4
- package/cjs/ui/UnknownMessageItemBody.js +10 -10
- package/cjs/ui/UserListItem.js +19 -19
- package/cjs/ui/UserListItemMenu.js +16 -16
- package/cjs/ui/UserProfile.js +13 -13
- package/cjs/ui/VoiceMessageInput.js +9 -9
- package/cjs/ui/VoiceMessageItemBody.js +14 -14
- package/cjs/ui/Word.js +19 -19
- package/cjs/useSendbirdStateContext.js +4 -4
- package/cjs/utils/message/isVoiceMessage.js +6 -6
- package/cjs/withSendbird.js +24 -24
- package/dist/index.css +320 -2
- package/hooks/useConnectionState.js +5 -5
- package/hooks/useLocalization.js +4 -4
- package/hooks/useModal.js +15 -15
- package/index.js +95 -93
- package/index.js.map +1 -1
- package/lame.all.js +1 -1
- package/lame.all.js.map +1 -1
- package/package.json +2 -2
- package/pubSub/topics.js +1 -1
- package/sendbirdSelectors.js +2 -2
- package/types/hooks/VoicePlayer/index.d.ts +1 -0
- package/types/hooks/useTypingLifecycle.d.ts +21 -0
- package/types/lib/Sendbird/utils.d.ts +4 -3
- package/types/modules/Channel/context/hooks/useHandleUploadFiles.d.ts +2 -1
- package/types/modules/GroupChannel/components/MessageInputWrapper/useHandleUploadFiles.d.ts +2 -1
- package/types/modules/OpenChannel/context/hooks/useFileUploadCallback.d.ts +1 -1
- package/types/modules/Thread/context/ThreadProvider.d.ts +3 -2
- package/types/modules/Thread/context/hooks/useUpdateMessageCallback.d.ts +1 -0
- package/types/modules/Thread/context/useThread.d.ts +3 -2
- package/types/ui/Label/stringSet.d.ts +4 -0
- package/types/ui/MessageInput/composer/PendingFileCard.d.ts +14 -0
- package/types/ui/MessageInput/composer/PendingFileItem.d.ts +13 -0
- package/types/ui/MessageInput/composer/PendingFilesPreview.d.ts +9 -0
- package/types/ui/MessageInput/hooks/useDragAndDrop.d.ts +25 -0
- package/types/ui/MessageInput/hooks/usePaste/index.d.ts +1 -1
- package/types/ui/MessageInput/hooks/usePaste/types.d.ts +5 -0
- package/types/ui/MessageInput/hooks/usePendingFiles.d.ts +35 -0
- package/types/ui/MessageInput/index.d.ts +33 -0
- package/types/ui/MessageInput/utils.d.ts +2 -0
- package/types/utils/fileValidation.d.ts +62 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/truncateMiddleKeepExtension.d.ts +20 -0
- package/ui/Accordion.js +2 -2
- package/ui/AccordionGroup.js +1 -1
- package/ui/AdminMessage.js +3 -3
- package/ui/Avatar.js +4 -4
- package/ui/Badge.js +5 -5
- package/ui/BottomSheet.js +13 -13
- package/ui/Button.js +3 -3
- package/ui/ChannelAvatar.js +6 -6
- package/ui/ConnectionStatus.js +7 -7
- package/ui/ContextMenu.js +14 -14
- package/ui/DateSeparator.js +4 -4
- package/ui/EmojiReactions.js +24 -24
- package/ui/FallbackTemplateMessageItemBody.tsx.js +10 -10
- package/ui/FileMessageItemBody.js +14 -14
- package/ui/FileViewer.js +20 -21
- package/ui/FileViewer.js.map +1 -1
- package/ui/Header.js +6 -6
- package/ui/Icon.js +2 -2
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +1 -1
- package/ui/ImageRenderer.js +2 -2
- package/ui/Input.js +3 -3
- package/ui/Label.js +3 -3
- package/ui/LinkLabel.js +4 -4
- package/ui/Loader.js +2 -2
- package/ui/LoadingTemplateMessageItemBody.tsx.js +3 -3
- package/ui/MentionLabel.js +19 -19
- package/ui/MentionUserLabel.js +2 -2
- package/ui/MessageContent.js +42 -42
- package/ui/MessageFeedbackFailedModal.js +13 -13
- package/ui/MessageFeedbackModal.js +13 -13
- package/ui/MessageInput/hooks/usePaste.js +7 -7
- package/ui/MessageInput.js +25 -466
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +16 -16
- package/ui/MessageItemReactionMenu.js +17 -17
- package/ui/MessageMenu.js +16 -16
- package/ui/MessageSearchFileItem.js +17 -17
- package/ui/MessageSearchItem.js +12 -12
- package/ui/MessageStatus.js +15 -15
- package/ui/MessageTemplate.js +1 -1
- package/ui/MobileFeedbackMenu.js +13 -13
- package/ui/MobileMenu.js +19 -19
- package/ui/Modal.js +12 -12
- package/ui/MutedAvatarOverlay.js +3 -3
- package/ui/OGMessageItemBody.js +23 -23
- package/ui/OpenChannelAdminMessage.js +3 -3
- package/ui/OpenChannelAvatar.js +8 -8
- package/ui/OpenchannelConversationHeader.js +9 -9
- package/ui/OpenchannelFileMessage.js +25 -25
- package/ui/OpenchannelOGMessage.js +29 -29
- package/ui/OpenchannelThumbnailMessage.js +24 -24
- package/ui/OpenchannelUserMessage.js +27 -27
- package/ui/PlaceHolder.js +7 -7
- package/ui/PlaybackTime.js +3 -3
- package/ui/ProgressBar.js +1 -1
- package/ui/QuoteMessage.js +13 -13
- package/ui/QuoteMessageInput.js +13 -13
- package/ui/ReactionBadge.js +3 -3
- package/ui/ReactionButton.js +4 -4
- package/ui/SortByRow.js +2 -2
- package/ui/TemplateMessageItemBody.js +14 -14
- package/ui/TextButton.js +2 -2
- package/ui/TextMessageItemBody.js +22 -22
- package/ui/ThreadReplies.js +9 -9
- package/ui/ThumbnailMessageItemBody.js +11 -11
- package/ui/Toggle.js +4 -4
- package/ui/Tooltip.js +3 -3
- package/ui/TooltipWrapper.js +1 -1
- package/ui/TypingIndicatorBubble.js +4 -4
- package/ui/UnknownMessageItemBody.js +10 -10
- package/ui/UserListItem.js +19 -19
- package/ui/UserListItemMenu.js +17 -17
- package/ui/UserProfile.js +13 -13
- package/ui/VoiceMessageInput.js +9 -9
- package/ui/VoiceMessageItemBody.js +15 -15
- package/ui/Word.js +19 -19
- package/useSendbirdStateContext.js +4 -4
- package/utils/message/isVoiceMessage.js +6 -6
- package/withSendbird.js +24 -24
- package/chunks/bundle-0zReDi7b.js.map +0 -1
- package/chunks/bundle-3JP5bt3Z.js.map +0 -1
- package/chunks/bundle-4FHXjC0T.js.map +0 -1
- package/chunks/bundle-B07oZGKu.js.map +0 -1
- package/chunks/bundle-B5yOEM4l.js.map +0 -1
- package/chunks/bundle-B7yb0nm6.js +0 -4
- package/chunks/bundle-B7yb0nm6.js.map +0 -1
- package/chunks/bundle-BDaOve18.js.map +0 -1
- package/chunks/bundle-BE6zj_MW.js.map +0 -1
- package/chunks/bundle-BMMEMc9R.js.map +0 -1
- package/chunks/bundle-BdqzVlr4.js.map +0 -1
- package/chunks/bundle-BrZWYj5G.js.map +0 -1
- package/chunks/bundle-C5IAP1zO.js.map +0 -1
- package/chunks/bundle-C7rLZX4P.js.map +0 -1
- package/chunks/bundle-CBhbbqeO.js.map +0 -1
- package/chunks/bundle-CC_Jz6mm.js.map +0 -1
- package/chunks/bundle-CD6CGxYu.js.map +0 -1
- package/chunks/bundle-CE8XZeIa.js.map +0 -1
- package/chunks/bundle-CH1SOYd0.js.map +0 -1
- package/chunks/bundle-CQJQkdjB.js.map +0 -1
- package/chunks/bundle-CTBJyV2C.js.map +0 -1
- package/chunks/bundle-CTVS7EpI.js.map +0 -1
- package/chunks/bundle-CTZdxGd-.js.map +0 -1
- package/chunks/bundle-CWhu5cnC.js.map +0 -1
- package/chunks/bundle-CdzKrMjw.js.map +0 -1
- package/chunks/bundle-CeLEEyFJ.js.map +0 -1
- package/chunks/bundle-CfGa1Ywx.js.map +0 -1
- package/chunks/bundle-CgAh8D8l.js.map +0 -1
- package/chunks/bundle-CjCG01vR.js.map +0 -1
- package/chunks/bundle-CmTULFbc.js.map +0 -1
- package/chunks/bundle-Cq01dsQs.js.map +0 -1
- package/chunks/bundle-D1MmNbfE.js.map +0 -1
- package/chunks/bundle-D3DfLeep.js.map +0 -1
- package/chunks/bundle-D67XuNKa.js.map +0 -1
- package/chunks/bundle-D8iL7lya.js.map +0 -1
- package/chunks/bundle-DCbF_EZ6.js.map +0 -1
- package/chunks/bundle-DCwgKOlw.js.map +0 -1
- package/chunks/bundle-DGZK0j-W.js.map +0 -1
- package/chunks/bundle-DKmGgarH.js.map +0 -1
- package/chunks/bundle-DNZm2aCn.js.map +0 -1
- package/chunks/bundle-DPFUYsH2.js.map +0 -1
- package/chunks/bundle-DUhFIvq0.js.map +0 -1
- package/chunks/bundle-DYbMoqiD.js.map +0 -1
- package/chunks/bundle-DajAePTd.js.map +0 -1
- package/chunks/bundle-DdGdUttq.js.map +0 -1
- package/chunks/bundle-DiKiLU8g.js.map +0 -1
- package/chunks/bundle-DmoshxdI.js.map +0 -1
- package/chunks/bundle-DoCZ7Yns.js.map +0 -1
- package/chunks/bundle-Dtcjhm7e.js.map +0 -1
- package/chunks/bundle-DvFk9hZu.js.map +0 -1
- package/chunks/bundle-K4xHiJfN.js.map +0 -1
- package/chunks/bundle-LKiKEQMD.js.map +0 -1
- package/chunks/bundle-MfWZwGxM.js.map +0 -1
- package/chunks/bundle-NRNsjiKk.js.map +0 -1
- package/chunks/bundle-QqMAlWsP.js.map +0 -1
- package/chunks/bundle-deCJFaXg.js.map +0 -1
- package/cjs/chunks/bundle--OptrnnH.js.map +0 -1
- package/cjs/chunks/bundle-2_6pbUrU.js.map +0 -1
- package/cjs/chunks/bundle-5VhZKYIJ.js.map +0 -1
- package/cjs/chunks/bundle-8fa3LqxP.js.map +0 -1
- package/cjs/chunks/bundle-8rTW0vfg.js.map +0 -1
- package/cjs/chunks/bundle-99j0pbE6.js.map +0 -1
- package/cjs/chunks/bundle-AHixe4ku.js.map +0 -1
- package/cjs/chunks/bundle-B4XlG9FO.js.map +0 -1
- package/cjs/chunks/bundle-B5DI1itX.js.map +0 -1
- package/cjs/chunks/bundle-B5ue2ic0.js.map +0 -1
- package/cjs/chunks/bundle-B7RDGS3d.js.map +0 -1
- package/cjs/chunks/bundle-BI-qtSLE.js.map +0 -1
- package/cjs/chunks/bundle-BJYfQ4s4.js.map +0 -1
- package/cjs/chunks/bundle-BL3oBZ_9.js.map +0 -1
- package/cjs/chunks/bundle-BL5M4yXI.js.map +0 -1
- package/cjs/chunks/bundle-BM_oajIx.js.map +0 -1
- package/cjs/chunks/bundle-BNq5tPbD.js.map +0 -1
- package/cjs/chunks/bundle-BO7CCDGO.js.map +0 -1
- package/cjs/chunks/bundle-BQFjw5g0.js.map +0 -1
- package/cjs/chunks/bundle-BVWhTr3J.js.map +0 -1
- package/cjs/chunks/bundle-BcQ3ko6U.js.map +0 -1
- package/cjs/chunks/bundle-BeQdqOWX.js.map +0 -1
- package/cjs/chunks/bundle-BffvsF9C.js.map +0 -1
- package/cjs/chunks/bundle-BgLRyBNQ.js.map +0 -1
- package/cjs/chunks/bundle-Bjb4mIZC.js.map +0 -1
- package/cjs/chunks/bundle-BleSzbM_.js.map +0 -1
- package/cjs/chunks/bundle-BwsikcS8.js.map +0 -1
- package/cjs/chunks/bundle-C29AY54U.js.map +0 -1
- package/cjs/chunks/bundle-C6JU7bHv.js +0 -7
- package/cjs/chunks/bundle-C6JU7bHv.js.map +0 -1
- package/cjs/chunks/bundle-CCWL4_Bj.js.map +0 -1
- package/cjs/chunks/bundle-CCpd42nC.js.map +0 -1
- package/cjs/chunks/bundle-CDa_AAan.js.map +0 -1
- package/cjs/chunks/bundle-CE-VoGP-.js.map +0 -1
- package/cjs/chunks/bundle-CPuSTw7t.js.map +0 -1
- package/cjs/chunks/bundle-Cc0re38P.js.map +0 -1
- package/cjs/chunks/bundle-CdZGTXx9.js.map +0 -1
- package/cjs/chunks/bundle-Cm6xW6b-.js.map +0 -1
- package/cjs/chunks/bundle-CnoOxWnY.js.map +0 -1
- package/cjs/chunks/bundle-CuVdJwKh.js.map +0 -1
- package/cjs/chunks/bundle-CupeqF2S.js.map +0 -1
- package/cjs/chunks/bundle-Czw_qpiM.js.map +0 -1
- package/cjs/chunks/bundle-D34myP8B.js.map +0 -1
- package/cjs/chunks/bundle-D64wX3ZA.js.map +0 -1
- package/cjs/chunks/bundle-D9Wy18VM.js.map +0 -1
- package/cjs/chunks/bundle-DDkOZQii.js.map +0 -1
- package/cjs/chunks/bundle-DFv16RSR.js.map +0 -1
- package/cjs/chunks/bundle-DNRo8vQ6.js.map +0 -1
- package/cjs/chunks/bundle-DTcOyI0C.js.map +0 -1
- package/cjs/chunks/bundle-DXxZOPH7.js.map +0 -1
- package/cjs/chunks/bundle-Dd2G9BuN.js.map +0 -1
- package/cjs/chunks/bundle-DqS61Vd8.js.map +0 -1
- package/cjs/chunks/bundle-DqSg-zio.js.map +0 -1
- package/cjs/chunks/bundle-Dr1OK02d.js.map +0 -1
- package/cjs/chunks/bundle-Dr8s7l1j.js.map +0 -1
- package/cjs/chunks/bundle-DvYB_ALf.js.map +0 -1
- package/cjs/chunks/bundle-Dwls0-Q0.js.map +0 -1
- package/cjs/chunks/bundle-Dz379Vmq.js.map +0 -1
- package/cjs/chunks/bundle-QaZWYrEC.js.map +0 -1
- package/cjs/chunks/bundle-TEBEFl6a.js.map +0 -1
- package/cjs/chunks/bundle-UHQZNGhZ.js.map +0 -1
- package/cjs/chunks/bundle-VjeTD0aT.js.map +0 -1
- package/cjs/chunks/bundle-cTlYBGMg.js.map +0 -1
- package/cjs/chunks/bundle-cWZTmuuh.js.map +0 -1
- package/cjs/chunks/bundle-lblAS-IJ.js.map +0 -1
- package/cjs/chunks/bundle-mPsaH5U9.js.map +0 -1
- package/cjs/chunks/bundle-oeZ9Mu_e.js.map +0 -1
- package/cjs/chunks/bundle-vDWY1z2Z.js.map +0 -1
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import { _ as __assign, e as __spreadArray } from './bundle-Bpofr334.js';
|
|
2
|
+
import React__default, { useContext, useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
3
|
+
import { M as MessageInputKeys, a as NodeTypes } from './bundle-BEPoP7sp.js';
|
|
4
|
+
import { b as USER_MENTION_TEMP_CHAR } from './bundle-CFc2hy8g.js';
|
|
5
|
+
import IconButton from '../ui/IconButton.js';
|
|
6
|
+
import Button, { ButtonSizes, ButtonTypes } from '../ui/Button.js';
|
|
7
|
+
import { r as renderToString, s as sanitizeString, n as nodeListToArray, u as usePaste, i as isChannelTypeSupportsMultipleFilesMessage, e as extractTextAndMentions, a as stripZeroWidthSpace } from './bundle-C5-D2BAP.js';
|
|
8
|
+
import Icon, { IconColors, IconTypes } from '../ui/Icon.js';
|
|
9
|
+
import { L as Label, a as LabelColors, c as LabelTypography } from './bundle-Cdplrrlw.js';
|
|
10
|
+
import { L as LocalizationContext, u as useLocalization } from './bundle-Cdqsdoa8.js';
|
|
11
|
+
import { a as arrayEqual, n as getMimeTypesUIKitAccepts } from './bundle-BZSLsKkw.js';
|
|
12
|
+
import { b as tokenizeMessage, T as TOKEN_TYPES, U as USER_MENTION_PREFIX } from './bundle-EKFQIahk.js';
|
|
13
|
+
import { K } from './bundle-lqEjT2ED.js';
|
|
14
|
+
import { c as classnames } from './bundle-DX6fRIJl.js';
|
|
15
|
+
import { i as isMobileIOS } from './bundle-CglqREVl.js';
|
|
16
|
+
import { u as useSendbird } from './bundle-4clodtJA.js';
|
|
17
|
+
|
|
18
|
+
var ELLIPSIS = '...';
|
|
19
|
+
/**
|
|
20
|
+
* Truncate `filename` to fit within `maxChars` by inserting `...` near the
|
|
21
|
+
* middle while preserving the file extension. If the filename already fits,
|
|
22
|
+
* returns it unchanged. If the extension alone exceeds the budget, the
|
|
23
|
+
* extension is dropped and the head is truncated.
|
|
24
|
+
*
|
|
25
|
+
* The utility operates on Unicode code points (after NFC normalization), so
|
|
26
|
+
* Hangul syllables stay intact even when the input is decomposed jamo (as
|
|
27
|
+
* macOS produces), and surrogate pairs (emoji, supplementary CJK) are never
|
|
28
|
+
* split. The caller is responsible for picking a `maxChars` that fits the
|
|
29
|
+
* rendered container.
|
|
30
|
+
*
|
|
31
|
+
* Examples:
|
|
32
|
+
* truncateMiddleKeepExtension('File-name-is-too-long.pdf', 14) -> 'File...ong.pdf'
|
|
33
|
+
* truncateMiddleKeepExtension('short.pdf', 14) -> 'short.pdf'
|
|
34
|
+
* truncateMiddleKeepExtension('noextension', 14) -> 'noextension'
|
|
35
|
+
* truncateMiddleKeepExtension('verylong.tar.gz', 10) -> 've...tar.gz'
|
|
36
|
+
* truncateMiddleKeepExtension('long', 3) -> '...'
|
|
37
|
+
*/
|
|
38
|
+
function truncateMiddleKeepExtension(filename, maxChars) {
|
|
39
|
+
if (maxChars <= 0)
|
|
40
|
+
return '';
|
|
41
|
+
var normalized = filename.normalize('NFC');
|
|
42
|
+
var chars = Array.from(normalized);
|
|
43
|
+
if (chars.length <= maxChars)
|
|
44
|
+
return normalized;
|
|
45
|
+
if (maxChars <= ELLIPSIS.length)
|
|
46
|
+
return ELLIPSIS.slice(0, maxChars);
|
|
47
|
+
var dotIdx = chars.lastIndexOf('.');
|
|
48
|
+
var hasExtension = dotIdx > 0 && dotIdx < chars.length - 1;
|
|
49
|
+
if (!hasExtension) {
|
|
50
|
+
return chars.slice(0, maxChars - ELLIPSIS.length).join('') + ELLIPSIS;
|
|
51
|
+
}
|
|
52
|
+
var extChars = chars.slice(dotIdx);
|
|
53
|
+
var baseChars = chars.slice(0, dotIdx);
|
|
54
|
+
var baseBudget = maxChars - ELLIPSIS.length - extChars.length;
|
|
55
|
+
if (baseBudget <= 0) {
|
|
56
|
+
return chars.slice(0, maxChars - ELLIPSIS.length).join('') + ELLIPSIS;
|
|
57
|
+
}
|
|
58
|
+
var headLen = Math.ceil(baseBudget / 2);
|
|
59
|
+
var tailLen = baseBudget - headLen;
|
|
60
|
+
return baseChars.slice(0, headLen).join('')
|
|
61
|
+
+ ELLIPSIS
|
|
62
|
+
+ (tailLen > 0 ? baseChars.slice(baseChars.length - tailLen).join('') : '')
|
|
63
|
+
+ extChars.join('');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var META_WIDTH_PX = 108;
|
|
67
|
+
var FILENAME_FONT = '700 14px Roboto, sans-serif';
|
|
68
|
+
function fitFilenameToWidth(filename) {
|
|
69
|
+
if (typeof document === 'undefined')
|
|
70
|
+
return filename;
|
|
71
|
+
var ctx = document.createElement('canvas').getContext('2d');
|
|
72
|
+
if (!ctx)
|
|
73
|
+
return filename;
|
|
74
|
+
ctx.font = FILENAME_FONT;
|
|
75
|
+
if (ctx.measureText(filename).width <= META_WIDTH_PX)
|
|
76
|
+
return filename;
|
|
77
|
+
var lo = 3;
|
|
78
|
+
var hi = filename.length;
|
|
79
|
+
var best = '...';
|
|
80
|
+
while (lo <= hi) {
|
|
81
|
+
var mid = (lo + hi) >> 1;
|
|
82
|
+
var candidate = truncateMiddleKeepExtension(filename, mid);
|
|
83
|
+
if (ctx.measureText(candidate).width <= META_WIDTH_PX) {
|
|
84
|
+
best = candidate;
|
|
85
|
+
lo = mid + 1;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
hi = mid - 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return best;
|
|
92
|
+
}
|
|
93
|
+
/** Extract the uppercased extension from the filename, falling back to a
|
|
94
|
+
* localized "FILE" label when no extension is present. */
|
|
95
|
+
function getExtensionLabel(filename, fallback) {
|
|
96
|
+
var dotIdx = filename.lastIndexOf('.');
|
|
97
|
+
if (dotIdx <= 0 || dotIdx === filename.length - 1)
|
|
98
|
+
return fallback;
|
|
99
|
+
return filename.slice(dotIdx + 1).toUpperCase();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Card representation of a non-image pending file in the composer. Used in
|
|
103
|
+
* place of the square image thumbnail when `pendingFile.isImage` is false.
|
|
104
|
+
* The card shows a generic file icon, the (middle-truncated) filename, and
|
|
105
|
+
* the uppercased extension label.
|
|
106
|
+
*/
|
|
107
|
+
var PendingFileCard = function (_a) {
|
|
108
|
+
var pendingFile = _a.pendingFile, onRemove = _a.onRemove;
|
|
109
|
+
var stringSet = useContext(LocalizationContext).stringSet;
|
|
110
|
+
var id = pendingFile.id, file = pendingFile.file;
|
|
111
|
+
var displayName = useMemo(function () { return fitFilenameToWidth(file.name); }, [file.name]);
|
|
112
|
+
var extLabel = getExtensionLabel(file.name, stringSet.MESSAGE_INPUT__PENDING_FILE__TYPE_UNKNOWN);
|
|
113
|
+
return (React__default.createElement("div", { className: "sendbird-message-input__pending-card", "data-testid": "sendbird-pending-file" },
|
|
114
|
+
React__default.createElement("div", { className: "sendbird-message-input__pending-card__body" },
|
|
115
|
+
React__default.createElement("div", { className: "sendbird-message-input__pending-card__icon" },
|
|
116
|
+
React__default.createElement(Icon, { type: IconTypes.FILE_DOCUMENT, fillColor: IconColors.PRIMARY, width: "24px", height: "24px" })),
|
|
117
|
+
React__default.createElement("div", { className: "sendbird-message-input__pending-card__meta" },
|
|
118
|
+
React__default.createElement(Label, { className: "sendbird-message-input__pending-card__name", type: LabelTypography.CAPTION_1, color: LabelColors.ONBACKGROUND_1 }, displayName),
|
|
119
|
+
React__default.createElement(Label, { className: "sendbird-message-input__pending-card__type", type: LabelTypography.CAPTION_2, color: LabelColors.ONBACKGROUND_2 }, extLabel))),
|
|
120
|
+
React__default.createElement("button", { type: "button", className: "sendbird-message-input__pending-card__remove", "aria-label": stringSet.MESSAGE_INPUT__PENDING_FILE__REMOVE, onClick: function () { return onRemove(id); } },
|
|
121
|
+
React__default.createElement(Icon, { type: IconTypes.REMOVE, width: "22px", height: "22px" }))));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Renders one staged file in the composer. Images get a square thumbnail with
|
|
126
|
+
* a corner remove button; non-images delegate to PendingFileCard, which
|
|
127
|
+
* shows a horizontal card with icon + filename + uppercased extension.
|
|
128
|
+
*/
|
|
129
|
+
var PendingFileItem = function (_a) {
|
|
130
|
+
var pendingFile = _a.pendingFile, onRemove = _a.onRemove;
|
|
131
|
+
var stringSet = useContext(LocalizationContext).stringSet;
|
|
132
|
+
var id = pendingFile.id, file = pendingFile.file, previewUrl = pendingFile.previewUrl, isImage = pendingFile.isImage;
|
|
133
|
+
var _b = useState(false), imageLoaded = _b[0], setImageLoaded = _b[1];
|
|
134
|
+
if (!isImage) {
|
|
135
|
+
return React__default.createElement(PendingFileCard, { pendingFile: pendingFile, onRemove: onRemove });
|
|
136
|
+
}
|
|
137
|
+
return (React__default.createElement("div", { className: "sendbird-message-input__pending-file", "data-testid": "sendbird-pending-file" },
|
|
138
|
+
React__default.createElement("div", { className: "sendbird-message-input__pending-file__thumbnail" },
|
|
139
|
+
previewUrl && (React__default.createElement("img", { className: "sendbird-message-input__pending-file__image", src: previewUrl, alt: file.name, onLoad: function () { return setImageLoaded(true); } })),
|
|
140
|
+
!imageLoaded && (React__default.createElement("div", { className: "sendbird-message-input__pending-file__image-placeholder" },
|
|
141
|
+
React__default.createElement(Icon, { type: IconTypes.PHOTO, fillColor: IconColors.ON_BACKGROUND_2, width: "32px", height: "32px" }))),
|
|
142
|
+
React__default.createElement("button", { type: "button", className: "sendbird-message-input__pending-file__remove", "aria-label": stringSet.MESSAGE_INPUT__PENDING_FILE__REMOVE, onClick: function () { return onRemove(id); } },
|
|
143
|
+
React__default.createElement(Icon, { type: IconTypes.REMOVE, width: "22px", height: "22px" })))));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var PendingFilesPreview = function (_a) {
|
|
147
|
+
var pendingFiles = _a.pendingFiles, onRemove = _a.onRemove, className = _a.className;
|
|
148
|
+
var containerRef = useRef(null);
|
|
149
|
+
var prevCountRef = useRef(pendingFiles.length);
|
|
150
|
+
useEffect(function () {
|
|
151
|
+
var el = containerRef.current;
|
|
152
|
+
if (!el)
|
|
153
|
+
return undefined;
|
|
154
|
+
var onWheel = function (e) {
|
|
155
|
+
if (el.scrollWidth <= el.clientWidth)
|
|
156
|
+
return;
|
|
157
|
+
if (e.deltaY === 0 || Math.abs(e.deltaX) >= Math.abs(e.deltaY))
|
|
158
|
+
return;
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
el.scrollLeft += e.deltaY;
|
|
161
|
+
};
|
|
162
|
+
el.addEventListener('wheel', onWheel, { passive: false });
|
|
163
|
+
return function () { return el.removeEventListener('wheel', onWheel); };
|
|
164
|
+
}, []);
|
|
165
|
+
useEffect(function () {
|
|
166
|
+
var el = containerRef.current;
|
|
167
|
+
if (!el)
|
|
168
|
+
return;
|
|
169
|
+
if (pendingFiles.length > prevCountRef.current) {
|
|
170
|
+
el.scrollTo({ left: el.scrollWidth, behavior: 'smooth' });
|
|
171
|
+
}
|
|
172
|
+
prevCountRef.current = pendingFiles.length;
|
|
173
|
+
}, [pendingFiles.length]);
|
|
174
|
+
if (pendingFiles.length === 0)
|
|
175
|
+
return null;
|
|
176
|
+
var classNames = ['sendbird-message-input__pending-preview', className].filter(Boolean).join(' ');
|
|
177
|
+
return (React__default.createElement("div", { ref: containerRef, className: classNames, "data-testid": "sendbird-pending-files-preview", role: "list" }, pendingFiles.map(function (entry) { return (React__default.createElement(PendingFileItem, { key: entry.id, pendingFile: entry, onRemove: onRemove })); })));
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* FIXME:
|
|
182
|
+
* Import this ChannelType enum from @sendbird/chat
|
|
183
|
+
* once MessageInput.spec unit tests can be run \wo jest <-> ESM issue
|
|
184
|
+
*/
|
|
185
|
+
var ChannelType;
|
|
186
|
+
(function (ChannelType) {
|
|
187
|
+
ChannelType["BASE"] = "base";
|
|
188
|
+
ChannelType["GROUP"] = "group";
|
|
189
|
+
ChannelType["OPEN"] = "open";
|
|
190
|
+
})(ChannelType || (ChannelType = {}));
|
|
191
|
+
/**
|
|
192
|
+
* FIXME: Simplify this in UIKit@v4
|
|
193
|
+
* If customer is using MessageInput inside our modules(ie: Channel, Thread, etc),
|
|
194
|
+
* we should use the config from the module.
|
|
195
|
+
* If customer is using MessageInput outside our modules(ie: custom UI),
|
|
196
|
+
* we expect Channel to be undefined and customer gets control to show/hide file-upload.
|
|
197
|
+
* @param {*} channel GroupChannel | OpenChannel
|
|
198
|
+
* @param {*} config SendbirdStateConfig
|
|
199
|
+
* @returns boolean
|
|
200
|
+
*/
|
|
201
|
+
var checkIfFileUploadEnabled = function (_a) {
|
|
202
|
+
var channel = _a.channel, config = _a.config;
|
|
203
|
+
var isEnabled = K(channel === null || channel === void 0 ? void 0 : channel.channelType)
|
|
204
|
+
.with(ChannelType.GROUP, function () { var _a; return (_a = config === null || config === void 0 ? void 0 : config.groupChannel) === null || _a === void 0 ? void 0 : _a.enableDocument; })
|
|
205
|
+
.with(ChannelType.OPEN, function () { var _a; return (_a = config === null || config === void 0 ? void 0 : config.openChannel) === null || _a === void 0 ? void 0 : _a.enableDocument; })
|
|
206
|
+
.otherwise(function () { return true; });
|
|
207
|
+
return isEnabled;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
var TEXT_FIELD_ID = 'sendbird-message-input-text-field';
|
|
211
|
+
var noop = function () {
|
|
212
|
+
return null;
|
|
213
|
+
};
|
|
214
|
+
var resetInput = function (ref) {
|
|
215
|
+
if (ref && ref.current) {
|
|
216
|
+
ref.current.innerHTML = '';
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var getTextContentWithoutZeroWidthSpace = function (node) {
|
|
220
|
+
var _a;
|
|
221
|
+
return stripZeroWidthSpace((_a = node === null || node === void 0 ? void 0 : node.textContent) !== null && _a !== void 0 ? _a : '');
|
|
222
|
+
};
|
|
223
|
+
var hasTextContentWithoutZeroWidthSpace = function (node) {
|
|
224
|
+
return getTextContentWithoutZeroWidthSpace(node).trim().length > 0;
|
|
225
|
+
};
|
|
226
|
+
var initialTargetStringInfo = {
|
|
227
|
+
targetString: '',
|
|
228
|
+
startNodeIndex: null,
|
|
229
|
+
startOffsetIndex: null,
|
|
230
|
+
endNodeIndex: null,
|
|
231
|
+
endOffsetIndex: null,
|
|
232
|
+
};
|
|
233
|
+
var MessageInput = React__default.forwardRef(function (props, externalRef) {
|
|
234
|
+
var _a;
|
|
235
|
+
var channel = props.channel, _b = props.className, className = _b === void 0 ? '' : _b, _c = props.messageFieldId, messageFieldId = _c === void 0 ? '' : _c, _d = props.isEdit, isEdit = _d === void 0 ? false : _d, _e = props.isMobile, isMobile = _e === void 0 ? false : _e, _f = props.isMentionEnabled, isMentionEnabled = _f === void 0 ? false : _f, _g = props.isVoiceMessageEnabled, isVoiceMessageEnabled = _g === void 0 ? true : _g, _h = props.isSelectingMultipleFilesEnabled, isSelectingMultipleFilesEnabled = _h === void 0 ? false : _h, _j = props.disabled, disabled = _j === void 0 ? false : _j, _k = props.message, message = _k === void 0 ? null : _k, _l = props.placeholder, placeholder = _l === void 0 ? '' : _l, _m = props.maxLength, maxLength = _m === void 0 ? 5000 : _m, _o = props.onFileUpload, onFileUpload = _o === void 0 ? noop : _o, _p = props.onSendMessage, onSendMessage = _p === void 0 ? noop : _p, _q = props.onUpdateMessage, onUpdateMessage = _q === void 0 ? noop : _q, _r = props.onCancelEdit, onCancelEdit = _r === void 0 ? noop : _r, _s = props.onStartTyping, onStartTyping = _s === void 0 ? noop : _s, _t = props.onStopTyping, onStopTyping = _t === void 0 ? noop : _t, _u = props.channelUrl, channelUrl = _u === void 0 ? '' : _u, _v = props.mentionSelectedUser, mentionSelectedUser = _v === void 0 ? null : _v, _w = props.onUserMentioned, onUserMentioned = _w === void 0 ? noop : _w, _x = props.onMentionStringChange, onMentionStringChange = _x === void 0 ? noop : _x, _y = props.onMentionedUserIdsUpdated, onMentionedUserIdsUpdated = _y === void 0 ? noop : _y, _z = props.onVoiceMessageIconClick, onVoiceMessageIconClick = _z === void 0 ? noop : _z, _0 = props.onKeyUp, onKeyUp = _0 === void 0 ? noop : _0, _1 = props.onKeyDown, onKeyDown = _1 === void 0 ? noop : _1, _2 = props.renderFileUploadIcon, renderFileUploadIcon = _2 === void 0 ? noop : _2, _3 = props.renderVoiceMessageIcon, renderVoiceMessageIcon = _3 === void 0 ? noop : _3, _4 = props.renderSendMessageIcon, renderSendMessageIcon = _4 === void 0 ? noop : _4, _5 = props.setMentionedUsers, setMentionedUsers = _5 === void 0 ? noop : _5, acceptableMimeTypes = props.acceptableMimeTypes, pendingFiles = props.pendingFiles, onAddFiles = props.onAddFiles, onRemoveFile = props.onRemoveFile, onSubmit = props.onSubmit;
|
|
236
|
+
var isComposerMode = typeof onAddFiles === 'function';
|
|
237
|
+
var hasPendingFiles = ((_a = pendingFiles === null || pendingFiles === void 0 ? void 0 : pendingFiles.length) !== null && _a !== void 0 ? _a : 0) > 0;
|
|
238
|
+
var internalRef = (externalRef && 'current' in externalRef) ? externalRef : useRef(null);
|
|
239
|
+
var ghostInputRef = useRef(null);
|
|
240
|
+
var wasTypingRef = useRef(false);
|
|
241
|
+
var textFieldId = messageFieldId || TEXT_FIELD_ID;
|
|
242
|
+
var stringSet = useLocalization().stringSet;
|
|
243
|
+
var _6 = useSendbird().state, config = _6.config, eventHandlers = _6.eventHandlers;
|
|
244
|
+
var isFileUploadEnabled = checkIfFileUploadEnabled({
|
|
245
|
+
channel: channel,
|
|
246
|
+
config: config,
|
|
247
|
+
});
|
|
248
|
+
// Gate paste/DnD/picker on the same enableDocument flag that hides the
|
|
249
|
+
// attach icon — otherwise feature-flag-disabled environments leak files in.
|
|
250
|
+
// Also gate on !isEdit: today no edit-mode caller passes composer props, but
|
|
251
|
+
// if one did, staged files would have nowhere to go (Send is replaced by
|
|
252
|
+
// Cancel/Save). Belt-and-suspenders.
|
|
253
|
+
var fileProducerEnabled = isComposerMode && isFileUploadEnabled && !disabled && !isEdit;
|
|
254
|
+
var guardedAddFiles = useCallback(function (incoming) {
|
|
255
|
+
if (!fileProducerEnabled || !onAddFiles)
|
|
256
|
+
return;
|
|
257
|
+
if (incoming.length === 0)
|
|
258
|
+
return;
|
|
259
|
+
onAddFiles(incoming);
|
|
260
|
+
}, [fileProducerEnabled, onAddFiles]);
|
|
261
|
+
var fileInputRef = useRef();
|
|
262
|
+
var _7 = useState(false), isInput = _7[0], setIsInput = _7[1];
|
|
263
|
+
var _8 = useState([]), mentionedUserIds = _8[0], setMentionedUserIds = _8[1];
|
|
264
|
+
var _9 = useState(__assign({}, initialTargetStringInfo)), targetStringInfo = _9[0], setTargetStringInfo = _9[1];
|
|
265
|
+
// #Edit mode
|
|
266
|
+
// for easily initialize input value from outside, but
|
|
267
|
+
// useEffect(_, [channelUrl]) erase it
|
|
268
|
+
var initialValue = props === null || props === void 0 ? void 0 : props.value;
|
|
269
|
+
useEffect(function () {
|
|
270
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
271
|
+
setMentionedUserIds([]);
|
|
272
|
+
setIsInput(hasTextContentWithoutZeroWidthSpace(textField));
|
|
273
|
+
}, [initialValue]);
|
|
274
|
+
var stashedHtmlRef = useRef('');
|
|
275
|
+
var prevHasPendingFilesRef = useRef(false);
|
|
276
|
+
// #Mention | Clear input value when channel changes
|
|
277
|
+
useEffect(function () {
|
|
278
|
+
if (!isEdit) {
|
|
279
|
+
setIsInput(false);
|
|
280
|
+
resetInput(internalRef);
|
|
281
|
+
wasTypingRef.current = false;
|
|
282
|
+
stashedHtmlRef.current = '';
|
|
283
|
+
}
|
|
284
|
+
}, [channelUrl]);
|
|
285
|
+
useEffect(function () {
|
|
286
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
287
|
+
if (!textField) {
|
|
288
|
+
prevHasPendingFilesRef.current = hasPendingFiles;
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
if (hasPendingFiles && !prevHasPendingFilesRef.current) {
|
|
292
|
+
if (hasTextContentWithoutZeroWidthSpace(textField)) {
|
|
293
|
+
stashedHtmlRef.current = textField.innerHTML;
|
|
294
|
+
resetInput(internalRef);
|
|
295
|
+
setIsInput(false);
|
|
296
|
+
}
|
|
297
|
+
textField.focus();
|
|
298
|
+
}
|
|
299
|
+
else if (!hasPendingFiles && prevHasPendingFilesRef.current) {
|
|
300
|
+
if (stashedHtmlRef.current) {
|
|
301
|
+
textField.innerHTML = stashedHtmlRef.current;
|
|
302
|
+
stashedHtmlRef.current = '';
|
|
303
|
+
setIsInput(true);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
prevHasPendingFilesRef.current = hasPendingFiles;
|
|
307
|
+
}, [hasPendingFiles]);
|
|
308
|
+
// #Mention & #Edit | Fill message input values
|
|
309
|
+
useEffect(function () {
|
|
310
|
+
var _a;
|
|
311
|
+
if (isEdit && (message === null || message === void 0 ? void 0 : message.messageId)) {
|
|
312
|
+
// const textField = document.getElementById(textFieldId);
|
|
313
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
314
|
+
if (isMentionEnabled
|
|
315
|
+
&& (message === null || message === void 0 ? void 0 : message.mentionedUsers)
|
|
316
|
+
&& message.mentionedUsers.length > 0
|
|
317
|
+
&& (message === null || message === void 0 ? void 0 : message.mentionedMessageTemplate)
|
|
318
|
+
&& message.mentionedMessageTemplate.length > 0) {
|
|
319
|
+
/* mention enabled */
|
|
320
|
+
var _b = message.mentionedUsers, mentionedUsers_1 = _b === void 0 ? [] : _b;
|
|
321
|
+
var tokens = tokenizeMessage({
|
|
322
|
+
messageText: message === null || message === void 0 ? void 0 : message.mentionedMessageTemplate,
|
|
323
|
+
mentionedUsers: mentionedUsers_1,
|
|
324
|
+
includeMarkdown: channel.isGroupChannel() && config.groupChannel.enableMarkdownForUserMessage,
|
|
325
|
+
});
|
|
326
|
+
if (textField) {
|
|
327
|
+
textField.innerHTML = tokens
|
|
328
|
+
.map(function (token) {
|
|
329
|
+
if (token.type === TOKEN_TYPES.mention) {
|
|
330
|
+
var mentionedUser = mentionedUsers_1.find(function (user) { return user.userId === token.userId; });
|
|
331
|
+
var nickname = "".concat(USER_MENTION_PREFIX).concat((mentionedUser === null || mentionedUser === void 0 ? void 0 : mentionedUser.nickname) || token.value || stringSet.MENTION_NAME__NO_NAME);
|
|
332
|
+
return renderToString({
|
|
333
|
+
userId: token.userId,
|
|
334
|
+
nickname: nickname,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
return sanitizeString(token.value);
|
|
338
|
+
})
|
|
339
|
+
.join('');
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
/* mention disabled */
|
|
344
|
+
try {
|
|
345
|
+
if (textField) {
|
|
346
|
+
textField.innerHTML = (_a = sanitizeString(message === null || message === void 0 ? void 0 : message.message)) !== null && _a !== void 0 ? _a : '';
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
catch (_c) {
|
|
350
|
+
//
|
|
351
|
+
}
|
|
352
|
+
setMentionedUserIds([]);
|
|
353
|
+
}
|
|
354
|
+
setIsInput(hasTextContentWithoutZeroWidthSpace(textField));
|
|
355
|
+
}
|
|
356
|
+
}, [isEdit, message]);
|
|
357
|
+
// #Mention | Detect MentionedLabel modified
|
|
358
|
+
var useMentionedLabelDetection = useCallback(function () {
|
|
359
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
360
|
+
if (isMentionEnabled && textField) {
|
|
361
|
+
var newMentionedUserIds = Array.from(textField.getElementsByClassName('sendbird-mention-user-label')).map(
|
|
362
|
+
// @ts-ignore
|
|
363
|
+
function (node) { var _a; return (_a = node === null || node === void 0 ? void 0 : node.dataset) === null || _a === void 0 ? void 0 : _a.userid; });
|
|
364
|
+
if (!arrayEqual(mentionedUserIds, newMentionedUserIds) || newMentionedUserIds.length === 0) {
|
|
365
|
+
onMentionedUserIdsUpdated(newMentionedUserIds);
|
|
366
|
+
setMentionedUserIds(newMentionedUserIds);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
setIsInput(hasTextContentWithoutZeroWidthSpace(textField));
|
|
370
|
+
}, [targetStringInfo, isMentionEnabled]);
|
|
371
|
+
// #Mention | Replace selected user nickname to the MentionedUserLabel
|
|
372
|
+
useEffect(function () {
|
|
373
|
+
var _a, _b, _c, _d;
|
|
374
|
+
if (isMentionEnabled && mentionSelectedUser) {
|
|
375
|
+
var targetString = targetStringInfo.targetString, startNodeIndex = targetStringInfo.startNodeIndex, startOffsetIndex = targetStringInfo.startOffsetIndex, endNodeIndex = targetStringInfo.endNodeIndex, endOffsetIndex = targetStringInfo.endOffsetIndex;
|
|
376
|
+
var textField_1 = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
377
|
+
if (targetString && startNodeIndex !== null && startOffsetIndex !== null && endOffsetIndex !== null && endNodeIndex !== null && textField_1) {
|
|
378
|
+
// const textField = document.getElementById(textFieldId);
|
|
379
|
+
var childNodes = nodeListToArray(textField_1 === null || textField_1 === void 0 ? void 0 : textField_1.childNodes);
|
|
380
|
+
var startNodeTextContent = (_b = (_a = childNodes[startNodeIndex]) === null || _a === void 0 ? void 0 : _a.textContent) !== null && _b !== void 0 ? _b : '';
|
|
381
|
+
var frontTextNode = document.createTextNode(startNodeTextContent.slice(0, startOffsetIndex));
|
|
382
|
+
var endNodeTextContent = (_d = (_c = childNodes[endNodeIndex]) === null || _c === void 0 ? void 0 : _c.textContent) !== null && _d !== void 0 ? _d : '';
|
|
383
|
+
var backTextNode = endOffsetIndex && document.createTextNode("\u00A0".concat(endNodeTextContent.slice(endOffsetIndex)));
|
|
384
|
+
var mentionLabel = renderToString({
|
|
385
|
+
userId: mentionSelectedUser === null || mentionSelectedUser === void 0 ? void 0 : mentionSelectedUser.userId,
|
|
386
|
+
nickname: "".concat(USER_MENTION_TEMP_CHAR).concat((mentionSelectedUser === null || mentionSelectedUser === void 0 ? void 0 : mentionSelectedUser.nickname) || stringSet.MENTION_NAME__NO_NAME),
|
|
387
|
+
});
|
|
388
|
+
var div = document.createElement('div');
|
|
389
|
+
div.innerHTML = mentionLabel;
|
|
390
|
+
var newNodes = __spreadArray(__spreadArray(__spreadArray([], childNodes.slice(0, startNodeIndex), true), [
|
|
391
|
+
frontTextNode,
|
|
392
|
+
div.childNodes[0],
|
|
393
|
+
backTextNode
|
|
394
|
+
], false), childNodes.slice(endNodeIndex + 1), true);
|
|
395
|
+
if (textField_1) {
|
|
396
|
+
textField_1.innerHTML = '';
|
|
397
|
+
newNodes.forEach(function (newNode) {
|
|
398
|
+
if (newNode) {
|
|
399
|
+
textField_1.appendChild(newNode);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
onUserMentioned(mentionSelectedUser);
|
|
404
|
+
if (window.getSelection || document.getSelection) {
|
|
405
|
+
// set caret postion
|
|
406
|
+
var selection = window.getSelection() || document.getSelection();
|
|
407
|
+
selection === null || selection === void 0 ? void 0 : selection.removeAllRanges();
|
|
408
|
+
var range = new Range();
|
|
409
|
+
range.selectNodeContents(textField_1);
|
|
410
|
+
range.setStart(textField_1.childNodes[startNodeIndex + 2], 1);
|
|
411
|
+
range.setEnd(textField_1.childNodes[startNodeIndex + 2], 1);
|
|
412
|
+
range.collapse(false);
|
|
413
|
+
selection === null || selection === void 0 ? void 0 : selection.addRange(range);
|
|
414
|
+
textField_1.focus();
|
|
415
|
+
}
|
|
416
|
+
setTargetStringInfo(__assign({}, initialTargetStringInfo));
|
|
417
|
+
useMentionedLabelDetection();
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}, [mentionSelectedUser, isMentionEnabled]);
|
|
421
|
+
// #Mention | Detect mentioning user nickname
|
|
422
|
+
var useMentionInputDetection = useCallback(function () {
|
|
423
|
+
var _a, _b;
|
|
424
|
+
var selection = ((_a = window === null || window === void 0 ? void 0 : window.getSelection) === null || _a === void 0 ? void 0 : _a.call(window)) || ((_b = document === null || document === void 0 ? void 0 : document.getSelection) === null || _b === void 0 ? void 0 : _b.call(document));
|
|
425
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
426
|
+
if ((selection === null || selection === void 0 ? void 0 : selection.anchorNode) === textField) {
|
|
427
|
+
onMentionStringChange('');
|
|
428
|
+
}
|
|
429
|
+
if (isMentionEnabled
|
|
430
|
+
&& textField
|
|
431
|
+
&& selection
|
|
432
|
+
&& selection.anchorNode === selection.focusNode
|
|
433
|
+
&& selection.anchorOffset === selection.focusOffset) {
|
|
434
|
+
var textStack = '';
|
|
435
|
+
var startNodeIndex = null;
|
|
436
|
+
var startOffsetIndex = null;
|
|
437
|
+
var _loop_1 = function (index) {
|
|
438
|
+
var currentNode = textField.childNodes[index];
|
|
439
|
+
if (currentNode.nodeType === NodeTypes.TextNode) {
|
|
440
|
+
/* text node */
|
|
441
|
+
var textContent = (function () {
|
|
442
|
+
var _a;
|
|
443
|
+
if (currentNode === selection.anchorNode) {
|
|
444
|
+
return (currentNode === null || currentNode === void 0 ? void 0 : currentNode.textContent) ? currentNode === null || currentNode === void 0 ? void 0 : currentNode.textContent.slice(0, selection.anchorOffset) : '';
|
|
445
|
+
}
|
|
446
|
+
return (_a = currentNode === null || currentNode === void 0 ? void 0 : currentNode.textContent) !== null && _a !== void 0 ? _a : '';
|
|
447
|
+
})();
|
|
448
|
+
if (textStack.length > 0) {
|
|
449
|
+
textStack += textContent;
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
var charLastIndex = textContent.lastIndexOf(USER_MENTION_TEMP_CHAR);
|
|
453
|
+
for (var i = charLastIndex - 1; i > -1; i -= 1) {
|
|
454
|
+
if (textContent[i] === USER_MENTION_TEMP_CHAR) {
|
|
455
|
+
charLastIndex = i;
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
if (charLastIndex > -1) {
|
|
462
|
+
textStack = textContent;
|
|
463
|
+
startNodeIndex = index;
|
|
464
|
+
startOffsetIndex = charLastIndex;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
/* other nodes */
|
|
470
|
+
textStack = '';
|
|
471
|
+
startNodeIndex = null;
|
|
472
|
+
startOffsetIndex = null;
|
|
473
|
+
}
|
|
474
|
+
if (currentNode === selection.anchorNode) {
|
|
475
|
+
/**
|
|
476
|
+
* targetString could be ''
|
|
477
|
+
* startNodeIndex and startOffsetIndex could be null
|
|
478
|
+
*/
|
|
479
|
+
var targetString = textStack && startOffsetIndex !== null ? textStack.slice(startOffsetIndex) : ''; // include template character
|
|
480
|
+
setTargetStringInfo({
|
|
481
|
+
targetString: targetString,
|
|
482
|
+
startNodeIndex: startNodeIndex,
|
|
483
|
+
startOffsetIndex: startOffsetIndex,
|
|
484
|
+
endNodeIndex: index,
|
|
485
|
+
endOffsetIndex: selection.anchorOffset,
|
|
486
|
+
});
|
|
487
|
+
onMentionStringChange(targetString);
|
|
488
|
+
return { value: void 0 };
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
for (var index = 0; index < textField.childNodes.length; index += 1) {
|
|
492
|
+
var state_1 = _loop_1(index);
|
|
493
|
+
if (typeof state_1 === "object")
|
|
494
|
+
return state_1.value;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}, [isMentionEnabled]);
|
|
498
|
+
var sendMessage = function () {
|
|
499
|
+
var _a, _b;
|
|
500
|
+
try {
|
|
501
|
+
var textField_2 = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
502
|
+
if (!isEdit && textField_2) {
|
|
503
|
+
var _c = extractTextAndMentions(textField_2.childNodes), messageText = _c.messageText, mentionTemplate = _c.mentionTemplate, isMentionedMessage = _c.isMentionedMessage;
|
|
504
|
+
var trimmedText = messageText.trim();
|
|
505
|
+
// Composer mode: empty text is OK if files are staged.
|
|
506
|
+
if (trimmedText.length === 0 && !hasPendingFiles)
|
|
507
|
+
return;
|
|
508
|
+
var params = {
|
|
509
|
+
message: messageText,
|
|
510
|
+
mentionTemplate: isMentionedMessage ? sanitizeString(mentionTemplate) : '',
|
|
511
|
+
};
|
|
512
|
+
if (isComposerMode && onSubmit) {
|
|
513
|
+
onSubmit(__assign(__assign({}, params), { files: pendingFiles !== null && pendingFiles !== void 0 ? pendingFiles : [] }));
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
onSendMessage(params);
|
|
517
|
+
}
|
|
518
|
+
resetInput(internalRef);
|
|
519
|
+
wasTypingRef.current = false;
|
|
520
|
+
/**
|
|
521
|
+
* Note: contentEditable does not work as expected in mobile WebKit (Safari).
|
|
522
|
+
* @see https://github.com/sendbird/sendbird-uikit-react/pull/1108
|
|
523
|
+
*/
|
|
524
|
+
if (isMobileIOS(navigator.userAgent)) {
|
|
525
|
+
if (ghostInputRef.current)
|
|
526
|
+
ghostInputRef.current.focus();
|
|
527
|
+
requestAnimationFrame(function () { return textField_2.focus(); });
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
// important: keeps the keyboard open -> must add test on refactor
|
|
531
|
+
textField_2.focus();
|
|
532
|
+
}
|
|
533
|
+
setIsInput(false);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
catch (error) {
|
|
537
|
+
(_b = (_a = eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.message) === null || _a === void 0 ? void 0 : _a.onSendMessageFailed) === null || _b === void 0 ? void 0 : _b.call(_a, message, error);
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
var isEditDisabled = !hasTextContentWithoutZeroWidthSpace(internalRef === null || internalRef === void 0 ? void 0 : internalRef.current);
|
|
541
|
+
var editMessage = function () {
|
|
542
|
+
var _a, _b;
|
|
543
|
+
try {
|
|
544
|
+
var textField = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current;
|
|
545
|
+
var messageId = message === null || message === void 0 ? void 0 : message.messageId;
|
|
546
|
+
if (isEdit && messageId && textField) {
|
|
547
|
+
var _c = extractTextAndMentions(textField.childNodes), messageText = _c.messageText, mentionTemplate = _c.mentionTemplate, isMentionedMessage = _c.isMentionedMessage, mentionedUserIds_1 = _c.mentionedUserIds;
|
|
548
|
+
if (messageText.trim().length === 0)
|
|
549
|
+
return;
|
|
550
|
+
var params = {
|
|
551
|
+
messageId: messageId,
|
|
552
|
+
message: messageText,
|
|
553
|
+
mentionTemplate: sanitizeString(isMentionedMessage ? mentionTemplate : messageText),
|
|
554
|
+
mentionedUserIds: isMentionEnabled ? mentionedUserIds_1 : [],
|
|
555
|
+
};
|
|
556
|
+
onUpdateMessage(params);
|
|
557
|
+
resetInput(internalRef);
|
|
558
|
+
wasTypingRef.current = false;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
catch (error) {
|
|
562
|
+
(_b = (_a = eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.message) === null || _a === void 0 ? void 0 : _a.onUpdateMessageFailed) === null || _b === void 0 ? void 0 : _b.call(_a, message, error);
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
var onPaste = usePaste({
|
|
566
|
+
ref: internalRef,
|
|
567
|
+
setMentionedUsers: setMentionedUsers,
|
|
568
|
+
channel: channel,
|
|
569
|
+
setIsInput: setIsInput,
|
|
570
|
+
onAddFiles: fileProducerEnabled && !isMobile ? guardedAddFiles : undefined,
|
|
571
|
+
});
|
|
572
|
+
var uploadFile = function (event) {
|
|
573
|
+
var _a, _b;
|
|
574
|
+
var files = event.currentTarget.files;
|
|
575
|
+
try {
|
|
576
|
+
if (files) {
|
|
577
|
+
var fileArray = Array.from(files);
|
|
578
|
+
if (fileProducerEnabled) {
|
|
579
|
+
guardedAddFiles(fileArray);
|
|
580
|
+
}
|
|
581
|
+
else if (!isComposerMode) {
|
|
582
|
+
onFileUpload(fileArray);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
catch (error) {
|
|
587
|
+
(_b = (_a = eventHandlers === null || eventHandlers === void 0 ? void 0 : eventHandlers.message) === null || _a === void 0 ? void 0 : _a.onFileUploadFailed) === null || _b === void 0 ? void 0 : _b.call(_a, error);
|
|
588
|
+
}
|
|
589
|
+
finally {
|
|
590
|
+
event.target.value = '';
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
var adjustScrollToCaret = function () {
|
|
594
|
+
var _a;
|
|
595
|
+
var inputRef = internalRef;
|
|
596
|
+
var selection = window.getSelection();
|
|
597
|
+
if (!selection || selection.rangeCount === 0)
|
|
598
|
+
return;
|
|
599
|
+
// Get the last range (caret or selected text position) from the selection
|
|
600
|
+
var range = selection.getRangeAt(selection.rangeCount - 1);
|
|
601
|
+
var rect = range.getBoundingClientRect();
|
|
602
|
+
var container = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
603
|
+
if (!container || !inputRef.current)
|
|
604
|
+
return;
|
|
605
|
+
// If the caret (or selection) is below the visible container area, scroll down
|
|
606
|
+
if (rect.bottom > container.bottom) {
|
|
607
|
+
var scrollAmount = Math.min(rect.bottom - container.bottom, // Calculate how much we need to scroll
|
|
608
|
+
inputRef.current.scrollHeight - inputRef.current.clientHeight);
|
|
609
|
+
inputRef.current.scrollTop += scrollAmount; // Adjust the scroll position downward
|
|
610
|
+
}
|
|
611
|
+
// If the caret (or selection) is above the visible container area, scroll up
|
|
612
|
+
else if (rect.top < container.top) {
|
|
613
|
+
var scrollAmount = Math.min(container.top - rect.top, // Calculate how much we need to scroll
|
|
614
|
+
inputRef.current.scrollTop);
|
|
615
|
+
inputRef.current.scrollTop -= scrollAmount; // Adjust the scroll position upward
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
return (React__default.createElement("form", { className: classnames.apply(void 0, __spreadArray(__spreadArray([], (Array.isArray(className) ? className : [className]), false), [isEdit && 'sendbird-message-input__edit',
|
|
619
|
+
disabled && 'sendbird-message-input-form__disabled',
|
|
620
|
+
isComposerMode && 'sendbird-message-input--composer'], false)) },
|
|
621
|
+
React__default.createElement("div", { className: classnames('sendbird-message-input', disabled && 'sendbird-message-input__disabled', hasPendingFiles && 'sendbird-message-input--has-pending'), "data-testid": "sendbird-message-input" },
|
|
622
|
+
isMobileIOS(navigator.userAgent) && (React__default.createElement("input", { id: 'ghost-input-reset-ime-cjk', ref: ghostInputRef, style: { opacity: 0, padding: 0, margin: 0, height: 0, border: 'none', position: 'absolute', top: -9999 }, defaultValue: '_' })),
|
|
623
|
+
React__default.createElement("div", { id: "".concat(textFieldId).concat(isEdit ? message === null || message === void 0 ? void 0 : message.messageId : ''), className: classnames('sendbird-message-input--textarea', textFieldId, hasPendingFiles && 'sendbird-message-input--textarea-locked'), contentEditable: !disabled && !hasPendingFiles, tabIndex: hasPendingFiles ? 0 : undefined, role: "textbox", "aria-label": "Text Input", "aria-disabled": disabled || hasPendingFiles, ref: internalRef,
|
|
624
|
+
// @ts-ignore
|
|
625
|
+
disabled: disabled, maxLength: maxLength, onKeyDown: function (e) {
|
|
626
|
+
var _a, _b, _c;
|
|
627
|
+
var preventEvent = onKeyDown(e);
|
|
628
|
+
if (preventEvent) {
|
|
629
|
+
e.preventDefault();
|
|
630
|
+
}
|
|
631
|
+
else {
|
|
632
|
+
if (!e.shiftKey
|
|
633
|
+
&& e.key === MessageInputKeys.Enter
|
|
634
|
+
&& !isMobile
|
|
635
|
+
&& (hasTextContentWithoutZeroWidthSpace(internalRef === null || internalRef === void 0 ? void 0 : internalRef.current) || hasPendingFiles)
|
|
636
|
+
&& ((_a = e === null || e === void 0 ? void 0 : e.nativeEvent) === null || _a === void 0 ? void 0 : _a.isComposing) !== true
|
|
637
|
+
/**
|
|
638
|
+
* NOTE: What isComposing does?
|
|
639
|
+
* Check if the user has finished composing characters
|
|
640
|
+
* (e.g., for languages like Korean, Japanese, where characters are composed from multiple keystrokes)
|
|
641
|
+
* Prevents executing the code while the user is still composing characters.
|
|
642
|
+
*/
|
|
643
|
+
) {
|
|
644
|
+
e.preventDefault();
|
|
645
|
+
sendMessage();
|
|
646
|
+
}
|
|
647
|
+
if (e.key === MessageInputKeys.Backspace
|
|
648
|
+
&& ((_c = (_b = internalRef === null || internalRef === void 0 ? void 0 : internalRef.current) === null || _b === void 0 ? void 0 : _b.childNodes) === null || _c === void 0 ? void 0 : _c.length) === 2
|
|
649
|
+
&& !internalRef.current.childNodes[0].textContent
|
|
650
|
+
&& internalRef.current.childNodes[1].nodeType === NodeTypes.ElementNode) {
|
|
651
|
+
internalRef.current.removeChild(internalRef.current.childNodes[1]);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}, onKeyUp: function (e) {
|
|
655
|
+
var preventEvent = onKeyUp(e);
|
|
656
|
+
if (preventEvent) {
|
|
657
|
+
e.preventDefault();
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
useMentionInputDetection();
|
|
661
|
+
}
|
|
662
|
+
}, onClick: function () {
|
|
663
|
+
useMentionInputDetection();
|
|
664
|
+
}, onInput: function () {
|
|
665
|
+
var hasContent = hasTextContentWithoutZeroWidthSpace(internalRef === null || internalRef === void 0 ? void 0 : internalRef.current);
|
|
666
|
+
if (hasContent) {
|
|
667
|
+
onStartTyping();
|
|
668
|
+
wasTypingRef.current = true;
|
|
669
|
+
}
|
|
670
|
+
else if (wasTypingRef.current) {
|
|
671
|
+
onStopTyping();
|
|
672
|
+
wasTypingRef.current = false;
|
|
673
|
+
}
|
|
674
|
+
setIsInput(hasContent);
|
|
675
|
+
useMentionedLabelDetection();
|
|
676
|
+
}, onPaste: function (e) {
|
|
677
|
+
onPaste(e);
|
|
678
|
+
setTimeout(adjustScrollToCaret);
|
|
679
|
+
} }),
|
|
680
|
+
!isEdit && isComposerMode && hasPendingFiles && pendingFiles && onRemoveFile && (React__default.createElement(PendingFilesPreview, { pendingFiles: pendingFiles, onRemove: onRemoveFile })),
|
|
681
|
+
getTextContentWithoutZeroWidthSpace(internalRef === null || internalRef === void 0 ? void 0 : internalRef.current).length === 0 && (React__default.createElement(Label, { className: "sendbird-message-input--placeholder", type: LabelTypography.BODY_1, color: disabled ? LabelColors.ONBACKGROUND_4 : LabelColors.ONBACKGROUND_3 }, hasPendingFiles
|
|
682
|
+
? stringSet.MESSAGE_INPUT__PLACE_HOLDER__FILE_ATTACHED
|
|
683
|
+
: (placeholder || stringSet.MESSAGE_INPUT__PLACE_HOLDER))),
|
|
684
|
+
!isEdit && (isInput || hasPendingFiles) && (React__default.createElement(IconButton, { className: "sendbird-message-input--send", height: "32px", width: "32px", disabled: disabled, onClick: function () { return sendMessage(); }, testID: "sendbird-message-input-send-button" }, (renderSendMessageIcon === null || renderSendMessageIcon === void 0 ? void 0 : renderSendMessageIcon()) || (React__default.createElement(Icon, { type: IconTypes.SEND, fillColor: disabled ? IconColors.ON_BACKGROUND_4 : IconColors.PRIMARY, width: "20px", height: "20px" })))),
|
|
685
|
+
!isEdit
|
|
686
|
+
&& !isInput
|
|
687
|
+
&& !hasPendingFiles
|
|
688
|
+
&& ((renderFileUploadIcon === null || renderFileUploadIcon === void 0 ? void 0 : renderFileUploadIcon())
|
|
689
|
+
// UIKit Dashboard configuration should have lower priority than
|
|
690
|
+
// renderFileUploadIcon which is set in code level
|
|
691
|
+
|| (isFileUploadEnabled && (React__default.createElement(IconButton, { className: classnames('sendbird-message-input--attach', isVoiceMessageEnabled && 'is-voice-message-enabled'), height: "32px", width: "32px", onClick: function () {
|
|
692
|
+
var _a, _b;
|
|
693
|
+
// todo: clear previous input
|
|
694
|
+
(_b = (_a = fileInputRef === null || fileInputRef === void 0 ? void 0 : fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
695
|
+
} },
|
|
696
|
+
React__default.createElement(Icon, { type: IconTypes.ATTACH, fillColor: disabled ? IconColors.ON_BACKGROUND_4 : IconColors.CONTENT_INVERSE, width: "20px", height: "20px" }),
|
|
697
|
+
React__default.createElement("input", { className: "sendbird-message-input--attach-input", type: "file", ref: fileInputRef,
|
|
698
|
+
// It will affect to <Channel /> and <Thread />
|
|
699
|
+
onChange: function (event) { return uploadFile(event); }, accept: getMimeTypesUIKitAccepts(acceptableMimeTypes), multiple: isSelectingMultipleFilesEnabled && isChannelTypeSupportsMultipleFilesMessage(channel) }))))),
|
|
700
|
+
isVoiceMessageEnabled && !isEdit && !isInput && !hasPendingFiles && (React__default.createElement(IconButton, { className: "sendbird-message-input--voice-message", width: "32px", height: "32px", onClick: onVoiceMessageIconClick }, (renderVoiceMessageIcon === null || renderVoiceMessageIcon === void 0 ? void 0 : renderVoiceMessageIcon()) || (React__default.createElement(Icon, { type: IconTypes.AUDIO_ON_LINED, fillColor: disabled ? IconColors.ON_BACKGROUND_4 : IconColors.CONTENT_INVERSE, width: "20px", height: "20px" }))))),
|
|
701
|
+
isEdit && (React__default.createElement("div", { className: "sendbird-message-input--edit-action", "data-testid": "sendbird-message-input--edit-action" },
|
|
702
|
+
React__default.createElement(Button, { className: "sendbird-message-input--edit-action__cancel", type: ButtonTypes.SECONDARY, size: ButtonSizes.SMALL, onClick: onCancelEdit }, stringSet.BUTTON__CANCEL),
|
|
703
|
+
React__default.createElement(Button, { className: "sendbird-message-input--edit-action__save", type: ButtonTypes.PRIMARY, size: ButtonSizes.SMALL, disabled: isEditDisabled, onClick: function () { return editMessage(); } }, stringSet.BUTTON__SAVE)))));
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
export { MessageInput as M, checkIfFileUploadEnabled as c };
|
|
707
|
+
//# sourceMappingURL=bundle-BCjR1Qiq.js.map
|