@sendbird/uikit-react 3.0.0-beta.6 → 3.0.0-rc.2
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 +47 -46
- package/App.js.map +1 -1
- package/CHANGELOG.md +107 -0
- package/Channel/components/ChannelHeader.js +25 -21
- package/Channel/components/ChannelHeader.js.map +1 -1
- package/Channel/components/ChannelUI.js +29 -28
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +18 -16
- package/Channel/components/FileViewer.js.map +1 -1
- package/Channel/components/FrozenNotification.js +5 -5
- package/Channel/components/Message.js +31 -28
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +21 -20
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageList.js +31 -30
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +21 -19
- package/Channel/components/RemoveMessageModal.js.map +1 -1
- package/Channel/components/SuggestedMentionList.js +43 -38
- package/Channel/components/SuggestedMentionList.js.map +1 -1
- package/Channel/components/TypingIndicator.js +37 -33
- package/Channel/components/TypingIndicator.js.map +1 -1
- package/Channel/components/UnreadCount.js +6 -6
- package/Channel/components/UnreadCount.js.map +1 -1
- package/Channel/context.js +16 -14
- package/Channel/context.js.map +1 -1
- package/Channel.js +29 -28
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +17 -17
- package/ChannelList/components/ChannelListHeader.js +8 -8
- package/ChannelList/components/ChannelListUI.js +44 -45
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +36 -32
- package/ChannelList/components/ChannelPreview.js.map +1 -1
- package/ChannelList/components/ChannelPreviewAction.js +18 -16
- package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/ChannelList/context.js +11 -9
- package/ChannelList/context.js.map +1 -1
- package/ChannelList.js +31 -29
- package/ChannelList.js.map +1 -1
- package/{ChannelListProvider-737ee36f.js → ChannelListProvider-fec439b3.js} +219 -198
- package/ChannelListProvider-fec439b3.js.map +1 -0
- package/{ChannelProvider-34834493.js → ChannelProvider-1f56082e.js} +380 -419
- package/ChannelProvider-1f56082e.js.map +1 -0
- package/ChannelSettings/components/ChannelProfile.js +17 -17
- package/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/ChannelSettings/components/ChannelSettingsUI.js +24 -24
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +23 -19
- package/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/ChannelSettings/components/LeaveChannel.js +14 -14
- package/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/ChannelSettings/components/{AdminPanel.js → ModerationPanel.js} +88 -142
- package/ChannelSettings/components/ModerationPanel.js.map +1 -0
- package/ChannelSettings/components/UserListItem.js +19 -18
- package/ChannelSettings/components/UserListItem.js.map +1 -1
- package/ChannelSettings/components/UserPanel.js +20 -20
- package/ChannelSettings/components/UserPanel.js.map +1 -1
- package/ChannelSettings/context.js +11 -11
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +21 -21
- package/CreateChannel/components/CreateChannelUI.js +18 -18
- package/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/CreateChannel/components/{InviteMembers.js → InviteUsers.js} +24 -28
- package/CreateChannel/components/InviteUsers.js.map +1 -0
- package/CreateChannel/components/SelectChannelType.js +13 -13
- package/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/CreateChannel/context.js +6 -5
- package/CreateChannel/context.js.map +1 -1
- package/CreateChannel.js +17 -17
- package/{CreateChannelProvider-3d3e4a7c.js → CreateChannelProvider-2746c280.js} +3 -3
- package/CreateChannelProvider-2746c280.js.map +1 -0
- package/EditUserProfile/components/EditUserProfileUI.js +14 -14
- package/EditUserProfile/context.js +2 -2
- package/EditUserProfile/context.js.map +1 -1
- package/EditUserProfile.js +14 -14
- package/LICENSE +21 -0
- package/{LocalizationContext-5b0a9339.js → LocalizationContext-3dbcc9d8.js} +3 -3
- package/{LocalizationContext-5b0a9339.js.map → LocalizationContext-3dbcc9d8.js.map} +1 -1
- package/{MemberList-6e33a562.js → MemberList-f1c78686.js} +47 -68
- package/MemberList-f1c78686.js.map +1 -0
- package/MessageSearch/components/MessageSearchUI.js +16 -16
- package/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/MessageSearch/context.js +56 -61
- package/MessageSearch/context.js.map +1 -1
- package/MessageSearch.js +22 -22
- package/MessageSearch.js.map +1 -1
- package/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/OpenChannel/components/OpenChannelHeader.js +17 -15
- package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/OpenChannel/components/OpenChannelInput.js +20 -19
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +44 -40
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +38 -38
- package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/OpenChannel/components/OpenChannelUI.js +28 -27
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +12 -10
- package/OpenChannel/context.js.map +1 -1
- package/OpenChannel.js +28 -27
- package/OpenChannel.js.map +1 -1
- package/{OpenChannelProvider-9ef0d52a.js → OpenChannelProvider-5ecafbb1.js} +629 -694
- package/OpenChannelProvider-5ecafbb1.js.map +1 -0
- package/OpenChannelSettings/components/EditDetailsModal.js +30 -36
- 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 +39 -23
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +46 -31
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +30 -57
- package/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
- package/OpenChannelSettings/context.js +16 -16
- package/OpenChannelSettings/context.js.map +1 -1
- package/OpenChannelSettings.js +19 -19
- package/README.md +128 -0
- package/SendbirdProvider.js +43 -38
- package/SendbirdProvider.js.map +1 -1
- package/{UserProfileContext-b6d89d0d.js → UserProfileContext-f0ef00c0.js} +1 -1
- package/{UserProfileContext-b6d89d0d.js.map → UserProfileContext-f0ef00c0.js.map} +1 -1
- package/__bundle-7dfccc8c-c503198e.js +24 -0
- package/__bundle-7dfccc8c-c503198e.js.map +1 -0
- package/{_rollupPluginBabelHelpers-d10f91b9.js → _rollupPluginBabelHelpers-8ba74698.js} +1 -1
- package/{_rollupPluginBabelHelpers-d10f91b9.js.map → _rollupPluginBabelHelpers-8ba74698.js.map} +1 -1
- package/{actionTypes-17920f59.js → actionTypes-1444365b.js} +1 -1
- package/{actionTypes-17920f59.js.map → actionTypes-1444365b.js.map} +1 -1
- package/cjs/App.js +47 -46
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +25 -21
- package/cjs/Channel/components/ChannelHeader.js.map +1 -1
- package/cjs/Channel/components/ChannelUI.js +29 -28
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +18 -16
- package/cjs/Channel/components/FileViewer.js.map +1 -1
- package/cjs/Channel/components/FrozenNotification.js +5 -5
- package/cjs/Channel/components/Message.js +31 -28
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +21 -20
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +31 -30
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +21 -19
- package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
- package/cjs/Channel/components/SuggestedMentionList.js +43 -38
- package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
- package/cjs/Channel/components/TypingIndicator.js +37 -33
- package/cjs/Channel/components/TypingIndicator.js.map +1 -1
- package/cjs/Channel/components/UnreadCount.js +6 -6
- package/cjs/Channel/components/UnreadCount.js.map +1 -1
- package/cjs/Channel/context.js +17 -15
- package/cjs/Channel/context.js.map +1 -1
- package/cjs/Channel.js +29 -28
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +17 -17
- package/cjs/ChannelList/components/ChannelListHeader.js +8 -8
- package/cjs/ChannelList/components/ChannelListUI.js +44 -45
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +36 -32
- package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreviewAction.js +18 -16
- package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/cjs/ChannelList/context.js +11 -10
- package/cjs/ChannelList/context.js.map +1 -1
- package/cjs/ChannelList.js +31 -29
- package/cjs/ChannelList.js.map +1 -1
- package/cjs/{ChannelListProvider-f910e236.js → ChannelListProvider-94d4c78c.js} +218 -198
- package/cjs/ChannelListProvider-94d4c78c.js.map +1 -0
- package/cjs/{ChannelProvider-86e2e68c.js → ChannelProvider-190bd453.js} +380 -419
- package/cjs/ChannelProvider-190bd453.js.map +1 -0
- package/cjs/ChannelSettings/components/ChannelProfile.js +16 -16
- package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +23 -23
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +22 -18
- package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/ChannelSettings/components/LeaveChannel.js +13 -13
- package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/cjs/ChannelSettings/components/{AdminPanel.js → ModerationPanel.js} +87 -141
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -0
- package/cjs/ChannelSettings/components/UserListItem.js +19 -18
- package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
- package/cjs/ChannelSettings/components/UserPanel.js +19 -19
- package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
- package/cjs/ChannelSettings/context.js +11 -11
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +21 -21
- package/cjs/CreateChannel/components/CreateChannelUI.js +18 -18
- package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/cjs/CreateChannel/components/{InviteMembers.js → InviteUsers.js} +24 -28
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -0
- package/cjs/CreateChannel/components/SelectChannelType.js +13 -13
- package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/cjs/CreateChannel/context.js +6 -5
- package/cjs/CreateChannel/context.js.map +1 -1
- package/cjs/CreateChannel.js +17 -17
- package/cjs/{CreateChannelProvider-07992a6d.js → CreateChannelProvider-9fa1d794.js} +3 -3
- package/cjs/CreateChannelProvider-9fa1d794.js.map +1 -0
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +14 -14
- package/cjs/EditUserProfile/context.js +2 -2
- package/cjs/EditUserProfile/context.js.map +1 -1
- package/cjs/EditUserProfile.js +14 -14
- package/cjs/{LocalizationContext-79514649.js → LocalizationContext-65b97b58.js} +3 -3
- package/cjs/{LocalizationContext-79514649.js.map → LocalizationContext-65b97b58.js.map} +1 -1
- package/cjs/{MemberList-015c1075.js → MemberList-3e3448b2.js} +46 -67
- package/cjs/MemberList-3e3448b2.js.map +1 -0
- package/cjs/MessageSearch/components/MessageSearchUI.js +15 -15
- package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/cjs/MessageSearch/context.js +56 -61
- package/cjs/MessageSearch/context.js.map +1 -1
- package/cjs/MessageSearch.js +22 -22
- package/cjs/MessageSearch.js.map +1 -1
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/cjs/OpenChannel/components/OpenChannelHeader.js +17 -15
- package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelInput.js +20 -19
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +44 -40
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +38 -38
- package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelUI.js +28 -27
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +13 -11
- package/cjs/OpenChannel/context.js.map +1 -1
- package/cjs/OpenChannel.js +28 -27
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/{OpenChannelProvider-445f214c.js → OpenChannelProvider-5c81bdb4.js} +629 -694
- package/cjs/OpenChannelProvider-5c81bdb4.js.map +1 -0
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +29 -35
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +15 -15
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +38 -22
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +43 -28
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +29 -56
- package/cjs/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
- package/cjs/OpenChannelSettings/context.js +16 -16
- package/cjs/OpenChannelSettings/context.js.map +1 -1
- package/cjs/OpenChannelSettings.js +19 -19
- package/cjs/SendbirdProvider.js +44 -40
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/{UserProfileContext-12cfee31.js → UserProfileContext-9f3727c8.js} +1 -1
- package/cjs/{UserProfileContext-12cfee31.js.map → UserProfileContext-9f3727c8.js.map} +1 -1
- package/cjs/__bundle-7dfccc8c-d9262ff8.js +151 -0
- package/cjs/__bundle-7dfccc8c-d9262ff8.js.map +1 -0
- package/cjs/{_rollupPluginBabelHelpers-f802e0e8.js → _rollupPluginBabelHelpers-0d29c748.js} +1 -1
- package/cjs/{_rollupPluginBabelHelpers-f802e0e8.js.map → _rollupPluginBabelHelpers-0d29c748.js.map} +1 -1
- package/cjs/{actionTypes-93161807.js → actionTypes-5dc3015b.js} +1 -1
- package/cjs/{actionTypes-93161807.js.map → actionTypes-5dc3015b.js.map} +1 -1
- package/cjs/{color-c53ac792.js → color-51e4fff0.js} +1 -1
- package/cjs/{color-c53ac792.js.map → color-51e4fff0.js.map} +1 -1
- package/cjs/{compareIds-37e8380c.js → compareIds-7f5ab4de.js} +1 -1
- package/cjs/{compareIds-37e8380c.js.map → compareIds-7f5ab4de.js.map} +1 -1
- package/cjs/{const-3024c719.js → const-63ed85a4.js} +1 -1
- package/cjs/{const-3024c719.js.map → const-63ed85a4.js.map} +1 -1
- package/cjs/{const-489c46b6.js → const-ffda0b97.js} +1 -1
- package/cjs/{const-489c46b6.js.map → const-ffda0b97.js.map} +1 -1
- package/cjs/{context-961d5b11.js → context-0aa8e3f8.js} +2 -2
- package/cjs/{context-961d5b11.js.map → context-0aa8e3f8.js.map} +1 -1
- package/cjs/dist/index.css +169 -47
- package/cjs/dist/index.css.map +1 -1
- package/cjs/groupChannel-8023bd09.js +9 -0
- package/cjs/groupChannel-8023bd09.js.map +1 -0
- package/cjs/{index-07623c8b.js → index-119a7a34.js} +2 -2
- package/cjs/{index-07623c8b.js.map → index-119a7a34.js.map} +1 -1
- package/cjs/{index-5eaebc66.js → index-22c82558.js} +12 -9
- package/cjs/index-22c82558.js.map +1 -0
- package/cjs/{index-bc563d47.js → index-32f8310c.js} +32 -29
- package/cjs/index-32f8310c.js.map +1 -0
- package/cjs/{index-cb53adf5.js → index-481324b7.js} +2 -2
- package/cjs/{index-cb53adf5.js.map → index-481324b7.js.map} +1 -1
- package/cjs/{index-a20b40c4.js → index-574ef41e.js} +5 -5
- package/cjs/index-574ef41e.js.map +1 -0
- package/cjs/{index-2180f74f.js → index-7ef68704.js} +5 -5
- package/cjs/index-7ef68704.js.map +1 -0
- package/cjs/{index-d70ac86e.js → index-97c28907.js} +1 -1
- package/cjs/{index-d70ac86e.js.map → index-97c28907.js.map} +1 -1
- package/cjs/{index-5615eab4.js → index-a372cc51.js} +4 -4
- package/cjs/{index-5615eab4.js.map → index-a372cc51.js.map} +1 -1
- package/cjs/{index-d25a7cbf.js → index-a66b1af1.js} +4 -4
- package/cjs/{index-d25a7cbf.js.map → index-a66b1af1.js.map} +1 -1
- package/cjs/{index-0b2e2c2a.js → index-bf350acc.js} +1 -1
- package/cjs/{index-0b2e2c2a.js.map → index-bf350acc.js.map} +1 -1
- package/cjs/index.js +42 -41
- package/cjs/index.js.map +1 -1
- package/cjs/openChannel-146282ad.js +13 -0
- package/cjs/openChannel-146282ad.js.map +1 -0
- package/cjs/{openChannelUtils-7fb1abc6.js → openChannelUtils-6a8fb5bf.js} +10 -5
- package/cjs/openChannelUtils-6a8fb5bf.js.map +1 -0
- package/cjs/sendbirdSelectors.js +696 -0
- package/cjs/sendbirdSelectors.js.map +1 -0
- package/cjs/{stringSet-ae448472.js → stringSet-da976cc5.js} +1 -1
- package/cjs/{stringSet-ae448472.js.map → stringSet-da976cc5.js.map} +1 -1
- package/cjs/{topics-bdbff23e.js → topics-a595e22a.js} +1 -1
- package/cjs/{topics-bdbff23e.js.map → topics-a595e22a.js.map} +1 -1
- package/cjs/{tslib.es6-a7af7bb8.js → tslib.es6-4b76ba01.js} +1 -1
- package/cjs/{tslib.es6-a7af7bb8.js.map → tslib.es6-4b76ba01.js.map} +1 -1
- package/cjs/ui/Accordion.js +4 -4
- package/cjs/ui/AccordionGroup.js +2 -2
- package/cjs/ui/AccordionGroup.js.map +1 -1
- package/cjs/ui/AdminMessage.js +4 -3
- package/cjs/ui/AdminMessage.js.map +1 -1
- package/cjs/ui/Avatar.js +3 -3
- package/cjs/ui/Badge.js +5 -5
- package/cjs/ui/Button.js +4 -4
- package/cjs/ui/ChannelAvatar.js +8 -8
- package/cjs/ui/ChannelAvatar.js.map +1 -1
- package/cjs/ui/ChannelPreview.js +28 -21
- package/cjs/ui/ChannelPreview.js.map +1 -1
- package/cjs/ui/ChatHeader.js +19 -12
- package/cjs/ui/ChatHeader.js.map +1 -1
- package/cjs/ui/Checkbox.js +1 -1
- package/cjs/ui/ConnectionStatus.js +5 -5
- package/cjs/ui/ContextMenu.js +9 -30
- package/cjs/ui/ContextMenu.js.map +1 -1
- package/cjs/ui/DateSeparator.js +5 -5
- package/cjs/ui/DateSeparator.js.map +1 -1
- package/cjs/ui/Dropdown.js +3 -3
- package/cjs/ui/EmojiReactions.js +10 -10
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FileMessageItemBody.js +6 -6
- package/cjs/ui/FileMessageItemBody.js.map +1 -1
- package/cjs/ui/FileViewer.js +7 -7
- package/cjs/ui/Icon.js +5 -1
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +1 -1
- package/cjs/ui/ImageRenderer.js +1 -1
- package/cjs/ui/Input.js +3 -3
- package/cjs/ui/Label.js +3 -3
- package/cjs/ui/LinkLabel.js +3 -3
- package/cjs/ui/Loader.js +1 -1
- package/cjs/ui/MentionLabel.js +20 -18
- package/cjs/ui/MentionLabel.js.map +1 -1
- package/cjs/ui/MentionUserLabel.js +1 -1
- package/cjs/ui/MentionUserLabel.js.map +1 -1
- package/cjs/ui/MessageContent.js +53 -48
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput.js +5341 -14
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +14 -18
- package/cjs/ui/MessageItemMenu.js.map +1 -1
- package/cjs/ui/MessageItemReactionMenu.js +5 -5
- package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
- package/cjs/ui/MessageSearchFileItem.js +12 -11
- package/cjs/ui/MessageSearchFileItem.js.map +1 -1
- package/cjs/ui/MessageSearchItem.js +10 -10
- package/cjs/ui/MessageSearchItem.js.map +1 -1
- package/cjs/ui/MessageStatus.js +11 -11
- package/cjs/ui/MessageStatus.js.map +1 -1
- package/cjs/ui/Modal.js +8 -8
- package/cjs/ui/MutedAvatarOverlay.js +7 -7
- package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
- package/cjs/ui/OGMessageItemBody.js +18 -17
- package/cjs/ui/OGMessageItemBody.js.map +1 -1
- package/cjs/ui/OpenChannelAdminMessage.js +4 -4
- package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
- package/cjs/ui/OpenChannelAvatar.js +11 -11
- package/cjs/ui/OpenChannelAvatar.js.map +1 -1
- package/cjs/ui/OpenchannelConversationHeader.js +7 -7
- package/cjs/ui/OpenchannelFileMessage.js +17 -16
- package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
- package/cjs/ui/OpenchannelOGMessage.js +17 -16
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +18 -17
- package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/cjs/ui/OpenchannelUserMessage.js +18 -17
- package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
- package/cjs/ui/PlaceHolder.js +6 -6
- package/cjs/ui/QuoteMessage.js +24 -24
- package/cjs/ui/QuoteMessage.js.map +1 -1
- package/cjs/ui/QuoteMessageInput.js +11 -13
- package/cjs/ui/QuoteMessageInput.js.map +1 -1
- package/cjs/ui/ReactionBadge.js +3 -3
- package/cjs/ui/ReactionButton.js +1 -1
- package/cjs/ui/SortByRow.js +1 -1
- package/cjs/ui/TextButton.js +2 -2
- package/cjs/ui/TextMessageItemBody.js +17 -16
- package/cjs/ui/TextMessageItemBody.js.map +1 -1
- package/cjs/ui/ThumbnailMessageItemBody.js +3 -3
- package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/cjs/ui/Tooltip.js +3 -3
- package/cjs/ui/TooltipWrapper.js +1 -1
- package/cjs/ui/UnknownMessageItemBody.js +7 -7
- package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
- package/cjs/ui/UserListItem.js +14 -13
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +19 -18
- package/cjs/ui/UserProfile.js.map +1 -1
- package/cjs/{index-4e8b61f7.js → ui/Word.js} +31 -10
- package/cjs/ui/Word.js.map +1 -0
- package/cjs/useSendbirdStateContext.js +3 -3
- package/cjs/useSendbirdStateContext.js.map +1 -1
- package/cjs/{utils-03155980.js → utils-4d87243e.js} +8 -8
- package/cjs/utils-4d87243e.js.map +1 -0
- package/cjs/{utils-0d5ecf05.js → utils-52a504d9.js} +1 -1
- package/cjs/{utils-0d5ecf05.js.map → utils-52a504d9.js.map} +1 -1
- package/cjs/{utils-139469a5.js → utils-f0f90fdf.js} +1 -1
- package/cjs/{utils-139469a5.js.map → utils-f0f90fdf.js.map} +1 -1
- package/cjs/{uuid-03009a31.js → uuid-d0e513e8.js} +1 -1
- package/cjs/{uuid-03009a31.js.map → uuid-d0e513e8.js.map} +1 -1
- package/cjs/{withSendBird.js → withSendbird.js} +2 -2
- package/cjs/{withSendBird.js.map → withSendbird.js.map} +1 -1
- package/{color-6b259e40.js → color-b580a421.js} +1 -1
- package/{color-6b259e40.js.map → color-b580a421.js.map} +1 -1
- package/{compareIds-982972e8.js → compareIds-1114d2b7.js} +1 -1
- package/{compareIds-982972e8.js.map → compareIds-1114d2b7.js.map} +1 -1
- package/{const-e3d1e0ec.js → const-a11ccf78.js} +1 -1
- package/{const-e3d1e0ec.js.map → const-a11ccf78.js.map} +1 -1
- package/{const-da3968a5.js → const-b72fa505.js} +1 -1
- package/{const-da3968a5.js.map → const-b72fa505.js.map} +1 -1
- package/{context-3d5505d0.js → context-d867aec7.js} +2 -2
- package/{context-3d5505d0.js.map → context-d867aec7.js.map} +1 -1
- package/dist/index.css +169 -47
- package/dist/index.css.map +1 -1
- package/groupChannel-9a1eb726.js +6 -0
- package/groupChannel-9a1eb726.js.map +1 -0
- package/{index-94489c17.js → index-21a0df21.js} +1 -1
- package/{index-94489c17.js.map → index-21a0df21.js.map} +1 -1
- package/{index-db6a4860.js → index-3ea848a1.js} +1 -1
- package/{index-db6a4860.js.map → index-3ea848a1.js.map} +1 -1
- package/{index-902c2068.js → index-4c5351e9.js} +33 -30
- package/index-4c5351e9.js.map +1 -0
- package/{index-92160328.js → index-5ba00ba3.js} +2 -2
- package/{index-92160328.js.map → index-5ba00ba3.js.map} +1 -1
- package/{index-691dc8da.js → index-64bb5b19.js} +4 -4
- package/{index-691dc8da.js.map → index-64bb5b19.js.map} +1 -1
- package/{index-9deb1389.js → index-905615b2.js} +5 -5
- package/index-905615b2.js.map +1 -0
- package/{index-95677caf.js → index-93e3dce0.js} +2 -2
- package/{index-95677caf.js.map → index-93e3dce0.js.map} +1 -1
- package/{index-065ef420.js → index-9c121a8c.js} +12 -9
- package/index-9c121a8c.js.map +1 -0
- package/{index-17cf7808.js → index-d1179659.js} +5 -5
- package/index-d1179659.js.map +1 -0
- package/{index-a755675d.js → index-eebcc3d0.js} +4 -4
- package/{index-a755675d.js.map → index-eebcc3d0.js.map} +1 -1
- package/index.d.ts +1026 -902
- package/index.d.ts____ +1883 -0
- package/index.js +40 -39
- package/index.js.map +1 -1
- package/openChannel-f429ff22.js +8 -0
- package/openChannel-f429ff22.js.map +1 -0
- package/{openChannelUtils-2cd370a7.js → openChannelUtils-a232a39f.js} +10 -5
- package/openChannelUtils-a232a39f.js.map +1 -0
- package/package-lock.json +26318 -0
- package/package.json +5 -5
- package/sendbirdSelectors.js +671 -0
- package/sendbirdSelectors.js.map +1 -0
- package/{stringSet-5a85ff4b.js → stringSet-3a2b916e.js} +1 -1
- package/{stringSet-5a85ff4b.js.map → stringSet-3a2b916e.js.map} +1 -1
- package/{topics-24a660ee.js → topics-19b96cc7.js} +2 -2
- package/{topics-24a660ee.js.map → topics-19b96cc7.js.map} +1 -1
- package/{tslib.es6-2c4d01e9.js → tslib.es6-9548150b.js} +1 -1
- package/{tslib.es6-2c4d01e9.js.map → tslib.es6-9548150b.js.map} +1 -1
- package/ui/Accordion.js +4 -4
- package/ui/AccordionGroup.js +2 -2
- package/ui/AccordionGroup.js.map +1 -1
- package/ui/AdminMessage.js +4 -3
- package/ui/AdminMessage.js.map +1 -1
- package/ui/Avatar.js +3 -3
- package/ui/Badge.js +5 -5
- package/ui/Button.js +4 -4
- package/ui/ChannelAvatar.js +8 -8
- package/ui/ChannelAvatar.js.map +1 -1
- package/ui/ChannelPreview.js +28 -21
- package/ui/ChannelPreview.js.map +1 -1
- package/ui/ChatHeader.js +19 -12
- package/ui/ChatHeader.js.map +1 -1
- package/ui/Checkbox.js +1 -1
- package/ui/ConnectionStatus.js +5 -5
- package/ui/ContextMenu.js +9 -30
- package/ui/ContextMenu.js.map +1 -1
- package/ui/DateSeparator.js +5 -5
- package/ui/DateSeparator.js.map +1 -1
- package/ui/Dropdown.js +3 -3
- package/ui/EmojiReactions.js +10 -10
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FileMessageItemBody.js +6 -6
- package/ui/FileMessageItemBody.js.map +1 -1
- package/ui/FileViewer.js +7 -7
- package/ui/Icon.js +5 -1
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +1 -1
- package/ui/ImageRenderer.js +1 -1
- package/ui/Input.js +3 -3
- package/ui/Label.js +3 -3
- package/ui/LinkLabel.js +3 -3
- package/ui/Loader.js +1 -1
- package/ui/MentionLabel.js +20 -18
- package/ui/MentionLabel.js.map +1 -1
- package/ui/MentionUserLabel.js +1 -1
- package/ui/MentionUserLabel.js.map +1 -1
- package/ui/MessageContent.js +55 -50
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput.js +5339 -11
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +14 -18
- package/ui/MessageItemMenu.js.map +1 -1
- package/ui/MessageItemReactionMenu.js +5 -5
- package/ui/MessageItemReactionMenu.js.map +1 -1
- package/ui/MessageSearchFileItem.js +12 -11
- package/ui/MessageSearchFileItem.js.map +1 -1
- package/ui/MessageSearchItem.js +10 -10
- package/ui/MessageSearchItem.js.map +1 -1
- package/ui/MessageStatus.js +11 -11
- package/ui/MessageStatus.js.map +1 -1
- package/ui/Modal.js +8 -8
- package/ui/MutedAvatarOverlay.js +7 -7
- package/ui/MutedAvatarOverlay.js.map +1 -1
- package/ui/OGMessageItemBody.js +16 -15
- package/ui/OGMessageItemBody.js.map +1 -1
- package/ui/OpenChannelAdminMessage.js +4 -4
- package/ui/OpenChannelAdminMessage.js.map +1 -1
- package/ui/OpenChannelAvatar.js +11 -11
- package/ui/OpenChannelAvatar.js.map +1 -1
- package/ui/OpenchannelConversationHeader.js +7 -7
- package/ui/OpenchannelFileMessage.js +17 -16
- package/ui/OpenchannelFileMessage.js.map +1 -1
- package/ui/OpenchannelOGMessage.js +17 -16
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +18 -17
- package/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/ui/OpenchannelUserMessage.js +18 -17
- package/ui/OpenchannelUserMessage.js.map +1 -1
- package/ui/PlaceHolder.js +6 -6
- package/ui/QuoteMessage.js +24 -24
- package/ui/QuoteMessage.js.map +1 -1
- package/ui/QuoteMessageInput.js +11 -13
- package/ui/QuoteMessageInput.js.map +1 -1
- package/ui/ReactionBadge.js +3 -3
- package/ui/ReactionButton.js +1 -1
- package/ui/SortByRow.js +1 -1
- package/ui/TextButton.js +2 -2
- package/ui/TextMessageItemBody.js +16 -15
- package/ui/TextMessageItemBody.js.map +1 -1
- package/ui/ThumbnailMessageItemBody.js +3 -3
- package/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/ui/Tooltip.js +3 -3
- package/ui/TooltipWrapper.js +1 -1
- package/ui/UnknownMessageItemBody.js +7 -7
- package/ui/UnknownMessageItemBody.js.map +1 -1
- package/ui/UserListItem.js +14 -13
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +17 -16
- package/ui/UserProfile.js.map +1 -1
- package/ui/Word.js +70 -0
- package/ui/Word.js.map +1 -0
- package/useSendbirdStateContext.js +2 -2
- package/useSendbirdStateContext.js.map +1 -1
- package/{utils-b3b6f503.js → utils-29691dff.js} +8 -8
- package/utils-29691dff.js.map +1 -0
- package/{utils-57c79308.js → utils-8222d5cb.js} +1 -1
- package/{utils-57c79308.js.map → utils-8222d5cb.js.map} +1 -1
- package/{utils-85d3d94c.js → utils-83135175.js} +1 -1
- package/{utils-85d3d94c.js.map → utils-83135175.js.map} +1 -1
- package/{uuid-0ab81e67.js → uuid-c5e7a9dd.js} +1 -1
- package/{uuid-0ab81e67.js.map → uuid-c5e7a9dd.js.map} +1 -1
- package/{withSendBird.js → withSendbird.js} +2 -2
- package/{withSendBird.js.map → withSendbird.js.map} +1 -1
- package/ChannelListProvider-737ee36f.js.map +0 -1
- package/ChannelProvider-34834493.js.map +0 -1
- package/ChannelSettings/components/AdminPanel.js.map +0 -1
- package/CreateChannel/components/InviteMembers.js.map +0 -1
- package/CreateChannelProvider-3d3e4a7c.js.map +0 -1
- package/MemberList-6e33a562.js.map +0 -1
- package/OpenChannelProvider-9ef0d52a.js.map +0 -1
- package/cjs/ChannelListProvider-f910e236.js.map +0 -1
- package/cjs/ChannelProvider-86e2e68c.js.map +0 -1
- package/cjs/ChannelSettings/components/AdminPanel.js.map +0 -1
- package/cjs/CreateChannel/components/InviteMembers.js.map +0 -1
- package/cjs/CreateChannelProvider-07992a6d.js.map +0 -1
- package/cjs/MemberList-015c1075.js.map +0 -1
- package/cjs/OpenChannelProvider-445f214c.js.map +0 -1
- package/cjs/index-2180f74f.js.map +0 -1
- package/cjs/index-4e8b61f7.js.map +0 -1
- package/cjs/index-5eaebc66.js.map +0 -1
- package/cjs/index-a20b40c4.js.map +0 -1
- package/cjs/index-bc563d47.js.map +0 -1
- package/cjs/openChannelUtils-7fb1abc6.js.map +0 -1
- package/cjs/sendBirdSelectors.js +0 -741
- package/cjs/sendBirdSelectors.js.map +0 -1
- package/cjs/ui/OpenChannelMessageContent.js +0 -14
- package/cjs/ui/OpenChannelMessageContent.js.map +0 -1
- package/cjs/utils-03155980.js.map +0 -1
- package/index-065ef420.js.map +0 -1
- package/index-17cf7808.js.map +0 -1
- package/index-81a93b05.js +0 -49
- package/index-81a93b05.js.map +0 -1
- package/index-902c2068.js.map +0 -1
- package/index-9deb1389.js.map +0 -1
- package/openChannelUtils-2cd370a7.js.map +0 -1
- package/sendBirdSelectors.js +0 -713
- package/sendBirdSelectors.js.map +0 -1
- package/ui/OpenChannelMessageContent.js +0 -8
- package/ui/OpenChannelMessageContent.js.map +0 -1
- package/utils-b3b6f503.js.map +0 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-4b76ba01.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var groupChannel = require('./groupChannel-8023bd09.js');
|
|
6
|
+
var topics = require('./topics-a595e22a.js');
|
|
7
|
+
var uuid = require('./uuid-d0e513e8.js');
|
|
8
|
+
var utils = require('./utils-52a504d9.js');
|
|
9
|
+
var UserProfileContext = require('./UserProfileContext-9f3727c8.js');
|
|
9
10
|
var useSendbirdStateContext = require('./useSendbirdStateContext.js');
|
|
10
|
-
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-
|
|
11
|
-
var index = require('./index-
|
|
11
|
+
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-0d29c748.js');
|
|
12
|
+
var index = require('./index-32f8310c.js');
|
|
12
13
|
|
|
13
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
15
|
|
|
@@ -46,144 +47,134 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
46
47
|
sdkChannelHandlerId = _ref.sdkChannelHandlerId,
|
|
47
48
|
channelListDispatcher = _ref.channelListDispatcher,
|
|
48
49
|
logger = _ref.logger;
|
|
49
|
-
var ChannelHandler = new
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
logger.info('ChannelList: onChannelChanged', channel);
|
|
53
|
-
channelListDispatcher({
|
|
54
|
-
type: ON_CHANNEL_CHANGED,
|
|
55
|
-
payload: channel
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
ChannelHandler.onChannelDeleted = function (channelUrl) {
|
|
60
|
-
logger.info('ChannelList: onChannelDeleted', channelUrl);
|
|
61
|
-
channelListDispatcher({
|
|
62
|
-
type: ON_CHANNEL_DELETED,
|
|
63
|
-
payload: channelUrl
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
ChannelHandler.onUserJoined = function (channel) {
|
|
68
|
-
logger.info('ChannelList: onUserJoined', channel);
|
|
69
|
-
|
|
70
|
-
if (channel.lastMessage) {
|
|
50
|
+
var ChannelHandler = new groupChannel.Yr({
|
|
51
|
+
onChannelChanged: function onChannelChanged(channel) {
|
|
52
|
+
logger.info('ChannelList: onChannelChanged', channel);
|
|
71
53
|
channelListDispatcher({
|
|
72
|
-
type:
|
|
54
|
+
type: ON_CHANNEL_CHANGED,
|
|
73
55
|
payload: channel
|
|
74
56
|
});
|
|
75
|
-
}
|
|
76
|
-
|
|
57
|
+
},
|
|
58
|
+
onChannelDeleted: function onChannelDeleted(channelUrl) {
|
|
59
|
+
logger.info('ChannelList: onChannelDeleted', channelUrl);
|
|
60
|
+
channelListDispatcher({
|
|
61
|
+
type: ON_CHANNEL_DELETED,
|
|
62
|
+
payload: channelUrl
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
onUserJoined: function onUserJoined(channel) {
|
|
66
|
+
logger.info('ChannelList: onUserJoined', channel);
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
69
|
+
channelListDispatcher({
|
|
70
|
+
type: ON_USER_JOINED,
|
|
71
|
+
payload: channel
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
onUserBanned: function onUserBanned(channel, user) {
|
|
76
|
+
var currentUser = sdk.currentUser;
|
|
77
|
+
logger.info('Channel | useHandleChannelEvents: onUserBanned', channel);
|
|
81
78
|
|
|
82
|
-
|
|
79
|
+
if (user.userId === currentUser.userId) {
|
|
80
|
+
channelListDispatcher({
|
|
81
|
+
type: ON_USER_LEFT,
|
|
82
|
+
payload: {
|
|
83
|
+
channel: channel,
|
|
84
|
+
isMe: true
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
channelListDispatcher({
|
|
89
|
+
type: ON_USER_LEFT,
|
|
90
|
+
payload: {
|
|
91
|
+
channel: channel,
|
|
92
|
+
isMe: false
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
onUserLeft: function onUserLeft(channel, leftUser) {
|
|
98
|
+
var currentUser = sdk.currentUser;
|
|
99
|
+
var isMe = currentUser.userId === leftUser.userId;
|
|
100
|
+
logger.info('ChannelList: onUserLeft', channel);
|
|
83
101
|
channelListDispatcher({
|
|
84
102
|
type: ON_USER_LEFT,
|
|
85
103
|
payload: {
|
|
86
104
|
channel: channel,
|
|
87
|
-
isMe:
|
|
105
|
+
isMe: isMe
|
|
88
106
|
}
|
|
89
107
|
});
|
|
90
|
-
}
|
|
108
|
+
},
|
|
109
|
+
onReadStatus: function onReadStatus(channel) {
|
|
110
|
+
logger.info('ChannelList: onReadStatus', channel);
|
|
91
111
|
channelListDispatcher({
|
|
92
|
-
type:
|
|
93
|
-
payload:
|
|
94
|
-
channel: channel,
|
|
95
|
-
isMe: false
|
|
96
|
-
}
|
|
112
|
+
type: ON_READ_RECEIPT_UPDATED,
|
|
113
|
+
payload: channel
|
|
97
114
|
});
|
|
98
|
-
}
|
|
99
|
-
|
|
115
|
+
},
|
|
116
|
+
onDeliveryReceiptUpdated: function onDeliveryReceiptUpdated(channel) {
|
|
117
|
+
logger.info('ChannelList: onDeliveryReceiptUpdated', channel);
|
|
100
118
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
type: ON_USER_LEFT,
|
|
107
|
-
payload: {
|
|
108
|
-
channel: channel,
|
|
109
|
-
isMe: isMe
|
|
119
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
120
|
+
channelListDispatcher({
|
|
121
|
+
type: ON_DELIVERY_RECEIPT_UPDATED,
|
|
122
|
+
payload: channel
|
|
123
|
+
});
|
|
110
124
|
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
logger.info('ChannelList: onDeliveryReceiptUpdated', channel);
|
|
124
|
-
|
|
125
|
-
if (channel.lastMessage) {
|
|
125
|
+
},
|
|
126
|
+
onMessageUpdated: function onMessageUpdated(channel, message) {
|
|
127
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage.isEqual(message)) {
|
|
128
|
+
logger.info('ChannelList: onMessageUpdated', channel);
|
|
129
|
+
channelListDispatcher({
|
|
130
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
131
|
+
payload: channel
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
onChannelHidden: function onChannelHidden(channel) {
|
|
136
|
+
logger.info('ChannelList: onChannelHidden', channel);
|
|
126
137
|
channelListDispatcher({
|
|
127
|
-
type:
|
|
138
|
+
type: ON_CHANNEL_ARCHIVED,
|
|
128
139
|
payload: channel
|
|
129
140
|
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
ChannelHandler.onMessageUpdated = function (channel, message) {
|
|
134
|
-
if (channel.lastMessage.isEqual(message)) {
|
|
135
|
-
logger.info('ChannelList: onMessageUpdated', channel);
|
|
141
|
+
},
|
|
142
|
+
onChannelFrozen: function onChannelFrozen(channel) {
|
|
143
|
+
logger.info('ChannelList: onChannelFrozen', channel);
|
|
136
144
|
channelListDispatcher({
|
|
137
|
-
type:
|
|
145
|
+
type: ON_CHANNEL_FROZEN,
|
|
146
|
+
payload: channel
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
onChannelUnfrozen: function onChannelUnfrozen(channel) {
|
|
150
|
+
logger.info('ChannelList: onChannelUnfrozen', channel);
|
|
151
|
+
channelListDispatcher({
|
|
152
|
+
type: ON_CHANNEL_UNFROZEN,
|
|
138
153
|
payload: channel
|
|
139
154
|
});
|
|
140
155
|
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
ChannelHandler.onChannelHidden = function (channel) {
|
|
144
|
-
logger.info('ChannelList: onChannelHidden', channel);
|
|
145
|
-
channelListDispatcher({
|
|
146
|
-
type: ON_CHANNEL_ARCHIVED,
|
|
147
|
-
payload: channel
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
ChannelHandler.onChannelFrozen = function (channel) {
|
|
152
|
-
logger.info('ChannelList: onChannelFrozen', channel);
|
|
153
|
-
channelListDispatcher({
|
|
154
|
-
type: ON_CHANNEL_FROZEN,
|
|
155
|
-
payload: channel
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
ChannelHandler.onChannelUnfrozen = function (channel) {
|
|
160
|
-
logger.info('ChannelList: onChannelUnfrozen', channel);
|
|
161
|
-
channelListDispatcher({
|
|
162
|
-
type: ON_CHANNEL_UNFROZEN,
|
|
163
|
-
payload: channel
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
|
|
156
|
+
});
|
|
167
157
|
logger.info('ChannelList: Added channelHandler');
|
|
168
|
-
sdk.
|
|
158
|
+
sdk.groupChannel.addGroupChannelHandler(sdkChannelHandlerId, ChannelHandler);
|
|
169
159
|
};
|
|
170
160
|
|
|
171
161
|
var createChannelListQuery = function createChannelListQuery(_ref2) {
|
|
172
162
|
var sdk = _ref2.sdk,
|
|
173
163
|
_ref2$userFilledChann = _ref2.userFilledChannelListQuery,
|
|
174
164
|
userFilledChannelListQuery = _ref2$userFilledChann === void 0 ? {} : _ref2$userFilledChann;
|
|
175
|
-
var
|
|
176
|
-
|
|
177
|
-
|
|
165
|
+
var param = {};
|
|
166
|
+
param.includeEmpty = false;
|
|
167
|
+
param.limit = 20; // The value of pagination limit could be set up to 100.
|
|
178
168
|
|
|
179
|
-
|
|
169
|
+
param.order = 'latest_last_message'; // 'chronological', 'latest_last_message', 'channel_name_alphabetical', and 'metadata_value_alphabetical'
|
|
180
170
|
|
|
181
171
|
if (userFilledChannelListQuery) {
|
|
182
172
|
Object.keys(userFilledChannelListQuery).forEach(function (key) {
|
|
183
|
-
|
|
173
|
+
param[key] = userFilledChannelListQuery[key];
|
|
184
174
|
});
|
|
185
175
|
}
|
|
186
176
|
|
|
177
|
+
var channelListQuery = sdk.groupChannel.createMyGroupChannelListQuery(param);
|
|
187
178
|
return channelListQuery;
|
|
188
179
|
};
|
|
189
180
|
/**
|
|
@@ -204,7 +195,7 @@ function setupChannelList(_ref3) {
|
|
|
204
195
|
sortChannelList = _ref3.sortChannelList,
|
|
205
196
|
disableAutoSelect = _ref3.disableAutoSelect;
|
|
206
197
|
|
|
207
|
-
if (sdk && sdk.
|
|
198
|
+
if (sdk !== null && sdk !== void 0 && sdk.groupChannel) {
|
|
208
199
|
createEventHandler({
|
|
209
200
|
sdk: sdk,
|
|
210
201
|
channelListDispatcher: channelListDispatcher,
|
|
@@ -212,7 +203,7 @@ function setupChannelList(_ref3) {
|
|
|
212
203
|
logger: logger
|
|
213
204
|
});
|
|
214
205
|
} else {
|
|
215
|
-
logger.
|
|
206
|
+
logger.warning('ChannelList - createEventHandler: sdk or sdk.ChannelHandler does not exist', sdk);
|
|
216
207
|
}
|
|
217
208
|
|
|
218
209
|
logger.info('ChannelList - creating query', {
|
|
@@ -242,28 +233,10 @@ function setupChannelList(_ref3) {
|
|
|
242
233
|
logger.info('ChannelList - fetching channels');
|
|
243
234
|
|
|
244
235
|
if (channelListQuery.hasNext) {
|
|
245
|
-
channelListQuery.next(function (
|
|
236
|
+
channelListQuery.next().then(function (channelList) {
|
|
246
237
|
var _sdk$appInfo, _sdk$appInfo$premiumF;
|
|
247
238
|
|
|
248
|
-
|
|
249
|
-
var channelList = response;
|
|
250
|
-
var err = error;
|
|
251
|
-
|
|
252
|
-
if (swapParams) {
|
|
253
|
-
channelList = error;
|
|
254
|
-
err = response;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
logger.info('ChannelList - fetched channels', channelList);
|
|
258
|
-
|
|
259
|
-
if (err) {
|
|
260
|
-
logger.error('ChannelList - couldnt fetch channels', err);
|
|
261
|
-
channelListDispatcher({
|
|
262
|
-
type: INIT_CHANNELS_FAILURE
|
|
263
|
-
});
|
|
264
|
-
return;
|
|
265
|
-
} // select first channel
|
|
266
|
-
|
|
239
|
+
logger.info('ChannelList - fetched channels', channelList); // select first channel
|
|
267
240
|
|
|
268
241
|
logger.info('ChannelList - highlight channel', channelList[0]);
|
|
269
242
|
var sortedChannelList = channelList;
|
|
@@ -289,18 +262,23 @@ function setupChannelList(_ref3) {
|
|
|
289
262
|
});
|
|
290
263
|
|
|
291
264
|
if (canSetMarkAsDelivered) {
|
|
292
|
-
var _channelList;
|
|
293
|
-
|
|
294
265
|
logger.info('ChannelList: Marking all channels as read'); // eslint-disable-next-line no-unused-expressions
|
|
295
266
|
|
|
296
|
-
|
|
267
|
+
channelList.forEach(function (c, idx) {
|
|
297
268
|
// Plan-based rate limits - minimum limit is 5 requests per second
|
|
298
269
|
setTimeout(function () {
|
|
299
270
|
// eslint-disable-next-line no-unused-expressions
|
|
300
|
-
|
|
271
|
+
c.markAsDelivered();
|
|
301
272
|
}, 300 * idx);
|
|
302
273
|
});
|
|
303
274
|
}
|
|
275
|
+
}).catch(function (err) {
|
|
276
|
+
if (err) {
|
|
277
|
+
logger.error('ChannelList - couldnt fetch channels', err);
|
|
278
|
+
channelListDispatcher({
|
|
279
|
+
type: INIT_CHANNELS_FAILURE
|
|
280
|
+
});
|
|
281
|
+
}
|
|
304
282
|
});
|
|
305
283
|
} else {
|
|
306
284
|
logger.warning('ChannelList - there are no more channels');
|
|
@@ -316,16 +294,16 @@ var pubSubHandleRemover = function pubSubHandleRemover(subscriber) {
|
|
|
316
294
|
});
|
|
317
295
|
};
|
|
318
296
|
var pubSubHandler = function pubSubHandler(pubSub, channelListDispatcher) {
|
|
319
|
-
var
|
|
320
|
-
if (!pubSub) return
|
|
321
|
-
|
|
297
|
+
var subscriber = new Map();
|
|
298
|
+
if (!pubSub) return subscriber;
|
|
299
|
+
subscriber.set(topics.CREATE_CHANNEL, pubSub.subscribe(topics.CREATE_CHANNEL, function (msg) {
|
|
322
300
|
var channel = msg.channel;
|
|
323
301
|
channelListDispatcher({
|
|
324
302
|
type: 'CREATE_CHANNEL',
|
|
325
303
|
payload: channel
|
|
326
304
|
});
|
|
327
305
|
}));
|
|
328
|
-
|
|
306
|
+
subscriber.set(topics.UPDATE_USER_MESSAGE, pubSub.subscribe(topics.UPDATE_USER_MESSAGE, function (msg) {
|
|
329
307
|
var _updatedChannel$lastM;
|
|
330
308
|
|
|
331
309
|
var channel = msg.channel,
|
|
@@ -343,21 +321,21 @@ var pubSubHandler = function pubSubHandler(pubSub, channelListDispatcher) {
|
|
|
343
321
|
});
|
|
344
322
|
}
|
|
345
323
|
}));
|
|
346
|
-
|
|
324
|
+
subscriber.set(topics.LEAVE_CHANNEL, pubSub.subscribe(topics.LEAVE_CHANNEL, function (msg) {
|
|
347
325
|
var channel = msg.channel;
|
|
348
326
|
channelListDispatcher({
|
|
349
327
|
type: LEAVE_CHANNEL_SUCCESS,
|
|
350
|
-
payload: channel.url
|
|
328
|
+
payload: channel === null || channel === void 0 ? void 0 : channel.url
|
|
351
329
|
});
|
|
352
330
|
}));
|
|
353
|
-
|
|
331
|
+
subscriber.set(topics.SEND_MESSAGE_START, pubSub.subscribe(topics.SEND_MESSAGE_START, function (msg) {
|
|
354
332
|
var channel = msg.channel;
|
|
355
333
|
channelListDispatcher({
|
|
356
334
|
type: CHANNEL_REPLACED_TO_TOP,
|
|
357
335
|
payload: channel
|
|
358
336
|
});
|
|
359
337
|
}));
|
|
360
|
-
return
|
|
338
|
+
return subscriber;
|
|
361
339
|
};
|
|
362
340
|
|
|
363
341
|
var channelListInitialState = {
|
|
@@ -430,7 +408,7 @@ function reducer(state, action) {
|
|
|
430
408
|
|
|
431
409
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
432
410
|
allChannels: [channel].concat(_rollupPluginBabelHelpers._toConsumableArray(state.allChannels.filter(function (ch) {
|
|
433
|
-
return ch.url !== channel.url;
|
|
411
|
+
return ch.url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
434
412
|
}))),
|
|
435
413
|
currentChannel: channel
|
|
436
414
|
});
|
|
@@ -450,11 +428,11 @@ function reducer(state, action) {
|
|
|
450
428
|
}
|
|
451
429
|
}
|
|
452
430
|
|
|
453
|
-
var nextChannel = _channel.url === ((_state$currentChannel = state.currentChannel) === null || _state$currentChannel === void 0 ? void 0 : _state$currentChannel.url) ? state.allChannels[state.allChannels[0].url === _channel.url ? 1 : 0] : state.currentChannel;
|
|
431
|
+
var 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;
|
|
454
432
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
455
433
|
allChannels: state.allChannels.filter(function (_ref2) {
|
|
456
434
|
var url = _ref2.url;
|
|
457
|
-
return url !== _channel.url;
|
|
435
|
+
return url !== (_channel === null || _channel === void 0 ? void 0 : _channel.url);
|
|
458
436
|
}),
|
|
459
437
|
currentChannel: state.disableAutoSelect ? null : nextChannel
|
|
460
438
|
});
|
|
@@ -491,7 +469,7 @@ function reducer(state, action) {
|
|
|
491
469
|
|
|
492
470
|
var _filteredChannels2 = index.getChannelsWithUpsertedChannel(state.allChannels, _channel2);
|
|
493
471
|
|
|
494
|
-
var _nextChannel3 = isMe && _channel2.url === ((_state$currentChannel3 = state.currentChannel) === null || _state$currentChannel3 === void 0 ? void 0 : _state$currentChannel3.url) ? _filteredChannels2[0] : state.currentChannel;
|
|
472
|
+
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;
|
|
495
473
|
|
|
496
474
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
497
475
|
currentChannel: state.disableAutoSelect ? null : _nextChannel3,
|
|
@@ -499,22 +477,22 @@ function reducer(state, action) {
|
|
|
499
477
|
});
|
|
500
478
|
}
|
|
501
479
|
|
|
502
|
-
var _nextChannel2 = _channel2.url === ((_state$currentChannel4 = state.currentChannel) === null || _state$currentChannel4 === void 0 ? void 0 : _state$currentChannel4.url) ? state.allChannels[0] : state.currentChannel;
|
|
480
|
+
var _nextChannel2 = (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url) === ((_state$currentChannel4 = state.currentChannel) === null || _state$currentChannel4 === void 0 ? void 0 : _state$currentChannel4.url) ? state.allChannels[0] : state.currentChannel;
|
|
503
481
|
|
|
504
482
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
505
483
|
currentChannel: state.disableAutoSelect ? null : _nextChannel2,
|
|
506
484
|
allChannels: state.allChannels.filter(function (_ref4) {
|
|
507
485
|
var url = _ref4.url;
|
|
508
|
-
return url !== _channel2.url;
|
|
486
|
+
return url !== (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url);
|
|
509
487
|
})
|
|
510
488
|
});
|
|
511
489
|
}
|
|
512
490
|
|
|
513
491
|
var _filteredChannels = state.allChannels.filter(function (c) {
|
|
514
|
-
return !(c.url === _channel2.url && isMe);
|
|
492
|
+
return !(c.url === (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url) && isMe);
|
|
515
493
|
});
|
|
516
494
|
|
|
517
|
-
var _nextChannel = isMe && _channel2.url === ((_state$currentChannel5 = state.currentChannel) === null || _state$currentChannel5 === void 0 ? void 0 : _state$currentChannel5.url) ? _filteredChannels[0] : state.currentChannel;
|
|
495
|
+
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;
|
|
518
496
|
|
|
519
497
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
520
498
|
currentChannel: state.disableAutoSelect ? null : _nextChannel,
|
|
@@ -531,7 +509,7 @@ function reducer(state, action) {
|
|
|
531
509
|
allChannels = _state$allChannels === void 0 ? [] : _state$allChannels;
|
|
532
510
|
var _channel3 = action.payload;
|
|
533
511
|
var unreadMessageCount = _channel3.unreadMessageCount;
|
|
534
|
-
if (!_channel3.lastMessage) return state;
|
|
512
|
+
if (!(_channel3 !== null && _channel3 !== void 0 && _channel3.lastMessage)) return state;
|
|
535
513
|
|
|
536
514
|
if (state.channelListQuery) {
|
|
537
515
|
var _state$currentChannel6;
|
|
@@ -542,14 +520,14 @@ function reducer(state, action) {
|
|
|
542
520
|
});
|
|
543
521
|
}
|
|
544
522
|
|
|
545
|
-
var _nextChannel4 = _channel3.url === ((_state$currentChannel6 = state.currentChannel) === null || _state$currentChannel6 === void 0 ? void 0 : _state$currentChannel6.url) ? state.allChannels[state.allChannels[0].url === _channel3.url ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
523
|
+
var _nextChannel4 = (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url) === ((_state$currentChannel6 = state.currentChannel) === null || _state$currentChannel6 === void 0 ? void 0 : _state$currentChannel6.url) ? state.allChannels[state.allChannels[0].url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
546
524
|
: state.currentChannel;
|
|
547
525
|
|
|
548
526
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
549
527
|
currentChannel: state.disableAutoSelect ? null : _nextChannel4,
|
|
550
528
|
allChannels: state.allChannels.filter(function (_ref5) {
|
|
551
529
|
var url = _ref5.url;
|
|
552
|
-
return url !== _channel3.url;
|
|
530
|
+
return url !== (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url);
|
|
553
531
|
})
|
|
554
532
|
});
|
|
555
533
|
} // if its only an unread message count change, dont push to top
|
|
@@ -558,14 +536,14 @@ function reducer(state, action) {
|
|
|
558
536
|
if (unreadMessageCount === 0) {
|
|
559
537
|
var currentChannel = allChannels.find(function (_ref6) {
|
|
560
538
|
var url = _ref6.url;
|
|
561
|
-
return url === _channel3.url;
|
|
539
|
+
return url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url);
|
|
562
540
|
});
|
|
563
541
|
var currentUnreadCount = currentChannel && currentChannel.unreadMessageCount;
|
|
564
542
|
|
|
565
543
|
if (currentUnreadCount === 0) {
|
|
566
544
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
567
545
|
allChannels: state.allChannels.map(function (ch) {
|
|
568
|
-
return ch.url === _channel3.url ? _channel3 : ch;
|
|
546
|
+
return ch.url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url) ? _channel3 : ch;
|
|
569
547
|
})
|
|
570
548
|
});
|
|
571
549
|
}
|
|
@@ -595,11 +573,13 @@ function reducer(state, action) {
|
|
|
595
573
|
});
|
|
596
574
|
|
|
597
575
|
case ON_LAST_MESSAGE_UPDATED:
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
576
|
+
{
|
|
577
|
+
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
578
|
+
allChannels: state.allChannels.map(function (channel) {
|
|
579
|
+
return (channel === null || channel === void 0 ? void 0 : channel.url) === action.payload.url ? action.payload : channel;
|
|
580
|
+
})
|
|
581
|
+
});
|
|
582
|
+
}
|
|
603
583
|
|
|
604
584
|
case ON_CHANNEL_FROZEN:
|
|
605
585
|
{
|
|
@@ -614,13 +594,13 @@ function reducer(state, action) {
|
|
|
614
594
|
});
|
|
615
595
|
}
|
|
616
596
|
|
|
617
|
-
var _nextChannel5 = _channel4.url === ((_state$currentChannel7 = state.currentChannel) === null || _state$currentChannel7 === void 0 ? void 0 : _state$currentChannel7.url) ? state.allChannels[state.allChannels[0].url === _channel4.url ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
597
|
+
var _nextChannel5 = (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url) === ((_state$currentChannel7 = state.currentChannel) === null || _state$currentChannel7 === void 0 ? void 0 : _state$currentChannel7.url) ? state.allChannels[state.allChannels[0].url === (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
618
598
|
: state.currentChannel;
|
|
619
599
|
|
|
620
600
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
621
601
|
allChannels: state.allChannels.filter(function (_ref8) {
|
|
622
602
|
var url = _ref8.url;
|
|
623
|
-
return url !== _channel4.url;
|
|
603
|
+
return url !== (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url);
|
|
624
604
|
}),
|
|
625
605
|
currentChannel: state.disableAutoSelect ? null : _nextChannel5
|
|
626
606
|
});
|
|
@@ -628,7 +608,7 @@ function reducer(state, action) {
|
|
|
628
608
|
|
|
629
609
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
630
610
|
allChannels: state.allChannels.map(function (ch) {
|
|
631
|
-
if (ch.url === _channel4.url) {
|
|
611
|
+
if (ch.url === (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url)) {
|
|
632
612
|
// eslint-disable-next-line no-param-reassign
|
|
633
613
|
ch.isFrozen = true;
|
|
634
614
|
return ch;
|
|
@@ -652,13 +632,13 @@ function reducer(state, action) {
|
|
|
652
632
|
});
|
|
653
633
|
}
|
|
654
634
|
|
|
655
|
-
var _nextChannel6 = _channel5.url === ((_state$currentChannel8 = state.currentChannel) === null || _state$currentChannel8 === void 0 ? void 0 : _state$currentChannel8.url) ? state.allChannels[state.allChannels[0].url === _channel5.url ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
635
|
+
var _nextChannel6 = (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url) === ((_state$currentChannel8 = state.currentChannel) === null || _state$currentChannel8 === void 0 ? void 0 : _state$currentChannel8.url) ? state.allChannels[state.allChannels[0].url === (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url) ? 1 : 0] // if coming channel is first of channel list, current channel will be the next one
|
|
656
636
|
: state.currentChannel;
|
|
657
637
|
|
|
658
638
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
659
639
|
allChannels: state.allChannels.filter(function (_ref9) {
|
|
660
640
|
var url = _ref9.url;
|
|
661
|
-
return url !== _channel5.url;
|
|
641
|
+
return url !== (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url);
|
|
662
642
|
}),
|
|
663
643
|
currentChannel: state.disableAutoSelect ? null : _nextChannel6
|
|
664
644
|
});
|
|
@@ -666,7 +646,7 @@ function reducer(state, action) {
|
|
|
666
646
|
|
|
667
647
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
668
648
|
allChannels: state.allChannels.map(function (ch) {
|
|
669
|
-
if (ch.url === _channel5.url) {
|
|
649
|
+
if (ch.url === (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url)) {
|
|
670
650
|
// eslint-disable-next-line no-param-reassign
|
|
671
651
|
ch.isFrozen = false;
|
|
672
652
|
return ch;
|
|
@@ -681,7 +661,7 @@ function reducer(state, action) {
|
|
|
681
661
|
{
|
|
682
662
|
return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, state), {}, {
|
|
683
663
|
allChannels: [action.payload].concat(_rollupPluginBabelHelpers._toConsumableArray(state.allChannels.filter(function (channel) {
|
|
684
|
-
return channel.url !== action.payload.url;
|
|
664
|
+
return (channel === null || channel === void 0 ? void 0 : channel.url) !== action.payload.url;
|
|
685
665
|
})))
|
|
686
666
|
});
|
|
687
667
|
}
|
|
@@ -746,7 +726,7 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
746
726
|
logger = config.logger;
|
|
747
727
|
var isTypingIndicatorEnabledOnChannelList = config.isTypingIndicatorEnabledOnChannelList,
|
|
748
728
|
isMessageReceiptStatusEnabledOnChannelList = config.isMessageReceiptStatusEnabledOnChannelList;
|
|
749
|
-
var sdk = sdkStore.sdk; // derive some variables
|
|
729
|
+
var sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk; // derive some variables
|
|
750
730
|
// enable if it is true atleast once(both are flase by default)
|
|
751
731
|
|
|
752
732
|
var userDefinedDisableUserProfile = disableUserProfile || (config === null || config === void 0 ? void 0 : config.disableUserProfile);
|
|
@@ -786,6 +766,8 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
786
766
|
};
|
|
787
767
|
}, [sdkIntialized]);
|
|
788
768
|
React.useEffect(function () {
|
|
769
|
+
var _a;
|
|
770
|
+
|
|
789
771
|
setSdkChannelHandlerId(uuid.uuidv4);
|
|
790
772
|
|
|
791
773
|
if (sdkIntialized) {
|
|
@@ -804,8 +786,8 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
804
786
|
} else {
|
|
805
787
|
logger.info('ChannelList: Removing channelHandlers'); // remove previous channelHandlers
|
|
806
788
|
|
|
807
|
-
if (
|
|
808
|
-
sdk.
|
|
789
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
790
|
+
sdk.groupChannel.removeGroupChannelHandler(sdkChannelHandlerId);
|
|
809
791
|
} // remove channelSource
|
|
810
792
|
|
|
811
793
|
|
|
@@ -818,40 +800,81 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
818
800
|
}
|
|
819
801
|
|
|
820
802
|
return function () {
|
|
803
|
+
var _a, _b;
|
|
804
|
+
|
|
821
805
|
logger.info('ChannelList: Removing channelHandlers');
|
|
822
806
|
|
|
823
|
-
if (sdk
|
|
824
|
-
sdk.
|
|
807
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
808
|
+
(_b = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _b === void 0 ? void 0 : _b.removeGroupChannelHandler(sdkChannelHandlerId);
|
|
825
809
|
}
|
|
826
810
|
};
|
|
827
811
|
}, [sdkIntialized, userFilledChannelListQuery, sortChannelList]);
|
|
828
812
|
React.useEffect(function () {
|
|
829
|
-
|
|
830
|
-
var handlerId = uuid.uuidv4();
|
|
831
|
-
var handler = new sdk.ChannelHandler();
|
|
813
|
+
var _a, _b;
|
|
832
814
|
|
|
833
|
-
|
|
834
|
-
|
|
815
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.addGroupChannelHandler) {
|
|
816
|
+
var handlerId = uuid.uuidv4();
|
|
817
|
+
var handler = new groupChannel.Yr({
|
|
818
|
+
onTypingStatusUpdated: function onTypingStatusUpdated(channel) {
|
|
819
|
+
var _a;
|
|
835
820
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
821
|
+
var typingMemberCount = (_a = channel === null || channel === void 0 ? void 0 : channel.getTypingUsers()) === null || _a === void 0 ? void 0 : _a.length;
|
|
822
|
+
var channelList = typingChannels.filter(function (ch) {
|
|
823
|
+
return ch.url !== channel.url;
|
|
824
|
+
});
|
|
840
825
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
826
|
+
if (typingMemberCount > 0) {
|
|
827
|
+
setTypingChannels(tslib_es6.__spreadArray(tslib_es6.__spreadArray([], channelList, true), [channel], false));
|
|
828
|
+
} else {
|
|
829
|
+
setTypingChannels(channelList);
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
onUnreadMemberStatusUpdated: function onUnreadMemberStatusUpdated(channel) {
|
|
833
|
+
channelListDispatcher({
|
|
834
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
835
|
+
payload: channel
|
|
836
|
+
});
|
|
837
|
+
},
|
|
838
|
+
onUndeliveredMemberStatusUpdated: function onUndeliveredMemberStatusUpdated(channel) {
|
|
839
|
+
channelListDispatcher({
|
|
840
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
841
|
+
payload: channel
|
|
842
|
+
});
|
|
843
|
+
},
|
|
844
|
+
onMessageUpdated: function onMessageUpdated(channel) {
|
|
845
|
+
channelListDispatcher({
|
|
846
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
847
|
+
payload: channel
|
|
848
|
+
});
|
|
849
|
+
sdk.groupChannel.getChannelWithoutCache(channel.url).then(function (ch) {
|
|
850
|
+
channelListDispatcher({
|
|
851
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
852
|
+
payload: ch
|
|
853
|
+
});
|
|
854
|
+
});
|
|
855
|
+
},
|
|
856
|
+
onMentionReceived: function onMentionReceived(channel) {
|
|
857
|
+
channelListDispatcher({
|
|
858
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
859
|
+
payload: channel
|
|
860
|
+
});
|
|
861
|
+
sdk.groupChannel.getChannelWithoutCache(channel.url).then(function (ch) {
|
|
862
|
+
channelListDispatcher({
|
|
863
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
864
|
+
payload: ch
|
|
865
|
+
});
|
|
866
|
+
});
|
|
845
867
|
}
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
sdk.addChannelHandler(handlerId, handler);
|
|
868
|
+
});
|
|
869
|
+
(_b = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _b === void 0 ? void 0 : _b.addGroupChannelHandler(handlerId, handler);
|
|
849
870
|
setTypingHandlerId(handlerId);
|
|
850
871
|
}
|
|
851
872
|
|
|
852
873
|
return function () {
|
|
853
|
-
|
|
854
|
-
|
|
874
|
+
var _a;
|
|
875
|
+
|
|
876
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
877
|
+
sdk.groupChannel.removeGroupChannelHandler(typingHandlerId);
|
|
855
878
|
}
|
|
856
879
|
};
|
|
857
880
|
}, [(_a = sdk === null || sdk === void 0 ? void 0 : sdk.currentUser) === null || _a === void 0 ? void 0 : _a.userId]);
|
|
@@ -878,11 +901,11 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
878
901
|
}
|
|
879
902
|
|
|
880
903
|
React.useEffect(function () {
|
|
881
|
-
if (!sdk || !sdk.
|
|
904
|
+
if (!sdk || !sdk.groupChannel || !currentChannel || !(currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url)) {
|
|
882
905
|
return;
|
|
883
906
|
}
|
|
884
907
|
|
|
885
|
-
sdk.
|
|
908
|
+
sdk.groupChannel.getChannel(currentChannel.url).then(function (groupChannel) {
|
|
886
909
|
if (groupChannel) {
|
|
887
910
|
onChannelSelect(groupChannel);
|
|
888
911
|
} else {
|
|
@@ -914,7 +937,7 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
914
937
|
disableUserProfile: userDefinedDisableUserProfile,
|
|
915
938
|
renderUserProfile: userDefinedRenderProfile
|
|
916
939
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
917
|
-
className: "sendbird-channel-list "
|
|
940
|
+
className: "sendbird-channel-list ".concat(className)
|
|
918
941
|
}, children)));
|
|
919
942
|
};
|
|
920
943
|
|
|
@@ -923,14 +946,11 @@ function useChannelListContext() {
|
|
|
923
946
|
return context;
|
|
924
947
|
}
|
|
925
948
|
|
|
926
|
-
var useChannelList = useChannelListContext;
|
|
927
|
-
|
|
928
949
|
exports.ChannelListProvider = ChannelListProvider;
|
|
929
950
|
exports.FETCH_CHANNELS_FAILURE = FETCH_CHANNELS_FAILURE;
|
|
930
951
|
exports.FETCH_CHANNELS_START = FETCH_CHANNELS_START;
|
|
931
952
|
exports.FETCH_CHANNELS_SUCCESS = FETCH_CHANNELS_SUCCESS;
|
|
932
953
|
exports.LEAVE_CHANNEL_SUCCESS = LEAVE_CHANNEL_SUCCESS;
|
|
933
954
|
exports.SET_CURRENT_CHANNEL = SET_CURRENT_CHANNEL;
|
|
934
|
-
exports.useChannelList = useChannelList;
|
|
935
955
|
exports.useChannelListContext = useChannelListContext;
|
|
936
|
-
//# sourceMappingURL=ChannelListProvider-
|
|
956
|
+
//# sourceMappingURL=ChannelListProvider-94d4c78c.js.map
|