@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,12 +1,13 @@
|
|
|
1
|
-
import { a as __spreadArray, _ as __assign } from './tslib.es6-
|
|
1
|
+
import { a as __spreadArray, _ as __assign } from './tslib.es6-9548150b.js';
|
|
2
2
|
import React__default, { useReducer, useState, useEffect, useMemo, useContext } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { Y as Yr } from './groupChannel-9a1eb726.js';
|
|
4
|
+
import { C as CREATE_CHANNEL$1, U as UPDATE_USER_MESSAGE, L as LEAVE_CHANNEL, S as SEND_MESSAGE_START } from './topics-19b96cc7.js';
|
|
5
|
+
import { u as uuidv4 } from './uuid-c5e7a9dd.js';
|
|
6
|
+
import { n as noop } from './utils-83135175.js';
|
|
7
|
+
import { U as UserProfileProvider } from './UserProfileContext-f0ef00c0.js';
|
|
7
8
|
import useSendbirdStateContext from './useSendbirdStateContext.js';
|
|
8
|
-
import { _ as _objectSpread2, b as _toConsumableArray } from './_rollupPluginBabelHelpers-
|
|
9
|
-
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-
|
|
9
|
+
import { _ as _objectSpread2, b as _toConsumableArray } from './_rollupPluginBabelHelpers-8ba74698.js';
|
|
10
|
+
import { f as filterChannelListParams, g as getChannelsWithUpsertedChannel } from './index-4c5351e9.js';
|
|
10
11
|
|
|
11
12
|
var RESET_CHANNEL_LIST = 'RESET_CHANNEL_LIST';
|
|
12
13
|
var CREATE_CHANNEL = 'CREATE_CHANNEL';
|
|
@@ -40,144 +41,134 @@ var createEventHandler = function createEventHandler(_ref) {
|
|
|
40
41
|
sdkChannelHandlerId = _ref.sdkChannelHandlerId,
|
|
41
42
|
channelListDispatcher = _ref.channelListDispatcher,
|
|
42
43
|
logger = _ref.logger;
|
|
43
|
-
var ChannelHandler = new
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
logger.info('ChannelList: onChannelChanged', channel);
|
|
47
|
-
channelListDispatcher({
|
|
48
|
-
type: ON_CHANNEL_CHANGED,
|
|
49
|
-
payload: channel
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
ChannelHandler.onChannelDeleted = function (channelUrl) {
|
|
54
|
-
logger.info('ChannelList: onChannelDeleted', channelUrl);
|
|
55
|
-
channelListDispatcher({
|
|
56
|
-
type: ON_CHANNEL_DELETED,
|
|
57
|
-
payload: channelUrl
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
ChannelHandler.onUserJoined = function (channel) {
|
|
62
|
-
logger.info('ChannelList: onUserJoined', channel);
|
|
63
|
-
|
|
64
|
-
if (channel.lastMessage) {
|
|
44
|
+
var ChannelHandler = new Yr({
|
|
45
|
+
onChannelChanged: function onChannelChanged(channel) {
|
|
46
|
+
logger.info('ChannelList: onChannelChanged', channel);
|
|
65
47
|
channelListDispatcher({
|
|
66
|
-
type:
|
|
48
|
+
type: ON_CHANNEL_CHANGED,
|
|
67
49
|
payload: channel
|
|
68
50
|
});
|
|
69
|
-
}
|
|
70
|
-
|
|
51
|
+
},
|
|
52
|
+
onChannelDeleted: function onChannelDeleted(channelUrl) {
|
|
53
|
+
logger.info('ChannelList: onChannelDeleted', channelUrl);
|
|
54
|
+
channelListDispatcher({
|
|
55
|
+
type: ON_CHANNEL_DELETED,
|
|
56
|
+
payload: channelUrl
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
onUserJoined: function onUserJoined(channel) {
|
|
60
|
+
logger.info('ChannelList: onUserJoined', channel);
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
63
|
+
channelListDispatcher({
|
|
64
|
+
type: ON_USER_JOINED,
|
|
65
|
+
payload: channel
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
onUserBanned: function onUserBanned(channel, user) {
|
|
70
|
+
var currentUser = sdk.currentUser;
|
|
71
|
+
logger.info('Channel | useHandleChannelEvents: onUserBanned', channel);
|
|
75
72
|
|
|
76
|
-
|
|
73
|
+
if (user.userId === currentUser.userId) {
|
|
74
|
+
channelListDispatcher({
|
|
75
|
+
type: ON_USER_LEFT,
|
|
76
|
+
payload: {
|
|
77
|
+
channel: channel,
|
|
78
|
+
isMe: true
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
} else {
|
|
82
|
+
channelListDispatcher({
|
|
83
|
+
type: ON_USER_LEFT,
|
|
84
|
+
payload: {
|
|
85
|
+
channel: channel,
|
|
86
|
+
isMe: false
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
onUserLeft: function onUserLeft(channel, leftUser) {
|
|
92
|
+
var currentUser = sdk.currentUser;
|
|
93
|
+
var isMe = currentUser.userId === leftUser.userId;
|
|
94
|
+
logger.info('ChannelList: onUserLeft', channel);
|
|
77
95
|
channelListDispatcher({
|
|
78
96
|
type: ON_USER_LEFT,
|
|
79
97
|
payload: {
|
|
80
98
|
channel: channel,
|
|
81
|
-
isMe:
|
|
99
|
+
isMe: isMe
|
|
82
100
|
}
|
|
83
101
|
});
|
|
84
|
-
}
|
|
102
|
+
},
|
|
103
|
+
onReadStatus: function onReadStatus(channel) {
|
|
104
|
+
logger.info('ChannelList: onReadStatus', channel);
|
|
85
105
|
channelListDispatcher({
|
|
86
|
-
type:
|
|
87
|
-
payload:
|
|
88
|
-
channel: channel,
|
|
89
|
-
isMe: false
|
|
90
|
-
}
|
|
106
|
+
type: ON_READ_RECEIPT_UPDATED,
|
|
107
|
+
payload: channel
|
|
91
108
|
});
|
|
92
|
-
}
|
|
93
|
-
|
|
109
|
+
},
|
|
110
|
+
onDeliveryReceiptUpdated: function onDeliveryReceiptUpdated(channel) {
|
|
111
|
+
logger.info('ChannelList: onDeliveryReceiptUpdated', channel);
|
|
94
112
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
type: ON_USER_LEFT,
|
|
101
|
-
payload: {
|
|
102
|
-
channel: channel,
|
|
103
|
-
isMe: isMe
|
|
113
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage) {
|
|
114
|
+
channelListDispatcher({
|
|
115
|
+
type: ON_DELIVERY_RECEIPT_UPDATED,
|
|
116
|
+
payload: channel
|
|
117
|
+
});
|
|
104
118
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
logger.info('ChannelList: onDeliveryReceiptUpdated', channel);
|
|
118
|
-
|
|
119
|
-
if (channel.lastMessage) {
|
|
119
|
+
},
|
|
120
|
+
onMessageUpdated: function onMessageUpdated(channel, message) {
|
|
121
|
+
if (channel !== null && channel !== void 0 && channel.lastMessage.isEqual(message)) {
|
|
122
|
+
logger.info('ChannelList: onMessageUpdated', channel);
|
|
123
|
+
channelListDispatcher({
|
|
124
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
125
|
+
payload: channel
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
onChannelHidden: function onChannelHidden(channel) {
|
|
130
|
+
logger.info('ChannelList: onChannelHidden', channel);
|
|
120
131
|
channelListDispatcher({
|
|
121
|
-
type:
|
|
132
|
+
type: ON_CHANNEL_ARCHIVED,
|
|
122
133
|
payload: channel
|
|
123
134
|
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
ChannelHandler.onMessageUpdated = function (channel, message) {
|
|
128
|
-
if (channel.lastMessage.isEqual(message)) {
|
|
129
|
-
logger.info('ChannelList: onMessageUpdated', channel);
|
|
135
|
+
},
|
|
136
|
+
onChannelFrozen: function onChannelFrozen(channel) {
|
|
137
|
+
logger.info('ChannelList: onChannelFrozen', channel);
|
|
130
138
|
channelListDispatcher({
|
|
131
|
-
type:
|
|
139
|
+
type: ON_CHANNEL_FROZEN,
|
|
140
|
+
payload: channel
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
onChannelUnfrozen: function onChannelUnfrozen(channel) {
|
|
144
|
+
logger.info('ChannelList: onChannelUnfrozen', channel);
|
|
145
|
+
channelListDispatcher({
|
|
146
|
+
type: ON_CHANNEL_UNFROZEN,
|
|
132
147
|
payload: channel
|
|
133
148
|
});
|
|
134
149
|
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
ChannelHandler.onChannelHidden = function (channel) {
|
|
138
|
-
logger.info('ChannelList: onChannelHidden', channel);
|
|
139
|
-
channelListDispatcher({
|
|
140
|
-
type: ON_CHANNEL_ARCHIVED,
|
|
141
|
-
payload: channel
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
ChannelHandler.onChannelFrozen = function (channel) {
|
|
146
|
-
logger.info('ChannelList: onChannelFrozen', channel);
|
|
147
|
-
channelListDispatcher({
|
|
148
|
-
type: ON_CHANNEL_FROZEN,
|
|
149
|
-
payload: channel
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
ChannelHandler.onChannelUnfrozen = function (channel) {
|
|
154
|
-
logger.info('ChannelList: onChannelUnfrozen', channel);
|
|
155
|
-
channelListDispatcher({
|
|
156
|
-
type: ON_CHANNEL_UNFROZEN,
|
|
157
|
-
payload: channel
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
|
|
150
|
+
});
|
|
161
151
|
logger.info('ChannelList: Added channelHandler');
|
|
162
|
-
sdk.
|
|
152
|
+
sdk.groupChannel.addGroupChannelHandler(sdkChannelHandlerId, ChannelHandler);
|
|
163
153
|
};
|
|
164
154
|
|
|
165
155
|
var createChannelListQuery = function createChannelListQuery(_ref2) {
|
|
166
156
|
var sdk = _ref2.sdk,
|
|
167
157
|
_ref2$userFilledChann = _ref2.userFilledChannelListQuery,
|
|
168
158
|
userFilledChannelListQuery = _ref2$userFilledChann === void 0 ? {} : _ref2$userFilledChann;
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
|
|
159
|
+
var param = {};
|
|
160
|
+
param.includeEmpty = false;
|
|
161
|
+
param.limit = 20; // The value of pagination limit could be set up to 100.
|
|
172
162
|
|
|
173
|
-
|
|
163
|
+
param.order = 'latest_last_message'; // 'chronological', 'latest_last_message', 'channel_name_alphabetical', and 'metadata_value_alphabetical'
|
|
174
164
|
|
|
175
165
|
if (userFilledChannelListQuery) {
|
|
176
166
|
Object.keys(userFilledChannelListQuery).forEach(function (key) {
|
|
177
|
-
|
|
167
|
+
param[key] = userFilledChannelListQuery[key];
|
|
178
168
|
});
|
|
179
169
|
}
|
|
180
170
|
|
|
171
|
+
var channelListQuery = sdk.groupChannel.createMyGroupChannelListQuery(param);
|
|
181
172
|
return channelListQuery;
|
|
182
173
|
};
|
|
183
174
|
/**
|
|
@@ -198,7 +189,7 @@ function setupChannelList(_ref3) {
|
|
|
198
189
|
sortChannelList = _ref3.sortChannelList,
|
|
199
190
|
disableAutoSelect = _ref3.disableAutoSelect;
|
|
200
191
|
|
|
201
|
-
if (sdk && sdk.
|
|
192
|
+
if (sdk !== null && sdk !== void 0 && sdk.groupChannel) {
|
|
202
193
|
createEventHandler({
|
|
203
194
|
sdk: sdk,
|
|
204
195
|
channelListDispatcher: channelListDispatcher,
|
|
@@ -206,7 +197,7 @@ function setupChannelList(_ref3) {
|
|
|
206
197
|
logger: logger
|
|
207
198
|
});
|
|
208
199
|
} else {
|
|
209
|
-
logger.
|
|
200
|
+
logger.warning('ChannelList - createEventHandler: sdk or sdk.ChannelHandler does not exist', sdk);
|
|
210
201
|
}
|
|
211
202
|
|
|
212
203
|
logger.info('ChannelList - creating query', {
|
|
@@ -236,28 +227,10 @@ function setupChannelList(_ref3) {
|
|
|
236
227
|
logger.info('ChannelList - fetching channels');
|
|
237
228
|
|
|
238
229
|
if (channelListQuery.hasNext) {
|
|
239
|
-
channelListQuery.next(function (
|
|
230
|
+
channelListQuery.next().then(function (channelList) {
|
|
240
231
|
var _sdk$appInfo, _sdk$appInfo$premiumF;
|
|
241
232
|
|
|
242
|
-
|
|
243
|
-
var channelList = response;
|
|
244
|
-
var err = error;
|
|
245
|
-
|
|
246
|
-
if (swapParams) {
|
|
247
|
-
channelList = error;
|
|
248
|
-
err = response;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
logger.info('ChannelList - fetched channels', channelList);
|
|
252
|
-
|
|
253
|
-
if (err) {
|
|
254
|
-
logger.error('ChannelList - couldnt fetch channels', err);
|
|
255
|
-
channelListDispatcher({
|
|
256
|
-
type: INIT_CHANNELS_FAILURE
|
|
257
|
-
});
|
|
258
|
-
return;
|
|
259
|
-
} // select first channel
|
|
260
|
-
|
|
233
|
+
logger.info('ChannelList - fetched channels', channelList); // select first channel
|
|
261
234
|
|
|
262
235
|
logger.info('ChannelList - highlight channel', channelList[0]);
|
|
263
236
|
var sortedChannelList = channelList;
|
|
@@ -283,18 +256,23 @@ function setupChannelList(_ref3) {
|
|
|
283
256
|
});
|
|
284
257
|
|
|
285
258
|
if (canSetMarkAsDelivered) {
|
|
286
|
-
var _channelList;
|
|
287
|
-
|
|
288
259
|
logger.info('ChannelList: Marking all channels as read'); // eslint-disable-next-line no-unused-expressions
|
|
289
260
|
|
|
290
|
-
|
|
261
|
+
channelList.forEach(function (c, idx) {
|
|
291
262
|
// Plan-based rate limits - minimum limit is 5 requests per second
|
|
292
263
|
setTimeout(function () {
|
|
293
264
|
// eslint-disable-next-line no-unused-expressions
|
|
294
|
-
|
|
265
|
+
c.markAsDelivered();
|
|
295
266
|
}, 300 * idx);
|
|
296
267
|
});
|
|
297
268
|
}
|
|
269
|
+
}).catch(function (err) {
|
|
270
|
+
if (err) {
|
|
271
|
+
logger.error('ChannelList - couldnt fetch channels', err);
|
|
272
|
+
channelListDispatcher({
|
|
273
|
+
type: INIT_CHANNELS_FAILURE
|
|
274
|
+
});
|
|
275
|
+
}
|
|
298
276
|
});
|
|
299
277
|
} else {
|
|
300
278
|
logger.warning('ChannelList - there are no more channels');
|
|
@@ -310,16 +288,16 @@ var pubSubHandleRemover = function pubSubHandleRemover(subscriber) {
|
|
|
310
288
|
});
|
|
311
289
|
};
|
|
312
290
|
var pubSubHandler = function pubSubHandler(pubSub, channelListDispatcher) {
|
|
313
|
-
var
|
|
314
|
-
if (!pubSub) return
|
|
315
|
-
|
|
291
|
+
var subscriber = new Map();
|
|
292
|
+
if (!pubSub) return subscriber;
|
|
293
|
+
subscriber.set(CREATE_CHANNEL$1, pubSub.subscribe(CREATE_CHANNEL$1, function (msg) {
|
|
316
294
|
var channel = msg.channel;
|
|
317
295
|
channelListDispatcher({
|
|
318
296
|
type: 'CREATE_CHANNEL',
|
|
319
297
|
payload: channel
|
|
320
298
|
});
|
|
321
299
|
}));
|
|
322
|
-
|
|
300
|
+
subscriber.set(UPDATE_USER_MESSAGE, pubSub.subscribe(UPDATE_USER_MESSAGE, function (msg) {
|
|
323
301
|
var _updatedChannel$lastM;
|
|
324
302
|
|
|
325
303
|
var channel = msg.channel,
|
|
@@ -337,21 +315,21 @@ var pubSubHandler = function pubSubHandler(pubSub, channelListDispatcher) {
|
|
|
337
315
|
});
|
|
338
316
|
}
|
|
339
317
|
}));
|
|
340
|
-
|
|
318
|
+
subscriber.set(LEAVE_CHANNEL, pubSub.subscribe(LEAVE_CHANNEL, function (msg) {
|
|
341
319
|
var channel = msg.channel;
|
|
342
320
|
channelListDispatcher({
|
|
343
321
|
type: LEAVE_CHANNEL_SUCCESS,
|
|
344
|
-
payload: channel.url
|
|
322
|
+
payload: channel === null || channel === void 0 ? void 0 : channel.url
|
|
345
323
|
});
|
|
346
324
|
}));
|
|
347
|
-
|
|
325
|
+
subscriber.set(SEND_MESSAGE_START, pubSub.subscribe(SEND_MESSAGE_START, function (msg) {
|
|
348
326
|
var channel = msg.channel;
|
|
349
327
|
channelListDispatcher({
|
|
350
328
|
type: CHANNEL_REPLACED_TO_TOP,
|
|
351
329
|
payload: channel
|
|
352
330
|
});
|
|
353
331
|
}));
|
|
354
|
-
return
|
|
332
|
+
return subscriber;
|
|
355
333
|
};
|
|
356
334
|
|
|
357
335
|
var channelListInitialState = {
|
|
@@ -424,7 +402,7 @@ function reducer(state, action) {
|
|
|
424
402
|
|
|
425
403
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
426
404
|
allChannels: [channel].concat(_toConsumableArray(state.allChannels.filter(function (ch) {
|
|
427
|
-
return ch.url !== channel.url;
|
|
405
|
+
return ch.url !== (channel === null || channel === void 0 ? void 0 : channel.url);
|
|
428
406
|
}))),
|
|
429
407
|
currentChannel: channel
|
|
430
408
|
});
|
|
@@ -444,11 +422,11 @@ function reducer(state, action) {
|
|
|
444
422
|
}
|
|
445
423
|
}
|
|
446
424
|
|
|
447
|
-
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;
|
|
425
|
+
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;
|
|
448
426
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
449
427
|
allChannels: state.allChannels.filter(function (_ref2) {
|
|
450
428
|
var url = _ref2.url;
|
|
451
|
-
return url !== _channel.url;
|
|
429
|
+
return url !== (_channel === null || _channel === void 0 ? void 0 : _channel.url);
|
|
452
430
|
}),
|
|
453
431
|
currentChannel: state.disableAutoSelect ? null : nextChannel
|
|
454
432
|
});
|
|
@@ -485,7 +463,7 @@ function reducer(state, action) {
|
|
|
485
463
|
|
|
486
464
|
var _filteredChannels2 = getChannelsWithUpsertedChannel(state.allChannels, _channel2);
|
|
487
465
|
|
|
488
|
-
var _nextChannel3 = isMe && _channel2.url === ((_state$currentChannel3 = state.currentChannel) === null || _state$currentChannel3 === void 0 ? void 0 : _state$currentChannel3.url) ? _filteredChannels2[0] : state.currentChannel;
|
|
466
|
+
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;
|
|
489
467
|
|
|
490
468
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
491
469
|
currentChannel: state.disableAutoSelect ? null : _nextChannel3,
|
|
@@ -493,22 +471,22 @@ function reducer(state, action) {
|
|
|
493
471
|
});
|
|
494
472
|
}
|
|
495
473
|
|
|
496
|
-
var _nextChannel2 = _channel2.url === ((_state$currentChannel4 = state.currentChannel) === null || _state$currentChannel4 === void 0 ? void 0 : _state$currentChannel4.url) ? state.allChannels[0] : state.currentChannel;
|
|
474
|
+
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;
|
|
497
475
|
|
|
498
476
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
499
477
|
currentChannel: state.disableAutoSelect ? null : _nextChannel2,
|
|
500
478
|
allChannels: state.allChannels.filter(function (_ref4) {
|
|
501
479
|
var url = _ref4.url;
|
|
502
|
-
return url !== _channel2.url;
|
|
480
|
+
return url !== (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url);
|
|
503
481
|
})
|
|
504
482
|
});
|
|
505
483
|
}
|
|
506
484
|
|
|
507
485
|
var _filteredChannels = state.allChannels.filter(function (c) {
|
|
508
|
-
return !(c.url === _channel2.url && isMe);
|
|
486
|
+
return !(c.url === (_channel2 === null || _channel2 === void 0 ? void 0 : _channel2.url) && isMe);
|
|
509
487
|
});
|
|
510
488
|
|
|
511
|
-
var _nextChannel = isMe && _channel2.url === ((_state$currentChannel5 = state.currentChannel) === null || _state$currentChannel5 === void 0 ? void 0 : _state$currentChannel5.url) ? _filteredChannels[0] : state.currentChannel;
|
|
489
|
+
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;
|
|
512
490
|
|
|
513
491
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
514
492
|
currentChannel: state.disableAutoSelect ? null : _nextChannel,
|
|
@@ -525,7 +503,7 @@ function reducer(state, action) {
|
|
|
525
503
|
allChannels = _state$allChannels === void 0 ? [] : _state$allChannels;
|
|
526
504
|
var _channel3 = action.payload;
|
|
527
505
|
var unreadMessageCount = _channel3.unreadMessageCount;
|
|
528
|
-
if (!_channel3.lastMessage) return state;
|
|
506
|
+
if (!(_channel3 !== null && _channel3 !== void 0 && _channel3.lastMessage)) return state;
|
|
529
507
|
|
|
530
508
|
if (state.channelListQuery) {
|
|
531
509
|
var _state$currentChannel6;
|
|
@@ -536,14 +514,14 @@ function reducer(state, action) {
|
|
|
536
514
|
});
|
|
537
515
|
}
|
|
538
516
|
|
|
539
|
-
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
|
|
517
|
+
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
|
|
540
518
|
: state.currentChannel;
|
|
541
519
|
|
|
542
520
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
543
521
|
currentChannel: state.disableAutoSelect ? null : _nextChannel4,
|
|
544
522
|
allChannels: state.allChannels.filter(function (_ref5) {
|
|
545
523
|
var url = _ref5.url;
|
|
546
|
-
return url !== _channel3.url;
|
|
524
|
+
return url !== (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url);
|
|
547
525
|
})
|
|
548
526
|
});
|
|
549
527
|
} // if its only an unread message count change, dont push to top
|
|
@@ -552,14 +530,14 @@ function reducer(state, action) {
|
|
|
552
530
|
if (unreadMessageCount === 0) {
|
|
553
531
|
var currentChannel = allChannels.find(function (_ref6) {
|
|
554
532
|
var url = _ref6.url;
|
|
555
|
-
return url === _channel3.url;
|
|
533
|
+
return url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url);
|
|
556
534
|
});
|
|
557
535
|
var currentUnreadCount = currentChannel && currentChannel.unreadMessageCount;
|
|
558
536
|
|
|
559
537
|
if (currentUnreadCount === 0) {
|
|
560
538
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
561
539
|
allChannels: state.allChannels.map(function (ch) {
|
|
562
|
-
return ch.url === _channel3.url ? _channel3 : ch;
|
|
540
|
+
return ch.url === (_channel3 === null || _channel3 === void 0 ? void 0 : _channel3.url) ? _channel3 : ch;
|
|
563
541
|
})
|
|
564
542
|
});
|
|
565
543
|
}
|
|
@@ -589,11 +567,13 @@ function reducer(state, action) {
|
|
|
589
567
|
});
|
|
590
568
|
|
|
591
569
|
case ON_LAST_MESSAGE_UPDATED:
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
570
|
+
{
|
|
571
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
572
|
+
allChannels: state.allChannels.map(function (channel) {
|
|
573
|
+
return (channel === null || channel === void 0 ? void 0 : channel.url) === action.payload.url ? action.payload : channel;
|
|
574
|
+
})
|
|
575
|
+
});
|
|
576
|
+
}
|
|
597
577
|
|
|
598
578
|
case ON_CHANNEL_FROZEN:
|
|
599
579
|
{
|
|
@@ -608,13 +588,13 @@ function reducer(state, action) {
|
|
|
608
588
|
});
|
|
609
589
|
}
|
|
610
590
|
|
|
611
|
-
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
|
|
591
|
+
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
|
|
612
592
|
: state.currentChannel;
|
|
613
593
|
|
|
614
594
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
615
595
|
allChannels: state.allChannels.filter(function (_ref8) {
|
|
616
596
|
var url = _ref8.url;
|
|
617
|
-
return url !== _channel4.url;
|
|
597
|
+
return url !== (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url);
|
|
618
598
|
}),
|
|
619
599
|
currentChannel: state.disableAutoSelect ? null : _nextChannel5
|
|
620
600
|
});
|
|
@@ -622,7 +602,7 @@ function reducer(state, action) {
|
|
|
622
602
|
|
|
623
603
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
624
604
|
allChannels: state.allChannels.map(function (ch) {
|
|
625
|
-
if (ch.url === _channel4.url) {
|
|
605
|
+
if (ch.url === (_channel4 === null || _channel4 === void 0 ? void 0 : _channel4.url)) {
|
|
626
606
|
// eslint-disable-next-line no-param-reassign
|
|
627
607
|
ch.isFrozen = true;
|
|
628
608
|
return ch;
|
|
@@ -646,13 +626,13 @@ function reducer(state, action) {
|
|
|
646
626
|
});
|
|
647
627
|
}
|
|
648
628
|
|
|
649
|
-
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
|
|
629
|
+
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
|
|
650
630
|
: state.currentChannel;
|
|
651
631
|
|
|
652
632
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
653
633
|
allChannels: state.allChannels.filter(function (_ref9) {
|
|
654
634
|
var url = _ref9.url;
|
|
655
|
-
return url !== _channel5.url;
|
|
635
|
+
return url !== (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url);
|
|
656
636
|
}),
|
|
657
637
|
currentChannel: state.disableAutoSelect ? null : _nextChannel6
|
|
658
638
|
});
|
|
@@ -660,7 +640,7 @@ function reducer(state, action) {
|
|
|
660
640
|
|
|
661
641
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
662
642
|
allChannels: state.allChannels.map(function (ch) {
|
|
663
|
-
if (ch.url === _channel5.url) {
|
|
643
|
+
if (ch.url === (_channel5 === null || _channel5 === void 0 ? void 0 : _channel5.url)) {
|
|
664
644
|
// eslint-disable-next-line no-param-reassign
|
|
665
645
|
ch.isFrozen = false;
|
|
666
646
|
return ch;
|
|
@@ -675,7 +655,7 @@ function reducer(state, action) {
|
|
|
675
655
|
{
|
|
676
656
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
677
657
|
allChannels: [action.payload].concat(_toConsumableArray(state.allChannels.filter(function (channel) {
|
|
678
|
-
return channel.url !== action.payload.url;
|
|
658
|
+
return (channel === null || channel === void 0 ? void 0 : channel.url) !== action.payload.url;
|
|
679
659
|
})))
|
|
680
660
|
});
|
|
681
661
|
}
|
|
@@ -740,7 +720,7 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
740
720
|
logger = config.logger;
|
|
741
721
|
var isTypingIndicatorEnabledOnChannelList = config.isTypingIndicatorEnabledOnChannelList,
|
|
742
722
|
isMessageReceiptStatusEnabledOnChannelList = config.isMessageReceiptStatusEnabledOnChannelList;
|
|
743
|
-
var sdk = sdkStore.sdk; // derive some variables
|
|
723
|
+
var sdk = sdkStore === null || sdkStore === void 0 ? void 0 : sdkStore.sdk; // derive some variables
|
|
744
724
|
// enable if it is true atleast once(both are flase by default)
|
|
745
725
|
|
|
746
726
|
var userDefinedDisableUserProfile = disableUserProfile || (config === null || config === void 0 ? void 0 : config.disableUserProfile);
|
|
@@ -780,6 +760,8 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
780
760
|
};
|
|
781
761
|
}, [sdkIntialized]);
|
|
782
762
|
useEffect(function () {
|
|
763
|
+
var _a;
|
|
764
|
+
|
|
783
765
|
setSdkChannelHandlerId(uuidv4);
|
|
784
766
|
|
|
785
767
|
if (sdkIntialized) {
|
|
@@ -798,8 +780,8 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
798
780
|
} else {
|
|
799
781
|
logger.info('ChannelList: Removing channelHandlers'); // remove previous channelHandlers
|
|
800
782
|
|
|
801
|
-
if (
|
|
802
|
-
sdk.
|
|
783
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
784
|
+
sdk.groupChannel.removeGroupChannelHandler(sdkChannelHandlerId);
|
|
803
785
|
} // remove channelSource
|
|
804
786
|
|
|
805
787
|
|
|
@@ -812,40 +794,81 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
812
794
|
}
|
|
813
795
|
|
|
814
796
|
return function () {
|
|
797
|
+
var _a, _b;
|
|
798
|
+
|
|
815
799
|
logger.info('ChannelList: Removing channelHandlers');
|
|
816
800
|
|
|
817
|
-
if (sdk
|
|
818
|
-
sdk.
|
|
801
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
802
|
+
(_b = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _b === void 0 ? void 0 : _b.removeGroupChannelHandler(sdkChannelHandlerId);
|
|
819
803
|
}
|
|
820
804
|
};
|
|
821
805
|
}, [sdkIntialized, userFilledChannelListQuery, sortChannelList]);
|
|
822
806
|
useEffect(function () {
|
|
823
|
-
|
|
824
|
-
var handlerId = uuidv4();
|
|
825
|
-
var handler = new sdk.ChannelHandler();
|
|
807
|
+
var _a, _b;
|
|
826
808
|
|
|
827
|
-
|
|
828
|
-
|
|
809
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.addGroupChannelHandler) {
|
|
810
|
+
var handlerId = uuidv4();
|
|
811
|
+
var handler = new Yr({
|
|
812
|
+
onTypingStatusUpdated: function onTypingStatusUpdated(channel) {
|
|
813
|
+
var _a;
|
|
829
814
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
815
|
+
var typingMemberCount = (_a = channel === null || channel === void 0 ? void 0 : channel.getTypingUsers()) === null || _a === void 0 ? void 0 : _a.length;
|
|
816
|
+
var channelList = typingChannels.filter(function (ch) {
|
|
817
|
+
return ch.url !== channel.url;
|
|
818
|
+
});
|
|
834
819
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
820
|
+
if (typingMemberCount > 0) {
|
|
821
|
+
setTypingChannels(__spreadArray(__spreadArray([], channelList, true), [channel], false));
|
|
822
|
+
} else {
|
|
823
|
+
setTypingChannels(channelList);
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
onUnreadMemberStatusUpdated: function onUnreadMemberStatusUpdated(channel) {
|
|
827
|
+
channelListDispatcher({
|
|
828
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
829
|
+
payload: channel
|
|
830
|
+
});
|
|
831
|
+
},
|
|
832
|
+
onUndeliveredMemberStatusUpdated: function onUndeliveredMemberStatusUpdated(channel) {
|
|
833
|
+
channelListDispatcher({
|
|
834
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
835
|
+
payload: channel
|
|
836
|
+
});
|
|
837
|
+
},
|
|
838
|
+
onMessageUpdated: function onMessageUpdated(channel) {
|
|
839
|
+
channelListDispatcher({
|
|
840
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
841
|
+
payload: channel
|
|
842
|
+
});
|
|
843
|
+
sdk.groupChannel.getChannelWithoutCache(channel.url).then(function (ch) {
|
|
844
|
+
channelListDispatcher({
|
|
845
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
846
|
+
payload: ch
|
|
847
|
+
});
|
|
848
|
+
});
|
|
849
|
+
},
|
|
850
|
+
onMentionReceived: function onMentionReceived(channel) {
|
|
851
|
+
channelListDispatcher({
|
|
852
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
853
|
+
payload: channel
|
|
854
|
+
});
|
|
855
|
+
sdk.groupChannel.getChannelWithoutCache(channel.url).then(function (ch) {
|
|
856
|
+
channelListDispatcher({
|
|
857
|
+
type: ON_LAST_MESSAGE_UPDATED,
|
|
858
|
+
payload: ch
|
|
859
|
+
});
|
|
860
|
+
});
|
|
839
861
|
}
|
|
840
|
-
};
|
|
841
|
-
|
|
842
|
-
sdk.addChannelHandler(handlerId, handler);
|
|
862
|
+
});
|
|
863
|
+
(_b = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _b === void 0 ? void 0 : _b.addGroupChannelHandler(handlerId, handler);
|
|
843
864
|
setTypingHandlerId(handlerId);
|
|
844
865
|
}
|
|
845
866
|
|
|
846
867
|
return function () {
|
|
847
|
-
|
|
848
|
-
|
|
868
|
+
var _a;
|
|
869
|
+
|
|
870
|
+
if ((_a = sdk === null || sdk === void 0 ? void 0 : sdk.groupChannel) === null || _a === void 0 ? void 0 : _a.removeGroupChannelHandler) {
|
|
871
|
+
sdk.groupChannel.removeGroupChannelHandler(typingHandlerId);
|
|
849
872
|
}
|
|
850
873
|
};
|
|
851
874
|
}, [(_a = sdk === null || sdk === void 0 ? void 0 : sdk.currentUser) === null || _a === void 0 ? void 0 : _a.userId]);
|
|
@@ -872,11 +895,11 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
872
895
|
}
|
|
873
896
|
|
|
874
897
|
useEffect(function () {
|
|
875
|
-
if (!sdk || !sdk.
|
|
898
|
+
if (!sdk || !sdk.groupChannel || !currentChannel || !(currentChannel === null || currentChannel === void 0 ? void 0 : currentChannel.url)) {
|
|
876
899
|
return;
|
|
877
900
|
}
|
|
878
901
|
|
|
879
|
-
sdk.
|
|
902
|
+
sdk.groupChannel.getChannel(currentChannel.url).then(function (groupChannel) {
|
|
880
903
|
if (groupChannel) {
|
|
881
904
|
onChannelSelect(groupChannel);
|
|
882
905
|
} else {
|
|
@@ -908,7 +931,7 @@ var ChannelListProvider = function ChannelListProvider(props) {
|
|
|
908
931
|
disableUserProfile: userDefinedDisableUserProfile,
|
|
909
932
|
renderUserProfile: userDefinedRenderProfile
|
|
910
933
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
911
|
-
className: "sendbird-channel-list "
|
|
934
|
+
className: "sendbird-channel-list ".concat(className)
|
|
912
935
|
}, children)));
|
|
913
936
|
};
|
|
914
937
|
|
|
@@ -917,7 +940,5 @@ function useChannelListContext() {
|
|
|
917
940
|
return context;
|
|
918
941
|
}
|
|
919
942
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
export { ChannelListProvider as C, FETCH_CHANNELS_START as F, LEAVE_CHANNEL_SUCCESS as L, SET_CURRENT_CHANNEL as S, FETCH_CHANNELS_FAILURE as a, FETCH_CHANNELS_SUCCESS as b, useChannelList as c, useChannelListContext as u };
|
|
923
|
-
//# sourceMappingURL=ChannelListProvider-737ee36f.js.map
|
|
943
|
+
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 };
|
|
944
|
+
//# sourceMappingURL=ChannelListProvider-fec439b3.js.map
|