@sendbird/uikit-react 3.4.8 → 3.5.0-mobile-web-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 +119 -70
- package/App.js.map +1 -1
- package/Channel/components/ChannelHeader.js +18 -18
- package/Channel/components/ChannelUI.js +46 -41
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +14 -14
- package/Channel/components/FrozenNotification.js +4 -4
- package/Channel/components/Message.js +59 -45
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +35 -36
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageList.js +85 -46
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +16 -16
- package/Channel/components/SuggestedMentionList.js +16 -16
- package/Channel/components/TypingIndicator.js +14 -14
- package/Channel/components/UnreadCount.js +5 -5
- package/Channel/components/UnreadCount.js.map +1 -1
- package/Channel/context.js +11 -11
- package/Channel.js +46 -41
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +14 -14
- package/ChannelList/components/ChannelListHeader.js +6 -6
- package/ChannelList/components/ChannelListUI.js +33 -32
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +25 -25
- package/ChannelList/components/ChannelPreviewAction.js +13 -13
- package/ChannelList/context.js +7 -7
- package/ChannelList.js +29 -29
- package/{ChannelListProvider-1d8f4d94.js → ChannelListProvider-42fb305a.js} +19 -37
- package/ChannelListProvider-42fb305a.js.map +1 -0
- package/{ChannelProvider-bba4a095.js → ChannelProvider-42ea1a96.js} +59 -24
- package/ChannelProvider-42ea1a96.js.map +1 -0
- package/ChannelSettings/components/ChannelProfile.js +11 -11
- package/ChannelSettings/components/ChannelSettingsUI.js +17 -17
- package/ChannelSettings/components/EditDetailsModal.js +11 -11
- package/ChannelSettings/components/LeaveChannel.js +11 -11
- package/ChannelSettings/components/ModerationPanel.js +14 -14
- package/ChannelSettings/components/UserListItem.js +10 -10
- package/ChannelSettings/components/UserPanel.js +13 -13
- package/ChannelSettings/context.js +3 -3
- package/ChannelSettings.js +17 -17
- package/CreateChannel/components/CreateChannelUI.js +13 -13
- package/CreateChannel/components/InviteUsers.js +15 -14
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +10 -10
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +13 -13
- package/{CreateChannelProvider-1ba7a571.js → CreateChannelProvider-37af96d2.js} +1 -1
- package/{CreateChannelProvider-1ba7a571.js.map → CreateChannelProvider-37af96d2.js.map} +1 -1
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +9 -9
- package/CreateOpenChannel/context.js +1 -1
- package/CreateOpenChannel.js +9 -9
- package/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/EditUserProfile.js +12 -12
- package/{LocalizationContext-ae38446a.js → LocalizationContext-1839d2db.js} +3 -3
- package/{LocalizationContext-ae38446a.js.map → LocalizationContext-1839d2db.js.map} +1 -1
- package/{MediaQueryContext-8d283dc2.js → MediaQueryContext-0e0b3a1b.js} +11 -6
- package/MediaQueryContext-0e0b3a1b.js.map +1 -0
- package/{MemberList-38971d43.js → MemberList-28589b39.js} +5 -5
- package/{MemberList-38971d43.js.map → MemberList-28589b39.js.map} +1 -1
- package/Message/context.js +5 -1
- package/Message/context.js.map +1 -1
- package/MessageSearch/components/MessageSearchUI.js +11 -11
- package/MessageSearch/context.js +1 -1
- package/MessageSearch.js +11 -11
- package/MessageSearch.js.map +1 -1
- package/OpenChannel/components/FrozenChannelNotification.js +4 -4
- package/OpenChannel/components/OpenChannelHeader.js +12 -12
- package/OpenChannel/components/OpenChannelInput.js +18 -18
- package/OpenChannel/components/OpenChannelMessage.js +27 -27
- package/OpenChannel/components/OpenChannelMessageList.js +31 -31
- package/OpenChannel/components/OpenChannelUI.js +31 -31
- package/OpenChannel/context.js +8 -8
- package/OpenChannel.js +31 -31
- package/OpenChannelList/components/OpenChannelListUI.js +13 -13
- package/OpenChannelList/components/OpenChannelPreview.js +3 -3
- package/OpenChannelList/context.js +3 -3
- package/OpenChannelList.js +13 -13
- package/{OpenChannelListProvider-e0add710.js → OpenChannelListProvider-71a32f2d.js} +3 -3
- package/{OpenChannelListProvider-e0add710.js.map → OpenChannelListProvider-71a32f2d.js.map} +1 -1
- package/{OpenChannelProvider-49db4c6c.js → OpenChannelProvider-377a0b6e.js} +7 -7
- package/{OpenChannelProvider-49db4c6c.js.map → OpenChannelProvider-377a0b6e.js.map} +1 -1
- package/OpenChannelSettings/components/EditDetailsModal.js +12 -12
- package/OpenChannelSettings/components/OpenChannelProfile.js +12 -12
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +17 -17
- package/OpenChannelSettings/components/OperatorUI.js +16 -16
- package/OpenChannelSettings/components/ParticipantUI.js +14 -14
- package/OpenChannelSettings/context.js +3 -3
- package/OpenChannelSettings.js +17 -17
- package/{RemoveMessageModal-10f50eae.js → RemoveMessageModal-558db27f.js} +3 -3
- package/{RemoveMessageModal-10f50eae.js.map → RemoveMessageModal-558db27f.js.map} +1 -1
- package/SendbirdProvider.js +299 -65
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +90 -49
- package/Thread/components/ParentMessageInfo.js.map +1 -1
- package/Thread/components/ParentMessageInfoItem.js +33 -25
- package/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/Thread/components/ThreadHeader.js +7 -7
- package/Thread/components/ThreadHeader.js.map +1 -1
- package/Thread/components/ThreadList.js +40 -33
- package/Thread/components/ThreadList.js.map +1 -1
- package/Thread/components/ThreadListItem.js +88 -48
- package/Thread/components/ThreadListItem.js.map +1 -1
- package/Thread/components/ThreadMessageInput.js +36 -36
- package/Thread/components/ThreadMessageInput.js.map +1 -1
- package/Thread/components/ThreadUI.js +56 -46
- package/Thread/components/ThreadUI.js.map +1 -1
- package/Thread/context.js +8 -8
- package/Thread.js +49 -42
- package/Thread.js.map +1 -1
- package/{ThreadProvider-128d5041.js → ThreadProvider-0b73628e.js} +11 -8
- package/ThreadProvider-0b73628e.js.map +1 -0
- package/{UserProfileContext-91e3b3f2.js → UserProfileContext-7e645551.js} +1 -1
- package/{UserProfileContext-91e3b3f2.js.map → UserProfileContext-7e645551.js.map} +1 -1
- package/{VoiceMessageInputWrapper-cbfa4f2b.js → VoiceMessageInputWrapper-0b5a78a1.js} +7 -7
- package/{VoiceMessageInputWrapper-cbfa4f2b.js.map → VoiceMessageInputWrapper-0b5a78a1.js.map} +1 -1
- package/VoicePlayer/context.js +3 -3
- package/VoicePlayer/useVoicePlayer.js +3 -3
- package/VoiceRecorder/context.js +11 -4
- package/VoiceRecorder/context.js.map +1 -1
- package/VoiceRecorder/useVoiceRecorder.js +2 -2
- package/{WebAudioUtils-5f47139c.js → WebAudioUtils-fbdb41cd.js} +1 -1
- package/{WebAudioUtils-5f47139c.js.map → WebAudioUtils-fbdb41cd.js.map} +1 -1
- package/{_rollupPluginBabelHelpers-eaf55eff.js → _rollupPluginBabelHelpers-ce69e916.js} +1 -1
- package/_rollupPluginBabelHelpers-ce69e916.js.map +1 -0
- package/{actionTypes-98eee9f4.js → actionTypes-a5283c75.js} +1 -1
- package/{actionTypes-98eee9f4.js.map → actionTypes-a5283c75.js.map} +1 -1
- package/cjs/App.js +119 -70
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +18 -18
- package/cjs/Channel/components/ChannelUI.js +46 -41
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +14 -14
- package/cjs/Channel/components/FrozenNotification.js +4 -4
- package/cjs/Channel/components/Message.js +59 -45
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +35 -36
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +85 -46
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +16 -16
- package/cjs/Channel/components/SuggestedMentionList.js +16 -16
- package/cjs/Channel/components/TypingIndicator.js +14 -14
- package/cjs/Channel/components/UnreadCount.js +5 -5
- package/cjs/Channel/components/UnreadCount.js.map +1 -1
- package/cjs/Channel/context.js +11 -11
- package/cjs/Channel.js +46 -41
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +14 -14
- package/cjs/ChannelList/components/ChannelListHeader.js +6 -6
- package/cjs/ChannelList/components/ChannelListUI.js +33 -32
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +25 -25
- package/cjs/ChannelList/components/ChannelPreviewAction.js +13 -13
- package/cjs/ChannelList/context.js +7 -7
- package/cjs/ChannelList.js +29 -29
- package/cjs/{ChannelListProvider-634b78f3.js → ChannelListProvider-b3ffe21a.js} +19 -37
- package/cjs/ChannelListProvider-b3ffe21a.js.map +1 -0
- package/cjs/{ChannelProvider-5366f030.js → ChannelProvider-b6890429.js} +59 -24
- package/cjs/ChannelProvider-b6890429.js.map +1 -0
- package/cjs/ChannelSettings/components/ChannelProfile.js +11 -11
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +17 -17
- package/cjs/ChannelSettings/components/EditDetailsModal.js +11 -11
- package/cjs/ChannelSettings/components/LeaveChannel.js +11 -11
- package/cjs/ChannelSettings/components/ModerationPanel.js +14 -14
- package/cjs/ChannelSettings/components/UserListItem.js +10 -10
- package/cjs/ChannelSettings/components/UserPanel.js +13 -13
- package/cjs/ChannelSettings/context.js +3 -3
- package/cjs/ChannelSettings.js +17 -17
- package/cjs/CreateChannel/components/CreateChannelUI.js +13 -13
- package/cjs/CreateChannel/components/InviteUsers.js +15 -14
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +10 -10
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +13 -13
- package/cjs/{CreateChannelProvider-65dcc450.js → CreateChannelProvider-e1376032.js} +1 -1
- package/cjs/{CreateChannelProvider-65dcc450.js.map → CreateChannelProvider-e1376032.js.map} +1 -1
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +9 -9
- package/cjs/CreateOpenChannel/context.js +1 -1
- package/cjs/CreateOpenChannel.js +9 -9
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/cjs/EditUserProfile.js +12 -12
- package/cjs/{LocalizationContext-4fa55e6b.js → LocalizationContext-461a0816.js} +3 -3
- package/cjs/{LocalizationContext-4fa55e6b.js.map → LocalizationContext-461a0816.js.map} +1 -1
- package/cjs/{MediaQueryContext-e443379e.js → MediaQueryContext-de7c63bc.js} +11 -6
- package/cjs/MediaQueryContext-de7c63bc.js.map +1 -0
- package/cjs/{MemberList-3736f22c.js → MemberList-593809cb.js} +5 -5
- package/cjs/{MemberList-3736f22c.js.map → MemberList-593809cb.js.map} +1 -1
- package/cjs/Message/context.js +5 -1
- package/cjs/Message/context.js.map +1 -1
- package/cjs/MessageSearch/components/MessageSearchUI.js +11 -11
- package/cjs/MessageSearch/context.js +1 -1
- package/cjs/MessageSearch.js +11 -11
- package/cjs/MessageSearch.js.map +1 -1
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +4 -4
- package/cjs/OpenChannel/components/OpenChannelHeader.js +12 -12
- package/cjs/OpenChannel/components/OpenChannelInput.js +18 -18
- package/cjs/OpenChannel/components/OpenChannelMessage.js +27 -27
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +31 -31
- package/cjs/OpenChannel/components/OpenChannelUI.js +31 -31
- package/cjs/OpenChannel/context.js +8 -8
- package/cjs/OpenChannel.js +31 -31
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +13 -13
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +3 -3
- package/cjs/OpenChannelList/context.js +3 -3
- package/cjs/OpenChannelList.js +13 -13
- package/cjs/{OpenChannelListProvider-458abc0e.js → OpenChannelListProvider-39c11f87.js} +3 -3
- package/cjs/{OpenChannelListProvider-458abc0e.js.map → OpenChannelListProvider-39c11f87.js.map} +1 -1
- package/cjs/{OpenChannelProvider-84f42ba8.js → OpenChannelProvider-e794e881.js} +7 -7
- package/cjs/{OpenChannelProvider-84f42ba8.js.map → OpenChannelProvider-e794e881.js.map} +1 -1
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +12 -12
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +12 -12
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +17 -17
- package/cjs/OpenChannelSettings/components/OperatorUI.js +16 -16
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +14 -14
- package/cjs/OpenChannelSettings/context.js +3 -3
- package/cjs/OpenChannelSettings.js +17 -17
- package/cjs/{RemoveMessageModal-3535563a.js → RemoveMessageModal-29fa1a05.js} +3 -3
- package/cjs/{RemoveMessageModal-3535563a.js.map → RemoveMessageModal-29fa1a05.js.map} +1 -1
- package/cjs/SendbirdProvider.js +298 -64
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +90 -49
- package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfoItem.js +33 -25
- package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/cjs/Thread/components/ThreadHeader.js +7 -7
- package/cjs/Thread/components/ThreadHeader.js.map +1 -1
- package/cjs/Thread/components/ThreadList.js +40 -33
- package/cjs/Thread/components/ThreadList.js.map +1 -1
- package/cjs/Thread/components/ThreadListItem.js +88 -48
- package/cjs/Thread/components/ThreadListItem.js.map +1 -1
- package/cjs/Thread/components/ThreadMessageInput.js +36 -36
- package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
- package/cjs/Thread/components/ThreadUI.js +56 -46
- package/cjs/Thread/components/ThreadUI.js.map +1 -1
- package/cjs/Thread/context.js +8 -8
- package/cjs/Thread.js +49 -42
- package/cjs/Thread.js.map +1 -1
- package/cjs/{ThreadProvider-d38505b4.js → ThreadProvider-e2098298.js} +11 -8
- package/cjs/ThreadProvider-e2098298.js.map +1 -0
- package/cjs/{UserProfileContext-83eaf6e8.js → UserProfileContext-1bcc48a2.js} +1 -1
- package/cjs/{UserProfileContext-83eaf6e8.js.map → UserProfileContext-1bcc48a2.js.map} +1 -1
- package/cjs/{VoiceMessageInputWrapper-68c8b8cb.js → VoiceMessageInputWrapper-f18d6a5e.js} +7 -7
- package/cjs/{VoiceMessageInputWrapper-68c8b8cb.js.map → VoiceMessageInputWrapper-f18d6a5e.js.map} +1 -1
- package/cjs/VoicePlayer/context.js +3 -3
- package/cjs/VoicePlayer/useVoicePlayer.js +3 -3
- package/cjs/VoiceRecorder/context.js +11 -4
- package/cjs/VoiceRecorder/context.js.map +1 -1
- package/cjs/VoiceRecorder/useVoiceRecorder.js +2 -2
- package/cjs/{WebAudioUtils-00b9890d.js → WebAudioUtils-aedad0b1.js} +1 -1
- package/cjs/{WebAudioUtils-00b9890d.js.map → WebAudioUtils-aedad0b1.js.map} +1 -1
- package/cjs/{_rollupPluginBabelHelpers-2c0fc9c3.js → _rollupPluginBabelHelpers-919a4db3.js} +1 -1
- package/cjs/_rollupPluginBabelHelpers-919a4db3.js.map +1 -0
- package/cjs/{actionTypes-fb3f6a66.js → actionTypes-1e75e6e9.js} +1 -1
- package/cjs/{actionTypes-fb3f6a66.js.map → actionTypes-1e75e6e9.js.map} +1 -1
- package/cjs/{color-83cbca20.js → color-48ff06b2.js} +1 -1
- package/cjs/{color-83cbca20.js.map → color-48ff06b2.js.map} +1 -1
- package/cjs/{compareIds-c2907ec8.js → compareIds-8ed822c1.js} +1 -1
- package/cjs/{compareIds-c2907ec8.js.map → compareIds-8ed822c1.js.map} +1 -1
- package/cjs/{const-75153738.js → const-49de651c.js} +1 -1
- package/cjs/{const-75153738.js.map → const-49de651c.js.map} +1 -1
- package/cjs/{const-17970c49.js → const-852d5677.js} +1 -1
- package/cjs/{const-17970c49.js.map → const-852d5677.js.map} +1 -1
- package/cjs/{consts-aaf1208c.js → consts-2580246d.js} +1 -1
- package/cjs/{consts-aaf1208c.js.map → consts-2580246d.js.map} +1 -1
- package/cjs/{consts-5ead6f3b.js → consts-5851f376.js} +1 -1
- package/cjs/{consts-5ead6f3b.js.map → consts-5851f376.js.map} +1 -1
- package/cjs/{consts-0db2bedc.js → consts-6f02fcc4.js} +3 -3
- package/cjs/consts-6f02fcc4.js.map +1 -0
- package/cjs/{consts-d2103ed5.js → consts-e9ee4cf4.js} +1 -1
- package/cjs/{consts-d2103ed5.js.map → consts-e9ee4cf4.js.map} +1 -1
- package/cjs/{context-d9a84cb9.js → context-4d89551f.js} +2 -2
- package/cjs/{context-d9a84cb9.js.map → context-4d89551f.js.map} +1 -1
- package/cjs/dist/index.css +255 -202
- package/cjs/dist/index.css.map +1 -1
- package/cjs/{index-1737cbae.js → index-0126dbb4.js} +4 -4
- package/cjs/{index-1737cbae.js.map → index-0126dbb4.js.map} +1 -1
- package/cjs/{index-6ac703ea.js → index-1a223893.js} +7 -6
- package/cjs/{index-6ac703ea.js.map → index-1a223893.js.map} +1 -1
- package/cjs/{index-fcd2f4ff.js → index-223e9372.js} +3 -2
- package/cjs/{index-fcd2f4ff.js.map → index-223e9372.js.map} +1 -1
- package/cjs/{index-552eb819.js → index-420b8e6d.js} +3 -3
- package/cjs/{index-552eb819.js.map → index-420b8e6d.js.map} +1 -1
- package/cjs/{index-22bdf04e.js → index-44186883.js} +2 -2
- package/cjs/{index-22bdf04e.js.map → index-44186883.js.map} +1 -1
- package/cjs/{index-47e4bdbc.js → index-5e6194f8.js} +1 -1
- package/cjs/{index-47e4bdbc.js.map → index-5e6194f8.js.map} +1 -1
- package/cjs/{index-be9c5a7d.js → index-60bf4d5c.js} +2 -2
- package/cjs/{index-be9c5a7d.js.map → index-60bf4d5c.js.map} +1 -1
- package/cjs/{index-c8c25288.js → index-60ea6503.js} +3 -3
- package/cjs/{index-c8c25288.js.map → index-60ea6503.js.map} +1 -1
- package/cjs/{index-09f8f2a4.js → index-6a46ed00.js} +3 -3
- package/cjs/{index-09f8f2a4.js.map → index-6a46ed00.js.map} +1 -1
- package/cjs/{index-10d8f30f.js → index-7a68d56f.js} +1 -1
- package/cjs/{index-10d8f30f.js.map → index-7a68d56f.js.map} +1 -1
- package/cjs/{index-5307f6c1.js → index-81aad270.js} +2 -2
- package/cjs/{index-5307f6c1.js.map → index-81aad270.js.map} +1 -1
- package/cjs/{index-41ce4c44.js → index-849c0736.js} +2 -2
- package/cjs/{index-41ce4c44.js.map → index-849c0736.js.map} +1 -1
- package/cjs/{index-56735815.js → index-a51f1b7d.js} +5 -5
- package/cjs/{index-56735815.js.map → index-a51f1b7d.js.map} +1 -1
- package/cjs/{index-01768a5e.js → index-a7025294.js} +6 -6
- package/cjs/{index-01768a5e.js.map → index-a7025294.js.map} +1 -1
- package/cjs/{index-265937df.js → index-bca3d144.js} +18 -2
- package/cjs/index-bca3d144.js.map +1 -0
- package/cjs/{index-61c3208b.js → index-f4682499.js} +4 -4
- package/cjs/{index-61c3208b.js.map → index-f4682499.js.map} +1 -1
- package/cjs/index-f5399132.js +419 -0
- package/cjs/index-f5399132.js.map +1 -0
- package/cjs/index.js +60 -58
- package/cjs/index.js.map +1 -1
- package/cjs/{index.module-3e7701ca.js → index.module-10ef9afc.js} +1 -1
- package/cjs/{index.module-3e7701ca.js.map → index.module-10ef9afc.js.map} +1 -1
- package/cjs/sendbirdSelectors.js +3 -3
- package/cjs/{stringSet-c24927d9.js → stringSet-d1cee26a.js} +1 -1
- package/cjs/{stringSet-c24927d9.js.map → stringSet-d1cee26a.js.map} +1 -1
- package/cjs/{tokenize-1441f448.js → tokenize-d3bb1637.js} +7 -3
- package/cjs/tokenize-d3bb1637.js.map +1 -0
- package/cjs/{topics-0df2f6f9.js → topics-00c67dd6.js} +1 -1
- package/cjs/{topics-0df2f6f9.js.map → topics-00c67dd6.js.map} +1 -1
- package/cjs/{types-df20b895.js → types-2e9e46b2.js} +1 -1
- package/cjs/types-2e9e46b2.js.map +1 -0
- package/cjs/ui/Accordion.js +2 -2
- package/cjs/ui/AccordionGroup.js +2 -2
- package/cjs/ui/AdminMessage.js +2 -2
- package/cjs/ui/Avatar.js +1 -1
- package/cjs/ui/Badge.js +4 -4
- package/cjs/ui/BottomSheet.js +1 -1
- package/cjs/ui/Button.js +2 -2
- package/cjs/ui/ChannelAvatar.js +2 -2
- package/cjs/ui/ConnectionStatus.js +4 -4
- package/cjs/ui/ContextMenu.js +35 -24
- package/cjs/ui/ContextMenu.js.map +1 -1
- package/cjs/ui/DateSeparator.js +3 -3
- package/cjs/ui/EmojiReactions.js +249 -46
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FileMessageItemBody.js +6 -6
- package/cjs/ui/FileViewer.js +8 -8
- package/cjs/ui/Icon.js +190 -167
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +1 -1
- package/cjs/ui/Input.js +2 -2
- package/cjs/ui/Label.js +2 -2
- package/cjs/ui/LinkLabel.js +2 -2
- package/cjs/ui/MentionLabel.js +10 -10
- package/cjs/ui/MentionUserLabel.js +1 -1
- package/cjs/ui/MessageContent.js +55 -400
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput.js +12 -12
- package/cjs/ui/MessageItemMenu.js +8 -8
- package/cjs/ui/MessageItemReactionMenu.js +12 -6
- package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
- package/cjs/ui/MessageSearchFileItem.js +10 -10
- package/cjs/ui/MessageSearchItem.js +8 -8
- package/cjs/ui/MessageStatus.js +10 -10
- package/cjs/ui/Modal.js +7 -7
- package/cjs/ui/OGMessageItemBody.js +14 -14
- package/cjs/ui/OpenChannelAdminMessage.js +2 -2
- package/cjs/ui/OpenChannelAvatar.js +5 -5
- package/cjs/ui/OpenchannelConversationHeader.js +6 -6
- package/cjs/ui/OpenchannelFileMessage.js +15 -15
- package/cjs/ui/OpenchannelOGMessage.js +45 -51
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +14 -14
- package/cjs/ui/OpenchannelUserMessage.js +15 -15
- package/cjs/ui/PlaceHolder.js +5 -5
- package/cjs/ui/PlaybackTime.js +2 -2
- package/cjs/ui/QuoteMessage.js +6 -6
- package/cjs/ui/QuoteMessageInput.js +6 -6
- package/cjs/ui/ReactionBadge.js +2 -2
- package/cjs/ui/ReactionButton.js +15 -11
- package/cjs/ui/ReactionButton.js.map +1 -1
- package/cjs/ui/SortByRow.js +1 -1
- package/cjs/ui/TextButton.js +1 -1
- package/cjs/ui/TextMessageItemBody.js +14 -14
- package/cjs/ui/ThreadReplies.js +5 -5
- package/cjs/ui/ThumbnailMessageItemBody.js +15 -9
- package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/cjs/ui/Toggle.js +1 -1
- package/cjs/ui/Tooltip.js +2 -2
- package/cjs/ui/UnknownMessageItemBody.js +6 -6
- package/cjs/ui/UserListItem.js +14 -13
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +9 -9
- package/cjs/ui/VoiceMessageItemBody.js +5 -5
- package/cjs/ui/VoiceMessgeInput.js +7 -7
- package/cjs/ui/Word.js +10 -10
- package/cjs/useDirtyGetMentions-7b6c8a19.js +77 -0
- package/cjs/useDirtyGetMentions-7b6c8a19.js.map +1 -0
- package/cjs/{useLongPress-8aa00a28.js → useLongPress-4c2e9a3b.js} +9 -5
- package/cjs/useLongPress-4c2e9a3b.js.map +1 -0
- package/cjs/useSendbirdStateContext.js +1 -1
- package/cjs/utils/message/isVoiceMessage.js +2 -2
- package/cjs/{utils-111f523c.js → utils-22d05a53.js} +1 -1
- package/cjs/{utils-111f523c.js.map → utils-22d05a53.js.map} +1 -1
- package/cjs/{utils-a1fead2f.js → utils-3dacb9bc.js} +1 -1
- package/cjs/{utils-a1fead2f.js.map → utils-3dacb9bc.js.map} +1 -1
- package/cjs/{utils-93abfb7c.js → utils-c5d4c36e.js} +1 -1
- package/cjs/{utils-93abfb7c.js.map → utils-c5d4c36e.js.map} +1 -1
- package/cjs/{utils-4717b83e.js → utils-f1c09ec3.js} +2 -2
- package/cjs/{utils-4717b83e.js.map → utils-f1c09ec3.js.map} +1 -1
- package/cjs/{uuid-c854e2a9.js → uuid-d86ea01f.js} +1 -1
- package/cjs/{uuid-c854e2a9.js.map → uuid-d86ea01f.js.map} +1 -1
- package/cjs/withSendbird.js +1 -1
- package/{color-c1b95a91.js → color-4ca8a2ea.js} +1 -1
- package/{color-c1b95a91.js.map → color-4ca8a2ea.js.map} +1 -1
- package/{compareIds-74cf4016.js → compareIds-08858dd3.js} +1 -1
- package/{compareIds-74cf4016.js.map → compareIds-08858dd3.js.map} +1 -1
- package/{const-befef81d.js → const-714046e0.js} +1 -1
- package/{const-befef81d.js.map → const-714046e0.js.map} +1 -1
- package/{const-3af04f0a.js → const-a77c08c9.js} +1 -1
- package/{const-3af04f0a.js.map → const-a77c08c9.js.map} +1 -1
- package/{consts-9ece4263.js → consts-9393e7c8.js} +3 -3
- package/consts-9393e7c8.js.map +1 -0
- package/{consts-a8bc28bd.js → consts-aecb8fab.js} +1 -1
- package/{consts-a8bc28bd.js.map → consts-aecb8fab.js.map} +1 -1
- package/{consts-354db0d9.js → consts-d46e0fc1.js} +1 -1
- package/{consts-354db0d9.js.map → consts-d46e0fc1.js.map} +1 -1
- package/{consts-bb6cbaee.js → consts-decd9c7d.js} +1 -1
- package/{consts-bb6cbaee.js.map → consts-decd9c7d.js.map} +1 -1
- package/{context-38bde7ff.js → context-9a6b8b8a.js} +2 -2
- package/{context-38bde7ff.js.map → context-9a6b8b8a.js.map} +1 -1
- package/dist/index.css +255 -202
- package/dist/index.css.map +1 -1
- package/{index-67dd0c26.js → index-06f34585.js} +2 -2
- package/{index-67dd0c26.js.map → index-06f34585.js.map} +1 -1
- package/{index-aa215b1c.js → index-20880943.js} +3 -3
- package/{index-aa215b1c.js.map → index-20880943.js.map} +1 -1
- package/{index-4554e20e.js → index-3130ac38.js} +4 -4
- package/{index-4554e20e.js.map → index-3130ac38.js.map} +1 -1
- package/{index-14bb6832.js → index-3165e396.js} +1 -1
- package/{index-14bb6832.js.map → index-3165e396.js.map} +1 -1
- package/{index-88ab67cc.js → index-400417a1.js} +4 -4
- package/{index-88ab67cc.js.map → index-400417a1.js.map} +1 -1
- package/{index-ae8e6fc3.js → index-5644a6c0.js} +3 -3
- package/{index-ae8e6fc3.js.map → index-5644a6c0.js.map} +1 -1
- package/{index-1be3f6d7.js → index-5db37327.js} +3 -3
- package/{index-1be3f6d7.js.map → index-5db37327.js.map} +1 -1
- package/{index-db801708.js → index-7c9ebc67.js} +5 -5
- package/{index-db801708.js.map → index-7c9ebc67.js.map} +1 -1
- package/{index-8a4d2b6e.js → index-9781d2b9.js} +2 -2
- package/{index-8a4d2b6e.js.map → index-9781d2b9.js.map} +1 -1
- package/{index-1556dc4a.js → index-b96440b7.js} +3 -3
- package/{index-1556dc4a.js.map → index-b96440b7.js.map} +1 -1
- package/{index-8bf82e3b.js → index-bf72ef7c.js} +7 -6
- package/{index-8bf82e3b.js.map → index-bf72ef7c.js.map} +1 -1
- package/{index-96f6e11b.js → index-c6df8184.js} +6 -6
- package/{index-96f6e11b.js.map → index-c6df8184.js.map} +1 -1
- package/{index-321e838f.js → index-d9c12cf4.js} +1 -1
- package/{index-321e838f.js.map → index-d9c12cf4.js.map} +1 -1
- package/{index-a900bd78.js → index-e1cd2fcf.js} +2 -2
- package/{index-a900bd78.js.map → index-e1cd2fcf.js.map} +1 -1
- package/index-edfb3327.js +413 -0
- package/index-edfb3327.js.map +1 -0
- package/{index-d8fdbe6f.js → index-fd51c7d1.js} +16 -3
- package/index-fd51c7d1.js.map +1 -0
- package/{index-ecf3a793.js → index-fd95258e.js} +2 -2
- package/{index-ecf3a793.js.map → index-fd95258e.js.map} +1 -1
- package/index.d.ts +3 -1
- package/index.js +60 -58
- package/index.js.map +1 -1
- package/{index.module-1c75b4f5.js → index.module-8c144786.js} +1 -1
- package/{index.module-1c75b4f5.js.map → index.module-8c144786.js.map} +1 -1
- package/package.json +2 -2
- package/sendbirdSelectors.js +3 -3
- package/{stringSet-6d89212b.js → stringSet-d368e289.js} +1 -1
- package/{stringSet-6d89212b.js.map → stringSet-d368e289.js.map} +1 -1
- package/{tokenize-2e969273.js → tokenize-7056afb7.js} +7 -3
- package/tokenize-7056afb7.js.map +1 -0
- package/{topics-8f4016e9.js → topics-f9628f1f.js} +1 -1
- package/{topics-8f4016e9.js.map → topics-f9628f1f.js.map} +1 -1
- package/{types-ebbbec62.js → types-2b508dbc.js} +1 -1
- package/types-2b508dbc.js.map +1 -0
- package/ui/Accordion.js +2 -2
- package/ui/AccordionGroup.js +2 -2
- package/ui/AdminMessage.js +2 -2
- package/ui/Avatar.js +1 -1
- package/ui/Badge.js +4 -4
- package/ui/BottomSheet.js +1 -1
- package/ui/Button.js +2 -2
- package/ui/ChannelAvatar.js +2 -2
- package/ui/ConnectionStatus.js +4 -4
- package/ui/ContextMenu.js +35 -24
- package/ui/ContextMenu.js.map +1 -1
- package/ui/DateSeparator.js +3 -3
- package/ui/EmojiReactions.js +250 -47
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FileMessageItemBody.js +6 -6
- package/ui/FileViewer.js +8 -8
- package/ui/Icon.js +190 -167
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +1 -1
- package/ui/Input.js +2 -2
- package/ui/Label.js +2 -2
- package/ui/LinkLabel.js +2 -2
- package/ui/MentionLabel.js +10 -10
- package/ui/MentionUserLabel.js +1 -1
- package/ui/MessageContent.js +56 -401
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput.js +12 -12
- package/ui/MessageItemMenu.js +8 -8
- package/ui/MessageItemReactionMenu.js +12 -6
- package/ui/MessageItemReactionMenu.js.map +1 -1
- package/ui/MessageSearchFileItem.js +10 -10
- package/ui/MessageSearchItem.js +8 -8
- package/ui/MessageStatus.js +10 -10
- package/ui/Modal.js +7 -7
- package/ui/OGMessageItemBody.js +14 -14
- package/ui/OpenChannelAdminMessage.js +2 -2
- package/ui/OpenChannelAvatar.js +5 -5
- package/ui/OpenchannelConversationHeader.js +6 -6
- package/ui/OpenchannelFileMessage.js +15 -15
- package/ui/OpenchannelOGMessage.js +45 -51
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +14 -14
- package/ui/OpenchannelUserMessage.js +15 -15
- package/ui/PlaceHolder.js +5 -5
- package/ui/PlaybackTime.js +2 -2
- package/ui/QuoteMessage.js +6 -6
- package/ui/QuoteMessageInput.js +6 -6
- package/ui/ReactionBadge.js +2 -2
- package/ui/ReactionButton.js +15 -11
- package/ui/ReactionButton.js.map +1 -1
- package/ui/SortByRow.js +1 -1
- package/ui/TextButton.js +1 -1
- package/ui/TextMessageItemBody.js +14 -14
- package/ui/ThreadReplies.js +5 -5
- package/ui/ThumbnailMessageItemBody.js +15 -9
- package/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/ui/Toggle.js +1 -1
- package/ui/Tooltip.js +2 -2
- package/ui/UnknownMessageItemBody.js +6 -6
- package/ui/UserListItem.js +14 -13
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +9 -9
- package/ui/VoiceMessageItemBody.js +5 -5
- package/ui/VoiceMessgeInput.js +7 -7
- package/ui/Word.js +10 -10
- package/useDirtyGetMentions-e0c0f521.js +75 -0
- package/useDirtyGetMentions-e0c0f521.js.map +1 -0
- package/{useLongPress-8d44d259.js → useLongPress-685c7391.js} +9 -5
- package/useLongPress-685c7391.js.map +1 -0
- package/useSendbirdStateContext.js +1 -1
- package/utils/message/isVoiceMessage.js +2 -2
- package/{utils-c8b489c4.js → utils-256f157f.js} +1 -1
- package/{utils-c8b489c4.js.map → utils-256f157f.js.map} +1 -1
- package/{utils-8e039c1b.js → utils-4979f950.js} +1 -1
- package/{utils-8e039c1b.js.map → utils-4979f950.js.map} +1 -1
- package/{utils-7d781542.js → utils-f82ad058.js} +1 -1
- package/{utils-7d781542.js.map → utils-f82ad058.js.map} +1 -1
- package/{utils-b42f4fab.js → utils-fbc09760.js} +2 -2
- package/{utils-b42f4fab.js.map → utils-fbc09760.js.map} +1 -1
- package/{uuid-c94bd88b.js → uuid-720c99c0.js} +1 -1
- package/{uuid-c94bd88b.js.map → uuid-720c99c0.js.map} +1 -1
- package/withSendbird.js +1 -1
- package/ChannelListProvider-1d8f4d94.js.map +0 -1
- package/ChannelProvider-bba4a095.js.map +0 -1
- package/MediaQueryContext-8d283dc2.js.map +0 -1
- package/ThreadProvider-128d5041.js.map +0 -1
- package/_rollupPluginBabelHelpers-eaf55eff.js.map +0 -1
- package/cjs/ChannelListProvider-634b78f3.js.map +0 -1
- package/cjs/ChannelProvider-5366f030.js.map +0 -1
- package/cjs/MediaQueryContext-e443379e.js.map +0 -1
- package/cjs/ThreadProvider-d38505b4.js.map +0 -1
- package/cjs/_rollupPluginBabelHelpers-2c0fc9c3.js.map +0 -1
- package/cjs/consts-0db2bedc.js.map +0 -1
- package/cjs/index-265937df.js.map +0 -1
- package/cjs/tokenize-1441f448.js.map +0 -1
- package/cjs/types-df20b895.js.map +0 -1
- package/cjs/useLongPress-8aa00a28.js.map +0 -1
- package/consts-9ece4263.js.map +0 -1
- package/index-d8fdbe6f.js.map +0 -1
- package/tokenize-2e969273.js.map +0 -1
- package/types-ebbbec62.js.map +0 -1
- package/useLongPress-8d44d259.js.map +0 -1
|
@@ -3,67 +3,67 @@ import ChannelListHeader from './ChannelListHeader.js';
|
|
|
3
3
|
import { AddChannel } from './AddChannel.js';
|
|
4
4
|
import ChannelPreview from './ChannelPreview.js';
|
|
5
5
|
import ChannelPreviewAction from './ChannelPreviewAction.js';
|
|
6
|
-
import { u as useChannelListContext, F as FETCH_CHANNELS_START, a as FETCH_CHANNELS_SUCCESS, b as FETCH_CHANNELS_FAILURE, L as LEAVE_CHANNEL_SUCCESS, S as SET_CURRENT_CHANNEL } from '../../ChannelListProvider-
|
|
6
|
+
import { u as useChannelListContext, F as FETCH_CHANNELS_START, a as FETCH_CHANNELS_SUCCESS, b as FETCH_CHANNELS_FAILURE, L as LEAVE_CHANNEL_SUCCESS, S as SET_CURRENT_CHANNEL } from '../../ChannelListProvider-42fb305a.js';
|
|
7
7
|
import useSendbirdStateContext from '../../useSendbirdStateContext.js';
|
|
8
8
|
import EditProfile from '../../EditUserProfile.js';
|
|
9
|
-
import { P as PlaceHolder, a as PlaceHolderTypes } from '../../index-
|
|
10
|
-
import '../../LocalizationContext-
|
|
11
|
-
import '../../stringSet-
|
|
12
|
-
import '../../index-
|
|
13
|
-
import '../../index-
|
|
9
|
+
import { P as PlaceHolder, a as PlaceHolderTypes } from '../../index-20880943.js';
|
|
10
|
+
import '../../LocalizationContext-1839d2db.js';
|
|
11
|
+
import '../../stringSet-d368e289.js';
|
|
12
|
+
import '../../index-d9c12cf4.js';
|
|
13
|
+
import '../../index-e1cd2fcf.js';
|
|
14
14
|
import 'prop-types';
|
|
15
15
|
import '../../ui/Avatar.js';
|
|
16
16
|
import '../../ui/ImageRenderer.js';
|
|
17
17
|
import '../../ui/Icon.js';
|
|
18
|
-
import '../../uuid-
|
|
18
|
+
import '../../uuid-720c99c0.js';
|
|
19
19
|
import '../../ui/IconButton.js';
|
|
20
|
-
import '../../_rollupPluginBabelHelpers-
|
|
20
|
+
import '../../_rollupPluginBabelHelpers-ce69e916.js';
|
|
21
21
|
import '../../CreateChannel.js';
|
|
22
22
|
import '../../CreateChannel/components/CreateChannelUI.js';
|
|
23
|
-
import '../../CreateChannelProvider-
|
|
23
|
+
import '../../CreateChannelProvider-37af96d2.js';
|
|
24
24
|
import '../../sendbirdSelectors.js';
|
|
25
|
-
import '../../topics-
|
|
26
|
-
import '../../utils-
|
|
25
|
+
import '../../topics-f9628f1f.js';
|
|
26
|
+
import '../../utils-256f157f.js';
|
|
27
27
|
import '../../CreateChannel/components/InviteUsers.js';
|
|
28
28
|
import '../../ui/Modal.js';
|
|
29
29
|
import 'react-dom';
|
|
30
|
-
import '../../index-
|
|
30
|
+
import '../../index-3165e396.js';
|
|
31
31
|
import '../../ui/Button.js';
|
|
32
|
-
import '../../MediaQueryContext-
|
|
32
|
+
import '../../MediaQueryContext-0e0b3a1b.js';
|
|
33
33
|
import '../../ui/UserListItem.js';
|
|
34
|
-
import '../../UserProfileContext-
|
|
34
|
+
import '../../UserProfileContext-7e645551.js';
|
|
35
35
|
import '../../ui/MutedAvatarOverlay.js';
|
|
36
36
|
import '../../ui/Checkbox.js';
|
|
37
37
|
import '../../ui/UserProfile.js';
|
|
38
38
|
import '../../ui/ContextMenu.js';
|
|
39
39
|
import '../../ui/SortByRow.js';
|
|
40
|
-
import '../../index-
|
|
40
|
+
import '../../index-fd51c7d1.js';
|
|
41
41
|
import '../../utils/message/getOutgoingMessageState.js';
|
|
42
42
|
import '../../CreateChannel/components/SelectChannelType.js';
|
|
43
43
|
import '../../ui/ChannelAvatar.js';
|
|
44
|
-
import '../../utils-
|
|
44
|
+
import '../../utils-4979f950.js';
|
|
45
45
|
import '../../ui/Badge.js';
|
|
46
|
-
import '../../index-
|
|
47
|
-
import '../../index-
|
|
46
|
+
import '../../index-c6df8184.js';
|
|
47
|
+
import '../../index-06f34585.js';
|
|
48
48
|
import '../../ui/Loader.js';
|
|
49
|
-
import '../../index-
|
|
50
|
-
import '../../index-
|
|
49
|
+
import '../../index-5db37327.js';
|
|
50
|
+
import '../../index-9781d2b9.js';
|
|
51
51
|
import '../../ui/MentionUserLabel.js';
|
|
52
|
-
import '../../consts-
|
|
52
|
+
import '../../consts-aecb8fab.js';
|
|
53
53
|
import '../../ui/TextButton.js';
|
|
54
|
-
import '../../color-
|
|
54
|
+
import '../../color-4ca8a2ea.js';
|
|
55
55
|
import '../../Channel/components/TypingIndicator.js';
|
|
56
56
|
import '@sendbird/chat/groupChannel';
|
|
57
|
-
import '../../ChannelProvider-
|
|
58
|
-
import '../../compareIds-
|
|
59
|
-
import '../../const-
|
|
57
|
+
import '../../ChannelProvider-42ea1a96.js';
|
|
58
|
+
import '../../compareIds-08858dd3.js';
|
|
59
|
+
import '../../const-a77c08c9.js';
|
|
60
60
|
import '@sendbird/chat/message';
|
|
61
|
-
import '../../consts-
|
|
62
|
-
import '../../useLongPress-
|
|
61
|
+
import '../../consts-9393e7c8.js';
|
|
62
|
+
import '../../useLongPress-685c7391.js';
|
|
63
63
|
import '../../withSendbird.js';
|
|
64
|
-
import '../../index-
|
|
64
|
+
import '../../index-7c9ebc67.js';
|
|
65
65
|
import '../../ui/Input.js';
|
|
66
|
-
import '../../actionTypes-
|
|
66
|
+
import '../../actionTypes-a5283c75.js';
|
|
67
67
|
|
|
68
68
|
const isAboutSame = (a, b, px) => Math.abs(a - b) <= px;
|
|
69
69
|
|
|
@@ -95,7 +95,8 @@ const ChannelListUI = props => {
|
|
|
95
95
|
const {
|
|
96
96
|
logger,
|
|
97
97
|
isOnline = false,
|
|
98
|
-
|
|
98
|
+
markAsDeliveredScheduler,
|
|
99
|
+
disableMarkAsDelivered
|
|
99
100
|
} = config;
|
|
100
101
|
const sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk;
|
|
101
102
|
const sdkError = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.error;
|
|
@@ -136,12 +137,12 @@ const ChannelListUI = props => {
|
|
|
136
137
|
payload: channelList
|
|
137
138
|
});
|
|
138
139
|
const canSetMarkAsDelivered = sdk === null || sdk === void 0 ? void 0 : (_sdk$appInfo = sdk.appInfo) === null || _sdk$appInfo === void 0 ? void 0 : (_sdk$appInfo$premiumF = _sdk$appInfo.premiumFeatureList) === null || _sdk$appInfo$premiumF === void 0 ? void 0 : _sdk$appInfo$premiumF.find(feature => feature === DELIVERY_RECIPT);
|
|
139
|
-
if (canSetMarkAsDelivered) {
|
|
140
|
+
if (canSetMarkAsDelivered && !disableMarkAsDelivered) {
|
|
140
141
|
logger.info('ChannelList: Marking all channels as read');
|
|
141
142
|
// eslint-disable-next-line no-unused-expressions
|
|
142
143
|
channelList === null || channelList === void 0 ? void 0 : channelList.forEach(channel => {
|
|
143
144
|
if ((channel === null || channel === void 0 ? void 0 : channel.unreadMessageCount) > 0) {
|
|
144
|
-
|
|
145
|
+
markAsDeliveredScheduler.push(channel);
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelListUI.js","sources":["../../../src/modules/ChannelList/components/utils.js","../../../src/modules/ChannelList/components/ChannelListUI/index.tsx"],"sourcesContent":["export const createDefaultUserListQuery = ({ sdk, userFilledApplicationUserListQuery = {} }) => {\n if (sdk?.createApplicationUserListQuery) {\n const params = sdk?.createApplicationUserListQuery();\n if (userFilledApplicationUserListQuery) {\n Object.keys(userFilledApplicationUserListQuery).forEach((key) => {\n params[key] = userFilledApplicationUserListQuery[key];\n });\n }\n return params;\n }\n return null;\n};\n\nconst getApplicationAttributes = (sdk = {}) => {\n const { appInfo = {} } = sdk;\n const { applicationAttributes = [] } = appInfo;\n return applicationAttributes;\n};\n\nexport const isBroadcastChannelEnabled = (sdk = {}) => {\n const ALLOW_BROADCAST_CHANNEL = 'allow_broadcast_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_BROADCAST_CHANNEL);\n }\n\n return false;\n};\nexport const isSuperGroupChannelEnabled = (sdk = {}) => {\n const ALLOW_SUPER_GROUP_CHANNEL = 'allow_super_group_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_SUPER_GROUP_CHANNEL);\n }\n\n return false;\n};\n\nexport const isAboutSame = (a, b, px) => (Math.abs(a - b) <= px);\n\nexport const setChannelType = (params, type) => {\n if (type === 'broadcast') {\n // eslint-disable-next-line no-param-reassign\n params.isBroadcast = true;\n }\n if (type === 'supergroup') {\n // eslint-disable-next-line no-param-reassign\n params.isSuper = true;\n }\n return params;\n};\n\nexport const createChannel = (\n sdk,\n selectedUsers,\n onBeforeCreateChannel,\n userId,\n type = 'group',\n) => new Promise((resolve, reject) => {\n // have custom params\n if (onBeforeCreateChannel) {\n const params = onBeforeCreateChannel(selectedUsers);\n setChannelType(params, type);\n sdk.groupChannel.createChannel(params).then((groupChannel) => {\n resolve(groupChannel);\n }).catch((err) => { reject(err); });\n return;\n }\n\n const params = new sdk.GroupChannelParams();\n params.addUserIds(selectedUsers);\n params.isDistinct = false;\n\n if (userId) {\n params.operatorUserIds = [userId];\n }\n setChannelType(params, type);\n // do not have custom params\n sdk.groupChannel.createChannel(params).then((groupChannel) => {\n resolve(groupChannel);\n }).catch((err) => { resolve(err); });\n});\n\nexport default createChannel;\n","import './channel-list-ui.scss';\n\nimport React, { useState } from 'react';\nimport type { GroupChannel, Member, SendbirdGroupChat } from '@sendbird/chat/groupChannel';\nimport type { User } from '@sendbird/chat';\n\nimport ChannelListHeader from '../ChannelListHeader';\nimport AddChannel from '../AddChannel';\nimport ChannelPreview from '../ChannelPreview';\nimport ChannelPreviewAction from '../ChannelPreviewAction';\nimport { useChannelListContext } from '../../context/ChannelListProvider';\nimport * as channelListActions from '../../dux/actionTypes';\n\nimport useSendbirdStateContext from '../../../../hooks/useSendbirdStateContext';\nimport EditUserProfile from '../../../EditUserProfile';\nimport PlaceHolder, { PlaceHolderTypes } from '../../../../ui/PlaceHolder';\nimport { isAboutSame } from '../utils';\n\nconst DELIVERY_RECIPT = 'delivery_receipt';\n\ninterface RenderChannelPreviewProps {\n channel: GroupChannel;\n onLeaveChannel(\n channel: GroupChannel,\n onLeaveChannelCb?: (c: GroupChannel) => void,\n );\n}\n\ninterface RenderUserProfileProps {\n user: Member | User;\n currentUserId: string;\n close(): void;\n}\n\nexport interface ChannelListUIProps {\n renderChannelPreview?: (props: RenderChannelPreviewProps) => React.ReactElement;\n renderUserProfile?: (props: RenderUserProfileProps) => React.ReactElement;\n renderHeader?: (props: void) => React.ReactElement;\n renderPlaceHolderError?: (props: void) => React.ReactElement;\n renderPlaceHolderLoading?: (props: void) => React.ReactElement;\n renderPlaceHolderEmptyList?: (props: void) => React.ReactElement;\n}\n\nconst ChannelListUI: React.FC<ChannelListUIProps> = (props: ChannelListUIProps) => {\n const {\n renderHeader,\n renderChannelPreview,\n renderPlaceHolderError,\n renderPlaceHolderLoading,\n renderPlaceHolderEmptyList,\n } = props;\n\n const [showProfileEdit, setShowProfileEdit] = useState(false);\n\n const {\n onThemeChange,\n allowProfileEdit,\n allChannels,\n loading,\n currentChannel,\n channelListDispatcher,\n channelSource,\n typingChannels,\n initialized,\n } = useChannelListContext();\n\n const state = useSendbirdStateContext();\n\n const sdkStore = state?.stores?.sdkStore;\n const config = state?.config;\n const {\n logger,\n isOnline = false,\n markAsReadScheduler,\n } = config;\n\n const sdk = sdkStore?.sdk as SendbirdGroupChat;\n const sdkError = sdkStore?.error;\n\n return (\n <>\n <div className=\"sendbird-channel-list__header\">\n {\n renderHeader?.() || (\n <ChannelListHeader\n onEdit={() => {\n if (allowProfileEdit) {\n setShowProfileEdit(true);\n }\n }}\n allowProfileEdit={allowProfileEdit}\n renderIconButton={() => (\n <AddChannel />\n )}\n />\n )\n }\n </div>\n {\n showProfileEdit && (\n <EditUserProfile\n onThemeChange={onThemeChange}\n onCancel={() => { setShowProfileEdit(false); }}\n onEditProfile={() => {\n setShowProfileEdit(false);\n }}\n />\n )\n }\n <div\n className=\"sendbird-channel-list__body\"\n onScroll={(e) => {\n const target = e?.target as HTMLDivElement;\n const fetchMore = isAboutSame(target.clientHeight + target.scrollTop, target.scrollHeight, 10);\n if (fetchMore && channelSource?.hasNext) {\n logger.info('ChannelList: Fetching more channels');\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_START,\n payload: null,\n });\n channelSource.next().then((channelList) => {\n logger.info('ChannelList: Fetching channels successful', channelList);\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_SUCCESS,\n payload: channelList,\n });\n const canSetMarkAsDelivered = sdk?.appInfo?.premiumFeatureList\n ?.find((feature) => (feature === DELIVERY_RECIPT));\n\n if (canSetMarkAsDelivered) {\n logger.info('ChannelList: Marking all channels as read');\n // eslint-disable-next-line no-unused-expressions\n channelList?.forEach((channel) => {\n if (channel?.unreadMessageCount > 0) {\n markAsReadScheduler.push(channel);\n }\n });\n }\n }).catch((err) => {\n logger.info('ChannelList: Fetching channels failed', err);\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_FAILURE,\n payload: err,\n });\n });\n }\n }}\n >\n {\n (sdkError && !loading) && (\n (renderPlaceHolderError && typeof renderPlaceHolderError === 'function') ? (\n renderPlaceHolderError?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.WRONG} />\n )\n )\n }\n {/*\n To do: Implement windowing\n Implement windowing if you are dealing with large number of messages/channels\n https://github.com/bvaughn/react-window -> recommendation\n We hesitate to bring one more dependency to our library,\n we are planning to implement it inside the library\n */}\n <div>\n {\n allChannels && allChannels.map((channel, idx) => {\n // todo: Refactor and move this inside channel - preview\n const onLeaveChannel = (c, cb) => {\n logger.info('ChannelList: Leaving channel', c);\n c.leave()\n .then((res) => {\n logger.info('ChannelList: Leaving channel success', res);\n if (cb && typeof cb === 'function') {\n cb(res, null);\n }\n channelListDispatcher({\n type: channelListActions.LEAVE_CHANNEL_SUCCESS,\n payload: channel?.url,\n });\n })\n .catch((err) => {\n logger.error('ChannelList: Leaving channel failed', err);\n if (cb && typeof cb === 'function') {\n cb(null, err);\n }\n });\n };\n\n const onClick = () => {\n if (!isOnline) { return; }\n logger.info('ChannelList: Clicked on channel:', channel);\n channelListDispatcher({\n type: channelListActions.SET_CURRENT_CHANNEL,\n payload: channel,\n });\n };\n\n return (\n (renderChannelPreview)\n ? (\n // eslint-disable-next-line\n <div key={channel?.url} onClick={onClick}>\n {renderChannelPreview({ channel, onLeaveChannel })}\n </div>\n )\n : (\n <ChannelPreview\n key={channel?.url}\n tabIndex={idx}\n onClick={onClick}\n channel={channel}\n onLeaveChannel={() => onLeaveChannel(channel, null)}\n isActive={channel?.url === currentChannel?.url}\n isTyping={typingChannels?.some(({ url }) => url === channel?.url)}\n renderChannelAction={(() => (\n <ChannelPreviewAction\n channel={channel}\n disabled={!isOnline}\n onLeaveChannel={() => onLeaveChannel(channel, null)}\n />\n ))}\n />\n )\n );\n })\n }\n </div>\n {\n (!initialized && loading) && (\n (renderPlaceHolderLoading && typeof renderPlaceHolderLoading === 'function') ? (\n renderPlaceHolderLoading?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.LOADING} />\n )\n )\n }\n {\n (initialized && allChannels?.length === 0) && (\n (renderPlaceHolderEmptyList && typeof renderPlaceHolderEmptyList === 'function') ? (\n renderPlaceHolderEmptyList?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.NO_CHANNELS} />\n )\n )\n }\n </div>\n </>\n );\n};\n\nexport default ChannelListUI;\n"],"names":["isAboutSame","a","b","px","Math","abs","DELIVERY_RECIPT","ChannelListUI","props","_state$stores","renderHeader","renderChannelPreview","renderPlaceHolderError","renderPlaceHolderLoading","renderPlaceHolderEmptyList","showProfileEdit","setShowProfileEdit","useState","onThemeChange","allowProfileEdit","allChannels","loading","currentChannel","channelListDispatcher","channelSource","typingChannels","initialized","useChannelListContext","state","useSendbirdStateContext","sdkStore","stores","config","logger","isOnline","markAsReadScheduler","sdk","sdkError","error","React","createElement","Fragment","className","ChannelListHeader","onEdit","renderIconButton","AddChannel","EditUserProfile","onCancel","onEditProfile","onScroll","e","target","fetchMore","clientHeight","scrollTop","scrollHeight","hasNext","info","type","channelListActions","payload","next","then","channelList","_sdk$appInfo","_sdk$appInfo$premiumF","canSetMarkAsDelivered","appInfo","premiumFeatureList","find","feature","forEach","channel","unreadMessageCount","push","catch","err","PlaceHolder","PlaceHolderTypes","WRONG","map","idx","onLeaveChannel","c","cb","leave","res","url","onClick","key","ChannelPreview","tabIndex","isActive","isTyping","some","_ref","renderChannelAction","ChannelPreviewAction","disabled","LOADING","length","NO_C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AAoB,EAAA;AACnBzB,QAAAA,OAAO,EAAEA,OAAQ;QACjB0B,QAAQ,EAAE,CAACjE,QAAS;AACpBiD,QAAAA,cAAc,EAAEA,MAAMA,cAAc,CAACV,OAAO,EAAE,IAAI,CAAA;AAAE,OAAA,CAAA;KAI3D,CAAA,CAAA;GAEN,CAAC,CAEA,EAEH,CAAC/C,WAAW,IAAIL,OAAO,KACrBR,wBAAwB,IAAI,OAAOA,wBAAwB,KAAK,UAAU,GACzEA,wBAAwB,KAAxBA,IAAAA,IAAAA,wBAAwB,KAAxBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,wBAAwB,EAAI,gBAE5B0B,cAAA,CAAAC,aAAA,CAACsC,WAAW,EAAA;IAACnB,IAAI,EAAEoB,gBAAgB,CAACqB,OAAAA;AAAQ,GAAA,CAC7C,CACF,EAGA1E,WAAW,IAAI,CAAAN,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,WAAW,CAAEiF,MAAM,MAAK,CAAC,KACtCvF,0BAA0B,IAAI,OAAOA,0BAA0B,KAAK,UAAU,GAC7EA,0BAA0B,KAA1BA,IAAAA,IAAAA,0BAA0B,KAA1BA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,0BAA0B,EAAI,gBAE9ByB,cAAA,CAAAC,aAAA,CAACsC,WAAW,EAAA;IAACnB,IAAI,EAAEoB,gBAAgB,CAACuB,WAAAA;GACrC,CAAA,CACF,CAEC,CACL,CAAA;AAEP;;;;"}
|
|
1
|
+
{"version":3,"file":"ChannelListUI.js","sources":["../../../src/modules/ChannelList/components/utils.js","../../../src/modules/ChannelList/components/ChannelListUI/index.tsx"],"sourcesContent":["export const createDefaultUserListQuery = ({ sdk, userFilledApplicationUserListQuery = {} }) => {\n if (sdk?.createApplicationUserListQuery) {\n const params = sdk?.createApplicationUserListQuery();\n if (userFilledApplicationUserListQuery) {\n Object.keys(userFilledApplicationUserListQuery).forEach((key) => {\n params[key] = userFilledApplicationUserListQuery[key];\n });\n }\n return params;\n }\n return null;\n};\n\nconst getApplicationAttributes = (sdk = {}) => {\n const { appInfo = {} } = sdk;\n const { applicationAttributes = [] } = appInfo;\n return applicationAttributes;\n};\n\nexport const isBroadcastChannelEnabled = (sdk = {}) => {\n const ALLOW_BROADCAST_CHANNEL = 'allow_broadcast_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_BROADCAST_CHANNEL);\n }\n\n return false;\n};\nexport const isSuperGroupChannelEnabled = (sdk = {}) => {\n const ALLOW_SUPER_GROUP_CHANNEL = 'allow_super_group_channel';\n const applicationAttributes = getApplicationAttributes(sdk);\n\n if (Array.isArray(applicationAttributes)) {\n return applicationAttributes.includes(ALLOW_SUPER_GROUP_CHANNEL);\n }\n\n return false;\n};\n\nexport const isAboutSame = (a, b, px) => (Math.abs(a - b) <= px);\n\nexport const setChannelType = (params, type) => {\n if (type === 'broadcast') {\n // eslint-disable-next-line no-param-reassign\n params.isBroadcast = true;\n }\n if (type === 'supergroup') {\n // eslint-disable-next-line no-param-reassign\n params.isSuper = true;\n }\n return params;\n};\n\nexport const createChannel = (\n sdk,\n selectedUsers,\n onBeforeCreateChannel,\n userId,\n type = 'group',\n) => new Promise((resolve, reject) => {\n // have custom params\n if (onBeforeCreateChannel) {\n const params = onBeforeCreateChannel(selectedUsers);\n setChannelType(params, type);\n sdk.groupChannel.createChannel(params).then((groupChannel) => {\n resolve(groupChannel);\n }).catch((err) => { reject(err); });\n return;\n }\n\n const params = new sdk.GroupChannelParams();\n params.addUserIds(selectedUsers);\n params.isDistinct = false;\n\n if (userId) {\n params.operatorUserIds = [userId];\n }\n setChannelType(params, type);\n // do not have custom params\n sdk.groupChannel.createChannel(params).then((groupChannel) => {\n resolve(groupChannel);\n }).catch((err) => { resolve(err); });\n});\n\nexport default createChannel;\n","import './channel-list-ui.scss';\n\nimport React, { useState } from 'react';\nimport type { GroupChannel, Member, SendbirdGroupChat } from '@sendbird/chat/groupChannel';\nimport type { User } from '@sendbird/chat';\n\nimport ChannelListHeader from '../ChannelListHeader';\nimport AddChannel from '../AddChannel';\nimport ChannelPreview from '../ChannelPreview';\nimport ChannelPreviewAction from '../ChannelPreviewAction';\nimport { useChannelListContext } from '../../context/ChannelListProvider';\nimport * as channelListActions from '../../dux/actionTypes';\n\nimport useSendbirdStateContext from '../../../../hooks/useSendbirdStateContext';\nimport EditUserProfile from '../../../EditUserProfile';\nimport PlaceHolder, { PlaceHolderTypes } from '../../../../ui/PlaceHolder';\nimport { isAboutSame } from '../utils';\n\nconst DELIVERY_RECIPT = 'delivery_receipt';\n\ninterface RenderChannelPreviewProps {\n channel: GroupChannel;\n onLeaveChannel(\n channel: GroupChannel,\n onLeaveChannelCb?: (c: GroupChannel) => void,\n );\n}\n\ninterface RenderUserProfileProps {\n user: Member | User;\n currentUserId: string;\n close(): void;\n}\n\nexport interface ChannelListUIProps {\n renderChannelPreview?: (props: RenderChannelPreviewProps) => React.ReactElement;\n renderUserProfile?: (props: RenderUserProfileProps) => React.ReactElement;\n renderHeader?: (props: void) => React.ReactElement;\n renderPlaceHolderError?: (props: void) => React.ReactElement;\n renderPlaceHolderLoading?: (props: void) => React.ReactElement;\n renderPlaceHolderEmptyList?: (props: void) => React.ReactElement;\n}\n\nconst ChannelListUI: React.FC<ChannelListUIProps> = (props: ChannelListUIProps) => {\n const {\n renderHeader,\n renderChannelPreview,\n renderPlaceHolderError,\n renderPlaceHolderLoading,\n renderPlaceHolderEmptyList,\n } = props;\n\n const [showProfileEdit, setShowProfileEdit] = useState(false);\n\n const {\n onThemeChange,\n allowProfileEdit,\n allChannels,\n loading,\n currentChannel,\n channelListDispatcher,\n channelSource,\n typingChannels,\n initialized,\n } = useChannelListContext();\n\n const state = useSendbirdStateContext();\n\n const sdkStore = state?.stores?.sdkStore;\n const config = state?.config;\n const {\n logger,\n isOnline = false,\n markAsDeliveredScheduler,\n disableMarkAsDelivered,\n } = config;\n\n const sdk = sdkStore?.sdk as SendbirdGroupChat;\n const sdkError = sdkStore?.error;\n\n return (\n <>\n <div className=\"sendbird-channel-list__header\">\n {\n renderHeader?.() || (\n <ChannelListHeader\n onEdit={() => {\n if (allowProfileEdit) {\n setShowProfileEdit(true);\n }\n }}\n allowProfileEdit={allowProfileEdit}\n renderIconButton={() => (\n <AddChannel />\n )}\n />\n )\n }\n </div>\n {\n showProfileEdit && (\n <EditUserProfile\n onThemeChange={onThemeChange}\n onCancel={() => { setShowProfileEdit(false); }}\n onEditProfile={() => {\n setShowProfileEdit(false);\n }}\n />\n )\n }\n <div\n className=\"sendbird-channel-list__body\"\n onScroll={(e) => {\n const target = e?.target as HTMLDivElement;\n const fetchMore = isAboutSame(target.clientHeight + target.scrollTop, target.scrollHeight, 10);\n if (fetchMore && channelSource?.hasNext) {\n logger.info('ChannelList: Fetching more channels');\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_START,\n payload: null,\n });\n channelSource.next().then((channelList) => {\n logger.info('ChannelList: Fetching channels successful', channelList);\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_SUCCESS,\n payload: channelList,\n });\n const canSetMarkAsDelivered = sdk?.appInfo?.premiumFeatureList\n ?.find((feature) => (feature === DELIVERY_RECIPT));\n\n if (canSetMarkAsDelivered && !disableMarkAsDelivered) {\n logger.info('ChannelList: Marking all channels as read');\n // eslint-disable-next-line no-unused-expressions\n channelList?.forEach((channel) => {\n if (channel?.unreadMessageCount > 0) {\n markAsDeliveredScheduler.push(channel);\n }\n });\n }\n }).catch((err) => {\n logger.info('ChannelList: Fetching channels failed', err);\n channelListDispatcher({\n type: channelListActions.FETCH_CHANNELS_FAILURE,\n payload: err,\n });\n });\n }\n }}\n >\n {\n (sdkError && !loading) && (\n (renderPlaceHolderError && typeof renderPlaceHolderError === 'function') ? (\n renderPlaceHolderError?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.WRONG} />\n )\n )\n }\n {/*\n To do: Implement windowing\n Implement windowing if you are dealing with large number of messages/channels\n https://github.com/bvaughn/react-window -> recommendation\n We hesitate to bring one more dependency to our library,\n we are planning to implement it inside the library\n */}\n <div>\n {\n allChannels && allChannels.map((channel, idx) => {\n // todo: Refactor and move this inside channel - preview\n const onLeaveChannel = (c, cb) => {\n logger.info('ChannelList: Leaving channel', c);\n c.leave()\n .then((res) => {\n logger.info('ChannelList: Leaving channel success', res);\n if (cb && typeof cb === 'function') {\n cb(res, null);\n }\n channelListDispatcher({\n type: channelListActions.LEAVE_CHANNEL_SUCCESS,\n payload: channel?.url,\n });\n })\n .catch((err) => {\n logger.error('ChannelList: Leaving channel failed', err);\n if (cb && typeof cb === 'function') {\n cb(null, err);\n }\n });\n };\n\n const onClick = () => {\n if (!isOnline) { return; }\n logger.info('ChannelList: Clicked on channel:', channel);\n channelListDispatcher({\n type: channelListActions.SET_CURRENT_CHANNEL,\n payload: channel,\n });\n };\n\n return (\n (renderChannelPreview)\n ? (\n // eslint-disable-next-line\n <div key={channel?.url} onClick={onClick}>\n {renderChannelPreview({ channel, onLeaveChannel })}\n </div>\n )\n : (\n <ChannelPreview\n key={channel?.url}\n tabIndex={idx}\n onClick={onClick}\n channel={channel}\n onLeaveChannel={() => onLeaveChannel(channel, null)}\n isActive={channel?.url === currentChannel?.url}\n isTyping={typingChannels?.some(({ url }) => url === channel?.url)}\n renderChannelAction={(() => (\n <ChannelPreviewAction\n channel={channel}\n disabled={!isOnline}\n onLeaveChannel={() => onLeaveChannel(channel, null)}\n />\n ))}\n />\n )\n );\n })\n }\n </div>\n {\n (!initialized && loading) && (\n (renderPlaceHolderLoading && typeof renderPlaceHolderLoading === 'function') ? (\n renderPlaceHolderLoading?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.LOADING} />\n )\n )\n }\n {\n (initialized && allChannels?.length === 0) && (\n (renderPlaceHolderEmptyList && typeof renderPlaceHolderEmptyList === 'function') ? (\n renderPlaceHolderEmptyList?.()\n ) : (\n <PlaceHolder type={PlaceHolderTypes.NO_CHANNELS} />\n )\n )\n }\n </div>\n </>\n );\n};\n\nexport default ChannelListUI;\n"],"names":["isAboutSame","a","b","px","Math","abs","DELIVERY_RECIPT","ChannelListUI","props","_state$stores","renderHeader","renderChannelPreview","renderPlaceHolderError","renderPlaceHolderLoading","renderPlaceHolderEmptyList","showProfileEdit","setShowProfileEdit","useState","onThemeChange","allowProfileEdit","allChannels","loading","currentChannel","channelListDispatcher","channelSource","typingChannels","initialized","useChannelListContext","state","useSendbirdStateContext","sdkStore","stores","config","logger","isOnline","markAsDeliveredScheduler","disableMarkAsDelivered","sdk","sdkError","error","React","createElement","Fragment","className","ChannelListHeader","onEdit","renderIconButton","AddChannel","EditUserProfile","onCancel","onEditProfile","onScroll","e","target","fetchMore","clientHeight","scrollTop","scrollHeight","hasNext","info","type","channelListActions","payload","next","then","channelList","_sdk$appInfo","_sdk$appInfo$premiumF","canSetMarkAsDelivered","appInfo","premiumFeatureList","find","feature","forEach","channel","unreadMessageCount","push","catch","err","PlaceHolder","PlaceHolderTypes","WRONG","map","idx","onLeaveChannel","c","cb","leave","res","url","onClick","key","ChannelPreview","tabIndex","isActive","isTyping","some","_ref","renderChannelAction","ChannelPreviewAction","disabled","LOADING","length","NO_CHANNELS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,MAAMA,WAAW,GAAGA,CAACC,CAAC,EAAEC,CAAC,EAAEC,EAAE,KAAMC,IAAI,CAACC,GAAG,CAACJ,CAAC,GAAGC,CAAC,CAAC,IAAIC,EAAG;;ACtBhE,MAAMG,eAAe,GAAG,kBAAkB,CAAA;AAyBpCC,MAAAA,aAA2C,GAAIC,KAAyB,IAAK;AAAA,EAAA,IAAAC,aAAA,CAAA;EACjF,MAAM;IACJC,YAAY;IACZC,oBAAoB;IACpBC,sBAAsB;IACtBC,wBAAwB;AACxBC,IAAAA,0B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wB,EAAI,gBAE5B2B,cAAA,CAAAC,aAAA,CAACsC,WAAW,EAAA;IAACnB,IAAI,EAAEoB,gBAAgB,CAACqB,OAAAA;AAAQ,GAAA,CAC7C,CACF,EAGA3E,WAAW,IAAI,CAAAN,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,WAAW,CAAEkF,MAAM,MAAK,CAAC,KACtCxF,0BAA0B,IAAI,OAAOA,0BAA0B,KAAK,UAAU,GAC7EA,0BAA0B,KAA1BA,IAAAA,IAAAA,0BAA0B,KAA1BA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,0BAA0B,EAAI,gBAE9B0B,cAAA,CAAAC,aAAA,CAACsC,WAAW,EAAA;IAACnB,IAAI,EAAEoB,gBAAgB,CAACuB,WAAAA;GACrC,CAAA,CACF,CAEC,CACL,CAAA;AAEP;;;;"}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { b as _extends, _ as _objectSpread2 } from '../../_rollupPluginBabelHelpers-
|
|
1
|
+
import { b as _extends, _ as _objectSpread2 } from '../../_rollupPluginBabelHelpers-ce69e916.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
3
|
import ChannelAvatar from '../../ui/ChannelAvatar.js';
|
|
4
4
|
import Badge from '../../ui/Badge.js';
|
|
5
5
|
import Icon, { IconTypes, IconColors } from '../../ui/Icon.js';
|
|
6
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../../index-
|
|
7
|
-
import { g as getChannelTitle, a as getTotalMembers, M as MessageStatus, b as getLastMessageCreatedAt, c as getLastMessage, d as getChannelUnreadMessageCount } from '../../index-
|
|
6
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../../index-e1cd2fcf.js';
|
|
7
|
+
import { g as getChannelTitle, a as getTotalMembers, M as MessageStatus, b as getLastMessageCreatedAt, c as getLastMessage, d as getChannelUnreadMessageCount } from '../../index-c6df8184.js';
|
|
8
8
|
import useSendbirdStateContext from '../../useSendbirdStateContext.js';
|
|
9
|
-
import { u as useLocalization } from '../../LocalizationContext-
|
|
9
|
+
import { u as useLocalization } from '../../LocalizationContext-1839d2db.js';
|
|
10
10
|
import MentionUserLabel from '../../ui/MentionUserLabel.js';
|
|
11
11
|
import Modal from '../../ui/Modal.js';
|
|
12
12
|
import TextButton from '../../ui/TextButton.js';
|
|
13
|
-
import { u as useChannelListContext } from '../../ChannelListProvider-
|
|
13
|
+
import { u as useChannelListContext } from '../../ChannelListProvider-42fb305a.js';
|
|
14
14
|
import { TypingIndicatorText } from '../../Channel/components/TypingIndicator.js';
|
|
15
|
-
import { d as isVoiceMessage, e as isEditedMessage } from '../../index-
|
|
16
|
-
import { u as useMediaQueryContext } from '../../MediaQueryContext-
|
|
17
|
-
import { u as useLongPress } from '../../useLongPress-
|
|
15
|
+
import { d as isVoiceMessage, e as isEditedMessage } from '../../index-fd51c7d1.js';
|
|
16
|
+
import { u as useMediaQueryContext } from '../../MediaQueryContext-0e0b3a1b.js';
|
|
17
|
+
import { u as useLongPress } from '../../useLongPress-685c7391.js';
|
|
18
18
|
import '../../ui/Avatar.js';
|
|
19
19
|
import '../../ui/ImageRenderer.js';
|
|
20
|
-
import '../../uuid-
|
|
21
|
-
import '../../utils-
|
|
20
|
+
import '../../uuid-720c99c0.js';
|
|
21
|
+
import '../../utils-4979f950.js';
|
|
22
22
|
import 'prop-types';
|
|
23
|
-
import '../../stringSet-
|
|
24
|
-
import '../../index-
|
|
25
|
-
import '../../index-
|
|
23
|
+
import '../../stringSet-d368e289.js';
|
|
24
|
+
import '../../index-06f34585.js';
|
|
25
|
+
import '../../index-d9c12cf4.js';
|
|
26
26
|
import '../../ui/Loader.js';
|
|
27
27
|
import '../../utils/message/getOutgoingMessageState.js';
|
|
28
|
-
import '../../index-
|
|
29
|
-
import '../../index-
|
|
28
|
+
import '../../index-5db37327.js';
|
|
29
|
+
import '../../index-9781d2b9.js';
|
|
30
30
|
import '../../withSendbird.js';
|
|
31
|
-
import '../../consts-
|
|
31
|
+
import '../../consts-aecb8fab.js';
|
|
32
32
|
import 'react-dom';
|
|
33
|
-
import '../../index-
|
|
33
|
+
import '../../index-3165e396.js';
|
|
34
34
|
import '../../ui/Button.js';
|
|
35
35
|
import '../../ui/IconButton.js';
|
|
36
|
-
import '../../color-
|
|
36
|
+
import '../../color-4ca8a2ea.js';
|
|
37
37
|
import '@sendbird/chat/groupChannel';
|
|
38
|
-
import '../../topics-
|
|
39
|
-
import '../../utils-
|
|
40
|
-
import '../../UserProfileContext-
|
|
41
|
-
import '../../ChannelProvider-
|
|
42
|
-
import '../../compareIds-
|
|
43
|
-
import '../../const-
|
|
38
|
+
import '../../topics-f9628f1f.js';
|
|
39
|
+
import '../../utils-256f157f.js';
|
|
40
|
+
import '../../UserProfileContext-7e645551.js';
|
|
41
|
+
import '../../ChannelProvider-42ea1a96.js';
|
|
42
|
+
import '../../compareIds-08858dd3.js';
|
|
43
|
+
import '../../const-a77c08c9.js';
|
|
44
44
|
import '@sendbird/chat/message';
|
|
45
|
-
import '../../consts-
|
|
45
|
+
import '../../consts-9393e7c8.js';
|
|
46
46
|
|
|
47
47
|
const ChannelPreview = _ref => {
|
|
48
48
|
var _sbState$stores, _sbState$stores$userS, _sbState$stores$userS2, _sbState$config, _sbState$config2, _channel$lastMessage, _channel$lastMessage2, _channel$lastMessage3, _channel$lastMessage4;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { u as useLocalization, a as LocalizationContext } from '../../LocalizationContext-
|
|
3
|
+
import { u as useLocalization, a as LocalizationContext } from '../../LocalizationContext-1839d2db.js';
|
|
4
4
|
import ContextMenu, { MenuItems, MenuItem } from '../../ui/ContextMenu.js';
|
|
5
5
|
import IconButton from '../../ui/IconButton.js';
|
|
6
6
|
import Icon, { IconTypes, IconColors } from '../../ui/Icon.js';
|
|
7
7
|
import useSendbirdStateContext from '../../useSendbirdStateContext.js';
|
|
8
|
-
import { n as noop } from '../../utils-
|
|
8
|
+
import { n as noop } from '../../utils-256f157f.js';
|
|
9
9
|
import Modal from '../../ui/Modal.js';
|
|
10
|
-
import { u as useChannelListContext } from '../../ChannelListProvider-
|
|
11
|
-
import '../../stringSet-
|
|
12
|
-
import '../../index-
|
|
13
|
-
import '../../_rollupPluginBabelHelpers-
|
|
10
|
+
import { u as useChannelListContext } from '../../ChannelListProvider-42fb305a.js';
|
|
11
|
+
import '../../stringSet-d368e289.js';
|
|
12
|
+
import '../../index-d9c12cf4.js';
|
|
13
|
+
import '../../_rollupPluginBabelHelpers-ce69e916.js';
|
|
14
14
|
import 'react-dom';
|
|
15
15
|
import '../../ui/SortByRow.js';
|
|
16
|
-
import '../../uuid-
|
|
17
|
-
import '../../index-
|
|
16
|
+
import '../../uuid-720c99c0.js';
|
|
17
|
+
import '../../index-fd51c7d1.js';
|
|
18
18
|
import '../../utils/message/getOutgoingMessageState.js';
|
|
19
|
-
import '../../index-
|
|
19
|
+
import '../../index-e1cd2fcf.js';
|
|
20
20
|
import '../../withSendbird.js';
|
|
21
|
-
import '../../index-
|
|
21
|
+
import '../../index-3165e396.js';
|
|
22
22
|
import '../../ui/Button.js';
|
|
23
|
-
import '../../MediaQueryContext-
|
|
23
|
+
import '../../MediaQueryContext-0e0b3a1b.js';
|
|
24
24
|
import '@sendbird/chat/groupChannel';
|
|
25
|
-
import '../../topics-
|
|
26
|
-
import '../../UserProfileContext-
|
|
25
|
+
import '../../topics-f9628f1f.js';
|
|
26
|
+
import '../../UserProfileContext-7e645551.js';
|
|
27
27
|
|
|
28
28
|
const LeaveChannel = props => {
|
|
29
29
|
var _useChannelListContex, _state$config, _state$config2;
|
package/ChannelList/context.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import '../_rollupPluginBabelHelpers-
|
|
1
|
+
import '../_rollupPluginBabelHelpers-ce69e916.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@sendbird/chat/groupChannel';
|
|
4
|
-
export { C as ChannelListProvider, u as useChannelListContext } from '../ChannelListProvider-
|
|
5
|
-
import '../uuid-
|
|
6
|
-
import '../utils-
|
|
7
|
-
import '../UserProfileContext-
|
|
4
|
+
export { C as ChannelListProvider, u as useChannelListContext } from '../ChannelListProvider-42fb305a.js';
|
|
5
|
+
import '../uuid-720c99c0.js';
|
|
6
|
+
import '../utils-256f157f.js';
|
|
7
|
+
import '../UserProfileContext-7e645551.js';
|
|
8
8
|
import '../useSendbirdStateContext.js';
|
|
9
|
-
import '../topics-
|
|
10
|
-
import '../index-
|
|
9
|
+
import '../topics-f9628f1f.js';
|
|
10
|
+
import '../index-fd51c7d1.js';
|
|
11
11
|
import '../utils/message/getOutgoingMessageState.js';
|
|
12
12
|
import 'prop-types';
|
|
13
13
|
import '../withSendbird.js';
|
package/ChannelList.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { C as ChannelListProvider } from './ChannelListProvider-
|
|
2
|
+
import { C as ChannelListProvider } from './ChannelListProvider-42fb305a.js';
|
|
3
3
|
import ChannelListUI from './ChannelList/components/ChannelListUI.js';
|
|
4
|
-
import './_rollupPluginBabelHelpers-
|
|
4
|
+
import './_rollupPluginBabelHelpers-ce69e916.js';
|
|
5
5
|
import '@sendbird/chat/groupChannel';
|
|
6
|
-
import './topics-
|
|
7
|
-
import './uuid-
|
|
8
|
-
import './utils-
|
|
9
|
-
import './UserProfileContext-
|
|
6
|
+
import './topics-f9628f1f.js';
|
|
7
|
+
import './uuid-720c99c0.js';
|
|
8
|
+
import './utils-256f157f.js';
|
|
9
|
+
import './UserProfileContext-7e645551.js';
|
|
10
10
|
import 'prop-types';
|
|
11
11
|
import './useSendbirdStateContext.js';
|
|
12
12
|
import './withSendbird.js';
|
|
13
|
-
import './index-
|
|
13
|
+
import './index-fd51c7d1.js';
|
|
14
14
|
import './utils/message/getOutgoingMessageState.js';
|
|
15
15
|
import './ChannelList/components/ChannelListHeader.js';
|
|
16
|
-
import './LocalizationContext-
|
|
17
|
-
import './stringSet-
|
|
18
|
-
import './index-
|
|
19
|
-
import './index-
|
|
16
|
+
import './LocalizationContext-1839d2db.js';
|
|
17
|
+
import './stringSet-d368e289.js';
|
|
18
|
+
import './index-d9c12cf4.js';
|
|
19
|
+
import './index-e1cd2fcf.js';
|
|
20
20
|
import './ui/Avatar.js';
|
|
21
21
|
import './ui/ImageRenderer.js';
|
|
22
22
|
import './ui/Icon.js';
|
|
@@ -24,14 +24,14 @@ import './ChannelList/components/AddChannel.js';
|
|
|
24
24
|
import './ui/IconButton.js';
|
|
25
25
|
import './CreateChannel.js';
|
|
26
26
|
import './CreateChannel/components/CreateChannelUI.js';
|
|
27
|
-
import './CreateChannelProvider-
|
|
27
|
+
import './CreateChannelProvider-37af96d2.js';
|
|
28
28
|
import './sendbirdSelectors.js';
|
|
29
29
|
import './CreateChannel/components/InviteUsers.js';
|
|
30
30
|
import './ui/Modal.js';
|
|
31
31
|
import 'react-dom';
|
|
32
|
-
import './index-
|
|
32
|
+
import './index-3165e396.js';
|
|
33
33
|
import './ui/Button.js';
|
|
34
|
-
import './MediaQueryContext-
|
|
34
|
+
import './MediaQueryContext-0e0b3a1b.js';
|
|
35
35
|
import './ui/UserListItem.js';
|
|
36
36
|
import './ui/MutedAvatarOverlay.js';
|
|
37
37
|
import './ui/Checkbox.js';
|
|
@@ -41,30 +41,30 @@ import './ui/SortByRow.js';
|
|
|
41
41
|
import './CreateChannel/components/SelectChannelType.js';
|
|
42
42
|
import './ChannelList/components/ChannelPreview.js';
|
|
43
43
|
import './ui/ChannelAvatar.js';
|
|
44
|
-
import './utils-
|
|
44
|
+
import './utils-4979f950.js';
|
|
45
45
|
import './ui/Badge.js';
|
|
46
|
-
import './index-
|
|
47
|
-
import './index-
|
|
46
|
+
import './index-c6df8184.js';
|
|
47
|
+
import './index-06f34585.js';
|
|
48
48
|
import './ui/Loader.js';
|
|
49
|
-
import './index-
|
|
50
|
-
import './index-
|
|
49
|
+
import './index-5db37327.js';
|
|
50
|
+
import './index-9781d2b9.js';
|
|
51
51
|
import './ui/MentionUserLabel.js';
|
|
52
|
-
import './consts-
|
|
52
|
+
import './consts-aecb8fab.js';
|
|
53
53
|
import './ui/TextButton.js';
|
|
54
|
-
import './color-
|
|
54
|
+
import './color-4ca8a2ea.js';
|
|
55
55
|
import './Channel/components/TypingIndicator.js';
|
|
56
|
-
import './ChannelProvider-
|
|
57
|
-
import './compareIds-
|
|
58
|
-
import './const-
|
|
56
|
+
import './ChannelProvider-42ea1a96.js';
|
|
57
|
+
import './compareIds-08858dd3.js';
|
|
58
|
+
import './const-a77c08c9.js';
|
|
59
59
|
import '@sendbird/chat/message';
|
|
60
|
-
import './consts-
|
|
61
|
-
import './useLongPress-
|
|
60
|
+
import './consts-9393e7c8.js';
|
|
61
|
+
import './useLongPress-685c7391.js';
|
|
62
62
|
import './ChannelList/components/ChannelPreviewAction.js';
|
|
63
63
|
import './EditUserProfile.js';
|
|
64
|
-
import './index-
|
|
64
|
+
import './index-7c9ebc67.js';
|
|
65
65
|
import './ui/Input.js';
|
|
66
|
-
import './actionTypes-
|
|
67
|
-
import './index-
|
|
66
|
+
import './actionTypes-a5283c75.js';
|
|
67
|
+
import './index-20880943.js';
|
|
68
68
|
|
|
69
69
|
const ChannelList = props => {
|
|
70
70
|
return /*#__PURE__*/React__default.createElement(ChannelListProvider, {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers-ce69e916.js';
|
|
2
2
|
import React__default, { useEffect, useReducer, useState, useMemo, useContext } from 'react';
|
|
3
3
|
import { GroupChannelHandler } from '@sendbird/chat/groupChannel';
|
|
4
|
-
import { P as PUBSUB_TOPICS } from './topics-
|
|
5
|
-
import { u as uuidv4 } from './uuid-
|
|
6
|
-
import { n as noop } from './utils-
|
|
7
|
-
import { U as UserProfileProvider } from './UserProfileContext-
|
|
4
|
+
import { P as PUBSUB_TOPICS } from './topics-f9628f1f.js';
|
|
5
|
+
import { u as uuidv4 } from './uuid-720c99c0.js';
|
|
6
|
+
import { n as noop } from './utils-256f157f.js';
|
|
7
|
+
import { U as UserProfileProvider } from './UserProfileContext-7e645551.js';
|
|
8
8
|
import useSendbirdStateContext from './useSendbirdStateContext.js';
|
|
9
|
-
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-
|
|
9
|
+
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-fd51c7d1.js';
|
|
10
10
|
|
|
11
11
|
const RESET_CHANNEL_LIST = 'RESET_CHANNEL_LIST';
|
|
12
12
|
const CREATE_CHANNEL = 'CREATE_CHANNEL';
|
|
@@ -74,7 +74,8 @@ const createEventHandler = _ref => {
|
|
|
74
74
|
currentUser
|
|
75
75
|
} = sdk;
|
|
76
76
|
const isInvited = invitees.find(user => (user === null || user === void 0 ? void 0 : user.userId) === (currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId));
|
|
77
|
-
|
|
77
|
+
// The newly created channel should be displayed only when there's a message
|
|
78
|
+
if (isInvited && channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
78
79
|
channelListDispatcher({
|
|
79
80
|
type: USER_INVITED,
|
|
80
81
|
payload: channel
|
|
@@ -203,7 +204,8 @@ function setupChannelList(_ref3) {
|
|
|
203
204
|
logger,
|
|
204
205
|
sortChannelList,
|
|
205
206
|
disableAutoSelect,
|
|
206
|
-
|
|
207
|
+
markAsDeliveredScheduler,
|
|
208
|
+
disableMarkAsDelivered
|
|
207
209
|
} = _ref3;
|
|
208
210
|
if (sdk !== null && sdk !== void 0 && sdk.groupChannel) {
|
|
209
211
|
createEventHandler({
|
|
@@ -260,11 +262,9 @@ function setupChannelList(_ref3) {
|
|
|
260
262
|
}
|
|
261
263
|
});
|
|
262
264
|
const canSetMarkAsDelivered = sdk === null || sdk === void 0 ? void 0 : (_sdk$appInfo = sdk.appInfo) === null || _sdk$appInfo === void 0 ? void 0 : (_sdk$appInfo$premiumF = _sdk$appInfo.premiumFeatureList) === null || _sdk$appInfo$premiumF === void 0 ? void 0 : _sdk$appInfo$premiumF.find(feature => feature === DELIVERY_RECIPT);
|
|
263
|
-
if (canSetMarkAsDelivered) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
markAsReadScheduler.push(channel);
|
|
267
|
-
}
|
|
265
|
+
if (canSetMarkAsDelivered && !disableMarkAsDelivered) {
|
|
266
|
+
sortedChannelList.forEach(channel => {
|
|
267
|
+
markAsDeliveredScheduler.push(channel);
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
}).catch(err => {
|
|
@@ -752,7 +752,7 @@ const ChannelListProvider = props => {
|
|
|
752
752
|
onUserProfileMessage
|
|
753
753
|
} = config;
|
|
754
754
|
const {
|
|
755
|
-
|
|
755
|
+
markAsDeliveredScheduler,
|
|
756
756
|
disableMarkAsDelivered = false,
|
|
757
757
|
isTypingIndicatorEnabledOnChannelList = false,
|
|
758
758
|
isMessageReceiptStatusEnabledOnChannelList = false
|
|
@@ -773,24 +773,6 @@ const ChannelListProvider = props => {
|
|
|
773
773
|
} = channelListStore;
|
|
774
774
|
const [channelSource, setChannelSource] = useState(null);
|
|
775
775
|
const [typingChannels, setTypingChannels] = useState([]);
|
|
776
|
-
const [channelsTomarkAsRead, setChannelsToMarkAsRead] = useState([]);
|
|
777
|
-
useEffect(() => {
|
|
778
|
-
// https://stackoverflow.com/a/60907638
|
|
779
|
-
let isMounted = true;
|
|
780
|
-
if ((channelsTomarkAsRead === null || channelsTomarkAsRead === void 0 ? void 0 : channelsTomarkAsRead.length) > 0 && !disableMarkAsDelivered) {
|
|
781
|
-
channelsTomarkAsRead === null || channelsTomarkAsRead === void 0 ? void 0 : channelsTomarkAsRead.forEach((c, idx) => {
|
|
782
|
-
// Plan-based rate limits - minimum limit is 5 requests per second
|
|
783
|
-
setTimeout(() => {
|
|
784
|
-
if (isMounted) {
|
|
785
|
-
c === null || c === void 0 ? void 0 : c.markAsDelivered();
|
|
786
|
-
}
|
|
787
|
-
}, 2000 * idx);
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
return () => {
|
|
791
|
-
isMounted = false;
|
|
792
|
-
};
|
|
793
|
-
}, [channelsTomarkAsRead]);
|
|
794
776
|
useEffect(() => {
|
|
795
777
|
const subscriber = pubSubHandler(pubSub, channelListDispatcher);
|
|
796
778
|
return () => {
|
|
@@ -811,8 +793,8 @@ const ChannelListProvider = props => {
|
|
|
811
793
|
logger,
|
|
812
794
|
sortChannelList,
|
|
813
795
|
disableAutoSelect,
|
|
814
|
-
|
|
815
|
-
|
|
796
|
+
markAsDeliveredScheduler,
|
|
797
|
+
disableMarkAsDelivered
|
|
816
798
|
});
|
|
817
799
|
} else {
|
|
818
800
|
var _sdk$groupChannel;
|
|
@@ -840,7 +822,7 @@ const ChannelListProvider = props => {
|
|
|
840
822
|
}, [sdkIntialized, userFilledChannelListQuery, sortChannelList]);
|
|
841
823
|
useEffect(() => {
|
|
842
824
|
var _sdk$groupChannel4;
|
|
843
|
-
let typingHandlerId =
|
|
825
|
+
let typingHandlerId = '';
|
|
844
826
|
if (sdk !== null && sdk !== void 0 && (_sdk$groupChannel4 = sdk.groupChannel) !== null && _sdk$groupChannel4 !== void 0 && _sdk$groupChannel4.addGroupChannelHandler) {
|
|
845
827
|
var _sdk$groupChannel5;
|
|
846
828
|
typingHandlerId = uuidv4();
|
|
@@ -896,7 +878,7 @@ const ChannelListProvider = props => {
|
|
|
896
878
|
}
|
|
897
879
|
return () => {
|
|
898
880
|
var _sdk$groupChannel6;
|
|
899
|
-
if (sdk !== null && sdk !== void 0 && (_sdk$groupChannel6 = sdk.groupChannel) !== null && _sdk$groupChannel6 !== void 0 && _sdk$groupChannel6.removeGroupChannelHandler && typingHandlerId) {
|
|
881
|
+
if (sdk !== null && sdk !== void 0 && (_sdk$groupChannel6 = sdk.groupChannel) !== null && _sdk$groupChannel6 !== void 0 && _sdk$groupChannel6.removeGroupChannelHandler && typingHandlerId !== '') {
|
|
900
882
|
sdk.groupChannel.removeGroupChannelHandler(typingHandlerId);
|
|
901
883
|
}
|
|
902
884
|
};
|
|
@@ -982,4 +964,4 @@ function useChannelListContext() {
|
|
|
982
964
|
}
|
|
983
965
|
|
|
984
966
|
export { ChannelListProvider as C, FETCH_CHANNELS_START as F, LEAVE_CHANNEL_SUCCESS as L, SET_CURRENT_CHANNEL as S, FETCH_CHANNELS_SUCCESS as a, FETCH_CHANNELS_FAILURE as b, useChannelListContext as u };
|
|
985
|
-
//# sourceMappingURL=ChannelListProvider-
|
|
967
|
+
//# sourceMappingURL=ChannelListProvider-42fb305a.js.map
|