@sendbird/uikit-react 3.2.0-rc.0 → 3.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +82 -92
- package/App.js.map +1 -1
- package/Channel/components/ChannelHeader.js +19 -19
- package/Channel/components/ChannelHeader.js.map +1 -1
- package/Channel/components/ChannelUI.js +27 -26
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +20 -20
- package/Channel/components/FileViewer.js.map +1 -1
- package/Channel/components/FrozenNotification.js +5 -6
- package/Channel/components/FrozenNotification.js.map +1 -1
- package/Channel/components/Message.js +33 -32
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +31 -30
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageList.js +27 -26
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +19 -19
- package/Channel/components/RemoveMessageModal.js.map +1 -1
- package/Channel/components/SuggestedMentionList.js +34 -34
- package/Channel/components/SuggestedMentionList.js.map +1 -1
- package/Channel/components/TypingIndicator.js +20 -20
- package/Channel/components/TypingIndicator.js.map +1 -1
- package/Channel/components/UnreadCount.js +5 -6
- package/Channel/components/UnreadCount.js.map +1 -1
- package/Channel/context.js +15 -15
- package/Channel.js +25 -24
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +17 -17
- package/ChannelList/components/AddChannel.js.map +1 -1
- package/ChannelList/components/ChannelListHeader.js +10 -10
- package/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/ChannelList/components/ChannelListUI.js +39 -39
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +48 -48
- package/ChannelList/components/ChannelPreview.js.map +1 -1
- package/ChannelList/components/ChannelPreviewAction.js +57 -68
- package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/ChannelList/context.js +10 -10
- package/ChannelList.js +28 -28
- package/ChannelList.js.map +1 -1
- package/{ChannelListProvider-6e3b8f43.js → ChannelListProvider-368bd7f1.js} +233 -217
- package/ChannelListProvider-368bd7f1.js.map +1 -0
- package/{ChannelProvider-b8c6427f.js → ChannelProvider-59559ed8.js} +555 -522
- package/{ChannelProvider-b8c6427f.js.map → ChannelProvider-59559ed8.js.map} +1 -1
- package/ChannelSettings/components/ChannelProfile.js +16 -16
- package/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/ChannelSettings/components/ChannelSettingsUI.js +26 -26
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +19 -21
- package/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/ChannelSettings/components/LeaveChannel.js +14 -16
- package/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/ChannelSettings/components/ModerationPanel.js +78 -78
- package/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/ChannelSettings/components/UserListItem.js +15 -15
- package/ChannelSettings/components/UserListItem.js.map +1 -1
- package/ChannelSettings/components/UserPanel.js +17 -17
- package/ChannelSettings/components/UserPanel.js.map +1 -1
- package/ChannelSettings/context.js +6 -6
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +20 -20
- package/ChannelSettings.js.map +1 -1
- package/CreateChannel/components/CreateChannelUI.js +18 -19
- package/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/CreateChannel/components/InviteUsers.js +21 -20
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +22 -22
- package/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +14 -14
- package/CreateChannel.js.map +1 -1
- package/{CreateChannelProvider-712526fd.js → CreateChannelProvider-9c2113ca.js} +3 -3
- package/{CreateChannelProvider-712526fd.js.map → CreateChannelProvider-9c2113ca.js.map} +1 -1
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +13 -13
- package/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/CreateOpenChannel/context.js +11 -11
- package/CreateOpenChannel/context.js.map +1 -1
- package/CreateOpenChannel.js +9 -9
- package/CreateOpenChannel.js.map +1 -1
- package/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/EditUserProfile/context.js +13 -13
- package/EditUserProfile/context.js.map +1 -1
- package/EditUserProfile.js +13 -13
- package/EditUserProfile.js.map +1 -1
- package/{LocalizationContext-4cefc770.js → LocalizationContext-10829cf3.js} +5 -5
- package/{LocalizationContext-4cefc770.js.map → LocalizationContext-10829cf3.js.map} +1 -1
- package/{MemberList-e4916e55.js → MemberList-e049f915.js} +34 -34
- package/{MemberList-e4916e55.js.map → MemberList-e049f915.js.map} +1 -1
- package/MessageSearch/components/MessageSearchUI.js +17 -17
- package/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/MessageSearch/context.js +6 -6
- package/MessageSearch/context.js.map +1 -1
- package/MessageSearch.js +14 -14
- package/MessageSearch.js.map +1 -1
- package/OpenChannel/components/FrozenChannelNotification.js +5 -6
- package/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/OpenChannel/components/OpenChannelHeader.js +14 -14
- package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/OpenChannel/components/OpenChannelInput.js +19 -18
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +32 -31
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +27 -26
- package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/OpenChannel/components/OpenChannelUI.js +26 -25
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +11 -11
- package/OpenChannel.js +26 -25
- package/OpenChannel.js.map +1 -1
- package/OpenChannelList/components/OpenChannelListUI.js +19 -19
- package/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/OpenChannelList/components/OpenChannelPreview.js +5 -6
- package/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/OpenChannelList/context.js +4 -4
- package/OpenChannelList.js +12 -12
- package/OpenChannelList.js.map +1 -1
- package/{OpenChannelListProvider-845a2162.js → OpenChannelListProvider-95ce73b1.js} +4 -4
- package/{OpenChannelListProvider-845a2162.js.map → OpenChannelListProvider-95ce73b1.js.map} +1 -1
- package/{OpenChannelProvider-5f19d5d7.js → OpenChannelProvider-b360d5fe.js} +46 -46
- package/{OpenChannelProvider-5f19d5d7.js.map → OpenChannelProvider-b360d5fe.js.map} +1 -1
- package/OpenChannelSettings/components/EditDetailsModal.js +19 -19
- package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelProfile.js +16 -16
- package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +27 -27
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +87 -87
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +16 -16
- package/OpenChannelSettings/context.js +14 -14
- package/OpenChannelSettings/context.js.map +1 -1
- package/OpenChannelSettings.js +20 -20
- package/OpenChannelSettings.js.map +1 -1
- package/README.md +2 -7
- package/SendbirdProvider.js +214 -251
- package/SendbirdProvider.js.map +1 -1
- package/{UserProfileContext-2e53d03a.js → UserProfileContext-beacab28.js} +6 -4
- package/{UserProfileContext-2e53d03a.js.map → UserProfileContext-beacab28.js.map} +1 -1
- package/{__bundle-bd072f34-95f6bf17.js → __bundle-c41dd401-d4ab6c10.js} +18 -4
- package/__bundle-c41dd401-d4ab6c10.js.map +1 -0
- package/_rollupPluginBabelHelpers-22c28a74.js +43 -0
- package/_rollupPluginBabelHelpers-22c28a74.js.map +1 -0
- package/actionTypes-fd0f0a6c.js +6 -0
- package/{actionTypes-517789b8.js.map → actionTypes-fd0f0a6c.js.map} +1 -1
- package/cjs/App.js +82 -92
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +19 -19
- package/cjs/Channel/components/ChannelHeader.js.map +1 -1
- package/cjs/Channel/components/ChannelUI.js +27 -26
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +20 -20
- package/cjs/Channel/components/FileViewer.js.map +1 -1
- package/cjs/Channel/components/FrozenNotification.js +5 -6
- package/cjs/Channel/components/FrozenNotification.js.map +1 -1
- package/cjs/Channel/components/Message.js +33 -32
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +31 -30
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +27 -26
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +19 -19
- package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
- package/cjs/Channel/components/SuggestedMentionList.js +34 -34
- package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
- package/cjs/Channel/components/TypingIndicator.js +20 -20
- package/cjs/Channel/components/TypingIndicator.js.map +1 -1
- package/cjs/Channel/components/UnreadCount.js +5 -6
- package/cjs/Channel/components/UnreadCount.js.map +1 -1
- package/cjs/Channel/context.js +15 -15
- package/cjs/Channel.js +25 -24
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +17 -17
- package/cjs/ChannelList/components/AddChannel.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListHeader.js +10 -10
- package/cjs/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListUI.js +39 -39
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +48 -48
- package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreviewAction.js +57 -68
- package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/cjs/ChannelList/context.js +10 -10
- package/cjs/ChannelList.js +28 -28
- package/cjs/ChannelList.js.map +1 -1
- package/cjs/{ChannelListProvider-781aa186.js → ChannelListProvider-dba82f83.js} +232 -216
- package/cjs/ChannelListProvider-dba82f83.js.map +1 -0
- package/cjs/{ChannelProvider-bbff4ae8.js → ChannelProvider-dd81a327.js} +559 -526
- package/cjs/{ChannelProvider-bbff4ae8.js.map → ChannelProvider-dd81a327.js.map} +1 -1
- package/cjs/ChannelSettings/components/ChannelProfile.js +16 -16
- package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +26 -26
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +19 -21
- package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/ChannelSettings/components/LeaveChannel.js +14 -16
- package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/cjs/ChannelSettings/components/ModerationPanel.js +78 -78
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/cjs/ChannelSettings/components/UserListItem.js +15 -15
- package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
- package/cjs/ChannelSettings/components/UserPanel.js +17 -17
- package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
- package/cjs/ChannelSettings/context.js +6 -6
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +20 -20
- package/cjs/ChannelSettings.js.map +1 -1
- package/cjs/CreateChannel/components/CreateChannelUI.js +18 -19
- package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/cjs/CreateChannel/components/InviteUsers.js +21 -20
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +22 -22
- package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +14 -14
- package/cjs/CreateChannel.js.map +1 -1
- package/cjs/{CreateChannelProvider-80c88bba.js → CreateChannelProvider-771bf00b.js} +3 -3
- package/cjs/{CreateChannelProvider-80c88bba.js.map → CreateChannelProvider-771bf00b.js.map} +1 -1
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +13 -13
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/cjs/CreateOpenChannel/context.js +11 -11
- package/cjs/CreateOpenChannel/context.js.map +1 -1
- package/cjs/CreateOpenChannel.js +9 -9
- package/cjs/CreateOpenChannel.js.map +1 -1
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/cjs/EditUserProfile/context.js +14 -14
- package/cjs/EditUserProfile/context.js.map +1 -1
- package/cjs/EditUserProfile.js +13 -13
- package/cjs/EditUserProfile.js.map +1 -1
- package/cjs/{LocalizationContext-b5fd4c38.js → LocalizationContext-b051aa28.js} +5 -5
- package/cjs/{LocalizationContext-b5fd4c38.js.map → LocalizationContext-b051aa28.js.map} +1 -1
- package/cjs/{MemberList-10def668.js → MemberList-6c0cdd90.js} +34 -34
- package/cjs/{MemberList-10def668.js.map → MemberList-6c0cdd90.js.map} +1 -1
- package/cjs/MessageSearch/components/MessageSearchUI.js +17 -17
- package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/cjs/MessageSearch/context.js +6 -6
- package/cjs/MessageSearch/context.js.map +1 -1
- package/cjs/MessageSearch.js +14 -14
- package/cjs/MessageSearch.js.map +1 -1
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -6
- package/cjs/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelHeader.js +14 -14
- package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelInput.js +19 -18
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +32 -31
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +27 -26
- package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelUI.js +26 -25
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +11 -11
- package/cjs/OpenChannel.js +26 -25
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +19 -19
- package/cjs/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +5 -6
- package/cjs/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/cjs/OpenChannelList/context.js +4 -4
- package/cjs/OpenChannelList.js +12 -12
- package/cjs/OpenChannelList.js.map +1 -1
- package/cjs/{OpenChannelListProvider-8e425873.js → OpenChannelListProvider-3eed20f7.js} +4 -4
- package/cjs/{OpenChannelListProvider-8e425873.js.map → OpenChannelListProvider-3eed20f7.js.map} +1 -1
- package/cjs/{OpenChannelProvider-39f9e794.js → OpenChannelProvider-e4f3a05c.js} +46 -46
- package/cjs/{OpenChannelProvider-39f9e794.js.map → OpenChannelProvider-e4f3a05c.js.map} +1 -1
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +19 -19
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +16 -16
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +27 -27
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +87 -87
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +16 -16
- package/cjs/OpenChannelSettings/context.js +14 -14
- package/cjs/OpenChannelSettings/context.js.map +1 -1
- package/cjs/OpenChannelSettings.js +20 -20
- package/cjs/OpenChannelSettings.js.map +1 -1
- package/cjs/SendbirdProvider.js +213 -250
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/{UserProfileContext-69c9649a.js → UserProfileContext-fa684629.js} +6 -4
- package/cjs/{UserProfileContext-69c9649a.js.map → UserProfileContext-fa684629.js.map} +1 -1
- package/cjs/{__bundle-bd072f34-57bee5af.js → __bundle-c41dd401-1f364afe.js} +19 -5
- package/cjs/__bundle-c41dd401-1f364afe.js.map +1 -0
- package/cjs/_rollupPluginBabelHelpers-c7da8657.js +45 -0
- package/cjs/_rollupPluginBabelHelpers-c7da8657.js.map +1 -0
- package/cjs/actionTypes-1bc31680.js +10 -0
- package/cjs/{actionTypes-17aa0989.js.map → actionTypes-1bc31680.js.map} +1 -1
- package/cjs/{color-9e293baf.js → color-8c864d64.js} +2 -2
- package/cjs/color-8c864d64.js.map +1 -0
- package/cjs/compareIds-a7236494.js +18 -0
- package/cjs/compareIds-a7236494.js.map +1 -0
- package/cjs/{const-17108318.js → const-baa5e08a.js} +1 -1
- package/cjs/const-baa5e08a.js.map +1 -0
- package/cjs/{const-955190c4.js → const-de0fa0d4.js} +1 -1
- package/cjs/{const-955190c4.js.map → const-de0fa0d4.js.map} +1 -1
- package/cjs/{context-e041c8e0.js → context-867cfd7f.js} +2 -2
- package/cjs/{context-e041c8e0.js.map → context-867cfd7f.js.map} +1 -1
- package/cjs/dist/index.css +4684 -3703
- package/cjs/dist/index.css.map +1 -1
- package/cjs/groupChannel-95ba4a71.js +11 -0
- package/cjs/groupChannel-95ba4a71.js.map +1 -0
- package/cjs/handlers/GroupChannelHandler.js +3 -3
- package/cjs/handlers/OpenChannelHandler.js +2 -2
- package/cjs/handlers/OpenChannelHandler.js.map +1 -1
- package/cjs/handlers/SessionHandler.js.map +1 -1
- package/cjs/{index-025aa556.js → index-511e268c.js} +13 -13
- package/cjs/{index-025aa556.js.map → index-511e268c.js.map} +1 -1
- package/cjs/{index-5166a415.js → index-53015903.js} +69 -80
- package/cjs/index-53015903.js.map +1 -0
- package/cjs/{index-b9b8972b.js → index-62c9ad2d.js} +14 -13
- package/cjs/{index-b9b8972b.js.map → index-62c9ad2d.js.map} +1 -1
- package/cjs/{index-1512514f.js → index-6d02996a.js} +16 -14
- package/cjs/index-6d02996a.js.map +1 -0
- package/cjs/{index-5e2b8c03.js → index-76deed83.js} +30 -30
- package/cjs/{index-5e2b8c03.js.map → index-76deed83.js.map} +1 -1
- package/cjs/{index-e9d96b00.js → index-78d342b2.js} +4 -4
- package/cjs/{index-e9d96b00.js.map → index-78d342b2.js.map} +1 -1
- package/cjs/{index-18b120dc.js → index-907bf834.js} +51 -51
- package/cjs/index-907bf834.js.map +1 -0
- package/cjs/{index-9ce5e5a9.js → index-b478bf3b.js} +18 -37
- package/cjs/index-b478bf3b.js.map +1 -0
- package/cjs/{index-c1697faa.js → index-c4369117.js} +299 -319
- package/cjs/index-c4369117.js.map +1 -0
- package/cjs/{index-550f5039.js → index-d31051df.js} +2 -2
- package/cjs/{index-550f5039.js.map → index-d31051df.js.map} +1 -1
- package/cjs/index.js +36 -35
- package/cjs/index.js.map +1 -1
- package/cjs/openChannel-4789903c.js +9 -0
- package/cjs/{openChannel-8aabbf3c.js.map → openChannel-4789903c.js.map} +1 -1
- package/cjs/{openChannelUtils-cffba1c0.js → openChannelUtils-fc2ec8df.js} +11 -11
- package/cjs/openChannelUtils-fc2ec8df.js.map +1 -0
- package/cjs/sendbirdSelectors.js +22 -22
- package/cjs/sendbirdSelectors.js.map +1 -1
- package/cjs/{stringSet-be457fd7.js → stringSet-9d251780.js} +4 -4
- package/cjs/{stringSet-be457fd7.js.map → stringSet-9d251780.js.map} +1 -1
- package/cjs/topics-ac8d2b51.js +22 -0
- package/cjs/{topics-58ec1c61.js.map → topics-ac8d2b51.js.map} +1 -1
- package/cjs/{tslib.es6-36205d81.js → tslib.es6-9b1c82d5.js} +2 -2
- package/cjs/tslib.es6-9b1c82d5.js.map +1 -0
- package/cjs/ui/Accordion.js +4 -5
- package/cjs/ui/Accordion.js.map +1 -1
- package/cjs/ui/AccordionGroup.js +2 -2
- package/cjs/ui/AccordionGroup.js.map +1 -1
- package/cjs/ui/AdminMessage.js +3 -4
- package/cjs/ui/AdminMessage.js.map +1 -1
- package/cjs/ui/Avatar.js +6 -7
- package/cjs/ui/Avatar.js.map +1 -1
- package/cjs/ui/Badge.js +5 -6
- package/cjs/ui/Badge.js.map +1 -1
- package/cjs/ui/Button.js +3 -4
- package/cjs/ui/Button.js.map +1 -1
- package/cjs/ui/ChannelAvatar.js +3 -4
- package/cjs/ui/ChannelAvatar.js.map +1 -1
- package/cjs/ui/Checkbox.js +1 -1
- package/cjs/ui/Checkbox.js.map +1 -1
- package/cjs/ui/ConnectionStatus.js +4 -5
- package/cjs/ui/ConnectionStatus.js.map +1 -1
- package/cjs/ui/ContextMenu.js +14 -15
- package/cjs/ui/ContextMenu.js.map +1 -1
- package/cjs/ui/DateSeparator.js +5 -6
- package/cjs/ui/DateSeparator.js.map +1 -1
- package/cjs/ui/EmojiReactions.js +13 -14
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FileMessageItemBody.js +6 -7
- package/cjs/ui/FileMessageItemBody.js.map +1 -1
- package/cjs/ui/FileViewer.js +11 -12
- package/cjs/ui/FileViewer.js.map +1 -1
- package/cjs/ui/Icon.js +74 -73
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +7 -7
- package/cjs/ui/IconButton.js.map +1 -1
- package/cjs/ui/ImageRenderer.js +8 -10
- package/cjs/ui/ImageRenderer.js.map +1 -1
- package/cjs/ui/Input.js +4 -5
- package/cjs/ui/Input.js.map +1 -1
- package/cjs/ui/Label.js +2 -3
- package/cjs/ui/Label.js.map +1 -1
- package/cjs/ui/LinkLabel.js +14 -13
- package/cjs/ui/LinkLabel.js.map +1 -1
- package/cjs/ui/Loader.js +1 -2
- package/cjs/ui/Loader.js.map +1 -1
- package/cjs/ui/MentionLabel.js +13 -13
- package/cjs/ui/MentionLabel.js.map +1 -1
- package/cjs/ui/MentionUserLabel.js.map +1 -1
- package/cjs/ui/MessageContent.js +19 -19
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput.js +178 -19889
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +17 -18
- package/cjs/ui/MessageItemMenu.js.map +1 -1
- package/cjs/ui/MessageItemReactionMenu.js +12 -13
- package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
- package/cjs/ui/MessageSearchFileItem.js +13 -24
- package/cjs/ui/MessageSearchFileItem.js.map +1 -1
- package/cjs/ui/MessageSearchItem.js +12 -14
- package/cjs/ui/MessageSearchItem.js.map +1 -1
- package/cjs/ui/MessageStatus.js +7 -8
- package/cjs/ui/MessageStatus.js.map +1 -1
- package/cjs/ui/Modal.js +9 -10
- package/cjs/ui/Modal.js.map +1 -1
- package/cjs/ui/MutedAvatarOverlay.js +0 -1
- package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
- package/cjs/ui/OGMessageItemBody.js +11 -11
- package/cjs/ui/OGMessageItemBody.js.map +1 -1
- package/cjs/ui/OpenChannelAdminMessage.js +3 -4
- package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
- package/cjs/ui/OpenChannelAvatar.js +6 -7
- package/cjs/ui/OpenChannelAvatar.js.map +1 -1
- package/cjs/ui/OpenchannelConversationHeader.js +6 -7
- package/cjs/ui/OpenchannelConversationHeader.js.map +1 -1
- package/cjs/ui/OpenchannelFileMessage.js +24 -24
- package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
- package/cjs/ui/OpenchannelOGMessage.js +26 -26
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +26 -26
- package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/cjs/ui/OpenchannelUserMessage.js +24 -24
- package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
- package/cjs/ui/PlaceHolder.js +6 -7
- package/cjs/ui/PlaceHolder.js.map +1 -1
- package/cjs/ui/QuoteMessage.js +10 -11
- package/cjs/ui/QuoteMessage.js.map +1 -1
- package/cjs/ui/QuoteMessageInput.js +7 -8
- package/cjs/ui/QuoteMessageInput.js.map +1 -1
- package/cjs/ui/ReactionBadge.js +4 -5
- package/cjs/ui/ReactionBadge.js.map +1 -1
- package/cjs/ui/ReactionButton.js +6 -6
- package/cjs/ui/ReactionButton.js.map +1 -1
- package/cjs/ui/SortByRow.js +2 -2
- package/cjs/ui/SortByRow.js.map +1 -1
- package/cjs/ui/TextButton.js +8 -9
- package/cjs/ui/TextButton.js.map +1 -1
- package/cjs/ui/TextMessageItemBody.js +10 -10
- package/cjs/ui/TextMessageItemBody.js.map +1 -1
- package/cjs/ui/ThumbnailMessageItemBody.js +5 -6
- package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/cjs/ui/Tooltip.js +3 -4
- package/cjs/ui/Tooltip.js.map +1 -1
- package/cjs/ui/TooltipWrapper.js +5 -5
- package/cjs/ui/TooltipWrapper.js.map +1 -1
- package/cjs/ui/UnknownMessageItemBody.js +6 -7
- package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
- package/cjs/ui/UserListItem.js +17 -17
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +11 -11
- package/cjs/ui/UserProfile.js.map +1 -1
- package/cjs/ui/Word.js +15 -10
- package/cjs/ui/Word.js.map +1 -1
- package/cjs/useSendbirdStateContext.js +1 -1
- package/cjs/useSendbirdStateContext.js.map +1 -1
- package/cjs/{utils-9419225c.js → utils-655acd99.js} +4 -4
- package/cjs/utils-655acd99.js.map +1 -0
- package/cjs/{utils-40fab371.js → utils-8c634fd2.js} +2 -2
- package/cjs/{utils-40fab371.js.map → utils-8c634fd2.js.map} +1 -1
- package/cjs/utils-8e6fef1c.js +6 -0
- package/cjs/{utils-09738454.js.map → utils-8e6fef1c.js.map} +1 -1
- package/cjs/{uuid-edc908ea.js → uuid-c32d01d6.js} +2 -2
- package/cjs/{uuid-edc908ea.js.map → uuid-c32d01d6.js.map} +1 -1
- package/cjs/withSendbird.js +13 -15
- package/cjs/withSendbird.js.map +1 -1
- package/{color-402a36fd.js → color-fff21001.js} +2 -2
- package/{color-402a36fd.js.map → color-fff21001.js.map} +1 -1
- package/compareIds-332d261c.js +16 -0
- package/compareIds-332d261c.js.map +1 -0
- package/{const-768ef60e.js → const-03293011.js} +1 -1
- package/const-03293011.js.map +1 -0
- package/{const-6b428cb8.js → const-78e336dd.js} +1 -1
- package/{const-6b428cb8.js.map → const-78e336dd.js.map} +1 -1
- package/{context-bd92675f.js → context-44e184de.js} +2 -2
- package/{context-bd92675f.js.map → context-44e184de.js.map} +1 -1
- package/dist/index.css +4684 -3703
- package/dist/index.css.map +1 -1
- package/groupChannel-3301a732.js +8 -0
- package/groupChannel-3301a732.js.map +1 -0
- package/handlers/GroupChannelHandler.js +3 -3
- package/handlers/OpenChannelHandler.js +3 -3
- package/handlers/OpenChannelHandler.js.map +1 -1
- package/handlers/SessionHandler.js.map +1 -1
- package/{index-3699f160.js → index-00b281a3.js} +18 -37
- package/index-00b281a3.js.map +1 -0
- package/{index-7fa0a721.js → index-3ddec9e9.js} +299 -320
- package/index-3ddec9e9.js.map +1 -0
- package/{index-f59cf800.js → index-46beca69.js} +51 -51
- package/index-46beca69.js.map +1 -0
- package/{index-726a5475.js → index-49d3a217.js} +30 -30
- package/{index-726a5475.js.map → index-49d3a217.js.map} +1 -1
- package/{index-3249f6b5.js → index-5e788130.js} +2 -2
- package/{index-3249f6b5.js.map → index-5e788130.js.map} +1 -1
- package/{index-6b896cd8.js → index-7b043ab9.js} +14 -13
- package/{index-6b896cd8.js.map → index-7b043ab9.js.map} +1 -1
- package/{index-598898d3.js → index-8bd6c997.js} +16 -14
- package/index-8bd6c997.js.map +1 -0
- package/{index-176e9ad4.js → index-940576d8.js} +69 -80
- package/index-940576d8.js.map +1 -0
- package/{index-b79c5b07.js → index-e5aab3b4.js} +13 -13
- package/{index-b79c5b07.js.map → index-e5aab3b4.js.map} +1 -1
- package/{index-a98bd600.js → index-ed8e5d48.js} +4 -4
- package/{index-a98bd600.js.map → index-ed8e5d48.js.map} +1 -1
- package/index.d.ts +1 -1
- package/index.js +36 -35
- package/index.js.map +1 -1
- package/{openChannel-8c75e1a4.js → openChannel-2aef0cd5.js} +3 -3
- package/{openChannel-8c75e1a4.js.map → openChannel-2aef0cd5.js.map} +1 -1
- package/{openChannelUtils-ecaeb7d7.js → openChannelUtils-d27d1e28.js} +11 -11
- package/openChannelUtils-d27d1e28.js.map +1 -0
- package/package.json +1 -1
- package/sendbirdSelectors.js +22 -22
- package/sendbirdSelectors.js.map +1 -1
- package/{stringSet-dc330bcf.js → stringSet-804c49f3.js} +4 -4
- package/{stringSet-dc330bcf.js.map → stringSet-804c49f3.js.map} +1 -1
- package/topics-24c0f724.js +13 -0
- package/{topics-c5198349.js.map → topics-24c0f724.js.map} +1 -1
- package/{tslib.es6-cb5d77bf.js → tslib.es6-4faaa58d.js} +2 -2
- package/tslib.es6-4faaa58d.js.map +1 -0
- package/ui/Accordion.js +4 -5
- package/ui/Accordion.js.map +1 -1
- package/ui/AccordionGroup.js +2 -2
- package/ui/AccordionGroup.js.map +1 -1
- package/ui/AdminMessage.js +3 -4
- package/ui/AdminMessage.js.map +1 -1
- package/ui/Avatar.js +6 -7
- package/ui/Avatar.js.map +1 -1
- package/ui/Badge.js +5 -6
- package/ui/Badge.js.map +1 -1
- package/ui/Button.js +3 -4
- package/ui/Button.js.map +1 -1
- package/ui/ChannelAvatar.js +3 -4
- package/ui/ChannelAvatar.js.map +1 -1
- package/ui/Checkbox.js +1 -1
- package/ui/Checkbox.js.map +1 -1
- package/ui/ConnectionStatus.js +4 -5
- package/ui/ConnectionStatus.js.map +1 -1
- package/ui/ContextMenu.js +14 -15
- package/ui/ContextMenu.js.map +1 -1
- package/ui/DateSeparator.js +5 -6
- package/ui/DateSeparator.js.map +1 -1
- package/ui/EmojiReactions.js +13 -14
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FileMessageItemBody.js +6 -7
- package/ui/FileMessageItemBody.js.map +1 -1
- package/ui/FileViewer.js +11 -12
- package/ui/FileViewer.js.map +1 -1
- package/ui/Icon.js +74 -73
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +7 -7
- package/ui/IconButton.js.map +1 -1
- package/ui/ImageRenderer.js +8 -10
- package/ui/ImageRenderer.js.map +1 -1
- package/ui/Input.js +4 -5
- package/ui/Input.js.map +1 -1
- package/ui/Label.js +2 -3
- package/ui/Label.js.map +1 -1
- package/ui/LinkLabel.js +14 -13
- package/ui/LinkLabel.js.map +1 -1
- package/ui/Loader.js +1 -2
- package/ui/Loader.js.map +1 -1
- package/ui/MentionLabel.js +13 -13
- package/ui/MentionLabel.js.map +1 -1
- package/ui/MentionUserLabel.js.map +1 -1
- package/ui/MessageContent.js +19 -19
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput.js +178 -19889
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +17 -18
- package/ui/MessageItemMenu.js.map +1 -1
- package/ui/MessageItemReactionMenu.js +12 -13
- package/ui/MessageItemReactionMenu.js.map +1 -1
- package/ui/MessageSearchFileItem.js +13 -24
- package/ui/MessageSearchFileItem.js.map +1 -1
- package/ui/MessageSearchItem.js +12 -14
- package/ui/MessageSearchItem.js.map +1 -1
- package/ui/MessageStatus.js +7 -8
- package/ui/MessageStatus.js.map +1 -1
- package/ui/Modal.js +9 -10
- package/ui/Modal.js.map +1 -1
- package/ui/MutedAvatarOverlay.js +0 -1
- package/ui/MutedAvatarOverlay.js.map +1 -1
- package/ui/OGMessageItemBody.js +11 -11
- package/ui/OGMessageItemBody.js.map +1 -1
- package/ui/OpenChannelAdminMessage.js +3 -4
- package/ui/OpenChannelAdminMessage.js.map +1 -1
- package/ui/OpenChannelAvatar.js +6 -7
- package/ui/OpenChannelAvatar.js.map +1 -1
- package/ui/OpenchannelConversationHeader.js +6 -7
- package/ui/OpenchannelConversationHeader.js.map +1 -1
- package/ui/OpenchannelFileMessage.js +24 -24
- package/ui/OpenchannelFileMessage.js.map +1 -1
- package/ui/OpenchannelOGMessage.js +26 -26
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +26 -26
- package/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/ui/OpenchannelUserMessage.js +24 -24
- package/ui/OpenchannelUserMessage.js.map +1 -1
- package/ui/PlaceHolder.js +6 -7
- package/ui/PlaceHolder.js.map +1 -1
- package/ui/QuoteMessage.js +10 -11
- package/ui/QuoteMessage.js.map +1 -1
- package/ui/QuoteMessageInput.js +7 -8
- package/ui/QuoteMessageInput.js.map +1 -1
- package/ui/ReactionBadge.js +4 -5
- package/ui/ReactionBadge.js.map +1 -1
- package/ui/ReactionButton.js +6 -6
- package/ui/ReactionButton.js.map +1 -1
- package/ui/SortByRow.js +2 -2
- package/ui/SortByRow.js.map +1 -1
- package/ui/TextButton.js +8 -9
- package/ui/TextButton.js.map +1 -1
- package/ui/TextMessageItemBody.js +10 -10
- package/ui/TextMessageItemBody.js.map +1 -1
- package/ui/ThumbnailMessageItemBody.js +5 -6
- package/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/ui/Tooltip.js +3 -4
- package/ui/Tooltip.js.map +1 -1
- package/ui/TooltipWrapper.js +5 -5
- package/ui/TooltipWrapper.js.map +1 -1
- package/ui/UnknownMessageItemBody.js +6 -7
- package/ui/UnknownMessageItemBody.js.map +1 -1
- package/ui/UserListItem.js +17 -17
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +11 -11
- package/ui/UserProfile.js.map +1 -1
- package/ui/Word.js +15 -10
- package/ui/Word.js.map +1 -1
- package/useSendbirdStateContext.js +1 -1
- package/useSendbirdStateContext.js.map +1 -1
- package/{utils-330ed0b1.js → utils-28acb86e.js} +2 -2
- package/{utils-330ed0b1.js.map → utils-28acb86e.js.map} +1 -1
- package/utils-32938255.js +4 -0
- package/{utils-629876b9.js.map → utils-32938255.js.map} +1 -1
- package/{utils-8fb72715.js → utils-47a3394f.js} +4 -4
- package/utils-47a3394f.js.map +1 -0
- package/{uuid-180d497e.js → uuid-4521c466.js} +2 -2
- package/{uuid-180d497e.js.map → uuid-4521c466.js.map} +1 -1
- package/withSendbird.js +13 -15
- package/withSendbird.js.map +1 -1
- package/ChannelListProvider-6e3b8f43.js.map +0 -1
- package/__bundle-bd072f34-95f6bf17.js.map +0 -1
- package/_rollupPluginBabelHelpers-4527872e.js +0 -130
- package/_rollupPluginBabelHelpers-4527872e.js.map +0 -1
- package/actionTypes-517789b8.js +0 -6
- package/cjs/ChannelListProvider-781aa186.js.map +0 -1
- package/cjs/__bundle-bd072f34-57bee5af.js.map +0 -1
- package/cjs/_rollupPluginBabelHelpers-f9e4bb55.js +0 -134
- package/cjs/_rollupPluginBabelHelpers-f9e4bb55.js.map +0 -1
- package/cjs/actionTypes-17aa0989.js +0 -10
- package/cjs/color-9e293baf.js.map +0 -1
- package/cjs/compareIds-cf626c9f.js +0 -20
- package/cjs/compareIds-cf626c9f.js.map +0 -1
- package/cjs/const-17108318.js.map +0 -1
- package/cjs/groupChannel-6d56c155.js +0 -11
- package/cjs/groupChannel-6d56c155.js.map +0 -1
- package/cjs/index-1512514f.js.map +0 -1
- package/cjs/index-18b120dc.js.map +0 -1
- package/cjs/index-5166a415.js.map +0 -1
- package/cjs/index-9ce5e5a9.js.map +0 -1
- package/cjs/index-c1697faa.js.map +0 -1
- package/cjs/openChannel-8aabbf3c.js +0 -9
- package/cjs/openChannelUtils-cffba1c0.js.map +0 -1
- package/cjs/topics-58ec1c61.js +0 -22
- package/cjs/tslib.es6-36205d81.js.map +0 -1
- package/cjs/utils-09738454.js +0 -6
- package/cjs/utils-9419225c.js.map +0 -1
- package/compareIds-31e2f55c.js +0 -18
- package/compareIds-31e2f55c.js.map +0 -1
- package/const-768ef60e.js.map +0 -1
- package/groupChannel-e2a071e1.js +0 -8
- package/groupChannel-e2a071e1.js.map +0 -1
- package/index-176e9ad4.js.map +0 -1
- package/index-3699f160.js.map +0 -1
- package/index-598898d3.js.map +0 -1
- package/index-7fa0a721.js.map +0 -1
- package/index-f59cf800.js.map +0 -1
- package/openChannelUtils-ecaeb7d7.js.map +0 -1
- package/package-lock.json +0 -25501
- package/topics-c5198349.js +0 -13
- package/tslib.es6-cb5d77bf.js.map +0 -1
- package/utils-629876b9.js +0 -4
- package/utils-8fb72715.js.map +0 -1
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import { a as __spreadArray, _ as __assign } from './tslib.es6-
|
|
1
|
+
import { a as __spreadArray, _ as __assign } from './tslib.es6-4faaa58d.js';
|
|
2
2
|
import React__default, { useReducer, useState, useEffect, useMemo, useContext } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { C as CREATE_CHANNEL$1, U as UPDATE_USER_MESSAGE, L as LEAVE_CHANNEL, S as SEND_MESSAGE_START } from './topics-
|
|
5
|
-
import { u as uuidv4 } from './uuid-
|
|
6
|
-
import { n as noop } from './utils-
|
|
7
|
-
import { U as UserProfileProvider } from './UserProfileContext-
|
|
3
|
+
import { J as Jr } from './groupChannel-3301a732.js';
|
|
4
|
+
import { C as CREATE_CHANNEL$1, U as UPDATE_USER_MESSAGE, L as LEAVE_CHANNEL, S as SEND_MESSAGE_START } from './topics-24c0f724.js';
|
|
5
|
+
import { u as uuidv4 } from './uuid-4521c466.js';
|
|
6
|
+
import { n as noop } from './utils-32938255.js';
|
|
7
|
+
import { U as UserProfileProvider } from './UserProfileContext-beacab28.js';
|
|
8
8
|
import useSendbirdStateContext from './useSendbirdStateContext.js';
|
|
9
|
-
import { _ as _objectSpread2
|
|
10
|
-
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
9
|
+
import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers-22c28a74.js';
|
|
10
|
+
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-46beca69.js';
|
|
11
|
+
|
|
12
|
+
const RESET_CHANNEL_LIST = 'RESET_CHANNEL_LIST';
|
|
13
|
+
const CREATE_CHANNEL = 'CREATE_CHANNEL';
|
|
14
|
+
const LEAVE_CHANNEL_SUCCESS = 'LEAVE_CHANNEL_SUCCESS';
|
|
15
|
+
const SET_CURRENT_CHANNEL = 'SET_CURRENT_CHANNEL';
|
|
16
|
+
const SHOW_CHANNEL_SETTINGS = 'SHOW_CHANNEL_SETTINGS';
|
|
17
|
+
const HIDE_CHANNEL_SETTINGS = 'HIDE_CHANNEL_SETTINGS';
|
|
18
|
+
const FETCH_CHANNELS_START = 'FETCH_CHANNELS_START';
|
|
19
|
+
const FETCH_CHANNELS_SUCCESS = 'FETCH_CHANNELS_SUCCESS';
|
|
20
|
+
const FETCH_CHANNELS_FAILURE = 'FETCH_CHANNELS_FAILURE';
|
|
21
|
+
const INIT_CHANNELS_START = 'INIT_CHANNELS_START';
|
|
22
|
+
const INIT_CHANNELS_SUCCESS = 'INIT_CHANNELS_SUCCESS';
|
|
23
|
+
const INIT_CHANNELS_FAILURE = 'INIT_CHANNELS_FAILURE';
|
|
24
|
+
const ON_USER_JOINED = 'ON_USER_JOINED';
|
|
25
|
+
const ON_CHANNEL_DELETED = 'ON_CHANNEL_DELETED';
|
|
26
|
+
const ON_LAST_MESSAGE_UPDATED = 'ON_LAST_MESSAGE_UPDATED';
|
|
27
|
+
const ON_USER_LEFT = 'ON_USER_LEFT';
|
|
28
|
+
const ON_CHANNEL_CHANGED = 'ON_CHANNEL_CHANGED';
|
|
29
|
+
const ON_CHANNEL_ARCHIVED = 'ON_CHANNEL_ARCHIVED';
|
|
30
|
+
const ON_CHANNEL_FROZEN = 'ON_CHANNEL_FROZEN';
|
|
31
|
+
const ON_CHANNEL_UNFROZEN = 'ON_CHANNEL_UNFROZEN';
|
|
32
|
+
const ON_READ_RECEIPT_UPDATED = 'ON_READ_RECEIPT_UPDATED';
|
|
33
|
+
const ON_DELIVERY_RECEIPT_UPDATED = 'ON_DELIVERY_RECEIPT_UPDATED';
|
|
34
|
+
const CHANNEL_REPLACED_TO_TOP = 'CHANNEL_REPLACED_TO_TOP';
|
|
35
|
+
const CHANNEL_LIST_PARAMS_UPDATED = 'CHANNEL_LIST_PARAMS_UPDATED';
|
|
36
|
+
|
|
37
|
+
const DELIVERY_RECIPT = 'delivery_receipt';
|
|
38
|
+
|
|
39
|
+
const createEventHandler = _ref => {
|
|
40
|
+
let {
|
|
41
|
+
sdk,
|
|
42
|
+
sdkChannelHandlerId,
|
|
43
|
+
channelListDispatcher,
|
|
44
|
+
logger
|
|
45
|
+
} = _ref;
|
|
46
|
+
const ChannelHandler = new Jr({
|
|
47
|
+
onChannelChanged: channel => {
|
|
46
48
|
logger.info('ChannelList: onChannelChanged', channel);
|
|
47
49
|
channelListDispatcher({
|
|
48
50
|
type: ON_CHANNEL_CHANGED,
|
|
49
51
|
payload: channel
|
|
50
52
|
});
|
|
51
53
|
},
|
|
52
|
-
onChannelDeleted:
|
|
54
|
+
onChannelDeleted: channelUrl => {
|
|
53
55
|
logger.info('ChannelList: onChannelDeleted', channelUrl);
|
|
54
56
|
channelListDispatcher({
|
|
55
57
|
type: ON_CHANNEL_DELETED,
|
|
56
58
|
payload: channelUrl
|
|
57
59
|
});
|
|
58
60
|
},
|
|
59
|
-
onUserJoined:
|
|
61
|
+
onUserJoined: channel => {
|
|
60
62
|
logger.info('ChannelList: onUserJoined', channel);
|
|
61
63
|
|
|
62
64
|
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
@@ -66,15 +68,17 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
},
|
|
69
|
-
onUserBanned:
|
|
70
|
-
|
|
71
|
+
onUserBanned: (channel, user) => {
|
|
72
|
+
const {
|
|
73
|
+
currentUser
|
|
74
|
+
} = sdk;
|
|
71
75
|
logger.info('Channel | useHandleChannelEvents: onUserBanned', channel);
|
|
72
76
|
|
|
73
77
|
if (user.userId === currentUser.userId) {
|
|
74
78
|
channelListDispatcher({
|
|
75
79
|
type: ON_USER_LEFT,
|
|
76
80
|
payload: {
|
|
77
|
-
channel
|
|
81
|
+
channel,
|
|
78
82
|
isMe: true
|
|
79
83
|
}
|
|
80
84
|
});
|
|
@@ -82,32 +86,34 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
82
86
|
channelListDispatcher({
|
|
83
87
|
type: ON_USER_LEFT,
|
|
84
88
|
payload: {
|
|
85
|
-
channel
|
|
89
|
+
channel,
|
|
86
90
|
isMe: false
|
|
87
91
|
}
|
|
88
92
|
});
|
|
89
93
|
}
|
|
90
94
|
},
|
|
91
|
-
onUserLeft:
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
onUserLeft: (channel, leftUser) => {
|
|
96
|
+
const {
|
|
97
|
+
currentUser
|
|
98
|
+
} = sdk;
|
|
99
|
+
const isMe = currentUser.userId === leftUser.userId;
|
|
94
100
|
logger.info('ChannelList: onUserLeft', channel);
|
|
95
101
|
channelListDispatcher({
|
|
96
102
|
type: ON_USER_LEFT,
|
|
97
103
|
payload: {
|
|
98
|
-
channel
|
|
99
|
-
isMe
|
|
104
|
+
channel,
|
|
105
|
+
isMe
|
|
100
106
|
}
|
|
101
107
|
});
|
|
102
108
|
},
|
|
103
|
-
onReadStatus:
|
|
109
|
+
onReadStatus: channel => {
|
|
104
110
|
logger.info('ChannelList: onReadStatus', channel);
|
|
105
111
|
channelListDispatcher({
|
|
106
112
|
type: ON_READ_RECEIPT_UPDATED,
|
|
107
113
|
payload: channel
|
|
108
114
|
});
|
|
109
115
|
},
|
|
110
|
-
onDeliveryReceiptUpdated:
|
|
116
|
+
onDeliveryReceiptUpdated: channel => {
|
|
111
117
|
logger.info('ChannelList: onDeliveryReceiptUpdated', channel);
|
|
112
118
|
|
|
113
119
|
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
@@ -117,7 +123,7 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
117
123
|
});
|
|
118
124
|
}
|
|
119
125
|
},
|
|
120
|
-
onMessageUpdated:
|
|
126
|
+
onMessageUpdated: (channel, message) => {
|
|
121
127
|
if (channel !== null && channel !== void 0 && channel.lastMessage.isEqual(message)) {
|
|
122
128
|
logger.info('ChannelList: onMessageUpdated', channel);
|
|
123
129
|
channelListDispatcher({
|
|
@@ -126,21 +132,21 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
126
132
|
});
|
|
127
133
|
}
|
|
128
134
|
},
|
|
129
|
-
onChannelHidden:
|
|
135
|
+
onChannelHidden: channel => {
|
|
130
136
|
logger.info('ChannelList: onChannelHidden', channel);
|
|
131
137
|
channelListDispatcher({
|
|
132
138
|
type: ON_CHANNEL_ARCHIVED,
|
|
133
139
|
payload: channel
|
|
134
140
|
});
|
|
135
141
|
},
|
|
136
|
-
onChannelFrozen:
|
|
142
|
+
onChannelFrozen: channel => {
|
|
137
143
|
logger.info('ChannelList: onChannelFrozen', channel);
|
|
138
144
|
channelListDispatcher({
|
|
139
145
|
type: ON_CHANNEL_FROZEN,
|
|
140
146
|
payload: channel
|
|
141
147
|
});
|
|
142
148
|
},
|
|
143
|
-
onChannelUnfrozen:
|
|
149
|
+
onChannelUnfrozen: channel => {
|
|
144
150
|
logger.info('ChannelList: onChannelUnfrozen', channel);
|
|
145
151
|
channelListDispatcher({
|
|
146
152
|
type: ON_CHANNEL_UNFROZEN,
|
|
@@ -152,23 +158,24 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
152
158
|
sdk.groupChannel.addGroupChannelHandler(sdkChannelHandlerId, ChannelHandler);
|
|
153
159
|
};
|
|
154
160
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
161
|
+
const createChannelListQuery = _ref2 => {
|
|
162
|
+
let {
|
|
163
|
+
sdk,
|
|
164
|
+
userFilledChannelListQuery = {}
|
|
165
|
+
} = _ref2;
|
|
166
|
+
const param = {};
|
|
160
167
|
param.includeEmpty = false;
|
|
161
168
|
param.limit = 20; // The value of pagination limit could be set up to 100.
|
|
162
169
|
|
|
163
170
|
param.order = 'latest_last_message'; // 'chronological', 'latest_last_message', 'channel_name_alphabetical', and 'metadata_value_alphabetical'
|
|
164
171
|
|
|
165
172
|
if (userFilledChannelListQuery) {
|
|
166
|
-
Object.keys(userFilledChannelListQuery).forEach(
|
|
173
|
+
Object.keys(userFilledChannelListQuery).forEach(key => {
|
|
167
174
|
param[key] = userFilledChannelListQuery[key];
|
|
168
175
|
});
|
|
169
176
|
}
|
|
170
177
|
|
|
171
|
-
|
|
178
|
+
const channelListQuery = sdk.groupChannel.createMyGroupChannelListQuery(param);
|
|
172
179
|
return channelListQuery;
|
|
173
180
|
};
|
|
174
181
|
/**
|
|
@@ -179,34 +186,36 @@ var createChannelListQuery = function createChannelListQuery(_ref2) {
|
|
|
179
186
|
|
|
180
187
|
|
|
181
188
|
function setupChannelList(_ref3) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
let {
|
|
190
|
+
sdk,
|
|
191
|
+
sdkChannelHandlerId,
|
|
192
|
+
channelListDispatcher,
|
|
193
|
+
setChannelSource,
|
|
194
|
+
onChannelSelect,
|
|
195
|
+
userFilledChannelListQuery,
|
|
196
|
+
logger,
|
|
197
|
+
sortChannelList,
|
|
198
|
+
disableAutoSelect,
|
|
199
|
+
setChannelsToMarkAsRead
|
|
200
|
+
} = _ref3;
|
|
192
201
|
|
|
193
202
|
if (sdk !== null && sdk !== void 0 && sdk.groupChannel) {
|
|
194
203
|
createEventHandler({
|
|
195
|
-
sdk
|
|
196
|
-
channelListDispatcher
|
|
197
|
-
sdkChannelHandlerId
|
|
198
|
-
logger
|
|
204
|
+
sdk,
|
|
205
|
+
channelListDispatcher,
|
|
206
|
+
sdkChannelHandlerId,
|
|
207
|
+
logger
|
|
199
208
|
});
|
|
200
209
|
} else {
|
|
201
210
|
logger.warning('ChannelList - createEventHandler: sdk or sdk.ChannelHandler does not exist', sdk);
|
|
202
211
|
}
|
|
203
212
|
|
|
204
213
|
logger.info('ChannelList - creating query', {
|
|
205
|
-
userFilledChannelListQuery
|
|
214
|
+
userFilledChannelListQuery
|
|
206
215
|
});
|
|
207
|
-
|
|
208
|
-
sdk
|
|
209
|
-
userFilledChannelListQuery
|
|
216
|
+
const channelListQuery = createChannelListQuery({
|
|
217
|
+
sdk,
|
|
218
|
+
userFilledChannelListQuery
|
|
210
219
|
});
|
|
211
220
|
logger.info('ChannelList - created query', channelListQuery);
|
|
212
221
|
setChannelSource(channelListQuery);
|
|
@@ -219,7 +228,7 @@ function setupChannelList(_ref3) {
|
|
|
219
228
|
channelListDispatcher({
|
|
220
229
|
type: CHANNEL_LIST_PARAMS_UPDATED,
|
|
221
230
|
payload: {
|
|
222
|
-
channelListQuery
|
|
231
|
+
channelListQuery,
|
|
223
232
|
currentUserId: sdk && sdk.currentUser && sdk.currentUser.userId
|
|
224
233
|
}
|
|
225
234
|
});
|
|
@@ -228,13 +237,13 @@ function setupChannelList(_ref3) {
|
|
|
228
237
|
logger.info('ChannelList - fetching channels');
|
|
229
238
|
|
|
230
239
|
if (channelListQuery.hasNext) {
|
|
231
|
-
channelListQuery.next().then(
|
|
240
|
+
channelListQuery.next().then(channelList => {
|
|
232
241
|
var _sdk$appInfo, _sdk$appInfo$premiumF;
|
|
233
242
|
|
|
234
243
|
logger.info('ChannelList - fetched channels', channelList); // select first channel
|
|
235
244
|
|
|
236
245
|
logger.info('ChannelList - highlight channel', channelList[0]);
|
|
237
|
-
|
|
246
|
+
let sortedChannelList = channelList;
|
|
238
247
|
|
|
239
248
|
if (sortChannelList && typeof sortChannelList === 'function') {
|
|
240
249
|
sortedChannelList = sortChannelList(channelList);
|
|
@@ -249,17 +258,15 @@ function setupChannelList(_ref3) {
|
|
|
249
258
|
type: INIT_CHANNELS_SUCCESS,
|
|
250
259
|
payload: {
|
|
251
260
|
channelList: sortedChannelList,
|
|
252
|
-
disableAutoSelect
|
|
261
|
+
disableAutoSelect
|
|
253
262
|
}
|
|
254
263
|
});
|
|
255
|
-
|
|
256
|
-
return feature === DELIVERY_RECIPT;
|
|
257
|
-
});
|
|
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);
|
|
258
265
|
|
|
259
266
|
if (canSetMarkAsDelivered) {
|
|
260
267
|
setChannelsToMarkAsRead(sortedChannelList);
|
|
261
268
|
}
|
|
262
|
-
}).catch(
|
|
269
|
+
}).catch(err => {
|
|
263
270
|
if (err) {
|
|
264
271
|
logger.error('ChannelList - couldnt fetch channels', err);
|
|
265
272
|
channelListDispatcher({
|
|
@@ -272,30 +279,34 @@ function setupChannelList(_ref3) {
|
|
|
272
279
|
}
|
|
273
280
|
}
|
|
274
281
|
|
|
275
|
-
|
|
276
|
-
subscriber.forEach(
|
|
282
|
+
const pubSubHandleRemover = subscriber => {
|
|
283
|
+
subscriber.forEach(s => {
|
|
277
284
|
try {
|
|
278
285
|
s.remove();
|
|
279
286
|
} catch (_unused) {//
|
|
280
287
|
}
|
|
281
288
|
});
|
|
282
289
|
};
|
|
283
|
-
|
|
284
|
-
|
|
290
|
+
const pubSubHandler = (pubSub, channelListDispatcher) => {
|
|
291
|
+
const subscriber = new Map();
|
|
285
292
|
if (!pubSub) return subscriber;
|
|
286
|
-
subscriber.set(CREATE_CHANNEL$1, pubSub.subscribe(CREATE_CHANNEL$1,
|
|
287
|
-
|
|
293
|
+
subscriber.set(CREATE_CHANNEL$1, pubSub.subscribe(CREATE_CHANNEL$1, msg => {
|
|
294
|
+
const {
|
|
295
|
+
channel
|
|
296
|
+
} = msg;
|
|
288
297
|
channelListDispatcher({
|
|
289
298
|
type: 'CREATE_CHANNEL',
|
|
290
299
|
payload: channel
|
|
291
300
|
});
|
|
292
301
|
}));
|
|
293
|
-
subscriber.set(UPDATE_USER_MESSAGE, pubSub.subscribe(UPDATE_USER_MESSAGE,
|
|
302
|
+
subscriber.set(UPDATE_USER_MESSAGE, pubSub.subscribe(UPDATE_USER_MESSAGE, msg => {
|
|
294
303
|
var _updatedChannel$lastM;
|
|
295
304
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
305
|
+
const {
|
|
306
|
+
channel,
|
|
307
|
+
message
|
|
308
|
+
} = msg;
|
|
309
|
+
const updatedChannel = channel;
|
|
299
310
|
|
|
300
311
|
if ((updatedChannel === null || updatedChannel === void 0 ? void 0 : (_updatedChannel$lastM = updatedChannel.lastMessage) === null || _updatedChannel$lastM === void 0 ? void 0 : _updatedChannel$lastM.messageId) === message.messageId) {
|
|
301
312
|
updatedChannel.lastMessage = message;
|
|
@@ -308,15 +319,19 @@ var pubSubHandler = function pubSubHandler(pubSub, channelListDispatcher) {
|
|
|
308
319
|
});
|
|
309
320
|
}
|
|
310
321
|
}));
|
|
311
|
-
subscriber.set(LEAVE_CHANNEL, pubSub.subscribe(LEAVE_CHANNEL,
|
|
312
|
-
|
|
322
|
+
subscriber.set(LEAVE_CHANNEL, pubSub.subscribe(LEAVE_CHANNEL, msg => {
|
|
323
|
+
const {
|
|
324
|
+
channel
|
|
325
|
+
} = msg;
|
|
313
326
|
channelListDispatcher({
|
|
314
327
|
type: LEAVE_CHANNEL_SUCCESS,
|
|
315
328
|
payload: channel === null || channel === void 0 ? void 0 : channel.url
|
|
316
329
|
});
|
|
317
330
|
}));
|
|
318
|
-
subscriber.set(SEND_MESSAGE_START, pubSub.subscribe(SEND_MESSAGE_START,
|
|
319
|
-
|
|
331
|
+
subscriber.set(SEND_MESSAGE_START, pubSub.subscribe(SEND_MESSAGE_START, msg => {
|
|
332
|
+
const {
|
|
333
|
+
channel
|
|
334
|
+
} = msg;
|
|
320
335
|
channelListDispatcher({
|
|
321
336
|
type: CHANNEL_REPLACED_TO_TOP,
|
|
322
337
|
payload: channel
|
|
@@ -349,37 +364,36 @@ function reducer(state, action) {
|
|
|
349
364
|
|
|
350
365
|
case INIT_CHANNELS_SUCCESS:
|
|
351
366
|
{
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
367
|
+
const {
|
|
368
|
+
channelList,
|
|
369
|
+
disableAutoSelect
|
|
370
|
+
} = action.payload;
|
|
355
371
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
356
372
|
initialized: true,
|
|
357
373
|
loading: false,
|
|
358
374
|
allChannels: channelList,
|
|
359
|
-
disableAutoSelect
|
|
375
|
+
disableAutoSelect,
|
|
360
376
|
currentChannel: !disableAutoSelect && channelList && channelList.length && channelList.length > 0 ? channelList[0] : null
|
|
361
377
|
});
|
|
362
378
|
}
|
|
363
379
|
|
|
364
380
|
case FETCH_CHANNELS_SUCCESS:
|
|
365
381
|
{
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
return !currentChannels.find(
|
|
372
|
-
return c === url;
|
|
373
|
-
});
|
|
382
|
+
const currentChannels = state.allChannels.map(c => c.url);
|
|
383
|
+
const filteredChannels = action.payload.filter(_ref => {
|
|
384
|
+
let {
|
|
385
|
+
url
|
|
386
|
+
} = _ref;
|
|
387
|
+
return !currentChannels.find(c => c === url);
|
|
374
388
|
});
|
|
375
389
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
376
|
-
allChannels: [
|
|
390
|
+
allChannels: [...state.allChannels, ...filteredChannels]
|
|
377
391
|
});
|
|
378
392
|
}
|
|
379
393
|
|
|
380
394
|
case CREATE_CHANNEL:
|
|
381
395
|
{
|
|
382
|
-
|
|
396
|
+
const channel = action.payload;
|
|
383
397
|
|
|
384
398
|
if (state.channelListQuery) {
|
|
385
399
|
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
@@ -394,9 +408,7 @@ function reducer(state, action) {
|
|
|
394
408
|
}
|
|
395
409
|
|
|
396
410
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
397
|
-
allChannels: [channel
|
|
398
|
-
return ch.url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
399
|
-
}))),
|
|
411
|
+
allChannels: [channel, ...state.allChannels.filter(ch => ch.url !== (channel === null || channel === void 0 ? void 0 : channel.url))],
|
|
400
412
|
currentChannel: channel
|
|
401
413
|
});
|
|
402
414
|
}
|
|
@@ -405,21 +417,23 @@ function reducer(state, action) {
|
|
|
405
417
|
{
|
|
406
418
|
var _state$currentChannel;
|
|
407
419
|
|
|
408
|
-
|
|
420
|
+
const channel = action.payload;
|
|
409
421
|
|
|
410
422
|
if (state.channelListQuery) {
|
|
411
|
-
if (filterChannelListParams(state.channelListQuery,
|
|
423
|
+
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
412
424
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
413
|
-
allChannels: getChannelsWithUpsertedChannel(state.allChannels,
|
|
425
|
+
allChannels: getChannelsWithUpsertedChannel(state.allChannels, channel)
|
|
414
426
|
}); // TODO: Check if we have to set current channel
|
|
415
427
|
}
|
|
416
428
|
}
|
|
417
429
|
|
|
418
|
-
|
|
430
|
+
const nextChannel = (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel = state.currentChannel) === null || _state$currentChannel === void 0 ? void 0 : _state$currentChannel.url) ? state.allChannels[state.allChannels[0].url === (channel === null || channel === void 0 ? void 0 : channel.url) ? 1 : 0] : state.currentChannel;
|
|
419
431
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
420
|
-
allChannels: state.allChannels.filter(
|
|
421
|
-
|
|
422
|
-
|
|
432
|
+
allChannels: state.allChannels.filter(_ref2 => {
|
|
433
|
+
let {
|
|
434
|
+
url
|
|
435
|
+
} = _ref2;
|
|
436
|
+
return url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
423
437
|
}),
|
|
424
438
|
currentChannel: state.disableAutoSelect ? null : nextChannel
|
|
425
439
|
});
|
|
@@ -430,11 +444,13 @@ function reducer(state, action) {
|
|
|
430
444
|
{
|
|
431
445
|
var _state$currentChannel2;
|
|
432
446
|
|
|
433
|
-
|
|
447
|
+
const channelUrl = action.payload;
|
|
434
448
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
435
449
|
currentChannel: channelUrl === ((_state$currentChannel2 = state.currentChannel) === null || _state$currentChannel2 === void 0 ? void 0 : _state$currentChannel2.url) ? state.allChannels[0] : state.currentChannel,
|
|
436
|
-
allChannels: state.allChannels.filter(
|
|
437
|
-
|
|
450
|
+
allChannels: state.allChannels.filter(_ref3 => {
|
|
451
|
+
let {
|
|
452
|
+
url
|
|
453
|
+
} = _ref3;
|
|
438
454
|
return url !== channelUrl;
|
|
439
455
|
})
|
|
440
456
|
});
|
|
@@ -444,46 +460,42 @@ function reducer(state, action) {
|
|
|
444
460
|
{
|
|
445
461
|
var _state$currentChannel5;
|
|
446
462
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
463
|
+
const {
|
|
464
|
+
channel,
|
|
465
|
+
isMe
|
|
466
|
+
} = action.payload;
|
|
450
467
|
|
|
451
468
|
if (state.channelListQuery) {
|
|
452
469
|
var _state$currentChannel4;
|
|
453
470
|
|
|
454
|
-
if (filterChannelListParams(state.channelListQuery,
|
|
471
|
+
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
455
472
|
var _state$currentChannel3;
|
|
456
473
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
var _nextChannel3 = isMe && (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url) === ((_state$currentChannel3 = state.currentChannel) === null || _state$currentChannel3 === void 0 ? void 0 : _state$currentChannel3.url) ? _filteredChannels2[0] : state.currentChannel;
|
|
460
|
-
|
|
474
|
+
const filteredChannels = getChannelsWithUpsertedChannel(state.allChannels, channel);
|
|
475
|
+
const nextChannel = isMe && (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel3 = state.currentChannel) === null || _state$currentChannel3 === void 0 ? void 0 : _state$currentChannel3.url) ? filteredChannels[0] : state.currentChannel;
|
|
461
476
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
462
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
463
|
-
allChannels:
|
|
477
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel,
|
|
478
|
+
allChannels: filteredChannels
|
|
464
479
|
});
|
|
465
480
|
}
|
|
466
481
|
|
|
467
|
-
|
|
468
|
-
|
|
482
|
+
const nextChannel = (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel4 = state.currentChannel) === null || _state$currentChannel4 === void 0 ? void 0 : _state$currentChannel4.url) ? state.allChannels[0] : state.currentChannel;
|
|
469
483
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
470
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
471
|
-
allChannels: state.allChannels.filter(
|
|
472
|
-
|
|
473
|
-
|
|
484
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel,
|
|
485
|
+
allChannels: state.allChannels.filter(_ref4 => {
|
|
486
|
+
let {
|
|
487
|
+
url
|
|
488
|
+
} = _ref4;
|
|
489
|
+
return url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
474
490
|
})
|
|
475
491
|
});
|
|
476
492
|
}
|
|
477
493
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
});
|
|
481
|
-
|
|
482
|
-
var _nextChannel = isMe && (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url) === ((_state$currentChannel5 = state.currentChannel) === null || _state$currentChannel5 === void 0 ? void 0 : _state$currentChannel5.url) ? _filteredChannels[0] : state.currentChannel;
|
|
483
|
-
|
|
494
|
+
const filteredChannels = state.allChannels.filter(c => !(c.url === (channel === null || channel === void 0 ? void 0 : channel.url) && isMe));
|
|
495
|
+
const nextChannel = isMe && (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel5 = state.currentChannel) === null || _state$currentChannel5 === void 0 ? void 0 : _state$currentChannel5.url) ? filteredChannels[0] : state.currentChannel;
|
|
484
496
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
485
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
486
|
-
allChannels:
|
|
497
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel,
|
|
498
|
+
allChannels: filteredChannels
|
|
487
499
|
});
|
|
488
500
|
}
|
|
489
501
|
|
|
@@ -492,55 +504,61 @@ function reducer(state, action) {
|
|
|
492
504
|
case ON_READ_RECEIPT_UPDATED:
|
|
493
505
|
case ON_DELIVERY_RECEIPT_UPDATED:
|
|
494
506
|
{
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
507
|
+
const {
|
|
508
|
+
allChannels = []
|
|
509
|
+
} = state;
|
|
510
|
+
const channel = action.payload;
|
|
511
|
+
const {
|
|
512
|
+
unreadMessageCount
|
|
513
|
+
} = channel;
|
|
514
|
+
if (!(channel !== null && channel !== void 0 && channel.lastMessage)) return state;
|
|
500
515
|
|
|
501
516
|
if (state.channelListQuery) {
|
|
502
517
|
var _state$currentChannel6;
|
|
503
518
|
|
|
504
|
-
if (filterChannelListParams(state.channelListQuery,
|
|
519
|
+
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
505
520
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
506
|
-
allChannels: getChannelsWithUpsertedChannel(allChannels,
|
|
521
|
+
allChannels: getChannelsWithUpsertedChannel(allChannels, channel)
|
|
507
522
|
});
|
|
508
523
|
}
|
|
509
524
|
|
|
510
|
-
|
|
525
|
+
const nextChannel = (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel6 = state.currentChannel) === null || _state$currentChannel6 === void 0 ? void 0 : _state$currentChannel6.url) ? state.allChannels[state.allChannels[0].url === (channel === null || channel === void 0 ? void 0 : channel.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
511
526
|
: state.currentChannel;
|
|
512
|
-
|
|
513
527
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
514
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
515
|
-
allChannels: state.allChannels.filter(
|
|
516
|
-
|
|
517
|
-
|
|
528
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel,
|
|
529
|
+
allChannels: state.allChannels.filter(_ref5 => {
|
|
530
|
+
let {
|
|
531
|
+
url
|
|
532
|
+
} = _ref5;
|
|
533
|
+
return url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
518
534
|
})
|
|
519
535
|
});
|
|
520
536
|
} // if its only an unread message count change, dont push to top
|
|
521
537
|
|
|
522
538
|
|
|
523
539
|
if (unreadMessageCount === 0) {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
540
|
+
const currentChannel = allChannels.find(_ref6 => {
|
|
541
|
+
let {
|
|
542
|
+
url
|
|
543
|
+
} = _ref6;
|
|
544
|
+
return url === (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
527
545
|
});
|
|
528
|
-
|
|
546
|
+
const currentUnreadCount = currentChannel && currentChannel.unreadMessageCount;
|
|
529
547
|
|
|
530
548
|
if (currentUnreadCount === 0) {
|
|
531
549
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
532
|
-
allChannels: state.allChannels.map(
|
|
533
|
-
return ch.url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url) ? _channel3 : ch;
|
|
534
|
-
})
|
|
550
|
+
allChannels: state.allChannels.map(ch => ch.url === (channel === null || channel === void 0 ? void 0 : channel.url) ? channel : ch)
|
|
535
551
|
});
|
|
536
552
|
}
|
|
537
553
|
}
|
|
538
554
|
|
|
539
555
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
540
|
-
allChannels: [
|
|
541
|
-
|
|
556
|
+
allChannels: [channel, ...state.allChannels.filter(_ref7 => {
|
|
557
|
+
let {
|
|
558
|
+
url
|
|
559
|
+
} = _ref7;
|
|
542
560
|
return url !== action.payload.url;
|
|
543
|
-
})
|
|
561
|
+
})]
|
|
544
562
|
});
|
|
545
563
|
}
|
|
546
564
|
|
|
@@ -562,40 +580,39 @@ function reducer(state, action) {
|
|
|
562
580
|
case ON_LAST_MESSAGE_UPDATED:
|
|
563
581
|
{
|
|
564
582
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
565
|
-
allChannels: state.allChannels.map(
|
|
566
|
-
return (channel === null || channel === void 0 ? void 0 : channel.url) === action.payload.url ? action.payload : channel;
|
|
567
|
-
})
|
|
583
|
+
allChannels: state.allChannels.map(channel => (channel === null || channel === void 0 ? void 0 : channel.url) === action.payload.url ? action.payload : channel)
|
|
568
584
|
});
|
|
569
585
|
}
|
|
570
586
|
|
|
571
587
|
case ON_CHANNEL_FROZEN:
|
|
572
588
|
{
|
|
573
|
-
|
|
589
|
+
const channel = action.payload;
|
|
574
590
|
|
|
575
591
|
if (state.channelListQuery) {
|
|
576
592
|
var _state$currentChannel7;
|
|
577
593
|
|
|
578
|
-
if (filterChannelListParams(state.channelListQuery,
|
|
594
|
+
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
579
595
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
580
|
-
allChannels: getChannelsWithUpsertedChannel(state.allChannels,
|
|
596
|
+
allChannels: getChannelsWithUpsertedChannel(state.allChannels, channel)
|
|
581
597
|
});
|
|
582
598
|
}
|
|
583
599
|
|
|
584
|
-
|
|
600
|
+
const nextChannel = (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel7 = state.currentChannel) === null || _state$currentChannel7 === void 0 ? void 0 : _state$currentChannel7.url) ? state.allChannels[state.allChannels[0].url === (channel === null || channel === void 0 ? void 0 : channel.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
585
601
|
: state.currentChannel;
|
|
586
|
-
|
|
587
602
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
588
|
-
allChannels: state.allChannels.filter(
|
|
589
|
-
|
|
590
|
-
|
|
603
|
+
allChannels: state.allChannels.filter(_ref8 => {
|
|
604
|
+
let {
|
|
605
|
+
url
|
|
606
|
+
} = _ref8;
|
|
607
|
+
return url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
591
608
|
}),
|
|
592
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
609
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel
|
|
593
610
|
});
|
|
594
611
|
}
|
|
595
612
|
|
|
596
613
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
597
|
-
allChannels: state.allChannels.map(
|
|
598
|
-
if (ch.url === (
|
|
614
|
+
allChannels: state.allChannels.map(ch => {
|
|
615
|
+
if (ch.url === (channel === null || channel === void 0 ? void 0 : channel.url)) {
|
|
599
616
|
// eslint-disable-next-line no-param-reassign
|
|
600
617
|
ch.isFrozen = true;
|
|
601
618
|
return ch;
|
|
@@ -608,32 +625,33 @@ function reducer(state, action) {
|
|
|
608
625
|
|
|
609
626
|
case ON_CHANNEL_UNFROZEN:
|
|
610
627
|
{
|
|
611
|
-
|
|
628
|
+
const channel = action.payload;
|
|
612
629
|
|
|
613
630
|
if (state.channelListQuery) {
|
|
614
631
|
var _state$currentChannel8;
|
|
615
632
|
|
|
616
|
-
if (filterChannelListParams(state.channelListQuery,
|
|
633
|
+
if (filterChannelListParams(state.channelListQuery, channel, state.currentUserId)) {
|
|
617
634
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
618
|
-
allChannels: getChannelsWithUpsertedChannel(state.allChannels,
|
|
635
|
+
allChannels: getChannelsWithUpsertedChannel(state.allChannels, channel)
|
|
619
636
|
});
|
|
620
637
|
}
|
|
621
638
|
|
|
622
|
-
|
|
639
|
+
const nextChannel = (channel === null || channel === void 0 ? void 0 : channel.url) === ((_state$currentChannel8 = state.currentChannel) === null || _state$currentChannel8 === void 0 ? void 0 : _state$currentChannel8.url) ? state.allChannels[state.allChannels[0].url === (channel === null || channel === void 0 ? void 0 : channel.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
623
640
|
: state.currentChannel;
|
|
624
|
-
|
|
625
641
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
626
|
-
allChannels: state.allChannels.filter(
|
|
627
|
-
|
|
628
|
-
|
|
642
|
+
allChannels: state.allChannels.filter(_ref9 => {
|
|
643
|
+
let {
|
|
644
|
+
url
|
|
645
|
+
} = _ref9;
|
|
646
|
+
return url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
629
647
|
}),
|
|
630
|
-
currentChannel: state.disableAutoSelect ? null :
|
|
648
|
+
currentChannel: state.disableAutoSelect ? null : nextChannel
|
|
631
649
|
});
|
|
632
650
|
}
|
|
633
651
|
|
|
634
652
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
635
|
-
allChannels: state.allChannels.map(
|
|
636
|
-
if (ch.url === (
|
|
653
|
+
allChannels: state.allChannels.map(ch => {
|
|
654
|
+
if (ch.url === (channel === null || channel === void 0 ? void 0 : channel.url)) {
|
|
637
655
|
// eslint-disable-next-line no-param-reassign
|
|
638
656
|
ch.isFrozen = false;
|
|
639
657
|
return ch;
|
|
@@ -647,9 +665,7 @@ function reducer(state, action) {
|
|
|
647
665
|
case CHANNEL_REPLACED_TO_TOP:
|
|
648
666
|
{
|
|
649
667
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
650
|
-
allChannels: [action.payload
|
|
651
|
-
return (channel === null || channel === void 0 ? void 0 : channel.url) !== action.payload.url;
|
|
652
|
-
})))
|
|
668
|
+
allChannels: [action.payload, ...state.allChannels.filter(channel => (channel === null || channel === void 0 ? void 0 : channel.url) !== action.payload.url)]
|
|
653
669
|
});
|
|
654
670
|
}
|
|
655
671
|
|
|
@@ -685,7 +701,7 @@ var ChannelListContext = /*#__PURE__*/React__default.createContext({
|
|
|
685
701
|
typingChannels: []
|
|
686
702
|
});
|
|
687
703
|
|
|
688
|
-
var ChannelListProvider = function
|
|
704
|
+
var ChannelListProvider = function (props) {
|
|
689
705
|
var _a; // destruct props
|
|
690
706
|
|
|
691
707
|
|
|
@@ -819,8 +835,8 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
819
835
|
|
|
820
836
|
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.addGroupChannelHandler) {
|
|
821
837
|
typingHandlerId = uuidv4();
|
|
822
|
-
var handler = new
|
|
823
|
-
onTypingStatusUpdated: function
|
|
838
|
+
var handler = new Jr({
|
|
839
|
+
onTypingStatusUpdated: function (channel) {
|
|
824
840
|
var _a;
|
|
825
841
|
|
|
826
842
|
var typingMemberCount = (_a = channel === null || channel === void 0 ? void 0 : channel.getTypingUsers()) === null || _a === void 0 ? void 0 : _a.length;
|
|
@@ -834,19 +850,19 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
834
850
|
setTypingChannels(channelList);
|
|
835
851
|
}
|
|
836
852
|
},
|
|
837
|
-
onUnreadMemberStatusUpdated: function
|
|
853
|
+
onUnreadMemberStatusUpdated: function (channel) {
|
|
838
854
|
channelListDispatcher({
|
|
839
855
|
type: ON_LAST_MESSAGE_UPDATED,
|
|
840
856
|
payload: channel
|
|
841
857
|
});
|
|
842
858
|
},
|
|
843
|
-
onUndeliveredMemberStatusUpdated: function
|
|
859
|
+
onUndeliveredMemberStatusUpdated: function (channel) {
|
|
844
860
|
channelListDispatcher({
|
|
845
861
|
type: ON_LAST_MESSAGE_UPDATED,
|
|
846
862
|
payload: channel
|
|
847
863
|
});
|
|
848
864
|
},
|
|
849
|
-
onMessageUpdated: function
|
|
865
|
+
onMessageUpdated: function (channel) {
|
|
850
866
|
channelListDispatcher({
|
|
851
867
|
type: ON_LAST_MESSAGE_UPDATED,
|
|
852
868
|
payload: channel
|
|
@@ -858,7 +874,7 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
858
874
|
});
|
|
859
875
|
});
|
|
860
876
|
},
|
|
861
|
-
onMentionReceived: function
|
|
877
|
+
onMentionReceived: function (channel) {
|
|
862
878
|
channelListDispatcher({
|
|
863
879
|
type: ON_LAST_MESSAGE_UPDATED,
|
|
864
880
|
payload: channel
|
|
@@ -952,4 +968,4 @@ function useChannelListContext() {
|
|
|
952
968
|
}
|
|
953
969
|
|
|
954
970
|
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 };
|
|
955
|
-
//# sourceMappingURL=ChannelListProvider-
|
|
971
|
+
//# sourceMappingURL=ChannelListProvider-368bd7f1.js.map
|