@sendbird/uikit-react 3.12.1 → 3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +79 -75
- package/App.js.map +1 -1
- package/CHANGELOG.md +62 -0
- package/Channel/components/ChannelHeader.js +29 -29
- package/Channel/components/ChannelUI.js +67 -63
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +28 -28
- package/Channel/components/FrozenNotification.js +5 -5
- package/Channel/components/Message.js +62 -56
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageFeedbackModal.js +9 -9
- package/Channel/components/MessageInput.js +41 -41
- package/Channel/components/MessageInputWrapper.js +41 -41
- package/Channel/components/MessageList.js +63 -59
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +27 -27
- package/Channel/components/SuggestedMentionList.js +27 -27
- package/Channel/components/TypingIndicator.js +6 -6
- package/Channel/components/UnreadCount.js +7 -7
- package/Channel/context.js +20 -20
- package/Channel/hooks/useHandleUploadFiles.js +13 -13
- package/Channel/hooks/useInitialMessagesFetch.js +6 -6
- package/Channel/utils/compareMessagesForGrouping.js +5 -5
- package/Channel/utils/getMessagePartsInfo.js +6 -6
- package/Channel.js +67 -63
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +20 -20
- package/ChannelList/components/ChannelListHeader.js +8 -8
- package/ChannelList/components/ChannelListUI.js +34 -34
- package/ChannelList/components/ChannelPreview.js +27 -27
- package/ChannelList/components/ChannelPreviewAction.js +11 -11
- package/ChannelList/context.js +10 -10
- package/ChannelList.js +34 -34
- package/ChannelSettings/components/ChannelProfile.js +14 -14
- package/ChannelSettings/components/ChannelSettingsUI.js +23 -23
- package/ChannelSettings/components/EditDetailsModal.js +14 -14
- package/ChannelSettings/components/LeaveChannel.js +11 -11
- package/ChannelSettings/components/ModerationPanel.js +21 -21
- package/ChannelSettings/components/UserListItem.js +13 -13
- package/ChannelSettings/components/UserPanel.js +20 -20
- package/ChannelSettings/context.js +43 -22
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +23 -23
- package/CreateChannel/components/CreateChannelUI.js +16 -16
- package/CreateChannel/components/InviteUsers.js +16 -16
- package/CreateChannel/components/SelectChannelType.js +10 -10
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +16 -16
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +11 -11
- package/CreateOpenChannel/context.js +1 -1
- package/CreateOpenChannel.js +11 -11
- package/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/EditUserProfile.js +12 -12
- package/GroupChannel/components/FileViewer.js +23 -23
- package/GroupChannel/components/FrozenNotification.js +5 -5
- package/GroupChannel/components/GroupChannelHeader.js +22 -22
- package/GroupChannel/components/GroupChannelUI.js +61 -57
- package/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/GroupChannel/components/Message.js +62 -53
- package/GroupChannel/components/Message.js.map +1 -1
- package/GroupChannel/components/MessageInputWrapper.js +38 -38
- package/GroupChannel/components/MessageList.js +62 -68
- package/GroupChannel/components/MessageList.js.map +1 -1
- package/GroupChannel/components/RemoveMessageModal.js +22 -22
- package/GroupChannel/components/SuggestedMentionList.js +12 -12
- package/GroupChannel/components/SuggestedReplies.js +1 -1
- package/GroupChannel/components/TypingIndicator.js +6 -6
- package/GroupChannel/components/UnreadCount.js +7 -7
- package/GroupChannel/context.js +92 -79
- package/GroupChannel/context.js.map +1 -1
- package/GroupChannel.js +61 -57
- package/GroupChannel.js.map +1 -1
- package/GroupChannelList/components/AddGroupChannel.js +18 -18
- package/GroupChannelList/components/GroupChannelListHeader.js +8 -8
- package/GroupChannelList/components/GroupChannelListItem.js +24 -24
- package/GroupChannelList/components/GroupChannelListUI.js +33 -33
- package/GroupChannelList/components/GroupChannelPreviewAction.js +11 -11
- package/GroupChannelList/context.js +5 -5
- package/GroupChannelList.js +33 -33
- package/MessageSearch/components/MessageSearchUI.js +14 -14
- package/MessageSearch/context.js +1 -1
- package/MessageSearch.js +14 -14
- package/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/OpenChannel/components/OpenChannelHeader.js +18 -18
- package/OpenChannel/components/OpenChannelInput.js +25 -25
- package/OpenChannel/components/OpenChannelMessage.js +35 -35
- package/OpenChannel/components/OpenChannelMessageList.js +39 -39
- package/OpenChannel/components/OpenChannelUI.js +39 -39
- package/OpenChannel/context.js +17 -17
- package/OpenChannel.js +39 -39
- package/OpenChannelList/components/OpenChannelListUI.js +14 -14
- package/OpenChannelList/components/OpenChannelPreview.js +6 -6
- package/OpenChannelList/context.js +3 -3
- package/OpenChannelList.js +14 -14
- package/OpenChannelSettings/components/EditDetailsModal.js +15 -15
- package/OpenChannelSettings/components/OpenChannelProfile.js +15 -15
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +19 -19
- package/OpenChannelSettings/components/OperatorUI.js +19 -19
- package/OpenChannelSettings/components/ParticipantUI.js +17 -17
- package/OpenChannelSettings/context.js +3 -3
- package/OpenChannelSettings.js +19 -19
- package/SendbirdProvider.js +360 -83
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +42 -42
- package/Thread/components/ParentMessageInfoItem.js +28 -28
- package/Thread/components/ThreadHeader.js +7 -7
- package/Thread/components/ThreadList.js +46 -46
- package/Thread/components/ThreadListItem.js +46 -46
- package/Thread/components/ThreadMessageInput.js +42 -42
- package/Thread/components/ThreadUI.js +56 -56
- package/Thread/context.js +9 -9
- package/Thread.js +56 -56
- package/VoicePlayer/context.js +3 -3
- package/VoicePlayer/useVoicePlayer.js +10 -10
- package/VoiceRecorder/context.js +10 -10
- package/VoiceRecorder/useVoiceRecorder.js +9 -9
- package/chunks/{bundle-ZlvXkXrU.js → bundle--Lhu0g1K.js} +1 -1
- package/chunks/bundle--Lhu0g1K.js.map +1 -0
- package/chunks/{bundle-_o_iMme_.js → bundle--bY8mmDR.js} +1 -1
- package/chunks/bundle--bY8mmDR.js.map +1 -0
- package/chunks/{bundle-ibeQnj0V.js → bundle-1YZ1lMFm.js} +2 -2
- package/chunks/bundle-1YZ1lMFm.js.map +1 -0
- package/chunks/{bundle-PrsPGxuw.js → bundle-1gwAtv3_.js} +1 -1
- package/chunks/bundle-1gwAtv3_.js.map +1 -0
- package/chunks/{bundle-LG3hn4TL.js → bundle-26v6WTQh.js} +4 -4
- package/chunks/bundle-26v6WTQh.js.map +1 -0
- package/chunks/{bundle-e1b64xud.js → bundle-3te2klPE.js} +1 -1
- package/chunks/bundle-3te2klPE.js.map +1 -0
- package/chunks/{bundle-yQgn6JfU.js → bundle-3uSBAMCx.js} +34 -52
- package/chunks/bundle-3uSBAMCx.js.map +1 -0
- package/chunks/{bundle-SMgyl32k.js → bundle-4OgQJ7X4.js} +1 -1
- package/chunks/bundle-4OgQJ7X4.js.map +1 -0
- package/chunks/{bundle-SXGL8fBv.js → bundle-4PIMbALe.js} +1 -1
- package/chunks/bundle-4PIMbALe.js.map +1 -0
- package/chunks/{bundle-VfTA9EY8.js → bundle-5azogY3V.js} +10 -10
- package/chunks/{bundle-VfTA9EY8.js.map → bundle-5azogY3V.js.map} +1 -1
- package/chunks/{bundle-BTLUIJqA.js → bundle-5j_LCcnI.js} +4 -4
- package/chunks/{bundle-BTLUIJqA.js.map → bundle-5j_LCcnI.js.map} +1 -1
- package/chunks/{bundle-fMkcL8C8.js → bundle-726H1FcN.js} +1 -1
- package/chunks/bundle-726H1FcN.js.map +1 -0
- package/chunks/{bundle-jHpuKuA-.js → bundle-7DsbNj8s.js} +5 -5
- package/chunks/bundle-7DsbNj8s.js.map +1 -0
- package/chunks/{bundle-W_nWubt-.js → bundle-8FWrrAa9.js} +2 -2
- package/chunks/{bundle-W_nWubt-.js.map → bundle-8FWrrAa9.js.map} +1 -1
- package/chunks/{bundle-xLjEyoT0.js → bundle-8bj34OZZ.js} +5 -5
- package/chunks/bundle-8bj34OZZ.js.map +1 -0
- package/chunks/{bundle-BGFDI87G.js → bundle-9DSYjtTH.js} +4 -4
- package/chunks/bundle-9DSYjtTH.js.map +1 -0
- package/chunks/{bundle-pwwvkK5L.js → bundle-9JcU7WF6.js} +2 -2
- package/chunks/{bundle-pwwvkK5L.js.map → bundle-9JcU7WF6.js.map} +1 -1
- package/chunks/{bundle-cIHCEDKb.js → bundle-9N8rxcU_.js} +1 -1
- package/chunks/bundle-9N8rxcU_.js.map +1 -0
- package/chunks/{bundle-rW70z6Ho.js → bundle-9eXfVBSj.js} +3 -3
- package/chunks/bundle-9eXfVBSj.js.map +1 -0
- package/chunks/{bundle-IFrmy9_C.js → bundle-A92jjX29.js} +2 -2
- package/chunks/bundle-A92jjX29.js.map +1 -0
- package/chunks/{bundle-014pCrux.js → bundle-Bq8FTiM8.js} +1 -1
- package/chunks/bundle-Bq8FTiM8.js.map +1 -0
- package/chunks/{bundle-6ivjnK_C.js → bundle-C8lBzFe4.js} +3 -3
- package/chunks/{bundle-6ivjnK_C.js.map → bundle-C8lBzFe4.js.map} +1 -1
- package/chunks/{bundle-BLt9vn5B.js → bundle-CChs9z4I.js} +6 -6
- package/chunks/bundle-CChs9z4I.js.map +1 -0
- package/chunks/{bundle-yPhMS1LV.js → bundle-DpuIAEpN.js} +4 -1
- package/chunks/{bundle-yPhMS1LV.js.map → bundle-DpuIAEpN.js.map} +1 -1
- package/chunks/{bundle-BF1Rr3vo.js → bundle-EPOzCaN-.js} +8 -8
- package/chunks/{bundle-BF1Rr3vo.js.map → bundle-EPOzCaN-.js.map} +1 -1
- package/chunks/{bundle-rXKTCCVw.js → bundle-Eyf4eJYC.js} +5 -5
- package/chunks/{bundle-rXKTCCVw.js.map → bundle-Eyf4eJYC.js.map} +1 -1
- package/chunks/{bundle-pJmhSBAn.js → bundle-FlHetJ-i.js} +4 -4
- package/chunks/{bundle-pJmhSBAn.js.map → bundle-FlHetJ-i.js.map} +1 -1
- package/chunks/bundle-G8aQ8ldg.js +1689 -0
- package/chunks/bundle-G8aQ8ldg.js.map +1 -0
- package/chunks/{bundle--pOSeu9W.js → bundle-I3SOpmVR.js} +3 -3
- package/chunks/bundle-I3SOpmVR.js.map +1 -0
- package/chunks/{bundle-wKSIzWUl.js → bundle-ILthLqdx.js} +3 -3
- package/chunks/{bundle-wKSIzWUl.js.map → bundle-ILthLqdx.js.map} +1 -1
- package/chunks/{bundle-is3QkoNv.js → bundle-IaU6YF_5.js} +2 -2
- package/chunks/{bundle-is3QkoNv.js.map → bundle-IaU6YF_5.js.map} +1 -1
- package/chunks/{bundle-a2TolYYj.js → bundle-Ij2ogskR.js} +1 -1
- package/chunks/bundle-Ij2ogskR.js.map +1 -0
- package/chunks/{bundle-TovLF3ih.js → bundle-LN_WdItn.js} +1 -1
- package/chunks/bundle-LN_WdItn.js.map +1 -0
- package/chunks/{bundle-Q3UquQ_i.js → bundle-M-mPRQVf.js} +1 -1
- package/chunks/bundle-M-mPRQVf.js.map +1 -0
- package/chunks/{bundle-UDnO8-Dp.js → bundle-N-PDD2Cl.js} +2 -2
- package/chunks/bundle-N-PDD2Cl.js.map +1 -0
- package/chunks/{bundle-6mWCjL2G.js → bundle-NKz1R5aS.js} +6 -6
- package/chunks/bundle-NKz1R5aS.js.map +1 -0
- package/chunks/{bundle-IOegLdFC.js → bundle-ORNtuGAK.js} +3 -3
- package/chunks/bundle-ORNtuGAK.js.map +1 -0
- package/chunks/{bundle-TzTFcIfJ.js → bundle-OaODZhZ_.js} +1 -1
- package/chunks/bundle-OaODZhZ_.js.map +1 -0
- package/chunks/{bundle-6cTGHg9E.js → bundle-Q-LEE_gW.js} +3 -3
- package/chunks/{bundle-6cTGHg9E.js.map → bundle-Q-LEE_gW.js.map} +1 -1
- package/chunks/{bundle-f9AOpkiS.js → bundle-Q0DCPBLF.js} +1 -1
- package/chunks/bundle-Q0DCPBLF.js.map +1 -0
- package/chunks/{bundle-gSFYF-34.js → bundle-QzQ0Z1lc.js} +5 -5
- package/chunks/bundle-QzQ0Z1lc.js.map +1 -0
- package/chunks/{bundle-UxyhnVkY.js → bundle-SQ9QacmP.js} +1 -1
- package/chunks/bundle-SQ9QacmP.js.map +1 -0
- package/chunks/{bundle-k0q5mJF1.js → bundle-SWVZVzgr.js} +3 -3
- package/chunks/{bundle-k0q5mJF1.js.map → bundle-SWVZVzgr.js.map} +1 -1
- package/chunks/{bundle-bazn-ENb.js → bundle-V0xbpJPV.js} +1 -1
- package/chunks/bundle-V0xbpJPV.js.map +1 -0
- package/chunks/{bundle-1pgLpH_4.js → bundle-XBlUtykQ.js} +10 -7
- package/chunks/bundle-XBlUtykQ.js.map +1 -0
- package/chunks/{bundle-yoFO4gJM.js → bundle-XgKdQ_N6.js} +1 -1
- package/chunks/{bundle-yoFO4gJM.js.map → bundle-XgKdQ_N6.js.map} +1 -1
- package/chunks/{bundle-U7_j21Ss.js → bundle-YQzd7GID.js} +2 -2
- package/chunks/{bundle-U7_j21Ss.js.map → bundle-YQzd7GID.js.map} +1 -1
- package/chunks/{bundle-YpfSm9dM.js → bundle-YTNRflOw.js} +1 -1
- package/chunks/bundle-YTNRflOw.js.map +1 -0
- package/chunks/{bundle-DS8eBDjC.js → bundle-Yfu3khe4.js} +1 -1
- package/chunks/bundle-Yfu3khe4.js.map +1 -0
- package/chunks/{bundle-cJYfaBvk.js → bundle-ZA3vOSBy.js} +10 -10
- package/chunks/bundle-ZA3vOSBy.js.map +1 -0
- package/chunks/{bundle-5fPKUbCn.js → bundle-ZcW4v7tz.js} +1 -1
- package/chunks/{bundle-5fPKUbCn.js.map → bundle-ZcW4v7tz.js.map} +1 -1
- package/chunks/{bundle-6hgn3L9Y.js → bundle-ZxknBRho.js} +6 -6
- package/chunks/bundle-ZxknBRho.js.map +1 -0
- package/chunks/{bundle-Y-ZHrlZJ.js → bundle-_g4Ln2k-.js} +8 -8
- package/chunks/{bundle-Y-ZHrlZJ.js.map → bundle-_g4Ln2k-.js.map} +1 -1
- package/chunks/{bundle-wdUAfmoS.js → bundle-a81-P2WI.js} +1 -1
- package/chunks/bundle-a81-P2WI.js.map +1 -0
- package/chunks/{bundle-TYsOyvS5.js → bundle-aRzA6Ar7.js} +8 -4
- package/chunks/{bundle-TYsOyvS5.js.map → bundle-aRzA6Ar7.js.map} +1 -1
- package/chunks/{bundle-qfOg3sUU.js → bundle-b0LXFwC-.js} +11 -11
- package/chunks/{bundle-qfOg3sUU.js.map → bundle-b0LXFwC-.js.map} +1 -1
- package/chunks/{bundle-Jun66RyD.js → bundle-b3nJcKrD.js} +1 -1
- package/chunks/bundle-b3nJcKrD.js.map +1 -0
- package/chunks/{bundle-qafY5nY6.js → bundle-dznvzWdZ.js} +2 -2
- package/chunks/{bundle-qafY5nY6.js.map → bundle-dznvzWdZ.js.map} +1 -1
- package/chunks/{bundle-XEjzWAwL.js → bundle-f5U_VL0z.js} +2 -2
- package/chunks/{bundle-XEjzWAwL.js.map → bundle-f5U_VL0z.js.map} +1 -1
- package/chunks/{bundle-_xgfKjN0.js → bundle-fGp6w98-.js} +3 -3
- package/chunks/bundle-fGp6w98-.js.map +1 -0
- package/chunks/{bundle-taqbMkQe.js → bundle-iNwXYg8t.js} +1 -1
- package/chunks/{bundle-taqbMkQe.js.map → bundle-iNwXYg8t.js.map} +1 -1
- package/chunks/{bundle-WImaBVSO.js → bundle-jH1LTiaZ.js} +1 -1
- package/chunks/bundle-jH1LTiaZ.js.map +1 -0
- package/chunks/{bundle--q7ObKwF.js → bundle-kRkORTjK.js} +1 -1
- package/chunks/bundle-kRkORTjK.js.map +1 -0
- package/chunks/{bundle-S-mn30SU.js → bundle-lQUghzL6.js} +7 -3
- package/chunks/bundle-lQUghzL6.js.map +1 -0
- package/chunks/{bundle-tPOBtJjA.js → bundle-lYHZR3jb.js} +1 -1
- package/chunks/bundle-lYHZR3jb.js.map +1 -0
- package/chunks/{bundle-ykuyabqF.js → bundle-m49aWDUM.js} +4 -4
- package/chunks/{bundle-ykuyabqF.js.map → bundle-m49aWDUM.js.map} +1 -1
- package/chunks/{bundle-oLg6CIrN.js → bundle-ni6pTUHE.js} +1 -1
- package/chunks/bundle-ni6pTUHE.js.map +1 -0
- package/chunks/{bundle-f1tjVRSh.js → bundle-o8w1wTMw.js} +3 -3
- package/chunks/bundle-o8w1wTMw.js.map +1 -0
- package/chunks/{bundle-2BKREX4m.js → bundle-pYQxFvty.js} +1 -1
- package/chunks/bundle-pYQxFvty.js.map +1 -0
- package/chunks/{bundle-F_qWVzaf.js → bundle-qGz9DwGC.js} +1 -1
- package/chunks/bundle-qGz9DwGC.js.map +1 -0
- package/chunks/{bundle-rwixBUpF.js → bundle-qp8qrwgO.js} +4 -4
- package/chunks/bundle-qp8qrwgO.js.map +1 -0
- package/chunks/{bundle-9JkrMUIl.js → bundle-rYMayCT3.js} +1 -1
- package/chunks/bundle-rYMayCT3.js.map +1 -0
- package/chunks/{bundle-GCno1s5H.js → bundle-sj91Fb-2.js} +10 -10
- package/chunks/{bundle-GCno1s5H.js.map → bundle-sj91Fb-2.js.map} +1 -1
- package/chunks/{bundle-3cwcm2Rk.js → bundle-t_Zp4HcK.js} +10 -10
- package/chunks/bundle-t_Zp4HcK.js.map +1 -0
- package/chunks/{bundle-OAC6aJ8X.js → bundle-tpQ4ZoL7.js} +14 -14
- package/chunks/{bundle-OAC6aJ8X.js.map → bundle-tpQ4ZoL7.js.map} +1 -1
- package/chunks/{bundle-52hs7-M-.js → bundle-ueZaur75.js} +7 -3
- package/chunks/bundle-ueZaur75.js.map +1 -0
- package/chunks/{bundle-J6qXeThU.js → bundle-v0F6T-gl.js} +1 -1
- package/chunks/bundle-v0F6T-gl.js.map +1 -0
- package/chunks/{bundle-wO0wz3br.js → bundle-vKBxT9Oa.js} +1 -1
- package/chunks/{bundle-wO0wz3br.js.map → bundle-vKBxT9Oa.js.map} +1 -1
- package/chunks/{bundle-A8dpIXKJ.js → bundle-vqMWfuob.js} +3 -3
- package/chunks/bundle-vqMWfuob.js.map +1 -0
- package/chunks/{bundle-B_WSWypW.js → bundle-wAW5sK6g.js} +7 -7
- package/chunks/{bundle-B_WSWypW.js.map → bundle-wAW5sK6g.js.map} +1 -1
- package/chunks/{bundle-r1f2uym4.js → bundle-xJvVI8rO.js} +2 -2
- package/chunks/bundle-xJvVI8rO.js.map +1 -0
- package/chunks/{bundle-24By8B6B.js → bundle-yVnIU7yv.js} +3 -3
- package/chunks/{bundle-24By8B6B.js.map → bundle-yVnIU7yv.js.map} +1 -1
- package/cjs/App.js +79 -75
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +29 -29
- package/cjs/Channel/components/ChannelUI.js +67 -63
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +28 -28
- package/cjs/Channel/components/FrozenNotification.js +5 -5
- package/cjs/Channel/components/Message.js +62 -56
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageFeedbackModal.js +9 -9
- package/cjs/Channel/components/MessageInput.js +41 -41
- package/cjs/Channel/components/MessageInputWrapper.js +41 -41
- package/cjs/Channel/components/MessageList.js +63 -59
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +27 -27
- package/cjs/Channel/components/SuggestedMentionList.js +27 -27
- package/cjs/Channel/components/TypingIndicator.js +6 -6
- package/cjs/Channel/components/UnreadCount.js +7 -7
- package/cjs/Channel/context.js +20 -20
- package/cjs/Channel/hooks/useHandleUploadFiles.js +13 -13
- package/cjs/Channel/hooks/useInitialMessagesFetch.js +6 -6
- package/cjs/Channel/utils/compareMessagesForGrouping.js +5 -5
- package/cjs/Channel/utils/getMessagePartsInfo.js +6 -6
- package/cjs/Channel.js +67 -63
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +20 -20
- package/cjs/ChannelList/components/ChannelListHeader.js +8 -8
- package/cjs/ChannelList/components/ChannelListUI.js +34 -34
- package/cjs/ChannelList/components/ChannelPreview.js +27 -27
- package/cjs/ChannelList/components/ChannelPreviewAction.js +11 -11
- package/cjs/ChannelList/context.js +10 -10
- package/cjs/ChannelList.js +34 -34
- package/cjs/ChannelSettings/components/ChannelProfile.js +14 -14
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +23 -23
- package/cjs/ChannelSettings/components/EditDetailsModal.js +14 -14
- package/cjs/ChannelSettings/components/LeaveChannel.js +11 -11
- package/cjs/ChannelSettings/components/ModerationPanel.js +21 -21
- package/cjs/ChannelSettings/components/UserListItem.js +13 -13
- package/cjs/ChannelSettings/components/UserPanel.js +20 -20
- package/cjs/ChannelSettings/context.js +43 -22
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +23 -23
- package/cjs/CreateChannel/components/CreateChannelUI.js +16 -16
- package/cjs/CreateChannel/components/InviteUsers.js +16 -16
- package/cjs/CreateChannel/components/SelectChannelType.js +10 -10
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +16 -16
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +11 -11
- package/cjs/CreateOpenChannel/context.js +1 -1
- package/cjs/CreateOpenChannel.js +11 -11
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/cjs/EditUserProfile.js +12 -12
- package/cjs/GroupChannel/components/FileViewer.js +23 -23
- package/cjs/GroupChannel/components/FrozenNotification.js +5 -5
- package/cjs/GroupChannel/components/GroupChannelHeader.js +22 -22
- package/cjs/GroupChannel/components/GroupChannelUI.js +61 -57
- package/cjs/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/cjs/GroupChannel/components/Message.js +62 -53
- package/cjs/GroupChannel/components/Message.js.map +1 -1
- package/cjs/GroupChannel/components/MessageInputWrapper.js +37 -37
- package/cjs/GroupChannel/components/MessageList.js +61 -67
- package/cjs/GroupChannel/components/MessageList.js.map +1 -1
- package/cjs/GroupChannel/components/RemoveMessageModal.js +22 -22
- package/cjs/GroupChannel/components/SuggestedMentionList.js +12 -12
- package/cjs/GroupChannel/components/SuggestedReplies.js +1 -4
- package/cjs/GroupChannel/components/SuggestedReplies.js.map +1 -1
- package/cjs/GroupChannel/components/TypingIndicator.js +6 -6
- package/cjs/GroupChannel/components/UnreadCount.js +7 -7
- package/cjs/GroupChannel/context.js +92 -79
- package/cjs/GroupChannel/context.js.map +1 -1
- package/cjs/GroupChannel.js +61 -57
- package/cjs/GroupChannel.js.map +1 -1
- package/cjs/GroupChannelList/components/AddGroupChannel.js +18 -18
- package/cjs/GroupChannelList/components/GroupChannelListHeader.js +8 -8
- package/cjs/GroupChannelList/components/GroupChannelListItem.js +24 -24
- package/cjs/GroupChannelList/components/GroupChannelListUI.js +33 -33
- package/cjs/GroupChannelList/components/GroupChannelPreviewAction.js +11 -11
- package/cjs/GroupChannelList/context.js +5 -5
- package/cjs/GroupChannelList.js +33 -33
- package/cjs/MessageSearch/components/MessageSearchUI.js +14 -14
- package/cjs/MessageSearch/context.js +1 -1
- package/cjs/MessageSearch.js +14 -14
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/cjs/OpenChannel/components/OpenChannelHeader.js +18 -18
- package/cjs/OpenChannel/components/OpenChannelInput.js +25 -25
- package/cjs/OpenChannel/components/OpenChannelMessage.js +35 -35
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +39 -39
- package/cjs/OpenChannel/components/OpenChannelUI.js +39 -39
- package/cjs/OpenChannel/context.js +17 -17
- package/cjs/OpenChannel.js +39 -39
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +14 -14
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +6 -6
- package/cjs/OpenChannelList/context.js +3 -3
- package/cjs/OpenChannelList.js +14 -14
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +15 -15
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +15 -15
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +19 -19
- package/cjs/OpenChannelSettings/components/OperatorUI.js +19 -19
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +17 -17
- package/cjs/OpenChannelSettings/context.js +3 -3
- package/cjs/OpenChannelSettings.js +19 -19
- package/cjs/SendbirdProvider.js +360 -83
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +42 -42
- package/cjs/Thread/components/ParentMessageInfoItem.js +28 -28
- package/cjs/Thread/components/ThreadHeader.js +7 -7
- package/cjs/Thread/components/ThreadList.js +46 -46
- package/cjs/Thread/components/ThreadListItem.js +46 -46
- package/cjs/Thread/components/ThreadMessageInput.js +42 -42
- package/cjs/Thread/components/ThreadUI.js +56 -56
- package/cjs/Thread/context.js +9 -9
- package/cjs/Thread.js +56 -56
- package/cjs/VoicePlayer/context.js +3 -3
- package/cjs/VoicePlayer/useVoicePlayer.js +10 -10
- package/cjs/VoiceRecorder/context.js +10 -10
- package/cjs/VoiceRecorder/useVoiceRecorder.js +9 -9
- package/cjs/chunks/{bundle-9uUg_zKI.js → bundle--xYl15TK.js} +3 -3
- package/cjs/chunks/bundle--xYl15TK.js.map +1 -0
- package/cjs/chunks/{bundle-Oq2WwdJI.js → bundle-0OVYmgjV.js} +8 -2
- package/cjs/chunks/bundle-0OVYmgjV.js.map +1 -0
- package/cjs/chunks/{bundle-QauQilHV.js → bundle-0_XeBL9s.js} +1 -1
- package/cjs/chunks/bundle-0_XeBL9s.js.map +1 -0
- package/cjs/chunks/{bundle-h1-4ko51.js → bundle-0hOdPCEp.js} +5 -5
- package/cjs/chunks/bundle-0hOdPCEp.js.map +1 -0
- package/cjs/chunks/{bundle-Rd2d2a3j.js → bundle-0oACog1t.js} +8 -8
- package/cjs/chunks/{bundle-Rd2d2a3j.js.map → bundle-0oACog1t.js.map} +1 -1
- package/cjs/chunks/{bundle-7pGAEUaG.js → bundle-0tffesFh.js} +1 -1
- package/cjs/chunks/{bundle-7pGAEUaG.js.map → bundle-0tffesFh.js.map} +1 -1
- package/cjs/chunks/{bundle-BAZMzxRI.js → bundle-1MVKpHty.js} +1 -1
- package/cjs/chunks/bundle-1MVKpHty.js.map +1 -0
- package/cjs/chunks/{bundle-3eINsVVm.js → bundle-21xpspuo.js} +6 -6
- package/cjs/chunks/bundle-21xpspuo.js.map +1 -0
- package/cjs/chunks/{bundle-rGYP82Yc.js → bundle-2mYNn3cL.js} +3 -3
- package/cjs/chunks/bundle-2mYNn3cL.js.map +1 -0
- package/cjs/chunks/{bundle-o2GWKL_d.js → bundle-46h-dSCc.js} +1 -1
- package/cjs/chunks/bundle-46h-dSCc.js.map +1 -0
- package/cjs/chunks/{bundle-uIj1z0m8.js → bundle-4Dfxs0kD.js} +10 -7
- package/cjs/chunks/bundle-4Dfxs0kD.js.map +1 -0
- package/cjs/chunks/{bundle-jh0UjnOb.js → bundle-4TLu25Dk.js} +1 -1
- package/cjs/chunks/bundle-4TLu25Dk.js.map +1 -0
- package/cjs/chunks/{bundle-EvM8f38k.js → bundle-5dL9a_On.js} +2 -2
- package/cjs/chunks/bundle-5dL9a_On.js.map +1 -0
- package/cjs/chunks/{bundle-6k9JvMoA.js → bundle-70cVUU6w.js} +1 -1
- package/cjs/chunks/bundle-70cVUU6w.js.map +1 -0
- package/cjs/chunks/{bundle-eb9lfgWx.js → bundle-752po9g5.js} +1 -1
- package/cjs/chunks/bundle-752po9g5.js.map +1 -0
- package/cjs/chunks/{bundle-sSkyvCgN.js → bundle-7ExxSDfG.js} +3 -3
- package/cjs/chunks/bundle-7ExxSDfG.js.map +1 -0
- package/cjs/chunks/{bundle-JfUvL0pn.js → bundle-7WTXh7Qd.js} +4 -1
- package/cjs/chunks/bundle-7WTXh7Qd.js.map +1 -0
- package/cjs/chunks/{bundle-mMBwJT3x.js → bundle-AE4PYUbC.js} +4 -4
- package/cjs/chunks/{bundle-mMBwJT3x.js.map → bundle-AE4PYUbC.js.map} +1 -1
- package/cjs/chunks/{bundle-q15q65dt.js → bundle-Af1jmrRE.js} +1 -1
- package/cjs/chunks/bundle-Af1jmrRE.js.map +1 -0
- package/cjs/chunks/{bundle-cv4uM9fB.js → bundle-BXHHHwCg.js} +10 -10
- package/{chunks/bundle-yQgn6JfU.js.map → cjs/chunks/bundle-BXHHHwCg.js.map} +1 -1
- package/cjs/chunks/{bundle-rIjHxu2P.js → bundle-CH14mCu1.js} +2 -2
- package/cjs/chunks/bundle-CH14mCu1.js.map +1 -0
- package/cjs/chunks/{bundle-DAwfoiZz.js → bundle-CkuwMWuJ.js} +4 -4
- package/cjs/chunks/bundle-CkuwMWuJ.js.map +1 -0
- package/cjs/chunks/{bundle-Jy-utJ8j.js → bundle-DQ9pUAGg.js} +1 -1
- package/cjs/chunks/bundle-DQ9pUAGg.js.map +1 -0
- package/cjs/chunks/{bundle-gUU1zXtu.js → bundle-FJ9M-8s9.js} +1 -1
- package/cjs/chunks/bundle-FJ9M-8s9.js.map +1 -0
- package/cjs/chunks/{bundle-cp4Mr7IE.js → bundle-FZzNP2xh.js} +1 -1
- package/cjs/chunks/bundle-FZzNP2xh.js.map +1 -0
- package/cjs/chunks/{bundle-SM64BUgE.js → bundle-GRnWhj5U.js} +2 -2
- package/cjs/chunks/bundle-GRnWhj5U.js.map +1 -0
- package/cjs/chunks/{bundle-5_SjuoV5.js → bundle-IgDRR9an.js} +1 -1
- package/cjs/chunks/bundle-IgDRR9an.js.map +1 -0
- package/cjs/chunks/{bundle-vzrDnUV2.js → bundle-NXKv5Wxp.js} +5 -5
- package/cjs/chunks/bundle-NXKv5Wxp.js.map +1 -0
- package/cjs/chunks/{bundle-xTAz4Z91.js → bundle-NlYqioOJ.js} +1 -1
- package/cjs/chunks/bundle-NlYqioOJ.js.map +1 -0
- package/cjs/chunks/{bundle-SyUPzsOv.js → bundle-OwbPEgXa.js} +4 -4
- package/cjs/chunks/{bundle-SyUPzsOv.js.map → bundle-OwbPEgXa.js.map} +1 -1
- package/cjs/chunks/{bundle-9Ms65KWQ.js → bundle-PApDK3ev.js} +2 -2
- package/cjs/chunks/bundle-PApDK3ev.js.map +1 -0
- package/cjs/chunks/{bundle-hNdySo7A.js → bundle-PP0rRODi.js} +33 -51
- package/cjs/chunks/bundle-PP0rRODi.js.map +1 -0
- package/cjs/chunks/{bundle-J790CoNK.js → bundle-RRn1KMai.js} +1 -1
- package/cjs/chunks/bundle-RRn1KMai.js.map +1 -0
- package/cjs/chunks/{bundle-m6R8TnWy.js → bundle-S1c_Ni06.js} +14 -14
- package/cjs/chunks/{bundle-m6R8TnWy.js.map → bundle-S1c_Ni06.js.map} +1 -1
- package/cjs/chunks/{bundle-VOIBVZ8K.js → bundle-S7xHG-w3.js} +1 -1
- package/cjs/chunks/bundle-S7xHG-w3.js.map +1 -0
- package/cjs/chunks/{bundle-yJYTZhFC.js → bundle-Sp5ymcaB.js} +1 -1
- package/cjs/chunks/bundle-Sp5ymcaB.js.map +1 -0
- package/cjs/chunks/{bundle-zMBWGCQM.js → bundle-T32FV8l1.js} +2 -2
- package/cjs/chunks/bundle-T32FV8l1.js.map +1 -0
- package/cjs/chunks/{bundle-2jwRnSd8.js → bundle-UEx-yk0R.js} +8 -8
- package/cjs/chunks/{bundle-2jwRnSd8.js.map → bundle-UEx-yk0R.js.map} +1 -1
- package/cjs/chunks/{bundle-UDa2UXB2.js → bundle-VKfq6Uaj.js} +3 -3
- package/cjs/chunks/{bundle-UDa2UXB2.js.map → bundle-VKfq6Uaj.js.map} +1 -1
- package/cjs/chunks/{bundle-3SJwqpkk.js → bundle-Ve-UOjKy.js} +5 -5
- package/cjs/chunks/bundle-Ve-UOjKy.js.map +1 -0
- package/cjs/chunks/{bundle-JbsZLrne.js → bundle-XXLu4E3k.js} +2 -2
- package/cjs/chunks/{bundle-JbsZLrne.js.map → bundle-XXLu4E3k.js.map} +1 -1
- package/cjs/chunks/{bundle-Gj3FCN-l.js → bundle-XYYAUvuI.js} +1 -1
- package/cjs/chunks/bundle-XYYAUvuI.js.map +1 -0
- package/cjs/chunks/{bundle-xHh0P-Hz.js → bundle-ZAoex1pi.js} +5 -5
- package/cjs/chunks/bundle-ZAoex1pi.js.map +1 -0
- package/cjs/chunks/{bundle-mpZAARbu.js → bundle-ZC8MXTCs.js} +1 -1
- package/cjs/chunks/bundle-ZC8MXTCs.js.map +1 -0
- package/cjs/chunks/{bundle-XqQ_cljg.js → bundle-_MpChSYj.js} +1 -1
- package/cjs/chunks/bundle-_MpChSYj.js.map +1 -0
- package/cjs/chunks/{bundle-OmPnU_OI.js → bundle-a2N3BU-Q.js} +3 -3
- package/cjs/chunks/{bundle-OmPnU_OI.js.map → bundle-a2N3BU-Q.js.map} +1 -1
- package/cjs/chunks/{bundle-MIY8NRxo.js → bundle-bQNGnE7X.js} +6 -6
- package/cjs/chunks/bundle-bQNGnE7X.js.map +1 -0
- package/cjs/chunks/{bundle-6uWmKzjA.js → bundle-bRa1uu9u.js} +1 -1
- package/cjs/chunks/{bundle-6uWmKzjA.js.map → bundle-bRa1uu9u.js.map} +1 -1
- package/cjs/chunks/{bundle-fNnK4ZX1.js → bundle-boCcuPJ4.js} +2 -2
- package/cjs/chunks/{bundle-fNnK4ZX1.js.map → bundle-boCcuPJ4.js.map} +1 -1
- package/cjs/chunks/{bundle-WjU125ds.js → bundle-c5UvSMFX.js} +3 -3
- package/cjs/chunks/bundle-c5UvSMFX.js.map +1 -0
- package/cjs/chunks/{bundle-hR3vnZG1.js → bundle-cA3flg73.js} +1 -1
- package/cjs/chunks/bundle-cA3flg73.js.map +1 -0
- package/cjs/chunks/{bundle-BujsZjS_.js → bundle-cdInBvCf.js} +3 -3
- package/cjs/chunks/bundle-cdInBvCf.js.map +1 -0
- package/cjs/chunks/{bundle-juIULvxr.js → bundle-dCMQvAHA.js} +1 -1
- package/cjs/chunks/bundle-dCMQvAHA.js.map +1 -0
- package/cjs/chunks/{bundle-8fHhsSkO.js → bundle-dW6ZClWz.js} +1 -1
- package/cjs/chunks/bundle-dW6ZClWz.js.map +1 -0
- package/cjs/chunks/bundle-e2Z-oeMk.js +1692 -0
- package/cjs/chunks/bundle-e2Z-oeMk.js.map +1 -0
- package/cjs/chunks/{bundle-opmIFrXg.js → bundle-gCywzCVk.js} +8 -3
- package/cjs/chunks/{bundle-opmIFrXg.js.map → bundle-gCywzCVk.js.map} +1 -1
- package/cjs/chunks/{bundle-DGXRqeiH.js → bundle-h5InIJAx.js} +1 -1
- package/cjs/chunks/bundle-h5InIJAx.js.map +1 -0
- package/cjs/chunks/{bundle-oGyWTIOJ.js → bundle-iodh4Ass.js} +4 -4
- package/cjs/chunks/bundle-iodh4Ass.js.map +1 -0
- package/cjs/chunks/{bundle-cIL4aJSh.js → bundle-jXFyjqn6.js} +1 -1
- package/cjs/chunks/bundle-jXFyjqn6.js.map +1 -0
- package/cjs/chunks/{bundle-TPt6Ukqk.js → bundle-jdpEXM9v.js} +4 -4
- package/cjs/chunks/{bundle-TPt6Ukqk.js.map → bundle-jdpEXM9v.js.map} +1 -1
- package/cjs/chunks/{bundle-fzWbmzou.js → bundle-je5ERchd.js} +3 -3
- package/cjs/chunks/bundle-je5ERchd.js.map +1 -0
- package/cjs/chunks/{bundle-Ktg9Of7w.js → bundle-l4hJRoVO.js} +1 -1
- package/cjs/chunks/bundle-l4hJRoVO.js.map +1 -0
- package/cjs/chunks/{bundle-4jX5eqYW.js → bundle-leOuFK1P.js} +2 -2
- package/{chunks/bundle-1pgLpH_4.js.map → cjs/chunks/bundle-leOuFK1P.js.map} +1 -1
- package/cjs/chunks/{bundle-0vl1G6aF.js → bundle-lhYJWwkC.js} +3 -3
- package/cjs/chunks/bundle-lhYJWwkC.js.map +1 -0
- package/cjs/chunks/{bundle-sPQAW6hW.js → bundle-mJdmd7Tl.js} +1 -1
- package/cjs/chunks/bundle-mJdmd7Tl.js.map +1 -0
- package/cjs/chunks/{bundle-IKnblThp.js → bundle-mcTI4BFk.js} +6 -6
- package/cjs/chunks/bundle-mcTI4BFk.js.map +1 -0
- package/cjs/chunks/{bundle-SR43QM50.js → bundle-n5-vItXT.js} +4 -4
- package/cjs/chunks/bundle-n5-vItXT.js.map +1 -0
- package/cjs/chunks/{bundle-hYAxN2fG.js → bundle-nLRPwYL5.js} +1 -1
- package/cjs/chunks/bundle-nLRPwYL5.js.map +1 -0
- package/cjs/chunks/{bundle-vtbEyMlh.js → bundle-opuYK5G6.js} +1 -1
- package/cjs/chunks/bundle-opuYK5G6.js.map +1 -0
- package/cjs/chunks/{bundle-KHlebcMh.js → bundle-pA5gKXTy.js} +3 -3
- package/cjs/chunks/{bundle-KHlebcMh.js.map → bundle-pA5gKXTy.js.map} +1 -1
- package/cjs/chunks/{bundle-cbIBIuxw.js → bundle-qna2pNgw.js} +1 -1
- package/cjs/chunks/bundle-qna2pNgw.js.map +1 -0
- package/cjs/chunks/{bundle-pNtkOzhO.js → bundle-r6yUb5Ka.js} +10 -10
- package/cjs/chunks/bundle-r6yUb5Ka.js.map +1 -0
- package/cjs/chunks/{bundle-rm245WXS.js → bundle-rEEpe9mU.js} +2 -2
- package/cjs/chunks/bundle-rEEpe9mU.js.map +1 -0
- package/cjs/chunks/{bundle-jkZbYCwb.js → bundle-rWYgBQd0.js} +11 -11
- package/cjs/chunks/{bundle-jkZbYCwb.js.map → bundle-rWYgBQd0.js.map} +1 -1
- package/cjs/chunks/{bundle-rY_4WHYR.js → bundle-rp1PaeP0.js} +3 -3
- package/cjs/chunks/bundle-rp1PaeP0.js.map +1 -0
- package/cjs/chunks/{bundle-yzcXd9DQ.js → bundle-tNBLsc90.js} +10 -10
- package/cjs/chunks/bundle-tNBLsc90.js.map +1 -0
- package/cjs/chunks/{bundle-VySxn-bM.js → bundle-tzC2Xgxv.js} +7 -7
- package/cjs/chunks/bundle-tzC2Xgxv.js.map +1 -0
- package/cjs/chunks/{bundle-YGVhXIfU.js → bundle-ur6RZdPS.js} +2 -2
- package/cjs/chunks/bundle-ur6RZdPS.js.map +1 -0
- package/cjs/chunks/{bundle-634wsixh.js → bundle-vdxxxpUO.js} +10 -10
- package/cjs/chunks/{bundle-634wsixh.js.map → bundle-vdxxxpUO.js.map} +1 -1
- package/cjs/chunks/{bundle-YZRXvkp-.js → bundle-xSEKQWBT.js} +1 -1
- package/cjs/chunks/bundle-xSEKQWBT.js.map +1 -0
- package/cjs/chunks/{bundle-12iJO39c.js → bundle-y7M4yzjp.js} +7 -3
- package/cjs/chunks/bundle-y7M4yzjp.js.map +1 -0
- package/cjs/chunks/{bundle-zvM7ls7A.js → bundle-ybuXM4li.js} +1 -1
- package/cjs/chunks/bundle-ybuXM4li.js.map +1 -0
- package/cjs/hooks/useModal.js +9 -9
- package/cjs/index.js +83 -79
- package/cjs/index.js.map +1 -1
- package/cjs/pubSub/topics.js +1 -1
- package/cjs/sendbirdSelectors.js +2 -2
- package/cjs/ui/Accordion.js +3 -3
- package/cjs/ui/AccordionGroup.js +2 -2
- 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 +9 -9
- 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 +6 -6
- package/cjs/ui/DateSeparator.js +4 -4
- package/cjs/ui/EmojiReactions.js +16 -16
- package/cjs/ui/FallbackTemplateMessageItemBody.tsx.js +34 -0
- package/cjs/ui/FallbackTemplateMessageItemBody.tsx.js.map +1 -0
- package/cjs/ui/FileMessageItemBody.js +8 -8
- package/cjs/ui/FileViewer.js +15 -15
- package/cjs/ui/Icon.js +4 -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 +3 -3
- package/cjs/ui/Loader.js +2 -2
- package/cjs/ui/LoadingTemplateMessageItemBody.tsx.js +29 -0
- package/cjs/ui/LoadingTemplateMessageItemBody.tsx.js.map +1 -0
- package/cjs/ui/MentionLabel.js +13 -13
- package/cjs/ui/MentionUserLabel.js +1 -1
- package/cjs/ui/MessageContent.js +93 -50
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput/hooks/usePaste.js +7 -7
- package/cjs/ui/MessageInput.js +24 -20
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +10 -10
- package/cjs/ui/MessageItemReactionMenu.js +9 -9
- package/cjs/ui/MessageSearchFileItem.js +14 -14
- package/cjs/ui/MessageSearchItem.js +11 -11
- package/cjs/ui/MessageStatus.js +12 -12
- package/cjs/ui/MessageTemplate.js +12 -0
- package/cjs/ui/MessageTemplate.js.map +1 -0
- package/cjs/ui/MobileFeedbackMenu.js +9 -9
- package/cjs/ui/Modal.js +8 -8
- package/cjs/ui/MutedAvatarOverlay.js +2 -2
- package/cjs/ui/OGMessageItemBody.js +16 -16
- 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 +18 -18
- package/cjs/ui/OpenchannelOGMessage.js +20 -20
- package/cjs/ui/OpenchannelThumbnailMessage.js +17 -17
- package/cjs/ui/OpenchannelUserMessage.js +18 -18
- package/cjs/ui/PlaceHolder.js +6 -6
- package/cjs/ui/PlaybackTime.js +3 -3
- package/cjs/ui/QuoteMessage.js +9 -9
- package/cjs/ui/QuoteMessageInput.js +9 -9
- 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 +245 -0
- package/cjs/ui/TemplateMessageItemBody.js.map +1 -0
- package/cjs/ui/TextButton.js +2 -2
- package/cjs/ui/TextMessageItemBody.js +16 -16
- package/cjs/ui/ThreadReplies.js +8 -8
- package/cjs/ui/ThumbnailMessageItemBody.js +7 -7
- package/cjs/ui/Toggle.js +1 -1
- 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 +7 -7
- package/cjs/ui/UserListItem.js +13 -13
- package/cjs/ui/UserProfile.js +10 -10
- package/cjs/ui/VoiceMessageInput.js +9 -9
- package/cjs/ui/VoiceMessageItemBody.js +10 -10
- package/cjs/ui/Word.js +13 -13
- package/cjs/useSendbirdStateContext.js +1 -1
- package/cjs/utils/message/isVoiceMessage.js +3 -3
- package/cjs/withSendbird.js +1 -1
- package/dist/index.css +207 -62
- package/dist/index.css.map +1 -1
- package/hooks/useModal.js +10 -10
- package/index.js +83 -79
- package/index.js.map +1 -1
- package/package.json +40 -3
- package/pubSub/topics.js +1 -1
- package/sendbirdSelectors.js +2 -2
- package/types/hooks/useAsyncRequest.d.ts +3 -0
- package/types/lib/dux/appInfo/actionTypes.d.ts +25 -0
- package/types/lib/dux/appInfo/initialState.d.ts +22 -0
- package/types/lib/dux/appInfo/reducers.d.ts +3 -0
- package/types/lib/dux/appInfo/utils.d.ts +7 -0
- package/types/lib/hooks/useConnect/__test__/data.mocks.d.ts +3 -2
- package/types/lib/hooks/useConnect/connect.d.ts +1 -1
- package/types/lib/hooks/useConnect/setupConnection.d.ts +1 -1
- package/types/lib/hooks/useConnect/types.d.ts +6 -3
- package/types/lib/hooks/useMessageTemplateUtils.d.ts +18 -0
- package/types/lib/types.d.ts +14 -0
- package/types/modules/Channel/components/MessageList/index.d.ts +1 -1
- package/types/modules/GroupChannel/components/GroupChannelUI/GroupChannelUIView.d.ts +5 -0
- package/types/modules/GroupChannel/components/Message/MessageView.d.ts +6 -0
- package/types/modules/GroupChannel/components/MessageList/index.d.ts +5 -1
- package/types/modules/GroupChannel/components/MessageTemplateWrapper/index.d.ts +8 -0
- package/types/modules/GroupChannel/components/SuggestedReplies/index.d.ts +4 -2
- package/types/modules/GroupChannel/context/GroupChannelProvider.d.ts +2 -2
- package/types/modules/GroupChannel/context/hooks/useMessageActions.d.ts +1 -1
- package/types/modules/GroupChannel/context/hooks/useMessageListScroll.d.ts +5 -2
- package/types/types.d.ts +1 -0
- package/types/ui/Icon/colors.d.ts +2 -0
- package/types/ui/Icon/index.d.ts +1 -0
- package/types/ui/Label/index.d.ts +2 -0
- package/types/ui/Label/stringSet.d.ts +3 -0
- package/types/ui/Label/types.d.ts +2 -0
- package/types/ui/Label/utils.d.ts +1 -1
- package/types/ui/LinkLabel/index.d.ts +2 -0
- package/types/ui/MessageContent/index.d.ts +3 -1
- package/types/ui/MessageTemplate/index.d.ts +8 -0
- package/types/ui/TemplateMessageItemBody/FallbackTemplateMessageItemBody.d.ts +9 -0
- package/types/ui/TemplateMessageItemBody/LoadingTemplateMessageItemBody.d.ts +7 -0
- package/types/ui/TemplateMessageItemBody/index.d.ts +12 -0
- package/types/ui/TemplateMessageItemBody/types.d.ts +96 -0
- package/types/ui/TemplateMessageItemBody/utils/flattenObject.d.ts +7 -0
- package/types/ui/TemplateMessageItemBody/utils/mapData.d.ts +7 -0
- package/types/ui/TemplateMessageItemBody/utils/restoreNumbersFromMessageTemplateObject.d.ts +1 -0
- package/types/ui/TemplateMessageItemBody/utils/selectColorVariablesByTheme.d.ts +6 -0
- package/types/utils/consts.d.ts +2 -0
- package/types/utils/index.d.ts +1 -0
- package/ui/Accordion.js +3 -3
- package/ui/AccordionGroup.js +2 -2
- package/ui/AdminMessage.js +3 -3
- package/ui/Avatar.js +4 -4
- package/ui/Badge.js +5 -5
- package/ui/BottomSheet.js +9 -9
- package/ui/Button.js +3 -3
- package/ui/ChannelAvatar.js +5 -5
- package/ui/ConnectionStatus.js +6 -6
- package/ui/ContextMenu.js +6 -6
- package/ui/DateSeparator.js +4 -4
- package/ui/EmojiReactions.js +16 -16
- package/ui/FallbackTemplateMessageItemBody.tsx.js +29 -0
- package/ui/FallbackTemplateMessageItemBody.tsx.js.map +1 -0
- package/ui/FileMessageItemBody.js +8 -8
- package/ui/FileViewer.js +15 -15
- package/ui/Icon.js +4 -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 +3 -3
- package/ui/Loader.js +2 -2
- package/ui/LoadingTemplateMessageItemBody.tsx.js +24 -0
- package/ui/LoadingTemplateMessageItemBody.tsx.js.map +1 -0
- package/ui/MentionLabel.js +13 -13
- package/ui/MentionUserLabel.js +1 -1
- package/ui/MessageContent.js +93 -50
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput/hooks/usePaste.js +7 -7
- package/ui/MessageInput.js +25 -21
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +10 -10
- package/ui/MessageItemReactionMenu.js +9 -9
- package/ui/MessageSearchFileItem.js +14 -14
- package/ui/MessageSearchItem.js +11 -11
- package/ui/MessageStatus.js +12 -12
- package/ui/MessageTemplate.js +3 -0
- package/ui/MessageTemplate.js.map +1 -0
- package/ui/MobileFeedbackMenu.js +9 -9
- package/ui/Modal.js +8 -8
- package/ui/MutedAvatarOverlay.js +2 -2
- package/ui/OGMessageItemBody.js +16 -16
- package/ui/OpenChannelAdminMessage.js +3 -3
- package/ui/OpenChannelAvatar.js +8 -8
- package/ui/OpenchannelConversationHeader.js +8 -8
- package/ui/OpenchannelFileMessage.js +18 -18
- package/ui/OpenchannelOGMessage.js +20 -20
- package/ui/OpenchannelThumbnailMessage.js +17 -17
- package/ui/OpenchannelUserMessage.js +18 -18
- package/ui/PlaceHolder.js +6 -6
- package/ui/PlaybackTime.js +3 -3
- package/ui/QuoteMessage.js +9 -9
- package/ui/QuoteMessageInput.js +9 -9
- package/ui/ReactionBadge.js +3 -3
- package/ui/ReactionButton.js +4 -4
- package/ui/SortByRow.js +2 -2
- package/ui/TemplateMessageItemBody.js +240 -0
- package/ui/TemplateMessageItemBody.js.map +1 -0
- package/ui/TextButton.js +2 -2
- package/ui/TextMessageItemBody.js +16 -16
- package/ui/ThreadReplies.js +8 -8
- package/ui/ThumbnailMessageItemBody.js +7 -7
- package/ui/Toggle.js +1 -1
- package/ui/Tooltip.js +3 -3
- package/ui/TooltipWrapper.js +1 -1
- package/ui/TypingIndicatorBubble.js +4 -4
- package/ui/UnknownMessageItemBody.js +7 -7
- package/ui/UserListItem.js +13 -13
- package/ui/UserProfile.js +10 -10
- package/ui/VoiceMessageInput.js +9 -9
- package/ui/VoiceMessageItemBody.js +10 -10
- package/ui/Word.js +13 -13
- package/useSendbirdStateContext.js +1 -1
- package/utils/message/isVoiceMessage.js +3 -3
- package/withSendbird.js +1 -1
- package/chunks/bundle--pOSeu9W.js.map +0 -1
- package/chunks/bundle--q7ObKwF.js.map +0 -1
- package/chunks/bundle-014pCrux.js.map +0 -1
- package/chunks/bundle-2BKREX4m.js.map +0 -1
- package/chunks/bundle-3cwcm2Rk.js.map +0 -1
- package/chunks/bundle-52hs7-M-.js.map +0 -1
- package/chunks/bundle-6hgn3L9Y.js.map +0 -1
- package/chunks/bundle-6mWCjL2G.js.map +0 -1
- package/chunks/bundle-9JkrMUIl.js.map +0 -1
- package/chunks/bundle-A8dpIXKJ.js.map +0 -1
- package/chunks/bundle-BGFDI87G.js.map +0 -1
- package/chunks/bundle-BLt9vn5B.js.map +0 -1
- package/chunks/bundle-DS8eBDjC.js.map +0 -1
- package/chunks/bundle-F_qWVzaf.js.map +0 -1
- package/chunks/bundle-IFrmy9_C.js.map +0 -1
- package/chunks/bundle-IOegLdFC.js.map +0 -1
- package/chunks/bundle-J6qXeThU.js.map +0 -1
- package/chunks/bundle-Jun66RyD.js.map +0 -1
- package/chunks/bundle-LG3hn4TL.js.map +0 -1
- package/chunks/bundle-PrsPGxuw.js.map +0 -1
- package/chunks/bundle-Q3UquQ_i.js.map +0 -1
- package/chunks/bundle-S-mn30SU.js.map +0 -1
- package/chunks/bundle-SMgyl32k.js.map +0 -1
- package/chunks/bundle-SXGL8fBv.js.map +0 -1
- package/chunks/bundle-TovLF3ih.js.map +0 -1
- package/chunks/bundle-TzTFcIfJ.js.map +0 -1
- package/chunks/bundle-UDnO8-Dp.js.map +0 -1
- package/chunks/bundle-UxyhnVkY.js.map +0 -1
- package/chunks/bundle-WImaBVSO.js.map +0 -1
- package/chunks/bundle-YpfSm9dM.js.map +0 -1
- package/chunks/bundle-ZlvXkXrU.js.map +0 -1
- package/chunks/bundle-_o_iMme_.js.map +0 -1
- package/chunks/bundle-_xgfKjN0.js.map +0 -1
- package/chunks/bundle-a2TolYYj.js.map +0 -1
- package/chunks/bundle-bazn-ENb.js.map +0 -1
- package/chunks/bundle-cIHCEDKb.js.map +0 -1
- package/chunks/bundle-cJYfaBvk.js.map +0 -1
- package/chunks/bundle-e1b64xud.js.map +0 -1
- package/chunks/bundle-f1tjVRSh.js.map +0 -1
- package/chunks/bundle-f9AOpkiS.js.map +0 -1
- package/chunks/bundle-fMkcL8C8.js.map +0 -1
- package/chunks/bundle-gSFYF-34.js.map +0 -1
- package/chunks/bundle-ibeQnj0V.js.map +0 -1
- package/chunks/bundle-jHpuKuA-.js.map +0 -1
- package/chunks/bundle-oLg6CIrN.js.map +0 -1
- package/chunks/bundle-r1f2uym4.js.map +0 -1
- package/chunks/bundle-rW70z6Ho.js.map +0 -1
- package/chunks/bundle-rwixBUpF.js.map +0 -1
- package/chunks/bundle-tPOBtJjA.js.map +0 -1
- package/chunks/bundle-wdUAfmoS.js.map +0 -1
- package/chunks/bundle-xLjEyoT0.js.map +0 -1
- package/cjs/chunks/bundle-0vl1G6aF.js.map +0 -1
- package/cjs/chunks/bundle-12iJO39c.js.map +0 -1
- package/cjs/chunks/bundle-3SJwqpkk.js.map +0 -1
- package/cjs/chunks/bundle-3eINsVVm.js.map +0 -1
- package/cjs/chunks/bundle-4jX5eqYW.js.map +0 -1
- package/cjs/chunks/bundle-5_SjuoV5.js.map +0 -1
- package/cjs/chunks/bundle-6k9JvMoA.js.map +0 -1
- package/cjs/chunks/bundle-8fHhsSkO.js.map +0 -1
- package/cjs/chunks/bundle-9Ms65KWQ.js.map +0 -1
- package/cjs/chunks/bundle-9uUg_zKI.js.map +0 -1
- package/cjs/chunks/bundle-BAZMzxRI.js.map +0 -1
- package/cjs/chunks/bundle-BujsZjS_.js.map +0 -1
- package/cjs/chunks/bundle-DAwfoiZz.js.map +0 -1
- package/cjs/chunks/bundle-DGXRqeiH.js.map +0 -1
- package/cjs/chunks/bundle-EvM8f38k.js.map +0 -1
- package/cjs/chunks/bundle-Gj3FCN-l.js.map +0 -1
- package/cjs/chunks/bundle-IKnblThp.js.map +0 -1
- package/cjs/chunks/bundle-J790CoNK.js.map +0 -1
- package/cjs/chunks/bundle-JfUvL0pn.js.map +0 -1
- package/cjs/chunks/bundle-Jy-utJ8j.js.map +0 -1
- package/cjs/chunks/bundle-Ktg9Of7w.js.map +0 -1
- package/cjs/chunks/bundle-MIY8NRxo.js.map +0 -1
- package/cjs/chunks/bundle-Oq2WwdJI.js.map +0 -1
- package/cjs/chunks/bundle-QauQilHV.js.map +0 -1
- package/cjs/chunks/bundle-SM64BUgE.js.map +0 -1
- package/cjs/chunks/bundle-SR43QM50.js.map +0 -1
- package/cjs/chunks/bundle-VOIBVZ8K.js.map +0 -1
- package/cjs/chunks/bundle-VySxn-bM.js.map +0 -1
- package/cjs/chunks/bundle-WjU125ds.js.map +0 -1
- package/cjs/chunks/bundle-XqQ_cljg.js.map +0 -1
- package/cjs/chunks/bundle-YGVhXIfU.js.map +0 -1
- package/cjs/chunks/bundle-YZRXvkp-.js.map +0 -1
- package/cjs/chunks/bundle-cIL4aJSh.js.map +0 -1
- package/cjs/chunks/bundle-cbIBIuxw.js.map +0 -1
- package/cjs/chunks/bundle-cp4Mr7IE.js.map +0 -1
- package/cjs/chunks/bundle-cv4uM9fB.js.map +0 -1
- package/cjs/chunks/bundle-eb9lfgWx.js.map +0 -1
- package/cjs/chunks/bundle-fzWbmzou.js.map +0 -1
- package/cjs/chunks/bundle-gUU1zXtu.js.map +0 -1
- package/cjs/chunks/bundle-h1-4ko51.js.map +0 -1
- package/cjs/chunks/bundle-hNdySo7A.js.map +0 -1
- package/cjs/chunks/bundle-hR3vnZG1.js.map +0 -1
- package/cjs/chunks/bundle-hYAxN2fG.js.map +0 -1
- package/cjs/chunks/bundle-jh0UjnOb.js.map +0 -1
- package/cjs/chunks/bundle-juIULvxr.js.map +0 -1
- package/cjs/chunks/bundle-mpZAARbu.js.map +0 -1
- package/cjs/chunks/bundle-o2GWKL_d.js.map +0 -1
- package/cjs/chunks/bundle-oGyWTIOJ.js.map +0 -1
- package/cjs/chunks/bundle-pNtkOzhO.js.map +0 -1
- package/cjs/chunks/bundle-q15q65dt.js.map +0 -1
- package/cjs/chunks/bundle-rGYP82Yc.js.map +0 -1
- package/cjs/chunks/bundle-rIjHxu2P.js.map +0 -1
- package/cjs/chunks/bundle-rY_4WHYR.js.map +0 -1
- package/cjs/chunks/bundle-rm245WXS.js.map +0 -1
- package/cjs/chunks/bundle-sPQAW6hW.js.map +0 -1
- package/cjs/chunks/bundle-sSkyvCgN.js.map +0 -1
- package/cjs/chunks/bundle-uIj1z0m8.js.map +0 -1
- package/cjs/chunks/bundle-vtbEyMlh.js.map +0 -1
- package/cjs/chunks/bundle-vzrDnUV2.js.map +0 -1
- package/cjs/chunks/bundle-xHh0P-Hz.js.map +0 -1
- package/cjs/chunks/bundle-xTAz4Z91.js.map +0 -1
- package/cjs/chunks/bundle-yJYTZhFC.js.map +0 -1
- package/cjs/chunks/bundle-yzcXd9DQ.js.map +0 -1
- package/cjs/chunks/bundle-zMBWGCQM.js.map +0 -1
- package/cjs/chunks/bundle-zvM7ls7A.js.map +0 -1
- package/types/modules/GroupChannel/components/MessageList/hooks/useScrollBehavior.d.ts +0 -1
|
@@ -0,0 +1,1689 @@
|
|
|
1
|
+
import React__default, { createContext, useState, useCallback, useContext, useRef, useMemo, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var ComponentType;
|
|
4
|
+
(function (ComponentType) {
|
|
5
|
+
ComponentType["Box"] = "box";
|
|
6
|
+
ComponentType["Text"] = "text";
|
|
7
|
+
ComponentType["Image"] = "image";
|
|
8
|
+
ComponentType["TextButton"] = "textButton";
|
|
9
|
+
ComponentType["ImageButton"] = "imageButton";
|
|
10
|
+
})(ComponentType || (ComponentType = {}));
|
|
11
|
+
|
|
12
|
+
// -------- Set property mapper
|
|
13
|
+
const MAPPER = () => undefined;
|
|
14
|
+
const createParser = (params) => {
|
|
15
|
+
const defaultMapper = (params === null || params === void 0 ? void 0 : params.defaultMapper) || MAPPER;
|
|
16
|
+
const mapper = {
|
|
17
|
+
defaultMapper,
|
|
18
|
+
mapBoxProps: (params === null || params === void 0 ? void 0 : params.mapBoxProps) || defaultMapper,
|
|
19
|
+
mapTextProps: (params === null || params === void 0 ? void 0 : params.mapTextProps) || defaultMapper,
|
|
20
|
+
mapImageProps: (params === null || params === void 0 ? void 0 : params.mapImageProps) || defaultMapper,
|
|
21
|
+
mapTextButtonProps: (params === null || params === void 0 ? void 0 : params.mapTextButtonProps) || defaultMapper,
|
|
22
|
+
mapImageButtonProps: (params === null || params === void 0 ? void 0 : params.mapImageButtonProps) || defaultMapper,
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
parse(item, options) {
|
|
26
|
+
switch (item.type) {
|
|
27
|
+
case ComponentType.Box: {
|
|
28
|
+
return { properties: mapper.mapBoxProps(item, options) };
|
|
29
|
+
}
|
|
30
|
+
case ComponentType.Text: {
|
|
31
|
+
return { properties: mapper.mapTextProps(item, options) };
|
|
32
|
+
}
|
|
33
|
+
case ComponentType.Image: {
|
|
34
|
+
return { properties: mapper.mapImageProps(item, options) };
|
|
35
|
+
}
|
|
36
|
+
case ComponentType.TextButton: {
|
|
37
|
+
return { properties: mapper.mapTextButtonProps(item, options) };
|
|
38
|
+
}
|
|
39
|
+
case ComponentType.ImageButton: {
|
|
40
|
+
return { properties: mapper.mapImageButtonProps(item, options) };
|
|
41
|
+
}
|
|
42
|
+
default:
|
|
43
|
+
return { properties: undefined };
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const FRAGMENT = ({ children }) => React__default.createElement(React__default.Fragment, null, children);
|
|
50
|
+
function createRenderer(params) {
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
|
+
return {
|
|
53
|
+
box: ((_a = params === null || params === void 0 ? void 0 : params.views) === null || _a === void 0 ? void 0 : _a.box) || FRAGMENT,
|
|
54
|
+
text: ((_b = params === null || params === void 0 ? void 0 : params.views) === null || _b === void 0 ? void 0 : _b.text) || FRAGMENT,
|
|
55
|
+
image: ((_c = params === null || params === void 0 ? void 0 : params.views) === null || _c === void 0 ? void 0 : _c.image) || FRAGMENT,
|
|
56
|
+
imageButton: ((_d = params === null || params === void 0 ? void 0 : params.views) === null || _d === void 0 ? void 0 : _d.imageButton) || FRAGMENT,
|
|
57
|
+
textButton: ((_e = params === null || params === void 0 ? void 0 : params.views) === null || _e === void 0 ? void 0 : _e.textButton) || FRAGMENT,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
|
|
62
|
+
var t = {};
|
|
63
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
64
|
+
t[p] = s[p];
|
|
65
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
66
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
67
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
68
|
+
t[p[i]] = s[p[i]];
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
};
|
|
72
|
+
const SizeContext = createContext({
|
|
73
|
+
sizes: {},
|
|
74
|
+
updateSize: () => { },
|
|
75
|
+
});
|
|
76
|
+
const SizeContextProvider = ({ children }) => {
|
|
77
|
+
const [sizes, setSizes] = useState({});
|
|
78
|
+
const updateSize = useCallback((_a) => {
|
|
79
|
+
var { id } = _a, rest = __rest$4(_a, ["id"]);
|
|
80
|
+
if (id) {
|
|
81
|
+
setSizes((prevSizes) => (Object.assign(Object.assign({}, prevSizes), { [id]: rest })));
|
|
82
|
+
}
|
|
83
|
+
}, []);
|
|
84
|
+
return React__default.createElement(SizeContext.Provider, { value: { sizes, updateSize } }, children);
|
|
85
|
+
};
|
|
86
|
+
const useSizeContext = () => useContext(SizeContext);
|
|
87
|
+
|
|
88
|
+
const memoize = (fn) => {
|
|
89
|
+
const cache = new Map();
|
|
90
|
+
const cached = function (val) {
|
|
91
|
+
return cache.has(val) ? cache.get(val) : cache.set(val, fn.call(this, val)) && cache.get(val);
|
|
92
|
+
};
|
|
93
|
+
cached.cache = cache;
|
|
94
|
+
return cached;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Generate each item's id by each item's array depth
|
|
98
|
+
*/
|
|
99
|
+
const setTemplateItemId = memoize((data) => {
|
|
100
|
+
const addIdRecursively = (item, id) => {
|
|
101
|
+
if ('items' in item && (item === null || item === void 0 ? void 0 : item.items) != null) {
|
|
102
|
+
item.items.forEach((subItem, subIdx) => {
|
|
103
|
+
const subId = `${id}-${subIdx}`;
|
|
104
|
+
subItem.id = subId;
|
|
105
|
+
addIdRecursively(subItem, subId);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
data.forEach((item, idx) => {
|
|
110
|
+
const id = `${idx}`;
|
|
111
|
+
item.id = id;
|
|
112
|
+
addIdRecursively(item, id);
|
|
113
|
+
});
|
|
114
|
+
return data;
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
var Layout;
|
|
118
|
+
(function (Layout) {
|
|
119
|
+
Layout["Row"] = "row";
|
|
120
|
+
Layout["Column"] = "column";
|
|
121
|
+
})(Layout || (Layout = {}));
|
|
122
|
+
var AlignValue;
|
|
123
|
+
(function (AlignValue) {
|
|
124
|
+
AlignValue["Center"] = "center";
|
|
125
|
+
AlignValue["Left"] = "left";
|
|
126
|
+
AlignValue["Right"] = "right";
|
|
127
|
+
AlignValue["Top"] = "top";
|
|
128
|
+
AlignValue["Bottom"] = "bottom";
|
|
129
|
+
})(AlignValue || (AlignValue = {}));
|
|
130
|
+
/**
|
|
131
|
+
* @description
|
|
132
|
+
* Caution: Numbers are passed as string types in the message template builder.
|
|
133
|
+
* Use `==` comparison instead of `===` comparison when using a regular enum instead of a string enum.
|
|
134
|
+
*/
|
|
135
|
+
var FlexSizeSpecValue;
|
|
136
|
+
(function (FlexSizeSpecValue) {
|
|
137
|
+
FlexSizeSpecValue[FlexSizeSpecValue["FillParent"] = 0] = "FillParent";
|
|
138
|
+
FlexSizeSpecValue[FlexSizeSpecValue["WrapContent"] = 1] = "WrapContent";
|
|
139
|
+
})(FlexSizeSpecValue || (FlexSizeSpecValue = {}));
|
|
140
|
+
var FontWeight;
|
|
141
|
+
(function (FontWeight) {
|
|
142
|
+
FontWeight["Normal"] = "normal";
|
|
143
|
+
FontWeight["Bold"] = "bold";
|
|
144
|
+
})(FontWeight || (FontWeight = {}));
|
|
145
|
+
var MediaContentMode;
|
|
146
|
+
(function (MediaContentMode) {
|
|
147
|
+
MediaContentMode["AspectFit"] = "aspectFit";
|
|
148
|
+
MediaContentMode["AspectFill"] = "aspectFill";
|
|
149
|
+
MediaContentMode["ScalesToFill"] = "scalesToFill";
|
|
150
|
+
})(MediaContentMode || (MediaContentMode = {}));
|
|
151
|
+
|
|
152
|
+
const defaultProperties = {
|
|
153
|
+
rootLayout: Layout.Column,
|
|
154
|
+
view: {
|
|
155
|
+
size: {
|
|
156
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
157
|
+
height: { type: 'flex', value: FlexSizeSpecValue.WrapContent },
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
box: {
|
|
161
|
+
layout: Layout.Row,
|
|
162
|
+
align: { vertical: AlignValue.Top, horizontal: AlignValue.Left },
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const createMessageTemplate = (opts) => {
|
|
167
|
+
const Container = opts.Container || React__default.Fragment;
|
|
168
|
+
const UnknownMessage = opts.UnknownMessage || (() => null);
|
|
169
|
+
const parser = opts.parser || createParser();
|
|
170
|
+
const renderer = opts.renderer || createRenderer();
|
|
171
|
+
const MessageTemplateBase = (props) => {
|
|
172
|
+
var _a;
|
|
173
|
+
const renderItems = props.templateItems;
|
|
174
|
+
const parentLayout = (_a = props.parentLayout) !== null && _a !== void 0 ? _a : defaultProperties.box.layout;
|
|
175
|
+
return (React__default.createElement(React__default.Fragment, null, renderItems.map((item, index, siblings) => {
|
|
176
|
+
const { properties } = parser.parse(item, { parentLayout, elemIdx: index, siblings });
|
|
177
|
+
const props = {
|
|
178
|
+
key: index,
|
|
179
|
+
parentLayout,
|
|
180
|
+
parsedProperties: properties,
|
|
181
|
+
siblings,
|
|
182
|
+
};
|
|
183
|
+
switch (item.type) {
|
|
184
|
+
case ComponentType.Box: {
|
|
185
|
+
return (React__default.createElement(renderer.box, Object.assign({}, item, props),
|
|
186
|
+
React__default.createElement(MessageTemplateBase, { templateItems: item.items || [], parentLayout: item.layout })));
|
|
187
|
+
}
|
|
188
|
+
case ComponentType.Text: {
|
|
189
|
+
return React__default.createElement(renderer.text, Object.assign({}, item, props));
|
|
190
|
+
}
|
|
191
|
+
case ComponentType.Image: {
|
|
192
|
+
return React__default.createElement(renderer.image, Object.assign({}, item, props));
|
|
193
|
+
}
|
|
194
|
+
case ComponentType.TextButton: {
|
|
195
|
+
return React__default.createElement(renderer.textButton, Object.assign({}, item, props));
|
|
196
|
+
}
|
|
197
|
+
case ComponentType.ImageButton: {
|
|
198
|
+
return React__default.createElement(renderer.imageButton, Object.assign({}, item, props));
|
|
199
|
+
}
|
|
200
|
+
default: {
|
|
201
|
+
// or throw new Error('Cannot parse template item')
|
|
202
|
+
return React__default.createElement(UnknownMessage, { item: item });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
})));
|
|
206
|
+
};
|
|
207
|
+
return {
|
|
208
|
+
MessageTemplate: ({ parentLayout = defaultProperties.rootLayout, templateItems }) => {
|
|
209
|
+
const items = setTemplateItemId(templateItems);
|
|
210
|
+
return (React__default.createElement(SizeContextProvider, null,
|
|
211
|
+
React__default.createElement(Container, null,
|
|
212
|
+
React__default.createElement(MessageTemplateBase, { parentLayout: parentLayout, templateItems: items }))));
|
|
213
|
+
},
|
|
214
|
+
MessageTemplateBase,
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
var ActionType;
|
|
219
|
+
(function (ActionType) {
|
|
220
|
+
ActionType["Web"] = "web";
|
|
221
|
+
ActionType["Custom"] = "custom";
|
|
222
|
+
ActionType["UIKit"] = "uikit";
|
|
223
|
+
})(ActionType || (ActionType = {}));
|
|
224
|
+
|
|
225
|
+
const alignInFlex = (align) => {
|
|
226
|
+
switch (align) {
|
|
227
|
+
case AlignValue.Right:
|
|
228
|
+
case AlignValue.Bottom:
|
|
229
|
+
return 'flex-end';
|
|
230
|
+
case AlignValue.Center:
|
|
231
|
+
return 'center';
|
|
232
|
+
case AlignValue.Left:
|
|
233
|
+
case AlignValue.Top:
|
|
234
|
+
default:
|
|
235
|
+
return 'flex-start';
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
({
|
|
240
|
+
version: 1,
|
|
241
|
+
body: {
|
|
242
|
+
items: [
|
|
243
|
+
{
|
|
244
|
+
type: ComponentType.Image,
|
|
245
|
+
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
246
|
+
height: { type: 'fixed', value: 236 },
|
|
247
|
+
viewStyle: {
|
|
248
|
+
padding: {
|
|
249
|
+
left: 4,
|
|
250
|
+
right: 4,
|
|
251
|
+
top: 4,
|
|
252
|
+
bottom: 4,
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
256
|
+
imageStyle: { contentMode: MediaContentMode.AspectFill },
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: ComponentType.Box,
|
|
260
|
+
layout: Layout.Column,
|
|
261
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
262
|
+
height: { type: 'fixed', value: 200 },
|
|
263
|
+
items: [
|
|
264
|
+
{
|
|
265
|
+
type: ComponentType.Box,
|
|
266
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
267
|
+
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
268
|
+
viewStyle: { backgroundColor: '#fa6464' },
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
type: ComponentType.Box,
|
|
272
|
+
layout: Layout.Column,
|
|
273
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
274
|
+
height: { type: 'flex', value: FlexSizeSpecValue.WrapContent },
|
|
275
|
+
viewStyle: { backgroundColor: '#ffaf5c' },
|
|
276
|
+
items: [
|
|
277
|
+
{
|
|
278
|
+
type: ComponentType.Text,
|
|
279
|
+
text: 'Message',
|
|
280
|
+
align: { horizontal: AlignValue.Center, vertical: AlignValue.Center },
|
|
281
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
282
|
+
height: { type: 'fixed', value: 50 },
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: ComponentType.Image,
|
|
286
|
+
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
287
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
288
|
+
height: { type: 'fixed', value: 50 },
|
|
289
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
290
|
+
imageStyle: { contentMode: MediaContentMode.AspectFill },
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
type: ComponentType.Box,
|
|
296
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
297
|
+
height: { type: 'fixed', value: 20 },
|
|
298
|
+
viewStyle: { backgroundColor: '#ffe450' },
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
type: ComponentType.Box,
|
|
302
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
303
|
+
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
304
|
+
viewStyle: { backgroundColor: '#329a1b' },
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
type: ComponentType.Box,
|
|
310
|
+
viewStyle: { padding: { top: 12, bottom: 12, left: 12, right: 12 } },
|
|
311
|
+
layout: Layout.Column,
|
|
312
|
+
items: [
|
|
313
|
+
{
|
|
314
|
+
type: ComponentType.Box,
|
|
315
|
+
align: { horizontal: AlignValue.Left, vertical: AlignValue.Center },
|
|
316
|
+
layout: Layout.Row,
|
|
317
|
+
viewStyle: {
|
|
318
|
+
borderWidth: 1,
|
|
319
|
+
borderColor: '#72723f',
|
|
320
|
+
},
|
|
321
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
322
|
+
height: { type: 'fixed', value: 150 },
|
|
323
|
+
items: [
|
|
324
|
+
{
|
|
325
|
+
type: ComponentType.Text,
|
|
326
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
327
|
+
height: { type: 'fixed', value: 50 },
|
|
328
|
+
text: 'Sample1 text',
|
|
329
|
+
maxTextLines: 1,
|
|
330
|
+
align: { vertical: AlignValue.Center, horizontal: AlignValue.Left },
|
|
331
|
+
viewStyle: {
|
|
332
|
+
backgroundColor: '#cc4400',
|
|
333
|
+
},
|
|
334
|
+
textStyle: {
|
|
335
|
+
size: 16,
|
|
336
|
+
color: '#f8f8f8',
|
|
337
|
+
weight: FontWeight.Bold,
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: ComponentType.ImageButton,
|
|
342
|
+
action: { type: ActionType.UIKit, data: 'uikit://delete' },
|
|
343
|
+
width: { type: 'fixed', value: 20 },
|
|
344
|
+
height: { type: 'fixed', value: 20 },
|
|
345
|
+
imageUrl: 'https://file-ap-1.sendbird.com/5b5379aa73fd460da22ffaf9a61d0d7f.png',
|
|
346
|
+
imageStyle: { contentMode: MediaContentMode.AspectFit },
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
type: ComponentType.Text,
|
|
352
|
+
viewStyle: { padding: { top: 6, bottom: 12, left: 0, right: 0 } },
|
|
353
|
+
text: 'Esse eu esse duis ipsum et dolor eu ut sit amet consectetur cillum velit officia. Ex adipisicing elit quis ea sit. Occaecat in eu aliqua nulla magna id ut excepteur minim.',
|
|
354
|
+
maxTextLines: 2,
|
|
355
|
+
textStyle: { size: 14, color: '#e10000' },
|
|
356
|
+
width: { type: 'fixed', value: 200 },
|
|
357
|
+
height: { type: 'fixed', value: 50 },
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
type: ComponentType.TextButton,
|
|
361
|
+
action: { type: ActionType.Web, data: 'https://www.daum.net' },
|
|
362
|
+
text: 'Button 3',
|
|
363
|
+
textStyle: { size: 14, color: '#742ddd', weight: FontWeight.Bold },
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
({
|
|
371
|
+
'version': 1,
|
|
372
|
+
'body': {
|
|
373
|
+
'items': [
|
|
374
|
+
{
|
|
375
|
+
'type': ComponentType.Image,
|
|
376
|
+
'action': { 'type': ActionType.Web, 'data': 'https://www.naver.com/' },
|
|
377
|
+
'height': { 'type': 'fixed', 'value': 136 },
|
|
378
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
379
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
'type': ComponentType.Box,
|
|
383
|
+
'viewStyle': { 'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 }, backgroundColor: '#cccccc' },
|
|
384
|
+
'layout': Layout.Column,
|
|
385
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
386
|
+
'items': [
|
|
387
|
+
{
|
|
388
|
+
'type': ComponentType.Box,
|
|
389
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
390
|
+
'layout': Layout.Row,
|
|
391
|
+
'items': [
|
|
392
|
+
{
|
|
393
|
+
'type': ComponentType.TextButton,
|
|
394
|
+
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
395
|
+
width: { type: 'fixed', value: 150 },
|
|
396
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 } },
|
|
397
|
+
'text': 'Button 2',
|
|
398
|
+
'textStyle': { 'size': 14, 'weight': FontWeight.Bold },
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
'type': ComponentType.TextButton,
|
|
402
|
+
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
403
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
404
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 } },
|
|
405
|
+
'text': 'Button 3',
|
|
406
|
+
'textStyle': { 'size': 14, 'weight': FontWeight.Bold },
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
'type': ComponentType.Box,
|
|
412
|
+
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
413
|
+
'layout': Layout.Row,
|
|
414
|
+
'items': [
|
|
415
|
+
{
|
|
416
|
+
'type': ComponentType.Text,
|
|
417
|
+
'text': 'Sample2 text',
|
|
418
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
419
|
+
'maxTextLines': 1,
|
|
420
|
+
'textStyle': { 'size': 16, 'weight': FontWeight.Bold },
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
'type': ComponentType.ImageButton,
|
|
424
|
+
'action': { 'type': ActionType.UIKit, 'data': 'uikit://delete' },
|
|
425
|
+
'width': { 'type': 'fixed', 'value': 20 },
|
|
426
|
+
'height': { 'type': 'fixed', 'value': 20 },
|
|
427
|
+
'imageUrl': 'https://file-ap-1.sendbird.com/5b5379aa73fd460da22ffaf9a61d0d7f.png',
|
|
428
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFit },
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
'type': ComponentType.Text,
|
|
434
|
+
'viewStyle': { 'padding': { 'top': 6, 'bottom': 12, 'left': 0, 'right': 0 } },
|
|
435
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
436
|
+
'textStyle': { 'size': 14 },
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
},
|
|
442
|
+
});
|
|
443
|
+
({
|
|
444
|
+
'version': 1,
|
|
445
|
+
'body': {
|
|
446
|
+
'items': [
|
|
447
|
+
{
|
|
448
|
+
'type': ComponentType.Box,
|
|
449
|
+
'viewStyle': { 'backgroundColor': '#ffffff', 'borderWidth': 1, 'borderColor': '#eeeeee', 'radius': 16 },
|
|
450
|
+
'layout': Layout.Column,
|
|
451
|
+
'items': [
|
|
452
|
+
{
|
|
453
|
+
'type': ComponentType.Image,
|
|
454
|
+
'height': { 'type': 'fixed', 'value': 200 },
|
|
455
|
+
'imageUrl': 'https://img.freepik.com/free-vector/cartoon-happy-hours-background_52683-81243.jpg?w=2000&t=st=1666689198~exp=1666689798~hmac=23109d44ba03deee7aee069cbeebfcb48fa27f85e53c1cafc5d5d7345f1a2041',
|
|
456
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
'type': ComponentType.Box,
|
|
460
|
+
'viewStyle': { 'padding': { 'top': 15, 'bottom': 15, 'left': 15, 'right': 15 } },
|
|
461
|
+
'layout': Layout.Column,
|
|
462
|
+
'items': [
|
|
463
|
+
{
|
|
464
|
+
'type': ComponentType.Text,
|
|
465
|
+
'text': "Don't miss these deals today",
|
|
466
|
+
'maxTextLines': 1,
|
|
467
|
+
'textStyle': { 'size': 20, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
'type': ComponentType.Text,
|
|
471
|
+
'viewStyle': { 'margin': { 'top': 5, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
472
|
+
'text': 'Pay with Maya and get cashback!',
|
|
473
|
+
'maxTextLines': 1,
|
|
474
|
+
'textStyle': { 'size': 14, 'color': '#e10000' },
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
'type': ComponentType.Box,
|
|
478
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
479
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
480
|
+
'layout': Layout.Row,
|
|
481
|
+
'items': [
|
|
482
|
+
{
|
|
483
|
+
'type': ComponentType.Image,
|
|
484
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
485
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
486
|
+
'viewStyle': {
|
|
487
|
+
'backgroundColor': '#ffffff',
|
|
488
|
+
'borderWidth': 1,
|
|
489
|
+
'borderColor': '#eeeeee',
|
|
490
|
+
'radius': 25,
|
|
491
|
+
},
|
|
492
|
+
'imageUrl': 'https://yt3.ggpht.com/ytc/AMLnZu8Kg89ymE7qt5bsS9vMqi9h2aHiN6m9ID-IgxR6-Q=s900-c-k-c0x00ffffff-no-rj',
|
|
493
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
'type': ComponentType.Box,
|
|
497
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
498
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
499
|
+
'layout': Layout.Column,
|
|
500
|
+
'items': [
|
|
501
|
+
{
|
|
502
|
+
'type': ComponentType.Text,
|
|
503
|
+
'text': 'Meralco',
|
|
504
|
+
'maxTextLines': 1,
|
|
505
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
'type': ComponentType.Text,
|
|
509
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
510
|
+
'text': '30% cashback, P300 min spend',
|
|
511
|
+
'maxTextLines': 1,
|
|
512
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight.Bold },
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
'type': ComponentType.Box,
|
|
520
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
521
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
522
|
+
'layout': Layout.Row,
|
|
523
|
+
'items': [
|
|
524
|
+
{
|
|
525
|
+
'type': ComponentType.Image,
|
|
526
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
527
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
528
|
+
'viewStyle': {
|
|
529
|
+
'backgroundColor': '#ffffff',
|
|
530
|
+
'borderWidth': 1,
|
|
531
|
+
'borderColor': '#eeeeee',
|
|
532
|
+
'radius': 25,
|
|
533
|
+
},
|
|
534
|
+
'imageUrl': 'https://1000logos.net/wp-content/uploads/2021/12/Globe-Telecom-logo.png',
|
|
535
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFill, tintColor: '#a49a9a' },
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
'type': ComponentType.Box,
|
|
539
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
540
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
541
|
+
'layout': Layout.Column,
|
|
542
|
+
'items': [
|
|
543
|
+
{
|
|
544
|
+
'type': ComponentType.Text,
|
|
545
|
+
'text': 'Globe',
|
|
546
|
+
'maxTextLines': 1,
|
|
547
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
'type': ComponentType.Text,
|
|
551
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
552
|
+
'text': '30% cashback, P300 min spend',
|
|
553
|
+
'maxTextLines': 1,
|
|
554
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight.Bold },
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
'type': ComponentType.Box,
|
|
562
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
563
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
564
|
+
'layout': Layout.Row,
|
|
565
|
+
'items': [
|
|
566
|
+
{
|
|
567
|
+
'type': ComponentType.Image,
|
|
568
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
569
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
570
|
+
'viewStyle': {
|
|
571
|
+
'backgroundColor': '#ffffff',
|
|
572
|
+
'borderWidth': 1,
|
|
573
|
+
'borderColor': '#eeeeee',
|
|
574
|
+
'radius': 25,
|
|
575
|
+
},
|
|
576
|
+
'imageUrl': 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Cignal.svg/640px-Cignal.svg.png',
|
|
577
|
+
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
'type': ComponentType.Box,
|
|
581
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
582
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
583
|
+
'layout': Layout.Column,
|
|
584
|
+
'items': [
|
|
585
|
+
{
|
|
586
|
+
'type': ComponentType.Text,
|
|
587
|
+
'text': 'Cignal',
|
|
588
|
+
'maxTextLines': 1,
|
|
589
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
'type': ComponentType.Text,
|
|
593
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
594
|
+
'text': '30% cashback, P300 min spend',
|
|
595
|
+
'maxTextLines': 1,
|
|
596
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight.Bold },
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
},
|
|
600
|
+
],
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
'type': ComponentType.Box,
|
|
604
|
+
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
605
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
606
|
+
'layout': Layout.Row,
|
|
607
|
+
'items': [
|
|
608
|
+
{
|
|
609
|
+
'type': ComponentType.TextButton,
|
|
610
|
+
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
611
|
+
'viewStyle': {
|
|
612
|
+
'backgroundColor': '#e0e0e0',
|
|
613
|
+
'radius': 16,
|
|
614
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 },
|
|
615
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
616
|
+
},
|
|
617
|
+
'text': 'Learn more',
|
|
618
|
+
'textStyle': { 'size': 15, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
'type': ComponentType.TextButton,
|
|
622
|
+
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
623
|
+
'viewStyle': {
|
|
624
|
+
'backgroundColor': '#e10000',
|
|
625
|
+
'radius': 16,
|
|
626
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 },
|
|
627
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
628
|
+
},
|
|
629
|
+
'text': 'Pay now',
|
|
630
|
+
'textStyle': { 'size': 15, 'color': '#ffffff', 'weight': FontWeight.Bold },
|
|
631
|
+
},
|
|
632
|
+
],
|
|
633
|
+
},
|
|
634
|
+
],
|
|
635
|
+
},
|
|
636
|
+
],
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
},
|
|
640
|
+
});
|
|
641
|
+
({
|
|
642
|
+
'version': 1,
|
|
643
|
+
'body': {
|
|
644
|
+
'items': [
|
|
645
|
+
{
|
|
646
|
+
'type': ComponentType.Box,
|
|
647
|
+
'layout': Layout.Column,
|
|
648
|
+
'items': [
|
|
649
|
+
{
|
|
650
|
+
'type': ComponentType.Image,
|
|
651
|
+
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
|
|
652
|
+
'metaData': {
|
|
653
|
+
'pixelWidth': 512,
|
|
654
|
+
'pixelHeight': 512,
|
|
655
|
+
},
|
|
656
|
+
'imageStyle': {
|
|
657
|
+
'tintColor': '#44ff1188',
|
|
658
|
+
},
|
|
659
|
+
viewStyle: {
|
|
660
|
+
'padding': {
|
|
661
|
+
'top': 12,
|
|
662
|
+
'right': 12,
|
|
663
|
+
'bottom': 12,
|
|
664
|
+
'left': 12,
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
'type': ComponentType.Box,
|
|
670
|
+
'viewStyle': {
|
|
671
|
+
'padding': {
|
|
672
|
+
'top': 12,
|
|
673
|
+
'right': 12,
|
|
674
|
+
'bottom': 12,
|
|
675
|
+
'left': 12,
|
|
676
|
+
},
|
|
677
|
+
},
|
|
678
|
+
'layout': Layout.Column,
|
|
679
|
+
'items': [
|
|
680
|
+
{
|
|
681
|
+
'type': ComponentType.Box,
|
|
682
|
+
'layout': Layout.Row,
|
|
683
|
+
'items': [
|
|
684
|
+
{
|
|
685
|
+
'type': ComponentType.Box,
|
|
686
|
+
'layout': Layout.Column,
|
|
687
|
+
'items': [
|
|
688
|
+
{
|
|
689
|
+
'type': ComponentType.Text,
|
|
690
|
+
'text': 'hi',
|
|
691
|
+
'maxTextLines': 3,
|
|
692
|
+
'viewStyle': {
|
|
693
|
+
'padding': {
|
|
694
|
+
'top': 0,
|
|
695
|
+
'bottom': 6,
|
|
696
|
+
'left': 0,
|
|
697
|
+
'right': 0,
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
'textStyle': {
|
|
701
|
+
'size': 16,
|
|
702
|
+
'weight': FontWeight.Bold,
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
'type': ComponentType.Text,
|
|
707
|
+
'text': 'bye',
|
|
708
|
+
'maxTextLines': 10,
|
|
709
|
+
'textStyle': {
|
|
710
|
+
'size': 14,
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
],
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
'type': ComponentType.ImageButton,
|
|
717
|
+
'action': {
|
|
718
|
+
'type': ActionType.UIKit,
|
|
719
|
+
'data': 'sendbirduikit://delete',
|
|
720
|
+
},
|
|
721
|
+
'width': {
|
|
722
|
+
'type': 'fixed',
|
|
723
|
+
'value': 20,
|
|
724
|
+
},
|
|
725
|
+
'height': {
|
|
726
|
+
'type': 'fixed',
|
|
727
|
+
'value': 20,
|
|
728
|
+
},
|
|
729
|
+
'metaData': {
|
|
730
|
+
'pixelWidth': 60,
|
|
731
|
+
'pixelHeight': 60,
|
|
732
|
+
},
|
|
733
|
+
'imageUrl': 'https://dxstmhyqfqr1o.cloudfront.net/sendbird-message-builder/icon-more.png',
|
|
734
|
+
'imageStyle': {
|
|
735
|
+
'tintColor': '#ff8d5a',
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
],
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
'type': ComponentType.Box,
|
|
742
|
+
'layout': Layout.Column,
|
|
743
|
+
'items': [
|
|
744
|
+
{
|
|
745
|
+
'type': ComponentType.Box,
|
|
746
|
+
'viewStyle': {
|
|
747
|
+
'margin': {
|
|
748
|
+
'top': 16,
|
|
749
|
+
'bottom': 0,
|
|
750
|
+
'left': 0,
|
|
751
|
+
'right': 0,
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
'align': {
|
|
755
|
+
'horizontal': AlignValue.Left,
|
|
756
|
+
'vertical': AlignValue.Center,
|
|
757
|
+
},
|
|
758
|
+
'layout': Layout.Row,
|
|
759
|
+
'items': [
|
|
760
|
+
{
|
|
761
|
+
'type': ComponentType.Image,
|
|
762
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
|
|
763
|
+
'width': {
|
|
764
|
+
'type': 'fixed',
|
|
765
|
+
'value': 40,
|
|
766
|
+
},
|
|
767
|
+
'height': {
|
|
768
|
+
'type': 'fixed',
|
|
769
|
+
'value': 40,
|
|
770
|
+
},
|
|
771
|
+
'metaData': {
|
|
772
|
+
'pixelWidth': 512,
|
|
773
|
+
'pixelHeight': 512,
|
|
774
|
+
},
|
|
775
|
+
'viewStyle': {
|
|
776
|
+
'backgroundColor': '#BDBDBD',
|
|
777
|
+
'radius': 20,
|
|
778
|
+
},
|
|
779
|
+
'imageStyle': {
|
|
780
|
+
'contentMode': MediaContentMode.AspectFill,
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
'type': ComponentType.Box,
|
|
785
|
+
'viewStyle': {
|
|
786
|
+
'margin': {
|
|
787
|
+
'top': 0,
|
|
788
|
+
'bottom': 0,
|
|
789
|
+
'left': 12,
|
|
790
|
+
'right': 0,
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
'layout': Layout.Column,
|
|
794
|
+
'items': [
|
|
795
|
+
{
|
|
796
|
+
'type': ComponentType.Text,
|
|
797
|
+
'text': 'Chongbu',
|
|
798
|
+
'maxTextLines': 1,
|
|
799
|
+
'textStyle': {
|
|
800
|
+
'size': 16,
|
|
801
|
+
'weight': FontWeight.Bold,
|
|
802
|
+
},
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
'type': ComponentType.Text,
|
|
806
|
+
'viewStyle': {
|
|
807
|
+
'margin': {
|
|
808
|
+
'top': 4,
|
|
809
|
+
'bottom': 0,
|
|
810
|
+
'left': 0,
|
|
811
|
+
'right': 0,
|
|
812
|
+
},
|
|
813
|
+
},
|
|
814
|
+
'text': ' ',
|
|
815
|
+
'maxTextLines': 1,
|
|
816
|
+
'textStyle': {
|
|
817
|
+
'size': 14,
|
|
818
|
+
},
|
|
819
|
+
},
|
|
820
|
+
],
|
|
821
|
+
},
|
|
822
|
+
],
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
'type': ComponentType.Box,
|
|
826
|
+
'viewStyle': {
|
|
827
|
+
'margin': {
|
|
828
|
+
'top': 16,
|
|
829
|
+
'bottom': 0,
|
|
830
|
+
'left': 0,
|
|
831
|
+
'right': 0,
|
|
832
|
+
},
|
|
833
|
+
},
|
|
834
|
+
'align': {
|
|
835
|
+
'horizontal': AlignValue.Left,
|
|
836
|
+
'vertical': AlignValue.Center,
|
|
837
|
+
},
|
|
838
|
+
'layout': Layout.Row,
|
|
839
|
+
'items': [
|
|
840
|
+
{
|
|
841
|
+
'type': ComponentType.Image,
|
|
842
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
|
|
843
|
+
'width': {
|
|
844
|
+
'type': 'fixed',
|
|
845
|
+
'value': 40,
|
|
846
|
+
},
|
|
847
|
+
'height': {
|
|
848
|
+
'type': 'fixed',
|
|
849
|
+
'value': 40,
|
|
850
|
+
},
|
|
851
|
+
'metaData': {
|
|
852
|
+
'pixelWidth': 512,
|
|
853
|
+
'pixelHeight': 512,
|
|
854
|
+
},
|
|
855
|
+
'viewStyle': {
|
|
856
|
+
'backgroundColor': '#BDBDBD',
|
|
857
|
+
'radius': 20,
|
|
858
|
+
},
|
|
859
|
+
'imageStyle': {
|
|
860
|
+
'contentMode': MediaContentMode.AspectFill,
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
'type': ComponentType.Box,
|
|
865
|
+
'viewStyle': {
|
|
866
|
+
'margin': {
|
|
867
|
+
'top': 0,
|
|
868
|
+
'bottom': 0,
|
|
869
|
+
'left': 12,
|
|
870
|
+
'right': 0,
|
|
871
|
+
},
|
|
872
|
+
},
|
|
873
|
+
'layout': Layout.Column,
|
|
874
|
+
'items': [
|
|
875
|
+
{
|
|
876
|
+
'type': ComponentType.Text,
|
|
877
|
+
'text': 'Amanda',
|
|
878
|
+
'maxTextLines': 1,
|
|
879
|
+
'textStyle': {
|
|
880
|
+
'size': 16,
|
|
881
|
+
'weight': FontWeight.Bold,
|
|
882
|
+
},
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
'type': ComponentType.Text,
|
|
886
|
+
'viewStyle': {
|
|
887
|
+
'margin': {
|
|
888
|
+
'top': 4,
|
|
889
|
+
'bottom': 0,
|
|
890
|
+
'left': 0,
|
|
891
|
+
'right': 0,
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
'text': 'This is title message',
|
|
895
|
+
'maxTextLines': 1,
|
|
896
|
+
'textStyle': {
|
|
897
|
+
'size': 14,
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
],
|
|
901
|
+
},
|
|
902
|
+
],
|
|
903
|
+
},
|
|
904
|
+
],
|
|
905
|
+
},
|
|
906
|
+
],
|
|
907
|
+
},
|
|
908
|
+
],
|
|
909
|
+
},
|
|
910
|
+
],
|
|
911
|
+
},
|
|
912
|
+
});
|
|
913
|
+
({
|
|
914
|
+
'version': '1',
|
|
915
|
+
'body': {
|
|
916
|
+
'items': [
|
|
917
|
+
{
|
|
918
|
+
'type': 'box',
|
|
919
|
+
'layout': 'column',
|
|
920
|
+
height: { type: 'fixed', value: 600 },
|
|
921
|
+
'items': [
|
|
922
|
+
{
|
|
923
|
+
'type': 'box',
|
|
924
|
+
'layout': 'column',
|
|
925
|
+
'viewStyle': { 'radius': '8', 'padding': { 'top': '12', 'bottom': '12', 'left': '12', 'right': '12' } },
|
|
926
|
+
'items': [
|
|
927
|
+
{
|
|
928
|
+
'type': 'text',
|
|
929
|
+
'text': 'Title text',
|
|
930
|
+
'textStyle': { 'color': '#E0000000', 'size': '16', 'weight': 'bold' },
|
|
931
|
+
'maxTextLines': '5',
|
|
932
|
+
'viewStyle': {},
|
|
933
|
+
'action': { 'data': 'www.naver.com' },
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
'type': 'text',
|
|
937
|
+
'viewStyle': { 'margin': { 'top': '8', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
938
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
939
|
+
'textStyle': { 'color': '#E0000000', 'size': '14', 'weight': 'normal' },
|
|
940
|
+
'maxTextLines': '5',
|
|
941
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
'type': 'box',
|
|
945
|
+
'layout': 'row',
|
|
946
|
+
'viewStyle': { 'margin': { 'top': '12', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
947
|
+
'items': [
|
|
948
|
+
{
|
|
949
|
+
'type': 'textButton',
|
|
950
|
+
'viewStyle': {
|
|
951
|
+
'backgroundColor': '#E0E0E0',
|
|
952
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
953
|
+
},
|
|
954
|
+
'text': 'Button 1',
|
|
955
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
956
|
+
'maxTextLines': '5',
|
|
957
|
+
'action': { 'data': 'www.naver.com' },
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
'type': 'textButton',
|
|
961
|
+
'viewStyle': {
|
|
962
|
+
'backgroundColor': '#E0E0E0',
|
|
963
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
964
|
+
'margin': { 'left': '8', 'right': '0', 'top': '0', 'bottom': '0' },
|
|
965
|
+
},
|
|
966
|
+
'text': 'Button 2',
|
|
967
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
968
|
+
'maxTextLines': '5',
|
|
969
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
970
|
+
},
|
|
971
|
+
],
|
|
972
|
+
},
|
|
973
|
+
],
|
|
974
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
'type': 'image',
|
|
978
|
+
'viewStyle': {},
|
|
979
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
980
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
981
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
982
|
+
'imageUrl': 'https://file-preprod.sendbird.com/d03c08bb3f9041a88c1207b6bbf15ab8.png',
|
|
983
|
+
'metaData': { 'pixelWidth': '1062', 'pixelHeight': '1070' },
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
'type': 'textButton',
|
|
987
|
+
'viewStyle': {
|
|
988
|
+
'backgroundColor': '#E0E0E0',
|
|
989
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
990
|
+
},
|
|
991
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
992
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
993
|
+
'text': 'Button',
|
|
994
|
+
'textStyle': { 'color': '#742DDD', 'size': '16', 'weight': 'normal' },
|
|
995
|
+
'maxTextLines': '5',
|
|
996
|
+
'action': { 'data': 'www.naver.com' },
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
'type': 'imageButton',
|
|
1000
|
+
'viewStyle': {},
|
|
1001
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
1002
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
1003
|
+
'imageUrl': 'https://file-preprod.sendbird.com/38fdf5c1056f42b89a44b38155cc4b49.jpg',
|
|
1004
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
1005
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
1006
|
+
'action': { 'data': 'www.naver.com' },
|
|
1007
|
+
},
|
|
1008
|
+
],
|
|
1009
|
+
'viewStyle': {},
|
|
1010
|
+
},
|
|
1011
|
+
],
|
|
1012
|
+
},
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
1016
|
+
var t = {};
|
|
1017
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1018
|
+
t[p] = s[p];
|
|
1019
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1020
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1021
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1022
|
+
t[p[i]] = s[p[i]];
|
|
1023
|
+
}
|
|
1024
|
+
return t;
|
|
1025
|
+
};
|
|
1026
|
+
const CanvasReactMessageTemplateImage = (props) => {
|
|
1027
|
+
const { imageSize, canvasRef, canvasProps } = useCanvasMessageTemplateImage(props);
|
|
1028
|
+
return (React__default.createElement("canvas", Object.assign({}, canvasProps, { ref: canvasRef, width: imageSize === null || imageSize === void 0 ? void 0 : imageSize.width, height: imageSize === null || imageSize === void 0 ? void 0 : imageSize.height, onError: props.onError })));
|
|
1029
|
+
};
|
|
1030
|
+
const useCanvasMessageTemplateImage = (_a) => {
|
|
1031
|
+
var { metaData, tintColor } = _a, props = __rest$3(_a, ["metaData", "tintColor"]);
|
|
1032
|
+
const canvasRef = useRef(null);
|
|
1033
|
+
const [fallbackImageSize, setFallbackImageSize] = useState();
|
|
1034
|
+
const imageSize = useMemo(() => {
|
|
1035
|
+
if ((metaData === null || metaData === void 0 ? void 0 : metaData.pixelHeight) && (metaData === null || metaData === void 0 ? void 0 : metaData.pixelWidth)) {
|
|
1036
|
+
return { width: metaData.pixelWidth, height: metaData.pixelHeight };
|
|
1037
|
+
}
|
|
1038
|
+
return fallbackImageSize;
|
|
1039
|
+
}, [fallbackImageSize, metaData === null || metaData === void 0 ? void 0 : metaData.pixelHeight, metaData === null || metaData === void 0 ? void 0 : metaData.pixelWidth]);
|
|
1040
|
+
useEffect(() => {
|
|
1041
|
+
if (imageSize == null) {
|
|
1042
|
+
console.log('Canvas_ReactMessageTemplateImage: no metaData, render fit to container');
|
|
1043
|
+
if (canvasRef.current) {
|
|
1044
|
+
canvasRef.current.style.width = '100%';
|
|
1045
|
+
canvasRef.current.style.height = '100%';
|
|
1046
|
+
const containerSize = canvasRef.current.getBoundingClientRect();
|
|
1047
|
+
setFallbackImageSize(containerSize);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}, [imageSize]);
|
|
1051
|
+
useEffect(() => {
|
|
1052
|
+
if (props.src) {
|
|
1053
|
+
const img = new Image();
|
|
1054
|
+
const onImageLoad = () => {
|
|
1055
|
+
if (canvasRef.current && tintColor && imageSize) {
|
|
1056
|
+
const ctx = canvasRef.current.getContext('2d');
|
|
1057
|
+
if (ctx) {
|
|
1058
|
+
const { width: imageWidth, height: imageHeight } = imageSize;
|
|
1059
|
+
// reset context before draw, consider `.save()` and `.restore()` api
|
|
1060
|
+
ctx.clearRect(0, 0, imageWidth, imageHeight);
|
|
1061
|
+
ctx.beginPath();
|
|
1062
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
1063
|
+
ctx.fillStyle = '#000';
|
|
1064
|
+
// draw
|
|
1065
|
+
ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
|
|
1066
|
+
ctx.globalCompositeOperation = 'source-atop';
|
|
1067
|
+
ctx.fillStyle = tintColor;
|
|
1068
|
+
ctx.fillRect(0, 0, imageWidth, imageHeight);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
const onImageError = (event) => {
|
|
1073
|
+
var _a;
|
|
1074
|
+
// @ts-ignore
|
|
1075
|
+
(_a = props.onError) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
1076
|
+
};
|
|
1077
|
+
img.addEventListener('load', onImageLoad);
|
|
1078
|
+
img.addEventListener('error', onImageError);
|
|
1079
|
+
img.src = props.src;
|
|
1080
|
+
return () => {
|
|
1081
|
+
img.removeEventListener('load', onImageLoad);
|
|
1082
|
+
img.removeEventListener('error', onImageError);
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
return;
|
|
1086
|
+
}, [props.src, imageSize, tintColor]);
|
|
1087
|
+
return {
|
|
1088
|
+
canvasRef,
|
|
1089
|
+
canvasProps: props,
|
|
1090
|
+
imageSize,
|
|
1091
|
+
};
|
|
1092
|
+
};
|
|
1093
|
+
|
|
1094
|
+
const ImgReactMessageTemplateImage = (props) => {
|
|
1095
|
+
return React__default.createElement("img", Object.assign({}, props, { onError: props.onError, referrerPolicy: "no-referrer" }));
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
const PlaceholderReactMessageTemplateImage = (props) => {
|
|
1099
|
+
return React__default.createElement("div", { style: Object.assign(Object.assign({}, props.style), { backgroundColor: 'transparent' }) });
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
|
|
1103
|
+
var t = {};
|
|
1104
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1105
|
+
t[p] = s[p];
|
|
1106
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1107
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1108
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1109
|
+
t[p[i]] = s[p[i]];
|
|
1110
|
+
}
|
|
1111
|
+
return t;
|
|
1112
|
+
};
|
|
1113
|
+
const ReactMessageTemplateImage = (_a) => {
|
|
1114
|
+
var { tintColor, metaData } = _a, props = __rest$2(_a, ["tintColor", "metaData"]);
|
|
1115
|
+
const { hasError, onError } = useImageLoadError(props.src);
|
|
1116
|
+
if (props.onError)
|
|
1117
|
+
console.warn('`onError` is intercepted and not executed in the ReactMessageTemplateImage.');
|
|
1118
|
+
if (hasError) {
|
|
1119
|
+
return React__default.createElement(PlaceholderReactMessageTemplateImage, Object.assign({}, props));
|
|
1120
|
+
}
|
|
1121
|
+
else if (tintColor) {
|
|
1122
|
+
return React__default.createElement(CanvasReactMessageTemplateImage, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
|
|
1123
|
+
}
|
|
1124
|
+
else {
|
|
1125
|
+
return React__default.createElement(ImgReactMessageTemplateImage, Object.assign({}, props, { onError: onError }));
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
const useImageLoadError = (source) => {
|
|
1129
|
+
const [hasError, setHasError] = useState(false);
|
|
1130
|
+
useEffect(() => setHasError(false), [source]);
|
|
1131
|
+
return {
|
|
1132
|
+
hasError,
|
|
1133
|
+
onError: useCallback(() => setHasError(true), []),
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
// create a context provider for MessageComponent
|
|
1138
|
+
// - this is a wrapper for MessageComponent
|
|
1139
|
+
const MessageContext = React__default.createContext(null);
|
|
1140
|
+
const MessageProvider = (props) => {
|
|
1141
|
+
const { message, handleWebAction, handleCustomAction, handlePredefinedAction, children } = props;
|
|
1142
|
+
const value = React__default.useMemo(() => ({
|
|
1143
|
+
message,
|
|
1144
|
+
handleWebAction,
|
|
1145
|
+
handleCustomAction,
|
|
1146
|
+
handlePredefinedAction,
|
|
1147
|
+
}), [message === null || message === void 0 ? void 0 : message.updatedAt]);
|
|
1148
|
+
return React__default.createElement(MessageContext.Provider, { value: value }, children);
|
|
1149
|
+
};
|
|
1150
|
+
const useMessageContext = () => React__default.useContext(MessageContext);
|
|
1151
|
+
|
|
1152
|
+
function isWrappedText(view) {
|
|
1153
|
+
var _a;
|
|
1154
|
+
return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
|
|
1155
|
+
}
|
|
1156
|
+
// Compares the size spec to the option and returns whether they are equal or not.
|
|
1157
|
+
const isSizeCompatibleWithOption = ({ size, option, }) => {
|
|
1158
|
+
if (option === 'wrap') {
|
|
1159
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
|
|
1160
|
+
}
|
|
1161
|
+
if (option === 'fill') {
|
|
1162
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
|
|
1163
|
+
}
|
|
1164
|
+
return size.type === 'fixed';
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Preserves a reference to the given callback function as an argument while the component is mounted.
|
|
1169
|
+
* Wraps the given callback in React's Ref to preserve the reference.
|
|
1170
|
+
* @param callback want to be preserved
|
|
1171
|
+
*/
|
|
1172
|
+
function usePreservedCallback(callback) {
|
|
1173
|
+
const callbackRef = useRef(callback);
|
|
1174
|
+
useEffect(() => {
|
|
1175
|
+
callbackRef.current = callback;
|
|
1176
|
+
}, [callback]);
|
|
1177
|
+
return useCallback((...args) => {
|
|
1178
|
+
return callbackRef.current(...args);
|
|
1179
|
+
}, [callbackRef]);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* This hook can be used when you want to safely effect the value stored in useRef
|
|
1184
|
+
* Got this idea from https://github.com/facebook/react/issues/15176
|
|
1185
|
+
* @param callback
|
|
1186
|
+
* @param deps
|
|
1187
|
+
* @returns effect callback
|
|
1188
|
+
*/
|
|
1189
|
+
function useRefEffect(callback, deps) {
|
|
1190
|
+
const preservedCallback = usePreservedCallback(callback);
|
|
1191
|
+
const disposeRef = useRef(noop);
|
|
1192
|
+
const effect = useCallback((element) => {
|
|
1193
|
+
disposeRef.current();
|
|
1194
|
+
disposeRef.current = noop;
|
|
1195
|
+
if (element != null) {
|
|
1196
|
+
const cleanup = callback(element);
|
|
1197
|
+
if (typeof cleanup === 'function') {
|
|
1198
|
+
disposeRef.current = cleanup;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}, [preservedCallback, ...deps]);
|
|
1202
|
+
return effect;
|
|
1203
|
+
}
|
|
1204
|
+
function noop() { }
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* Subscribes to ResizeObserver on the component exposing the Ref,
|
|
1208
|
+
* to detect changes in the size of DOM elements.
|
|
1209
|
+
* The ResizeObserver API is required.
|
|
1210
|
+
* If you are targeting browsers that do not support that API, probably need to add appropriate polyfill too.
|
|
1211
|
+
* @param onResize
|
|
1212
|
+
* @returns ref
|
|
1213
|
+
*/
|
|
1214
|
+
function useResizeObserver(onResize) {
|
|
1215
|
+
const resizeCallback = usePreservedCallback(onResize);
|
|
1216
|
+
const ref = useRefEffect((elem) => {
|
|
1217
|
+
const observer = new ResizeObserver((entries) => {
|
|
1218
|
+
if (entries[0] != null) {
|
|
1219
|
+
resizeCallback(entries[0]);
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
observer.observe(elem);
|
|
1223
|
+
return () => {
|
|
1224
|
+
observer.unobserve(elem);
|
|
1225
|
+
};
|
|
1226
|
+
}, [resizeCallback]);
|
|
1227
|
+
return ref;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* @returns an element's width / height observed by IntersectionObserver,
|
|
1232
|
+
* and ref to detect its resize event
|
|
1233
|
+
*/
|
|
1234
|
+
function useElementSize() {
|
|
1235
|
+
const [width, setWidth] = useState(-1);
|
|
1236
|
+
const [height, setHeight] = useState(-1);
|
|
1237
|
+
const [contentWidth, setContentWidth] = useState(-1);
|
|
1238
|
+
const [contentHeight, setContentHeight] = useState(-1);
|
|
1239
|
+
const [paddingWidth, setPaddingWidth] = useState(-1);
|
|
1240
|
+
const [paddingHeight, setPaddingHeight] = useState(-1);
|
|
1241
|
+
const ref = useResizeObserver((entry) => {
|
|
1242
|
+
// contentRect: content size only
|
|
1243
|
+
const { width: contentWidth, height: contentHeight } = entry.contentRect;
|
|
1244
|
+
// target: content + padding + border size
|
|
1245
|
+
const target = entry.target;
|
|
1246
|
+
const { width, height } = target.getBoundingClientRect();
|
|
1247
|
+
setWidth(width);
|
|
1248
|
+
setHeight(height);
|
|
1249
|
+
setContentWidth(contentWidth);
|
|
1250
|
+
setContentHeight(contentHeight);
|
|
1251
|
+
setPaddingWidth(width - contentWidth);
|
|
1252
|
+
setPaddingHeight(height - contentHeight);
|
|
1253
|
+
});
|
|
1254
|
+
return { ref, width, height, contentWidth, contentHeight, paddingWidth, paddingHeight };
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
1258
|
+
var t = {};
|
|
1259
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1260
|
+
t[p] = s[p];
|
|
1261
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1262
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1263
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1264
|
+
t[p[i]] = s[p[i]];
|
|
1265
|
+
}
|
|
1266
|
+
return t;
|
|
1267
|
+
};
|
|
1268
|
+
function isViewCompatibleWithSizeOption({ width = defaultProperties.view.size.width, height = defaultProperties.view.size.height, parentLayout = defaultProperties.box.layout, option, }) {
|
|
1269
|
+
if (parentLayout === Layout.Row) {
|
|
1270
|
+
return isSizeCompatibleWithOption({
|
|
1271
|
+
size: width,
|
|
1272
|
+
option,
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
return isSizeCompatibleWithOption({
|
|
1276
|
+
size: height,
|
|
1277
|
+
option,
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
function useRecalculateWidth(params) {
|
|
1281
|
+
const { style, props } = params;
|
|
1282
|
+
const _a = useElementSize(), { ref: elemRef } = _a, size = __rest$1(_a, ["ref"]);
|
|
1283
|
+
const { updateSize, sizes } = useSizeContext();
|
|
1284
|
+
const { id, siblings, parentLayout } = props;
|
|
1285
|
+
const { width, height, paddingWidth, paddingHeight, contentWidth, contentHeight } = size;
|
|
1286
|
+
useEffect(() => {
|
|
1287
|
+
updateSize({
|
|
1288
|
+
id: props.id,
|
|
1289
|
+
width,
|
|
1290
|
+
height,
|
|
1291
|
+
paddingWidth,
|
|
1292
|
+
paddingHeight,
|
|
1293
|
+
contentWidth,
|
|
1294
|
+
contentHeight,
|
|
1295
|
+
});
|
|
1296
|
+
}, [props.id, width, height, paddingWidth, paddingHeight, contentWidth, contentHeight, updateSize]);
|
|
1297
|
+
const currentStyle = useMemo(() => {
|
|
1298
|
+
const sumViewSize = (acc = 0, view) => {
|
|
1299
|
+
var _a, _b, _c, _d;
|
|
1300
|
+
if (parentLayout === Layout.Row) {
|
|
1301
|
+
return acc + ((_b = (_a = sizes[view.id]) === null || _a === void 0 ? void 0 : _a.contentWidth) !== null && _b !== void 0 ? _b : 0);
|
|
1302
|
+
}
|
|
1303
|
+
return acc + ((_d = (_c = sizes[view.id]) === null || _c === void 0 ? void 0 : _c.contentHeight) !== null && _d !== void 0 ? _d : 0);
|
|
1304
|
+
};
|
|
1305
|
+
const hasFillOption = isViewCompatibleWithSizeOption({
|
|
1306
|
+
width: props.width,
|
|
1307
|
+
height: props.height,
|
|
1308
|
+
parentLayout,
|
|
1309
|
+
option: 'fill',
|
|
1310
|
+
});
|
|
1311
|
+
if (hasFillOption) {
|
|
1312
|
+
const wrapSiblingsSize = siblings
|
|
1313
|
+
.filter(({ width, height }) => !isViewCompatibleWithSizeOption({
|
|
1314
|
+
width: width,
|
|
1315
|
+
height: height,
|
|
1316
|
+
parentLayout,
|
|
1317
|
+
option: 'fill',
|
|
1318
|
+
}))
|
|
1319
|
+
.reduce(sumViewSize, 0);
|
|
1320
|
+
const fillSiblingCount = siblings.filter(({ width, height }) => isViewCompatibleWithSizeOption({
|
|
1321
|
+
width: width,
|
|
1322
|
+
height: height,
|
|
1323
|
+
parentLayout,
|
|
1324
|
+
option: 'fill',
|
|
1325
|
+
})).length;
|
|
1326
|
+
const maxSizeOption = (() => {
|
|
1327
|
+
if (parentLayout === Layout.Row) {
|
|
1328
|
+
return {
|
|
1329
|
+
maxWidth: `calc((100% - ${wrapSiblingsSize}px) / ${fillSiblingCount})`,
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
return {
|
|
1333
|
+
maxHeight: `calc((100% - ${wrapSiblingsSize}px) / ${fillSiblingCount})`,
|
|
1334
|
+
};
|
|
1335
|
+
})();
|
|
1336
|
+
return Object.assign(Object.assign(Object.assign({}, style), maxSizeOption), (width == 0 && { height: 0 }));
|
|
1337
|
+
}
|
|
1338
|
+
else {
|
|
1339
|
+
const currentElemIdx = siblings.findIndex((sibling) => sibling.id === id);
|
|
1340
|
+
const forwardSiblingsSize = siblings
|
|
1341
|
+
.slice(0, currentElemIdx)
|
|
1342
|
+
.filter(({ width, height }) => isViewCompatibleWithSizeOption({
|
|
1343
|
+
width: width,
|
|
1344
|
+
height: height,
|
|
1345
|
+
parentLayout,
|
|
1346
|
+
option: 'wrap',
|
|
1347
|
+
}))
|
|
1348
|
+
.reduce(sumViewSize, 0);
|
|
1349
|
+
return Object.assign(Object.assign(Object.assign({}, style), (width === 0 && { height: 0 })), (parentLayout === Layout.Row
|
|
1350
|
+
? {
|
|
1351
|
+
maxWidth: `calc(100% - ${forwardSiblingsSize}px)`,
|
|
1352
|
+
}
|
|
1353
|
+
: {
|
|
1354
|
+
maxHeight: `calc(100% - ${forwardSiblingsSize}px)`,
|
|
1355
|
+
}));
|
|
1356
|
+
}
|
|
1357
|
+
}, [props.width, props.height, parentLayout, sizes, siblings, style, width, id]);
|
|
1358
|
+
return { recalculatedStyle: currentStyle, elemRef };
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function getDefaultStyles(overrides) {
|
|
1362
|
+
return Object.assign({ display: 'flex', overflow: 'hidden', boxSizing: 'border-box' }, overrides);
|
|
1363
|
+
}
|
|
1364
|
+
function setViewProps(styles, props, options) {
|
|
1365
|
+
setViewSize(styles, props, options);
|
|
1366
|
+
setViewStyle(styles, props);
|
|
1367
|
+
}
|
|
1368
|
+
function setBorderStyle(styles, borderWidth, borderColor, radius) {
|
|
1369
|
+
if (borderWidth) {
|
|
1370
|
+
styles['--border-width'] = `${borderWidth}px`;
|
|
1371
|
+
styles['--border-color'] = borderColor || 'transparent';
|
|
1372
|
+
}
|
|
1373
|
+
if (radius) {
|
|
1374
|
+
styles['borderRadius'] = Number(radius);
|
|
1375
|
+
styles['--border-radius'] = `${radius}px`;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
function setViewStyle(styles, props) {
|
|
1379
|
+
var _a, _b, _c, _d;
|
|
1380
|
+
const { viewStyle } = props;
|
|
1381
|
+
if ((_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top)
|
|
1382
|
+
styles['marginTop'] = Number(viewStyle.margin.top);
|
|
1383
|
+
if ((_b = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _b === void 0 ? void 0 : _b.bottom)
|
|
1384
|
+
styles['marginBottom'] = Number(viewStyle.margin.bottom);
|
|
1385
|
+
if ((_c = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _c === void 0 ? void 0 : _c.left)
|
|
1386
|
+
styles['marginLeft'] = Number(viewStyle.margin.left);
|
|
1387
|
+
if ((_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right)
|
|
1388
|
+
styles['marginRight'] = Number(viewStyle.margin.right);
|
|
1389
|
+
if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
|
|
1390
|
+
styles['backgroundColor'] = viewStyle.backgroundColor;
|
|
1391
|
+
// use JSON.stringify to escape special characters in image URL
|
|
1392
|
+
if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundImageUrl)
|
|
1393
|
+
styles['backgroundImage'] = `url(${JSON.stringify(viewStyle.backgroundImageUrl)})`;
|
|
1394
|
+
setBorderStyle(styles, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderWidth, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.borderColor, viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.radius);
|
|
1395
|
+
}
|
|
1396
|
+
function getViewSizeStyle(width, height, parentLayout) {
|
|
1397
|
+
const style = {};
|
|
1398
|
+
if (width.type === 'flex' && width.value == FlexSizeSpecValue.FillParent) {
|
|
1399
|
+
style['width'] = '100%';
|
|
1400
|
+
if (parentLayout === Layout.Row) {
|
|
1401
|
+
style['flex'] = 1;
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
else if (width.type === 'fixed' && width.value >= 0) {
|
|
1405
|
+
style['width'] = Number(width.value);
|
|
1406
|
+
}
|
|
1407
|
+
if (height.type === 'flex' && height.value == FlexSizeSpecValue.FillParent) {
|
|
1408
|
+
style['height'] = '100%';
|
|
1409
|
+
if (parentLayout === Layout.Column) {
|
|
1410
|
+
style['flex'] = 1;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
else if (height.type === 'fixed' && height.value >= 0) {
|
|
1414
|
+
style['height'] = Number(height.value);
|
|
1415
|
+
}
|
|
1416
|
+
return style;
|
|
1417
|
+
}
|
|
1418
|
+
function setViewSize(styles, props, options) {
|
|
1419
|
+
var _a, _b;
|
|
1420
|
+
const { width: defaultWidth, height: defaultHeight } = defaultProperties.view.size;
|
|
1421
|
+
const { parentLayout } = options;
|
|
1422
|
+
const sizeStyle = getViewSizeStyle((_a = props.width) !== null && _a !== void 0 ? _a : defaultWidth, (_b = props.height) !== null && _b !== void 0 ? _b : defaultHeight, parentLayout);
|
|
1423
|
+
Object.assign(styles, sizeStyle);
|
|
1424
|
+
}
|
|
1425
|
+
function setAlign(styles, layout = defaultProperties.box.layout, align = defaultProperties.box.align) {
|
|
1426
|
+
if (layout === Layout.Row) {
|
|
1427
|
+
styles['flexDirection'] = 'row';
|
|
1428
|
+
styles['alignItems'] = alignInFlex(align.vertical);
|
|
1429
|
+
styles['justifyContent'] = alignInFlex(align.horizontal);
|
|
1430
|
+
}
|
|
1431
|
+
if (layout === Layout.Column) {
|
|
1432
|
+
styles['flexDirection'] = 'column';
|
|
1433
|
+
styles['alignItems'] = alignInFlex(align.horizontal);
|
|
1434
|
+
styles['justifyContent'] = alignInFlex(align.vertical);
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
function setTextAlign(styles, align = defaultProperties.box.align.horizontal) {
|
|
1438
|
+
styles.textAlign = align;
|
|
1439
|
+
}
|
|
1440
|
+
function setImageStyle(styles, imageStyle) {
|
|
1441
|
+
const { contentMode = MediaContentMode.AspectFit } = imageStyle || {};
|
|
1442
|
+
if (contentMode) {
|
|
1443
|
+
switch (contentMode) {
|
|
1444
|
+
case MediaContentMode.AspectFill:
|
|
1445
|
+
styles['objectFit'] = 'cover';
|
|
1446
|
+
break;
|
|
1447
|
+
case MediaContentMode.AspectFit:
|
|
1448
|
+
styles['objectFit'] = 'contain';
|
|
1449
|
+
break;
|
|
1450
|
+
case MediaContentMode.ScalesToFill:
|
|
1451
|
+
styles['objectFit'] = 'fill';
|
|
1452
|
+
break;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
// uses image meta-data to render images that doesn't break the UI
|
|
1457
|
+
// https://sendbird.atlassian.net/wiki/spaces/UK/pages/2008220608/Message+template+-+Image+policy
|
|
1458
|
+
function setImageAspectRatio(styles, props) {
|
|
1459
|
+
var _a, _b, _c, _d;
|
|
1460
|
+
const imageMetaData = props === null || props === void 0 ? void 0 : props.metaData;
|
|
1461
|
+
if (!(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelHeight) || !(imageMetaData === null || imageMetaData === void 0 ? void 0 : imageMetaData.pixelWidth)) {
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
if (((_a = props === null || props === void 0 ? void 0 : props.width) === null || _a === void 0 ? void 0 : _a.type) === 'fixed' || ((_b = props === null || props === void 0 ? void 0 : props.height) === null || _b === void 0 ? void 0 : _b.type) === 'fixed') {
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
styles['aspectRatio'] = `${(_c = props === null || props === void 0 ? void 0 : props.metaData) === null || _c === void 0 ? void 0 : _c.pixelWidth} / ${(_d = props === null || props === void 0 ? void 0 : props.metaData) === null || _d === void 0 ? void 0 : _d.pixelHeight}`;
|
|
1468
|
+
}
|
|
1469
|
+
function webkitLineClampStyles(numberOfLines) {
|
|
1470
|
+
return {
|
|
1471
|
+
WebkitLineClamp: numberOfLines,
|
|
1472
|
+
WebkitBoxOrient: 'vertical',
|
|
1473
|
+
display: '-webkit-box',
|
|
1474
|
+
overflow: 'hidden',
|
|
1475
|
+
overflowWrap: 'anywhere',
|
|
1476
|
+
flex: 1,
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
function setTextStyle(styles, props, options) {
|
|
1480
|
+
const { textStyle, width } = props;
|
|
1481
|
+
// TODO: Change default as design
|
|
1482
|
+
const { size, color, weight = 'normal' } = textStyle || {};
|
|
1483
|
+
if (size)
|
|
1484
|
+
styles['fontSize'] = Number(size);
|
|
1485
|
+
if (color)
|
|
1486
|
+
styles['color'] = color;
|
|
1487
|
+
if (weight)
|
|
1488
|
+
styles['fontWeight'] = weight;
|
|
1489
|
+
if ((width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
|
|
1490
|
+
styles['maxWidth'] = '100%';
|
|
1491
|
+
}
|
|
1492
|
+
if (props.type === ComponentType.Text) {
|
|
1493
|
+
const { siblings, elemIdx } = options;
|
|
1494
|
+
// To push out any subsequent components from the container,
|
|
1495
|
+
// if a prior one is long enough to occupy an entire line
|
|
1496
|
+
// @link https://sendbird.atlassian.net/browse/NOTI-709
|
|
1497
|
+
if (siblings != null && siblings.length >= 2 && siblings.every(isWrappedText)) {
|
|
1498
|
+
styles.flexShrink = siblings.length - 1 === elemIdx ? 1 : 0;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
1504
|
+
var t = {};
|
|
1505
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1506
|
+
t[p] = s[p];
|
|
1507
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1508
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1509
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1510
|
+
t[p[i]] = s[p[i]];
|
|
1511
|
+
}
|
|
1512
|
+
return t;
|
|
1513
|
+
};
|
|
1514
|
+
const hasValidUrlProtocol = (url = '') => ['http://', 'https://', 'ftp://'].some((protocol) => url.startsWith(protocol));
|
|
1515
|
+
/**
|
|
1516
|
+
* @param url - url to be checked
|
|
1517
|
+
* @returns url with http:// protocol if it doesn't have any protocol
|
|
1518
|
+
* @example
|
|
1519
|
+
* returnUrl('www.sendbird.com') // returns 'http://www.sendbird.com'
|
|
1520
|
+
* returnUrl('https://www.sendbird.com') // returns 'https://www.sendbird.com'
|
|
1521
|
+
* returnUrl('ftp://www.sendbird.com') // returns 'ftp://www.sendbird.com'
|
|
1522
|
+
* returnUrl('sendbird.com') // returns 'https://sendbird.com'
|
|
1523
|
+
**/
|
|
1524
|
+
const returnUrl = (url = '') => {
|
|
1525
|
+
if (hasValidUrlProtocol(url)) {
|
|
1526
|
+
return url;
|
|
1527
|
+
}
|
|
1528
|
+
return `https://${url}`;
|
|
1529
|
+
};
|
|
1530
|
+
// todo: semantic html here is not perfect, need to revisit. Same for Button
|
|
1531
|
+
const ActionHandler = ({ className = '', style, children, props }) => {
|
|
1532
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
1533
|
+
const { recalculatedStyle, elemRef } = useRecalculateWidth({ style, props });
|
|
1534
|
+
const { message, handleWebAction, handleCustomAction, handlePredefinedAction } = useMessageContext();
|
|
1535
|
+
const onClick = (e) => {
|
|
1536
|
+
var _a, _b, _c, _d, _e;
|
|
1537
|
+
if (((_a = props === null || props === void 0 ? void 0 : props.action) === null || _a === void 0 ? void 0 : _a.type) === 'web') {
|
|
1538
|
+
if (handleWebAction) {
|
|
1539
|
+
handleWebAction === null || handleWebAction === void 0 ? void 0 : handleWebAction(e, props.action, message);
|
|
1540
|
+
}
|
|
1541
|
+
else {
|
|
1542
|
+
(_c = window === null || window === void 0 ? void 0 : window.open(returnUrl((_b = props === null || props === void 0 ? void 0 : props.action) === null || _b === void 0 ? void 0 : _b.data), '_blank', 'noopener noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
if (((_d = props === null || props === void 0 ? void 0 : props.action) === null || _d === void 0 ? void 0 : _d.type) === 'custom') {
|
|
1546
|
+
handleCustomAction === null || handleCustomAction === void 0 ? void 0 : handleCustomAction(e, props.action, message);
|
|
1547
|
+
}
|
|
1548
|
+
if (((_e = props === null || props === void 0 ? void 0 : props.action) === null || _e === void 0 ? void 0 : _e.type) === 'uikit') {
|
|
1549
|
+
handlePredefinedAction === null || handlePredefinedAction === void 0 ? void 0 : handlePredefinedAction(e, props.action, message);
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
const borderClass = ((_a = props.viewStyle) === null || _a === void 0 ? void 0 : _a.borderWidth) ? ' sb-message-template__border' : '';
|
|
1553
|
+
if (className === 'sb-message-template__text-button') {
|
|
1554
|
+
return (React__default.createElement("button", { className: `${className}${borderClass}`, "data-sb-template-id": props.elementId, style: Object.assign(Object.assign({}, style), { paddingTop: (_c = (_b = props.viewStyle) === null || _b === void 0 ? void 0 : _b.padding) === null || _c === void 0 ? void 0 : _c.top, paddingRight: (_e = (_d = props.viewStyle) === null || _d === void 0 ? void 0 : _d.padding) === null || _e === void 0 ? void 0 : _e.right, paddingBottom: (_g = (_f = props.viewStyle) === null || _f === void 0 ? void 0 : _f.padding) === null || _g === void 0 ? void 0 : _g.bottom, paddingLeft: (_j = (_h = props.viewStyle) === null || _h === void 0 ? void 0 : _h.padding) === null || _j === void 0 ? void 0 : _j.left }), onClick: onClick }, children));
|
|
1555
|
+
}
|
|
1556
|
+
const { display, flexDirection, justifyContent, alignItems, objectFit } = recalculatedStyle, wrapperStyles = __rest(recalculatedStyle, ["display", "flexDirection", "justifyContent", "alignItems", "objectFit"]);
|
|
1557
|
+
return (React__default.createElement("div", { ref: elemRef, className: `${className}${borderClass} ${(props === null || props === void 0 ? void 0 : props.action) ? 'sb-message-template__action' : ''}`, "data-sb-template-id": props.elementId, style: wrapperStyles, onClick: onClick },
|
|
1558
|
+
React__default.createElement("div", { style: {
|
|
1559
|
+
display,
|
|
1560
|
+
flexDirection,
|
|
1561
|
+
justifyContent,
|
|
1562
|
+
alignItems,
|
|
1563
|
+
objectFit,
|
|
1564
|
+
width: '100%',
|
|
1565
|
+
height: '100%',
|
|
1566
|
+
paddingTop: (_l = (_k = props.viewStyle) === null || _k === void 0 ? void 0 : _k.padding) === null || _l === void 0 ? void 0 : _l.top,
|
|
1567
|
+
paddingRight: (_o = (_m = props.viewStyle) === null || _m === void 0 ? void 0 : _m.padding) === null || _o === void 0 ? void 0 : _o.right,
|
|
1568
|
+
paddingBottom: (_q = (_p = props.viewStyle) === null || _p === void 0 ? void 0 : _p.padding) === null || _q === void 0 ? void 0 : _q.bottom,
|
|
1569
|
+
paddingLeft: (_s = (_r = props.viewStyle) === null || _r === void 0 ? void 0 : _r.padding) === null || _s === void 0 ? void 0 : _s.left,
|
|
1570
|
+
} }, children)));
|
|
1571
|
+
};
|
|
1572
|
+
/**
|
|
1573
|
+
* Text that is fixed or fill parent should be wrapped in a div with max-width: 100% and max-height: 100%
|
|
1574
|
+
* This is to prevent text from overflowing the padding of the container
|
|
1575
|
+
*/
|
|
1576
|
+
function isFixedOrFill(view) {
|
|
1577
|
+
var _a, _b, _c, _d;
|
|
1578
|
+
const heightType = (_a = view === null || view === void 0 ? void 0 : view.height) === null || _a === void 0 ? void 0 : _a.type;
|
|
1579
|
+
const widthType = (_b = view === null || view === void 0 ? void 0 : view.width) === null || _b === void 0 ? void 0 : _b.type;
|
|
1580
|
+
const isFixedDiamension = heightType === 'fixed' || widthType === 'fixed';
|
|
1581
|
+
const isFill = (heightType === 'flex' && ((_c = view === null || view === void 0 ? void 0 : view.height) === null || _c === void 0 ? void 0 : _c.value) === FlexSizeSpecValue.FillParent) ||
|
|
1582
|
+
(widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
|
|
1583
|
+
return isFixedDiamension || isFill;
|
|
1584
|
+
}
|
|
1585
|
+
function renderText(view) {
|
|
1586
|
+
const { text, maxTextLines } = view;
|
|
1587
|
+
const isToBeWrapped = isFixedOrFill(view);
|
|
1588
|
+
const isMultiLine = maxTextLines != null && maxTextLines > 0;
|
|
1589
|
+
if (isMultiLine || isToBeWrapped) {
|
|
1590
|
+
const wrapperStyling = Object.assign(Object.assign({}, ((isMultiLine || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
|
|
1591
|
+
return (React__default.createElement("div", { style: wrapperStyling }, isMultiLine ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, text) : text));
|
|
1592
|
+
}
|
|
1593
|
+
return text;
|
|
1594
|
+
}
|
|
1595
|
+
const renderer = createRenderer({
|
|
1596
|
+
views: {
|
|
1597
|
+
box(props) {
|
|
1598
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__box", elementId: props.elementId, style: props.parsedProperties, props: props }, props.children));
|
|
1599
|
+
},
|
|
1600
|
+
text(props) {
|
|
1601
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__text", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
|
|
1602
|
+
},
|
|
1603
|
+
image(props) {
|
|
1604
|
+
var _a;
|
|
1605
|
+
// todo: add image backup
|
|
1606
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__image-container", elementId: props.elementId, style: props.parsedProperties, props: props },
|
|
1607
|
+
React__default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
|
|
1608
|
+
},
|
|
1609
|
+
textButton(props) {
|
|
1610
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
|
|
1611
|
+
},
|
|
1612
|
+
imageButton(props) {
|
|
1613
|
+
var _a;
|
|
1614
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__image-container sb-message-template__image-button", elementId: props.elementId, style: props.parsedProperties, props: props },
|
|
1615
|
+
React__default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image-button", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
|
|
1616
|
+
},
|
|
1617
|
+
},
|
|
1618
|
+
});
|
|
1619
|
+
const parser = createParser({
|
|
1620
|
+
mapBoxProps(props, options) {
|
|
1621
|
+
const styles = getDefaultStyles();
|
|
1622
|
+
setViewProps(styles, props, options);
|
|
1623
|
+
setAlign(styles, props.layout, props.align);
|
|
1624
|
+
return styles;
|
|
1625
|
+
},
|
|
1626
|
+
mapTextProps(props, options) {
|
|
1627
|
+
var _a;
|
|
1628
|
+
const styles = getDefaultStyles({ whiteSpace: 'pre-line' });
|
|
1629
|
+
// Better not set flex 1 to text
|
|
1630
|
+
setViewProps(styles, props, options);
|
|
1631
|
+
setTextStyle(styles, props, options);
|
|
1632
|
+
setAlign(styles, Layout.Row, props.align);
|
|
1633
|
+
setTextAlign(styles, (_a = props.align) === null || _a === void 0 ? void 0 : _a.horizontal);
|
|
1634
|
+
return styles;
|
|
1635
|
+
},
|
|
1636
|
+
mapImageProps(props, options) {
|
|
1637
|
+
const styles = getDefaultStyles();
|
|
1638
|
+
setViewProps(styles, props, options);
|
|
1639
|
+
setImageStyle(styles, props.imageStyle);
|
|
1640
|
+
setImageAspectRatio(styles, props);
|
|
1641
|
+
return styles;
|
|
1642
|
+
},
|
|
1643
|
+
mapTextButtonProps(props, options) {
|
|
1644
|
+
const styles = getDefaultStyles({ whiteSpace: 'pre-line', alignItems: 'center', justifyContent: 'center' });
|
|
1645
|
+
setViewProps(styles, props, options);
|
|
1646
|
+
setTextStyle(styles, Object.assign(Object.assign({}, props), { textStyle: Object.assign({ weight: 500 }, props.textStyle) }), options);
|
|
1647
|
+
return styles;
|
|
1648
|
+
},
|
|
1649
|
+
mapImageButtonProps(props, options) {
|
|
1650
|
+
const styles = getDefaultStyles();
|
|
1651
|
+
setViewProps(styles, props, options);
|
|
1652
|
+
setImageStyle(styles, props.imageStyle);
|
|
1653
|
+
setImageAspectRatio(styles, props);
|
|
1654
|
+
return styles;
|
|
1655
|
+
},
|
|
1656
|
+
});
|
|
1657
|
+
createMessageTemplate({
|
|
1658
|
+
renderer,
|
|
1659
|
+
parser,
|
|
1660
|
+
Container: ({ children }) => {
|
|
1661
|
+
return (React__default.createElement("div", { className: "sb-message-template__parent", style: {
|
|
1662
|
+
display: 'flex',
|
|
1663
|
+
flexDirection: 'column',
|
|
1664
|
+
maxWidth: 400,
|
|
1665
|
+
backgroundColor: '#cecece',
|
|
1666
|
+
marginBottom: 24,
|
|
1667
|
+
borderRadius: '8px',
|
|
1668
|
+
} }, children));
|
|
1669
|
+
},
|
|
1670
|
+
});
|
|
1671
|
+
|
|
1672
|
+
var CustomTemplate = createMessageTemplate({
|
|
1673
|
+
parser: parser,
|
|
1674
|
+
renderer: renderer,
|
|
1675
|
+
Container: function (_a) {
|
|
1676
|
+
var children = _a.children;
|
|
1677
|
+
return (React__default.createElement("div", { className: [
|
|
1678
|
+
'sb-message-template__parent',
|
|
1679
|
+
'sendbird-message-template__root',
|
|
1680
|
+
].join(' ') }, children));
|
|
1681
|
+
},
|
|
1682
|
+
}).MessageTemplate;
|
|
1683
|
+
function MessageTemplate(_a) {
|
|
1684
|
+
var templateItems = _a.templateItems;
|
|
1685
|
+
return React__default.createElement(CustomTemplate, { templateItems: templateItems });
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
export { MessageProvider as M, MessageTemplate as a };
|
|
1689
|
+
//# sourceMappingURL=bundle-G8aQ8ldg.js.map
|