@sendbird/uikit-react 3.14.0-beta → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +78 -79
- package/App.js.map +1 -1
- package/CHANGELOG.md +101 -5
- package/Channel/components/ChannelHeader.js +29 -29
- package/Channel/components/ChannelUI.js +65 -65
- 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 +58 -58
- 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 +21 -24
- 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 +24 -25
- 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 +60 -59
- 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 +53 -52
- 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 +35 -35
- package/OpenChannel/components/OpenChannelMessageList.js +39 -39
- package/OpenChannel/components/OpenChannelUI.js +39 -39
- package/OpenChannel/context.js +17 -17
- package/OpenChannel.js +39 -39
- package/OpenChannelList/components/OpenChannelListUI.js +14 -14
- package/OpenChannelList/components/OpenChannelPreview.js +6 -6
- package/OpenChannelList/context.js +3 -3
- package/OpenChannelList.js +14 -14
- package/OpenChannelSettings/components/EditDetailsModal.js +15 -15
- package/OpenChannelSettings/components/OpenChannelProfile.js +15 -15
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +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 +11 -10
- 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-tL7Z4efR.js → bundle--v2l79xO.js} +2 -2
- package/chunks/{bundle-tL7Z4efR.js.map → bundle--v2l79xO.js.map} +1 -1
- package/chunks/{bundle-BcfbcVVS.js → bundle-65boKdRp.js} +1 -1
- package/chunks/bundle-65boKdRp.js.map +1 -0
- package/chunks/{bundle-BzmY6Ioa.js → bundle-B5vsennE.js} +6 -6
- package/chunks/bundle-B5vsennE.js.map +1 -0
- package/chunks/{bundle-CKqBhRZh.js → bundle-BFdttAaW.js} +1 -1
- package/chunks/{bundle-CKqBhRZh.js.map → bundle-BFdttAaW.js.map} +1 -1
- package/chunks/{bundle-DW2UIt7g.js → bundle-BJxRm-OS.js} +1 -1
- package/chunks/bundle-BJxRm-OS.js.map +1 -0
- package/chunks/{bundle-CPlEjTQQ.js → bundle-BKYbtWkn.js} +3 -3
- package/chunks/bundle-BKYbtWkn.js.map +1 -0
- package/chunks/{bundle-CsV5Pqhn.js → bundle-BN9xM02J.js} +1 -1
- package/chunks/bundle-BN9xM02J.js.map +1 -0
- package/chunks/{bundle-BE6Zgv3s.js → bundle-BQoN_-_d.js} +1 -1
- package/chunks/bundle-BQoN_-_d.js.map +1 -0
- package/chunks/{bundle-4YHx3jhU.js → bundle-BU3SRwZT.js} +1 -1
- package/chunks/bundle-BU3SRwZT.js.map +1 -0
- package/chunks/{bundle-DaAps-h8.js → bundle-BUC4DRq0.js} +1 -1
- package/chunks/bundle-BUC4DRq0.js.map +1 -0
- package/chunks/{bundle-BGPVh26h.js → bundle-Ba74MVBa.js} +2 -2
- package/chunks/{bundle-BGPVh26h.js.map → bundle-Ba74MVBa.js.map} +1 -1
- package/chunks/{bundle-DEPqhDQk.js → bundle-BaMugzjD.js} +1 -1
- package/chunks/bundle-BaMugzjD.js.map +1 -0
- package/chunks/{bundle-O8OKcGsA.js → bundle-BbRFaX0l.js} +1 -1
- package/chunks/bundle-BbRFaX0l.js.map +1 -0
- package/chunks/{bundle-DnX0-Kjr.js → bundle-BfvTBFop.js} +3 -3
- package/chunks/{bundle-DnX0-Kjr.js.map → bundle-BfvTBFop.js.map} +1 -1
- package/chunks/{bundle-BdnV2Mq3.js → bundle-BhXdj56o.js} +3 -3
- package/chunks/{bundle-BdnV2Mq3.js.map → bundle-BhXdj56o.js.map} +1 -1
- package/chunks/{bundle-Cbag41eX.js → bundle-BjWhPiF7.js} +3 -3
- package/chunks/bundle-BjWhPiF7.js.map +1 -0
- package/chunks/{bundle-Dm1_TUsQ.js → bundle-BsCYcxaN.js} +7 -7
- package/chunks/{bundle-Dm1_TUsQ.js.map → bundle-BsCYcxaN.js.map} +1 -1
- package/chunks/{bundle-BkNNtN1V.js → bundle-Bsg3ZeXI.js} +3 -3
- package/chunks/bundle-Bsg3ZeXI.js.map +1 -0
- package/chunks/{bundle-D01F_So9.js → bundle-BtLxIgDH.js} +10 -10
- package/chunks/{bundle-D01F_So9.js.map → bundle-BtLxIgDH.js.map} +1 -1
- package/chunks/{bundle-C00KC3uY.js → bundle-Bu4CHE14.js} +4 -4
- package/chunks/bundle-Bu4CHE14.js.map +1 -0
- package/chunks/{bundle-VAV0nvVl.js → bundle-BubacXNL.js} +1 -1
- package/chunks/{bundle-VAV0nvVl.js.map → bundle-BubacXNL.js.map} +1 -1
- package/chunks/{bundle-PoeV4u5o.js → bundle-C-mS5Dam.js} +40 -9
- package/{cjs/chunks/bundle-BubTAoq5.js.map → chunks/bundle-C-mS5Dam.js.map} +1 -1
- package/chunks/{bundle-Df7uYu02.js → bundle-C0fGI40C.js} +10 -10
- package/chunks/bundle-C0fGI40C.js.map +1 -0
- package/chunks/{bundle-CbKfkHfl.js → bundle-C4xjDmEt.js} +1 -1
- package/chunks/bundle-C4xjDmEt.js.map +1 -0
- package/chunks/{bundle-BdJeQIAi.js → bundle-C5Wf2y_6.js} +1 -1
- package/chunks/bundle-C5Wf2y_6.js.map +1 -0
- package/chunks/{bundle-DR5lvmY_.js → bundle-C8jQWzDU.js} +2 -2
- package/chunks/bundle-C8jQWzDU.js.map +1 -0
- package/chunks/{bundle-D4vlYCrG.js → bundle-CFYZBlok.js} +1 -1
- package/chunks/bundle-CFYZBlok.js.map +1 -0
- package/chunks/{bundle-DqPWGoAJ.js → bundle-CHtHakLU.js} +6 -6
- package/chunks/bundle-CHtHakLU.js.map +1 -0
- package/chunks/{bundle-DEsGEQb8.js → bundle-CI-NOqgi.js} +10 -10
- package/chunks/{bundle-DEsGEQb8.js.map → bundle-CI-NOqgi.js.map} +1 -1
- package/chunks/{bundle-DrKv7qiU.js → bundle-CIwNgqhu.js} +6 -6
- package/chunks/bundle-CIwNgqhu.js.map +1 -0
- package/chunks/{bundle-Bumce6iI.js → bundle-CMax-oWd.js} +1 -1
- package/chunks/bundle-CMax-oWd.js.map +1 -0
- package/chunks/{bundle-DKctNGC2.js → bundle-CThF5Krw.js} +5 -5
- package/chunks/{bundle-DKctNGC2.js.map → bundle-CThF5Krw.js.map} +1 -1
- package/chunks/{bundle-CJBaJoMx.js → bundle-CVtMSwfw.js} +7 -7
- package/chunks/{bundle-CJBaJoMx.js.map → bundle-CVtMSwfw.js.map} +1 -1
- package/chunks/{bundle-BYjHDpcR.js → bundle-CWVPqsi_.js} +3 -3
- package/chunks/bundle-CWVPqsi_.js.map +1 -0
- package/chunks/{bundle-CZbk43my.js → bundle-CWYkDVsf.js} +3 -3
- package/chunks/{bundle-CZbk43my.js.map → bundle-CWYkDVsf.js.map} +1 -1
- package/chunks/{bundle-ZJcHeU_o.js → bundle-CYIneUd3.js} +9 -9
- package/chunks/bundle-CYIneUd3.js.map +1 -0
- package/chunks/{bundle-DGSAqfvK.js → bundle-CaUvCYOg.js} +3 -3
- package/chunks/{bundle-DGSAqfvK.js.map → bundle-CaUvCYOg.js.map} +1 -1
- package/chunks/{bundle-C1UCPEjT.js → bundle-CaYPuZ9G.js} +1 -1
- package/chunks/bundle-CaYPuZ9G.js.map +1 -0
- package/chunks/{bundle-CfcTsxlD.js → bundle-CfcfVkxG.js} +1 -1
- package/chunks/{bundle-CfcTsxlD.js.map → bundle-CfcfVkxG.js.map} +1 -1
- package/chunks/{bundle-WT4kbHBE.js → bundle-Cl5_xPaV.js} +11 -11
- package/chunks/{bundle-WT4kbHBE.js.map → bundle-Cl5_xPaV.js.map} +1 -1
- package/chunks/{bundle-BFLCbnVa.js → bundle-CmZPkDe1.js} +4 -4
- package/chunks/{bundle-BFLCbnVa.js.map → bundle-CmZPkDe1.js.map} +1 -1
- package/chunks/{bundle-C-gNLxiH.js → bundle-CnzbHeuJ.js} +4 -4
- package/chunks/bundle-CnzbHeuJ.js.map +1 -0
- package/chunks/{bundle-Bo4dNQtg.js → bundle-Ct48juZF.js} +3 -3
- package/chunks/{bundle-Bo4dNQtg.js.map → bundle-Ct48juZF.js.map} +1 -1
- package/chunks/{bundle-BE9YtwxF.js → bundle-CuD6w3tY.js} +1 -1
- package/chunks/bundle-CuD6w3tY.js.map +1 -0
- package/chunks/{bundle-CT8aJQs5.js → bundle-CuW57Fa0.js} +4 -4
- package/chunks/{bundle-CT8aJQs5.js.map → bundle-CuW57Fa0.js.map} +1 -1
- package/chunks/{bundle-D87WTORg.js → bundle-CvZD4CjF.js} +3 -3
- package/chunks/bundle-CvZD4CjF.js.map +1 -0
- package/chunks/{bundle-B0A-GTy2.js → bundle-CwINP854.js} +1 -1
- package/chunks/bundle-CwINP854.js.map +1 -0
- package/chunks/{bundle-BiOWvuqq.js → bundle-Cy3rlDS2.js} +2 -2
- package/chunks/{bundle-BiOWvuqq.js.map → bundle-Cy3rlDS2.js.map} +1 -1
- package/chunks/{bundle-BnLycG5g.js → bundle-CznK5-Sd.js} +10 -10
- package/chunks/{bundle-BnLycG5g.js.map → bundle-CznK5-Sd.js.map} +1 -1
- package/chunks/{bundle-CJxhCCYf.js → bundle-D4k3lbic.js} +8 -8
- package/chunks/{bundle-CJxhCCYf.js.map → bundle-D4k3lbic.js.map} +1 -1
- package/chunks/{bundle-CquJpe2n.js → bundle-D6_jF6vA.js} +2 -2
- package/chunks/bundle-D6_jF6vA.js.map +1 -0
- package/chunks/{bundle-33BY7XhN.js → bundle-D81rUAiK.js} +3 -3
- package/chunks/bundle-D81rUAiK.js.map +1 -0
- package/chunks/{bundle-CWPkjiZ7.js → bundle-DF_LuHdb.js} +1 -1
- package/chunks/bundle-DF_LuHdb.js.map +1 -0
- package/chunks/{bundle-BjbYgCW9.js → bundle-DKfCP7IG.js} +1 -1
- package/chunks/bundle-DKfCP7IG.js.map +1 -0
- package/chunks/{bundle-DzD5ZPeu.js → bundle-DMs2iFV3.js} +4 -4
- package/chunks/bundle-DMs2iFV3.js.map +1 -0
- package/chunks/{bundle-CWvAVk8m.js → bundle-DO6PYt2s.js} +1 -1
- package/chunks/bundle-DO6PYt2s.js.map +1 -0
- package/chunks/{bundle-BRSrznG_.js → bundle-DPSsFTo9.js} +1 -1
- package/chunks/bundle-DPSsFTo9.js.map +1 -0
- package/chunks/{bundle-B9rl4lBQ.js → bundle-DRcme3Wk.js} +13 -12
- package/chunks/{bundle-B9rl4lBQ.js.map → bundle-DRcme3Wk.js.map} +1 -1
- package/chunks/{bundle-DPsySdlV.js → bundle-DcURn6BN.js} +2 -2
- package/chunks/bundle-DcURn6BN.js.map +1 -0
- package/chunks/{bundle-DM3wUgvd.js → bundle-Don9PlYG.js} +1 -1
- package/chunks/bundle-Don9PlYG.js.map +1 -0
- package/chunks/{bundle-Byxn68mh.js → bundle-DoqoSCJx.js} +1370 -120
- package/chunks/bundle-DoqoSCJx.js.map +1 -0
- package/chunks/{bundle-BegOh-X0.js → bundle-DrjAD_2v.js} +1 -1
- package/chunks/bundle-DrjAD_2v.js.map +1 -0
- package/chunks/{bundle-Blu2Cp4C.js → bundle-DuUoXuv1.js} +1 -1
- package/chunks/{bundle-Blu2Cp4C.js.map → bundle-DuUoXuv1.js.map} +1 -1
- package/chunks/{bundle-Bhs7U8wE.js → bundle-DzZlONIt.js} +2 -2
- package/chunks/{bundle-Bhs7U8wE.js.map → bundle-DzZlONIt.js.map} +1 -1
- package/chunks/{bundle-BqL00V4c.js → bundle-FVThTEKh.js} +5 -20
- package/chunks/{bundle-BqL00V4c.js.map → bundle-FVThTEKh.js.map} +1 -1
- package/chunks/{bundle-B-5nMQI8.js → bundle-Go8RJZ6S.js} +16 -16
- package/chunks/{bundle-B-5nMQI8.js.map → bundle-Go8RJZ6S.js.map} +1 -1
- package/chunks/{bundle-DfhDmd9y.js → bundle-HQX6RTqS.js} +1 -1
- package/chunks/bundle-HQX6RTqS.js.map +1 -0
- package/chunks/{bundle-BydX5Gik.js → bundle-KeJ_rVJL.js} +1 -1
- package/chunks/{bundle-BydX5Gik.js.map → bundle-KeJ_rVJL.js.map} +1 -1
- package/chunks/{bundle-FBDSQPhI.js → bundle-LL2dZ_t-.js} +14 -14
- package/chunks/{bundle-FBDSQPhI.js.map → bundle-LL2dZ_t-.js.map} +1 -1
- package/chunks/{bundle-Dcg5UJZ5.js → bundle-Y5rRHVbA.js} +1 -1
- package/chunks/bundle-Y5rRHVbA.js.map +1 -0
- package/chunks/{bundle-7DqcfMUP.js → bundle-YaC569om.js} +1 -1
- package/chunks/bundle-YaC569om.js.map +1 -0
- package/chunks/{bundle-CSIi4GHQ.js → bundle-aDOQN2rV.js} +1 -1
- package/chunks/bundle-aDOQN2rV.js.map +1 -0
- package/chunks/{bundle-DTniwDWL.js → bundle-abfFo17w.js} +57 -63
- package/chunks/bundle-abfFo17w.js.map +1 -0
- package/chunks/{bundle-f6zTWcHL.js → bundle-c_OhpzFv.js} +2 -2
- package/chunks/bundle-c_OhpzFv.js.map +1 -0
- package/chunks/{bundle-DbWpPftJ.js → bundle-gFk75Dds.js} +5 -5
- package/chunks/bundle-gFk75Dds.js.map +1 -0
- package/chunks/{bundle-B0hUzTR9.js → bundle-hWMpOZwq.js} +1 -1
- package/chunks/bundle-hWMpOZwq.js.map +1 -0
- package/chunks/{bundle-Bm9cdQdy.js → bundle-rA2Y0qFJ.js} +1 -1
- package/chunks/bundle-rA2Y0qFJ.js.map +1 -0
- package/chunks/{bundle-Ti1Y75Dm.js → bundle-rGg9UI8F.js} +2 -2
- package/chunks/bundle-rGg9UI8F.js.map +1 -0
- package/chunks/bundle-v1dt12FL.js +16 -0
- package/chunks/bundle-v1dt12FL.js.map +1 -0
- package/chunks/{bundle-DyaS04Hg.js → bundle-vsdOwl6R.js} +3 -3
- package/chunks/bundle-vsdOwl6R.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 +65 -65
- 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 +58 -58
- 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 +21 -24
- 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 +22 -23
- 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 +60 -59
- 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 +53 -52
- 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 +35 -35
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +39 -39
- package/cjs/OpenChannel/components/OpenChannelUI.js +39 -39
- package/cjs/OpenChannel/context.js +17 -17
- package/cjs/OpenChannel.js +39 -39
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +14 -14
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +6 -6
- package/cjs/OpenChannelList/context.js +3 -3
- package/cjs/OpenChannelList.js +14 -14
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +15 -15
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +15 -15
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +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 +11 -10
- 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-Ht75_VEx.js → bundle--n4D2PVF.js} +2 -2
- package/cjs/chunks/bundle--n4D2PVF.js.map +1 -0
- package/cjs/chunks/{bundle-DEQCIOPf.js → bundle-0NyPGfcV.js} +1 -1
- package/cjs/chunks/bundle-0NyPGfcV.js.map +1 -0
- package/cjs/chunks/{bundle-Di5APzpg.js → bundle-1Lraxvfp.js} +3 -3
- package/cjs/chunks/bundle-1Lraxvfp.js.map +1 -0
- package/cjs/chunks/{bundle-DPFRrny4.js → bundle-3ku2DsRp.js} +2 -2
- package/cjs/chunks/bundle-3ku2DsRp.js.map +1 -0
- package/cjs/chunks/{bundle-BmOkcO1e.js → bundle-7SR3bIHI.js} +1 -1
- package/cjs/chunks/bundle-7SR3bIHI.js.map +1 -0
- package/cjs/chunks/{bundle-DhbE_hFO.js → bundle-B04GCotY.js} +1 -1
- package/cjs/chunks/bundle-B04GCotY.js.map +1 -0
- package/cjs/chunks/{bundle-UNBazgOP.js → bundle-BAWPNqDt.js} +13 -12
- package/cjs/chunks/bundle-BAWPNqDt.js.map +1 -0
- package/cjs/chunks/{bundle-3HPlnxkl.js → bundle-BB5SwDry.js} +3 -3
- package/cjs/chunks/{bundle-3HPlnxkl.js.map → bundle-BB5SwDry.js.map} +1 -1
- package/cjs/chunks/{bundle-FDJnhm3r.js → bundle-BDam-wvP.js} +1 -1
- package/cjs/chunks/{bundle-FDJnhm3r.js.map → bundle-BDam-wvP.js.map} +1 -1
- package/cjs/chunks/{bundle-jp-5eI5e.js → bundle-BHoDcZuM.js} +3 -3
- package/cjs/chunks/bundle-BHoDcZuM.js.map +1 -0
- package/cjs/chunks/{bundle-lf9AeIkc.js → bundle-BQ8kBY7P.js} +3 -3
- package/cjs/chunks/{bundle-lf9AeIkc.js.map → bundle-BQ8kBY7P.js.map} +1 -1
- package/cjs/chunks/{bundle-CuhtyPjN.js → bundle-BZwhrU6K.js} +1 -1
- package/cjs/chunks/bundle-BZwhrU6K.js.map +1 -0
- package/cjs/chunks/{bundle-AxW84oGr.js → bundle-BaJn2YsZ.js} +1 -1
- package/cjs/chunks/bundle-BaJn2YsZ.js.map +1 -0
- package/cjs/chunks/{bundle-zUlseH3U.js → bundle-BdkEfjlQ.js} +10 -10
- package/cjs/chunks/{bundle-zUlseH3U.js.map → bundle-BdkEfjlQ.js.map} +1 -1
- package/cjs/chunks/{bundle-G2_KR7Mu.js → bundle-Bqn5UkGf.js} +7 -7
- package/cjs/chunks/bundle-Bqn5UkGf.js.map +1 -0
- package/cjs/chunks/{bundle-CidVlBMl.js → bundle-BvwX2pXU.js} +3 -3
- package/cjs/chunks/bundle-BvwX2pXU.js.map +1 -0
- package/cjs/chunks/{bundle-BkrtMQxo.js → bundle-BwuEkyq5.js} +1 -1
- package/cjs/chunks/bundle-BwuEkyq5.js.map +1 -0
- package/cjs/chunks/{bundle-CCEKPtKR.js → bundle-Bx_5BAxl.js} +1 -1
- package/cjs/chunks/bundle-Bx_5BAxl.js.map +1 -0
- package/cjs/chunks/{bundle-C9xOwqge.js → bundle-ByUOxOjA.js} +3 -3
- package/cjs/chunks/bundle-ByUOxOjA.js.map +1 -0
- package/cjs/chunks/{bundle-GZJzVB02.js → bundle-C1NORWsC.js} +4 -4
- package/cjs/chunks/bundle-C1NORWsC.js.map +1 -0
- package/cjs/chunks/{bundle-Cl34HO9m.js → bundle-CDD7rA5D.js} +40 -9
- package/cjs/chunks/bundle-CDD7rA5D.js.map +1 -0
- package/cjs/chunks/{bundle-B5RW0yuQ.js → bundle-CIoqC6d1.js} +1 -1
- package/cjs/chunks/bundle-CIoqC6d1.js.map +1 -0
- package/cjs/chunks/{bundle-CsCGO7nq.js → bundle-CM2Yesst.js} +2 -2
- package/cjs/chunks/bundle-CM2Yesst.js.map +1 -0
- package/cjs/chunks/{bundle-B5pxZS7a.js → bundle-CYRD0mhW.js} +1 -1
- package/cjs/chunks/bundle-CYRD0mhW.js.map +1 -0
- package/cjs/chunks/{bundle-BZyYPaEv.js → bundle-CcICQ161.js} +1 -1
- package/cjs/chunks/{bundle-BZyYPaEv.js.map → bundle-CcICQ161.js.map} +1 -1
- package/cjs/chunks/{bundle-Crhw0Zu1.js → bundle-CcejNHwV.js} +1 -1
- package/cjs/chunks/bundle-CcejNHwV.js.map +1 -0
- package/cjs/chunks/{bundle-C1YOhOl2.js → bundle-CjPaNItW.js} +6 -6
- package/cjs/chunks/bundle-CjPaNItW.js.map +1 -0
- package/cjs/chunks/{bundle-BDDfcS3c.js → bundle-Co8JsD2l.js} +1 -1
- package/cjs/chunks/bundle-Co8JsD2l.js.map +1 -0
- package/cjs/chunks/{bundle-BhRPdcn-.js → bundle-CpgiyizX.js} +1369 -119
- package/cjs/chunks/bundle-CpgiyizX.js.map +1 -0
- package/cjs/chunks/{bundle-pYqgDFla.js → bundle-Cq1mLH5J.js} +1 -1
- package/cjs/chunks/bundle-Cq1mLH5J.js.map +1 -0
- package/cjs/chunks/{bundle-Bc_3JLZG.js → bundle-Crb55m_S.js} +3 -3
- package/cjs/chunks/bundle-Crb55m_S.js.map +1 -0
- package/cjs/chunks/{bundle-DP_Z2ZCu.js → bundle-Ctjr6ytm.js} +2 -2
- package/cjs/chunks/bundle-Ctjr6ytm.js.map +1 -0
- package/cjs/chunks/{bundle-CtfNcymC.js → bundle-Cv_3sQEK.js} +1 -1
- package/cjs/chunks/bundle-Cv_3sQEK.js.map +1 -0
- package/cjs/chunks/{bundle-B212ojpX.js → bundle-D1LOTtRp.js} +2 -2
- package/cjs/chunks/{bundle-B212ojpX.js.map → bundle-D1LOTtRp.js.map} +1 -1
- package/cjs/chunks/{bundle-C2ABFLZ1.js → bundle-D2rrmfUO.js} +2 -2
- package/cjs/chunks/bundle-D2rrmfUO.js.map +1 -0
- package/cjs/chunks/{bundle-BubTAoq5.js → bundle-D69KMIe6.js} +4 -4
- package/cjs/chunks/bundle-D69KMIe6.js.map +1 -0
- package/cjs/chunks/{bundle-BKMGAY2l.js → bundle-DC4hSZ50.js} +2 -2
- package/cjs/chunks/{bundle-BKMGAY2l.js.map → bundle-DC4hSZ50.js.map} +1 -1
- package/cjs/chunks/{bundle-CSfRc5hY.js → bundle-DDm1Q65G.js} +3 -3
- package/cjs/chunks/bundle-DDm1Q65G.js.map +1 -0
- package/cjs/chunks/{bundle-mNfA1oxo.js → bundle-DJ64rHSo.js} +8 -8
- package/cjs/chunks/{bundle-mNfA1oxo.js.map → bundle-DJ64rHSo.js.map} +1 -1
- package/cjs/chunks/{bundle-XHpUo2d5.js → bundle-DOVeRCEG.js} +6 -6
- package/cjs/chunks/bundle-DOVeRCEG.js.map +1 -0
- package/cjs/chunks/{bundle-Chu9Um5P.js → bundle-DSsqgxx7.js} +1 -1
- package/cjs/chunks/bundle-DSsqgxx7.js.map +1 -0
- package/cjs/chunks/{bundle-BIaA_1Gt.js → bundle-DTNXVmlf.js} +1 -1
- package/cjs/chunks/bundle-DTNXVmlf.js.map +1 -0
- package/cjs/chunks/{bundle-BfLBf8rb.js → bundle-DUpA78AC.js} +4 -4
- package/cjs/chunks/bundle-DUpA78AC.js.map +1 -0
- package/cjs/chunks/{bundle-BZYotRJz.js → bundle-DWVQJ2gC.js} +1 -1
- package/cjs/chunks/bundle-DWVQJ2gC.js.map +1 -0
- package/cjs/chunks/{bundle-BUBaSa_-.js → bundle-DWwL0a4W.js} +11 -11
- package/cjs/chunks/{bundle-BUBaSa_-.js.map → bundle-DWwL0a4W.js.map} +1 -1
- package/cjs/chunks/{bundle-B3gE4-sg.js → bundle-DYH-Fpti.js} +4 -19
- package/cjs/chunks/{bundle-B3gE4-sg.js.map → bundle-DYH-Fpti.js.map} +1 -1
- package/cjs/chunks/{bundle-2pxnOYL4.js → bundle-Dcn5Xw_v.js} +4 -4
- package/cjs/chunks/{bundle-2pxnOYL4.js.map → bundle-Dcn5Xw_v.js.map} +1 -1
- package/cjs/chunks/{bundle-MdWTpHE3.js → bundle-Dg5cJzTw.js} +57 -63
- package/cjs/chunks/bundle-Dg5cJzTw.js.map +1 -0
- package/cjs/chunks/{bundle-DLZ9iVVC.js → bundle-Dhc8aysm.js} +3 -3
- package/cjs/chunks/bundle-Dhc8aysm.js.map +1 -0
- package/cjs/chunks/{bundle-viPU2Zrj.js → bundle-DoE4Q2WU.js} +1 -1
- package/cjs/chunks/bundle-DoE4Q2WU.js.map +1 -0
- package/cjs/chunks/{bundle-EroNh7Ac.js → bundle-DsxetdDB.js} +1 -1
- package/cjs/chunks/bundle-DsxetdDB.js.map +1 -0
- package/cjs/chunks/{bundle-tK8yFMGZ.js → bundle-DvowIJM9.js} +9 -9
- package/cjs/chunks/bundle-DvowIJM9.js.map +1 -0
- package/cjs/chunks/{bundle-DpgtZXbp.js → bundle-L3CfQ_hg.js} +14 -14
- package/cjs/chunks/{bundle-DpgtZXbp.js.map → bundle-L3CfQ_hg.js.map} +1 -1
- package/cjs/chunks/{bundle-BwwA3giM.js → bundle-LsedFW92.js} +2 -2
- package/cjs/chunks/bundle-LsedFW92.js.map +1 -0
- package/cjs/chunks/{bundle-CMoYluZj.js → bundle-N_1Gt5W3.js} +4 -4
- package/cjs/chunks/bundle-N_1Gt5W3.js.map +1 -0
- package/cjs/chunks/{bundle-z66HeEp3.js → bundle-QN_dssGC.js} +1 -1
- package/cjs/chunks/bundle-QN_dssGC.js.map +1 -0
- package/cjs/chunks/{bundle-BdG7Rc1R.js → bundle-TEaGoE63.js} +5 -5
- package/cjs/chunks/bundle-TEaGoE63.js.map +1 -0
- package/cjs/chunks/{bundle-6RaeE_-7.js → bundle-XORoItM6.js} +1 -1
- package/cjs/chunks/bundle-XORoItM6.js.map +1 -0
- package/cjs/chunks/{bundle-BSTb1mFt.js → bundle-ZARlfEpr.js} +5 -5
- package/cjs/chunks/bundle-ZARlfEpr.js.map +1 -0
- package/cjs/chunks/{bundle-DDSkFKJ4.js → bundle-_KPYoqvO.js} +1 -1
- package/cjs/chunks/bundle-_KPYoqvO.js.map +1 -0
- package/cjs/chunks/{bundle-DJbEnul6.js → bundle-cFWnX4Tf.js} +6 -6
- package/cjs/chunks/bundle-cFWnX4Tf.js.map +1 -0
- package/cjs/chunks/{bundle-DDM7FQ5E.js → bundle-gYlXAuPh.js} +7 -7
- package/cjs/chunks/bundle-gYlXAuPh.js.map +1 -0
- package/cjs/chunks/{bundle-CYBu-C6E.js → bundle-hQ7iLiTN.js} +1 -1
- package/cjs/chunks/bundle-hQ7iLiTN.js.map +1 -0
- package/cjs/chunks/{bundle-DUThNjHI.js → bundle-hVPEu0_c.js} +3 -3
- package/cjs/chunks/{bundle-DUThNjHI.js.map → bundle-hVPEu0_c.js.map} +1 -1
- package/cjs/chunks/{bundle-DytUGiju.js → bundle-ioAYAc1x.js} +2 -2
- package/cjs/chunks/bundle-ioAYAc1x.js.map +1 -0
- package/cjs/chunks/bundle-k-Y_BM9m.js +18 -0
- package/cjs/chunks/bundle-k-Y_BM9m.js.map +1 -0
- package/cjs/chunks/{bundle-lXC5D8Eq.js → bundle-lRPypcEP.js} +1 -1
- package/cjs/chunks/bundle-lRPypcEP.js.map +1 -0
- package/cjs/chunks/{bundle-C3gIbns_.js → bundle-lg2VZUfB.js} +16 -16
- package/cjs/chunks/bundle-lg2VZUfB.js.map +1 -0
- package/cjs/chunks/{bundle-CfxDEtAN.js → bundle-lwejARF-.js} +10 -10
- package/cjs/chunks/bundle-lwejARF-.js.map +1 -0
- package/cjs/chunks/{bundle-BZByKaLs.js → bundle-mgZT4o2L.js} +1 -1
- package/cjs/chunks/bundle-mgZT4o2L.js.map +1 -0
- package/cjs/chunks/{bundle-cjfTIYNo.js → bundle-n7yqWnYc.js} +1 -1
- package/cjs/chunks/bundle-n7yqWnYc.js.map +1 -0
- package/cjs/chunks/{bundle-wwwDjH0w.js → bundle-nbIOXEwY.js} +1 -1
- package/cjs/chunks/{bundle-wwwDjH0w.js.map → bundle-nbIOXEwY.js.map} +1 -1
- package/cjs/chunks/{bundle-uIEHfPv7.js → bundle-pDTpawXd.js} +1 -1
- package/cjs/chunks/bundle-pDTpawXd.js.map +1 -0
- package/cjs/chunks/{bundle-Bd5-Auhd.js → bundle-pJv3Q0cb.js} +1 -1
- package/cjs/chunks/bundle-pJv3Q0cb.js.map +1 -0
- package/cjs/chunks/{bundle-BPcaLWyG.js → bundle-pW3_ob-0.js} +1 -1
- package/cjs/chunks/bundle-pW3_ob-0.js.map +1 -0
- package/cjs/chunks/{bundle-NgDLJ4XU.js → bundle-qc5egsO_.js} +3 -3
- package/cjs/chunks/bundle-qc5egsO_.js.map +1 -0
- package/cjs/chunks/{bundle-BANWV5X0.js → bundle-sRcY6eTA.js} +10 -10
- package/cjs/chunks/{bundle-BANWV5X0.js.map → bundle-sRcY6eTA.js.map} +1 -1
- package/cjs/chunks/{bundle-0dm-rZLh.js → bundle-vsCAD9Ej.js} +3 -3
- package/cjs/chunks/bundle-vsCAD9Ej.js.map +1 -0
- package/cjs/chunks/{bundle-HLR6JcDU.js → bundle-xOjjMFaY.js} +1 -1
- package/cjs/chunks/bundle-xOjjMFaY.js.map +1 -0
- package/cjs/chunks/{bundle-BQc8sm8f.js → bundle-xn7uMkjF.js} +10 -10
- package/cjs/chunks/bundle-xn7uMkjF.js.map +1 -0
- 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 +138 -114
- 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 +63 -26
- 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 +9 -9
- package/cjs/ui/ReactionBadge.js +3 -3
- package/cjs/ui/ReactionButton.js +4 -4
- package/cjs/ui/SortByRow.js +2 -2
- package/cjs/ui/TemplateMessageItemBody.js +143 -73
- 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 +143 -148
- 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 +19 -19
- 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/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/MessageTemplateWrapper/index.d.ts +1 -1
- package/types/modules/GroupChannel/context/GroupChannelProvider.d.ts +6 -1
- 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/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 +0 -2
- 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 +137 -113
- 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 +63 -26
- 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 +9 -9
- package/ui/ReactionBadge.js +3 -3
- package/ui/ReactionButton.js +4 -4
- package/ui/SortByRow.js +2 -2
- package/ui/TemplateMessageItemBody.js +143 -73
- 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-1IYchI7A.js +0 -12
- package/chunks/bundle-1IYchI7A.js.map +0 -1
- package/chunks/bundle-33BY7XhN.js.map +0 -1
- package/chunks/bundle-4YHx3jhU.js.map +0 -1
- package/chunks/bundle-7DqcfMUP.js.map +0 -1
- package/chunks/bundle-B0A-GTy2.js.map +0 -1
- package/chunks/bundle-B0hUzTR9.js.map +0 -1
- package/chunks/bundle-BE6Zgv3s.js.map +0 -1
- package/chunks/bundle-BE9YtwxF.js.map +0 -1
- package/chunks/bundle-BRSrznG_.js.map +0 -1
- package/chunks/bundle-BYjHDpcR.js.map +0 -1
- package/chunks/bundle-BcfbcVVS.js.map +0 -1
- package/chunks/bundle-BdJeQIAi.js.map +0 -1
- package/chunks/bundle-BegOh-X0.js.map +0 -1
- package/chunks/bundle-BjbYgCW9.js.map +0 -1
- package/chunks/bundle-BkNNtN1V.js.map +0 -1
- package/chunks/bundle-Bm9cdQdy.js.map +0 -1
- package/chunks/bundle-Bumce6iI.js.map +0 -1
- package/chunks/bundle-Byxn68mh.js.map +0 -1
- package/chunks/bundle-BzmY6Ioa.js.map +0 -1
- package/chunks/bundle-C-gNLxiH.js.map +0 -1
- package/chunks/bundle-C00KC3uY.js.map +0 -1
- package/chunks/bundle-C1UCPEjT.js.map +0 -1
- package/chunks/bundle-CPlEjTQQ.js.map +0 -1
- package/chunks/bundle-CSIi4GHQ.js.map +0 -1
- package/chunks/bundle-CWPkjiZ7.js.map +0 -1
- package/chunks/bundle-CWvAVk8m.js.map +0 -1
- package/chunks/bundle-CbKfkHfl.js.map +0 -1
- package/chunks/bundle-Cbag41eX.js.map +0 -1
- package/chunks/bundle-CquJpe2n.js.map +0 -1
- package/chunks/bundle-CsV5Pqhn.js.map +0 -1
- package/chunks/bundle-D4vlYCrG.js.map +0 -1
- package/chunks/bundle-D87WTORg.js.map +0 -1
- package/chunks/bundle-DEPqhDQk.js.map +0 -1
- package/chunks/bundle-DM3wUgvd.js.map +0 -1
- package/chunks/bundle-DPsySdlV.js.map +0 -1
- package/chunks/bundle-DR5lvmY_.js.map +0 -1
- package/chunks/bundle-DTniwDWL.js.map +0 -1
- package/chunks/bundle-DW2UIt7g.js.map +0 -1
- package/chunks/bundle-DaAps-h8.js.map +0 -1
- package/chunks/bundle-DbWpPftJ.js.map +0 -1
- package/chunks/bundle-Dcg5UJZ5.js.map +0 -1
- package/chunks/bundle-Df7uYu02.js.map +0 -1
- package/chunks/bundle-DfhDmd9y.js.map +0 -1
- package/chunks/bundle-DqPWGoAJ.js.map +0 -1
- package/chunks/bundle-DrKv7qiU.js.map +0 -1
- package/chunks/bundle-DyaS04Hg.js.map +0 -1
- package/chunks/bundle-DzD5ZPeu.js.map +0 -1
- package/chunks/bundle-O8OKcGsA.js.map +0 -1
- package/chunks/bundle-PoeV4u5o.js.map +0 -1
- package/chunks/bundle-Ti1Y75Dm.js.map +0 -1
- package/chunks/bundle-ZJcHeU_o.js.map +0 -1
- package/chunks/bundle-f6zTWcHL.js.map +0 -1
- package/chunks/bundle-moA7aUUB.js +0 -11
- package/chunks/bundle-moA7aUUB.js.map +0 -1
- package/cjs/chunks/bundle-0dm-rZLh.js.map +0 -1
- package/cjs/chunks/bundle-6RaeE_-7.js.map +0 -1
- package/cjs/chunks/bundle-AxW84oGr.js.map +0 -1
- package/cjs/chunks/bundle-B5RW0yuQ.js.map +0 -1
- package/cjs/chunks/bundle-B5pxZS7a.js.map +0 -1
- package/cjs/chunks/bundle-BDDfcS3c.js.map +0 -1
- package/cjs/chunks/bundle-BIaA_1Gt.js.map +0 -1
- package/cjs/chunks/bundle-BPcaLWyG.js.map +0 -1
- package/cjs/chunks/bundle-BQc8sm8f.js.map +0 -1
- package/cjs/chunks/bundle-BR4VteQq.js +0 -15
- package/cjs/chunks/bundle-BR4VteQq.js.map +0 -1
- package/cjs/chunks/bundle-BSTb1mFt.js.map +0 -1
- package/cjs/chunks/bundle-BZByKaLs.js.map +0 -1
- package/cjs/chunks/bundle-BZYotRJz.js.map +0 -1
- package/cjs/chunks/bundle-Bc_3JLZG.js.map +0 -1
- package/cjs/chunks/bundle-Bd5-Auhd.js.map +0 -1
- package/cjs/chunks/bundle-BdG7Rc1R.js.map +0 -1
- package/cjs/chunks/bundle-BfLBf8rb.js.map +0 -1
- package/cjs/chunks/bundle-BhRPdcn-.js.map +0 -1
- package/cjs/chunks/bundle-BkrtMQxo.js.map +0 -1
- package/cjs/chunks/bundle-BmOkcO1e.js.map +0 -1
- package/cjs/chunks/bundle-BwwA3giM.js.map +0 -1
- package/cjs/chunks/bundle-ByYRydtT.js +0 -13
- package/cjs/chunks/bundle-ByYRydtT.js.map +0 -1
- package/cjs/chunks/bundle-C1YOhOl2.js.map +0 -1
- package/cjs/chunks/bundle-C2ABFLZ1.js.map +0 -1
- package/cjs/chunks/bundle-C3gIbns_.js.map +0 -1
- package/cjs/chunks/bundle-C9xOwqge.js.map +0 -1
- package/cjs/chunks/bundle-CCEKPtKR.js.map +0 -1
- package/cjs/chunks/bundle-CMoYluZj.js.map +0 -1
- package/cjs/chunks/bundle-CSfRc5hY.js.map +0 -1
- package/cjs/chunks/bundle-CYBu-C6E.js.map +0 -1
- package/cjs/chunks/bundle-CfxDEtAN.js.map +0 -1
- package/cjs/chunks/bundle-Chu9Um5P.js.map +0 -1
- package/cjs/chunks/bundle-CidVlBMl.js.map +0 -1
- package/cjs/chunks/bundle-Cl34HO9m.js.map +0 -1
- package/cjs/chunks/bundle-Crhw0Zu1.js.map +0 -1
- package/cjs/chunks/bundle-CsCGO7nq.js.map +0 -1
- package/cjs/chunks/bundle-CtfNcymC.js.map +0 -1
- package/cjs/chunks/bundle-CuhtyPjN.js.map +0 -1
- package/cjs/chunks/bundle-DDM7FQ5E.js.map +0 -1
- package/cjs/chunks/bundle-DDSkFKJ4.js.map +0 -1
- package/cjs/chunks/bundle-DEQCIOPf.js.map +0 -1
- package/cjs/chunks/bundle-DJbEnul6.js.map +0 -1
- package/cjs/chunks/bundle-DLZ9iVVC.js.map +0 -1
- package/cjs/chunks/bundle-DPFRrny4.js.map +0 -1
- package/cjs/chunks/bundle-DP_Z2ZCu.js.map +0 -1
- package/cjs/chunks/bundle-DhbE_hFO.js.map +0 -1
- package/cjs/chunks/bundle-Di5APzpg.js.map +0 -1
- package/cjs/chunks/bundle-DytUGiju.js.map +0 -1
- package/cjs/chunks/bundle-EroNh7Ac.js.map +0 -1
- package/cjs/chunks/bundle-G2_KR7Mu.js.map +0 -1
- package/cjs/chunks/bundle-GZJzVB02.js.map +0 -1
- package/cjs/chunks/bundle-HLR6JcDU.js.map +0 -1
- package/cjs/chunks/bundle-Ht75_VEx.js.map +0 -1
- package/cjs/chunks/bundle-MdWTpHE3.js.map +0 -1
- package/cjs/chunks/bundle-NgDLJ4XU.js.map +0 -1
- package/cjs/chunks/bundle-UNBazgOP.js.map +0 -1
- package/cjs/chunks/bundle-XHpUo2d5.js.map +0 -1
- package/cjs/chunks/bundle-cjfTIYNo.js.map +0 -1
- package/cjs/chunks/bundle-jp-5eI5e.js.map +0 -1
- package/cjs/chunks/bundle-lXC5D8Eq.js.map +0 -1
- package/cjs/chunks/bundle-pYqgDFla.js.map +0 -1
- package/cjs/chunks/bundle-tK8yFMGZ.js.map +0 -1
- package/cjs/chunks/bundle-uIEHfPv7.js.map +0 -1
- package/cjs/chunks/bundle-viPU2Zrj.js.map +0 -1
- package/cjs/chunks/bundle-z66HeEp3.js.map +0 -1
- package/cjs/ui/Carousel.js +0 -194
- package/cjs/ui/Carousel.js.map +0 -1
- package/ui/Carousel.js +0 -189
- 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,13 +1,18 @@
|
|
|
1
1
|
import React__default, { createContext, useState, useCallback, useContext, useRef, useMemo, useEffect } from 'react';
|
|
2
|
+
import './bundle-CfcfVkxG.js';
|
|
2
3
|
|
|
3
|
-
var ComponentType;
|
|
4
|
+
var ComponentType$1;
|
|
4
5
|
(function (ComponentType) {
|
|
5
6
|
ComponentType["Box"] = "box";
|
|
6
7
|
ComponentType["Text"] = "text";
|
|
7
8
|
ComponentType["Image"] = "image";
|
|
8
9
|
ComponentType["TextButton"] = "textButton";
|
|
9
10
|
ComponentType["ImageButton"] = "imageButton";
|
|
10
|
-
})(ComponentType || (ComponentType = {}));
|
|
11
|
+
})(ComponentType$1 || (ComponentType$1 = {}));
|
|
12
|
+
var CompositeComponentType$1;
|
|
13
|
+
(function (CompositeComponentType) {
|
|
14
|
+
CompositeComponentType["Carousel"] = "carouselView";
|
|
15
|
+
})(CompositeComponentType$1 || (CompositeComponentType$1 = {}));
|
|
11
16
|
|
|
12
17
|
// -------- Set property mapper
|
|
13
18
|
const MAPPER = () => undefined;
|
|
@@ -20,25 +25,29 @@ const createParser = (params) => {
|
|
|
20
25
|
mapImageProps: (params === null || params === void 0 ? void 0 : params.mapImageProps) || defaultMapper,
|
|
21
26
|
mapTextButtonProps: (params === null || params === void 0 ? void 0 : params.mapTextButtonProps) || defaultMapper,
|
|
22
27
|
mapImageButtonProps: (params === null || params === void 0 ? void 0 : params.mapImageButtonProps) || defaultMapper,
|
|
28
|
+
mapCarouselProps: (params === null || params === void 0 ? void 0 : params.mapCarouselProps) || defaultMapper,
|
|
23
29
|
};
|
|
24
30
|
return {
|
|
25
31
|
parse(item, options) {
|
|
26
32
|
switch (item.type) {
|
|
27
|
-
case ComponentType.Box: {
|
|
33
|
+
case ComponentType$1.Box: {
|
|
28
34
|
return { properties: mapper.mapBoxProps(item, options) };
|
|
29
35
|
}
|
|
30
|
-
case ComponentType.Text: {
|
|
36
|
+
case ComponentType$1.Text: {
|
|
31
37
|
return { properties: mapper.mapTextProps(item, options) };
|
|
32
38
|
}
|
|
33
|
-
case ComponentType.Image: {
|
|
39
|
+
case ComponentType$1.Image: {
|
|
34
40
|
return { properties: mapper.mapImageProps(item, options) };
|
|
35
41
|
}
|
|
36
|
-
case ComponentType.TextButton: {
|
|
42
|
+
case ComponentType$1.TextButton: {
|
|
37
43
|
return { properties: mapper.mapTextButtonProps(item, options) };
|
|
38
44
|
}
|
|
39
|
-
case ComponentType.ImageButton: {
|
|
45
|
+
case ComponentType$1.ImageButton: {
|
|
40
46
|
return { properties: mapper.mapImageButtonProps(item, options) };
|
|
41
47
|
}
|
|
48
|
+
case CompositeComponentType$1.Carousel: {
|
|
49
|
+
return { properties: mapper.mapCarouselProps(item, options) };
|
|
50
|
+
}
|
|
42
51
|
default:
|
|
43
52
|
return { properties: undefined };
|
|
44
53
|
}
|
|
@@ -48,16 +57,952 @@ const createParser = (params) => {
|
|
|
48
57
|
|
|
49
58
|
const FRAGMENT = ({ children }) => React__default.createElement(React__default.Fragment, null, children);
|
|
50
59
|
function createRenderer(params) {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
60
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52
61
|
return {
|
|
53
62
|
box: ((_a = params === null || params === void 0 ? void 0 : params.views) === null || _a === void 0 ? void 0 : _a.box) || FRAGMENT,
|
|
54
63
|
text: ((_b = params === null || params === void 0 ? void 0 : params.views) === null || _b === void 0 ? void 0 : _b.text) || FRAGMENT,
|
|
55
64
|
image: ((_c = params === null || params === void 0 ? void 0 : params.views) === null || _c === void 0 ? void 0 : _c.image) || FRAGMENT,
|
|
56
65
|
imageButton: ((_d = params === null || params === void 0 ? void 0 : params.views) === null || _d === void 0 ? void 0 : _d.imageButton) || FRAGMENT,
|
|
57
66
|
textButton: ((_e = params === null || params === void 0 ? void 0 : params.views) === null || _e === void 0 ? void 0 : _e.textButton) || FRAGMENT,
|
|
67
|
+
carouselView: ((_f = params === null || params === void 0 ? void 0 : params.views) === null || _f === void 0 ? void 0 : _f.carouselView) || FRAGMENT,
|
|
58
68
|
};
|
|
59
69
|
}
|
|
60
70
|
|
|
71
|
+
var ComponentType;
|
|
72
|
+
(function (ComponentType) {
|
|
73
|
+
ComponentType["Box"] = "box";
|
|
74
|
+
ComponentType["Text"] = "text";
|
|
75
|
+
ComponentType["Image"] = "image";
|
|
76
|
+
ComponentType["TextButton"] = "textButton";
|
|
77
|
+
ComponentType["ImageButton"] = "imageButton";
|
|
78
|
+
})(ComponentType || (ComponentType = {}));
|
|
79
|
+
var CompositeComponentType;
|
|
80
|
+
(function (CompositeComponentType) {
|
|
81
|
+
CompositeComponentType["Carousel"] = "carouselView";
|
|
82
|
+
})(CompositeComponentType || (CompositeComponentType = {}));
|
|
83
|
+
|
|
84
|
+
createContext({
|
|
85
|
+
sizes: {},
|
|
86
|
+
updateSize: function () { },
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var Layout$1;
|
|
90
|
+
(function (Layout) {
|
|
91
|
+
Layout["Row"] = "row";
|
|
92
|
+
Layout["Column"] = "column";
|
|
93
|
+
})(Layout$1 || (Layout$1 = {}));
|
|
94
|
+
var AlignValue$1;
|
|
95
|
+
(function (AlignValue) {
|
|
96
|
+
AlignValue["Center"] = "center";
|
|
97
|
+
AlignValue["Left"] = "left";
|
|
98
|
+
AlignValue["Right"] = "right";
|
|
99
|
+
AlignValue["Top"] = "top";
|
|
100
|
+
AlignValue["Bottom"] = "bottom";
|
|
101
|
+
})(AlignValue$1 || (AlignValue$1 = {}));
|
|
102
|
+
/**
|
|
103
|
+
* @description
|
|
104
|
+
* Caution: Numbers are passed as string types in the message template builder.
|
|
105
|
+
* Use `==` comparison instead of `===` comparison when using a regular enum instead of a string enum.
|
|
106
|
+
*/
|
|
107
|
+
var FlexSizeSpecValue$1;
|
|
108
|
+
(function (FlexSizeSpecValue) {
|
|
109
|
+
FlexSizeSpecValue[FlexSizeSpecValue["FillParent"] = 0] = "FillParent";
|
|
110
|
+
FlexSizeSpecValue[FlexSizeSpecValue["WrapContent"] = 1] = "WrapContent";
|
|
111
|
+
})(FlexSizeSpecValue$1 || (FlexSizeSpecValue$1 = {}));
|
|
112
|
+
var FontWeight$1;
|
|
113
|
+
(function (FontWeight) {
|
|
114
|
+
FontWeight["Normal"] = "normal";
|
|
115
|
+
FontWeight["Bold"] = "bold";
|
|
116
|
+
})(FontWeight$1 || (FontWeight$1 = {}));
|
|
117
|
+
var MediaContentMode$1;
|
|
118
|
+
(function (MediaContentMode) {
|
|
119
|
+
MediaContentMode["AspectFit"] = "aspectFit";
|
|
120
|
+
MediaContentMode["AspectFill"] = "aspectFill";
|
|
121
|
+
MediaContentMode["ScalesToFill"] = "scalesToFill";
|
|
122
|
+
})(MediaContentMode$1 || (MediaContentMode$1 = {}));
|
|
123
|
+
|
|
124
|
+
({
|
|
125
|
+
rootLayout: Layout$1.Column,
|
|
126
|
+
view: {
|
|
127
|
+
size: {
|
|
128
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
129
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.WrapContent },
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
box: {
|
|
133
|
+
layout: Layout$1.Row,
|
|
134
|
+
align: { vertical: AlignValue$1.Top, horizontal: AlignValue$1.Left },
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
var ActionType$1;
|
|
139
|
+
(function (ActionType) {
|
|
140
|
+
ActionType["Web"] = "web";
|
|
141
|
+
ActionType["Custom"] = "custom";
|
|
142
|
+
ActionType["UIKit"] = "uikit";
|
|
143
|
+
})(ActionType$1 || (ActionType$1 = {}));
|
|
144
|
+
|
|
145
|
+
var SUPPORTED_TEMPLATE_VERSIONS = [
|
|
146
|
+
1,
|
|
147
|
+
2, // Composite templates: Carousel
|
|
148
|
+
];
|
|
149
|
+
var isTemplateVersionSupported = function (templateVersion) {
|
|
150
|
+
if (!templateVersion)
|
|
151
|
+
return true;
|
|
152
|
+
return SUPPORTED_TEMPLATE_VERSIONS.includes(templateVersion);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
({
|
|
156
|
+
version: 1,
|
|
157
|
+
body: {
|
|
158
|
+
items: [
|
|
159
|
+
{
|
|
160
|
+
type: ComponentType.Image,
|
|
161
|
+
action: { type: ActionType$1.Web, data: 'https://docs.sendbird.com' },
|
|
162
|
+
height: { type: 'fixed', value: 236 },
|
|
163
|
+
viewStyle: {
|
|
164
|
+
padding: {
|
|
165
|
+
left: 4,
|
|
166
|
+
right: 4,
|
|
167
|
+
top: 4,
|
|
168
|
+
bottom: 4,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
172
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFill },
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: ComponentType.Box,
|
|
176
|
+
layout: Layout$1.Column,
|
|
177
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
178
|
+
height: { type: 'fixed', value: 200 },
|
|
179
|
+
items: [
|
|
180
|
+
{
|
|
181
|
+
type: ComponentType.Box,
|
|
182
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
183
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
184
|
+
viewStyle: { backgroundColor: '#fa6464' },
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: ComponentType.Box,
|
|
188
|
+
layout: Layout$1.Column,
|
|
189
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
190
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.WrapContent },
|
|
191
|
+
viewStyle: { backgroundColor: '#ffaf5c' },
|
|
192
|
+
items: [
|
|
193
|
+
{
|
|
194
|
+
type: ComponentType.Text,
|
|
195
|
+
text: 'Message',
|
|
196
|
+
align: { horizontal: AlignValue$1.Center, vertical: AlignValue$1.Center },
|
|
197
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
198
|
+
height: { type: 'fixed', value: 50 },
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
type: ComponentType.Image,
|
|
202
|
+
action: { type: ActionType$1.Web, data: 'https://docs.sendbird.com' },
|
|
203
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
204
|
+
height: { type: 'fixed', value: 50 },
|
|
205
|
+
imageUrl: 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
206
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFill },
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
type: ComponentType.Box,
|
|
212
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
213
|
+
height: { type: 'fixed', value: 20 },
|
|
214
|
+
viewStyle: { backgroundColor: '#ffe450' },
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
type: ComponentType.Box,
|
|
218
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
219
|
+
height: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
220
|
+
viewStyle: { backgroundColor: '#329a1b' },
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: ComponentType.Box,
|
|
226
|
+
viewStyle: { padding: { top: 12, bottom: 12, left: 12, right: 12 } },
|
|
227
|
+
layout: Layout$1.Column,
|
|
228
|
+
items: [
|
|
229
|
+
{
|
|
230
|
+
type: ComponentType.Box,
|
|
231
|
+
align: { horizontal: AlignValue$1.Left, vertical: AlignValue$1.Center },
|
|
232
|
+
layout: Layout$1.Row,
|
|
233
|
+
viewStyle: {
|
|
234
|
+
borderWidth: 1,
|
|
235
|
+
borderColor: '#72723f',
|
|
236
|
+
},
|
|
237
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
238
|
+
height: { type: 'fixed', value: 150 },
|
|
239
|
+
items: [
|
|
240
|
+
{
|
|
241
|
+
type: ComponentType.Text,
|
|
242
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
243
|
+
height: { type: 'fixed', value: 50 },
|
|
244
|
+
text: 'Sample1 text',
|
|
245
|
+
maxTextLines: 1,
|
|
246
|
+
align: { vertical: AlignValue$1.Center, horizontal: AlignValue$1.Left },
|
|
247
|
+
viewStyle: {
|
|
248
|
+
backgroundColor: '#cc4400',
|
|
249
|
+
},
|
|
250
|
+
textStyle: {
|
|
251
|
+
size: 16,
|
|
252
|
+
color: '#f8f8f8',
|
|
253
|
+
weight: FontWeight$1.Bold,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
type: ComponentType.ImageButton,
|
|
258
|
+
action: { type: ActionType$1.UIKit, data: 'uikit://delete' },
|
|
259
|
+
width: { type: 'fixed', value: 20 },
|
|
260
|
+
height: { type: 'fixed', value: 20 },
|
|
261
|
+
imageUrl: 'https://file-ap-1.sendbird.com/5b5379aa73fd460da22ffaf9a61d0d7f.png',
|
|
262
|
+
imageStyle: { contentMode: MediaContentMode$1.AspectFit },
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
type: ComponentType.Text,
|
|
268
|
+
viewStyle: { padding: { top: 6, bottom: 12, left: 0, right: 0 } },
|
|
269
|
+
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.',
|
|
270
|
+
maxTextLines: 2,
|
|
271
|
+
textStyle: { size: 14, color: '#e10000' },
|
|
272
|
+
width: { type: 'fixed', value: 200 },
|
|
273
|
+
height: { type: 'fixed', value: 50 },
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
type: ComponentType.TextButton,
|
|
277
|
+
action: { type: ActionType$1.Web, data: 'https://www.daum.net' },
|
|
278
|
+
text: 'Button 3',
|
|
279
|
+
textStyle: { size: 14, color: '#742ddd', weight: FontWeight$1.Bold },
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
({
|
|
287
|
+
'version': 1,
|
|
288
|
+
'body': {
|
|
289
|
+
'items': [
|
|
290
|
+
{
|
|
291
|
+
'type': ComponentType.Image,
|
|
292
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.naver.com/' },
|
|
293
|
+
'height': { 'type': 'fixed', 'value': 136 },
|
|
294
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
295
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
'type': ComponentType.Box,
|
|
299
|
+
'viewStyle': { 'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 }, backgroundColor: '#cccccc' },
|
|
300
|
+
'layout': Layout$1.Column,
|
|
301
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
302
|
+
'items': [
|
|
303
|
+
{
|
|
304
|
+
'type': ComponentType.Box,
|
|
305
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
306
|
+
'layout': Layout$1.Row,
|
|
307
|
+
'items': [
|
|
308
|
+
{
|
|
309
|
+
'type': ComponentType.TextButton,
|
|
310
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
311
|
+
width: { type: 'fixed', value: 150 },
|
|
312
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 } },
|
|
313
|
+
'text': 'Button 2',
|
|
314
|
+
'textStyle': { 'size': 14, 'weight': FontWeight$1.Bold },
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
'type': ComponentType.TextButton,
|
|
318
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
319
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
320
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 } },
|
|
321
|
+
'text': 'Button 3',
|
|
322
|
+
'textStyle': { 'size': 14, 'weight': FontWeight$1.Bold },
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
'type': ComponentType.Box,
|
|
328
|
+
width: { type: 'flex', value: FlexSizeSpecValue$1.FillParent },
|
|
329
|
+
'layout': Layout$1.Row,
|
|
330
|
+
'items': [
|
|
331
|
+
{
|
|
332
|
+
'type': ComponentType.Text,
|
|
333
|
+
'text': 'Sample2 text',
|
|
334
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
335
|
+
'maxTextLines': 1,
|
|
336
|
+
'textStyle': { 'size': 16, 'weight': FontWeight$1.Bold },
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
'type': ComponentType.ImageButton,
|
|
340
|
+
'action': { 'type': ActionType$1.UIKit, 'data': 'uikit://delete' },
|
|
341
|
+
'width': { 'type': 'fixed', 'value': 20 },
|
|
342
|
+
'height': { 'type': 'fixed', 'value': 20 },
|
|
343
|
+
'imageUrl': 'https://file-ap-1.sendbird.com/5b5379aa73fd460da22ffaf9a61d0d7f.png',
|
|
344
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFit },
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
'type': ComponentType.Text,
|
|
350
|
+
'viewStyle': { 'padding': { 'top': 6, 'bottom': 12, 'left': 0, 'right': 0 } },
|
|
351
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
352
|
+
'textStyle': { 'size': 14 },
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
({
|
|
360
|
+
'version': 1,
|
|
361
|
+
'body': {
|
|
362
|
+
'items': [
|
|
363
|
+
{
|
|
364
|
+
'type': ComponentType.Box,
|
|
365
|
+
'viewStyle': { 'backgroundColor': '#ffffff', 'borderWidth': 1, 'borderColor': '#eeeeee', 'radius': 16 },
|
|
366
|
+
'layout': Layout$1.Column,
|
|
367
|
+
'items': [
|
|
368
|
+
{
|
|
369
|
+
'type': ComponentType.Image,
|
|
370
|
+
'height': { 'type': 'fixed', 'value': 200 },
|
|
371
|
+
'imageUrl': 'https://img.freepik.com/free-vector/cartoon-happy-hours-background_52683-81243.jpg?w=2000&t=st=1666689198~exp=1666689798~hmac=23109d44ba03deee7aee069cbeebfcb48fa27f85e53c1cafc5d5d7345f1a2041',
|
|
372
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
'type': ComponentType.Box,
|
|
376
|
+
'viewStyle': { 'padding': { 'top': 15, 'bottom': 15, 'left': 15, 'right': 15 } },
|
|
377
|
+
'layout': Layout$1.Column,
|
|
378
|
+
'items': [
|
|
379
|
+
{
|
|
380
|
+
'type': ComponentType.Text,
|
|
381
|
+
'text': "Don't miss these deals today",
|
|
382
|
+
'maxTextLines': 1,
|
|
383
|
+
'textStyle': { 'size': 20, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
'type': ComponentType.Text,
|
|
387
|
+
'viewStyle': { 'margin': { 'top': 5, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
388
|
+
'text': 'Pay with Maya and get cashback!',
|
|
389
|
+
'maxTextLines': 1,
|
|
390
|
+
'textStyle': { 'size': 14, 'color': '#e10000' },
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
'type': ComponentType.Box,
|
|
394
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
395
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
396
|
+
'layout': Layout$1.Row,
|
|
397
|
+
'items': [
|
|
398
|
+
{
|
|
399
|
+
'type': ComponentType.Image,
|
|
400
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
401
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
402
|
+
'viewStyle': {
|
|
403
|
+
'backgroundColor': '#ffffff',
|
|
404
|
+
'borderWidth': 1,
|
|
405
|
+
'borderColor': '#eeeeee',
|
|
406
|
+
'radius': 25,
|
|
407
|
+
},
|
|
408
|
+
'imageUrl': 'https://yt3.ggpht.com/ytc/AMLnZu8Kg89ymE7qt5bsS9vMqi9h2aHiN6m9ID-IgxR6-Q=s900-c-k-c0x00ffffff-no-rj',
|
|
409
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
'type': ComponentType.Box,
|
|
413
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
414
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
415
|
+
'layout': Layout$1.Column,
|
|
416
|
+
'items': [
|
|
417
|
+
{
|
|
418
|
+
'type': ComponentType.Text,
|
|
419
|
+
'text': 'Meralco',
|
|
420
|
+
'maxTextLines': 1,
|
|
421
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
'type': ComponentType.Text,
|
|
425
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
426
|
+
'text': '30% cashback, P300 min spend',
|
|
427
|
+
'maxTextLines': 1,
|
|
428
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
'type': ComponentType.Box,
|
|
436
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
437
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
438
|
+
'layout': Layout$1.Row,
|
|
439
|
+
'items': [
|
|
440
|
+
{
|
|
441
|
+
'type': ComponentType.Image,
|
|
442
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
443
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
444
|
+
'viewStyle': {
|
|
445
|
+
'backgroundColor': '#ffffff',
|
|
446
|
+
'borderWidth': 1,
|
|
447
|
+
'borderColor': '#eeeeee',
|
|
448
|
+
'radius': 25,
|
|
449
|
+
},
|
|
450
|
+
'imageUrl': 'https://1000logos.net/wp-content/uploads/2021/12/Globe-Telecom-logo.png',
|
|
451
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill, tintColor: '#a49a9a' },
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
'type': ComponentType.Box,
|
|
455
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
456
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
457
|
+
'layout': Layout$1.Column,
|
|
458
|
+
'items': [
|
|
459
|
+
{
|
|
460
|
+
'type': ComponentType.Text,
|
|
461
|
+
'text': 'Globe',
|
|
462
|
+
'maxTextLines': 1,
|
|
463
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
'type': ComponentType.Text,
|
|
467
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
468
|
+
'text': '30% cashback, P300 min spend',
|
|
469
|
+
'maxTextLines': 1,
|
|
470
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
471
|
+
},
|
|
472
|
+
],
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
'type': ComponentType.Box,
|
|
478
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
479
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
480
|
+
'layout': Layout$1.Row,
|
|
481
|
+
'items': [
|
|
482
|
+
{
|
|
483
|
+
'type': ComponentType.Image,
|
|
484
|
+
'width': { 'type': 'fixed', 'value': 50 },
|
|
485
|
+
'height': { 'type': 'fixed', 'value': 50 },
|
|
486
|
+
'viewStyle': {
|
|
487
|
+
'backgroundColor': '#ffffff',
|
|
488
|
+
'borderWidth': 1,
|
|
489
|
+
'borderColor': '#eeeeee',
|
|
490
|
+
'radius': 25,
|
|
491
|
+
},
|
|
492
|
+
'imageUrl': 'https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Cignal.svg/640px-Cignal.svg.png',
|
|
493
|
+
'imageStyle': { 'contentMode': MediaContentMode$1.AspectFill },
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
'type': ComponentType.Box,
|
|
497
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
498
|
+
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
499
|
+
'layout': Layout$1.Column,
|
|
500
|
+
'items': [
|
|
501
|
+
{
|
|
502
|
+
'type': ComponentType.Text,
|
|
503
|
+
'text': 'Cignal',
|
|
504
|
+
'maxTextLines': 1,
|
|
505
|
+
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
'type': ComponentType.Text,
|
|
509
|
+
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
510
|
+
'text': '30% cashback, P300 min spend',
|
|
511
|
+
'maxTextLines': 1,
|
|
512
|
+
'textStyle': { 'size': 12, 'color': '#610000', 'weight': FontWeight$1.Bold },
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
'type': ComponentType.Box,
|
|
520
|
+
'align': { 'horizontal': AlignValue$1.Left, 'vertical': AlignValue$1.Center },
|
|
521
|
+
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
522
|
+
'layout': Layout$1.Row,
|
|
523
|
+
'items': [
|
|
524
|
+
{
|
|
525
|
+
'type': ComponentType.TextButton,
|
|
526
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
527
|
+
'viewStyle': {
|
|
528
|
+
'backgroundColor': '#e0e0e0',
|
|
529
|
+
'radius': 16,
|
|
530
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 },
|
|
531
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
532
|
+
},
|
|
533
|
+
'text': 'Learn more',
|
|
534
|
+
'textStyle': { 'size': 15, 'color': '#e10000', 'weight': FontWeight$1.Bold },
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
'type': ComponentType.TextButton,
|
|
538
|
+
'action': { 'type': ActionType$1.Web, 'data': 'https://www.daum.net' },
|
|
539
|
+
'viewStyle': {
|
|
540
|
+
'backgroundColor': '#e10000',
|
|
541
|
+
'radius': 16,
|
|
542
|
+
'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 },
|
|
543
|
+
'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 },
|
|
544
|
+
},
|
|
545
|
+
'text': 'Pay now',
|
|
546
|
+
'textStyle': { 'size': 15, 'color': '#ffffff', 'weight': FontWeight$1.Bold },
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
},
|
|
550
|
+
],
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
},
|
|
554
|
+
],
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
({
|
|
558
|
+
'version': 1,
|
|
559
|
+
'body': {
|
|
560
|
+
'items': [
|
|
561
|
+
{
|
|
562
|
+
'type': ComponentType.Box,
|
|
563
|
+
'layout': Layout$1.Column,
|
|
564
|
+
'items': [
|
|
565
|
+
{
|
|
566
|
+
'type': ComponentType.Image,
|
|
567
|
+
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
|
|
568
|
+
'metaData': {
|
|
569
|
+
'pixelWidth': 512,
|
|
570
|
+
'pixelHeight': 512,
|
|
571
|
+
},
|
|
572
|
+
'imageStyle': {
|
|
573
|
+
'tintColor': '#44ff1188',
|
|
574
|
+
},
|
|
575
|
+
viewStyle: {
|
|
576
|
+
'padding': {
|
|
577
|
+
'top': 12,
|
|
578
|
+
'right': 12,
|
|
579
|
+
'bottom': 12,
|
|
580
|
+
'left': 12,
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
'type': ComponentType.Box,
|
|
586
|
+
'viewStyle': {
|
|
587
|
+
'padding': {
|
|
588
|
+
'top': 12,
|
|
589
|
+
'right': 12,
|
|
590
|
+
'bottom': 12,
|
|
591
|
+
'left': 12,
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
'layout': Layout$1.Column,
|
|
595
|
+
'items': [
|
|
596
|
+
{
|
|
597
|
+
'type': ComponentType.Box,
|
|
598
|
+
'layout': Layout$1.Row,
|
|
599
|
+
'items': [
|
|
600
|
+
{
|
|
601
|
+
'type': ComponentType.Box,
|
|
602
|
+
'layout': Layout$1.Column,
|
|
603
|
+
'items': [
|
|
604
|
+
{
|
|
605
|
+
'type': ComponentType.Text,
|
|
606
|
+
'text': 'hi',
|
|
607
|
+
'maxTextLines': 3,
|
|
608
|
+
'viewStyle': {
|
|
609
|
+
'padding': {
|
|
610
|
+
'top': 0,
|
|
611
|
+
'bottom': 6,
|
|
612
|
+
'left': 0,
|
|
613
|
+
'right': 0,
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
'textStyle': {
|
|
617
|
+
'size': 16,
|
|
618
|
+
'weight': FontWeight$1.Bold,
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
'type': ComponentType.Text,
|
|
623
|
+
'text': 'bye',
|
|
624
|
+
'maxTextLines': 10,
|
|
625
|
+
'textStyle': {
|
|
626
|
+
'size': 14,
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
],
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
'type': ComponentType.ImageButton,
|
|
633
|
+
'action': {
|
|
634
|
+
'type': ActionType$1.UIKit,
|
|
635
|
+
'data': 'sendbirduikit://delete',
|
|
636
|
+
},
|
|
637
|
+
'width': {
|
|
638
|
+
'type': 'fixed',
|
|
639
|
+
'value': 20,
|
|
640
|
+
},
|
|
641
|
+
'height': {
|
|
642
|
+
'type': 'fixed',
|
|
643
|
+
'value': 20,
|
|
644
|
+
},
|
|
645
|
+
'metaData': {
|
|
646
|
+
'pixelWidth': 60,
|
|
647
|
+
'pixelHeight': 60,
|
|
648
|
+
},
|
|
649
|
+
'imageUrl': 'https://dxstmhyqfqr1o.cloudfront.net/sendbird-message-builder/icon-more.png',
|
|
650
|
+
'imageStyle': {
|
|
651
|
+
'tintColor': '#ff8d5a',
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
],
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
'type': ComponentType.Box,
|
|
658
|
+
'layout': Layout$1.Column,
|
|
659
|
+
'items': [
|
|
660
|
+
{
|
|
661
|
+
'type': ComponentType.Box,
|
|
662
|
+
'viewStyle': {
|
|
663
|
+
'margin': {
|
|
664
|
+
'top': 16,
|
|
665
|
+
'bottom': 0,
|
|
666
|
+
'left': 0,
|
|
667
|
+
'right': 0,
|
|
668
|
+
},
|
|
669
|
+
},
|
|
670
|
+
'align': {
|
|
671
|
+
'horizontal': AlignValue$1.Left,
|
|
672
|
+
'vertical': AlignValue$1.Center,
|
|
673
|
+
},
|
|
674
|
+
'layout': Layout$1.Row,
|
|
675
|
+
'items': [
|
|
676
|
+
{
|
|
677
|
+
'type': ComponentType.Image,
|
|
678
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
|
|
679
|
+
'width': {
|
|
680
|
+
'type': 'fixed',
|
|
681
|
+
'value': 40,
|
|
682
|
+
},
|
|
683
|
+
'height': {
|
|
684
|
+
'type': 'fixed',
|
|
685
|
+
'value': 40,
|
|
686
|
+
},
|
|
687
|
+
'metaData': {
|
|
688
|
+
'pixelWidth': 512,
|
|
689
|
+
'pixelHeight': 512,
|
|
690
|
+
},
|
|
691
|
+
'viewStyle': {
|
|
692
|
+
'backgroundColor': '#BDBDBD',
|
|
693
|
+
'radius': 20,
|
|
694
|
+
},
|
|
695
|
+
'imageStyle': {
|
|
696
|
+
'contentMode': MediaContentMode$1.AspectFill,
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
'type': ComponentType.Box,
|
|
701
|
+
'viewStyle': {
|
|
702
|
+
'margin': {
|
|
703
|
+
'top': 0,
|
|
704
|
+
'bottom': 0,
|
|
705
|
+
'left': 12,
|
|
706
|
+
'right': 0,
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
'layout': Layout$1.Column,
|
|
710
|
+
'items': [
|
|
711
|
+
{
|
|
712
|
+
'type': ComponentType.Text,
|
|
713
|
+
'text': 'Chongbu',
|
|
714
|
+
'maxTextLines': 1,
|
|
715
|
+
'textStyle': {
|
|
716
|
+
'size': 16,
|
|
717
|
+
'weight': FontWeight$1.Bold,
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
'type': ComponentType.Text,
|
|
722
|
+
'viewStyle': {
|
|
723
|
+
'margin': {
|
|
724
|
+
'top': 4,
|
|
725
|
+
'bottom': 0,
|
|
726
|
+
'left': 0,
|
|
727
|
+
'right': 0,
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
'text': ' ',
|
|
731
|
+
'maxTextLines': 1,
|
|
732
|
+
'textStyle': {
|
|
733
|
+
'size': 14,
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
},
|
|
738
|
+
],
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
'type': ComponentType.Box,
|
|
742
|
+
'viewStyle': {
|
|
743
|
+
'margin': {
|
|
744
|
+
'top': 16,
|
|
745
|
+
'bottom': 0,
|
|
746
|
+
'left': 0,
|
|
747
|
+
'right': 0,
|
|
748
|
+
},
|
|
749
|
+
},
|
|
750
|
+
'align': {
|
|
751
|
+
'horizontal': AlignValue$1.Left,
|
|
752
|
+
'vertical': AlignValue$1.Center,
|
|
753
|
+
},
|
|
754
|
+
'layout': Layout$1.Row,
|
|
755
|
+
'items': [
|
|
756
|
+
{
|
|
757
|
+
'type': ComponentType.Image,
|
|
758
|
+
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
|
|
759
|
+
'width': {
|
|
760
|
+
'type': 'fixed',
|
|
761
|
+
'value': 40,
|
|
762
|
+
},
|
|
763
|
+
'height': {
|
|
764
|
+
'type': 'fixed',
|
|
765
|
+
'value': 40,
|
|
766
|
+
},
|
|
767
|
+
'metaData': {
|
|
768
|
+
'pixelWidth': 512,
|
|
769
|
+
'pixelHeight': 512,
|
|
770
|
+
},
|
|
771
|
+
'viewStyle': {
|
|
772
|
+
'backgroundColor': '#BDBDBD',
|
|
773
|
+
'radius': 20,
|
|
774
|
+
},
|
|
775
|
+
'imageStyle': {
|
|
776
|
+
'contentMode': MediaContentMode$1.AspectFill,
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
'type': ComponentType.Box,
|
|
781
|
+
'viewStyle': {
|
|
782
|
+
'margin': {
|
|
783
|
+
'top': 0,
|
|
784
|
+
'bottom': 0,
|
|
785
|
+
'left': 12,
|
|
786
|
+
'right': 0,
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
'layout': Layout$1.Column,
|
|
790
|
+
'items': [
|
|
791
|
+
{
|
|
792
|
+
'type': ComponentType.Text,
|
|
793
|
+
'text': 'Amanda',
|
|
794
|
+
'maxTextLines': 1,
|
|
795
|
+
'textStyle': {
|
|
796
|
+
'size': 16,
|
|
797
|
+
'weight': FontWeight$1.Bold,
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
'type': ComponentType.Text,
|
|
802
|
+
'viewStyle': {
|
|
803
|
+
'margin': {
|
|
804
|
+
'top': 4,
|
|
805
|
+
'bottom': 0,
|
|
806
|
+
'left': 0,
|
|
807
|
+
'right': 0,
|
|
808
|
+
},
|
|
809
|
+
},
|
|
810
|
+
'text': 'This is title message',
|
|
811
|
+
'maxTextLines': 1,
|
|
812
|
+
'textStyle': {
|
|
813
|
+
'size': 14,
|
|
814
|
+
},
|
|
815
|
+
},
|
|
816
|
+
],
|
|
817
|
+
},
|
|
818
|
+
],
|
|
819
|
+
},
|
|
820
|
+
],
|
|
821
|
+
},
|
|
822
|
+
],
|
|
823
|
+
},
|
|
824
|
+
],
|
|
825
|
+
},
|
|
826
|
+
],
|
|
827
|
+
},
|
|
828
|
+
});
|
|
829
|
+
({
|
|
830
|
+
'version': '1',
|
|
831
|
+
'body': {
|
|
832
|
+
'items': [
|
|
833
|
+
{
|
|
834
|
+
'type': 'box',
|
|
835
|
+
'layout': 'column',
|
|
836
|
+
height: { type: 'fixed', value: 600 },
|
|
837
|
+
'items': [
|
|
838
|
+
{
|
|
839
|
+
'type': 'box',
|
|
840
|
+
'layout': 'column',
|
|
841
|
+
'viewStyle': { 'radius': '8', 'padding': { 'top': '12', 'bottom': '12', 'left': '12', 'right': '12' } },
|
|
842
|
+
'items': [
|
|
843
|
+
{
|
|
844
|
+
'type': 'text',
|
|
845
|
+
'text': 'Title text',
|
|
846
|
+
'textStyle': { 'color': '#E0000000', 'size': '16', 'weight': 'bold' },
|
|
847
|
+
'maxTextLines': '5',
|
|
848
|
+
'viewStyle': {},
|
|
849
|
+
'action': { 'data': 'www.naver.com' },
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
'type': 'text',
|
|
853
|
+
'viewStyle': { 'margin': { 'top': '8', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
854
|
+
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
855
|
+
'textStyle': { 'color': '#E0000000', 'size': '14', 'weight': 'normal' },
|
|
856
|
+
'maxTextLines': '5',
|
|
857
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
'type': 'box',
|
|
861
|
+
'layout': 'row',
|
|
862
|
+
'viewStyle': { 'margin': { 'top': '12', 'right': '0', 'bottom': '0', 'left': '0' } },
|
|
863
|
+
'items': [
|
|
864
|
+
{
|
|
865
|
+
'type': 'textButton',
|
|
866
|
+
'viewStyle': {
|
|
867
|
+
'backgroundColor': '#E0E0E0',
|
|
868
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
869
|
+
},
|
|
870
|
+
'text': 'Button 1',
|
|
871
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
872
|
+
'maxTextLines': '5',
|
|
873
|
+
'action': { 'data': 'www.naver.com' },
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
'type': 'textButton',
|
|
877
|
+
'viewStyle': {
|
|
878
|
+
'backgroundColor': '#E0E0E0',
|
|
879
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
880
|
+
'margin': { 'left': '8', 'right': '0', 'top': '0', 'bottom': '0' },
|
|
881
|
+
},
|
|
882
|
+
'text': 'Button 2',
|
|
883
|
+
'textStyle': { 'color': '#742DDD', 'size': '14', 'weight': 'bold' },
|
|
884
|
+
'maxTextLines': '5',
|
|
885
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
886
|
+
},
|
|
887
|
+
],
|
|
888
|
+
},
|
|
889
|
+
],
|
|
890
|
+
'action': { 'data': 'https://www.naver.com' },
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
'type': 'image',
|
|
894
|
+
'viewStyle': {},
|
|
895
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
896
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
897
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
898
|
+
'imageUrl': 'https://file-preprod.sendbird.com/d03c08bb3f9041a88c1207b6bbf15ab8.png',
|
|
899
|
+
'metaData': { 'pixelWidth': '1062', 'pixelHeight': '1070' },
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
'type': 'textButton',
|
|
903
|
+
'viewStyle': {
|
|
904
|
+
'backgroundColor': '#E0E0E0',
|
|
905
|
+
'padding': { 'top': '10', 'bottom': '10', 'left': '20', 'right': '20' },
|
|
906
|
+
},
|
|
907
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
908
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
909
|
+
'text': 'Button',
|
|
910
|
+
'textStyle': { 'color': '#742DDD', 'size': '16', 'weight': 'normal' },
|
|
911
|
+
'maxTextLines': '5',
|
|
912
|
+
'action': { 'data': 'www.naver.com' },
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
'type': 'imageButton',
|
|
916
|
+
'viewStyle': {},
|
|
917
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
918
|
+
'height': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
919
|
+
'imageUrl': 'https://file-preprod.sendbird.com/38fdf5c1056f42b89a44b38155cc4b49.jpg',
|
|
920
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
921
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
922
|
+
'action': { 'data': 'www.naver.com' },
|
|
923
|
+
},
|
|
924
|
+
],
|
|
925
|
+
'viewStyle': {},
|
|
926
|
+
},
|
|
927
|
+
],
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
({
|
|
931
|
+
'version': 1,
|
|
932
|
+
'body': {
|
|
933
|
+
'items': [
|
|
934
|
+
{
|
|
935
|
+
'elementId': 'root',
|
|
936
|
+
'type': 'box',
|
|
937
|
+
'layout': 'column',
|
|
938
|
+
'width': {
|
|
939
|
+
'type': 'flex',
|
|
940
|
+
'value': FlexSizeSpecValue$1.FillParent,
|
|
941
|
+
},
|
|
942
|
+
'height': {
|
|
943
|
+
'type': 'flex',
|
|
944
|
+
'value': FlexSizeSpecValue$1.WrapContent,
|
|
945
|
+
},
|
|
946
|
+
'items': [
|
|
947
|
+
{
|
|
948
|
+
'type': 'text',
|
|
949
|
+
'viewStyle': {
|
|
950
|
+
'backgroundColor': '#a0c0ffff',
|
|
951
|
+
'margin': {
|
|
952
|
+
'top': 16,
|
|
953
|
+
'bottom': 16,
|
|
954
|
+
'left': 16,
|
|
955
|
+
'right': 16,
|
|
956
|
+
},
|
|
957
|
+
'padding': {
|
|
958
|
+
'top': 16,
|
|
959
|
+
'bottom': 16,
|
|
960
|
+
'left': 16,
|
|
961
|
+
'right': 16,
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
'text': 'Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap ',
|
|
965
|
+
'textStyle': {
|
|
966
|
+
'size': 14,
|
|
967
|
+
'color': '#222121e0',
|
|
968
|
+
'weight': 'normal',
|
|
969
|
+
},
|
|
970
|
+
'maxTextLines': 5,
|
|
971
|
+
'width': {
|
|
972
|
+
'type': 'flex',
|
|
973
|
+
'value': FlexSizeSpecValue$1.FillParent,
|
|
974
|
+
},
|
|
975
|
+
'height': {
|
|
976
|
+
'type': 'flex',
|
|
977
|
+
'value': 1,
|
|
978
|
+
},
|
|
979
|
+
'align': {
|
|
980
|
+
'horizontal': 'left',
|
|
981
|
+
'vertical': 'top',
|
|
982
|
+
},
|
|
983
|
+
'elementId': 'c0e15878-4984-408d-abaa-4b495c2e3872',
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
'type': 'imageButton',
|
|
987
|
+
'viewStyle': {
|
|
988
|
+
margin: {
|
|
989
|
+
left: 24,
|
|
990
|
+
right: 12,
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue$1.FillParent },
|
|
994
|
+
'height': { 'type': 'fixed', 'value': 250 },
|
|
995
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
996
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
997
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
998
|
+
'action': { 'data': 'www.naver.com' },
|
|
999
|
+
},
|
|
1000
|
+
],
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
});
|
|
1005
|
+
|
|
61
1006
|
var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
|
|
62
1007
|
var t = {};
|
|
63
1008
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -168,10 +1113,8 @@ const createMessageTemplate = (opts) => {
|
|
|
168
1113
|
const UnknownMessage = opts.UnknownMessage || (() => null);
|
|
169
1114
|
const parser = opts.parser || createParser();
|
|
170
1115
|
const renderer = opts.renderer || createRenderer();
|
|
171
|
-
const MessageTemplateBase = (
|
|
172
|
-
|
|
173
|
-
const renderItems = props.templateItems;
|
|
174
|
-
const parentLayout = (_a = props.parentLayout) !== null && _a !== void 0 ? _a : defaultProperties.box.layout;
|
|
1116
|
+
const MessageTemplateBase = ({ templateItems, parentLayout = defaultProperties.box.layout, isRoot = false, }) => {
|
|
1117
|
+
const renderItems = templateItems;
|
|
175
1118
|
return (React__default.createElement(React__default.Fragment, null, renderItems.map((item, index, siblings) => {
|
|
176
1119
|
const { properties } = parser.parse(item, { parentLayout, elemIdx: index, siblings });
|
|
177
1120
|
const props = {
|
|
@@ -181,20 +1124,30 @@ const createMessageTemplate = (opts) => {
|
|
|
181
1124
|
siblings,
|
|
182
1125
|
};
|
|
183
1126
|
switch (item.type) {
|
|
184
|
-
|
|
1127
|
+
// CompositeComponent should be top level component
|
|
1128
|
+
case CompositeComponentType$1.Carousel: {
|
|
1129
|
+
if (!isRoot) {
|
|
1130
|
+
throw new Error('Cannot parse template item as Carousel if the template item is not the root.');
|
|
1131
|
+
}
|
|
1132
|
+
if (!item.items || !Array.isArray(item.items) || item.items.length === 0) {
|
|
1133
|
+
throw new Error('Cannot parse template item as Carousel if carousel has no items.');
|
|
1134
|
+
}
|
|
1135
|
+
return (React__default.createElement(renderer.carouselView, Object.assign({}, item, props), item.items.map((items, index) => (React__default.createElement(MessageTemplateBase, { key: index, templateItems: items || [], parentLayout: parentLayout })))));
|
|
1136
|
+
}
|
|
1137
|
+
case ComponentType$1.Box: {
|
|
185
1138
|
return (React__default.createElement(renderer.box, Object.assign({}, item, props),
|
|
186
1139
|
React__default.createElement(MessageTemplateBase, { templateItems: item.items || [], parentLayout: item.layout })));
|
|
187
1140
|
}
|
|
188
|
-
case ComponentType.Text: {
|
|
1141
|
+
case ComponentType$1.Text: {
|
|
189
1142
|
return React__default.createElement(renderer.text, Object.assign({}, item, props));
|
|
190
1143
|
}
|
|
191
|
-
case ComponentType.Image: {
|
|
1144
|
+
case ComponentType$1.Image: {
|
|
192
1145
|
return React__default.createElement(renderer.image, Object.assign({}, item, props));
|
|
193
1146
|
}
|
|
194
|
-
case ComponentType.TextButton: {
|
|
1147
|
+
case ComponentType$1.TextButton: {
|
|
195
1148
|
return React__default.createElement(renderer.textButton, Object.assign({}, item, props));
|
|
196
1149
|
}
|
|
197
|
-
case ComponentType.ImageButton: {
|
|
1150
|
+
case ComponentType$1.ImageButton: {
|
|
198
1151
|
return React__default.createElement(renderer.imageButton, Object.assign({}, item, props));
|
|
199
1152
|
}
|
|
200
1153
|
default: {
|
|
@@ -205,11 +1158,24 @@ const createMessageTemplate = (opts) => {
|
|
|
205
1158
|
})));
|
|
206
1159
|
};
|
|
207
1160
|
return {
|
|
208
|
-
MessageTemplate: ({ parentLayout = defaultProperties.rootLayout, templateItems }) => {
|
|
1161
|
+
MessageTemplate: ({ parentLayout = defaultProperties.rootLayout, templateVersion, templateItems, }) => {
|
|
209
1162
|
const items = setTemplateItemId(templateItems);
|
|
1163
|
+
if (!isTemplateVersionSupported(templateVersion)) {
|
|
1164
|
+
/**
|
|
1165
|
+
* I choose to throw instead of returning UnknownMessage because UnknownMessage syntax (required prop: item) is not what UIKit wants.
|
|
1166
|
+
*/
|
|
1167
|
+
throw new Error(`Cannot parse template item due to unsupported template version: ${templateVersion}, ${SUPPORTED_TEMPLATE_VERSIONS}`);
|
|
1168
|
+
}
|
|
1169
|
+
let isCarousel = false;
|
|
1170
|
+
console.log('## items: ', JSON.stringify(items));
|
|
1171
|
+
isCarousel = items[0].type === CompositeComponentType$1.Carousel;
|
|
1172
|
+
console.log('## isCarousel: ', isCarousel);
|
|
1173
|
+
// if (Array.isArray(items) && items.length > 0) {
|
|
1174
|
+
// isCarousel = items[0].type === CompositeComponentType.Carousel;
|
|
1175
|
+
// }
|
|
210
1176
|
return (React__default.createElement(SizeContextProvider, null,
|
|
211
|
-
React__default.createElement(Container,
|
|
212
|
-
React__default.createElement(MessageTemplateBase, { parentLayout: parentLayout, templateItems: items }))));
|
|
1177
|
+
React__default.createElement(Container, { className: isCarousel ? 'sb-message-template__parent_for_carousel' : '' },
|
|
1178
|
+
React__default.createElement(MessageTemplateBase, { parentLayout: parentLayout, templateItems: items, isRoot: true }))));
|
|
213
1179
|
},
|
|
214
1180
|
MessageTemplateBase,
|
|
215
1181
|
};
|
|
@@ -241,7 +1207,7 @@ const alignInFlex = (align) => {
|
|
|
241
1207
|
body: {
|
|
242
1208
|
items: [
|
|
243
1209
|
{
|
|
244
|
-
type: ComponentType.Image,
|
|
1210
|
+
type: ComponentType$1.Image,
|
|
245
1211
|
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
246
1212
|
height: { type: 'fixed', value: 236 },
|
|
247
1213
|
viewStyle: {
|
|
@@ -256,33 +1222,33 @@ const alignInFlex = (align) => {
|
|
|
256
1222
|
imageStyle: { contentMode: MediaContentMode.AspectFill },
|
|
257
1223
|
},
|
|
258
1224
|
{
|
|
259
|
-
type: ComponentType.Box,
|
|
1225
|
+
type: ComponentType$1.Box,
|
|
260
1226
|
layout: Layout.Column,
|
|
261
1227
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
262
1228
|
height: { type: 'fixed', value: 200 },
|
|
263
1229
|
items: [
|
|
264
1230
|
{
|
|
265
|
-
type: ComponentType.Box,
|
|
1231
|
+
type: ComponentType$1.Box,
|
|
266
1232
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
267
1233
|
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
268
1234
|
viewStyle: { backgroundColor: '#fa6464' },
|
|
269
1235
|
},
|
|
270
1236
|
{
|
|
271
|
-
type: ComponentType.Box,
|
|
1237
|
+
type: ComponentType$1.Box,
|
|
272
1238
|
layout: Layout.Column,
|
|
273
1239
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
274
1240
|
height: { type: 'flex', value: FlexSizeSpecValue.WrapContent },
|
|
275
1241
|
viewStyle: { backgroundColor: '#ffaf5c' },
|
|
276
1242
|
items: [
|
|
277
1243
|
{
|
|
278
|
-
type: ComponentType.Text,
|
|
1244
|
+
type: ComponentType$1.Text,
|
|
279
1245
|
text: 'Message',
|
|
280
1246
|
align: { horizontal: AlignValue.Center, vertical: AlignValue.Center },
|
|
281
1247
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
282
1248
|
height: { type: 'fixed', value: 50 },
|
|
283
1249
|
},
|
|
284
1250
|
{
|
|
285
|
-
type: ComponentType.Image,
|
|
1251
|
+
type: ComponentType$1.Image,
|
|
286
1252
|
action: { type: ActionType.Web, data: 'https://docs.sendbird.com' },
|
|
287
1253
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
288
1254
|
height: { type: 'fixed', value: 50 },
|
|
@@ -292,13 +1258,13 @@ const alignInFlex = (align) => {
|
|
|
292
1258
|
],
|
|
293
1259
|
},
|
|
294
1260
|
{
|
|
295
|
-
type: ComponentType.Box,
|
|
1261
|
+
type: ComponentType$1.Box,
|
|
296
1262
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
297
1263
|
height: { type: 'fixed', value: 20 },
|
|
298
1264
|
viewStyle: { backgroundColor: '#ffe450' },
|
|
299
1265
|
},
|
|
300
1266
|
{
|
|
301
|
-
type: ComponentType.Box,
|
|
1267
|
+
type: ComponentType$1.Box,
|
|
302
1268
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
303
1269
|
height: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
304
1270
|
viewStyle: { backgroundColor: '#329a1b' },
|
|
@@ -306,12 +1272,12 @@ const alignInFlex = (align) => {
|
|
|
306
1272
|
],
|
|
307
1273
|
},
|
|
308
1274
|
{
|
|
309
|
-
type: ComponentType.Box,
|
|
1275
|
+
type: ComponentType$1.Box,
|
|
310
1276
|
viewStyle: { padding: { top: 12, bottom: 12, left: 12, right: 12 } },
|
|
311
1277
|
layout: Layout.Column,
|
|
312
1278
|
items: [
|
|
313
1279
|
{
|
|
314
|
-
type: ComponentType.Box,
|
|
1280
|
+
type: ComponentType$1.Box,
|
|
315
1281
|
align: { horizontal: AlignValue.Left, vertical: AlignValue.Center },
|
|
316
1282
|
layout: Layout.Row,
|
|
317
1283
|
viewStyle: {
|
|
@@ -322,7 +1288,7 @@ const alignInFlex = (align) => {
|
|
|
322
1288
|
height: { type: 'fixed', value: 150 },
|
|
323
1289
|
items: [
|
|
324
1290
|
{
|
|
325
|
-
type: ComponentType.Text,
|
|
1291
|
+
type: ComponentType$1.Text,
|
|
326
1292
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
327
1293
|
height: { type: 'fixed', value: 50 },
|
|
328
1294
|
text: 'Sample1 text',
|
|
@@ -338,7 +1304,7 @@ const alignInFlex = (align) => {
|
|
|
338
1304
|
},
|
|
339
1305
|
},
|
|
340
1306
|
{
|
|
341
|
-
type: ComponentType.ImageButton,
|
|
1307
|
+
type: ComponentType$1.ImageButton,
|
|
342
1308
|
action: { type: ActionType.UIKit, data: 'uikit://delete' },
|
|
343
1309
|
width: { type: 'fixed', value: 20 },
|
|
344
1310
|
height: { type: 'fixed', value: 20 },
|
|
@@ -348,7 +1314,7 @@ const alignInFlex = (align) => {
|
|
|
348
1314
|
],
|
|
349
1315
|
},
|
|
350
1316
|
{
|
|
351
|
-
type: ComponentType.Text,
|
|
1317
|
+
type: ComponentType$1.Text,
|
|
352
1318
|
viewStyle: { padding: { top: 6, bottom: 12, left: 0, right: 0 } },
|
|
353
1319
|
text: 'Esse eu esse duis ipsum et dolor eu ut sit amet consectetur cillum velit officia. Ex adipisicing elit quis ea sit. Occaecat in eu aliqua nulla magna id ut excepteur minim.',
|
|
354
1320
|
maxTextLines: 2,
|
|
@@ -357,7 +1323,7 @@ const alignInFlex = (align) => {
|
|
|
357
1323
|
height: { type: 'fixed', value: 50 },
|
|
358
1324
|
},
|
|
359
1325
|
{
|
|
360
|
-
type: ComponentType.TextButton,
|
|
1326
|
+
type: ComponentType$1.TextButton,
|
|
361
1327
|
action: { type: ActionType.Web, data: 'https://www.daum.net' },
|
|
362
1328
|
text: 'Button 3',
|
|
363
1329
|
textStyle: { size: 14, color: '#742ddd', weight: FontWeight.Bold },
|
|
@@ -372,25 +1338,25 @@ const alignInFlex = (align) => {
|
|
|
372
1338
|
'body': {
|
|
373
1339
|
'items': [
|
|
374
1340
|
{
|
|
375
|
-
'type': ComponentType.Image,
|
|
1341
|
+
'type': ComponentType$1.Image,
|
|
376
1342
|
'action': { 'type': ActionType.Web, 'data': 'https://www.naver.com/' },
|
|
377
1343
|
'height': { 'type': 'fixed', 'value': 136 },
|
|
378
1344
|
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
379
1345
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
380
1346
|
},
|
|
381
1347
|
{
|
|
382
|
-
'type': ComponentType.Box,
|
|
1348
|
+
'type': ComponentType$1.Box,
|
|
383
1349
|
'viewStyle': { 'padding': { 'top': 12, 'bottom': 12, 'left': 12, 'right': 12 }, backgroundColor: '#cccccc' },
|
|
384
1350
|
'layout': Layout.Column,
|
|
385
1351
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
386
1352
|
'items': [
|
|
387
1353
|
{
|
|
388
|
-
'type': ComponentType.Box,
|
|
1354
|
+
'type': ComponentType$1.Box,
|
|
389
1355
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
390
1356
|
'layout': Layout.Row,
|
|
391
1357
|
'items': [
|
|
392
1358
|
{
|
|
393
|
-
'type': ComponentType.TextButton,
|
|
1359
|
+
'type': ComponentType$1.TextButton,
|
|
394
1360
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
395
1361
|
width: { type: 'fixed', value: 150 },
|
|
396
1362
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 0, 'right': 4 } },
|
|
@@ -398,7 +1364,7 @@ const alignInFlex = (align) => {
|
|
|
398
1364
|
'textStyle': { 'size': 14, 'weight': FontWeight.Bold },
|
|
399
1365
|
},
|
|
400
1366
|
{
|
|
401
|
-
'type': ComponentType.TextButton,
|
|
1367
|
+
'type': ComponentType$1.TextButton,
|
|
402
1368
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
403
1369
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
404
1370
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 4, 'right': 0 } },
|
|
@@ -408,19 +1374,19 @@ const alignInFlex = (align) => {
|
|
|
408
1374
|
],
|
|
409
1375
|
},
|
|
410
1376
|
{
|
|
411
|
-
'type': ComponentType.Box,
|
|
1377
|
+
'type': ComponentType$1.Box,
|
|
412
1378
|
width: { type: 'flex', value: FlexSizeSpecValue.FillParent },
|
|
413
1379
|
'layout': Layout.Row,
|
|
414
1380
|
'items': [
|
|
415
1381
|
{
|
|
416
|
-
'type': ComponentType.Text,
|
|
1382
|
+
'type': ComponentType$1.Text,
|
|
417
1383
|
'text': 'Sample2 text',
|
|
418
1384
|
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
419
1385
|
'maxTextLines': 1,
|
|
420
1386
|
'textStyle': { 'size': 16, 'weight': FontWeight.Bold },
|
|
421
1387
|
},
|
|
422
1388
|
{
|
|
423
|
-
'type': ComponentType.ImageButton,
|
|
1389
|
+
'type': ComponentType$1.ImageButton,
|
|
424
1390
|
'action': { 'type': ActionType.UIKit, 'data': 'uikit://delete' },
|
|
425
1391
|
'width': { 'type': 'fixed', 'value': 20 },
|
|
426
1392
|
'height': { 'type': 'fixed', 'value': 20 },
|
|
@@ -430,7 +1396,7 @@ const alignInFlex = (align) => {
|
|
|
430
1396
|
],
|
|
431
1397
|
},
|
|
432
1398
|
{
|
|
433
|
-
'type': ComponentType.Text,
|
|
1399
|
+
'type': ComponentType$1.Text,
|
|
434
1400
|
'viewStyle': { 'padding': { 'top': 6, 'bottom': 12, 'left': 0, 'right': 0 } },
|
|
435
1401
|
'text': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aui',
|
|
436
1402
|
'textStyle': { 'size': 14 },
|
|
@@ -445,42 +1411,42 @@ const alignInFlex = (align) => {
|
|
|
445
1411
|
'body': {
|
|
446
1412
|
'items': [
|
|
447
1413
|
{
|
|
448
|
-
'type': ComponentType.Box,
|
|
1414
|
+
'type': ComponentType$1.Box,
|
|
449
1415
|
'viewStyle': { 'backgroundColor': '#ffffff', 'borderWidth': 1, 'borderColor': '#eeeeee', 'radius': 16 },
|
|
450
1416
|
'layout': Layout.Column,
|
|
451
1417
|
'items': [
|
|
452
1418
|
{
|
|
453
|
-
'type': ComponentType.Image,
|
|
1419
|
+
'type': ComponentType$1.Image,
|
|
454
1420
|
'height': { 'type': 'fixed', 'value': 200 },
|
|
455
1421
|
'imageUrl': 'https://img.freepik.com/free-vector/cartoon-happy-hours-background_52683-81243.jpg?w=2000&t=st=1666689198~exp=1666689798~hmac=23109d44ba03deee7aee069cbeebfcb48fa27f85e53c1cafc5d5d7345f1a2041',
|
|
456
1422
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
457
1423
|
},
|
|
458
1424
|
{
|
|
459
|
-
'type': ComponentType.Box,
|
|
1425
|
+
'type': ComponentType$1.Box,
|
|
460
1426
|
'viewStyle': { 'padding': { 'top': 15, 'bottom': 15, 'left': 15, 'right': 15 } },
|
|
461
1427
|
'layout': Layout.Column,
|
|
462
1428
|
'items': [
|
|
463
1429
|
{
|
|
464
|
-
'type': ComponentType.Text,
|
|
1430
|
+
'type': ComponentType$1.Text,
|
|
465
1431
|
'text': "Don't miss these deals today",
|
|
466
1432
|
'maxTextLines': 1,
|
|
467
1433
|
'textStyle': { 'size': 20, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
468
1434
|
},
|
|
469
1435
|
{
|
|
470
|
-
'type': ComponentType.Text,
|
|
1436
|
+
'type': ComponentType$1.Text,
|
|
471
1437
|
'viewStyle': { 'margin': { 'top': 5, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
472
1438
|
'text': 'Pay with Maya and get cashback!',
|
|
473
1439
|
'maxTextLines': 1,
|
|
474
1440
|
'textStyle': { 'size': 14, 'color': '#e10000' },
|
|
475
1441
|
},
|
|
476
1442
|
{
|
|
477
|
-
'type': ComponentType.Box,
|
|
1443
|
+
'type': ComponentType$1.Box,
|
|
478
1444
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
479
1445
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
480
1446
|
'layout': Layout.Row,
|
|
481
1447
|
'items': [
|
|
482
1448
|
{
|
|
483
|
-
'type': ComponentType.Image,
|
|
1449
|
+
'type': ComponentType$1.Image,
|
|
484
1450
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
485
1451
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
486
1452
|
'viewStyle': {
|
|
@@ -493,19 +1459,19 @@ const alignInFlex = (align) => {
|
|
|
493
1459
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
494
1460
|
},
|
|
495
1461
|
{
|
|
496
|
-
'type': ComponentType.Box,
|
|
1462
|
+
'type': ComponentType$1.Box,
|
|
497
1463
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
498
1464
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
499
1465
|
'layout': Layout.Column,
|
|
500
1466
|
'items': [
|
|
501
1467
|
{
|
|
502
|
-
'type': ComponentType.Text,
|
|
1468
|
+
'type': ComponentType$1.Text,
|
|
503
1469
|
'text': 'Meralco',
|
|
504
1470
|
'maxTextLines': 1,
|
|
505
1471
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
506
1472
|
},
|
|
507
1473
|
{
|
|
508
|
-
'type': ComponentType.Text,
|
|
1474
|
+
'type': ComponentType$1.Text,
|
|
509
1475
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
510
1476
|
'text': '30% cashback, P300 min spend',
|
|
511
1477
|
'maxTextLines': 1,
|
|
@@ -516,13 +1482,13 @@ const alignInFlex = (align) => {
|
|
|
516
1482
|
],
|
|
517
1483
|
},
|
|
518
1484
|
{
|
|
519
|
-
'type': ComponentType.Box,
|
|
1485
|
+
'type': ComponentType$1.Box,
|
|
520
1486
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
521
1487
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
522
1488
|
'layout': Layout.Row,
|
|
523
1489
|
'items': [
|
|
524
1490
|
{
|
|
525
|
-
'type': ComponentType.Image,
|
|
1491
|
+
'type': ComponentType$1.Image,
|
|
526
1492
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
527
1493
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
528
1494
|
'viewStyle': {
|
|
@@ -535,19 +1501,19 @@ const alignInFlex = (align) => {
|
|
|
535
1501
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill, tintColor: '#a49a9a' },
|
|
536
1502
|
},
|
|
537
1503
|
{
|
|
538
|
-
'type': ComponentType.Box,
|
|
1504
|
+
'type': ComponentType$1.Box,
|
|
539
1505
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
540
1506
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
541
1507
|
'layout': Layout.Column,
|
|
542
1508
|
'items': [
|
|
543
1509
|
{
|
|
544
|
-
'type': ComponentType.Text,
|
|
1510
|
+
'type': ComponentType$1.Text,
|
|
545
1511
|
'text': 'Globe',
|
|
546
1512
|
'maxTextLines': 1,
|
|
547
1513
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
548
1514
|
},
|
|
549
1515
|
{
|
|
550
|
-
'type': ComponentType.Text,
|
|
1516
|
+
'type': ComponentType$1.Text,
|
|
551
1517
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
552
1518
|
'text': '30% cashback, P300 min spend',
|
|
553
1519
|
'maxTextLines': 1,
|
|
@@ -558,13 +1524,13 @@ const alignInFlex = (align) => {
|
|
|
558
1524
|
],
|
|
559
1525
|
},
|
|
560
1526
|
{
|
|
561
|
-
'type': ComponentType.Box,
|
|
1527
|
+
'type': ComponentType$1.Box,
|
|
562
1528
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
563
1529
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
564
1530
|
'layout': Layout.Row,
|
|
565
1531
|
'items': [
|
|
566
1532
|
{
|
|
567
|
-
'type': ComponentType.Image,
|
|
1533
|
+
'type': ComponentType$1.Image,
|
|
568
1534
|
'width': { 'type': 'fixed', 'value': 50 },
|
|
569
1535
|
'height': { 'type': 'fixed', 'value': 50 },
|
|
570
1536
|
'viewStyle': {
|
|
@@ -577,19 +1543,19 @@ const alignInFlex = (align) => {
|
|
|
577
1543
|
'imageStyle': { 'contentMode': MediaContentMode.AspectFill },
|
|
578
1544
|
},
|
|
579
1545
|
{
|
|
580
|
-
'type': ComponentType.Box,
|
|
1546
|
+
'type': ComponentType$1.Box,
|
|
581
1547
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
582
1548
|
'viewStyle': { 'margin': { 'top': 0, 'bottom': 0, 'left': 15, 'right': 0 } },
|
|
583
1549
|
'layout': Layout.Column,
|
|
584
1550
|
'items': [
|
|
585
1551
|
{
|
|
586
|
-
'type': ComponentType.Text,
|
|
1552
|
+
'type': ComponentType$1.Text,
|
|
587
1553
|
'text': 'Cignal',
|
|
588
1554
|
'maxTextLines': 1,
|
|
589
1555
|
'textStyle': { 'size': 16, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
590
1556
|
},
|
|
591
1557
|
{
|
|
592
|
-
'type': ComponentType.Text,
|
|
1558
|
+
'type': ComponentType$1.Text,
|
|
593
1559
|
'viewStyle': { 'margin': { 'top': 3, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
594
1560
|
'text': '30% cashback, P300 min spend',
|
|
595
1561
|
'maxTextLines': 1,
|
|
@@ -600,13 +1566,13 @@ const alignInFlex = (align) => {
|
|
|
600
1566
|
],
|
|
601
1567
|
},
|
|
602
1568
|
{
|
|
603
|
-
'type': ComponentType.Box,
|
|
1569
|
+
'type': ComponentType$1.Box,
|
|
604
1570
|
'align': { 'horizontal': AlignValue.Left, 'vertical': AlignValue.Center },
|
|
605
1571
|
'viewStyle': { 'margin': { 'top': 10, 'bottom': 0, 'left': 0, 'right': 0 } },
|
|
606
1572
|
'layout': Layout.Row,
|
|
607
1573
|
'items': [
|
|
608
1574
|
{
|
|
609
|
-
'type': ComponentType.TextButton,
|
|
1575
|
+
'type': ComponentType$1.TextButton,
|
|
610
1576
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
611
1577
|
'viewStyle': {
|
|
612
1578
|
'backgroundColor': '#e0e0e0',
|
|
@@ -618,7 +1584,7 @@ const alignInFlex = (align) => {
|
|
|
618
1584
|
'textStyle': { 'size': 15, 'color': '#e10000', 'weight': FontWeight.Bold },
|
|
619
1585
|
},
|
|
620
1586
|
{
|
|
621
|
-
'type': ComponentType.TextButton,
|
|
1587
|
+
'type': ComponentType$1.TextButton,
|
|
622
1588
|
'action': { 'type': ActionType.Web, 'data': 'https://www.daum.net' },
|
|
623
1589
|
'viewStyle': {
|
|
624
1590
|
'backgroundColor': '#e10000',
|
|
@@ -643,11 +1609,11 @@ const alignInFlex = (align) => {
|
|
|
643
1609
|
'body': {
|
|
644
1610
|
'items': [
|
|
645
1611
|
{
|
|
646
|
-
'type': ComponentType.Box,
|
|
1612
|
+
'type': ComponentType$1.Box,
|
|
647
1613
|
'layout': Layout.Column,
|
|
648
1614
|
'items': [
|
|
649
1615
|
{
|
|
650
|
-
'type': ComponentType.Image,
|
|
1616
|
+
'type': ComponentType$1.Image,
|
|
651
1617
|
'imageUrl': 'https://static.sendbird.com/sample/profiles/profile_40_512px.png',
|
|
652
1618
|
'metaData': {
|
|
653
1619
|
'pixelWidth': 512,
|
|
@@ -666,7 +1632,7 @@ const alignInFlex = (align) => {
|
|
|
666
1632
|
},
|
|
667
1633
|
},
|
|
668
1634
|
{
|
|
669
|
-
'type': ComponentType.Box,
|
|
1635
|
+
'type': ComponentType$1.Box,
|
|
670
1636
|
'viewStyle': {
|
|
671
1637
|
'padding': {
|
|
672
1638
|
'top': 12,
|
|
@@ -678,15 +1644,15 @@ const alignInFlex = (align) => {
|
|
|
678
1644
|
'layout': Layout.Column,
|
|
679
1645
|
'items': [
|
|
680
1646
|
{
|
|
681
|
-
'type': ComponentType.Box,
|
|
1647
|
+
'type': ComponentType$1.Box,
|
|
682
1648
|
'layout': Layout.Row,
|
|
683
1649
|
'items': [
|
|
684
1650
|
{
|
|
685
|
-
'type': ComponentType.Box,
|
|
1651
|
+
'type': ComponentType$1.Box,
|
|
686
1652
|
'layout': Layout.Column,
|
|
687
1653
|
'items': [
|
|
688
1654
|
{
|
|
689
|
-
'type': ComponentType.Text,
|
|
1655
|
+
'type': ComponentType$1.Text,
|
|
690
1656
|
'text': 'hi',
|
|
691
1657
|
'maxTextLines': 3,
|
|
692
1658
|
'viewStyle': {
|
|
@@ -703,7 +1669,7 @@ const alignInFlex = (align) => {
|
|
|
703
1669
|
},
|
|
704
1670
|
},
|
|
705
1671
|
{
|
|
706
|
-
'type': ComponentType.Text,
|
|
1672
|
+
'type': ComponentType$1.Text,
|
|
707
1673
|
'text': 'bye',
|
|
708
1674
|
'maxTextLines': 10,
|
|
709
1675
|
'textStyle': {
|
|
@@ -713,7 +1679,7 @@ const alignInFlex = (align) => {
|
|
|
713
1679
|
],
|
|
714
1680
|
},
|
|
715
1681
|
{
|
|
716
|
-
'type': ComponentType.ImageButton,
|
|
1682
|
+
'type': ComponentType$1.ImageButton,
|
|
717
1683
|
'action': {
|
|
718
1684
|
'type': ActionType.UIKit,
|
|
719
1685
|
'data': 'sendbirduikit://delete',
|
|
@@ -738,11 +1704,11 @@ const alignInFlex = (align) => {
|
|
|
738
1704
|
],
|
|
739
1705
|
},
|
|
740
1706
|
{
|
|
741
|
-
'type': ComponentType.Box,
|
|
1707
|
+
'type': ComponentType$1.Box,
|
|
742
1708
|
'layout': Layout.Column,
|
|
743
1709
|
'items': [
|
|
744
1710
|
{
|
|
745
|
-
'type': ComponentType.Box,
|
|
1711
|
+
'type': ComponentType$1.Box,
|
|
746
1712
|
'viewStyle': {
|
|
747
1713
|
'margin': {
|
|
748
1714
|
'top': 16,
|
|
@@ -758,7 +1724,7 @@ const alignInFlex = (align) => {
|
|
|
758
1724
|
'layout': Layout.Row,
|
|
759
1725
|
'items': [
|
|
760
1726
|
{
|
|
761
|
-
'type': ComponentType.Image,
|
|
1727
|
+
'type': ComponentType$1.Image,
|
|
762
1728
|
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-ULE240VNV-83fd5776e78e-512',
|
|
763
1729
|
'width': {
|
|
764
1730
|
'type': 'fixed',
|
|
@@ -781,7 +1747,7 @@ const alignInFlex = (align) => {
|
|
|
781
1747
|
},
|
|
782
1748
|
},
|
|
783
1749
|
{
|
|
784
|
-
'type': ComponentType.Box,
|
|
1750
|
+
'type': ComponentType$1.Box,
|
|
785
1751
|
'viewStyle': {
|
|
786
1752
|
'margin': {
|
|
787
1753
|
'top': 0,
|
|
@@ -793,7 +1759,7 @@ const alignInFlex = (align) => {
|
|
|
793
1759
|
'layout': Layout.Column,
|
|
794
1760
|
'items': [
|
|
795
1761
|
{
|
|
796
|
-
'type': ComponentType.Text,
|
|
1762
|
+
'type': ComponentType$1.Text,
|
|
797
1763
|
'text': 'Chongbu',
|
|
798
1764
|
'maxTextLines': 1,
|
|
799
1765
|
'textStyle': {
|
|
@@ -802,7 +1768,7 @@ const alignInFlex = (align) => {
|
|
|
802
1768
|
},
|
|
803
1769
|
},
|
|
804
1770
|
{
|
|
805
|
-
'type': ComponentType.Text,
|
|
1771
|
+
'type': ComponentType$1.Text,
|
|
806
1772
|
'viewStyle': {
|
|
807
1773
|
'margin': {
|
|
808
1774
|
'top': 4,
|
|
@@ -822,7 +1788,7 @@ const alignInFlex = (align) => {
|
|
|
822
1788
|
],
|
|
823
1789
|
},
|
|
824
1790
|
{
|
|
825
|
-
'type': ComponentType.Box,
|
|
1791
|
+
'type': ComponentType$1.Box,
|
|
826
1792
|
'viewStyle': {
|
|
827
1793
|
'margin': {
|
|
828
1794
|
'top': 16,
|
|
@@ -838,7 +1804,7 @@ const alignInFlex = (align) => {
|
|
|
838
1804
|
'layout': Layout.Row,
|
|
839
1805
|
'items': [
|
|
840
1806
|
{
|
|
841
|
-
'type': ComponentType.Image,
|
|
1807
|
+
'type': ComponentType$1.Image,
|
|
842
1808
|
'imageUrl': 'https://ca.slack-edge.com/T0ADCTNEL-U02LA25KY8J-d41a3e8c7554-512',
|
|
843
1809
|
'width': {
|
|
844
1810
|
'type': 'fixed',
|
|
@@ -861,7 +1827,7 @@ const alignInFlex = (align) => {
|
|
|
861
1827
|
},
|
|
862
1828
|
},
|
|
863
1829
|
{
|
|
864
|
-
'type': ComponentType.Box,
|
|
1830
|
+
'type': ComponentType$1.Box,
|
|
865
1831
|
'viewStyle': {
|
|
866
1832
|
'margin': {
|
|
867
1833
|
'top': 0,
|
|
@@ -873,7 +1839,7 @@ const alignInFlex = (align) => {
|
|
|
873
1839
|
'layout': Layout.Column,
|
|
874
1840
|
'items': [
|
|
875
1841
|
{
|
|
876
|
-
'type': ComponentType.Text,
|
|
1842
|
+
'type': ComponentType$1.Text,
|
|
877
1843
|
'text': 'Amanda',
|
|
878
1844
|
'maxTextLines': 1,
|
|
879
1845
|
'textStyle': {
|
|
@@ -882,7 +1848,7 @@ const alignInFlex = (align) => {
|
|
|
882
1848
|
},
|
|
883
1849
|
},
|
|
884
1850
|
{
|
|
885
|
-
'type': ComponentType.Text,
|
|
1851
|
+
'type': ComponentType$1.Text,
|
|
886
1852
|
'viewStyle': {
|
|
887
1853
|
'margin': {
|
|
888
1854
|
'top': 4,
|
|
@@ -1011,6 +1977,285 @@ const alignInFlex = (align) => {
|
|
|
1011
1977
|
],
|
|
1012
1978
|
},
|
|
1013
1979
|
});
|
|
1980
|
+
({
|
|
1981
|
+
'version': 1,
|
|
1982
|
+
'body': {
|
|
1983
|
+
'items': [
|
|
1984
|
+
{
|
|
1985
|
+
'elementId': 'root',
|
|
1986
|
+
'type': 'box',
|
|
1987
|
+
'layout': 'column',
|
|
1988
|
+
'width': {
|
|
1989
|
+
'type': 'flex',
|
|
1990
|
+
'value': FlexSizeSpecValue.FillParent,
|
|
1991
|
+
},
|
|
1992
|
+
'height': {
|
|
1993
|
+
'type': 'flex',
|
|
1994
|
+
'value': FlexSizeSpecValue.WrapContent,
|
|
1995
|
+
},
|
|
1996
|
+
'items': [
|
|
1997
|
+
{
|
|
1998
|
+
'type': 'text',
|
|
1999
|
+
'viewStyle': {
|
|
2000
|
+
'backgroundColor': '#a0c0ffff',
|
|
2001
|
+
'margin': {
|
|
2002
|
+
'top': 16,
|
|
2003
|
+
'bottom': 16,
|
|
2004
|
+
'left': 16,
|
|
2005
|
+
'right': 16,
|
|
2006
|
+
},
|
|
2007
|
+
'padding': {
|
|
2008
|
+
'top': 16,
|
|
2009
|
+
'bottom': 16,
|
|
2010
|
+
'left': 16,
|
|
2011
|
+
'right': 16,
|
|
2012
|
+
},
|
|
2013
|
+
},
|
|
2014
|
+
'text': 'Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap Wrap ',
|
|
2015
|
+
'textStyle': {
|
|
2016
|
+
'size': 14,
|
|
2017
|
+
'color': '#222121e0',
|
|
2018
|
+
'weight': 'normal',
|
|
2019
|
+
},
|
|
2020
|
+
'maxTextLines': 5,
|
|
2021
|
+
'width': {
|
|
2022
|
+
'type': 'flex',
|
|
2023
|
+
'value': FlexSizeSpecValue.FillParent,
|
|
2024
|
+
},
|
|
2025
|
+
'height': {
|
|
2026
|
+
'type': 'flex',
|
|
2027
|
+
'value': 1,
|
|
2028
|
+
},
|
|
2029
|
+
'align': {
|
|
2030
|
+
'horizontal': 'left',
|
|
2031
|
+
'vertical': 'top',
|
|
2032
|
+
},
|
|
2033
|
+
'elementId': 'c0e15878-4984-408d-abaa-4b495c2e3872',
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
'type': 'imageButton',
|
|
2037
|
+
'viewStyle': {
|
|
2038
|
+
margin: {
|
|
2039
|
+
left: 24,
|
|
2040
|
+
right: 12,
|
|
2041
|
+
},
|
|
2042
|
+
},
|
|
2043
|
+
'width': { 'type': 'flex', 'value': FlexSizeSpecValue.FillParent },
|
|
2044
|
+
'height': { 'type': 'fixed', 'value': 250 },
|
|
2045
|
+
'imageUrl': 'https://cdn.pixabay.com/photo/2022/10/12/10/45/bird-7516219_1280.jpg',
|
|
2046
|
+
'imageStyle': { 'contentMode': 'aspectFill' },
|
|
2047
|
+
'metaData': { 'pixelWidth': '1080', 'pixelHeight': '2640' },
|
|
2048
|
+
'action': { 'data': 'www.naver.com' },
|
|
2049
|
+
},
|
|
2050
|
+
],
|
|
2051
|
+
},
|
|
2052
|
+
],
|
|
2053
|
+
},
|
|
2054
|
+
});
|
|
2055
|
+
|
|
2056
|
+
const PADDING_WIDTH = 24;
|
|
2057
|
+
const CONTENT_LEFT_WIDTH = 40;
|
|
2058
|
+
const SWIPE_THRESHOLD = 15;
|
|
2059
|
+
const GAP_DEFAULT = 8;
|
|
2060
|
+
/**
|
|
2061
|
+
* fixed sized template items should use its child width.
|
|
2062
|
+
* Whereas flex sized template items should use its parent's width.
|
|
2063
|
+
* @param item
|
|
2064
|
+
*/
|
|
2065
|
+
function shouldRenderAsFixed(item) {
|
|
2066
|
+
var _a;
|
|
2067
|
+
return ((_a = item.props.templateItems[0].width) === null || _a === void 0 ? void 0 : _a.type) === 'fixed';
|
|
2068
|
+
}
|
|
2069
|
+
function CarouselItem({ item, defaultWidth, marginRight }) {
|
|
2070
|
+
const style = shouldRenderAsFixed(item)
|
|
2071
|
+
? { width: 'fit-content' }
|
|
2072
|
+
: { minWidth: defaultWidth, width: '100%' };
|
|
2073
|
+
if (marginRight) {
|
|
2074
|
+
style['marginRight'] = marginRight;
|
|
2075
|
+
}
|
|
2076
|
+
return React__default.createElement("div", { style: style }, item);
|
|
2077
|
+
}
|
|
2078
|
+
const Carousel = React__default.memo(({ children, gap = GAP_DEFAULT }) => {
|
|
2079
|
+
var _a, _b;
|
|
2080
|
+
const carouselRef = useRef(null);
|
|
2081
|
+
const screenWidth = window.innerWidth;
|
|
2082
|
+
const defaultItemWidth = (_b = (_a = carouselRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
|
|
2083
|
+
const itemWidths = children.map((item) => {
|
|
2084
|
+
var _a;
|
|
2085
|
+
if (shouldRenderAsFixed(item)) {
|
|
2086
|
+
return Number((_a = item.props.templateItems[0].width) === null || _a === void 0 ? void 0 : _a.value);
|
|
2087
|
+
}
|
|
2088
|
+
return defaultItemWidth;
|
|
2089
|
+
});
|
|
2090
|
+
const itemPositions = getEachItemPositions();
|
|
2091
|
+
const [draggingInfo, setDraggingInfo] = useState({
|
|
2092
|
+
scrolling: false,
|
|
2093
|
+
dragging: false,
|
|
2094
|
+
startPos: null,
|
|
2095
|
+
offset: 0,
|
|
2096
|
+
translateX: 0,
|
|
2097
|
+
currentIndex: 0,
|
|
2098
|
+
});
|
|
2099
|
+
const handleMouseDown = (event) => {
|
|
2100
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: false, dragging: true, startPos: {
|
|
2101
|
+
x: event.clientX,
|
|
2102
|
+
y: event.clientY,
|
|
2103
|
+
}, offset: 0 })));
|
|
2104
|
+
};
|
|
2105
|
+
const handleMouseMove = (event) => {
|
|
2106
|
+
if (!draggingInfo.dragging || !draggingInfo.startPos)
|
|
2107
|
+
return;
|
|
2108
|
+
const currentX = event.clientX;
|
|
2109
|
+
const newOffset = currentX - draggingInfo.startPos.x;
|
|
2110
|
+
setDraggingInfo(Object.assign(Object.assign({}, draggingInfo), { offset: newOffset }));
|
|
2111
|
+
};
|
|
2112
|
+
const handleMouseUp = () => {
|
|
2113
|
+
if (!draggingInfo.dragging)
|
|
2114
|
+
return;
|
|
2115
|
+
handleDragEnd();
|
|
2116
|
+
unblockScroll();
|
|
2117
|
+
};
|
|
2118
|
+
const blockScroll = () => {
|
|
2119
|
+
if (carouselRef.current) {
|
|
2120
|
+
carouselRef.current.style.touchAction = 'pan-x';
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
const unblockScroll = () => {
|
|
2124
|
+
if (carouselRef.current) {
|
|
2125
|
+
carouselRef.current.style.touchAction = 'pan-y';
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
const handleTouchStart = (event) => {
|
|
2129
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: false, dragging: false, startPos: {
|
|
2130
|
+
x: event.touches[0].clientX,
|
|
2131
|
+
y: event.touches[0].clientY,
|
|
2132
|
+
}, offset: 0 })));
|
|
2133
|
+
};
|
|
2134
|
+
const handleTouchMove = (event) => {
|
|
2135
|
+
if (!draggingInfo.startPos || draggingInfo.scrolling)
|
|
2136
|
+
return;
|
|
2137
|
+
const startPos = draggingInfo.startPos;
|
|
2138
|
+
const [touchMoveX, touchMoveY] = [event.touches[0].clientX, event.touches[0].clientY];
|
|
2139
|
+
const [deltaX, deltaY] = [Math.abs(touchMoveX - startPos.x), Math.abs(touchMoveY - startPos.y)];
|
|
2140
|
+
const newOffset = touchMoveX - startPos.x;
|
|
2141
|
+
if (draggingInfo.dragging) {
|
|
2142
|
+
if (newOffset === draggingInfo.offset)
|
|
2143
|
+
return;
|
|
2144
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { offset: newOffset })));
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
if (deltaY > deltaX) {
|
|
2148
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { scrolling: true })));
|
|
2149
|
+
}
|
|
2150
|
+
else {
|
|
2151
|
+
blockScroll();
|
|
2152
|
+
setDraggingInfo((props) => (Object.assign(Object.assign({}, props), { dragging: true, offset: newOffset })));
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
const handleTouchEnd = () => {
|
|
2156
|
+
if (!draggingInfo.dragging)
|
|
2157
|
+
return;
|
|
2158
|
+
handleDragEnd();
|
|
2159
|
+
unblockScroll();
|
|
2160
|
+
};
|
|
2161
|
+
const getNewDraggingInfo = ({ translateX, currentIndex, newTranslateX, nextIndex, }) => {
|
|
2162
|
+
return {
|
|
2163
|
+
scrolling: false,
|
|
2164
|
+
dragging: false,
|
|
2165
|
+
startPos: null,
|
|
2166
|
+
offset: 0,
|
|
2167
|
+
translateX: newTranslateX !== null && newTranslateX !== void 0 ? newTranslateX : translateX,
|
|
2168
|
+
currentIndex: nextIndex !== null && nextIndex !== void 0 ? nextIndex : currentIndex,
|
|
2169
|
+
};
|
|
2170
|
+
};
|
|
2171
|
+
const handleDragEnd = () => {
|
|
2172
|
+
const { offset, currentIndex } = draggingInfo;
|
|
2173
|
+
const absOffset = Math.abs(offset);
|
|
2174
|
+
if (absOffset < SWIPE_THRESHOLD) {
|
|
2175
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2176
|
+
return;
|
|
2177
|
+
}
|
|
2178
|
+
// If dragged to left, next index should be to the right
|
|
2179
|
+
if (offset < 0 && currentIndex < children.length - 1) {
|
|
2180
|
+
if (isLastItemFitsScreen(currentIndex)) {
|
|
2181
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2182
|
+
return;
|
|
2183
|
+
}
|
|
2184
|
+
const nextIndex = currentIndex + 1;
|
|
2185
|
+
/**
|
|
2186
|
+
* This is special logic for "더 보기" button for Socar use-case.
|
|
2187
|
+
* The button will have a small width (less than 50px).
|
|
2188
|
+
* We want to include this button in the view and snap to right padding wall IFF !isLastTwoItemsFitScreen.
|
|
2189
|
+
*/
|
|
2190
|
+
if (nextIndex === children.length - 1 || isLastItemFitsScreen(nextIndex)) {
|
|
2191
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[children.length - 1].end - PADDING_WIDTH - CONTENT_LEFT_WIDTH + screenWidth, nextIndex: children.length - 1 })));
|
|
2192
|
+
}
|
|
2193
|
+
else {
|
|
2194
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[nextIndex].start, nextIndex })));
|
|
2195
|
+
}
|
|
2196
|
+
// If dragged to right, next index should be to the left
|
|
2197
|
+
}
|
|
2198
|
+
else if (offset > 0 && currentIndex > 0) {
|
|
2199
|
+
let nextIndex = currentIndex - 1;
|
|
2200
|
+
while (draggingInfo.translateX >= itemPositions[nextIndex].start) {
|
|
2201
|
+
nextIndex--;
|
|
2202
|
+
}
|
|
2203
|
+
setDraggingInfo((props) => getNewDraggingInfo(Object.assign(Object.assign({}, props), { newTranslateX: itemPositions[nextIndex].start, nextIndex })));
|
|
2204
|
+
}
|
|
2205
|
+
else {
|
|
2206
|
+
setDraggingInfo((props) => getNewDraggingInfo(props));
|
|
2207
|
+
}
|
|
2208
|
+
};
|
|
2209
|
+
function getCurrentTranslateX() {
|
|
2210
|
+
return draggingInfo.translateX + draggingInfo.offset;
|
|
2211
|
+
}
|
|
2212
|
+
function isLastItemFitsScreen(nextIndex) {
|
|
2213
|
+
const restItemsWidth = itemWidths.slice(nextIndex).reduce((prev, curr) => prev + gap + curr);
|
|
2214
|
+
const restTotalWidth = PADDING_WIDTH + CONTENT_LEFT_WIDTH + restItemsWidth;
|
|
2215
|
+
return restTotalWidth <= screenWidth;
|
|
2216
|
+
}
|
|
2217
|
+
function getEachItemPositions() {
|
|
2218
|
+
let accumulator = 0;
|
|
2219
|
+
return itemWidths.map((itemWidth, i) => {
|
|
2220
|
+
if (i > 0) {
|
|
2221
|
+
accumulator -= gap;
|
|
2222
|
+
}
|
|
2223
|
+
const itemPosition = {
|
|
2224
|
+
start: accumulator,
|
|
2225
|
+
end: accumulator - itemWidth,
|
|
2226
|
+
};
|
|
2227
|
+
accumulator -= itemWidth;
|
|
2228
|
+
return itemPosition;
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
2231
|
+
return (React__default.createElement("div", { ref: carouselRef, onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, className: "sb-message-template__carousel", style: {
|
|
2232
|
+
cursor: draggingInfo.dragging ? 'grabbing' : 'grab',
|
|
2233
|
+
transition: draggingInfo.dragging ? 'none' : 'transform 0.5s ease',
|
|
2234
|
+
transform: `translateX(${getCurrentTranslateX()}px)`,
|
|
2235
|
+
} }, children.map((item, index) => (React__default.createElement(CarouselItem, { key: index + '', item: item, defaultWidth: defaultItemWidth + 'px', marginRight: index < children.length - 1 ? gap : undefined })))));
|
|
2236
|
+
});
|
|
2237
|
+
|
|
2238
|
+
function isWrappedText(view) {
|
|
2239
|
+
var _a;
|
|
2240
|
+
return view.type === ComponentType$1.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
|
|
2241
|
+
}
|
|
2242
|
+
// Compares the size spec to the option and returns whether they are equal or not.
|
|
2243
|
+
const isSizeCompatibleWithOption = ({ size, option, }) => {
|
|
2244
|
+
if (option === 'wrap') {
|
|
2245
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
|
|
2246
|
+
}
|
|
2247
|
+
if (option === 'fill') {
|
|
2248
|
+
return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
|
|
2249
|
+
}
|
|
2250
|
+
return size.type === 'fixed';
|
|
2251
|
+
};
|
|
2252
|
+
const isGif = (url) => {
|
|
2253
|
+
var _a;
|
|
2254
|
+
if (typeof url !== 'string')
|
|
2255
|
+
return false;
|
|
2256
|
+
const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2257
|
+
return extension === 'gif';
|
|
2258
|
+
};
|
|
1014
2259
|
|
|
1015
2260
|
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
1016
2261
|
var t = {};
|
|
@@ -1118,7 +2363,7 @@ const ReactMessageTemplateImage = (_a) => {
|
|
|
1118
2363
|
if (hasError) {
|
|
1119
2364
|
return React__default.createElement(PlaceholderReactMessageTemplateImage, Object.assign({}, props));
|
|
1120
2365
|
}
|
|
1121
|
-
else if (tintColor) {
|
|
2366
|
+
else if (tintColor && !isGif(props.src)) {
|
|
1122
2367
|
return React__default.createElement(CanvasReactMessageTemplateImage, Object.assign({}, props, { onError: onError, tintColor: tintColor, metaData: metaData }));
|
|
1123
2368
|
}
|
|
1124
2369
|
else {
|
|
@@ -1149,21 +2394,6 @@ const MessageProvider = (props) => {
|
|
|
1149
2394
|
};
|
|
1150
2395
|
const useMessageContext = () => React__default.useContext(MessageContext);
|
|
1151
2396
|
|
|
1152
|
-
function isWrappedText(view) {
|
|
1153
|
-
var _a;
|
|
1154
|
-
return view.type === ComponentType.Text && ((_a = view.width) === null || _a === void 0 ? void 0 : _a.value) == FlexSizeSpecValue.WrapContent;
|
|
1155
|
-
}
|
|
1156
|
-
// Compares the size spec to the option and returns whether they are equal or not.
|
|
1157
|
-
const isSizeCompatibleWithOption = ({ size, option, }) => {
|
|
1158
|
-
if (option === 'wrap') {
|
|
1159
|
-
return size.type === 'flex' && size.value == FlexSizeSpecValue.WrapContent;
|
|
1160
|
-
}
|
|
1161
|
-
if (option === 'fill') {
|
|
1162
|
-
return size.type === 'flex' && size.value == FlexSizeSpecValue.FillParent;
|
|
1163
|
-
}
|
|
1164
|
-
return size.type === 'fixed';
|
|
1165
|
-
};
|
|
1166
|
-
|
|
1167
2397
|
/**
|
|
1168
2398
|
* Preserves a reference to the given callback function as an argument while the component is mounted.
|
|
1169
2399
|
* Wraps the given callback in React's Ref to preserve the reference.
|
|
@@ -1376,7 +2606,7 @@ function setBorderStyle(styles, borderWidth, borderColor, radius) {
|
|
|
1376
2606
|
}
|
|
1377
2607
|
}
|
|
1378
2608
|
function setViewStyle(styles, props) {
|
|
1379
|
-
var _a, _b, _c, _d;
|
|
2609
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1380
2610
|
const { viewStyle } = props;
|
|
1381
2611
|
if ((_a = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _a === void 0 ? void 0 : _a.top)
|
|
1382
2612
|
styles['marginTop'] = Number(viewStyle.margin.top);
|
|
@@ -1386,6 +2616,9 @@ function setViewStyle(styles, props) {
|
|
|
1386
2616
|
styles['marginLeft'] = Number(viewStyle.margin.left);
|
|
1387
2617
|
if ((_d = viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.margin) === null || _d === void 0 ? void 0 : _d.right)
|
|
1388
2618
|
styles['marginRight'] = Number(viewStyle.margin.right);
|
|
2619
|
+
const marginHorizontal = Number((_e = styles.marginLeft) !== null && _e !== void 0 ? _e : '0') + Number((_f = styles.marginRight) !== null && _f !== void 0 ? _f : '0');
|
|
2620
|
+
if (marginHorizontal > 0 && styles.width === '100%')
|
|
2621
|
+
styles.width = `calc(100% - ${marginHorizontal}px)`;
|
|
1389
2622
|
if (viewStyle === null || viewStyle === void 0 ? void 0 : viewStyle.backgroundColor)
|
|
1390
2623
|
styles['backgroundColor'] = viewStyle.backgroundColor;
|
|
1391
2624
|
// use JSON.stringify to escape special characters in image URL
|
|
@@ -1489,7 +2722,7 @@ function setTextStyle(styles, props, options) {
|
|
|
1489
2722
|
if ((width === null || width === void 0 ? void 0 : width.value) == FlexSizeSpecValue.WrapContent) {
|
|
1490
2723
|
styles['maxWidth'] = '100%';
|
|
1491
2724
|
}
|
|
1492
|
-
if (props.type === ComponentType.Text) {
|
|
2725
|
+
if (props.type === ComponentType$1.Text) {
|
|
1493
2726
|
const { siblings, elemIdx } = options;
|
|
1494
2727
|
// To push out any subsequent components from the container,
|
|
1495
2728
|
// if a prior one is long enough to occupy an entire line
|
|
@@ -1533,19 +2766,24 @@ const ActionHandler = ({ className = '', style, children, props }) => {
|
|
|
1533
2766
|
const { recalculatedStyle, elemRef } = useRecalculateWidth({ style, props });
|
|
1534
2767
|
const { message, handleWebAction, handleCustomAction, handlePredefinedAction } = useMessageContext();
|
|
1535
2768
|
const onClick = (e) => {
|
|
1536
|
-
var _a, _b, _c, _d, _e;
|
|
2769
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1537
2770
|
if (((_a = props === null || props === void 0 ? void 0 : props.action) === null || _a === void 0 ? void 0 : _a.type) === 'web') {
|
|
1538
2771
|
if (handleWebAction) {
|
|
1539
|
-
handleWebAction
|
|
2772
|
+
handleWebAction(e, props.action, message);
|
|
1540
2773
|
}
|
|
1541
2774
|
else {
|
|
1542
2775
|
(_c = window === null || window === void 0 ? void 0 : window.open(returnUrl((_b = props === null || props === void 0 ? void 0 : props.action) === null || _b === void 0 ? void 0 : _b.data), '_blank', 'noopener noreferrer')) === null || _c === void 0 ? void 0 : _c.focus();
|
|
1543
2776
|
}
|
|
1544
2777
|
}
|
|
1545
2778
|
if (((_d = props === null || props === void 0 ? void 0 : props.action) === null || _d === void 0 ? void 0 : _d.type) === 'custom') {
|
|
1546
|
-
|
|
2779
|
+
if (handleCustomAction) {
|
|
2780
|
+
handleCustomAction(e, props.action, message);
|
|
2781
|
+
}
|
|
2782
|
+
else {
|
|
2783
|
+
(_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();
|
|
2784
|
+
}
|
|
1547
2785
|
}
|
|
1548
|
-
if (((
|
|
2786
|
+
if (((_g = props === null || props === void 0 ? void 0 : props.action) === null || _g === void 0 ? void 0 : _g.type) === 'uikit') {
|
|
1549
2787
|
handlePredefinedAction === null || handlePredefinedAction === void 0 ? void 0 : handlePredefinedAction(e, props.action, message);
|
|
1550
2788
|
}
|
|
1551
2789
|
};
|
|
@@ -1582,15 +2820,21 @@ function isFixedOrFill(view) {
|
|
|
1582
2820
|
(widthType === 'flex' && ((_d = view === null || view === void 0 ? void 0 : view.width) === null || _d === void 0 ? void 0 : _d.value) === FlexSizeSpecValue.FillParent);
|
|
1583
2821
|
return isFixedDiamension || isFill;
|
|
1584
2822
|
}
|
|
2823
|
+
function convertNewlinesToBr(text) {
|
|
2824
|
+
return text.split('\n').map((line, index) => (React__default.createElement(React__default.Fragment, { key: index },
|
|
2825
|
+
line,
|
|
2826
|
+
React__default.createElement("br", null))));
|
|
2827
|
+
}
|
|
1585
2828
|
function renderText(view) {
|
|
1586
2829
|
const { text, maxTextLines } = view;
|
|
1587
2830
|
const isToBeWrapped = isFixedOrFill(view);
|
|
1588
2831
|
const isMultiLine = maxTextLines != null && maxTextLines > 0;
|
|
2832
|
+
const convertedText = convertNewlinesToBr(text);
|
|
1589
2833
|
if (isMultiLine || isToBeWrapped) {
|
|
1590
2834
|
const wrapperStyling = Object.assign(Object.assign({}, ((isMultiLine || isToBeWrapped) && { maxWidth: '100%' })), (isToBeWrapped && { maxHeight: '100%', overflow: 'hidden' }));
|
|
1591
|
-
return (React__default.createElement("div", { style: wrapperStyling }, isMultiLine ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) },
|
|
2835
|
+
return (React__default.createElement("div", { style: wrapperStyling }, isMultiLine ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText));
|
|
1592
2836
|
}
|
|
1593
|
-
return
|
|
2837
|
+
return isMultiLine ? React__default.createElement("div", { style: webkitLineClampStyles(maxTextLines) }, convertedText) : convertedText;
|
|
1594
2838
|
}
|
|
1595
2839
|
const renderer = createRenderer({
|
|
1596
2840
|
views: {
|
|
@@ -1607,13 +2851,16 @@ const renderer = createRenderer({
|
|
|
1607
2851
|
React__default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
|
|
1608
2852
|
},
|
|
1609
2853
|
textButton(props) {
|
|
1610
|
-
return (React__default.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(props)));
|
|
2854
|
+
return (React__default.createElement(ActionHandler, { className: "sb-message-template__text-button", elementId: props.elementId, style: props.parsedProperties, props: props }, renderText(Object.assign({ maxTextLines: 1 }, props))));
|
|
1611
2855
|
},
|
|
1612
2856
|
imageButton(props) {
|
|
1613
2857
|
var _a;
|
|
1614
2858
|
return (React__default.createElement(ActionHandler, { className: "sb-message-template__image-container sb-message-template__image-button", elementId: props.elementId, style: props.parsedProperties, props: props },
|
|
1615
2859
|
React__default.createElement(ReactMessageTemplateImage, { className: "sb-message-template__image", alt: "image-button", src: props.imageUrl, style: { width: '100%', height: '100%', aspectRatio: 'inherit', objectFit: 'inherit' }, tintColor: (_a = props.imageStyle) === null || _a === void 0 ? void 0 : _a.tintColor, metaData: props.metaData })));
|
|
1616
2860
|
},
|
|
2861
|
+
carouselView(props) {
|
|
2862
|
+
return React__default.createElement(Carousel, { gap: props.spacing }, props.children);
|
|
2863
|
+
},
|
|
1617
2864
|
},
|
|
1618
2865
|
});
|
|
1619
2866
|
const parser = createParser({
|
|
@@ -1653,18 +2900,21 @@ const parser = createParser({
|
|
|
1653
2900
|
setImageAspectRatio(styles, props);
|
|
1654
2901
|
return styles;
|
|
1655
2902
|
},
|
|
2903
|
+
mapCarouselProps(props, options) {
|
|
2904
|
+
const styles = getDefaultStyles();
|
|
2905
|
+
setViewProps(styles, props, options);
|
|
2906
|
+
return styles;
|
|
2907
|
+
},
|
|
1656
2908
|
});
|
|
1657
2909
|
createMessageTemplate({
|
|
1658
2910
|
renderer,
|
|
1659
2911
|
parser,
|
|
1660
|
-
Container: ({ children }) => {
|
|
1661
|
-
return (React__default.createElement("div", { className:
|
|
2912
|
+
Container: ({ children, className }) => {
|
|
2913
|
+
return (React__default.createElement("div", { className: `sb-message-template__parent ${className}`, style: {
|
|
1662
2914
|
display: 'flex',
|
|
1663
2915
|
flexDirection: 'column',
|
|
1664
2916
|
maxWidth: 400,
|
|
1665
|
-
backgroundColor: '#cecece',
|
|
1666
2917
|
marginBottom: 24,
|
|
1667
|
-
borderRadius: '8px',
|
|
1668
2918
|
} }, children));
|
|
1669
2919
|
},
|
|
1670
2920
|
});
|
|
@@ -1673,17 +2923,17 @@ var CustomTemplate = createMessageTemplate({
|
|
|
1673
2923
|
parser: parser,
|
|
1674
2924
|
renderer: renderer,
|
|
1675
2925
|
Container: function (_a) {
|
|
1676
|
-
var children = _a.children;
|
|
2926
|
+
var children = _a.children, className = _a.className;
|
|
1677
2927
|
return (React__default.createElement("div", { className: [
|
|
1678
|
-
|
|
2928
|
+
"sb-message-template__parent ".concat(className),
|
|
1679
2929
|
'sendbird-message-template__root',
|
|
1680
2930
|
].join(' ') }, children));
|
|
1681
2931
|
},
|
|
1682
2932
|
}).MessageTemplate;
|
|
1683
2933
|
function MessageTemplate(_a) {
|
|
1684
|
-
var templateItems = _a.templateItems;
|
|
1685
|
-
return React__default.createElement(CustomTemplate, { templateItems: templateItems });
|
|
2934
|
+
var templateItems = _a.templateItems, templateVersion = _a.templateVersion;
|
|
2935
|
+
return React__default.createElement(CustomTemplate, { templateItems: templateItems, templateVersion: templateVersion });
|
|
1686
2936
|
}
|
|
1687
2937
|
|
|
1688
|
-
export { MessageProvider as M, MessageTemplate as a };
|
|
1689
|
-
//# sourceMappingURL=bundle-
|
|
2938
|
+
export { CompositeComponentType$1 as C, MessageProvider as M, MessageTemplate as a };
|
|
2939
|
+
//# sourceMappingURL=bundle-DoqoSCJx.js.map
|