@sendbird/uikit-react 3.14.0-beta.2 → 3.14.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 +78 -79
- package/App.js.map +1 -1
- package/CHANGELOG.md +106 -8
- package/Channel/components/ChannelHeader.js +29 -29
- package/Channel/components/ChannelUI.js +66 -66
- package/Channel/components/FileViewer.js +28 -28
- package/Channel/components/FrozenNotification.js +5 -5
- package/Channel/components/Message.js +55 -55
- package/Channel/components/MessageInput.js +41 -41
- package/Channel/components/MessageInputWrapper.js +41 -41
- package/Channel/components/MessageList.js +64 -63
- 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 +23 -25
- package/Channel/context.js.map +1 -1
- 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 +65 -65
- 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/ChannelSettingsHeader.js +6 -6
- package/ChannelSettings/components/ChannelSettingsUI.js +28 -29
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +14 -14
- package/ChannelSettings/components/LeaveChannel.js +11 -11
- package/ChannelSettings/components/ModerationPanel.js +22 -23
- package/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/ChannelSettings/components/UserListItem.js +13 -13
- package/ChannelSettings/components/UserPanel.js +20 -20
- package/ChannelSettings/context.js +3 -3
- package/ChannelSettings.js +22 -23
- package/ChannelSettings.js.map +1 -1
- 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 +57 -27
- package/GroupChannel/components/FileViewer.js.map +1 -1
- package/GroupChannel/components/FrozenNotification.js +5 -5
- package/GroupChannel/components/GroupChannelHeader.js +23 -22
- package/GroupChannel/components/GroupChannelHeader.js.map +1 -1
- package/GroupChannel/components/GroupChannelUI.js +61 -60
- package/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/GroupChannel/components/Message.js +55 -54
- package/GroupChannel/components/Message.js.map +1 -1
- package/GroupChannel/components/MessageInputWrapper.js +39 -38
- package/GroupChannel/components/MessageInputWrapper.js.map +1 -1
- package/GroupChannel/components/MessageList.js +59 -57
- package/GroupChannel/components/MessageList.js.map +1 -1
- package/GroupChannel/components/RemoveMessageModal.js +23 -22
- package/GroupChannel/components/RemoveMessageModal.js.map +1 -1
- package/GroupChannel/components/SuggestedMentionList.js +12 -12
- package/GroupChannel/components/TypingIndicator.js +6 -6
- package/GroupChannel/components/UnreadCount.js +7 -7
- package/GroupChannel/context.js +29 -26
- package/GroupChannel/context.js.map +1 -1
- package/GroupChannel.js +60 -59
- 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 +40 -44
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +44 -44
- package/OpenChannel/components/OpenChannelUI.js +44 -43
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +17 -17
- package/OpenChannel.js +40 -40
- 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 +18 -19
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +19 -20
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +17 -17
- package/OpenChannelSettings/context.js +3 -3
- package/OpenChannelSettings.js +19 -20
- package/OpenChannelSettings.js.map +1 -1
- package/SendbirdProvider.js +26 -48
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +78 -49
- package/Thread/components/ParentMessageInfo.js.map +1 -1
- package/Thread/components/ParentMessageInfoItem.js +74 -36
- package/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/Thread/components/ThreadHeader.js +7 -7
- package/Thread/components/ThreadList.js +46 -46
- package/Thread/components/ThreadListItem.js +112 -55
- package/Thread/components/ThreadListItem.js.map +1 -1
- package/Thread/components/ThreadMessageInput.js +43 -42
- package/Thread/components/ThreadMessageInput.js.map +1 -1
- package/Thread/components/ThreadUI.js +56 -56
- package/Thread/context.js +15 -12
- package/Thread/context.js.map +1 -1
- 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-BdZAuvN7.js → bundle--6zoMlSy.js} +7 -7
- package/chunks/{bundle-BdZAuvN7.js.map → bundle--6zoMlSy.js.map} +1 -1
- package/chunks/{bundle-rSEP1XoB.js → bundle--KTlVDyw.js} +40 -9
- package/{cjs/chunks/bundle-B8jj7upa.js.map → chunks/bundle--KTlVDyw.js.map} +1 -1
- package/chunks/bundle-B-rlaXWu.js +20 -0
- package/chunks/bundle-B-rlaXWu.js.map +1 -0
- package/chunks/{bundle-CfKGkWtT.js → bundle-B1531-Xt.js} +1 -1
- package/chunks/bundle-B1531-Xt.js.map +1 -0
- package/chunks/{bundle-By4sE23W.js → bundle-B4gJwLnb.js} +8 -8
- package/chunks/{bundle-By4sE23W.js.map → bundle-B4gJwLnb.js.map} +1 -1
- package/chunks/{bundle-dw1OtCIz.js → bundle-BCNLSTzO.js} +2 -2
- package/chunks/{bundle-dw1OtCIz.js.map → bundle-BCNLSTzO.js.map} +1 -1
- package/chunks/{bundle-CTyr18ZN.js → bundle-BGCeRCjz.js} +3 -3
- package/chunks/{bundle-CTyr18ZN.js.map → bundle-BGCeRCjz.js.map} +1 -1
- package/chunks/{bundle-CcVFQEGF.js → bundle-BGjW7OlD.js} +3 -3
- package/chunks/{bundle-CcVFQEGF.js.map → bundle-BGjW7OlD.js.map} +1 -1
- package/chunks/{bundle-C_n2Emjx.js → bundle-BJ8L9q1S.js} +1 -1
- package/chunks/bundle-BJ8L9q1S.js.map +1 -0
- package/chunks/{bundle-DUTTSKO5.js → bundle-BL67-UYY.js} +3 -3
- package/chunks/bundle-BL67-UYY.js.map +1 -0
- package/chunks/{bundle-BJs_5v6q.js → bundle-BR7FU00z.js} +2 -2
- package/chunks/{bundle-BJs_5v6q.js.map → bundle-BR7FU00z.js.map} +1 -1
- package/chunks/{bundle-aH4n4ipp.js → bundle-BSOtUr3s.js} +1 -1
- package/chunks/{bundle-aH4n4ipp.js.map → bundle-BSOtUr3s.js.map} +1 -1
- package/chunks/{bundle-CPszRkFg.js → bundle-BWCUNJoA.js} +1 -1
- package/chunks/bundle-BWCUNJoA.js.map +1 -0
- package/chunks/{bundle-zf2ni0YJ.js → bundle-BYJO_VIh.js} +16 -16
- package/chunks/bundle-BYJO_VIh.js.map +1 -0
- package/chunks/{bundle-gSQF3Ob-.js → bundle-BlbJo9zV.js} +1 -1
- package/chunks/bundle-BlbJo9zV.js.map +1 -0
- package/chunks/{bundle-DgJrJ2xn.js → bundle-BmJp9ELx.js} +4 -4
- package/chunks/bundle-BmJp9ELx.js.map +1 -0
- package/chunks/{bundle-Bf5VthYV.js → bundle-BmJsj1DE.js} +1 -1
- package/chunks/bundle-BmJsj1DE.js.map +1 -0
- package/chunks/{bundle-cjTAVQxr.js → bundle-BqZ85d_h.js} +7 -7
- package/chunks/{bundle-cjTAVQxr.js.map → bundle-BqZ85d_h.js.map} +1 -1
- package/chunks/{bundle-DcOT2xg0.js → bundle-BqpRc1fc.js} +1 -1
- package/chunks/bundle-BqpRc1fc.js.map +1 -0
- package/chunks/{bundle-WwYLGAen.js → bundle-Buy5OFoZ.js} +2 -2
- package/chunks/bundle-Buy5OFoZ.js.map +1 -0
- package/chunks/{bundle-CF6PMu9B.js → bundle-Bxhw3nyo.js} +1 -1
- package/chunks/bundle-Bxhw3nyo.js.map +1 -0
- package/chunks/{bundle-CJIPD7gN.js → bundle-ByOL8d1Y.js} +3 -3
- package/chunks/bundle-ByOL8d1Y.js.map +1 -0
- package/chunks/{bundle-ynxAt7xC.js → bundle-C0hxFMpo.js} +1 -1
- package/chunks/bundle-C0hxFMpo.js.map +1 -0
- package/chunks/{bundle-87W4GPnC.js → bundle-C4E6x1yH.js} +1 -1
- package/chunks/bundle-C4E6x1yH.js.map +1 -0
- package/chunks/{bundle-CbBN2HTx.js → bundle-C5gv8BUg.js} +10 -10
- package/chunks/bundle-C5gv8BUg.js.map +1 -0
- package/chunks/{bundle-CRLJsnLv.js → bundle-C5yKwJa5.js} +10 -10
- package/chunks/{bundle-CRLJsnLv.js.map → bundle-C5yKwJa5.js.map} +1 -1
- package/chunks/{bundle-DCjOFMcr.js → bundle-C8JSMAy5.js} +4 -4
- package/chunks/bundle-C8JSMAy5.js.map +1 -0
- package/chunks/{bundle-C-_RpFyM.js → bundle-C9k4XREr.js} +3 -3
- package/chunks/bundle-C9k4XREr.js.map +1 -0
- package/chunks/bundle-CEBnyfFY.js +16 -0
- package/chunks/bundle-CEBnyfFY.js.map +1 -0
- package/chunks/{bundle-Cvk0UZLW.js → bundle-CKUGA2Du.js} +4 -4
- package/chunks/{bundle-Cvk0UZLW.js.map → bundle-CKUGA2Du.js.map} +1 -1
- package/chunks/{bundle-BNydv1KA.js → bundle-CLEZvXSa.js} +6 -6
- package/chunks/bundle-CLEZvXSa.js.map +1 -0
- package/chunks/{bundle-DvI4QhV3.js → bundle-CMdrfQU4.js} +3 -3
- package/chunks/{bundle-DvI4QhV3.js.map → bundle-CMdrfQU4.js.map} +1 -1
- package/chunks/{bundle-5okwu0-4.js → bundle-CRJQQ2Pt.js} +45 -37
- package/{cjs/chunks/bundle-B1Nml3ap.js.map → chunks/bundle-CRJQQ2Pt.js.map} +1 -1
- package/chunks/{bundle-CS7t26su.js → bundle-CSD1Y0Up.js} +1 -1
- package/chunks/bundle-CSD1Y0Up.js.map +1 -0
- package/chunks/{bundle-D56MXYqF.js → bundle-CVBV25Ez.js} +4 -4
- package/chunks/bundle-CVBV25Ez.js.map +1 -0
- package/chunks/{bundle-DRL21d0s.js → bundle-CXPL_q7g.js} +1 -1
- package/chunks/bundle-CXPL_q7g.js.map +1 -0
- package/chunks/{bundle-CcTHgZqq.js → bundle-Ca-c848e.js} +1 -1
- package/chunks/{bundle-CcTHgZqq.js.map → bundle-Ca-c848e.js.map} +1 -1
- package/chunks/{bundle-BKG2cvZ9.js → bundle-CcCCSO3j.js} +3 -3
- package/chunks/bundle-CcCCSO3j.js.map +1 -0
- package/chunks/{bundle-DkRogqRS.js → bundle-CemSwFjs.js} +3 -3
- package/chunks/bundle-CemSwFjs.js.map +1 -0
- package/chunks/{bundle-BuIxT5aZ.js → bundle-CfCfA_eS.js} +1 -1
- package/chunks/bundle-CfCfA_eS.js.map +1 -0
- package/chunks/{bundle-DXhynnjn.js → bundle-CqjZHu2X.js} +1 -1
- package/chunks/{bundle-DXhynnjn.js.map → bundle-CqjZHu2X.js.map} +1 -1
- package/chunks/{bundle-DnFiUPoR.js → bundle-Cr5JfXnd.js} +1 -1
- package/chunks/bundle-Cr5JfXnd.js.map +1 -0
- package/chunks/{bundle-C8TvjQ68.js → bundle-CsWx1pIH.js} +10 -10
- package/chunks/{bundle-C8TvjQ68.js.map → bundle-CsWx1pIH.js.map} +1 -1
- package/chunks/{bundle-C0LxowmB.js → bundle-Cv74ntvD.js} +3 -3
- package/chunks/{bundle-C0LxowmB.js.map → bundle-Cv74ntvD.js.map} +1 -1
- package/chunks/{bundle-COGPgRK-.js → bundle-CwodDxvD.js} +1 -1
- package/chunks/bundle-CwodDxvD.js.map +1 -0
- package/chunks/{bundle-PsMmoXV_.js → bundle-Cxxoo-8r.js} +4 -4
- package/chunks/{bundle-PsMmoXV_.js.map → bundle-Cxxoo-8r.js.map} +1 -1
- package/chunks/{bundle-BJ9OAqWz.js → bundle-CypLTOy5.js} +1 -1
- package/chunks/bundle-CypLTOy5.js.map +1 -0
- package/chunks/{bundle-RpPfSzD9.js → bundle-CzECC0WY.js} +1 -1
- package/chunks/{bundle-RpPfSzD9.js.map → bundle-CzECC0WY.js.map} +1 -1
- package/chunks/{bundle-B1s46xJT.js → bundle-CzznhOkf.js} +6 -4
- package/chunks/bundle-CzznhOkf.js.map +1 -0
- package/chunks/{bundle-l_8hg8H3.js → bundle-D-62maU6.js} +2 -2
- package/chunks/bundle-D-62maU6.js.map +1 -0
- package/chunks/{bundle-DzuAq6CR.js → bundle-D2nMevA-.js} +2 -2
- package/chunks/bundle-D2nMevA-.js.map +1 -0
- package/chunks/{bundle-BUy5u56K.js → bundle-D3BcbbU5.js} +1 -1
- package/chunks/bundle-D3BcbbU5.js.map +1 -0
- package/chunks/{bundle-B0azZJiA.js → bundle-D3hUaRgQ.js} +14 -14
- package/chunks/{bundle-B0azZJiA.js.map → bundle-D3hUaRgQ.js.map} +1 -1
- package/chunks/{bundle-XGYpSNOg.js → bundle-D7hy2K0F.js} +5 -5
- package/chunks/{bundle-XGYpSNOg.js.map → bundle-D7hy2K0F.js.map} +1 -1
- package/chunks/{bundle-BoezGGkX.js → bundle-DAf6h8hw.js} +13 -12
- package/chunks/{bundle-BoezGGkX.js.map → bundle-DAf6h8hw.js.map} +1 -1
- package/chunks/{bundle-rfEyWmAm.js → bundle-DChW5Z3e.js} +1 -1
- package/chunks/bundle-DChW5Z3e.js.map +1 -0
- package/chunks/{bundle-BNeRxCQA.js → bundle-DIQmyyii.js} +1 -1
- package/chunks/bundle-DIQmyyii.js.map +1 -0
- package/chunks/{bundle-DoLed6JB.js → bundle-DKTKyX5B.js} +1 -1
- package/chunks/bundle-DKTKyX5B.js.map +1 -0
- package/chunks/{bundle-BJgNc4do.js → bundle-DLC9d0SK.js} +2 -2
- package/chunks/{bundle-BJgNc4do.js.map → bundle-DLC9d0SK.js.map} +1 -1
- package/chunks/{bundle-D-cpJ5MP.js → bundle-DOE8EVWg.js} +1 -1
- package/chunks/bundle-DOE8EVWg.js.map +1 -0
- package/chunks/{bundle-BvQAepkJ.js → bundle-DR0N9Re_.js} +1 -1
- package/chunks/bundle-DR0N9Re_.js.map +1 -0
- package/chunks/{bundle-D_KO6Orc.js → bundle-DRWNB6So.js} +1 -1
- package/chunks/{bundle-D_KO6Orc.js.map → bundle-DRWNB6So.js.map} +1 -1
- package/chunks/{bundle-BSPBjwR6.js → bundle-DURANzV-.js} +6 -6
- package/chunks/bundle-DURANzV-.js.map +1 -0
- package/chunks/{bundle-C1RngQCJ.js → bundle-DYRfOZJn.js} +9 -9
- package/chunks/bundle-DYRfOZJn.js.map +1 -0
- package/chunks/{bundle-DRIvYDIu.js → bundle-Dan3OYIf.js} +29 -26
- package/chunks/{bundle-DRIvYDIu.js.map → bundle-Dan3OYIf.js.map} +1 -1
- package/chunks/{bundle-GQqssfTX.js → bundle-DdrjZDoC.js} +1 -1
- package/chunks/bundle-DdrjZDoC.js.map +1 -0
- package/chunks/{bundle-C4sUzPGS.js → bundle-DiKCx9T0.js} +3 -3
- package/chunks/bundle-DiKCx9T0.js.map +1 -0
- package/chunks/{bundle-BPclYGwz.js → bundle-DluCUNJH.js} +1 -1
- package/chunks/bundle-DluCUNJH.js.map +1 -0
- package/chunks/{bundle-B2pNgmzq.js → bundle-DmHVnPIK.js} +3 -3
- package/chunks/bundle-DmHVnPIK.js.map +1 -0
- package/chunks/{bundle-Dicb9Y5f.js → bundle-Dp8Uc0CR.js} +6 -6
- package/chunks/bundle-Dp8Uc0CR.js.map +1 -0
- package/chunks/{bundle-N_XkA5JB.js → bundle-DpQTyp78.js} +57 -63
- package/chunks/bundle-DpQTyp78.js.map +1 -0
- package/chunks/{bundle-GKCJ2hC_.js → bundle-DqYLLkVp.js} +3 -3
- package/chunks/{bundle-GKCJ2hC_.js.map → bundle-DqYLLkVp.js.map} +1 -1
- package/chunks/{bundle-BmPxXQ_C.js → bundle-DraDQPaG.js} +5 -5
- package/chunks/bundle-DraDQPaG.js.map +1 -0
- package/chunks/{bundle-DTDkmegk.js → bundle-Dzzjbgaw.js} +1 -1
- package/chunks/bundle-Dzzjbgaw.js.map +1 -0
- package/chunks/{bundle-Bys5RwQj.js → bundle-Ryg4dN5c.js} +2 -2
- package/chunks/bundle-Ryg4dN5c.js.map +1 -0
- package/chunks/{bundle-azFrmmyK.js → bundle-cbuWRyNb.js} +10 -10
- package/chunks/{bundle-azFrmmyK.js.map → bundle-cbuWRyNb.js.map} +1 -1
- package/chunks/{bundle-BhjXV0mk.js → bundle-h_OgbXNz.js} +1 -1
- package/chunks/bundle-h_OgbXNz.js.map +1 -0
- package/chunks/{bundle-BFDyBk4r.js → bundle-oKdCuyHB.js} +1 -1
- package/chunks/bundle-oKdCuyHB.js.map +1 -0
- package/chunks/{bundle-D_X2Bqh-.js → bundle-tVxHr2lN.js} +2 -2
- package/chunks/bundle-tVxHr2lN.js.map +1 -0
- package/chunks/{bundle-BH5rbsxO.js → bundle-vcCWiyPL.js} +1367 -120
- package/chunks/bundle-vcCWiyPL.js.map +1 -0
- package/cjs/App.js +78 -79
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +29 -29
- package/cjs/Channel/components/ChannelUI.js +66 -66
- package/cjs/Channel/components/FileViewer.js +28 -28
- package/cjs/Channel/components/FrozenNotification.js +5 -5
- package/cjs/Channel/components/Message.js +55 -55
- package/cjs/Channel/components/MessageInput.js +41 -41
- package/cjs/Channel/components/MessageInputWrapper.js +41 -41
- package/cjs/Channel/components/MessageList.js +67 -66
- 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 +23 -25
- package/cjs/Channel/context.js.map +1 -1
- 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 +65 -65
- 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/ChannelSettingsHeader.js +6 -6
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +26 -27
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +14 -14
- package/cjs/ChannelSettings/components/LeaveChannel.js +11 -11
- package/cjs/ChannelSettings/components/ModerationPanel.js +22 -23
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/cjs/ChannelSettings/components/UserListItem.js +13 -13
- package/cjs/ChannelSettings/components/UserPanel.js +20 -20
- package/cjs/ChannelSettings/context.js +3 -3
- package/cjs/ChannelSettings.js +22 -23
- package/cjs/ChannelSettings.js.map +1 -1
- 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 +57 -27
- package/cjs/GroupChannel/components/FileViewer.js.map +1 -1
- package/cjs/GroupChannel/components/FrozenNotification.js +5 -5
- package/cjs/GroupChannel/components/GroupChannelHeader.js +23 -22
- package/cjs/GroupChannel/components/GroupChannelHeader.js.map +1 -1
- package/cjs/GroupChannel/components/GroupChannelUI.js +61 -60
- package/cjs/GroupChannel/components/GroupChannelUI.js.map +1 -1
- package/cjs/GroupChannel/components/Message.js +55 -54
- package/cjs/GroupChannel/components/Message.js.map +1 -1
- package/cjs/GroupChannel/components/MessageInputWrapper.js +38 -37
- package/cjs/GroupChannel/components/MessageInputWrapper.js.map +1 -1
- package/cjs/GroupChannel/components/MessageList.js +60 -58
- package/cjs/GroupChannel/components/MessageList.js.map +1 -1
- package/cjs/GroupChannel/components/RemoveMessageModal.js +23 -22
- package/cjs/GroupChannel/components/RemoveMessageModal.js.map +1 -1
- package/cjs/GroupChannel/components/SuggestedMentionList.js +12 -12
- package/cjs/GroupChannel/components/TypingIndicator.js +6 -6
- package/cjs/GroupChannel/components/UnreadCount.js +7 -7
- package/cjs/GroupChannel/context.js +29 -26
- package/cjs/GroupChannel/context.js.map +1 -1
- package/cjs/GroupChannel.js +60 -59
- 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 +39 -43
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +42 -42
- package/cjs/OpenChannel/components/OpenChannelUI.js +44 -43
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +17 -17
- package/cjs/OpenChannel.js +40 -40
- 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 +18 -19
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +19 -20
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +17 -17
- package/cjs/OpenChannelSettings/context.js +3 -3
- package/cjs/OpenChannelSettings.js +19 -20
- package/cjs/OpenChannelSettings.js.map +1 -1
- package/cjs/SendbirdProvider.js +26 -48
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +78 -49
- package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfoItem.js +74 -36
- package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/cjs/Thread/components/ThreadHeader.js +7 -7
- package/cjs/Thread/components/ThreadList.js +46 -46
- package/cjs/Thread/components/ThreadListItem.js +112 -55
- package/cjs/Thread/components/ThreadListItem.js.map +1 -1
- package/cjs/Thread/components/ThreadMessageInput.js +43 -42
- package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
- package/cjs/Thread/components/ThreadUI.js +56 -56
- package/cjs/Thread/context.js +15 -12
- package/cjs/Thread/context.js.map +1 -1
- 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-BdHrSYl1.js → bundle-6kvEuXvi.js} +4 -4
- package/cjs/chunks/bundle-6kvEuXvi.js.map +1 -0
- package/cjs/chunks/{bundle--ToWZ9cj.js → bundle-B-3hDIdO.js} +1 -1
- package/cjs/chunks/bundle-B-3hDIdO.js.map +1 -0
- package/cjs/chunks/{bundle-DjB9bkvD.js → bundle-B6ZFoMH6.js} +1 -1
- package/cjs/chunks/bundle-B6ZFoMH6.js.map +1 -0
- package/cjs/chunks/{bundle-1hCsXfVb.js → bundle-BBn6e1TE.js} +1 -1
- package/cjs/chunks/{bundle-1hCsXfVb.js.map → bundle-BBn6e1TE.js.map} +1 -1
- package/cjs/chunks/{bundle-INETVVGE.js → bundle-BD49w5la.js} +1 -1
- package/cjs/chunks/bundle-BD49w5la.js.map +1 -0
- package/cjs/chunks/{bundle-Bm5ysFU-.js → bundle-BFekEiOq.js} +10 -10
- package/cjs/chunks/bundle-BFekEiOq.js.map +1 -0
- package/cjs/chunks/bundle-BN-LMdIM.js +24 -0
- package/cjs/chunks/bundle-BN-LMdIM.js.map +1 -0
- package/cjs/chunks/{bundle-C88DsCNB.js → bundle-BOcTTiW2.js} +3 -3
- package/cjs/chunks/bundle-BOcTTiW2.js.map +1 -0
- package/cjs/chunks/{bundle-CS644BJp.js → bundle-BQRvcMvv.js} +1366 -119
- package/cjs/chunks/bundle-BQRvcMvv.js.map +1 -0
- package/cjs/chunks/{bundle-BpOxHgfP.js → bundle-BVr30Pv7.js} +3 -3
- package/cjs/chunks/bundle-BVr30Pv7.js.map +1 -0
- package/cjs/chunks/{bundle-SIHqK2VF.js → bundle-BX7oj4JP.js} +1 -1
- package/cjs/chunks/bundle-BX7oj4JP.js.map +1 -0
- package/cjs/chunks/{bundle-FD0n8tOs.js → bundle-BYIW_h3Y.js} +4 -4
- package/cjs/chunks/bundle-BYIW_h3Y.js.map +1 -0
- package/cjs/chunks/{bundle-CW9QUnWM.js → bundle-BYMwGMsS.js} +1 -1
- package/cjs/chunks/bundle-BYMwGMsS.js.map +1 -0
- package/cjs/chunks/{bundle-tHnRbr7F.js → bundle-B_DDVUVa.js} +1 -1
- package/cjs/chunks/bundle-B_DDVUVa.js.map +1 -0
- package/cjs/chunks/{bundle-C9jXxNI1.js → bundle-BhUkL36h.js} +7 -7
- package/cjs/chunks/bundle-BhUkL36h.js.map +1 -0
- package/cjs/chunks/{bundle-DNP731Dg.js → bundle-BjidTEAi.js} +16 -16
- package/cjs/chunks/bundle-BjidTEAi.js.map +1 -0
- package/cjs/chunks/{bundle-DRFWOXrL.js → bundle-BjuS3ItZ.js} +1 -1
- package/cjs/chunks/bundle-BjuS3ItZ.js.map +1 -0
- package/cjs/chunks/{bundle-CD9H6RqJ.js → bundle-Bp8Rx6es.js} +57 -63
- package/cjs/chunks/bundle-Bp8Rx6es.js.map +1 -0
- package/cjs/chunks/{bundle-Y_FLyDnc.js → bundle-BrqtKvF1.js} +40 -9
- package/cjs/chunks/bundle-BrqtKvF1.js.map +1 -0
- package/cjs/chunks/{bundle-MFvyy6ar.js → bundle-BuxwIob-.js} +10 -10
- package/cjs/chunks/{bundle-MFvyy6ar.js.map → bundle-BuxwIob-.js.map} +1 -1
- package/cjs/chunks/{bundle-Q5_I3n-8.js → bundle-By-3k_MB.js} +1 -1
- package/cjs/chunks/bundle-By-3k_MB.js.map +1 -0
- package/cjs/chunks/{bundle-BxaGZqGJ.js → bundle-ByAfkvZh.js} +3 -3
- package/cjs/chunks/bundle-ByAfkvZh.js.map +1 -0
- package/cjs/chunks/{bundle-BVgN7Stu.js → bundle-BzKUDWhn.js} +2 -2
- package/cjs/chunks/{bundle-BVgN7Stu.js.map → bundle-BzKUDWhn.js.map} +1 -1
- package/cjs/chunks/{bundle-Dy6Gn-sd.js → bundle-C-TcZdkJ.js} +7 -7
- package/cjs/chunks/bundle-C-TcZdkJ.js.map +1 -0
- package/cjs/chunks/{bundle-B2cSnWcr.js → bundle-C3SJz4Ji.js} +1 -1
- package/cjs/chunks/bundle-C3SJz4Ji.js.map +1 -0
- package/cjs/chunks/{bundle-DJxxPTK5.js → bundle-C5UvuA7p.js} +3 -3
- package/cjs/chunks/{bundle-DJxxPTK5.js.map → bundle-C5UvuA7p.js.map} +1 -1
- package/cjs/chunks/{bundle-CmFB08Wf.js → bundle-C5nXYn9D.js} +3 -3
- package/cjs/chunks/bundle-C5nXYn9D.js.map +1 -0
- package/cjs/chunks/{bundle-jdEKrUGh.js → bundle-CB5yFlZx.js} +1 -1
- package/cjs/chunks/bundle-CB5yFlZx.js.map +1 -0
- package/cjs/chunks/{bundle-Cmmi9pdk.js → bundle-CCI24NOf.js} +1 -1
- package/cjs/chunks/{bundle-Cmmi9pdk.js.map → bundle-CCI24NOf.js.map} +1 -1
- package/cjs/chunks/{bundle-DxdzDF19.js → bundle-CFD0Fa-A.js} +2 -2
- package/cjs/chunks/bundle-CFD0Fa-A.js.map +1 -0
- package/cjs/chunks/{bundle-CIswYN43.js → bundle-CIwnFnv9.js} +3 -3
- package/cjs/chunks/bundle-CIwnFnv9.js.map +1 -0
- package/cjs/chunks/{bundle-cf3-zuo6.js → bundle-CKV7u9Pa.js} +1 -1
- package/cjs/chunks/bundle-CKV7u9Pa.js.map +1 -0
- package/cjs/chunks/{bundle-BsGXZt6G.js → bundle-CKVCRcX8.js} +3 -3
- package/cjs/chunks/bundle-CKVCRcX8.js.map +1 -0
- package/cjs/chunks/{bundle-B-dy_WYW.js → bundle-CRggj9kM.js} +8 -8
- package/cjs/chunks/{bundle-B-dy_WYW.js.map → bundle-CRggj9kM.js.map} +1 -1
- package/cjs/chunks/{bundle-DUP4cxoZ.js → bundle-CSlhgdb3.js} +1 -1
- package/cjs/chunks/bundle-CSlhgdb3.js.map +1 -0
- package/cjs/chunks/{bundle-JNAedgrE.js → bundle-CZ7evH27.js} +1 -1
- package/cjs/chunks/bundle-CZ7evH27.js.map +1 -0
- package/cjs/chunks/{bundle-Cyr1aQpR.js → bundle-CZwvHnpm.js} +1 -1
- package/cjs/chunks/bundle-CZwvHnpm.js.map +1 -0
- package/cjs/chunks/{bundle-CqF06THu.js → bundle-CbrvdaBm.js} +1 -1
- package/cjs/chunks/{bundle-CqF06THu.js.map → bundle-CbrvdaBm.js.map} +1 -1
- package/cjs/chunks/{bundle-BVuqbZx2.js → bundle-Cj7wXzYB.js} +13 -12
- package/cjs/chunks/{bundle-BVuqbZx2.js.map → bundle-Cj7wXzYB.js.map} +1 -1
- package/cjs/chunks/{bundle-D1duSVks.js → bundle-Cm8jkxa4.js} +14 -14
- package/cjs/chunks/{bundle-D1duSVks.js.map → bundle-Cm8jkxa4.js.map} +1 -1
- package/cjs/chunks/{bundle-C2v2lxLx.js → bundle-Cqim199-.js} +3 -3
- package/cjs/chunks/bundle-Cqim199-.js.map +1 -0
- package/cjs/chunks/{bundle-DREyIwSt.js → bundle-CsvF4G63.js} +10 -10
- package/cjs/chunks/{bundle-DREyIwSt.js.map → bundle-CsvF4G63.js.map} +1 -1
- package/cjs/chunks/{bundle-7GCXhi1c.js → bundle-CuCEO0gF.js} +3 -3
- package/cjs/chunks/bundle-CuCEO0gF.js.map +1 -0
- package/cjs/chunks/{bundle-CsvKRjaK.js → bundle-Cv9f4q9i.js} +1 -1
- package/cjs/chunks/bundle-Cv9f4q9i.js.map +1 -0
- package/cjs/chunks/{bundle-8oxVWV_9.js → bundle-Cxk9TBzk.js} +1 -1
- package/cjs/chunks/bundle-Cxk9TBzk.js.map +1 -0
- package/cjs/chunks/{bundle-e6crA6HI.js → bundle-D55IafBS.js} +1 -1
- package/cjs/chunks/bundle-D55IafBS.js.map +1 -0
- package/cjs/chunks/{bundle-xvNVoWia.js → bundle-DA-C0L_U.js} +6 -6
- package/cjs/chunks/bundle-DA-C0L_U.js.map +1 -0
- package/cjs/chunks/{bundle-Dpu1gg5r.js → bundle-DGw6pGp5.js} +1 -1
- package/cjs/chunks/bundle-DGw6pGp5.js.map +1 -0
- package/cjs/chunks/{bundle-tOZCSmZj.js → bundle-DMKeCwT_.js} +2 -2
- package/cjs/chunks/bundle-DMKeCwT_.js.map +1 -0
- package/cjs/chunks/{bundle-BMsGwLym.js → bundle-DMqilxSQ.js} +1 -1
- package/cjs/chunks/bundle-DMqilxSQ.js.map +1 -0
- package/cjs/chunks/{bundle-BUOuk2jo.js → bundle-DQT7OMs9.js} +2 -2
- package/cjs/chunks/bundle-DQT7OMs9.js.map +1 -0
- package/cjs/chunks/{bundle-DgY0qwTL.js → bundle-DRA4Fpff.js} +5 -5
- package/cjs/chunks/bundle-DRA4Fpff.js.map +1 -0
- package/cjs/chunks/{bundle-B1Nml3ap.js → bundle-DRrLQVHb.js} +45 -36
- package/{chunks/bundle-5okwu0-4.js.map → cjs/chunks/bundle-DRrLQVHb.js.map} +1 -1
- package/cjs/chunks/{bundle-B8jj7upa.js → bundle-D_m86gwb.js} +4 -4
- package/cjs/chunks/bundle-D_m86gwb.js.map +1 -0
- package/cjs/chunks/{bundle-9K7l85xj.js → bundle-DkUAiVSQ.js} +4 -4
- package/cjs/chunks/bundle-DkUAiVSQ.js.map +1 -0
- package/cjs/chunks/{bundle-NU2voiKZ.js → bundle-DmEJQudU.js} +6 -4
- package/cjs/chunks/bundle-DmEJQudU.js.map +1 -0
- package/cjs/chunks/{bundle-f6dhmXLj.js → bundle-DvYvJ4DA.js} +2 -2
- package/cjs/chunks/bundle-DvYvJ4DA.js.map +1 -0
- package/cjs/chunks/{bundle-dNtU9_eg.js → bundle-DwFtclQP.js} +6 -6
- package/cjs/chunks/bundle-DwFtclQP.js.map +1 -0
- package/cjs/chunks/{bundle-DAVdWPDx.js → bundle-GXGfsR0s.js} +10 -10
- package/cjs/chunks/bundle-GXGfsR0s.js.map +1 -0
- package/cjs/chunks/{bundle-DX2BaZv_.js → bundle-K9SAn_UP.js} +2 -2
- package/cjs/chunks/bundle-K9SAn_UP.js.map +1 -0
- package/cjs/chunks/{bundle-BgLtZgZ_.js → bundle-KIzH0CXn.js} +1 -1
- package/cjs/chunks/bundle-KIzH0CXn.js.map +1 -0
- package/cjs/chunks/{bundle-6eXm5bOG.js → bundle-QlySzqVl.js} +1 -1
- package/cjs/chunks/bundle-QlySzqVl.js.map +1 -0
- package/cjs/chunks/{bundle-BF04PgMH.js → bundle-U2gOXD87.js} +1 -1
- package/cjs/chunks/bundle-U2gOXD87.js.map +1 -0
- package/cjs/chunks/{bundle-DcPTVUQJ.js → bundle-U9tfceaP.js} +3 -3
- package/cjs/chunks/bundle-U9tfceaP.js.map +1 -0
- package/cjs/chunks/{bundle-03LrACV2.js → bundle-Vo5M_T27.js} +6 -6
- package/cjs/chunks/bundle-Vo5M_T27.js.map +1 -0
- package/cjs/chunks/{bundle-BlvFC-Rm.js → bundle-_3SK8xoH.js} +1 -1
- package/cjs/chunks/bundle-_3SK8xoH.js.map +1 -0
- package/cjs/chunks/{bundle-BwO19Jro.js → bundle-_ouF-COo.js} +3 -3
- package/cjs/chunks/bundle-_ouF-COo.js.map +1 -0
- package/cjs/chunks/{bundle-BVLguSfh.js → bundle-b2Ui6hpE.js} +4 -4
- package/cjs/chunks/{bundle-BVLguSfh.js.map → bundle-b2Ui6hpE.js.map} +1 -1
- package/cjs/chunks/{bundle-qgvbJv89.js → bundle-gBFimzbK.js} +2 -2
- package/cjs/chunks/bundle-gBFimzbK.js.map +1 -0
- package/cjs/chunks/{bundle-DfYperTC.js → bundle-gGCaMzPZ.js} +1 -1
- package/cjs/chunks/bundle-gGCaMzPZ.js.map +1 -0
- package/cjs/chunks/{bundle-BR1tsZpK.js → bundle-h_3DR6aU.js} +1 -1
- package/cjs/chunks/bundle-h_3DR6aU.js.map +1 -0
- package/cjs/chunks/{bundle-BR23SbdZ.js → bundle-kJy0a2Vi.js} +3 -3
- package/cjs/chunks/{bundle-BR23SbdZ.js.map → bundle-kJy0a2Vi.js.map} +1 -1
- package/cjs/chunks/{bundle-DTjdtS4A.js → bundle-kLARBimu.js} +30 -27
- package/cjs/chunks/bundle-kLARBimu.js.map +1 -0
- package/cjs/chunks/{bundle-C8cnT2au.js → bundle-lP7Zc4ok.js} +9 -9
- package/cjs/chunks/bundle-lP7Zc4ok.js.map +1 -0
- package/cjs/chunks/{bundle-djPmP6bl.js → bundle-oHlDXetd.js} +5 -5
- package/cjs/chunks/bundle-oHlDXetd.js.map +1 -0
- package/cjs/chunks/bundle-pFmJjfem.js +18 -0
- package/cjs/chunks/bundle-pFmJjfem.js.map +1 -0
- package/cjs/chunks/{bundle-BH87xcnc.js → bundle-tFZbRjso.js} +1 -1
- package/cjs/chunks/bundle-tFZbRjso.js.map +1 -0
- package/cjs/chunks/{bundle-ORLbcTP_.js → bundle-uzuKeMjI.js} +1 -1
- package/cjs/chunks/bundle-uzuKeMjI.js.map +1 -0
- package/cjs/chunks/{bundle-C9YHSQ4e.js → bundle-vjAaeYFb.js} +1 -1
- package/cjs/chunks/bundle-vjAaeYFb.js.map +1 -0
- package/cjs/chunks/{bundle-7FLBAmYO.js → bundle-wczCFG7x.js} +2 -2
- package/cjs/chunks/{bundle-7FLBAmYO.js.map → bundle-wczCFG7x.js.map} +1 -1
- package/cjs/hooks/useModal.js +9 -9
- package/cjs/index.js +82 -83
- 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 +28 -36
- package/cjs/ui/Accordion.js.map +1 -1
- package/cjs/ui/AccordionGroup.js +47 -11
- package/cjs/ui/AccordionGroup.js.map +1 -1
- package/cjs/ui/AdminMessage.js +3 -3
- package/cjs/ui/Avatar.js +4 -4
- package/cjs/ui/Badge.js +5 -5
- package/cjs/ui/BottomSheet.js +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 +29 -17
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FallbackTemplateMessageItemBody.tsx.js +7 -7
- package/cjs/ui/FileMessageItemBody.js +50 -12
- package/cjs/ui/FileMessageItemBody.js.map +1 -1
- package/cjs/ui/FileViewer.js +15 -15
- package/cjs/ui/Icon.js +2 -2
- package/cjs/ui/IconButton.js +1 -1
- package/cjs/ui/ImageRenderer.js +3 -3
- 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 +4 -4
- package/cjs/ui/MentionLabel.js +13 -13
- package/cjs/ui/MentionUserLabel.js +1 -1
- package/cjs/ui/MessageContent.js +155 -133
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageFeedbackFailedModal.js +35 -0
- package/cjs/ui/MessageFeedbackFailedModal.js.map +1 -0
- package/cjs/{Channel/components → ui}/MessageFeedbackModal.js +13 -13
- package/cjs/ui/MessageInput/hooks/usePaste.js +7 -7
- package/cjs/ui/MessageInput.js +15 -15
- package/cjs/ui/MessageItemMenu.js +67 -29
- package/cjs/ui/MessageItemMenu.js.map +1 -1
- 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 +2 -1
- package/cjs/ui/MessageTemplate.js.map +1 -1
- 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 +19 -17
- package/cjs/ui/OGMessageItemBody.js.map +1 -1
- 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 +12 -16
- package/cjs/ui/QuoteMessageInput.js.map +1 -1
- 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 +143 -72
- package/cjs/ui/TemplateMessageItemBody.js.map +1 -1
- 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 +17 -16
- package/cjs/ui/UserListItem.js.map +1 -1
- 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 +142 -155
- package/dist/index.css.map +1 -1
- package/hooks/useModal.js +10 -10
- package/index.js +82 -83
- package/index.js.map +1 -1
- package/package.json +20 -20
- package/pubSub/topics.js +1 -1
- package/sendbirdSelectors.js +2 -2
- package/types/lib/dux/appInfo/initialState.d.ts +1 -0
- package/types/lib/types.d.ts +1 -0
- package/types/modules/Channel/components/MessageList/index.d.ts +1 -1
- package/types/modules/ChannelSettings/components/ChannelSettingsUI/index.d.ts +2 -2
- package/types/modules/ChannelSettings/components/ModerationPanel/index.d.ts +1 -1
- package/types/modules/GroupChannel/components/FileViewer/FileViewerView.d.ts +5 -3
- package/types/modules/GroupChannel/components/Message/MessageView.d.ts +6 -0
- package/types/modules/GroupChannel/components/MessageList/index.d.ts +1 -1
- package/types/modules/GroupChannel/components/MessageTemplateWrapper/index.d.ts +1 -1
- package/types/modules/GroupChannel/context/GroupChannelProvider.d.ts +6 -1
- package/types/modules/OpenChannel/components/OpenChannelMessage/index.d.ts +2 -2
- package/types/modules/OpenChannel/components/OpenChannelMessageList/index.d.ts +5 -3
- package/types/modules/OpenChannel/components/OpenChannelUI/index.d.ts +4 -2
- package/types/modules/Thread/components/ParentMessageInfo/ParentMessageInfoItem.d.ts +3 -1
- package/types/modules/Thread/context/ThreadProvider.d.ts +2 -0
- package/types/types.d.ts +1 -2
- package/types/ui/Accordion/Accordion.d.ts +10 -0
- package/types/ui/Accordion/AccordionGroup.d.ts +15 -5
- package/types/ui/Accordion/index.d.ts +6 -12
- package/types/ui/Carousel/index.d.ts +2 -3
- package/types/ui/EmojiReactions/index.d.ts +1 -2
- package/types/ui/FileMessageItemBody/index.d.ts +3 -1
- package/types/ui/FileViewer/index.d.ts +2 -1
- package/types/ui/FileViewer/types.d.ts +4 -2
- package/types/ui/MessageContent/MessageBody/index.d.ts +5 -1
- package/types/ui/MessageContent/index.d.ts +3 -1
- package/types/{modules/Channel/components → ui}/MessageFeedbackModal/index.d.ts +1 -1
- package/types/ui/MessageItemMenu/index.d.ts +10 -2
- package/types/ui/MessageTemplate/index.d.ts +4 -3
- package/types/ui/MessageTemplate/messageTemplateErrorBoundary.d.ts +3 -0
- package/types/ui/MobileMenu/types.d.ts +2 -1
- package/types/ui/MultipleFilesMessageItemBody/index.d.ts +3 -1
- package/types/ui/TemplateMessageItemBody/index.d.ts +3 -2
- package/types/ui/TemplateMessageItemBody/types.d.ts +11 -12
- package/types/ui/UserListItem/index.d.ts +2 -1
- package/types/utils/getIsReactionEnabled.d.ts +5 -4
- package/types/utils/index.d.ts +12 -14
- package/types/utils/isVoiceMessage.d.ts +1 -1
- package/types/utils/utils.d.ts +1 -0
- package/ui/Accordion.js +28 -39
- package/ui/Accordion.js.map +1 -1
- package/ui/AccordionGroup.js +43 -12
- package/ui/AccordionGroup.js.map +1 -1
- 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 +29 -17
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FallbackTemplateMessageItemBody.tsx.js +7 -7
- package/ui/FileMessageItemBody.js +50 -12
- package/ui/FileMessageItemBody.js.map +1 -1
- package/ui/FileViewer.js +15 -15
- package/ui/Icon.js +2 -2
- package/ui/IconButton.js +1 -1
- package/ui/ImageRenderer.js +3 -3
- 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 +4 -4
- package/ui/MentionLabel.js +13 -13
- package/ui/MentionUserLabel.js +1 -1
- package/ui/MessageContent.js +155 -133
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageFeedbackFailedModal.js +33 -0
- package/ui/MessageFeedbackFailedModal.js.map +1 -0
- package/{Channel/components → ui}/MessageFeedbackModal.js +13 -13
- package/ui/MessageInput/hooks/usePaste.js +7 -7
- package/ui/MessageInput.js +15 -15
- package/ui/MessageItemMenu.js +67 -29
- package/ui/MessageItemMenu.js.map +1 -1
- 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 +2 -1
- package/ui/MessageTemplate.js.map +1 -1
- package/ui/MobileFeedbackMenu.js +9 -9
- package/ui/Modal.js +8 -8
- package/ui/MutedAvatarOverlay.js +2 -2
- package/ui/OGMessageItemBody.js +19 -17
- package/ui/OGMessageItemBody.js.map +1 -1
- 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 +12 -16
- package/ui/QuoteMessageInput.js.map +1 -1
- package/ui/ReactionBadge.js +3 -3
- package/ui/ReactionButton.js +4 -4
- package/ui/SortByRow.js +2 -2
- package/ui/TemplateMessageItemBody.js +143 -72
- package/ui/TemplateMessageItemBody.js.map +1 -1
- 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 +17 -16
- package/ui/UserListItem.js.map +1 -1
- 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-87W4GPnC.js.map +0 -1
- package/chunks/bundle-B1s46xJT.js.map +0 -1
- package/chunks/bundle-B2pNgmzq.js.map +0 -1
- package/chunks/bundle-B5kwbUC5.js +0 -11
- package/chunks/bundle-B5kwbUC5.js.map +0 -1
- package/chunks/bundle-BFDyBk4r.js.map +0 -1
- package/chunks/bundle-BH5rbsxO.js.map +0 -1
- package/chunks/bundle-BJ9OAqWz.js.map +0 -1
- package/chunks/bundle-BKG2cvZ9.js.map +0 -1
- package/chunks/bundle-BNeRxCQA.js.map +0 -1
- package/chunks/bundle-BNydv1KA.js.map +0 -1
- package/chunks/bundle-BPclYGwz.js.map +0 -1
- package/chunks/bundle-BSPBjwR6.js.map +0 -1
- package/chunks/bundle-BUy5u56K.js.map +0 -1
- package/chunks/bundle-Bf5VthYV.js.map +0 -1
- package/chunks/bundle-BhjXV0mk.js.map +0 -1
- package/chunks/bundle-BmPxXQ_C.js.map +0 -1
- package/chunks/bundle-BuIxT5aZ.js.map +0 -1
- package/chunks/bundle-BvQAepkJ.js.map +0 -1
- package/chunks/bundle-Bys5RwQj.js.map +0 -1
- package/chunks/bundle-C-_RpFyM.js.map +0 -1
- package/chunks/bundle-C1RngQCJ.js.map +0 -1
- package/chunks/bundle-C4sUzPGS.js.map +0 -1
- package/chunks/bundle-CF6PMu9B.js.map +0 -1
- package/chunks/bundle-CJIPD7gN.js.map +0 -1
- package/chunks/bundle-COGPgRK-.js.map +0 -1
- package/chunks/bundle-CPszRkFg.js.map +0 -1
- package/chunks/bundle-CS7t26su.js.map +0 -1
- package/chunks/bundle-C_n2Emjx.js.map +0 -1
- package/chunks/bundle-CbBN2HTx.js.map +0 -1
- package/chunks/bundle-CfKGkWtT.js.map +0 -1
- package/chunks/bundle-CwofYH9U.js +0 -10
- package/chunks/bundle-CwofYH9U.js.map +0 -1
- package/chunks/bundle-D-cpJ5MP.js.map +0 -1
- package/chunks/bundle-D56MXYqF.js.map +0 -1
- package/chunks/bundle-DCjOFMcr.js.map +0 -1
- package/chunks/bundle-DRL21d0s.js.map +0 -1
- package/chunks/bundle-DTDkmegk.js.map +0 -1
- package/chunks/bundle-DUTTSKO5.js.map +0 -1
- package/chunks/bundle-D_X2Bqh-.js.map +0 -1
- package/chunks/bundle-DcOT2xg0.js.map +0 -1
- package/chunks/bundle-DgJrJ2xn.js.map +0 -1
- package/chunks/bundle-Dicb9Y5f.js.map +0 -1
- package/chunks/bundle-DkRogqRS.js.map +0 -1
- package/chunks/bundle-DnFiUPoR.js.map +0 -1
- package/chunks/bundle-DoLed6JB.js.map +0 -1
- package/chunks/bundle-DrfdRrEf.js +0 -12
- package/chunks/bundle-DrfdRrEf.js.map +0 -1
- package/chunks/bundle-DzuAq6CR.js.map +0 -1
- package/chunks/bundle-GQqssfTX.js.map +0 -1
- package/chunks/bundle-N_XkA5JB.js.map +0 -1
- package/chunks/bundle-WwYLGAen.js.map +0 -1
- package/chunks/bundle-gSQF3Ob-.js.map +0 -1
- package/chunks/bundle-l_8hg8H3.js.map +0 -1
- package/chunks/bundle-rSEP1XoB.js.map +0 -1
- package/chunks/bundle-rfEyWmAm.js.map +0 -1
- package/chunks/bundle-ynxAt7xC.js.map +0 -1
- package/chunks/bundle-zf2ni0YJ.js.map +0 -1
- package/cjs/chunks/bundle--ToWZ9cj.js.map +0 -1
- package/cjs/chunks/bundle-03LrACV2.js.map +0 -1
- package/cjs/chunks/bundle-6eXm5bOG.js.map +0 -1
- package/cjs/chunks/bundle-7GCXhi1c.js.map +0 -1
- package/cjs/chunks/bundle-8oxVWV_9.js.map +0 -1
- package/cjs/chunks/bundle-9K7l85xj.js.map +0 -1
- package/cjs/chunks/bundle-B2cSnWcr.js.map +0 -1
- package/cjs/chunks/bundle-BF04PgMH.js.map +0 -1
- package/cjs/chunks/bundle-BH87xcnc.js.map +0 -1
- package/cjs/chunks/bundle-BLh1DOSs.js +0 -15
- package/cjs/chunks/bundle-BLh1DOSs.js.map +0 -1
- package/cjs/chunks/bundle-BMsGwLym.js.map +0 -1
- package/cjs/chunks/bundle-BR1tsZpK.js.map +0 -1
- package/cjs/chunks/bundle-BUOuk2jo.js.map +0 -1
- package/cjs/chunks/bundle-BdHrSYl1.js.map +0 -1
- package/cjs/chunks/bundle-BgLtZgZ_.js.map +0 -1
- package/cjs/chunks/bundle-BlvFC-Rm.js.map +0 -1
- package/cjs/chunks/bundle-Bm5ysFU-.js.map +0 -1
- package/cjs/chunks/bundle-BpOxHgfP.js.map +0 -1
- package/cjs/chunks/bundle-BsGXZt6G.js.map +0 -1
- package/cjs/chunks/bundle-BwO19Jro.js.map +0 -1
- package/cjs/chunks/bundle-BxaGZqGJ.js.map +0 -1
- package/cjs/chunks/bundle-C2v2lxLx.js.map +0 -1
- package/cjs/chunks/bundle-C88DsCNB.js.map +0 -1
- package/cjs/chunks/bundle-C8cnT2au.js.map +0 -1
- package/cjs/chunks/bundle-C9YHSQ4e.js.map +0 -1
- package/cjs/chunks/bundle-C9jXxNI1.js.map +0 -1
- package/cjs/chunks/bundle-CCVRe_w3.js +0 -13
- package/cjs/chunks/bundle-CCVRe_w3.js.map +0 -1
- package/cjs/chunks/bundle-CD9H6RqJ.js.map +0 -1
- package/cjs/chunks/bundle-CDBTt08y.js +0 -13
- package/cjs/chunks/bundle-CDBTt08y.js.map +0 -1
- package/cjs/chunks/bundle-CIswYN43.js.map +0 -1
- package/cjs/chunks/bundle-CS644BJp.js.map +0 -1
- package/cjs/chunks/bundle-CW9QUnWM.js.map +0 -1
- package/cjs/chunks/bundle-CmFB08Wf.js.map +0 -1
- package/cjs/chunks/bundle-CsvKRjaK.js.map +0 -1
- package/cjs/chunks/bundle-Cyr1aQpR.js.map +0 -1
- package/cjs/chunks/bundle-DAVdWPDx.js.map +0 -1
- package/cjs/chunks/bundle-DNP731Dg.js.map +0 -1
- package/cjs/chunks/bundle-DRFWOXrL.js.map +0 -1
- package/cjs/chunks/bundle-DTjdtS4A.js.map +0 -1
- package/cjs/chunks/bundle-DUP4cxoZ.js.map +0 -1
- package/cjs/chunks/bundle-DX2BaZv_.js.map +0 -1
- package/cjs/chunks/bundle-DcPTVUQJ.js.map +0 -1
- package/cjs/chunks/bundle-DfYperTC.js.map +0 -1
- package/cjs/chunks/bundle-DgY0qwTL.js.map +0 -1
- package/cjs/chunks/bundle-DjB9bkvD.js.map +0 -1
- package/cjs/chunks/bundle-Dpu1gg5r.js.map +0 -1
- package/cjs/chunks/bundle-DxdzDF19.js.map +0 -1
- package/cjs/chunks/bundle-Dy6Gn-sd.js.map +0 -1
- package/cjs/chunks/bundle-FD0n8tOs.js.map +0 -1
- package/cjs/chunks/bundle-INETVVGE.js.map +0 -1
- package/cjs/chunks/bundle-JNAedgrE.js.map +0 -1
- package/cjs/chunks/bundle-NU2voiKZ.js.map +0 -1
- package/cjs/chunks/bundle-ORLbcTP_.js.map +0 -1
- package/cjs/chunks/bundle-Q5_I3n-8.js.map +0 -1
- package/cjs/chunks/bundle-SIHqK2VF.js.map +0 -1
- package/cjs/chunks/bundle-Y_FLyDnc.js.map +0 -1
- package/cjs/chunks/bundle-cf3-zuo6.js.map +0 -1
- package/cjs/chunks/bundle-dNtU9_eg.js.map +0 -1
- package/cjs/chunks/bundle-djPmP6bl.js.map +0 -1
- package/cjs/chunks/bundle-e6crA6HI.js.map +0 -1
- package/cjs/chunks/bundle-f6dhmXLj.js.map +0 -1
- package/cjs/chunks/bundle-jdEKrUGh.js.map +0 -1
- package/cjs/chunks/bundle-qgvbJv89.js.map +0 -1
- package/cjs/chunks/bundle-tHnRbr7F.js.map +0 -1
- package/cjs/chunks/bundle-tOZCSmZj.js.map +0 -1
- package/cjs/chunks/bundle-xvNVoWia.js.map +0 -1
- package/cjs/ui/Carousel.js +0 -254
- package/cjs/ui/Carousel.js.map +0 -1
- package/ui/Carousel.js +0 -249
- package/ui/Carousel.js.map +0 -1
- /package/cjs/{Channel/components → ui}/MessageFeedbackModal.js.map +0 -0
- /package/types/{modules/Channel/components → ui}/MessageFeedbackFailedModal/index.d.ts +0 -0
- /package/{Channel/components → ui}/MessageFeedbackModal.js.map +0 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
require('./bundle-By-3k_MB.js');
|
|
4
5
|
|
|
5
|
-
var ComponentType;
|
|
6
|
+
var ComponentType$1;
|
|
6
7
|
(function (ComponentType) {
|
|
7
8
|
ComponentType["Box"] = "box";
|
|
8
9
|
ComponentType["Text"] = "text";
|
|
9
10
|
ComponentType["Image"] = "image";
|
|
10
11
|
ComponentType["TextButton"] = "textButton";
|
|
11
12
|
ComponentType["ImageButton"] = "imageButton";
|
|
12
|
-
})(ComponentType || (ComponentType = {}));
|
|
13
|
+
})(ComponentType$1 || (ComponentType$1 = {}));
|
|
14
|
+
exports.CompositeComponentType = void 0;
|
|
15
|
+
(function (CompositeComponentType) {
|
|
16
|
+
CompositeComponentType["Carousel"] = "carouselView";
|
|
17
|
+
})(exports.CompositeComponentType || (exports.CompositeComponentType = {}));
|
|
13
18
|
|
|
14
19
|
// -------- Set property mapper
|
|
15
20
|
const MAPPER = () => undefined;
|
|
@@ -22,25 +27,29 @@ const createParser = (params) => {
|
|
|
22
27
|
mapImageProps: (params === null || params === void 0 ? void 0 : params.mapImageProps) || defaultMapper,
|
|
23
28
|
mapTextButtonProps: (params === null || params === void 0 ? void 0 : params.mapTextButtonProps) || defaultMapper,
|
|
24
29
|
mapImageButtonProps: (params === null || params === void 0 ? void 0 : params.mapImageButtonProps) || defaultMapper,
|
|
30
|
+
mapCarouselProps: (params === null || params === void 0 ? void 0 : params.mapCarouselProps) || defaultMapper,
|
|
25
31
|
};
|
|
26
32
|
return {
|
|
27
33
|
parse(item, options) {
|
|
28
34
|
switch (item.type) {
|
|
29
|
-
case ComponentType.Box: {
|
|
35
|
+
case ComponentType$1.Box: {
|
|
30
36
|
return { properties: mapper.mapBoxProps(item, options) };
|
|
31
37
|
}
|
|
32
|
-
case ComponentType.Text: {
|
|
38
|
+
case ComponentType$1.Text: {
|
|
33
39
|
return { properties: mapper.mapTextProps(item, options) };
|
|
34
40
|
}
|
|
35
|
-
case ComponentType.Image: {
|
|
41
|
+
case ComponentType$1.Image: {
|
|
36
42
|
return { properties: mapper.mapImageProps(item, options) };
|
|
37
43
|
}
|
|
38
|
-
case ComponentType.TextButton: {
|
|
44
|
+
case ComponentType$1.TextButton: {
|
|
39
45
|
return { properties: mapper.mapTextButtonProps(item, options) };
|
|
40
46
|
}
|
|
41
|
-
case ComponentType.ImageButton: {
|
|
47
|
+
case ComponentType$1.ImageButton: {
|
|
42
48
|
return { properties: mapper.mapImageButtonProps(item, options) };
|
|
43
49
|
}
|
|
50
|
+
case exports.CompositeComponentType.Carousel: {
|
|
51
|
+
return { properties: mapper.mapCarouselProps(item, options) };
|
|
52
|
+
}
|
|
44
53
|
default:
|
|
45
54
|
return { properties: undefined };
|
|
46
55
|
}
|
|
@@ -50,16 +59,952 @@ const createParser = (params) => {
|
|
|
50
59
|
|
|
51
60
|
const FRAGMENT = ({ children }) => React.createElement(React.Fragment, null, children);
|
|
52
61
|
function createRenderer(params) {
|
|
53
|
-
var _a, _b, _c, _d, _e;
|
|
62
|
+
var _a, _b, _c, _d, _e, _f;
|
|
54
63
|
return {
|
|
55
64
|
box: ((_a = params === null || params === void 0 ? void 0 : params.views) === null || _a === void 0 ? void 0 : _a.box) || FRAGMENT,
|
|
56
65
|
text: ((_b = params === null || params === void 0 ? void 0 : params.views) === null || _b === void 0 ? void 0 : _b.text) || FRAGMENT,
|
|
57
66
|
image: ((_c = params === null || params === void 0 ? void 0 : params.views) === null || _c === void 0 ? void 0 : _c.image) || FRAGMENT,
|
|
58
67
|
imageButton: ((_d = params === null || params === void 0 ? void 0 : params.views) === null || _d === void 0 ? void 0 : _d.imageButton) || FRAGMENT,
|
|
59
68
|
textButton: ((_e = params === null || params === void 0 ? void 0 : params.views) === null || _e === void 0 ? void 0 : _e.textButton) || FRAGMENT,
|
|
69
|
+
carouselView: ((_f = params === null || params === void 0 ? void 0 : params.views) === null || _f === void 0 ? void 0 : _f.carouselView) || FRAGMENT,
|
|
60
70
|
};
|
|
61
71
|
}
|
|
62
72
|
|
|
73
|
+
var ComponentType;
|
|
74
|
+
(function (ComponentType) {
|
|
75
|
+
ComponentType["Box"] = "box";
|
|
76
|
+
ComponentType["Text"] = "text";
|
|
77
|
+
ComponentType["Image"] = "image";
|
|
78
|
+
ComponentType["TextButton"] = "textButton";
|
|
79
|
+
ComponentType["ImageButton"] = "imageButton";
|
|
80
|
+
})(ComponentType || (ComponentType = {}));
|
|
81
|
+
var CompositeComponentType;
|
|
82
|
+
(function (CompositeComponentType) {
|
|
83
|
+
CompositeComponentType["Carousel"] = "carouselView";
|
|
84
|
+
})(CompositeComponentType || (CompositeComponentType = {}));
|
|
85
|
+
|
|
86
|
+
React.createContext({
|
|
87
|
+
sizes: {},
|
|
88
|
+
updateSize: function () { },
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var Layout$1;
|
|
92
|
+
(function (Layout) {
|
|
93
|
+
Layout["Row"] = "row";
|
|
94
|
+
Layout["Column"] = "column";
|
|
95
|
+
})(Layout$1 || (Layout$1 = {}));
|
|
96
|
+
var AlignValue$1;
|
|
97
|
+
(function (AlignValue) {
|
|
98
|
+
AlignValue["Center"] = "center";
|
|
99
|
+
AlignValue["Left"] = "left";
|
|
100
|
+
AlignValue["Right"] = "right";
|
|
101
|
+
AlignValue["Top"] = "top";
|
|
102
|
+
AlignValue["Bottom"] = "bottom";
|
|
103
|
+
})(AlignValue$1 || (AlignValue$1 = {}));
|
|
104
|
+
/**
|
|
105
|
+
* @description
|
|
106
|
+
* Caution: Numbers are passed as string types in the message template builder.
|
|
107
|
+
* Use `==` comparison instead of `===` comparison when using a regular enum instead of a string enum.
|
|
108
|
+
*/
|
|
109
|
+
var FlexSizeSpecValue$1;
|
|
110
|
+
(function (FlexSizeSpecValue) {
|
|
111
|
+
FlexSizeSpecValue[FlexSizeSpecValue["FillParent"] = 0] = "FillParent";
|
|
112
|
+
FlexSizeSpecValue[FlexSizeSpecValue["WrapContent"] = 1] = "WrapContent";
|
|
113
|
+
})(FlexSizeSpecValue$1 || (FlexSizeSpecValue$1 = {}));
|
|
114
|
+
var FontWeight$1;
|
|
115
|
+
(function (FontWeight) {
|
|
116
|
+
FontWeight["Normal"] = "normal";
|
|
117
|
+
FontWeight["Bold"] = "bold";
|
|
118
|
+
})(FontWeight$1 || (FontWeight$1 = {}));
|
|
119
|
+
var MediaContentMode$1;
|
|
120
|
+
(function (MediaContentMode) {
|
|
121
|
+
MediaContentMode["AspectFit"] = "aspectFit";
|
|
122
|
+
MediaContentMode["AspectFill"] = "aspectFill";
|
|
123
|
+
MediaContentMode["ScalesToFill"] = "scalesToFill";
|
|
124
|
+
})(MediaContentMode$1 || (MediaContentMode$1 = {}));
|
|
125
|
+
|
|
126
|
+
({
|
|
127
|
+
rootLayout: Layout$1.Column,
|
|
128
|
+
view: {
|
|
129
|
+
size: {
|
|
130
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
131
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.WrapContent },
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
box: {
|
|
135
|
+
layout: Layout$1.Row,
|
|
136
|
+
align: { vertical: AlignValue$1.Top, horizontal: AlignValue$1.Left },
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
var ActionType$1;
|
|
141
|
+
(function (ActionType) {
|
|
142
|
+
ActionType["Web"] = "web";
|
|
143
|
+
ActionType["Custom"] = "custom";
|
|
144
|
+
ActionType["UIKit"] = "uikit";
|
|
145
|
+
})(ActionType$1 || (ActionType$1 = {}));
|
|
146
|
+
|
|
147
|
+
var SUPPORTED_TEMPLATE_VERSIONS = [
|
|
148
|
+
1,
|
|
149
|
+
2, // Composite templates: Carousel
|
|
150
|
+
];
|
|
151
|
+
var isTemplateVersionSupported = function (templateVersion) {
|
|
152
|
+
if (!templateVersion)
|
|
153
|
+
return true;
|
|
154
|
+
return SUPPORTED_TEMPLATE_VERSIONS.includes(templateVersion);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
({
|
|
158
|
+
version: 1,
|
|
159
|
+
body: {
|
|
160
|
+
items: [
|
|
161
|
+
{
|
|
162
|
+
type: ComponentType.Image,
|
|
163
|
+
action: { type: ActionType$1.Web, data: 'https://docs.sendbird.com' },
|
|
164
|
+
height: { type: 'fixed', value: 236 },
|
|
165
|
+
viewStyle: {
|
|
166
|
+
padding: {
|
|
167
|
+
left: 4,
|
|
168
|
+
right: 4,
|
|
169
|
+
top: 4,
|
|
170
|
+
bottom: 4,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
174
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFill },
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: ComponentType.Box,
|
|
178
|
+
layout: Layout$1.Column,
|
|
179
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
180
|
+
height: { type: 'fixed', value: 200 },
|
|
181
|
+
items: [
|
|
182
|
+
{
|
|
183
|
+
type: ComponentType.Box,
|
|
184
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
185
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
186
|
+
viewStyle: { backgroundColor: '#fa6464' },
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
type: ComponentType.Box,
|
|
190
|
+
layout: Layout$1.Column,
|
|
191
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
192
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.WrapContent },
|
|
193
|
+
viewStyle: { backgroundColor: '#ffaf5c' },
|
|
194
|
+
items: [
|
|
195
|
+
{
|
|
196
|
+
type: ComponentType.Text,
|
|
197
|
+
text: 'Message',
|
|
198
|
+
align: { horizontal: AlignValue$1.Center, vertical: AlignValue$1.Center },
|
|
199
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
200
|
+
height: { type: 'fixed', value: 50 },
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: ComponentType.Image,
|
|
204
|
+
action: { type: ActionType$1.Web, data: 'https://docs.sendbird.com' },
|
|
205
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
206
|
+
height: { type: 'fixed', value: 50 },
|
|
207
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
208
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFill },
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: ComponentType.Box,
|
|
214
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
215
|
+
height: { type: 'fixed', value: 20 },
|
|
216
|
+
viewStyle: { backgroundColor: '#ffe450' },
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: ComponentType.Box,
|
|
220
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
221
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
222
|
+
viewStyle: { backgroundColor: '#329a1b' },
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
type: ComponentType.Box,
|
|
228
|
+
viewStyle: { padding: { top: 12, bottom: 12, left: 12, right: 12 } },
|
|
229
|
+
layout: Layout$1.Column,
|
|
230
|
+
items: [
|
|
231
|
+
{
|
|
232
|
+
type: ComponentType.Box,
|
|
233
|
+
align: { horizontal: AlignValue$1.Left, vertical: AlignValue$1.Center },
|
|
234
|
+
layout: Layout$1.Row,
|
|
235
|
+
viewStyle: {
|
|
236
|
+
borderWidth: 1,
|
|
237
|
+
borderColor: '#72723f',
|
|
238
|
+
},
|
|
239
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
240
|
+
height: { type: 'fixed', value: 150 },
|
|
241
|
+
items: [
|
|
242
|
+
{
|
|
243
|
+
type: ComponentType.Text,
|
|
244
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
245
|
+
height: { type: 'fixed', value: 50 },
|
|
246
|
+
text: 'Sample1 text',
|
|
247
|
+
maxTextLines: 1,
|
|
248
|
+
align: { vertical: AlignValue$1.Center, horizontal: AlignValue$1.Left },
|
|
249
|
+
viewStyle: {
|
|
250
|
+
backgroundColor: '#cc4400',
|
|
251
|
+
},
|
|
252
|
+
textStyle: {
|
|
253
|
+
size: 16,
|
|
254
|
+
color: '#f8f8f8',
|
|
255
|
+
weight: FontWeight$1.Bold,
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: ComponentType.ImageButton,
|
|
260
|
+
action: { type: ActionType$1.UIKit, data: 'uikit://delete' },
|
|
261
|
+
width: { type: 'fixed', value: 20 },
|
|
262
|
+
height: { type: 'fixed', value: 20 },
|
|
263
|
+
imageUrl: 'https://file-ap-1.sendbird.com/5b5379aa73fd460da22ffaf9a61d0d7f.png',
|
|
264
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFit },
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
type: ComponentType.Text,
|
|
270
|
+
viewStyle: { padding: { top: 6, bottom: 12, left: 0, right: 0 } },
|
|
271
|
+
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.',
|
|
272
|
+
maxTextLines: 2,
|
|
273
|
+
textStyle: { size: 14, color: '#e10000' },
|
|
274
|
+
width: { type: 'fixed', value: 200 },
|
|
275
|
+
height: { type: 'fixed', value: 50 },
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
type: ComponentType.TextButton,
|
|
279
|
+
action: { type: ActionType$1.Web, data: 'https://www.daum.net' },
|
|
280
|
+
text: 'Button 3',
|
|
281
|
+
textStyle: { size: 14, color: '#742ddd', weight: FontWeight$1.Bold },
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
});
|
|
288
|
+
({
|
|
289
|
+
'version': 1,
|
|
290
|
+
'body': {
|
|
291
|
+
'items': [
|
|
292
|
+
{
|
|
293
|
+
'type': ComponentType.Image,
|
|
294
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.naver.com/' },
|
|
295
|
+
'height': { 'type': 'fixed', 'value': 136 },
|
|
296
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
297
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
'type': ComponentType.Box,
|
|
301
|
+
'viewStyle': { 'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 }, backgroundColor: '#cccccc' },
|
|
302
|
+
'layout': Layout$1.Column,
|
|
303
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
304
|
+
'items': [
|
|
305
|
+
{
|
|
306
|
+
'type': ComponentType.Box,
|
|
307
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
308
|
+
'layout': Layout$1.Row,
|
|
309
|
+
'items': [
|
|
310
|
+
{
|
|
311
|
+
'type': ComponentType.TextButton,
|
|
312
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
313
|
+
width: { type: 'fixed', value: 150 },
|
|
314
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 } },
|
|
315
|
+
'text': 'Button 2',
|
|
316
|
+
'textStyle': { 'size': 14, 'weight': FontWeight$1.Bold },
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
'type': ComponentType.TextButton,
|
|
320
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
321
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
322
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 } },
|
|
323
|
+
'text': 'Button 3',
|
|
324
|
+
'textStyle': { 'size': 14, 'weight': FontWeight$1.Bold },
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
'type': ComponentType.Box,
|
|
330
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
331
|
+
'layout': Layout$1.Row,
|
|
332
|
+
'items': [
|
|
333
|
+
{
|
|
334
|
+
'type': ComponentType.Text,
|
|
335
|
+
'text': 'Sample2 text',
|
|
336
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
337
|
+
'maxTextLines': 1,
|
|
338
|
+
'textStyle': { 'size': 16, 'weight': FontWeight$1.Bold },
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
'type': ComponentType.ImageButton,
|
|
342
|
+
'action': { 'type': ActionType$1.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$1.AspectFit },
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
'type': ComponentType.Text,
|
|
352
|
+
'viewStyle': { 'padding': { 'top': 6, 'bottom': 12, 'left': 0, 'right': 0 } },
|
|
353
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
354
|
+
'textStyle': { 'size': 14 },
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
({
|
|
362
|
+
'version': 1,
|
|
363
|
+
'body': {
|
|
364
|
+
'items': [
|
|
365
|
+
{
|
|
366
|
+
'type': ComponentType.Box,
|
|
367
|
+
'viewStyle': { 'backgroundColor': '#ffffff', 'borderWidth': 1, 'borderColor': '#eeeeee', 'radius': 16 },
|
|
368
|
+
'layout': Layout$1.Column,
|
|
369
|
+
'items': [
|
|
370
|
+
{
|
|
371
|
+
'type': ComponentType.Image,
|
|
372
|
+
'height': { 'type': 'fixed', 'value': 200 },
|
|
373
|
+
'imageUrl': 'https://img.freepik.com/free-vector/cartoon-happy-hours-background_52683-81243.jpg?w=2000&t=st=1666689198~exp=1666689798~hmac=23109d44ba03deee7aee069cbeebfcb48fa27f85e53c1cafc5d5d7345f1a2041',
|
|
374
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
'type': ComponentType.Box,
|
|
378
|
+
'viewStyle': { 'padding': { 'top': 15, 'bottom': 15, 'left': 15, 'right': 15 } },
|
|
379
|
+
'layout': Layout$1.Column,
|
|
380
|
+
'items': [
|
|
381
|
+
{
|
|
382
|
+
'type': ComponentType.Text,
|
|
383
|
+
'text': "Don't miss these deals today",
|
|
384
|
+
'maxTextLines': 1,
|
|
385
|
+
'textStyle': { 'size': 20, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
'type': ComponentType.Text,
|
|
389
|
+
'viewStyle': { 'margin': { 'top': 5, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
390
|
+
'text': 'Pay with Maya and get cashback!',
|
|
391
|
+
'maxTextLines': 1,
|
|
392
|
+
'textStyle': { 'size': 14, 'color': '#e10000' },
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
'type': ComponentType.Box,
|
|
396
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
397
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
398
|
+
'layout': Layout$1.Row,
|
|
399
|
+
'items': [
|
|
400
|
+
{
|
|
401
|
+
'type': ComponentType.Image,
|
|
402
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
403
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
404
|
+
'viewStyle': {
|
|
405
|
+
'backgroundColor': '#ffffff',
|
|
406
|
+
'borderWidth': 1,
|
|
407
|
+
'borderColor': '#eeeeee',
|
|
408
|
+
'radius': 25,
|
|
409
|
+
},
|
|
410
|
+
'imageUrl': 'https://yt3.ggpht.com/ytc/AMLnZu8Kg89ymE7qt5bsS9vMqi9h2aHiN6m9ID-IgxR6-Q=s900-c-k-c0x00ffffff-no-rj',
|
|
411
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
'type': ComponentType.Box,
|
|
415
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
416
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
417
|
+
'layout': Layout$1.Column,
|
|
418
|
+
'items': [
|
|
419
|
+
{
|
|
420
|
+
'type': ComponentType.Text,
|
|
421
|
+
'text': 'Meralco',
|
|
422
|
+
'maxTextLines': 1,
|
|
423
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
'type': ComponentType.Text,
|
|
427
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
428
|
+
'text': '30% cashback, P300 min spend',
|
|
429
|
+
'maxTextLines': 1,
|
|
430
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
'type': ComponentType.Box,
|
|
438
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
439
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
440
|
+
'layout': Layout$1.Row,
|
|
441
|
+
'items': [
|
|
442
|
+
{
|
|
443
|
+
'type': ComponentType.Image,
|
|
444
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
445
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
446
|
+
'viewStyle': {
|
|
447
|
+
'backgroundColor': '#ffffff',
|
|
448
|
+
'borderWidth': 1,
|
|
449
|
+
'borderColor': '#eeeeee',
|
|
450
|
+
'radius': 25,
|
|
451
|
+
},
|
|
452
|
+
'imageUrl': 'https://1000logos.net/wp-content/uploads/2021/12/Globe-Telecom-logo.png',
|
|
453
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill, tintColor: '#a49a9a' },
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
'type': ComponentType.Box,
|
|
457
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
458
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
459
|
+
'layout': Layout$1.Column,
|
|
460
|
+
'items': [
|
|
461
|
+
{
|
|
462
|
+
'type': ComponentType.Text,
|
|
463
|
+
'text': 'Globe',
|
|
464
|
+
'maxTextLines': 1,
|
|
465
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
'type': ComponentType.Text,
|
|
469
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
470
|
+
'text': '30% cashback, P300 min spend',
|
|
471
|
+
'maxTextLines': 1,
|
|
472
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
'type': ComponentType.Box,
|
|
480
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
481
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
482
|
+
'layout': Layout$1.Row,
|
|
483
|
+
'items': [
|
|
484
|
+
{
|
|
485
|
+
'type': ComponentType.Image,
|
|
486
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
487
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
488
|
+
'viewStyle': {
|
|
489
|
+
'backgroundColor': '#ffffff',
|
|
490
|
+
'borderWidth': 1,
|
|
491
|
+
'borderColor': '#eeeeee',
|
|
492
|
+
'radius': 25,
|
|
493
|
+
},
|
|
494
|
+
'imageUrl': 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Cignal.svg/640px-Cignal.svg.png',
|
|
495
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
'type': ComponentType.Box,
|
|
499
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
500
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
501
|
+
'layout': Layout$1.Column,
|
|
502
|
+
'items': [
|
|
503
|
+
{
|
|
504
|
+
'type': ComponentType.Text,
|
|
505
|
+
'text': 'Cignal',
|
|
506
|
+
'maxTextLines': 1,
|
|
507
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
'type': ComponentType.Text,
|
|
511
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
512
|
+
'text': '30% cashback, P300 min spend',
|
|
513
|
+
'maxTextLines': 1,
|
|
514
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
'type': ComponentType.Box,
|
|
522
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
523
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
524
|
+
'layout': Layout$1.Row,
|
|
525
|
+
'items': [
|
|
526
|
+
{
|
|
527
|
+
'type': ComponentType.TextButton,
|
|
528
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
529
|
+
'viewStyle': {
|
|
530
|
+
'backgroundColor': '#e0e0e0',
|
|
531
|
+
'radius': 16,
|
|
532
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 },
|
|
533
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
534
|
+
},
|
|
535
|
+
'text': 'Learn more',
|
|
536
|
+
'textStyle': { 'size': 15, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
'type': ComponentType.TextButton,
|
|
540
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
541
|
+
'viewStyle': {
|
|
542
|
+
'backgroundColor': '#e10000',
|
|
543
|
+
'radius': 16,
|
|
544
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 },
|
|
545
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
546
|
+
},
|
|
547
|
+
'text': 'Pay now',
|
|
548
|
+
'textStyle': { 'size': 15, 'color': '#ffffff', 'weight': FontWeight$1.Bold },
|
|
549
|
+
},
|
|
550
|
+
],
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
},
|
|
554
|
+
],
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
},
|
|
558
|
+
});
|
|
559
|
+
({
|
|
560
|
+
'version': 1,
|
|
561
|
+
'body': {
|
|
562
|
+
'items': [
|
|
563
|
+
{
|
|
564
|
+
'type': ComponentType.Box,
|
|
565
|
+
'layout': Layout$1.Column,
|
|
566
|
+
'items': [
|
|
567
|
+
{
|
|
568
|
+
'type': ComponentType.Image,
|
|
569
|
+
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
|
|
570
|
+
'metaData': {
|
|
571
|
+
'pixelWidth': 512,
|
|
572
|
+
'pixelHeight': 512,
|
|
573
|
+
},
|
|
574
|
+
'imageStyle': {
|
|
575
|
+
'tintColor': '#44ff1188',
|
|
576
|
+
},
|
|
577
|
+
viewStyle: {
|
|
578
|
+
'padding': {
|
|
579
|
+
'top': 12,
|
|
580
|
+
'right': 12,
|
|
581
|
+
'bottom': 12,
|
|
582
|
+
'left': 12,
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
'type': ComponentType.Box,
|
|
588
|
+
'viewStyle': {
|
|
589
|
+
'padding': {
|
|
590
|
+
'top': 12,
|
|
591
|
+
'right': 12,
|
|
592
|
+
'bottom': 12,
|
|
593
|
+
'left': 12,
|
|
594
|
+
},
|
|
595
|
+
},
|
|
596
|
+
'layout': Layout$1.Column,
|
|
597
|
+
'items': [
|
|
598
|
+
{
|
|
599
|
+
'type': ComponentType.Box,
|
|
600
|
+
'layout': Layout$1.Row,
|
|
601
|
+
'items': [
|
|
602
|
+
{
|
|
603
|
+
'type': ComponentType.Box,
|
|
604
|
+
'layout': Layout$1.Column,
|
|
605
|
+
'items': [
|
|
606
|
+
{
|
|
607
|
+
'type': ComponentType.Text,
|
|
608
|
+
'text': 'hi',
|
|
609
|
+
'maxTextLines': 3,
|
|
610
|
+
'viewStyle': {
|
|
611
|
+
'padding': {
|
|
612
|
+
'top': 0,
|
|
613
|
+
'bottom': 6,
|
|
614
|
+
'left': 0,
|
|
615
|
+
'right': 0,
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
'textStyle': {
|
|
619
|
+
'size': 16,
|
|
620
|
+
'weight': FontWeight$1.Bold,
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
'type': ComponentType.Text,
|
|
625
|
+
'text': 'bye',
|
|
626
|
+
'maxTextLines': 10,
|
|
627
|
+
'textStyle': {
|
|
628
|
+
'size': 14,
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
],
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
'type': ComponentType.ImageButton,
|
|
635
|
+
'action': {
|
|
636
|
+
'type': ActionType$1.UIKit,
|
|
637
|
+
'data': 'sendbirduikit://delete',
|
|
638
|
+
},
|
|
639
|
+
'width': {
|
|
640
|
+
'type': 'fixed',
|
|
641
|
+
'value': 20,
|
|
642
|
+
},
|
|
643
|
+
'height': {
|
|
644
|
+
'type': 'fixed',
|
|
645
|
+
'value': 20,
|
|
646
|
+
},
|
|
647
|
+
'metaData': {
|
|
648
|
+
'pixelWidth': 60,
|
|
649
|
+
'pixelHeight': 60,
|
|
650
|
+
},
|
|
651
|
+
'imageUrl': 'https://dxstmhyqfqr1o.cloudfront.net/sendbird-message-builder/icon-more.png',
|
|
652
|
+
'imageStyle': {
|
|
653
|
+
'tintColor': '#ff8d5a',
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
'type': ComponentType.Box,
|
|
660
|
+
'layout': Layout$1.Column,
|
|
661
|
+
'items': [
|
|
662
|
+
{
|
|
663
|
+
'type': ComponentType.Box,
|
|
664
|
+
'viewStyle': {
|
|
665
|
+
'margin': {
|
|
666
|
+
'top': 16,
|
|
667
|
+
'bottom': 0,
|
|
668
|
+
'left': 0,
|
|
669
|
+
'right': 0,
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
'align': {
|
|
673
|
+
'horizontal': AlignValue$1.Left,
|
|
674
|
+
'vertical': AlignValue$1.Center,
|
|
675
|
+
},
|
|
676
|
+
'layout': Layout$1.Row,
|
|
677
|
+
'items': [
|
|
678
|
+
{
|
|
679
|
+
'type': ComponentType.Image,
|
|
680
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
|
|
681
|
+
'width': {
|
|
682
|
+
'type': 'fixed',
|
|
683
|
+
'value': 40,
|
|
684
|
+
},
|
|
685
|
+
'height': {
|
|
686
|
+
'type': 'fixed',
|
|
687
|
+
'value': 40,
|
|
688
|
+
},
|
|
689
|
+
'metaData': {
|
|
690
|
+
'pixelWidth': 512,
|
|
691
|
+
'pixelHeight': 512,
|
|
692
|
+
},
|
|
693
|
+
'viewStyle': {
|
|
694
|
+
'backgroundColor': '#BDBDBD',
|
|
695
|
+
'radius': 20,
|
|
696
|
+
},
|
|
697
|
+
'imageStyle': {
|
|
698
|
+
'contentMode': MediaContentMode$1.AspectFill,
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
'type': ComponentType.Box,
|
|
703
|
+
'viewStyle': {
|
|
704
|
+
'margin': {
|
|
705
|
+
'top': 0,
|
|
706
|
+
'bottom': 0,
|
|
707
|
+
'left': 12,
|
|
708
|
+
'right': 0,
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
'layout': Layout$1.Column,
|
|
712
|
+
'items': [
|
|
713
|
+
{
|
|
714
|
+
'type': ComponentType.Text,
|
|
715
|
+
'text': 'Chongbu',
|
|
716
|
+
'maxTextLines': 1,
|
|
717
|
+
'textStyle': {
|
|
718
|
+
'size': 16,
|
|
719
|
+
'weight': FontWeight$1.Bold,
|
|
720
|
+
},
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
'type': ComponentType.Text,
|
|
724
|
+
'viewStyle': {
|
|
725
|
+
'margin': {
|
|
726
|
+
'top': 4,
|
|
727
|
+
'bottom': 0,
|
|
728
|
+
'left': 0,
|
|
729
|
+
'right': 0,
|
|
730
|
+
},
|
|
731
|
+
},
|
|
732
|
+
'text': ' ',
|
|
733
|
+
'maxTextLines': 1,
|
|
734
|
+
'textStyle': {
|
|
735
|
+
'size': 14,
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
],
|
|
739
|
+
},
|
|
740
|
+
],
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
'type': ComponentType.Box,
|
|
744
|
+
'viewStyle': {
|
|
745
|
+
'margin': {
|
|
746
|
+
'top': 16,
|
|
747
|
+
'bottom': 0,
|
|
748
|
+
'left': 0,
|
|
749
|
+
'right': 0,
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
'align': {
|
|
753
|
+
'horizontal': AlignValue$1.Left,
|
|
754
|
+
'vertical': AlignValue$1.Center,
|
|
755
|
+
},
|
|
756
|
+
'layout': Layout$1.Row,
|
|
757
|
+
'items': [
|
|
758
|
+
{
|
|
759
|
+
'type': ComponentType.Image,
|
|
760
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
|
|
761
|
+
'width': {
|
|
762
|
+
'type': 'fixed',
|
|
763
|
+
'value': 40,
|
|
764
|
+
},
|
|
765
|
+
'height': {
|
|
766
|
+
'type': 'fixed',
|
|
767
|
+
'value': 40,
|
|
768
|
+
},
|
|
769
|
+
'metaData': {
|
|
770
|
+
'pixelWidth': 512,
|
|
771
|
+
'pixelHeight': 512,
|
|
772
|
+
},
|
|
773
|
+
'viewStyle': {
|
|
774
|
+
'backgroundColor': '#BDBDBD',
|
|
775
|
+
'radius': 20,
|
|
776
|
+
},
|
|
777
|
+
'imageStyle': {
|
|
778
|
+
'contentMode': MediaContentMode$1.AspectFill,
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
'type': ComponentType.Box,
|
|
783
|
+
'viewStyle': {
|
|
784
|
+
'margin': {
|
|
785
|
+
'top': 0,
|
|
786
|
+
'bottom': 0,
|
|
787
|
+
'left': 12,
|
|
788
|
+
'right': 0,
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
'layout': Layout$1.Column,
|
|
792
|
+
'items': [
|
|
793
|
+
{
|
|
794
|
+
'type': ComponentType.Text,
|
|
795
|
+
'text': 'Amanda',
|
|
796
|
+
'maxTextLines': 1,
|
|
797
|
+
'textStyle': {
|
|
798
|
+
'size': 16,
|
|
799
|
+
'weight': FontWeight$1.Bold,
|
|
800
|
+
},
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
'type': ComponentType.Text,
|
|
804
|
+
'viewStyle': {
|
|
805
|
+
'margin': {
|
|
806
|
+
'top': 4,
|
|
807
|
+
'bottom': 0,
|
|
808
|
+
'left': 0,
|
|
809
|
+
'right': 0,
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
'text': 'This is title message',
|
|
813
|
+
'maxTextLines': 1,
|
|
814
|
+
'textStyle': {
|
|
815
|
+
'size': 14,
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
],
|
|
819
|
+
},
|
|
820
|
+
],
|
|
821
|
+
},
|
|
822
|
+
],
|
|
823
|
+
},
|
|
824
|
+
],
|
|
825
|
+
},
|
|
826
|
+
],
|
|
827
|
+
},
|
|
828
|
+
],
|
|
829
|
+
},
|
|
830
|
+
});
|
|
831
|
+
({
|
|
832
|
+
'version': '1',
|
|
833
|
+
'body': {
|
|
834
|
+
'items': [
|
|
835
|
+
{
|
|
836
|
+
'type': 'box',
|
|
837
|
+
'layout': 'column',
|
|
838
|
+
height: { type: 'fixed', value: 600 },
|
|
839
|
+
'items': [
|
|
840
|
+
{
|
|
841
|
+
'type': 'box',
|
|
842
|
+
'layout': 'column',
|
|
843
|
+
'viewStyle': { 'radius': '8', 'padding': { 'top': '12', 'bottom': '12', 'left': '12', 'right': '12' } },
|
|
844
|
+
'items': [
|
|
845
|
+
{
|
|
846
|
+
'type': 'text',
|
|
847
|
+
'text': 'Title text',
|
|
848
|
+
'textStyle': { 'color': '#E0000000', 'size': '16', 'weight': 'bold' },
|
|
849
|
+
'maxTextLines': '5',
|
|
850
|
+
'viewStyle': {},
|
|
851
|
+
'action': { 'data': 'www.naver.com' },
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
'type': 'text',
|
|
855
|
+
'viewStyle': { 'margin': { 'top': '8', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
856
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
857
|
+
'textStyle': { 'color': '#E0000000', 'size': '14', 'weight': 'normal' },
|
|
858
|
+
'maxTextLines': '5',
|
|
859
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
'type': 'box',
|
|
863
|
+
'layout': 'row',
|
|
864
|
+
'viewStyle': { 'margin': { 'top': '12', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
865
|
+
'items': [
|
|
866
|
+
{
|
|
867
|
+
'type': 'textButton',
|
|
868
|
+
'viewStyle': {
|
|
869
|
+
'backgroundColor': '#E0E0E0',
|
|
870
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
871
|
+
},
|
|
872
|
+
'text': 'Button 1',
|
|
873
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
874
|
+
'maxTextLines': '5',
|
|
875
|
+
'action': { 'data': 'www.naver.com' },
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
'type': 'textButton',
|
|
879
|
+
'viewStyle': {
|
|
880
|
+
'backgroundColor': '#E0E0E0',
|
|
881
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
882
|
+
'margin': { 'left': '8', 'right': '0', 'top': '0', 'bottom': '0' },
|
|
883
|
+
},
|
|
884
|
+
'text': 'Button 2',
|
|
885
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
886
|
+
'maxTextLines': '5',
|
|
887
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
888
|
+
},
|
|
889
|
+
],
|
|
890
|
+
},
|
|
891
|
+
],
|
|
892
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
'type': 'image',
|
|
896
|
+
'viewStyle': {},
|
|
897
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
898
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
899
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
900
|
+
'imageUrl': 'https://file-preprod.sendbird.com/d03c08bb3f9041a88c1207b6bbf15ab8.png',
|
|
901
|
+
'metaData': { 'pixelWidth': '1062', 'pixelHeight': '1070' },
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
'type': 'textButton',
|
|
905
|
+
'viewStyle': {
|
|
906
|
+
'backgroundColor': '#E0E0E0',
|
|
907
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
908
|
+
},
|
|
909
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
910
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
911
|
+
'text': 'Button',
|
|
912
|
+
'textStyle': { 'color': '#742DDD', 'size': '16', 'weight': 'normal' },
|
|
913
|
+
'maxTextLines': '5',
|
|
914
|
+
'action': { 'data': 'www.naver.com' },
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
'type': 'imageButton',
|
|
918
|
+
'viewStyle': {},
|
|
919
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
920
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
921
|
+
'imageUrl': 'https://file-preprod.sendbird.com/38fdf5c1056f42b89a44b38155cc4b49.jpg',
|
|
922
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
923
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
924
|
+
'action': { 'data': 'www.naver.com' },
|
|
925
|
+
},
|
|
926
|
+
],
|
|
927
|
+
'viewStyle': {},
|
|
928
|
+
},
|
|
929
|
+
],
|
|
930
|
+
},
|
|
931
|
+
});
|
|
932
|
+
({
|
|
933
|
+
'version': 1,
|
|
934
|
+
'body': {
|
|
935
|
+
'items': [
|
|
936
|
+
{
|
|
937
|
+
'elementId': 'root',
|
|
938
|
+
'type': 'box',
|
|
939
|
+
'layout': 'column',
|
|
940
|
+
'width': {
|
|
941
|
+
'type': 'flex',
|
|
942
|
+
'value': FlexSizeSpecValue$1.FillParent,
|
|
943
|
+
},
|
|
944
|
+
'height': {
|
|
945
|
+
'type': 'flex',
|
|
946
|
+
'value': FlexSizeSpecValue$1.WrapContent,
|
|
947
|
+
},
|
|
948
|
+
'items': [
|
|
949
|
+
{
|
|
950
|
+
'type': 'text',
|
|
951
|
+
'viewStyle': {
|
|
952
|
+
'backgroundColor': '#a0c0ffff',
|
|
953
|
+
'margin': {
|
|
954
|
+
'top': 16,
|
|
955
|
+
'bottom': 16,
|
|
956
|
+
'left': 16,
|
|
957
|
+
'right': 16,
|
|
958
|
+
},
|
|
959
|
+
'padding': {
|
|
960
|
+
'top': 16,
|
|
961
|
+
'bottom': 16,
|
|
962
|
+
'left': 16,
|
|
963
|
+
'right': 16,
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
'text': 'Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap ',
|
|
967
|
+
'textStyle': {
|
|
968
|
+
'size': 14,
|
|
969
|
+
'color': '#222121e0',
|
|
970
|
+
'weight': 'normal',
|
|
971
|
+
},
|
|
972
|
+
'maxTextLines': 5,
|
|
973
|
+
'width': {
|
|
974
|
+
'type': 'flex',
|
|
975
|
+
'value': FlexSizeSpecValue$1.FillParent,
|
|
976
|
+
},
|
|
977
|
+
'height': {
|
|
978
|
+
'type': 'flex',
|
|
979
|
+
'value': 1,
|
|
980
|
+
},
|
|
981
|
+
'align': {
|
|
982
|
+
'horizontal': 'left',
|
|
983
|
+
'vertical': 'top',
|
|
984
|
+
},
|
|
985
|
+
'elementId': 'c0e15878-4984-408d-abaa-4b495c2e3872',
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
'type': 'imageButton',
|
|
989
|
+
'viewStyle': {
|
|
990
|
+
margin: {
|
|
991
|
+
left: 24,
|
|
992
|
+
right: 12,
|
|
993
|
+
},
|
|
994
|
+
},
|
|
995
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
996
|
+
'height': { 'type': 'fixed', 'value': 250 },
|
|
997
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
998
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
999
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
1000
|
+
'action': { 'data': 'www.naver.com' },
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
});
|
|
1007
|
+
|
|
63
1008
|
var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
|
|
64
1009
|
var t = {};
|
|
65
1010
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -170,10 +1115,8 @@ const createMessageTemplate = (opts) => {
|
|
|
170
1115
|
const UnknownMessage = opts.UnknownMessage || (() => null);
|
|
171
1116
|
const parser = opts.parser || createParser();
|
|
172
1117
|
const renderer = opts.renderer || createRenderer();
|
|
173
|
-
const MessageTemplateBase = (
|
|
174
|
-
|
|
175
|
-
const renderItems = props.templateItems;
|
|
176
|
-
const parentLayout = (_a = props.parentLayout) !== null && _a !== void 0 ? _a : defaultProperties.box.layout;
|
|
1118
|
+
const MessageTemplateBase = ({ templateItems, parentLayout = defaultProperties.box.layout, isRoot = false, }) => {
|
|
1119
|
+
const renderItems = templateItems;
|
|
177
1120
|
return (React.createElement(React.Fragment, null, renderItems.map((item, index, siblings) => {
|
|
178
1121
|
const { properties } = parser.parse(item, { parentLayout, elemIdx: index, siblings });
|
|
179
1122
|
const props = {
|
|
@@ -183,20 +1126,30 @@ const createMessageTemplate = (opts) => {
|
|
|
183
1126
|
siblings,
|
|
184
1127
|
};
|
|
185
1128
|
switch (item.type) {
|
|
186
|
-
|
|
1129
|
+
// CompositeComponent should be top level component
|
|
1130
|
+
case exports.CompositeComponentType.Carousel: {
|
|
1131
|
+
if (!isRoot) {
|
|
1132
|
+
throw new Error('Cannot parse template item as Carousel if the template item is not the root.');
|
|
1133
|
+
}
|
|
1134
|
+
if (!item.items || !Array.isArray(item.items) || item.items.length === 0) {
|
|
1135
|
+
throw new Error('Cannot parse template item as Carousel if carousel has no items.');
|
|
1136
|
+
}
|
|
1137
|
+
return (React.createElement(renderer.carouselView, Object.assign({}, item, props), item.items.map((items, index) => (React.createElement(MessageTemplateBase, { key: index, templateItems: items || [], parentLayout: parentLayout })))));
|
|
1138
|
+
}
|
|
1139
|
+
case ComponentType$1.Box: {
|
|
187
1140
|
return (React.createElement(renderer.box, Object.assign({}, item, props),
|
|
188
1141
|
React.createElement(MessageTemplateBase, { templateItems: item.items || [], parentLayout: item.layout })));
|
|
189
1142
|
}
|
|
190
|
-
case ComponentType.Text: {
|
|
1143
|
+
case ComponentType$1.Text: {
|
|
191
1144
|
return React.createElement(renderer.text, Object.assign({}, item, props));
|
|
192
1145
|
}
|
|
193
|
-
case ComponentType.Image: {
|
|
1146
|
+
case ComponentType$1.Image: {
|
|
194
1147
|
return React.createElement(renderer.image, Object.assign({}, item, props));
|
|
195
1148
|
}
|
|
196
|
-
case ComponentType.TextButton: {
|
|
1149
|
+
case ComponentType$1.TextButton: {
|
|
197
1150
|
return React.createElement(renderer.textButton, Object.assign({}, item, props));
|
|
198
1151
|
}
|
|
199
|
-
case ComponentType.ImageButton: {
|
|
1152
|
+
case ComponentType$1.ImageButton: {
|
|
200
1153
|
return React.createElement(renderer.imageButton, Object.assign({}, item, props));
|
|
201
1154
|
}
|
|
202
1155
|
default: {
|
|
@@ -207,11 +1160,21 @@ const createMessageTemplate = (opts) => {
|
|
|
207
1160
|
})));
|
|
208
1161
|
};
|
|
209
1162
|
return {
|
|
210
|
-
MessageTemplate: ({ parentLayout = defaultProperties.rootLayout, templateItems }) => {
|
|
1163
|
+
MessageTemplate: ({ parentLayout = defaultProperties.rootLayout, templateVersion, templateItems, }) => {
|
|
211
1164
|
const items = setTemplateItemId(templateItems);
|
|
1165
|
+
if (!isTemplateVersionSupported(templateVersion)) {
|
|
1166
|
+
/**
|
|
1167
|
+
* I choose to throw instead of returning UnknownMessage because UnknownMessage syntax (required prop: item) is not what UIKit wants.
|
|
1168
|
+
*/
|
|
1169
|
+
throw new Error(`Cannot parse template item due to unsupported template version: ${templateVersion}, ${SUPPORTED_TEMPLATE_VERSIONS}`);
|
|
1170
|
+
}
|
|
1171
|
+
let isCarousel = false;
|
|
1172
|
+
if (Array.isArray(items) && items.length > 0) {
|
|
1173
|
+
isCarousel = items[0].type === exports.CompositeComponentType.Carousel;
|
|
1174
|
+
}
|
|
212
1175
|
return (React.createElement(SizeContextProvider, null,
|
|
213
|
-
React.createElement(Container,
|
|
214
|
-
React.createElement(MessageTemplateBase, { parentLayout: parentLayout, templateItems: items }))));
|
|
1176
|
+
React.createElement(Container, { className: isCarousel ? 'sb-message-template__parent_for_carousel' : '' },
|
|
1177
|
+
React.createElement(MessageTemplateBase, { parentLayout: parentLayout, templateItems: items, isRoot: true }))));
|
|
215
1178
|
},
|
|
216
1179
|
MessageTemplateBase,
|
|
217
1180
|
};
|
|
@@ -243,7 +1206,7 @@ const alignInFlex = (align) => {
|
|
|
243
1206
|
body: {
|
|
244
1207
|
items: [
|
|
245
1208
|
{
|
|
246
|
-
type: ComponentType.Image,
|
|
1209
|
+
type: ComponentType$1.Image,
|
|
247
1210
|
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
248
1211
|
height: { type: 'fixed', value: 236 },
|
|
249
1212
|
viewStyle: {
|
|
@@ -258,33 +1221,33 @@ const alignInFlex = (align) => {
|
|
|
258
1221
|
imageStyle: { contentMode: MediaContentMode.AspectFill },
|
|
259
1222
|
},
|
|
260
1223
|
{
|
|
261
|
-
type: ComponentType.Box,
|
|
1224
|
+
type: ComponentType$1.Box,
|
|
262
1225
|
layout: Layout.Column,
|
|
263
1226
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
264
1227
|
height: { type: 'fixed', value: 200 },
|
|
265
1228
|
items: [
|
|
266
1229
|
{
|
|
267
|
-
type: ComponentType.Box,
|
|
1230
|
+
type: ComponentType$1.Box,
|
|
268
1231
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
269
1232
|
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
270
1233
|
viewStyle: { backgroundColor: '#fa6464' },
|
|
271
1234
|
},
|
|
272
1235
|
{
|
|
273
|
-
type: ComponentType.Box,
|
|
1236
|
+
type: ComponentType$1.Box,
|
|
274
1237
|
layout: Layout.Column,
|
|
275
1238
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
276
1239
|
height: { type: 'flex', value: FlexSizeSpecValue.WrapContent },
|
|
277
1240
|
viewStyle: { backgroundColor: '#ffaf5c' },
|
|
278
1241
|
items: [
|
|
279
1242
|
{
|
|
280
|
-
type: ComponentType.Text,
|
|
1243
|
+
type: ComponentType$1.Text,
|
|
281
1244
|
text: 'Message',
|
|
282
1245
|
align: { horizontal: AlignValue.Center, vertical: AlignValue.Center },
|
|
283
1246
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
284
1247
|
height: { type: 'fixed', value: 50 },
|
|
285
1248
|
},
|
|
286
1249
|
{
|
|
287
|
-
type: ComponentType.Image,
|
|
1250
|
+
type: ComponentType$1.Image,
|
|
288
1251
|
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
289
1252
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
290
1253
|
height: { type: 'fixed', value: 50 },
|
|
@@ -294,13 +1257,13 @@ const alignInFlex = (align) => {
|
|
|
294
1257
|
],
|
|
295
1258
|
},
|
|
296
1259
|
{
|
|
297
|
-
type: ComponentType.Box,
|
|
1260
|
+
type: ComponentType$1.Box,
|
|
298
1261
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
299
1262
|
height: { type: 'fixed', value: 20 },
|
|
300
1263
|
viewStyle: { backgroundColor: '#ffe450' },
|
|
301
1264
|
},
|
|
302
1265
|
{
|
|
303
|
-
type: ComponentType.Box,
|
|
1266
|
+
type: ComponentType$1.Box,
|
|
304
1267
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
305
1268
|
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
306
1269
|
viewStyle: { backgroundColor: '#329a1b' },
|
|
@@ -308,12 +1271,12 @@ const alignInFlex = (align) => {
|
|
|
308
1271
|
],
|
|
309
1272
|
},
|
|
310
1273
|
{
|
|
311
|
-
type: ComponentType.Box,
|
|
1274
|
+
type: ComponentType$1.Box,
|
|
312
1275
|
viewStyle: { padding: { top: 12, bottom: 12, left: 12, right: 12 } },
|
|
313
1276
|
layout: Layout.Column,
|
|
314
1277
|
items: [
|
|
315
1278
|
{
|
|
316
|
-
type: ComponentType.Box,
|
|
1279
|
+
type: ComponentType$1.Box,
|
|
317
1280
|
align: { horizontal: AlignValue.Left, vertical: AlignValue.Center },
|
|
318
1281
|
layout: Layout.Row,
|
|
319
1282
|
viewStyle: {
|
|
@@ -324,7 +1287,7 @@ const alignInFlex = (align) => {
|
|
|
324
1287
|
height: { type: 'fixed', value: 150 },
|
|
325
1288
|
items: [
|
|
326
1289
|
{
|
|
327
|
-
type: ComponentType.Text,
|
|
1290
|
+
type: ComponentType$1.Text,
|
|
328
1291
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
329
1292
|
height: { type: 'fixed', value: 50 },
|
|
330
1293
|
text: 'Sample1 text',
|
|
@@ -340,7 +1303,7 @@ const alignInFlex = (align) => {
|
|
|
340
1303
|
},
|
|
341
1304
|
},
|
|
342
1305
|
{
|
|
343
|
-
type: ComponentType.ImageButton,
|
|
1306
|
+
type: ComponentType$1.ImageButton,
|
|
344
1307
|
action: { type: ActionType.UIKit, data: 'uikit://delete' },
|
|
345
1308
|
width: { type: 'fixed', value: 20 },
|
|
346
1309
|
height: { type: 'fixed', value: 20 },
|
|
@@ -350,7 +1313,7 @@ const alignInFlex = (align) => {
|
|
|
350
1313
|
],
|
|
351
1314
|
},
|
|
352
1315
|
{
|
|
353
|
-
type: ComponentType.Text,
|
|
1316
|
+
type: ComponentType$1.Text,
|
|
354
1317
|
viewStyle: { padding: { top: 6, bottom: 12, left: 0, right: 0 } },
|
|
355
1318
|
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.',
|
|
356
1319
|
maxTextLines: 2,
|
|
@@ -359,7 +1322,7 @@ const alignInFlex = (align) => {
|
|
|
359
1322
|
height: { type: 'fixed', value: 50 },
|
|
360
1323
|
},
|
|
361
1324
|
{
|
|
362
|
-
type: ComponentType.TextButton,
|
|
1325
|
+
type: ComponentType$1.TextButton,
|
|
363
1326
|
action: { type: ActionType.Web, data: 'https://www.daum.net' },
|
|
364
1327
|
text: 'Button 3',
|
|
365
1328
|
textStyle: { size: 14, color: '#742ddd', weight: FontWeight.Bold },
|
|
@@ -374,25 +1337,25 @@ const alignInFlex = (align) => {
|
|
|
374
1337
|
'body': {
|
|
375
1338
|
'items': [
|
|
376
1339
|
{
|
|
377
|
-
'type': ComponentType.Image,
|
|
1340
|
+
'type': ComponentType$1.Image,
|
|
378
1341
|
'action': { 'type': ActionType.Web, 'data': 'https://www.naver.com/' },
|
|
379
1342
|
'height': { 'type': 'fixed', 'value': 136 },
|
|
380
1343
|
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
381
1344
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
382
1345
|
},
|
|
383
1346
|
{
|
|
384
|
-
'type': ComponentType.Box,
|
|
1347
|
+
'type': ComponentType$1.Box,
|
|
385
1348
|
'viewStyle': { 'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 }, backgroundColor: '#cccccc' },
|
|
386
1349
|
'layout': Layout.Column,
|
|
387
1350
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
388
1351
|
'items': [
|
|
389
1352
|
{
|
|
390
|
-
'type': ComponentType.Box,
|
|
1353
|
+
'type': ComponentType$1.Box,
|
|
391
1354
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
392
1355
|
'layout': Layout.Row,
|
|
393
1356
|
'items': [
|
|
394
1357
|
{
|
|
395
|
-
'type': ComponentType.TextButton,
|
|
1358
|
+
'type': ComponentType$1.TextButton,
|
|
396
1359
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
397
1360
|
width: { type: 'fixed', value: 150 },
|
|
398
1361
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 } },
|
|
@@ -400,7 +1363,7 @@ const alignInFlex = (align) => {
|
|
|
400
1363
|
'textStyle': { 'size': 14, 'weight': FontWeight.Bold },
|
|
401
1364
|
},
|
|
402
1365
|
{
|
|
403
|
-
'type': ComponentType.TextButton,
|
|
1366
|
+
'type': ComponentType$1.TextButton,
|
|
404
1367
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
405
1368
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
406
1369
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 } },
|
|
@@ -410,19 +1373,19 @@ const alignInFlex = (align) => {
|
|
|
410
1373
|
],
|
|
411
1374
|
},
|
|
412
1375
|
{
|
|
413
|
-
'type': ComponentType.Box,
|
|
1376
|
+
'type': ComponentType$1.Box,
|
|
414
1377
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
415
1378
|
'layout': Layout.Row,
|
|
416
1379
|
'items': [
|
|
417
1380
|
{
|
|
418
|
-
'type': ComponentType.Text,
|
|
1381
|
+
'type': ComponentType$1.Text,
|
|
419
1382
|
'text': 'Sample2 text',
|
|
420
1383
|
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
421
1384
|
'maxTextLines': 1,
|
|
422
1385
|
'textStyle': { 'size': 16, 'weight': FontWeight.Bold },
|
|
423
1386
|
},
|
|
424
1387
|
{
|
|
425
|
-
'type': ComponentType.ImageButton,
|
|
1388
|
+
'type': ComponentType$1.ImageButton,
|
|
426
1389
|
'action': { 'type': ActionType.UIKit, 'data': 'uikit://delete' },
|
|
427
1390
|
'width': { 'type': 'fixed', 'value': 20 },
|
|
428
1391
|
'height': { 'type': 'fixed', 'value': 20 },
|
|
@@ -432,7 +1395,7 @@ const alignInFlex = (align) => {
|
|
|
432
1395
|
],
|
|
433
1396
|
},
|
|
434
1397
|
{
|
|
435
|
-
'type': ComponentType.Text,
|
|
1398
|
+
'type': ComponentType$1.Text,
|
|
436
1399
|
'viewStyle': { 'padding': { 'top': 6, 'bottom': 12, 'left': 0, 'right': 0 } },
|
|
437
1400
|
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
438
1401
|
'textStyle': { 'size': 14 },
|
|
@@ -447,42 +1410,42 @@ const alignInFlex = (align) => {
|
|
|
447
1410
|
'body': {
|
|
448
1411
|
'items': [
|
|
449
1412
|
{
|
|
450
|
-
'type': ComponentType.Box,
|
|
1413
|
+
'type': ComponentType$1.Box,
|
|
451
1414
|
'viewStyle': { 'backgroundColor': '#ffffff', 'borderWidth': 1, 'borderColor': '#eeeeee', 'radius': 16 },
|
|
452
1415
|
'layout': Layout.Column,
|
|
453
1416
|
'items': [
|
|
454
1417
|
{
|
|
455
|
-
'type': ComponentType.Image,
|
|
1418
|
+
'type': ComponentType$1.Image,
|
|
456
1419
|
'height': { 'type': 'fixed', 'value': 200 },
|
|
457
1420
|
'imageUrl': 'https://img.freepik.com/free-vector/cartoon-happy-hours-background_52683-81243.jpg?w=2000&t=st=1666689198~exp=1666689798~hmac=23109d44ba03deee7aee069cbeebfcb48fa27f85e53c1cafc5d5d7345f1a2041',
|
|
458
1421
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
459
1422
|
},
|
|
460
1423
|
{
|
|
461
|
-
'type': ComponentType.Box,
|
|
1424
|
+
'type': ComponentType$1.Box,
|
|
462
1425
|
'viewStyle': { 'padding': { 'top': 15, 'bottom': 15, 'left': 15, 'right': 15 } },
|
|
463
1426
|
'layout': Layout.Column,
|
|
464
1427
|
'items': [
|
|
465
1428
|
{
|
|
466
|
-
'type': ComponentType.Text,
|
|
1429
|
+
'type': ComponentType$1.Text,
|
|
467
1430
|
'text': "Don't miss these deals today",
|
|
468
1431
|
'maxTextLines': 1,
|
|
469
1432
|
'textStyle': { 'size': 20, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
470
1433
|
},
|
|
471
1434
|
{
|
|
472
|
-
'type': ComponentType.Text,
|
|
1435
|
+
'type': ComponentType$1.Text,
|
|
473
1436
|
'viewStyle': { 'margin': { 'top': 5, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
474
1437
|
'text': 'Pay with Maya and get cashback!',
|
|
475
1438
|
'maxTextLines': 1,
|
|
476
1439
|
'textStyle': { 'size': 14, 'color': '#e10000' },
|
|
477
1440
|
},
|
|
478
1441
|
{
|
|
479
|
-
'type': ComponentType.Box,
|
|
1442
|
+
'type': ComponentType$1.Box,
|
|
480
1443
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
481
1444
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
482
1445
|
'layout': Layout.Row,
|
|
483
1446
|
'items': [
|
|
484
1447
|
{
|
|
485
|
-
'type': ComponentType.Image,
|
|
1448
|
+
'type': ComponentType$1.Image,
|
|
486
1449
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
487
1450
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
488
1451
|
'viewStyle': {
|
|
@@ -495,19 +1458,19 @@ const alignInFlex = (align) => {
|
|
|
495
1458
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
496
1459
|
},
|
|
497
1460
|
{
|
|
498
|
-
'type': ComponentType.Box,
|
|
1461
|
+
'type': ComponentType$1.Box,
|
|
499
1462
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
500
1463
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
501
1464
|
'layout': Layout.Column,
|
|
502
1465
|
'items': [
|
|
503
1466
|
{
|
|
504
|
-
'type': ComponentType.Text,
|
|
1467
|
+
'type': ComponentType$1.Text,
|
|
505
1468
|
'text': 'Meralco',
|
|
506
1469
|
'maxTextLines': 1,
|
|
507
1470
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
508
1471
|
},
|
|
509
1472
|
{
|
|
510
|
-
'type': ComponentType.Text,
|
|
1473
|
+
'type': ComponentType$1.Text,
|
|
511
1474
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
512
1475
|
'text': '30% cashback, P300 min spend',
|
|
513
1476
|
'maxTextLines': 1,
|
|
@@ -518,13 +1481,13 @@ const alignInFlex = (align) => {
|
|
|
518
1481
|
],
|
|
519
1482
|
},
|
|
520
1483
|
{
|
|
521
|
-
'type': ComponentType.Box,
|
|
1484
|
+
'type': ComponentType$1.Box,
|
|
522
1485
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
523
1486
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
524
1487
|
'layout': Layout.Row,
|
|
525
1488
|
'items': [
|
|
526
1489
|
{
|
|
527
|
-
'type': ComponentType.Image,
|
|
1490
|
+
'type': ComponentType$1.Image,
|
|
528
1491
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
529
1492
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
530
1493
|
'viewStyle': {
|
|
@@ -537,19 +1500,19 @@ const alignInFlex = (align) => {
|
|
|
537
1500
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill, tintColor: '#a49a9a' },
|
|
538
1501
|
},
|
|
539
1502
|
{
|
|
540
|
-
'type': ComponentType.Box,
|
|
1503
|
+
'type': ComponentType$1.Box,
|
|
541
1504
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
542
1505
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
543
1506
|
'layout': Layout.Column,
|
|
544
1507
|
'items': [
|
|
545
1508
|
{
|
|
546
|
-
'type': ComponentType.Text,
|
|
1509
|
+
'type': ComponentType$1.Text,
|
|
547
1510
|
'text': 'Globe',
|
|
548
1511
|
'maxTextLines': 1,
|
|
549
1512
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
550
1513
|
},
|
|
551
1514
|
{
|
|
552
|
-
'type': ComponentType.Text,
|
|
1515
|
+
'type': ComponentType$1.Text,
|
|
553
1516
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
554
1517
|
'text': '30% cashback, P300 min spend',
|
|
555
1518
|
'maxTextLines': 1,
|
|
@@ -560,13 +1523,13 @@ const alignInFlex = (align) => {
|
|
|
560
1523
|
],
|
|
561
1524
|
},
|
|
562
1525
|
{
|
|
563
|
-
'type': ComponentType.Box,
|
|
1526
|
+
'type': ComponentType$1.Box,
|
|
564
1527
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
565
1528
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
566
1529
|
'layout': Layout.Row,
|
|
567
1530
|
'items': [
|
|
568
1531
|
{
|
|
569
|
-
'type': ComponentType.Image,
|
|
1532
|
+
'type': ComponentType$1.Image,
|
|
570
1533
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
571
1534
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
572
1535
|
'viewStyle': {
|
|
@@ -579,19 +1542,19 @@ const alignInFlex = (align) => {
|
|
|
579
1542
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
580
1543
|
},
|
|
581
1544
|
{
|
|
582
|
-
'type': ComponentType.Box,
|
|
1545
|
+
'type': ComponentType$1.Box,
|
|
583
1546
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
584
1547
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
585
1548
|
'layout': Layout.Column,
|
|
586
1549
|
'items': [
|
|
587
1550
|
{
|
|
588
|
-
'type': ComponentType.Text,
|
|
1551
|
+
'type': ComponentType$1.Text,
|
|
589
1552
|
'text': 'Cignal',
|
|
590
1553
|
'maxTextLines': 1,
|
|
591
1554
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
592
1555
|
},
|
|
593
1556
|
{
|
|
594
|
-
'type': ComponentType.Text,
|
|
1557
|
+
'type': ComponentType$1.Text,
|
|
595
1558
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
596
1559
|
'text': '30% cashback, P300 min spend',
|
|
597
1560
|
'maxTextLines': 1,
|
|
@@ -602,13 +1565,13 @@ const alignInFlex = (align) => {
|
|
|
602
1565
|
],
|
|
603
1566
|
},
|
|
604
1567
|
{
|
|
605
|
-
'type': ComponentType.Box,
|
|
1568
|
+
'type': ComponentType$1.Box,
|
|
606
1569
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
607
1570
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
608
1571
|
'layout': Layout.Row,
|
|
609
1572
|
'items': [
|
|
610
1573
|
{
|
|
611
|
-
'type': ComponentType.TextButton,
|
|
1574
|
+
'type': ComponentType$1.TextButton,
|
|
612
1575
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
613
1576
|
'viewStyle': {
|
|
614
1577
|
'backgroundColor': '#e0e0e0',
|
|
@@ -620,7 +1583,7 @@ const alignInFlex = (align) => {
|
|
|
620
1583
|
'textStyle': { 'size': 15, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
621
1584
|
},
|
|
622
1585
|
{
|
|
623
|
-
'type': ComponentType.TextButton,
|
|
1586
|
+
'type': ComponentType$1.TextButton,
|
|
624
1587
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
625
1588
|
'viewStyle': {
|
|
626
1589
|
'backgroundColor': '#e10000',
|
|
@@ -645,11 +1608,11 @@ const alignInFlex = (align) => {
|
|
|
645
1608
|
'body': {
|
|
646
1609
|
'items': [
|
|
647
1610
|
{
|
|
648
|
-
'type': ComponentType.Box,
|
|
1611
|
+
'type': ComponentType$1.Box,
|
|
649
1612
|
'layout': Layout.Column,
|
|
650
1613
|
'items': [
|
|
651
1614
|
{
|
|
652
|
-
'type': ComponentType.Image,
|
|
1615
|
+
'type': ComponentType$1.Image,
|
|
653
1616
|
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
|
|
654
1617
|
'metaData': {
|
|
655
1618
|
'pixelWidth': 512,
|
|
@@ -668,7 +1631,7 @@ const alignInFlex = (align) => {
|
|
|
668
1631
|
},
|
|
669
1632
|
},
|
|
670
1633
|
{
|
|
671
|
-
'type': ComponentType.Box,
|
|
1634
|
+
'type': ComponentType$1.Box,
|
|
672
1635
|
'viewStyle': {
|
|
673
1636
|
'padding': {
|
|
674
1637
|
'top': 12,
|
|
@@ -680,15 +1643,15 @@ const alignInFlex = (align) => {
|
|
|
680
1643
|
'layout': Layout.Column,
|
|
681
1644
|
'items': [
|
|
682
1645
|
{
|
|
683
|
-
'type': ComponentType.Box,
|
|
1646
|
+
'type': ComponentType$1.Box,
|
|
684
1647
|
'layout': Layout.Row,
|
|
685
1648
|
'items': [
|
|
686
1649
|
{
|
|
687
|
-
'type': ComponentType.Box,
|
|
1650
|
+
'type': ComponentType$1.Box,
|
|
688
1651
|
'layout': Layout.Column,
|
|
689
1652
|
'items': [
|
|
690
1653
|
{
|
|
691
|
-
'type': ComponentType.Text,
|
|
1654
|
+
'type': ComponentType$1.Text,
|
|
692
1655
|
'text': 'hi',
|
|
693
1656
|
'maxTextLines': 3,
|
|
694
1657
|
'viewStyle': {
|
|
@@ -705,7 +1668,7 @@ const alignInFlex = (align) => {
|
|
|
705
1668
|
},
|
|
706
1669
|
},
|
|
707
1670
|
{
|
|
708
|
-
'type': ComponentType.Text,
|
|
1671
|
+
'type': ComponentType$1.Text,
|
|
709
1672
|
'text': 'bye',
|
|
710
1673
|
'maxTextLines': 10,
|
|
711
1674
|
'textStyle': {
|
|
@@ -715,7 +1678,7 @@ const alignInFlex = (align) => {
|
|
|
715
1678
|
],
|
|
716
1679
|
},
|
|
717
1680
|
{
|
|
718
|
-
'type': ComponentType.ImageButton,
|
|
1681
|
+
'type': ComponentType$1.ImageButton,
|
|
719
1682
|
'action': {
|
|
720
1683
|
'type': ActionType.UIKit,
|
|
721
1684
|
'data': 'sendbirduikit://delete',
|
|
@@ -740,11 +1703,11 @@ const alignInFlex = (align) => {
|
|
|
740
1703
|
],
|
|
741
1704
|
},
|
|
742
1705
|
{
|
|
743
|
-
'type': ComponentType.Box,
|
|
1706
|
+
'type': ComponentType$1.Box,
|
|
744
1707
|
'layout': Layout.Column,
|
|
745
1708
|
'items': [
|
|
746
1709
|
{
|
|
747
|
-
'type': ComponentType.Box,
|
|
1710
|
+
'type': ComponentType$1.Box,
|
|
748
1711
|
'viewStyle': {
|
|
749
1712
|
'margin': {
|
|
750
1713
|
'top': 16,
|
|
@@ -760,7 +1723,7 @@ const alignInFlex = (align) => {
|
|
|
760
1723
|
'layout': Layout.Row,
|
|
761
1724
|
'items': [
|
|
762
1725
|
{
|
|
763
|
-
'type': ComponentType.Image,
|
|
1726
|
+
'type': ComponentType$1.Image,
|
|
764
1727
|
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
|
|
765
1728
|
'width': {
|
|
766
1729
|
'type': 'fixed',
|
|
@@ -783,7 +1746,7 @@ const alignInFlex = (align) => {
|
|
|
783
1746
|
},
|
|
784
1747
|
},
|
|
785
1748
|
{
|
|
786
|
-
'type': ComponentType.Box,
|
|
1749
|
+
'type': ComponentType$1.Box,
|
|
787
1750
|
'viewStyle': {
|
|
788
1751
|
'margin': {
|
|
789
1752
|
'top': 0,
|
|
@@ -795,7 +1758,7 @@ const alignInFlex = (align) => {
|
|
|
795
1758
|
'layout': Layout.Column,
|
|
796
1759
|
'items': [
|
|
797
1760
|
{
|
|
798
|
-
'type': ComponentType.Text,
|
|
1761
|
+
'type': ComponentType$1.Text,
|
|
799
1762
|
'text': 'Chongbu',
|
|
800
1763
|
'maxTextLines': 1,
|
|
801
1764
|
'textStyle': {
|
|
@@ -804,7 +1767,7 @@ const alignInFlex = (align) => {
|
|
|
804
1767
|
},
|
|
805
1768
|
},
|
|
806
1769
|
{
|
|
807
|
-
'type': ComponentType.Text,
|
|
1770
|
+
'type': ComponentType$1.Text,
|
|
808
1771
|
'viewStyle': {
|
|
809
1772
|
'margin': {
|
|
810
1773
|
'top': 4,
|
|
@@ -824,7 +1787,7 @@ const alignInFlex = (align) => {
|
|
|
824
1787
|
],
|
|
825
1788
|
},
|
|
826
1789
|
{
|
|
827
|
-
'type': ComponentType.Box,
|
|
1790
|
+
'type': ComponentType$1.Box,
|
|
828
1791
|
'viewStyle': {
|
|
829
1792
|
'margin': {
|
|
830
1793
|
'top': 16,
|
|
@@ -840,7 +1803,7 @@ const alignInFlex = (align) => {
|
|
|
840
1803
|
'layout': Layout.Row,
|
|
841
1804
|
'items': [
|
|
842
1805
|
{
|
|
843
|
-
'type': ComponentType.Image,
|
|
1806
|
+
'type': ComponentType$1.Image,
|
|
844
1807
|
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
|
|
845
1808
|
'width': {
|
|
846
1809
|
'type': 'fixed',
|
|
@@ -863,7 +1826,7 @@ const alignInFlex = (align) => {
|
|
|
863
1826
|
},
|
|
864
1827
|
},
|
|
865
1828
|
{
|
|
866
|
-
'type': ComponentType.Box,
|
|
1829
|
+
'type': ComponentType$1.Box,
|
|
867
1830
|
'viewStyle': {
|
|
868
1831
|
'margin': {
|
|
869
1832
|
'top': 0,
|
|
@@ -875,7 +1838,7 @@ const alignInFlex = (align) => {
|
|
|
875
1838
|
'layout': Layout.Column,
|
|
876
1839
|
'items': [
|
|
877
1840
|
{
|
|
878
|
-
'type': ComponentType.Text,
|
|
1841
|
+
'type': ComponentType$1.Text,
|
|
879
1842
|
'text': 'Amanda',
|
|
880
1843
|
'maxTextLines': 1,
|
|
881
1844
|
'textStyle': {
|
|
@@ -884,7 +1847,7 @@ const alignInFlex = (align) => {
|
|
|
884
1847
|
},
|
|
885
1848
|
},
|
|
886
1849
|
{
|
|
887
|
-
'type': ComponentType.Text,
|
|
1850
|
+
'type': ComponentType$1.Text,
|
|
888
1851
|
'viewStyle': {
|
|
889
1852
|
'margin': {
|
|
890
1853
|
'top': 4,
|
|
@@ -1013,6 +1976,285 @@ const alignInFlex = (align) => {
|
|
|
1013
1976
|
],
|
|
1014
1977
|
},
|
|
1015
1978
|
});
|
|
1979
|
+
({
|
|
1980
|
+
'version': 1,
|
|
1981
|
+
'body': {
|
|
1982
|
+
'items': [
|
|
1983
|
+
{
|
|
1984
|
+
'elementId': 'root',
|
|
1985
|
+
'type': 'box',
|
|
1986
|
+
'layout': 'column',
|
|
1987
|
+
'width': {
|
|
1988
|
+
'type': 'flex',
|
|
1989
|
+
'value': FlexSizeSpecValue.FillParent,
|
|
1990
|
+
},
|
|
1991
|
+
'height': {
|
|
1992
|
+
'type': 'flex',
|
|
1993
|
+
'value': FlexSizeSpecValue.WrapContent,
|
|
1994
|
+
},
|
|
1995
|
+
'items': [
|
|
1996
|
+
{
|
|
1997
|
+
'type': 'text',
|
|
1998
|
+
'viewStyle': {
|
|
1999
|
+
'backgroundColor': '#a0c0ffff',
|
|
2000
|
+
'margin': {
|
|
2001
|
+
'top': 16,
|
|
2002
|
+
'bottom': 16,
|
|
2003
|
+
'left': 16,
|
|
2004
|
+
'right': 16,
|
|
2005
|
+
},
|
|
2006
|
+
'padding': {
|
|
2007
|
+
'top': 16,
|
|
2008
|
+
'bottom': 16,
|
|
2009
|
+
'left': 16,
|
|
2010
|
+
'right': 16,
|
|
2011
|
+
},
|
|
2012
|
+
},
|
|
2013
|
+
'text': 'Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap ',
|
|
2014
|
+
'textStyle': {
|
|
2015
|
+
'size': 14,
|
|
2016
|
+
'color': '#222121e0',
|
|
2017
|
+
'weight': 'normal',
|
|
2018
|
+
},
|
|
2019
|
+
'maxTextLines': 5,
|
|
2020
|
+
'width': {
|
|
2021
|
+
'type': 'flex',
|
|
2022
|
+
'value': FlexSizeSpecValue.FillParent,
|
|
2023
|
+
},
|
|
2024
|
+
'height': {
|
|
2025
|
+
'type': 'flex',
|
|
2026
|
+
'value': 1,
|
|
2027
|
+
},
|
|
2028
|
+
'align': {
|
|
2029
|
+
'horizontal': 'left',
|
|
2030
|
+
'vertical': 'top',
|
|
2031
|
+
},
|
|
2032
|
+
'elementId': 'c0e15878-4984-408d-abaa-4b495c2e3872',
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
'type': 'imageButton',
|
|
2036
|
+
'viewStyle': {
|
|
2037
|
+
margin: {
|
|
2038
|
+
left: 24,
|
|
2039
|
+
right: 12,
|
|
2040
|
+
},
|
|
2041
|
+
},
|
|
2042
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
2043
|
+
'height': { 'type': 'fixed', 'value': 250 },
|
|
2044
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
2045
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
2046
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
2047
|
+
'action': { 'data': 'www.naver.com' },
|
|
2048
|
+
},
|
|
2049
|
+
],
|
|
2050
|
+
},
|
|
2051
|
+
],
|
|
2052
|
+
},
|
|
2053
|
+
});
|
|
2054
|
+
|
|
2055
|
+
const PADDING_WIDTH = 24;
|
|
2056
|
+
const CONTENT_LEFT_WIDTH = 40;
|
|
2057
|
+
const SWIPE_THRESHOLD = 15;
|
|
2058
|
+
const GAP_DEFAULT = 8;
|
|
2059
|
+
/**
|
|
2060
|
+
* fixed sized template items should use its child width.
|
|
2061
|
+
* Whereas flex sized template items should use its parent's width.
|
|
2062
|
+
* @param item
|
|
2063
|
+
*/
|
|
2064
|
+
function shouldRenderAsFixed(item) {
|
|
2065
|
+
var _a;
|
|
2066
|
+
return ((_a = item.props.templateItems[0].width) === null || _a === void 0 ? void 0 : _a.type) === 'fixed';
|
|
2067
|
+
}
|
|
2068
|
+
function CarouselItem({ item, defaultWidth, marginRight }) {
|
|
2069
|
+
const style = shouldRenderAsFixed(item)
|
|
2070
|
+
? { width: 'fit-content' }
|
|
2071
|
+
: { minWidth: defaultWidth, width: '100%' };
|
|
2072
|
+
if (marginRight) {
|
|
2073
|
+
style['marginRight'] = marginRight;
|
|
2074
|
+
}
|
|
2075
|
+
return React.createElement("div", { style: style }, item);
|
|
2076
|
+
}
|
|
2077
|
+
const Carousel = React.memo(({ children, gap = GAP_DEFAULT }) => {
|
|
2078
|
+
var _a, _b;
|
|
2079
|
+
const carouselRef = React.useRef(null);
|
|
2080
|
+
const screenWidth = window.innerWidth;
|
|
2081
|
+
const defaultItemWidth = (_b = (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
|
|
2082
|
+
const itemWidths = children.map((item) => {
|
|
2083
|
+
var _a;
|
|
2084
|
+
if (shouldRenderAsFixed(item)) {
|
|
2085
|
+
return Number((_a = item.props.templateItems[0].width) === null || _a === void 0 ? void 0 : _a.value);
|
|
2086
|
+
}
|
|
2087
|
+
return defaultItemWidth;
|
|
2088
|
+
});
|
|
2089
|
+
const itemPositions = getEachItemPositions();
|
|
2090
|
+
const [draggingInfo, setDraggingInfo] = React.useState({
|
|
2091
|
+
scrolling: false,
|
|
2092
|
+
dragging: false,
|
|
2093
|
+
startPos: null,
|
|
2094
|
+
offset: 0,
|
|
2095
|
+
translateX: 0,
|
|
2096
|
+
currentIndex: 0,
|
|
2097
|
+
});
|
|
2098
|
+
const handleMouseDown = (event) => {
|
|
2099
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: false, dragging: true, startPos: {
|
|
2100
|
+
x: event.clientX,
|
|
2101
|
+
y: event.clientY,
|
|
2102
|
+
}, offset: 0 })));
|
|
2103
|
+
};
|
|
2104
|
+
const handleMouseMove = (event) => {
|
|
2105
|
+
if (!draggingInfo.dragging || !draggingInfo.startPos)
|
|
2106
|
+
return;
|
|
2107
|
+
const currentX = event.clientX;
|
|
2108
|
+
const newOffset = currentX - draggingInfo.startPos.x;
|
|
2109
|
+
setDraggingInfo(Object.assign(Object.assign({}, draggingInfo), { offset: newOffset }));
|
|
2110
|
+
};
|
|
2111
|
+
const handleMouseUp = () => {
|
|
2112
|
+
if (!draggingInfo.dragging)
|
|
2113
|
+
return;
|
|
2114
|
+
handleDragEnd();
|
|
2115
|
+
unblockScroll();
|
|
2116
|
+
};
|
|
2117
|
+
const blockScroll = () => {
|
|
2118
|
+
if (carouselRef.current) {
|
|
2119
|
+
carouselRef.current.style.touchAction = 'pan-x';
|
|
2120
|
+
}
|
|
2121
|
+
};
|
|
2122
|
+
const unblockScroll = () => {
|
|
2123
|
+
if (carouselRef.current) {
|
|
2124
|
+
carouselRef.current.style.touchAction = 'pan-y';
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
const handleTouchStart = (event) => {
|
|
2128
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: false, dragging: false, startPos: {
|
|
2129
|
+
x: event.touches[0].clientX,
|
|
2130
|
+
y: event.touches[0].clientY,
|
|
2131
|
+
}, offset: 0 })));
|
|
2132
|
+
};
|
|
2133
|
+
const handleTouchMove = (event) => {
|
|
2134
|
+
if (!draggingInfo.startPos || draggingInfo.scrolling)
|
|
2135
|
+
return;
|
|
2136
|
+
const startPos = draggingInfo.startPos;
|
|
2137
|
+
const [touchMoveX, touchMoveY] = [event.touches[0].clientX, event.touches[0].clientY];
|
|
2138
|
+
const [deltaX, deltaY] = [Math.abs(touchMoveX - startPos.x), Math.abs(touchMoveY - startPos.y)];
|
|
2139
|
+
const newOffset = touchMoveX - startPos.x;
|
|
2140
|
+
if (draggingInfo.dragging) {
|
|
2141
|
+
if (newOffset === draggingInfo.offset)
|
|
2142
|
+
return;
|
|
2143
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { offset: newOffset })));
|
|
2144
|
+
return;
|
|
2145
|
+
}
|
|
2146
|
+
if (deltaY > deltaX) {
|
|
2147
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: true })));
|
|
2148
|
+
}
|
|
2149
|
+
else {
|
|
2150
|
+
blockScroll();
|
|
2151
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { dragging: true, offset: newOffset })));
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
const handleTouchEnd = () => {
|
|
2155
|
+
if (!draggingInfo.dragging)
|
|
2156
|
+
return;
|
|
2157
|
+
handleDragEnd();
|
|
2158
|
+
unblockScroll();
|
|
2159
|
+
};
|
|
2160
|
+
const getNewDraggingInfo = ({ translateX, currentIndex, newTranslateX, nextIndex, }) => {
|
|
2161
|
+
return {
|
|
2162
|
+
scrolling: false,
|
|
2163
|
+
dragging: false,
|
|
2164
|
+
startPos: null,
|
|
2165
|
+
offset: 0,
|
|
2166
|
+
translateX: newTranslateX !== null && newTranslateX !== void 0 ? newTranslateX : translateX,
|
|
2167
|
+
currentIndex: nextIndex !== null && nextIndex !== void 0 ? nextIndex : currentIndex,
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
const handleDragEnd = () => {
|
|
2171
|
+
const { offset, currentIndex } = draggingInfo;
|
|
2172
|
+
const absOffset = Math.abs(offset);
|
|
2173
|
+
if (absOffset < SWIPE_THRESHOLD) {
|
|
2174
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2175
|
+
return;
|
|
2176
|
+
}
|
|
2177
|
+
// If dragged to left, next index should be to the right
|
|
2178
|
+
if (offset < 0 && currentIndex < children.length - 1) {
|
|
2179
|
+
if (isLastItemFitsScreen(currentIndex)) {
|
|
2180
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2181
|
+
return;
|
|
2182
|
+
}
|
|
2183
|
+
const nextIndex = currentIndex + 1;
|
|
2184
|
+
/**
|
|
2185
|
+
* This is special logic for "더 보기" button for Socar use-case.
|
|
2186
|
+
* The button will have a small width (less than 50px).
|
|
2187
|
+
* We want to include this button in the view and snap to right padding wall IFF !isLastTwoItemsFitScreen.
|
|
2188
|
+
*/
|
|
2189
|
+
if (nextIndex === children.length - 1 || isLastItemFitsScreen(nextIndex)) {
|
|
2190
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[children.length - 1].end - PADDING_WIDTH - CONTENT_LEFT_WIDTH + screenWidth, nextIndex: children.length - 1 })));
|
|
2191
|
+
}
|
|
2192
|
+
else {
|
|
2193
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[nextIndex].start, nextIndex })));
|
|
2194
|
+
}
|
|
2195
|
+
// If dragged to right, next index should be to the left
|
|
2196
|
+
}
|
|
2197
|
+
else if (offset > 0 && currentIndex > 0) {
|
|
2198
|
+
let nextIndex = currentIndex - 1;
|
|
2199
|
+
while (draggingInfo.translateX >= itemPositions[nextIndex].start) {
|
|
2200
|
+
nextIndex--;
|
|
2201
|
+
}
|
|
2202
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[nextIndex].start, nextIndex })));
|
|
2203
|
+
}
|
|
2204
|
+
else {
|
|
2205
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2206
|
+
}
|
|
2207
|
+
};
|
|
2208
|
+
function getCurrentTranslateX() {
|
|
2209
|
+
return draggingInfo.translateX + draggingInfo.offset;
|
|
2210
|
+
}
|
|
2211
|
+
function isLastItemFitsScreen(nextIndex) {
|
|
2212
|
+
const restItemsWidth = itemWidths.slice(nextIndex).reduce((prev, curr) => prev + gap + curr);
|
|
2213
|
+
const restTotalWidth = PADDING_WIDTH + CONTENT_LEFT_WIDTH + restItemsWidth;
|
|
2214
|
+
return restTotalWidth <= screenWidth;
|
|
2215
|
+
}
|
|
2216
|
+
function getEachItemPositions() {
|
|
2217
|
+
let accumulator = 0;
|
|
2218
|
+
return itemWidths.map((itemWidth, i) => {
|
|
2219
|
+
if (i > 0) {
|
|
2220
|
+
accumulator -= gap;
|
|
2221
|
+
}
|
|
2222
|
+
const itemPosition = {
|
|
2223
|
+
start: accumulator,
|
|
2224
|
+
end: accumulator - itemWidth,
|
|
2225
|
+
};
|
|
2226
|
+
accumulator -= itemWidth;
|
|
2227
|
+
return itemPosition;
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
return (React.createElement("div", { ref: carouselRef, onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, className: "sb-message-template__carousel", style: {
|
|
2231
|
+
cursor: draggingInfo.dragging ? 'grabbing' : 'grab',
|
|
2232
|
+
transition: draggingInfo.dragging ? 'none' : 'transform 0.5s ease',
|
|
2233
|
+
transform: `translateX(${getCurrentTranslateX()}px)`,
|
|
2234
|
+
} }, children.map((item, index) => (React.createElement(CarouselItem, { key: index + '', item: item, defaultWidth: defaultItemWidth + 'px', marginRight: index < children.length - 1 ? gap : undefined })))));
|
|
2235
|
+
});
|
|
2236
|
+
|
|
2237
|
+
function isWrappedText(view) {
|
|
2238
|
+
var _a;
|
|
2239
|
+
return view.type === ComponentType$1.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
|
|
2240
|
+
}
|
|
2241
|
+
// Compares the size spec to the option and returns whether they are equal or not.
|
|
2242
|
+
const isSizeCompatibleWithOption = ({ size, option, }) => {
|
|
2243
|
+
if (option === 'wrap') {
|
|
2244
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
|
|
2245
|
+
}
|
|
2246
|
+
if (option === 'fill') {
|
|
2247
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
|
|
2248
|
+
}
|
|
2249
|
+
return size.type === 'fixed';
|
|
2250
|
+
};
|
|
2251
|
+
const isGif = (url) => {
|
|
2252
|
+
var _a;
|
|
2253
|
+
if (typeof url !== 'string')
|
|
2254
|
+
return false;
|
|
2255
|
+
const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2256
|
+
return extension === 'gif';
|
|
2257
|
+
};
|
|
1016
2258
|
|
|
1017
2259
|
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
1018
2260
|
var t = {};
|
|
@@ -1120,7 +2362,7 @@ const ReactMessageTemplateImage = (_a) => {
|
|
|
1120
2362
|
if (hasError) {
|
|
1121
2363
|
return React.createElement(PlaceholderReactMessageTemplateImage, Object.assign({}, props));
|
|
1122
2364
|
}
|
|
1123
|
-
else if (tintColor) {
|
|
2365
|
+
else if (tintColor && !isGif(props.src)) {
|
|
1124
2366
|
return React.createElement(CanvasReactMessageTemplateImage, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
|
|
1125
2367
|
}
|
|
1126
2368
|
else {
|
|
@@ -1151,21 +2393,6 @@ const MessageProvider = (props) => {
|
|
|
1151
2393
|
};
|
|
1152
2394
|
const useMessageContext = () => React.useContext(MessageContext);
|
|
1153
2395
|
|
|
1154
|
-
function isWrappedText(view) {
|
|
1155
|
-
var _a;
|
|
1156
|
-
return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
|
|
1157
|
-
}
|
|
1158
|
-
// Compares the size spec to the option and returns whether they are equal or not.
|
|
1159
|
-
const isSizeCompatibleWithOption = ({ size, option, }) => {
|
|
1160
|
-
if (option === 'wrap') {
|
|
1161
|
-
return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
|
|
1162
|
-
}
|
|
1163
|
-
if (option === 'fill') {
|
|
1164
|
-
return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
|
|
1165
|
-
}
|
|
1166
|
-
return size.type === 'fixed';
|
|
1167
|
-
};
|
|
1168
|
-
|
|
1169
2396
|
/**
|
|
1170
2397
|
* Preserves a reference to the given callback function as an argument while the component is mounted.
|
|
1171
2398
|
* Wraps the given callback in React's Ref to preserve the reference.
|
|
@@ -1378,7 +2605,7 @@ function setBorderStyle(styles, borderWidth, borderColor, radius) {
|
|
|
1378
2605
|
}
|
|
1379
2606
|
}
|
|
1380
2607
|
function setViewStyle(styles, props) {
|
|
1381
|
-
var _a, _b, _c, _d;
|
|
2608
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1382
2609
|
const { viewStyle } = props;
|
|
1383
2610
|
if ((_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top)
|
|
1384
2611
|
styles['marginTop'] = Number(viewStyle.margin.top);
|
|
@@ -1388,6 +2615,9 @@ function setViewStyle(styles, props) {
|
|
|
1388
2615
|
styles['marginLeft'] = Number(viewStyle.margin.left);
|
|
1389
2616
|
if ((_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right)
|
|
1390
2617
|
styles['marginRight'] = Number(viewStyle.margin.right);
|
|
2618
|
+
const marginHorizontal = Number((_e = styles.marginLeft) !== null && _e !== void 0 ? _e : '0') + Number((_f = styles.marginRight) !== null && _f !== void 0 ? _f : '0');
|
|
2619
|
+
if (marginHorizontal > 0 && styles.width === '100%')
|
|
2620
|
+
styles.width = `calc(100% - ${marginHorizontal}px)`;
|
|
1391
2621
|
if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
|
|
1392
2622
|
styles['backgroundColor'] = viewStyle.backgroundColor;
|
|
1393
2623
|
// use JSON.stringify to escape special characters in image URL
|
|
@@ -1491,7 +2721,7 @@ function setTextStyle(styles, props, options) {
|
|
|
1491
2721
|
if ((width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
|
|
1492
2722
|
styles['maxWidth'] = '100%';
|
|
1493
2723
|
}
|
|
1494
|
-
if (props.type === ComponentType.Text) {
|
|
2724
|
+
if (props.type === ComponentType$1.Text) {
|
|
1495
2725
|
const { siblings, elemIdx } = options;
|
|
1496
2726
|
// To push out any subsequent components from the container,
|
|
1497
2727
|
// if a prior one is long enough to occupy an entire line
|
|
@@ -1535,19 +2765,24 @@ const ActionHandler = ({ className = '', style, children, props }) => {
|
|
|
1535
2765
|
const { recalculatedStyle, elemRef } = useRecalculateWidth({ style, props });
|
|
1536
2766
|
const { message, handleWebAction, handleCustomAction, handlePredefinedAction } = useMessageContext();
|
|
1537
2767
|
const onClick = (e) => {
|
|
1538
|
-
var _a, _b, _c, _d, _e;
|
|
2768
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1539
2769
|
if (((_a = props === null || props === void 0 ? void 0 : props.action) === null || _a === void 0 ? void 0 : _a.type) === 'web') {
|
|
1540
2770
|
if (handleWebAction) {
|
|
1541
|
-
handleWebAction
|
|
2771
|
+
handleWebAction(e, props.action, message);
|
|
1542
2772
|
}
|
|
1543
2773
|
else {
|
|
1544
2774
|
(_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();
|
|
1545
2775
|
}
|
|
1546
2776
|
}
|
|
1547
2777
|
if (((_d = props === null || props === void 0 ? void 0 : props.action) === null || _d === void 0 ? void 0 : _d.type) === 'custom') {
|
|
1548
|
-
|
|
2778
|
+
if (handleCustomAction) {
|
|
2779
|
+
handleCustomAction(e, props.action, message);
|
|
2780
|
+
}
|
|
2781
|
+
else {
|
|
2782
|
+
(_f = window === null || window === void 0 ? void 0 : window.open(returnUrl((_e = props === null || props === void 0 ? void 0 : props.action) === null || _e === void 0 ? void 0 : _e.data), '_blank', 'noopener noreferrer')) === null || _f === void 0 ? void 0 : _f.focus();
|
|
2783
|
+
}
|
|
1549
2784
|
}
|
|
1550
|
-
if (((
|
|
2785
|
+
if (((_g = props === null || props === void 0 ? void 0 : props.action) === null || _g === void 0 ? void 0 : _g.type) === 'uikit') {
|
|
1551
2786
|
handlePredefinedAction === null || handlePredefinedAction === void 0 ? void 0 : handlePredefinedAction(e, props.action, message);
|
|
1552
2787
|
}
|
|
1553
2788
|
};
|
|
@@ -1584,15 +2819,21 @@ function isFixedOrFill(view) {
|
|
|
1584
2819
|
(widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
|
|
1585
2820
|
return isFixedDiamension || isFill;
|
|
1586
2821
|
}
|
|
2822
|
+
function convertNewlinesToBr(text) {
|
|
2823
|
+
return text.split('\n').map((line, index) => (React.createElement(React.Fragment, { key: index },
|
|
2824
|
+
line,
|
|
2825
|
+
React.createElement("br", null))));
|
|
2826
|
+
}
|
|
1587
2827
|
function renderText(view) {
|
|
1588
2828
|
const { text, maxTextLines } = view;
|
|
1589
2829
|
const isToBeWrapped = isFixedOrFill(view);
|
|
1590
2830
|
const isMultiLine = maxTextLines != null && maxTextLines > 0;
|
|
2831
|
+
const convertedText = convertNewlinesToBr(text);
|
|
1591
2832
|
if (isMultiLine || isToBeWrapped) {
|
|
1592
2833
|
const wrapperStyling = Object.assign(Object.assign({}, ((isMultiLine || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
|
|
1593
|
-
return (React.createElement("div", { style: wrapperStyling }, isMultiLine ? React.createElement("div", { style: webkitLineClampStyles(maxTextLines) },
|
|
2834
|
+
return (React.createElement("div", { style: wrapperStyling }, isMultiLine ? React.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
|
|
1594
2835
|
}
|
|
1595
|
-
return
|
|
2836
|
+
return isMultiLine ? React.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
|
|
1596
2837
|
}
|
|
1597
2838
|
const renderer = createRenderer({
|
|
1598
2839
|
views: {
|
|
@@ -1609,13 +2850,16 @@ const renderer = createRenderer({
|
|
|
1609
2850
|
React.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 })));
|
|
1610
2851
|
},
|
|
1611
2852
|
textButton(props) {
|
|
1612
|
-
return (React.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
|
|
2853
|
+
return (React.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(Object.assign({ maxTextLines: 1 }, props))));
|
|
1613
2854
|
},
|
|
1614
2855
|
imageButton(props) {
|
|
1615
2856
|
var _a;
|
|
1616
2857
|
return (React.createElement(ActionHandler, { className: "sb-message-template__image-container sb-message-template__image-button", elementId: props.elementId, style: props.parsedProperties, props: props },
|
|
1617
2858
|
React.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 })));
|
|
1618
2859
|
},
|
|
2860
|
+
carouselView(props) {
|
|
2861
|
+
return React.createElement(Carousel, { gap: props.spacing }, props.children);
|
|
2862
|
+
},
|
|
1619
2863
|
},
|
|
1620
2864
|
});
|
|
1621
2865
|
const parser = createParser({
|
|
@@ -1655,18 +2899,21 @@ const parser = createParser({
|
|
|
1655
2899
|
setImageAspectRatio(styles, props);
|
|
1656
2900
|
return styles;
|
|
1657
2901
|
},
|
|
2902
|
+
mapCarouselProps(props, options) {
|
|
2903
|
+
const styles = getDefaultStyles();
|
|
2904
|
+
setViewProps(styles, props, options);
|
|
2905
|
+
return styles;
|
|
2906
|
+
},
|
|
1658
2907
|
});
|
|
1659
2908
|
createMessageTemplate({
|
|
1660
2909
|
renderer,
|
|
1661
2910
|
parser,
|
|
1662
|
-
Container: ({ children }) => {
|
|
1663
|
-
return (React.createElement("div", { className:
|
|
2911
|
+
Container: ({ children, className }) => {
|
|
2912
|
+
return (React.createElement("div", { className: `sb-message-template__parent ${className}`, style: {
|
|
1664
2913
|
display: 'flex',
|
|
1665
2914
|
flexDirection: 'column',
|
|
1666
2915
|
maxWidth: 400,
|
|
1667
|
-
backgroundColor: '#cecece',
|
|
1668
2916
|
marginBottom: 24,
|
|
1669
|
-
borderRadius: '8px',
|
|
1670
2917
|
} }, children));
|
|
1671
2918
|
},
|
|
1672
2919
|
});
|
|
@@ -1675,18 +2922,18 @@ var CustomTemplate = createMessageTemplate({
|
|
|
1675
2922
|
parser: parser,
|
|
1676
2923
|
renderer: renderer,
|
|
1677
2924
|
Container: function (_a) {
|
|
1678
|
-
var children = _a.children;
|
|
2925
|
+
var children = _a.children, className = _a.className;
|
|
1679
2926
|
return (React.createElement("div", { className: [
|
|
1680
|
-
|
|
2927
|
+
"sb-message-template__parent ".concat(className),
|
|
1681
2928
|
'sendbird-message-template__root',
|
|
1682
2929
|
].join(' ') }, children));
|
|
1683
2930
|
},
|
|
1684
2931
|
}).MessageTemplate;
|
|
1685
2932
|
function MessageTemplate(_a) {
|
|
1686
|
-
var templateItems = _a.templateItems;
|
|
1687
|
-
return React.createElement(CustomTemplate, { templateItems: templateItems });
|
|
2933
|
+
var templateItems = _a.templateItems, templateVersion = _a.templateVersion;
|
|
2934
|
+
return React.createElement(CustomTemplate, { templateItems: templateItems, templateVersion: templateVersion });
|
|
1688
2935
|
}
|
|
1689
2936
|
|
|
1690
2937
|
exports.MessageProvider = MessageProvider;
|
|
1691
2938
|
exports.MessageTemplate = MessageTemplate;
|
|
1692
|
-
//# sourceMappingURL=bundle-
|
|
2939
|
+
//# sourceMappingURL=bundle-BQRvcMvv.js.map
|