@sendbird/uikit-react 3.0.2 → 3.1.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +33 -32
- package/App.js.map +1 -1
- package/CHANGELOG.md +10 -0
- package/Channel/components/ChannelHeader.js +17 -17
- package/Channel/components/ChannelUI.js +24 -24
- package/Channel/components/FileViewer.js +16 -16
- package/Channel/components/FrozenNotification.js +5 -5
- package/Channel/components/Message.js +21 -21
- package/Channel/components/MessageInput.js +18 -18
- package/Channel/components/MessageList.js +23 -23
- package/Channel/components/RemoveMessageModal.js +19 -19
- package/Channel/components/SuggestedMentionList.js +17 -17
- package/Channel/components/TypingIndicator.js +16 -16
- package/Channel/components/UnreadCount.js +5 -5
- package/Channel/context.js +15 -15
- package/Channel.js +24 -24
- package/ChannelList/components/AddChannel.js +14 -14
- package/ChannelList/components/ChannelListHeader.js +7 -7
- package/ChannelList/components/ChannelListUI.js +28 -28
- package/ChannelList/components/ChannelPreview.js +21 -21
- package/ChannelList/components/ChannelPreviewAction.js +16 -16
- package/ChannelList/context.js +10 -10
- package/ChannelList.js +28 -28
- package/{ChannelListProvider-98ce41d2.js → ChannelListProvider-eb18fd28.js} +15 -19
- package/ChannelListProvider-eb18fd28.js.map +1 -0
- package/{ChannelProvider-6ea29e4a.js → ChannelProvider-595e56de.js} +11 -11
- package/{ChannelProvider-6ea29e4a.js.map → ChannelProvider-595e56de.js.map} +1 -1
- package/ChannelSettings/components/ChannelProfile.js +13 -13
- package/ChannelSettings/components/ChannelSettingsUI.js +20 -18
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +13 -13
- package/ChannelSettings/components/LeaveChannel.js +10 -10
- package/ChannelSettings/components/ModerationPanel.js +29 -26
- package/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/ChannelSettings/components/UserListItem.js +14 -14
- package/ChannelSettings/components/UserListItem.js.map +1 -1
- package/ChannelSettings/components/UserPanel.js +14 -14
- package/ChannelSettings/context.js +3 -3
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +20 -18
- package/ChannelSettings.js.map +1 -1
- package/CreateChannel/components/CreateChannelUI.js +14 -14
- package/CreateChannel/components/InviteUsers.js +29 -30
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +10 -10
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +14 -14
- package/{CreateChannelProvider-71012e62.js → CreateChannelProvider-53c05c06.js} +1 -1
- package/{CreateChannelProvider-71012e62.js.map → CreateChannelProvider-53c05c06.js.map} +1 -1
- package/EditUserProfile/components/EditUserProfileUI.js +13 -13
- package/EditUserProfile.js +13 -13
- package/{LocalizationContext-1417e9d3.js → LocalizationContext-9ecb0a32.js} +3 -3
- package/{LocalizationContext-1417e9d3.js.map → LocalizationContext-9ecb0a32.js.map} +1 -1
- package/{MemberList-351c6fcc.js → MemberList-b8d5b0a7.js} +25 -22
- package/MemberList-b8d5b0a7.js.map +1 -0
- package/MessageSearch/components/MessageSearchUI.js +11 -11
- package/MessageSearch/context.js +2 -2
- package/MessageSearch.js +11 -11
- package/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/OpenChannel/components/OpenChannelHeader.js +15 -14
- package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/OpenChannel/components/OpenChannelInput.js +19 -18
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +43 -28
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +27 -26
- package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/OpenChannel/components/OpenChannelUI.js +26 -25
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +12 -11
- package/OpenChannel/context.js.map +1 -1
- package/OpenChannel.js +26 -25
- package/OpenChannel.js.map +1 -1
- package/{OpenChannelProvider-5d02b219.js → OpenChannelProvider-5ff5a469.js} +43 -16
- package/OpenChannelProvider-5ff5a469.js.map +1 -0
- package/OpenChannelSettings/components/EditDetailsModal.js +15 -13
- package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelProfile.js +15 -13
- package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +23 -21
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +734 -27
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +30 -139
- package/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
- package/OpenChannelSettings/context.js +84 -9
- package/OpenChannelSettings/context.js.map +1 -1
- package/OpenChannelSettings.js +24 -22
- package/OpenChannelSettings.js.map +1 -1
- package/SendbirdProvider.js +15 -14
- package/SendbirdProvider.js.map +1 -1
- package/{UserProfileContext-c72e5006.js → UserProfileContext-c1834696.js} +1 -1
- package/{UserProfileContext-c72e5006.js.map → UserProfileContext-c1834696.js.map} +1 -1
- package/__bundle-7dfccc8c-b47a2b5a.js +22 -0
- package/__bundle-7dfccc8c-b47a2b5a.js.map +1 -0
- package/{_rollupPluginBabelHelpers-87a4819d.js → _rollupPluginBabelHelpers-31a1bb40.js} +1 -1
- package/{_rollupPluginBabelHelpers-87a4819d.js.map → _rollupPluginBabelHelpers-31a1bb40.js.map} +1 -1
- package/{actionTypes-52ff0372.js → actionTypes-3411a721.js} +1 -1
- package/{actionTypes-52ff0372.js.map → actionTypes-3411a721.js.map} +1 -1
- package/cjs/App.js +33 -32
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +17 -17
- package/cjs/Channel/components/ChannelUI.js +24 -24
- package/cjs/Channel/components/FileViewer.js +16 -16
- package/cjs/Channel/components/FrozenNotification.js +5 -5
- package/cjs/Channel/components/Message.js +21 -21
- package/cjs/Channel/components/MessageInput.js +18 -18
- package/cjs/Channel/components/MessageList.js +23 -23
- package/cjs/Channel/components/RemoveMessageModal.js +19 -19
- package/cjs/Channel/components/SuggestedMentionList.js +17 -17
- package/cjs/Channel/components/TypingIndicator.js +16 -16
- package/cjs/Channel/components/UnreadCount.js +5 -5
- package/cjs/Channel/context.js +15 -15
- package/cjs/Channel.js +24 -24
- package/cjs/ChannelList/components/AddChannel.js +14 -14
- package/cjs/ChannelList/components/ChannelListHeader.js +7 -7
- package/cjs/ChannelList/components/ChannelListUI.js +28 -28
- package/cjs/ChannelList/components/ChannelPreview.js +21 -21
- package/cjs/ChannelList/components/ChannelPreviewAction.js +16 -16
- package/cjs/ChannelList/context.js +10 -10
- package/cjs/ChannelList.js +28 -28
- package/cjs/{ChannelListProvider-aa33f9fb.js → ChannelListProvider-77312a96.js} +15 -19
- package/cjs/ChannelListProvider-77312a96.js.map +1 -0
- package/cjs/{ChannelProvider-0dbd1be6.js → ChannelProvider-4a475535.js} +11 -11
- package/cjs/{ChannelProvider-0dbd1be6.js.map → ChannelProvider-4a475535.js.map} +1 -1
- package/cjs/ChannelSettings/components/ChannelProfile.js +13 -13
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +20 -18
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +13 -13
- package/cjs/ChannelSettings/components/LeaveChannel.js +10 -10
- package/cjs/ChannelSettings/components/ModerationPanel.js +28 -25
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/cjs/ChannelSettings/components/UserListItem.js +14 -14
- package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
- package/cjs/ChannelSettings/components/UserPanel.js +14 -14
- package/cjs/ChannelSettings/context.js +3 -3
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +20 -18
- package/cjs/ChannelSettings.js.map +1 -1
- package/cjs/CreateChannel/components/CreateChannelUI.js +14 -14
- package/cjs/CreateChannel/components/InviteUsers.js +29 -30
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +10 -10
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +14 -14
- package/cjs/{CreateChannelProvider-08837dcb.js → CreateChannelProvider-01d4eaf6.js} +1 -1
- package/cjs/{CreateChannelProvider-08837dcb.js.map → CreateChannelProvider-01d4eaf6.js.map} +1 -1
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +13 -13
- package/cjs/EditUserProfile.js +13 -13
- package/cjs/{LocalizationContext-c0dc9e2f.js → LocalizationContext-a705c60f.js} +3 -3
- package/cjs/{LocalizationContext-c0dc9e2f.js.map → LocalizationContext-a705c60f.js.map} +1 -1
- package/cjs/{MemberList-17f30c30.js → MemberList-8b5f5e4a.js} +24 -21
- package/cjs/MemberList-8b5f5e4a.js.map +1 -0
- package/cjs/MessageSearch/components/MessageSearchUI.js +11 -11
- package/cjs/MessageSearch/context.js +2 -2
- package/cjs/MessageSearch.js +11 -11
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +5 -5
- package/cjs/OpenChannel/components/OpenChannelHeader.js +15 -14
- package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelInput.js +19 -18
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +43 -28
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +27 -26
- package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelUI.js +26 -25
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +12 -11
- package/cjs/OpenChannel/context.js.map +1 -1
- package/cjs/OpenChannel.js +26 -25
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/{OpenChannelProvider-2d921cf0.js → OpenChannelProvider-7cf4ccbe.js} +43 -16
- package/cjs/OpenChannelProvider-7cf4ccbe.js.map +1 -0
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +15 -13
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +15 -13
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +23 -21
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +733 -26
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +31 -140
- package/cjs/OpenChannelSettings/components/ParticipantUI.js.map +1 -1
- package/cjs/OpenChannelSettings/context.js +84 -9
- package/cjs/OpenChannelSettings/context.js.map +1 -1
- package/cjs/OpenChannelSettings.js +24 -22
- package/cjs/OpenChannelSettings.js.map +1 -1
- package/cjs/SendbirdProvider.js +16 -14
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/{UserProfileContext-2bd8a987.js → UserProfileContext-f46c65c9.js} +1 -1
- package/cjs/{UserProfileContext-2bd8a987.js.map → UserProfileContext-f46c65c9.js.map} +1 -1
- package/cjs/__bundle-7dfccc8c-70a9c008.js +120 -0
- package/cjs/__bundle-7dfccc8c-70a9c008.js.map +1 -0
- package/cjs/{_rollupPluginBabelHelpers-59502943.js → _rollupPluginBabelHelpers-d4231746.js} +1 -1
- package/cjs/{_rollupPluginBabelHelpers-59502943.js.map → _rollupPluginBabelHelpers-d4231746.js.map} +1 -1
- package/cjs/{actionTypes-d637dc1d.js → actionTypes-ef5574ae.js} +1 -1
- package/cjs/{actionTypes-d637dc1d.js.map → actionTypes-ef5574ae.js.map} +1 -1
- package/cjs/{color-57d2d881.js → color-f1d22e48.js} +1 -1
- package/cjs/{color-57d2d881.js.map → color-f1d22e48.js.map} +1 -1
- package/cjs/{compareIds-70f7ec01.js → compareIds-09284eb5.js} +1 -1
- package/cjs/{compareIds-70f7ec01.js.map → compareIds-09284eb5.js.map} +1 -1
- package/cjs/{const-79c19d9a.js → const-6ff8b2d7.js} +1 -1
- package/cjs/{const-79c19d9a.js.map → const-6ff8b2d7.js.map} +1 -1
- package/cjs/{const-cddf6176.js → const-a0e65c1f.js} +1 -1
- package/cjs/{const-cddf6176.js.map → const-a0e65c1f.js.map} +1 -1
- package/cjs/{context-277763cc.js → context-3116d4af.js} +2 -2
- package/cjs/{context-277763cc.js.map → context-3116d4af.js.map} +1 -1
- package/cjs/dist/index.css +154 -105
- package/cjs/dist/index.css.map +1 -1
- package/cjs/groupChannel-c120b8c6.js +11 -0
- package/cjs/groupChannel-c120b8c6.js.map +1 -0
- package/cjs/{index-7970f43b.js → index-04096e45.js} +2 -2
- package/cjs/{index-7970f43b.js.map → index-04096e45.js.map} +1 -1
- package/cjs/{index-f73b522b.js → index-100d673e.js} +2 -2
- package/cjs/{index-f73b522b.js.map → index-100d673e.js.map} +1 -1
- package/cjs/{index-f10a973e.js → index-30ce73c3.js} +3 -3
- package/cjs/{index-f10a973e.js.map → index-30ce73c3.js.map} +1 -1
- package/cjs/{index-f3df6bb6.js → index-6a22f079.js} +6 -6
- package/cjs/{index-f3df6bb6.js.map → index-6a22f079.js.map} +1 -1
- package/cjs/{index-cb29dc31.js → index-7efed648.js} +4 -4
- package/cjs/{index-cb29dc31.js.map → index-7efed648.js.map} +1 -1
- package/cjs/{index-0e3ec349.js → index-876b2b8c.js} +1 -1
- package/cjs/{index-0e3ec349.js.map → index-876b2b8c.js.map} +1 -1
- package/cjs/{index-897ebaf9.js → index-98ff8992.js} +1 -1
- package/cjs/{index-897ebaf9.js.map → index-98ff8992.js.map} +1 -1
- package/cjs/index-9deff671.js +358 -0
- package/cjs/index-9deff671.js.map +1 -0
- package/cjs/{index-8c6ece9e.js → index-ac60aa9e.js} +4 -4
- package/cjs/{index-8c6ece9e.js.map → index-ac60aa9e.js.map} +1 -1
- package/cjs/{index-54177640.js → index-bb59494a.js} +5 -5
- package/cjs/index-bb59494a.js.map +1 -0
- package/cjs/{index-5755be7f.js → index-ed5d5e9d.js} +3 -3
- package/cjs/{index-5755be7f.js.map → index-ed5d5e9d.js.map} +1 -1
- package/cjs/index.js +38 -36
- package/cjs/index.js.map +1 -1
- package/cjs/openChannel-8c980cdb.js +9 -0
- package/cjs/openChannel-8c980cdb.js.map +1 -0
- package/cjs/{openChannelUtils-250d464a.js → openChannelUtils-eb30b158.js} +1 -2
- package/cjs/{openChannelUtils-250d464a.js.map → openChannelUtils-eb30b158.js.map} +1 -1
- package/cjs/sendbirdSelectors.js +4 -4
- package/cjs/sendbirdSelectors.js.map +1 -1
- package/cjs/{stringSet-8a5752c1.js → stringSet-4e80362c.js} +28 -3
- package/cjs/stringSet-4e80362c.js.map +1 -0
- package/cjs/{topics-5541d80a.js → topics-1ea796fe.js} +1 -1
- package/cjs/{topics-5541d80a.js.map → topics-1ea796fe.js.map} +1 -1
- package/cjs/{tslib.es6-999b9d2f.js → tslib.es6-5520d66d.js} +1 -1
- package/cjs/{tslib.es6-999b9d2f.js.map → tslib.es6-5520d66d.js.map} +1 -1
- package/cjs/ui/Accordion.js +4 -4
- package/cjs/ui/AccordionGroup.js +2 -2
- package/cjs/ui/AdminMessage.js +3 -3
- 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 +4 -4
- package/cjs/ui/ChannelPreview.js +12 -12
- package/cjs/ui/ChatHeader.js +8 -8
- package/cjs/ui/Checkbox.js +12 -24
- package/cjs/ui/Checkbox.js.map +1 -1
- package/cjs/ui/ConnectionStatus.js +5 -5
- package/cjs/ui/ContextMenu.js +5 -5
- package/cjs/ui/DateSeparator.js +4 -4
- package/cjs/ui/Dropdown.js +3 -3
- package/cjs/ui/EmojiReactions.js +7 -7
- package/cjs/ui/FileMessageItemBody.js +6 -6
- package/cjs/ui/FileViewer.js +7 -7
- package/cjs/ui/Icon.js +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 +11 -11
- package/cjs/ui/MessageContent.js +14 -14
- package/cjs/ui/MessageInput.js +10 -10
- package/cjs/ui/MessageItemMenu.js +7 -7
- package/cjs/ui/MessageItemReactionMenu.js +5 -5
- package/cjs/ui/MessageSearchFileItem.js +10 -10
- package/cjs/ui/MessageSearchItem.js +10 -10
- package/cjs/ui/MessageStatus.js +8 -8
- package/cjs/ui/Modal.js +12 -9
- package/cjs/ui/Modal.js.map +1 -1
- package/cjs/ui/MutedAvatarOverlay.js +1 -1
- package/cjs/ui/OGMessageItemBody.js +11 -11
- package/cjs/ui/OpenChannelAdminMessage.js +4 -4
- package/cjs/ui/OpenChannelAvatar.js +7 -7
- package/cjs/ui/OpenchannelConversationHeader.js +7 -7
- package/cjs/ui/OpenchannelFileMessage.js +17 -17
- package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
- package/cjs/ui/OpenchannelOGMessage.js +17 -17
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +16 -16
- package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/cjs/ui/OpenchannelUserMessage.js +17 -17
- package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
- package/cjs/ui/PlaceHolder.js +6 -6
- package/cjs/ui/QuoteMessage.js +7 -7
- package/cjs/ui/QuoteMessageInput.js +7 -7
- 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 +11 -11
- package/cjs/ui/ThumbnailMessageItemBody.js +3 -3
- package/cjs/ui/Tooltip.js +3 -3
- package/cjs/ui/TooltipWrapper.js +1 -1
- package/cjs/ui/UnknownMessageItemBody.js +7 -7
- package/cjs/ui/UserListItem.js +34 -62
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +10 -10
- package/cjs/ui/Word.js +11 -11
- package/cjs/useSendbirdStateContext.js +1 -1
- package/cjs/{utils-2e571594.js → utils-84bab0ba.js} +1 -1
- package/cjs/{utils-2e571594.js.map → utils-84bab0ba.js.map} +1 -1
- package/cjs/{utils-fdc85251.js → utils-a34410a9.js} +1 -1
- package/cjs/{utils-fdc85251.js.map → utils-a34410a9.js.map} +1 -1
- package/cjs/{utils-0b87e6c8.js → utils-cb9aac85.js} +1 -1
- package/cjs/{utils-0b87e6c8.js.map → utils-cb9aac85.js.map} +1 -1
- package/cjs/{uuid-c1af9ac6.js → uuid-51919e62.js} +1 -1
- package/cjs/{uuid-c1af9ac6.js.map → uuid-51919e62.js.map} +1 -1
- package/cjs/withSendbird.js +1 -1
- package/{color-32ee546e.js → color-0d32d75b.js} +1 -1
- package/{color-32ee546e.js.map → color-0d32d75b.js.map} +1 -1
- package/{compareIds-9b3202b9.js → compareIds-2a25c4fd.js} +1 -1
- package/{compareIds-9b3202b9.js.map → compareIds-2a25c4fd.js.map} +1 -1
- package/{const-c2efe3b4.js → const-58f24b74.js} +1 -1
- package/{const-c2efe3b4.js.map → const-58f24b74.js.map} +1 -1
- package/{const-7b1f25aa.js → const-6d03d727.js} +1 -1
- package/{const-7b1f25aa.js.map → const-6d03d727.js.map} +1 -1
- package/{context-4a3c0658.js → context-53e8285b.js} +2 -2
- package/{context-4a3c0658.js.map → context-53e8285b.js.map} +1 -1
- package/dist/index.css +154 -105
- package/dist/index.css.map +1 -1
- package/groupChannel-1c5076e4.js +8 -0
- package/groupChannel-1c5076e4.js.map +1 -0
- package/{index-f9e25c08.js → index-1cb86f16.js} +2 -2
- package/{index-f9e25c08.js.map → index-1cb86f16.js.map} +1 -1
- package/{index-fdcc4a92.js → index-3b997158.js} +3 -3
- package/{index-fdcc4a92.js.map → index-3b997158.js.map} +1 -1
- package/{index-097f4b78.js → index-526e1c2f.js} +1 -1
- package/{index-097f4b78.js.map → index-526e1c2f.js.map} +1 -1
- package/{index-f457e0cd.js → index-5751f53d.js} +4 -4
- package/{index-f457e0cd.js.map → index-5751f53d.js.map} +1 -1
- package/{index-ff084076.js → index-64bbdf03.js} +3 -3
- package/{index-ff084076.js.map → index-64bbdf03.js.map} +1 -1
- package/{index-e647d770.js → index-8cd47fe5.js} +5 -5
- package/index-8cd47fe5.js.map +1 -0
- package/{index-b9a5ff91.js → index-a6ed3522.js} +1 -1
- package/{index-b9a5ff91.js.map → index-a6ed3522.js.map} +1 -1
- package/index-a754a6e3.js +351 -0
- package/index-a754a6e3.js.map +1 -0
- package/{index-f86f98c3.js → index-c535b427.js} +6 -6
- package/{index-f86f98c3.js.map → index-c535b427.js.map} +1 -1
- package/{index-89c172fc.js → index-fd29af9b.js} +2 -2
- package/{index-89c172fc.js.map → index-fd29af9b.js.map} +1 -1
- package/{index-12f6f771.js → index-fe143e10.js} +4 -4
- package/{index-12f6f771.js.map → index-fe143e10.js.map} +1 -1
- package/index.d.ts +28 -16
- package/index.js +38 -37
- package/index.js.map +1 -1
- package/openChannel-243ce500.js +6 -0
- package/openChannel-243ce500.js.map +1 -0
- package/{openChannelUtils-588d2978.js → openChannelUtils-d942de1a.js} +2 -2
- package/{openChannelUtils-588d2978.js.map → openChannelUtils-d942de1a.js.map} +1 -1
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/sendbirdSelectors.js +4 -4
- package/sendbirdSelectors.js.map +1 -1
- package/{stringSet-adf0eb59.js → stringSet-8f56c095.js} +28 -3
- package/stringSet-8f56c095.js.map +1 -0
- package/{topics-29b13da4.js → topics-27c99fc7.js} +1 -1
- package/{topics-29b13da4.js.map → topics-27c99fc7.js.map} +1 -1
- package/{tslib.es6-5a2250f9.js → tslib.es6-70020af6.js} +1 -1
- package/{tslib.es6-5a2250f9.js.map → tslib.es6-70020af6.js.map} +1 -1
- package/ui/Accordion.js +4 -4
- package/ui/AccordionGroup.js +2 -2
- package/ui/AdminMessage.js +3 -3
- package/ui/Avatar.js +3 -3
- package/ui/Badge.js +5 -5
- package/ui/Button.js +4 -4
- package/ui/ChannelAvatar.js +4 -4
- package/ui/ChannelPreview.js +12 -12
- package/ui/ChatHeader.js +8 -8
- package/ui/Checkbox.js +12 -23
- package/ui/Checkbox.js.map +1 -1
- package/ui/ConnectionStatus.js +5 -5
- package/ui/ContextMenu.js +5 -5
- package/ui/DateSeparator.js +4 -4
- package/ui/Dropdown.js +3 -3
- package/ui/EmojiReactions.js +7 -7
- package/ui/FileMessageItemBody.js +6 -6
- package/ui/FileViewer.js +7 -7
- package/ui/Icon.js +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 +11 -11
- package/ui/MessageContent.js +14 -14
- package/ui/MessageInput.js +10 -10
- package/ui/MessageItemMenu.js +7 -7
- package/ui/MessageItemReactionMenu.js +5 -5
- package/ui/MessageSearchFileItem.js +10 -10
- package/ui/MessageSearchItem.js +10 -10
- package/ui/MessageStatus.js +8 -8
- package/ui/Modal.js +12 -9
- package/ui/Modal.js.map +1 -1
- package/ui/MutedAvatarOverlay.js +1 -1
- package/ui/OGMessageItemBody.js +11 -11
- package/ui/OpenChannelAdminMessage.js +4 -4
- package/ui/OpenChannelAvatar.js +7 -7
- package/ui/OpenchannelConversationHeader.js +7 -7
- package/ui/OpenchannelFileMessage.js +17 -17
- package/ui/OpenchannelFileMessage.js.map +1 -1
- package/ui/OpenchannelOGMessage.js +17 -17
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +16 -16
- package/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/ui/OpenchannelUserMessage.js +17 -17
- package/ui/OpenchannelUserMessage.js.map +1 -1
- package/ui/PlaceHolder.js +6 -6
- package/ui/QuoteMessage.js +7 -7
- package/ui/QuoteMessageInput.js +7 -7
- 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 +11 -11
- package/ui/ThumbnailMessageItemBody.js +3 -3
- package/ui/Tooltip.js +3 -3
- package/ui/TooltipWrapper.js +1 -1
- package/ui/UnknownMessageItemBody.js +7 -7
- package/ui/UserListItem.js +34 -61
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +10 -10
- package/ui/Word.js +11 -11
- package/useSendbirdStateContext.js +1 -1
- package/{utils-3702c3d4.js → utils-c7599c37.js} +1 -1
- package/{utils-3702c3d4.js.map → utils-c7599c37.js.map} +1 -1
- package/{utils-ad16f26f.js → utils-e3bda5a7.js} +1 -1
- package/{utils-ad16f26f.js.map → utils-e3bda5a7.js.map} +1 -1
- package/{utils-e6f6eb1b.js → utils-e5523522.js} +1 -1
- package/{utils-e6f6eb1b.js.map → utils-e5523522.js.map} +1 -1
- package/{uuid-9ac267fb.js → uuid-118d6514.js} +1 -1
- package/{uuid-9ac267fb.js.map → uuid-118d6514.js.map} +1 -1
- package/withSendbird.js +1 -1
- package/ChannelListProvider-98ce41d2.js.map +0 -1
- package/MemberList-351c6fcc.js.map +0 -1
- package/OpenChannelProvider-5d02b219.js.map +0 -1
- package/__bundle-7dfccc8c-be772b9c.js +0 -4396
- package/__bundle-7dfccc8c-be772b9c.js.map +0 -1
- package/cjs/ChannelListProvider-aa33f9fb.js.map +0 -1
- package/cjs/MemberList-17f30c30.js.map +0 -1
- package/cjs/OpenChannelProvider-2d921cf0.js.map +0 -1
- package/cjs/__bundle-7dfccc8c-92c0a42c.js +0 -4523
- package/cjs/__bundle-7dfccc8c-92c0a42c.js.map +0 -1
- package/cjs/groupChannel-65c54bfa.js +0 -9
- package/cjs/groupChannel-65c54bfa.js.map +0 -1
- package/cjs/index-54177640.js.map +0 -1
- package/cjs/openChannel-0e621900.js +0 -5251
- package/cjs/openChannel-0e621900.js.map +0 -1
- package/cjs/stringSet-8a5752c1.js.map +0 -1
- package/groupChannel-7e48e30f.js +0 -6
- package/groupChannel-7e48e30f.js.map +0 -1
- package/index-e647d770.js.map +0 -1
- package/openChannel-4de8ae5b.js +0 -5246
- package/openChannel-4de8ae5b.js.map +0 -1
- package/stringSet-adf0eb59.js.map +0 -1
package/ui/MessageInput.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as _slicedToArray, _ as _objectSpread2, b as _toConsumableArray } from '../_rollupPluginBabelHelpers-
|
|
1
|
+
import { a as _slicedToArray, _ as _objectSpread2, b as _toConsumableArray } from '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
2
2
|
import React__default, { useContext, useRef, useState, useMemo, useEffect, useCallback } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { N as NodeTypes, M as MessageInputKeys, a as NodeNames } from '../const-
|
|
5
|
-
import { U as USER_MENTION_TEMP_CHAR } from '../const-
|
|
4
|
+
import { N as NodeTypes, M as MessageInputKeys, a as NodeNames } from '../const-6d03d727.js';
|
|
5
|
+
import { U as USER_MENTION_TEMP_CHAR } from '../const-58f24b74.js';
|
|
6
6
|
import IconButton from './IconButton.js';
|
|
7
|
-
import { B as Button, a as ButtonTypes, b as ButtonSizes } from '../index-
|
|
7
|
+
import { B as Button, a as ButtonTypes, b as ButtonSizes } from '../index-64bbdf03.js';
|
|
8
8
|
import MentionUserLabel from './MentionUserLabel.js';
|
|
9
9
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
10
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
11
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
12
|
-
import { l as convertWordToStringObj, S as StringObjType, m as arrayEqual, k as getClassName } from '../index-
|
|
13
|
-
import '../stringSet-
|
|
14
|
-
import '../index-
|
|
15
|
-
import '../tslib.es6-
|
|
10
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
11
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
12
|
+
import { l as convertWordToStringObj, S as StringObjType, m as arrayEqual, k as getClassName } from '../index-8cd47fe5.js';
|
|
13
|
+
import '../stringSet-8f56c095.js';
|
|
14
|
+
import '../index-526e1c2f.js';
|
|
15
|
+
import '../tslib.es6-70020af6.js';
|
|
16
16
|
|
|
17
17
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
18
18
|
|
package/ui/MessageItemMenu.js
CHANGED
|
@@ -2,16 +2,16 @@ import React__default, { useContext, useRef } from 'react';
|
|
|
2
2
|
import ContextMenu, { MenuItems, MenuItem } from './ContextMenu.js';
|
|
3
3
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
4
4
|
import IconButton from './IconButton.js';
|
|
5
|
-
import { u as isUserMessage, D as isSentMessage, E as isFailedMessage, F as isPendingMessage, k as getClassName, G as copyToClipboard } from '../index-
|
|
6
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
7
|
-
import '../_rollupPluginBabelHelpers-
|
|
5
|
+
import { u as isUserMessage, D as isSentMessage, E as isFailedMessage, F as isPendingMessage, k as getClassName, G as copyToClipboard } from '../index-8cd47fe5.js';
|
|
6
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
7
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
8
8
|
import 'prop-types';
|
|
9
|
-
import '../index-
|
|
10
|
-
import '../stringSet-
|
|
9
|
+
import '../index-3b997158.js';
|
|
10
|
+
import '../stringSet-8f56c095.js';
|
|
11
11
|
import 'react-dom';
|
|
12
12
|
import './SortByRow.js';
|
|
13
|
-
import '../tslib.es6-
|
|
14
|
-
import '../index-
|
|
13
|
+
import '../tslib.es6-70020af6.js';
|
|
14
|
+
import '../index-526e1c2f.js';
|
|
15
15
|
|
|
16
16
|
function MessageItemMenu(_a) {
|
|
17
17
|
var className = _a.className,
|
|
@@ -4,14 +4,14 @@ import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
|
4
4
|
import IconButton from './IconButton.js';
|
|
5
5
|
import ImageRenderer from './ImageRenderer.js';
|
|
6
6
|
import ReactionButton from './ReactionButton.js';
|
|
7
|
-
import { F as isPendingMessage, E as isFailedMessage, k as getClassName, H as getEmojiListAll } from '../index-
|
|
8
|
-
import '../_rollupPluginBabelHelpers-
|
|
7
|
+
import { F as isPendingMessage, E as isFailedMessage, k as getClassName, H as getEmojiListAll } from '../index-8cd47fe5.js';
|
|
8
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
9
9
|
import 'prop-types';
|
|
10
|
-
import '../index-
|
|
11
|
-
import '../stringSet-
|
|
10
|
+
import '../index-3b997158.js';
|
|
11
|
+
import '../stringSet-8f56c095.js';
|
|
12
12
|
import 'react-dom';
|
|
13
13
|
import './SortByRow.js';
|
|
14
|
-
import '../tslib.es6-
|
|
14
|
+
import '../tslib.es6-70020af6.js';
|
|
15
15
|
|
|
16
16
|
function MessageItemReactionMenu(_a) {
|
|
17
17
|
var className = _a.className,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import Avatar from './Avatar.js';
|
|
4
4
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
5
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
6
|
-
import { u as useLocalization } from '../LocalizationContext-
|
|
7
|
-
import { f as format } from '../index-
|
|
8
|
-
import { i as isToday, a as isYesterday, f as formatRelative } from '../index-
|
|
5
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
6
|
+
import { u as useLocalization } from '../LocalizationContext-9ecb0a32.js';
|
|
7
|
+
import { f as format } from '../index-fd29af9b.js';
|
|
8
|
+
import { i as isToday, a as isYesterday, f as formatRelative } from '../index-5751f53d.js';
|
|
9
9
|
import './ImageRenderer.js';
|
|
10
|
-
import '../_rollupPluginBabelHelpers-
|
|
10
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
11
11
|
import 'prop-types';
|
|
12
|
-
import '../uuid-
|
|
13
|
-
import '../stringSet-
|
|
14
|
-
import '../index-
|
|
15
|
-
import '../index-
|
|
12
|
+
import '../uuid-118d6514.js';
|
|
13
|
+
import '../stringSet-8f56c095.js';
|
|
14
|
+
import '../index-526e1c2f.js';
|
|
15
|
+
import '../index-1cb86f16.js';
|
|
16
16
|
|
|
17
17
|
function getCreatedAt(createdAt, locale) {
|
|
18
18
|
var optionalParam = locale ? {
|
package/ui/MessageSearchItem.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { f as format } from '../index-
|
|
4
|
-
import { i as isToday, a as isYesterday, f as formatRelative } from '../index-
|
|
3
|
+
import { f as format } from '../index-fd29af9b.js';
|
|
4
|
+
import { i as isToday, a as isYesterday, f as formatRelative } from '../index-5751f53d.js';
|
|
5
5
|
import Avatar from './Avatar.js';
|
|
6
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
7
|
-
import { u as useLocalization } from '../LocalizationContext-
|
|
8
|
-
import '../index-
|
|
9
|
-
import '../index-
|
|
6
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
7
|
+
import { u as useLocalization } from '../LocalizationContext-9ecb0a32.js';
|
|
8
|
+
import '../index-526e1c2f.js';
|
|
9
|
+
import '../index-1cb86f16.js';
|
|
10
10
|
import './ImageRenderer.js';
|
|
11
|
-
import '../_rollupPluginBabelHelpers-
|
|
11
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
12
12
|
import 'prop-types';
|
|
13
13
|
import './Icon.js';
|
|
14
|
-
import '../uuid-
|
|
15
|
-
import '../stringSet-
|
|
14
|
+
import '../uuid-118d6514.js';
|
|
15
|
+
import '../stringSet-8f56c095.js';
|
|
16
16
|
|
|
17
17
|
function getCreatedAt (createdAt, locale) {
|
|
18
18
|
var optionalParam = locale ? {
|
package/ui/MessageStatus.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
|
-
import { f as format } from '../index-
|
|
3
|
+
import { f as format } from '../index-fd29af9b.js';
|
|
4
4
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
5
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
5
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
6
6
|
import Loader from './Loader.js';
|
|
7
|
-
import { a as getOutgoingMessageStates, h as getOutgoingMessageState, j as isSentStatus } from '../index-
|
|
8
|
-
import { u as useLocalization } from '../LocalizationContext-
|
|
9
|
-
import '../index-
|
|
10
|
-
import '../_rollupPluginBabelHelpers-
|
|
7
|
+
import { a as getOutgoingMessageStates, h as getOutgoingMessageState, j as isSentStatus } from '../index-8cd47fe5.js';
|
|
8
|
+
import { u as useLocalization } from '../LocalizationContext-9ecb0a32.js';
|
|
9
|
+
import '../index-526e1c2f.js';
|
|
10
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
11
11
|
import 'prop-types';
|
|
12
|
-
import '../stringSet-
|
|
12
|
+
import '../stringSet-8f56c095.js';
|
|
13
13
|
|
|
14
14
|
var MessageStatusTypes = getOutgoingMessageStates();
|
|
15
15
|
function MessageStatus(_a) {
|
package/ui/Modal.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React__default, { useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
5
|
-
import { M as MODAL_ROOT } from '../index-
|
|
4
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
5
|
+
import { M as MODAL_ROOT } from '../index-a6ed3522.js';
|
|
6
6
|
import IconButton from './IconButton.js';
|
|
7
7
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
8
|
-
import { B as Button, a as ButtonTypes } from '../index-
|
|
9
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
10
|
-
import { n as noop } from '../utils-
|
|
11
|
-
import '../stringSet-
|
|
12
|
-
import '../index-
|
|
13
|
-
import '../_rollupPluginBabelHelpers-
|
|
8
|
+
import { B as Button, a as ButtonTypes } from '../index-64bbdf03.js';
|
|
9
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
10
|
+
import { n as noop } from '../utils-e5523522.js';
|
|
11
|
+
import '../stringSet-8f56c095.js';
|
|
12
|
+
import '../index-526e1c2f.js';
|
|
13
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
14
14
|
|
|
15
15
|
var ModalHeader = function ModalHeader(_ref) {
|
|
16
16
|
var titleText = _ref.titleText;
|
|
@@ -28,7 +28,10 @@ var ModalBody = function ModalBody(_ref2) {
|
|
|
28
28
|
var children = _ref2.children;
|
|
29
29
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
30
30
|
className: "sendbird-modal__body"
|
|
31
|
-
},
|
|
31
|
+
}, /*#__PURE__*/React__default.createElement(Label, {
|
|
32
|
+
type: LabelTypography.SUBTITLE_1,
|
|
33
|
+
color: LabelColors.ONBACKGROUND_2
|
|
34
|
+
}, children));
|
|
32
35
|
};
|
|
33
36
|
ModalBody.propTypes = {
|
|
34
37
|
children: PropTypes.oneOfType([PropTypes.element.isRequired, PropTypes.arrayOf(PropTypes.element.isRequired)])
|
package/ui/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../src/ui/Modal/index.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { createPortal } from 'react-dom';\n\nimport './index.scss';\n\nimport { LocalizationContext } from '../../lib/LocalizationContext';\nimport { MODAL_ROOT } from '../../hooks/useModal/ModalRoot';\nimport IconButton from '../IconButton';\nimport Icon, { IconTypes, IconColors } from '../Icon';\nimport Button, { ButtonTypes } from '../Button';\nimport Label, { LabelTypography, LabelColors } from '../Label';\nimport { noop } from '../../utils/utils';\n\nexport const ModalHeader = ({ titleText }) => (\n <div className=\"sendbird-modal__header\">\n <Label type={LabelTypography.H_1} color={LabelColors.ONBACKGROUND_1}>\n {titleText}\n </Label>\n </div>\n);\nModalHeader.propTypes = {\n titleText: PropTypes.string.isRequired,\n};\n\nexport const ModalBody = ({ children }) => (\n <div className=\"sendbird-modal__body\"
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../src/ui/Modal/index.jsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { createPortal } from 'react-dom';\n\nimport './index.scss';\n\nimport { LocalizationContext } from '../../lib/LocalizationContext';\nimport { MODAL_ROOT } from '../../hooks/useModal/ModalRoot';\nimport IconButton from '../IconButton';\nimport Icon, { IconTypes, IconColors } from '../Icon';\nimport Button, { ButtonTypes } from '../Button';\nimport Label, { LabelTypography, LabelColors } from '../Label';\nimport { noop } from '../../utils/utils';\n\nexport const ModalHeader = ({ titleText }) => (\n <div className=\"sendbird-modal__header\">\n <Label type={LabelTypography.H_1} color={LabelColors.ONBACKGROUND_1}>\n {titleText}\n </Label>\n </div>\n);\nModalHeader.propTypes = {\n titleText: PropTypes.string.isRequired,\n};\n\nexport const ModalBody = ({ children }) => (\n <div className=\"sendbird-modal__body\">\n <Label\n type={LabelTypography.SUBTITLE_1}\n color={LabelColors.ONBACKGROUND_2}\n >\n {children}\n </Label>\n </div>\n);\nModalBody.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.element.isRequired,\n PropTypes.arrayOf(PropTypes.element.isRequired),\n ]),\n};\nModalBody.defaultProps = {\n children: null,\n};\n\nexport const ModalFooter = ({\n onSubmit,\n onCancel,\n disabled = false,\n submitText,\n type,\n}) => {\n const { stringSet } = useContext(LocalizationContext);\n return (\n <div className=\"sendbird-modal__footer\">\n <Button type={ButtonTypes.SECONDARY} onClick={onCancel}>\n <Label type={LabelTypography.BUTTON_1} color={LabelColors.ONBACKGROUND_1}>\n {stringSet.BUTTON__CANCEL}\n </Label>\n </Button>\n <Button type={type} disabled={disabled} onClick={onSubmit}>\n {submitText}\n </Button>\n </div>\n );\n};\n\nModalFooter.propTypes = {\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n submitText: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n type: PropTypes.string,\n};\nModalFooter.defaultProps = {\n disabled: false,\n type: ButtonTypes.DANGER,\n};\n\nexport default function Modal(props) {\n const {\n children,\n onCancel,\n onSubmit = noop,\n disabled,\n submitText,\n titleText,\n hideFooter,\n type,\n } = props;\n return createPortal((\n <div className=\"sendbird-modal\">\n <div className=\"sendbird-modal__content\">\n <ModalHeader titleText={titleText} />\n <ModalBody>{children}</ModalBody>\n {\n !hideFooter && (\n <ModalFooter\n disabled={disabled}\n onCancel={onCancel}\n onSubmit={onSubmit}\n submitText={submitText}\n type={type}\n />\n )\n }\n <div className=\"sendbird-modal__close\">\n <IconButton\n width=\"32px\"\n height=\"32px\"\n onClick={onCancel}\n >\n <Icon\n type={IconTypes.CLOSE}\n fillColor={IconColors.DEFAULT}\n width=\"24px\"\n height=\"24px\"\n />\n </IconButton>\n </div>\n </div>\n <div className=\"sendbird-modal__backdrop\" />\n </div>\n ), document.getElementById(MODAL_ROOT));\n}\n\nModal.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf(PropTypes.element),\n ]),\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func,\n hideFooter: PropTypes.bool,\n disabled: PropTypes.bool,\n type: PropTypes.string,\n};\nModal.defaultProps = {\n children: null,\n hideFooter: false,\n disabled: false,\n type: ButtonTypes.DANGER,\n};\n"],"names":["ModalHeader","titleText","React","LabelTypography","H_1","LabelColors","ONBACKGROUND_1","propTypes","PropTypes","string","isRequired","ModalBody","children","SUBTITLE_1","ONBACKGROUND_2","oneOfType","element","arrayOf","defaultProps","ModalFooter","onSubmit","onCancel","disabled","submitText","type","useContext","LocalizationContext","stringSet","ButtonTypes","SECONDARY","BUTTON_1","BUTTON__CANCEL","func","bool","DANGER","Modal","props","noop","hideFooter","createPortal","IconTypes","CLOSE","IconColors","DEFAULT","document","getElementById","MODAL_ROOT"],"mappings":";;;;;;;;;;;;;;IAcaA,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,SAAH,QAAGA,SAAH;AAAA,sBACzBC;AAAK,IAAA,SAAS,EAAC;AAAf,kBACEA,6BAAC,KAAD;AAAO,IAAA,IAAI,EAAEC,eAAe,CAACC,GAA7B;AAAkC,IAAA,KAAK,EAAEC,WAAW,CAACC;AAArD,KACGL,SADH,CADF,CADyB;AAAA;AAO3BD,WAAW,CAACO,SAAZ,GAAwB;AACtBN,EAAAA,SAAS,EAAEO,SAAS,CAACC,MAAV,CAAiBC;AADN,CAAxB;IAIaC,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,QAAH,SAAGA,QAAH;AAAA,sBACvBV;AAAK,IAAA,SAAS,EAAC;A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ACEA,6BAAC,UAAD;AACE,IAAA,KAAK,EAAC,MADR;AAEE,IAAA,MAAM,EAAC,MAFT;AAGE,IAAA,OAAO,EAAEmB;AAHX,kBAKEnB,6BAAC,IAAD;AACE,IAAA,IAAI,EAAEsC,SAAS,CAACC,KADlB;AAEE,IAAA,SAAS,EAAEC,UAAU,CAACC,OAFxB;AAGE,IAAA,KAAK,EAAC,MAHR;AAIE,IAAA,MAAM,EAAC;AAJT,IALF,CADF,CAdF,CADF,eA8BEzC;AAAK,IAAA,SAAS,EAAC;AAAf,IA9BF,CADiB,EAiChB0C,QAAQ,CAACC,cAAT,CAAwBC,UAAxB,CAjCgB,CAAnB;AAkCD;AAEDX,KAAK,CAAC5B,SAAN,GAAkB;AAChBK,EAAAA,QAAQ,EAAEJ,SAAS,CAACO,SAAV,CAAoB,CAC5BP,SAAS,CAACQ,OADkB,EAE5BR,SAAS,CAACS,OAAV,CAAkBT,SAAS,CAACQ,OAA5B,CAF4B,CAApB,CADM;AAKhBK,EAAAA,QAAQ,EAAEb,SAAS,CAACwB,IAAV,CAAetB,UALT;AAMhBU,EAAAA,QAAQ,EAAEZ,SAAS,CAACwB,IANJ;AAOhBM,EAAAA,UAAU,EAAE9B,SAAS,CAACyB,IAPN;AAQhBX,EAAAA,QAAQ,EAAEd,SAAS,CAACyB,IARJ;AAShBT,EAAAA,IAAI,EAAEhB,SAAS,CAACC;AATA,CAAlB;AAWA0B,KAAK,CAACjB,YAAN,GAAqB;AACnBN,EAAAA,QAAQ,EAAE,IADS;AAEnB0B,EAAAA,UAAU,EAAE,KAFO;AAGnBhB,EAAAA,QAAQ,EAAE,KAHS;AAInBE,EAAAA,IAAI,EAAEI,WAAW,CAACM;AAJC,CAArB;;;;"}
|
package/ui/MutedAvatarOverlay.js
CHANGED
package/ui/OGMessageItemBody.js
CHANGED
|
@@ -2,27 +2,27 @@ import React__default, { useContext } from 'react';
|
|
|
2
2
|
import Word from './Word.js';
|
|
3
3
|
import ImageRenderer from './ImageRenderer.js';
|
|
4
4
|
import Icon, { IconTypes } from './Icon.js';
|
|
5
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
6
|
-
import { u as uuidv4 } from '../uuid-
|
|
7
|
-
import { k as getClassName, e as isEditedMessage } from '../index-
|
|
8
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
5
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
6
|
+
import { u as uuidv4 } from '../uuid-118d6514.js';
|
|
7
|
+
import { k as getClassName, e as isEditedMessage } from '../index-8cd47fe5.js';
|
|
8
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
9
9
|
import './LinkLabel.js';
|
|
10
|
-
import '../_rollupPluginBabelHelpers-
|
|
10
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
11
11
|
import 'prop-types';
|
|
12
12
|
import './MentionLabel.js';
|
|
13
13
|
import './ContextMenu.js';
|
|
14
14
|
import 'react-dom';
|
|
15
15
|
import './SortByRow.js';
|
|
16
|
-
import '../stringSet-
|
|
17
|
-
import '../tslib.es6-
|
|
16
|
+
import '../stringSet-8f56c095.js';
|
|
17
|
+
import '../tslib.es6-70020af6.js';
|
|
18
18
|
import './UserProfile.js';
|
|
19
19
|
import '../withSendbird.js';
|
|
20
20
|
import '../sendbirdSelectors.js';
|
|
21
|
-
import '../topics-
|
|
22
|
-
import '../utils-
|
|
21
|
+
import '../topics-27c99fc7.js';
|
|
22
|
+
import '../utils-e5523522.js';
|
|
23
23
|
import './Avatar.js';
|
|
24
|
-
import '../index-
|
|
25
|
-
import '../index-
|
|
24
|
+
import '../index-64bbdf03.js';
|
|
25
|
+
import '../index-526e1c2f.js';
|
|
26
26
|
import '../useSendbirdStateContext.js';
|
|
27
27
|
|
|
28
28
|
function OGMessageItemBody(_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
4
|
-
import '../_rollupPluginBabelHelpers-
|
|
3
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
4
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
5
5
|
import 'prop-types';
|
|
6
|
-
import '../stringSet-
|
|
6
|
+
import '../stringSet-8f56c095.js';
|
|
7
7
|
|
|
8
8
|
function OpenChannelAdminMessage(_a) {
|
|
9
9
|
var className = _a.className,
|
package/ui/OpenChannelAvatar.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React__default, { useContext, useMemo } from 'react';
|
|
2
2
|
import Avatar from './Avatar.js';
|
|
3
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
4
|
-
import { b as getOpenChannelAvatar } from '../utils-
|
|
5
|
-
import '../tslib.es6-
|
|
3
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
4
|
+
import { b as getOpenChannelAvatar } from '../utils-c7599c37.js';
|
|
5
|
+
import '../tslib.es6-70020af6.js';
|
|
6
6
|
import './ImageRenderer.js';
|
|
7
|
-
import '../_rollupPluginBabelHelpers-
|
|
7
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
8
8
|
import 'prop-types';
|
|
9
9
|
import './Icon.js';
|
|
10
|
-
import '../uuid-
|
|
11
|
-
import '../stringSet-
|
|
12
|
-
import '../index-
|
|
10
|
+
import '../uuid-118d6514.js';
|
|
11
|
+
import '../stringSet-8f56c095.js';
|
|
12
|
+
import '../index-526e1c2f.js';
|
|
13
13
|
|
|
14
14
|
function ChannelAvatar(_a) {
|
|
15
15
|
var channel = _a.channel,
|
|
@@ -2,15 +2,15 @@ import React__default, { useContext } from 'react';
|
|
|
2
2
|
import Avatar from './Avatar.js';
|
|
3
3
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
4
4
|
import IconButton from './IconButton.js';
|
|
5
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
6
|
-
import { a as LocalizationContext } from '../LocalizationContext-
|
|
7
|
-
import '../tslib.es6-
|
|
5
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
6
|
+
import { a as LocalizationContext } from '../LocalizationContext-9ecb0a32.js';
|
|
7
|
+
import '../tslib.es6-70020af6.js';
|
|
8
8
|
import './ImageRenderer.js';
|
|
9
|
-
import '../_rollupPluginBabelHelpers-
|
|
9
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
10
10
|
import 'prop-types';
|
|
11
|
-
import '../uuid-
|
|
12
|
-
import '../stringSet-
|
|
13
|
-
import '../index-
|
|
11
|
+
import '../uuid-118d6514.js';
|
|
12
|
+
import '../stringSet-8f56c095.js';
|
|
13
|
+
import '../index-526e1c2f.js';
|
|
14
14
|
|
|
15
15
|
function OpenchannelConversationHeader(_a) {
|
|
16
16
|
var coverImage = _a.coverImage,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default, { useRef, useContext } from 'react';
|
|
3
|
-
import { f as format } from '../index-
|
|
3
|
+
import { f as format } from '../index-fd29af9b.js';
|
|
4
4
|
import Avatar from './Avatar.js';
|
|
5
5
|
import ContextMenu, { MenuItems, MenuItem } from './ContextMenu.js';
|
|
6
|
-
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-
|
|
6
|
+
import { L as Label, a as LabelTypography, b as LabelColors } from '../index-3b997158.js';
|
|
7
7
|
import Loader from './Loader.js';
|
|
8
8
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
9
9
|
import IconButton from './IconButton.js';
|
|
10
10
|
import TextButton from './TextButton.js';
|
|
11
11
|
import ConnectedUserProfile from './UserProfile.js';
|
|
12
|
-
import { a as UserProfileContext } from '../UserProfileContext-
|
|
13
|
-
import { u as useLocalization } from '../LocalizationContext-
|
|
14
|
-
import {
|
|
15
|
-
import '../index-
|
|
12
|
+
import { a as UserProfileContext } from '../UserProfileContext-c1834696.js';
|
|
13
|
+
import { u as useLocalization } from '../LocalizationContext-9ecb0a32.js';
|
|
14
|
+
import { g as getSenderFromMessage, s as showMenuTrigger, b as isFineResend, c as isFineDelete, d as checkIsPending, e as checkIsFailed } from '../openChannelUtils-d942de1a.js';
|
|
15
|
+
import '../index-526e1c2f.js';
|
|
16
16
|
import './ImageRenderer.js';
|
|
17
|
-
import '../_rollupPluginBabelHelpers-
|
|
17
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
18
18
|
import 'prop-types';
|
|
19
|
-
import '../uuid-
|
|
20
|
-
import '../index-
|
|
19
|
+
import '../uuid-118d6514.js';
|
|
20
|
+
import '../index-8cd47fe5.js';
|
|
21
21
|
import 'react-dom';
|
|
22
22
|
import './SortByRow.js';
|
|
23
|
-
import '../stringSet-
|
|
24
|
-
import '../color-
|
|
23
|
+
import '../stringSet-8f56c095.js';
|
|
24
|
+
import '../color-0d32d75b.js';
|
|
25
25
|
import '../withSendbird.js';
|
|
26
26
|
import '../sendbirdSelectors.js';
|
|
27
|
-
import '../topics-
|
|
28
|
-
import '../utils-
|
|
29
|
-
import '../index-
|
|
27
|
+
import '../topics-27c99fc7.js';
|
|
28
|
+
import '../utils-e5523522.js';
|
|
29
|
+
import '../index-64bbdf03.js';
|
|
30
30
|
|
|
31
31
|
var checkFileType = function checkFileType(fileUrl) {
|
|
32
32
|
var audioFile = /(\.mp3)$/i;
|
|
@@ -56,6 +56,7 @@ var truncate = function truncate(fullStr, strLen) {
|
|
|
56
56
|
function OpenchannelFileMessage(_a) {
|
|
57
57
|
var className = _a.className,
|
|
58
58
|
message = _a.message,
|
|
59
|
+
isOperator = _a.isOperator,
|
|
59
60
|
userId = _a.userId,
|
|
60
61
|
disabled = _a.disabled,
|
|
61
62
|
chainTop = _a.chainTop,
|
|
@@ -78,7 +79,6 @@ function OpenchannelFileMessage(_a) {
|
|
|
78
79
|
window.open(message.url);
|
|
79
80
|
};
|
|
80
81
|
|
|
81
|
-
var isByMe = checkIsByMe(message, userId);
|
|
82
82
|
var isPending = checkIsPending(status);
|
|
83
83
|
var isFailed = checkIsFailed(status);
|
|
84
84
|
var sender = getSenderFromMessage(message);
|
|
@@ -126,7 +126,7 @@ function OpenchannelFileMessage(_a) {
|
|
|
126
126
|
}, /*#__PURE__*/React__default.createElement(Label, {
|
|
127
127
|
className: "sendbird-openchannel-file-message__right__title__sender-name",
|
|
128
128
|
type: LabelTypography.CAPTION_2,
|
|
129
|
-
color:
|
|
129
|
+
color: isOperator ? LabelColors.SECONDARY_3 : LabelColors.ONBACKGROUND_2
|
|
130
130
|
}, sender && (sender.friendName || sender.nickname || sender.userId)), /*#__PURE__*/React__default.createElement(Label, {
|
|
131
131
|
className: "sendbird-openchannel-file-message__right__title__sent-at",
|
|
132
132
|
type: LabelTypography.CAPTION_3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenchannelFileMessage.js","sources":["../../src/ui/OpenchannelFileMessage/utils.ts","../../src/ui/OpenchannelFileMessage/index.tsx"],"sourcesContent":["import { IconTypes } from '../Icon';\n\nexport const checkFileType = (fileUrl: string): string => {\n const audioFile = /(\\.mp3)$/i;\n const gifFile = /(\\.gif)$/i;\n if (audioFile.test(fileUrl)) {\n return IconTypes.FILE_AUDIO;\n }\n if (gifFile.test(fileUrl)) {\n return IconTypes.GIF\n }\n return IconTypes.FILE_DOCUMENT;\n}\n\nexport const truncate = (fullStr:string, strLen: number): string => {\n if (fullStr === null || fullStr === undefined) return '';\n if (fullStr.length <= strLen) return fullStr;\n const separator = '...';\n const sepLen = separator.length;\n const charsToShow = strLen - sepLen;\n const frontChars = Math.ceil(charsToShow / 2);\n const backChars = Math.floor(charsToShow / 2);\n return fullStr.substr(0, frontChars) + separator + fullStr.substr(fullStr.length - backChars);\n};\n","import React, { useContext, useRef } from 'react';\nimport { FileMessage } from '@sendbird/chat/message';\nimport format from 'date-fns/format';\nimport './index.scss';\n\nimport Avatar from '../Avatar';\nimport ContextMenu, { MenuItems, MenuItem } from '../ContextMenu';\nimport Label, { LabelTypography, LabelColors } from '../Label';\nimport Loader from '../Loader';\nimport Icon, { IconTypes, IconColors } from '../Icon';\nimport IconButton from '../IconButton';\nimport TextButton from '../TextButton';\nimport UserProfile from '../UserProfile';\nimport { UserProfileContext } from '../../lib/UserProfileContext';\n\nimport { useLocalization } from '../../lib/LocalizationContext';\nimport { checkFileType, truncate } from './utils';\nimport {\n checkIsByMe,\n checkIsPending,\n checkIsFailed,\n isFineDelete,\n isFineResend,\n showMenuTrigger,\n} from '../../utils/openChannelUtils';\nimport { getSenderFromMessage } from '../../utils/openChannelUtils';\n\ninterface Props {\n className?: string | Array<string>;\n message: FileMessage;\n userId: string;\n disabled?: boolean;\n chainTop?: boolean;\n chainBottom?: boolean;\n showRemove(bool: boolean): void;\n resendMessage(message: FileMessage): void;\n}\n\nexport default function OpenchannelFileMessage({\n className,\n message,\n userId,\n disabled,\n chainTop,\n showRemove,\n resendMessage,\n}: Props): JSX.Element {\n const status = message?.sendingStatus;\n const { dateLocale, stringSet } = useLocalization();\n const contextMenuRef = useRef(null);\n const avatarRef = useRef(null);\n const { disableUserProfile, renderUserProfile } = useContext(UserProfileContext);\n\n const openFileUrl = () => { window.open(message.url); };\n\n const isByMe = checkIsByMe(message, userId);\n const isPending = checkIsPending(status);\n const isFailed = checkIsFailed(status);\n const sender = getSenderFromMessage(message);\n\n return (\n <div\n className={[\n ...(Array.isArray(className) ? className : [className]),\n 'sendbird-openchannel-file-message',\n ].join(' ')}\n >\n <div className=\"sendbird-openchannel-file-message__left\">\n {\n !chainTop && (\n <ContextMenu\n menuTrigger={(toggleDropdown) => (\n <Avatar\n className=\"sendbird-openchannel-file-message__left__avatar\"\n src={sender.profileUrl || ''}\n ref={avatarRef}\n width=\"28px\"\n height=\"28px\"\n onClick={() => {\n if (!disableUserProfile) {\n toggleDropdown();\n }\n }}\n />\n )}\n menuItems={(closeDropdown) => (\n <MenuItems\n parentRef={avatarRef}\n parentContainRef={avatarRef}\n closeDropdown={closeDropdown}\n style={{ paddingTop: 0, paddingBottom: 0 }}\n >\n {\n renderUserProfile\n ? (\n renderUserProfile({\n user: sender,\n close: closeDropdown,\n })\n )\n : (\n <UserProfile\n user={sender}\n onSuccess={closeDropdown}\n disableMessaging\n />\n )\n }\n </MenuItems>\n )}\n />\n )\n }\n </div>\n <div className=\"sendbird-openchannel-file-message__right\">\n {\n !chainTop && (\n <div className=\"sendbird-openchannel-file-message__right__title\">\n <Label\n className=\"sendbird-openchannel-file-message__right__title__sender-name\"\n type={LabelTypography.CAPTION_2}\n color={isByMe ? LabelColors.SECONDARY_3 : LabelColors.ONBACKGROUND_2}\n >\n {\n sender && (\n sender.friendName\n || sender.nickname\n || sender.userId\n )\n }\n </Label>\n <Label\n className=\"sendbird-openchannel-file-message__right__title__sent-at\"\n type={LabelTypography.CAPTION_3}\n color={LabelColors.ONBACKGROUND_3}\n >\n {\n message?.createdAt && (\n format(message.createdAt, 'p', {\n locale: dateLocale,\n })\n )\n }\n </Label>\n </div>\n )\n }\n <div className=\"sendbird-openchannel-file-message__right__body\">\n {\n checkFileType(message.url) && (\n <Icon\n className=\"sendbird-openchannel-file-message__right__body__icon\"\n type={checkFileType(message.url)}\n fillColor={IconColors.PRIMARY}\n width=\"48px\"\n height=\"48px\"\n />\n )\n }\n <TextButton\n className=\"sendbird-openchannel-file-message__right__body__file-name\"\n onClick={openFileUrl}\n >\n <Label\n type={LabelTypography.BODY_1}\n color={LabelColors.ONBACKGROUND_1}\n >\n {truncate(message.name || message.url, 40)}\n </Label>\n </TextButton>\n </div>\n {\n (isPending || isFailed) && (\n <div className=\"sendbird-openchannel-file-message__right__tail\">\n {\n isPending && (\n <Loader\n width=\"16px\"\n height=\"16px\"\n >\n <Icon\n className=\"sendbird-openchannel-file-message__right__tail__pending\"\n type={IconTypes.SPINNER}\n fillColor={IconColors.PRIMARY}\n width=\"16px\"\n height=\"16px\"\n />\n </Loader>\n )\n }\n {\n isFailed && (\n <Icon\n className=\"sendbird-openchannel-file-message__right__tail__failed\"\n type={IconTypes.ERROR}\n fillColor={IconColors.ERROR}\n width=\"16px\"\n height=\"16px\"\n />\n )\n }\n </div>\n )\n }\n </div>\n <div\n className=\"sendbird-openchannel-file-message__context-menu\"\n ref={contextMenuRef}\n >\n {\n <ContextMenu\n menuTrigger={(toggleDropdown) => (\n showMenuTrigger({ message, userId, status }) && (\n <IconButton\n className=\"sendbird-openchannel-file-message__context-menu__icon\"\n width=\"32px\"\n height=\"32px\"\n onClick={toggleDropdown}\n >\n <Icon\n type={IconTypes.MORE}\n width=\"24px\"\n height=\"24px\"\n />\n </IconButton>\n )\n )}\n menuItems={(closeDropdown) => (\n <MenuItems\n parentRef={contextMenuRef}\n parentContainRef={contextMenuRef}\n closeDropdown={closeDropdown}\n openLeft\n >\n {\n isFineResend({ message, userId, status }) && (\n <MenuItem\n onClick={() => {\n if (disabled) { return; }\n resendMessage(message);\n closeDropdown();\n }}\n >\n {stringSet.CONTEXT_MENU_DROPDOWN__RESEND}\n </MenuItem>\n )\n }\n {\n isFineDelete({ message, userId, status }) && (\n <MenuItem\n onClick={() => {\n if (disabled) { return; }\n showRemove(true);\n closeDropdown();\n }}\n >\n {stringSet.CONTEXT_MENU_DROPDOWN__DELETE}\n </MenuItem>\n )\n }\n </MenuItems>\n )}\n />\n }\n </div>\n </div>\n );\n}\n"],"names":["checkFileType","fileUrl","audioFile","gifFile","test","IconTypes","FILE_AUDIO","GIF","FILE_DOCUMENT","truncate","fullStr","strLen","undefined","length","separator","sepLen","charsToShow","frontChars","Math","ceil","backChars","floor","substr","OpenchannelFileMessage","_a","className","message","userId","disabled","chainTop","showRemove","resendMessage","status","sendingStatus","_b","useLocalization","dateLocale","stringSet","contextMenuRef","useRef","avatarRef","_c","useContext","UserProfileContext","disableUserProfile","renderUserProfile","openFileUrl","window","open","url","isByMe","checkIsByMe","isPending","checkIsPending","isFailed","checkIsFailed","sender","getSenderFromMessage","React","__spreadArray","Array","isArray","join","toggleDropdown","profileUrl","closeDropdown","paddingTop","paddingBottom","user","close","UserProfile","LabelTypography","CAPTION_2","LabelColors","SECONDARY_3","ONBACKGROUND_2","friendName","nickname","CAPTION_3","ONBACKGROUND_3","createdAt","format","locale","IconColors","PRIMARY","BODY_1","ONBACKGROUND_1","name","SPINNER","ERROR","showMenuTrigger","MORE","isFineResend","CONTEXT_MENU_DROPDOWN__RESEND","isFineDelete","CONTEXT_MENU_DROPDOWN__DELETE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,OAAD;AAC3B,MAAMC,SAAS,GAAG,WAAlB;AACA,MAAMC,OAAO,GAAG,WAAhB;;AACA,MAAID,SAAS,CAACE,IAAV,CAAeH,OAAf,CAAJ,EAA6B;AAC3B,WAAOI,SAAS,CAACC,UAAjB;AACD;;AACD,MAAIH,OAAO,CAACC,IAAR,CAAaH,OAAb,CAAJ,EAA2B;AACzB,WAAOI,SAAS,CAACE,GAAjB;AACD;;AACD,SAAOF,SAAS,CAACG,aAAjB;AACD,CAVM;AAYA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,OAAD,EAAiBC,MAAjB;AACtB,MAAID,OAAO,KAAK,IAAZ,IAAoBA,OAAO,KAAKE,SAApC,EAA+C,OAAO,EAAP;AAC/C,MAAIF,OAAO,CAACG,MAAR,IAAkBF,MAAtB,EAA8B,OAAOD,OAAP;AAC9B,MAAMI,SAAS,GAAG,KAAlB;AACA,MAAMC,MAAM,GAAGD,SAAS,CAACD,MAAzB;AACA,MAAMG,WAAW,GAAGL,MAAM,GAAGI,MAA7B;AACA,MAAME,UAAU,GAAGC,IAAI,CAACC,IAAL,CAAUH,WAAW,GAA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SAOI2B,YAAY,CAAC;AAAElE,QAAAA,OAAO,SAAT;AAAWC,QAAAA,MAAM,QAAjB;AAAmBK,QAAAA,MAAM;AAAzB,OAAD,CAAZ,iBACE0B,6BAAC,QAAD;AACE,QAAA,OAAO,EAAE;AACP,cAAI9B,QAAJ,EAAc;AAAE;AAAS;;AACzBG,UAAAA,aAAa,CAACL,OAAD,CAAb;AACAuC,UAAAA,aAAa;AACd;AALH,SAOG5B,SAAS,CAACwD,6BAPb,CARN,EAoBIC,YAAY,CAAC;AAAEpE,QAAAA,OAAO,SAAT;AAAWC,QAAAA,MAAM,QAAjB;AAAmBK,QAAAA,MAAM;AAAzB,OAAD,CAAZ,iBACE0B,6BAAC,QAAD;AACE,QAAA,OAAO,EAAE;AACP,cAAI9B,QAAJ,EAAc;AAAE;AAAS;;AACzBE,UAAAA,UAAU,CAAC,IAAD,CAAV;AACAmC,UAAAA,aAAa;AACd;AALH,SAOG5B,SAAS,CAAC0D,6BAPb,CArBN,CAD4B;AAkC7B;AAnDH,IALN,CAhJF,CADF;AA+MD;;;;"}
|
|
1
|
+
{"version":3,"file":"OpenchannelFileMessage.js","sources":["../../src/ui/OpenchannelFileMessage/utils.ts","../../src/ui/OpenchannelFileMessage/index.tsx"],"sourcesContent":["import { IconTypes } from '../Icon';\n\nexport const checkFileType = (fileUrl: string): string => {\n const audioFile = /(\\.mp3)$/i;\n const gifFile = /(\\.gif)$/i;\n if (audioFile.test(fileUrl)) {\n return IconTypes.FILE_AUDIO;\n }\n if (gifFile.test(fileUrl)) {\n return IconTypes.GIF\n }\n return IconTypes.FILE_DOCUMENT;\n}\n\nexport const truncate = (fullStr:string, strLen: number): string => {\n if (fullStr === null || fullStr === undefined) return '';\n if (fullStr.length <= strLen) return fullStr;\n const separator = '...';\n const sepLen = separator.length;\n const charsToShow = strLen - sepLen;\n const frontChars = Math.ceil(charsToShow / 2);\n const backChars = Math.floor(charsToShow / 2);\n return fullStr.substr(0, frontChars) + separator + fullStr.substr(fullStr.length - backChars);\n};\n","import React, { useContext, useRef } from 'react';\nimport { FileMessage } from '@sendbird/chat/message';\nimport format from 'date-fns/format';\nimport './index.scss';\n\nimport Avatar from '../Avatar';\nimport ContextMenu, { MenuItems, MenuItem } from '../ContextMenu';\nimport Label, { LabelTypography, LabelColors } from '../Label';\nimport Loader from '../Loader';\nimport Icon, { IconTypes, IconColors } from '../Icon';\nimport IconButton from '../IconButton';\nimport TextButton from '../TextButton';\nimport UserProfile from '../UserProfile';\nimport { UserProfileContext } from '../../lib/UserProfileContext';\n\nimport { useLocalization } from '../../lib/LocalizationContext';\nimport { checkFileType, truncate } from './utils';\nimport {\n checkIsPending,\n checkIsFailed,\n isFineDelete,\n isFineResend,\n showMenuTrigger,\n} from '../../utils/openChannelUtils';\nimport { getSenderFromMessage } from '../../utils/openChannelUtils';\n\ninterface Props {\n className?: string | Array<string>;\n message: FileMessage;\n isOperator?: boolean;\n userId: string;\n disabled?: boolean;\n chainTop?: boolean;\n chainBottom?: boolean;\n showRemove(bool: boolean): void;\n resendMessage(message: FileMessage): void;\n}\n\nexport default function OpenchannelFileMessage({\n className,\n message,\n isOperator,\n userId,\n disabled,\n chainTop,\n showRemove,\n resendMessage,\n}: Props): JSX.Element {\n const status = message?.sendingStatus;\n const { dateLocale, stringSet } = useLocalization();\n const contextMenuRef = useRef(null);\n const avatarRef = useRef(null);\n const { disableUserProfile, renderUserProfile } = useContext(UserProfileContext);\n\n const openFileUrl = () => { window.open(message.url); };\n\n const isPending = checkIsPending(status);\n const isFailed = checkIsFailed(status);\n const sender = getSenderFromMessage(message);\n\n return (\n <div\n className={[\n ...(Array.isArray(className) ? className : [className]),\n 'sendbird-openchannel-file-message',\n ].join(' ')}\n >\n <div className=\"sendbird-openchannel-file-message__left\">\n {\n !chainTop && (\n <ContextMenu\n menuTrigger={(toggleDropdown) => (\n <Avatar\n className=\"sendbird-openchannel-file-message__left__avatar\"\n src={sender.profileUrl || ''}\n ref={avatarRef}\n width=\"28px\"\n height=\"28px\"\n onClick={() => {\n if (!disableUserProfile) {\n toggleDropdown();\n }\n }}\n />\n )}\n menuItems={(closeDropdown) => (\n <MenuItems\n parentRef={avatarRef}\n parentContainRef={avatarRef}\n closeDropdown={closeDropdown}\n style={{ paddingTop: 0, paddingBottom: 0 }}\n >\n {\n renderUserProfile\n ? (\n renderUserProfile({\n user: sender,\n close: closeDropdown,\n })\n )\n : (\n <UserProfile\n user={sender}\n onSuccess={closeDropdown}\n disableMessaging\n />\n )\n }\n </MenuItems>\n )}\n />\n )\n }\n </div>\n <div className=\"sendbird-openchannel-file-message__right\">\n {\n !chainTop && (\n <div className=\"sendbird-openchannel-file-message__right__title\">\n <Label\n className=\"sendbird-openchannel-file-message__right__title__sender-name\"\n type={LabelTypography.CAPTION_2}\n color={isOperator ? LabelColors.SECONDARY_3 : LabelColors.ONBACKGROUND_2}\n >\n {\n sender && (\n sender.friendName\n || sender.nickname\n || sender.userId\n )\n }\n </Label>\n <Label\n className=\"sendbird-openchannel-file-message__right__title__sent-at\"\n type={LabelTypography.CAPTION_3}\n color={LabelColors.ONBACKGROUND_3}\n >\n {\n message?.createdAt && (\n format(message.createdAt, 'p', {\n locale: dateLocale,\n })\n )\n }\n </Label>\n </div>\n )\n }\n <div className=\"sendbird-openchannel-file-message__right__body\">\n {\n checkFileType(message.url) && (\n <Icon\n className=\"sendbird-openchannel-file-message__right__body__icon\"\n type={checkFileType(message.url)}\n fillColor={IconColors.PRIMARY}\n width=\"48px\"\n height=\"48px\"\n />\n )\n }\n <TextButton\n className=\"sendbird-openchannel-file-message__right__body__file-name\"\n onClick={openFileUrl}\n >\n <Label\n type={LabelTypography.BODY_1}\n color={LabelColors.ONBACKGROUND_1}\n >\n {truncate(message.name || message.url, 40)}\n </Label>\n </TextButton>\n </div>\n {\n (isPending || isFailed) && (\n <div className=\"sendbird-openchannel-file-message__right__tail\">\n {\n isPending && (\n <Loader\n width=\"16px\"\n height=\"16px\"\n >\n <Icon\n className=\"sendbird-openchannel-file-message__right__tail__pending\"\n type={IconTypes.SPINNER}\n fillColor={IconColors.PRIMARY}\n width=\"16px\"\n height=\"16px\"\n />\n </Loader>\n )\n }\n {\n isFailed && (\n <Icon\n className=\"sendbird-openchannel-file-message__right__tail__failed\"\n type={IconTypes.ERROR}\n fillColor={IconColors.ERROR}\n width=\"16px\"\n height=\"16px\"\n />\n )\n }\n </div>\n )\n }\n </div>\n <div\n className=\"sendbird-openchannel-file-message__context-menu\"\n ref={contextMenuRef}\n >\n {\n <ContextMenu\n menuTrigger={(toggleDropdown) => (\n showMenuTrigger({ message, userId, status }) && (\n <IconButton\n className=\"sendbird-openchannel-file-message__context-menu__icon\"\n width=\"32px\"\n height=\"32px\"\n onClick={toggleDropdown}\n >\n <Icon\n type={IconTypes.MORE}\n width=\"24px\"\n height=\"24px\"\n />\n </IconButton>\n )\n )}\n menuItems={(closeDropdown) => (\n <MenuItems\n parentRef={contextMenuRef}\n parentContainRef={contextMenuRef}\n closeDropdown={closeDropdown}\n openLeft\n >\n {\n isFineResend({ message, userId, status }) && (\n <MenuItem\n onClick={() => {\n if (disabled) { return; }\n resendMessage(message);\n closeDropdown();\n }}\n >\n {stringSet.CONTEXT_MENU_DROPDOWN__RESEND}\n </MenuItem>\n )\n }\n {\n isFineDelete({ message, userId, status }) && (\n <MenuItem\n onClick={() => {\n if (disabled) { return; }\n showRemove(true);\n closeDropdown();\n }}\n >\n {stringSet.CONTEXT_MENU_DROPDOWN__DELETE}\n </MenuItem>\n )\n }\n </MenuItems>\n )}\n />\n }\n </div>\n </div>\n );\n}\n"],"names":["checkFileType","fileUrl","audioFile","gifFile","test","IconTypes","FILE_AUDIO","GIF","FILE_DOCUMENT","truncate","fullStr","strLen","undefined","length","separator","sepLen","charsToShow","frontChars","Math","ceil","backChars","floor","substr","OpenchannelFileMessage","_a","className","message","isOperator","userId","disabled","chainTop","showRemove","resendMessage","status","sendingStatus","_b","useLocalization","dateLocale","stringSet","contextMenuRef","useRef","avatarRef","_c","useContext","UserProfileContext","disableUserProfile","renderUserProfile","openFileUrl","window","open","url","isPending","checkIsPending","isFailed","checkIsFailed","sender","getSenderFromMessage","React","__spreadArray","Array","isArray","join","toggleDropdown","profileUrl","closeDropdown","paddingTop","paddingBottom","user","close","UserProfile","LabelTypography","CAPTION_2","LabelColors","SECONDARY_3","ONBACKGROUND_2","friendName","nickname","CAPTION_3","ONBACKGROUND_3","createdAt","format","locale","IconColors","PRIMARY","BODY_1","ONBACKGROUND_1","name","SPINNER","ERROR","showMenuTrigger","MORE","isFineResend","CONTEXT_MENU_DROPDOWN__RESEND","isFineDelete","CONTEXT_MENU_DROPDOWN__DELETE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,OAAD;AAC3B,MAAMC,SAAS,GAAG,WAAlB;AACA,MAAMC,OAAO,GAAG,WAAhB;;AACA,MAAID,SAAS,CAACE,IAAV,CAAeH,OAAf,CAAJ,EAA6B;AAC3B,WAAOI,SAAS,CAACC,UAAjB;AACD;;AACD,MAAIH,OAAO,CAACC,IAAR,CAAaH,OAAb,CAAJ,EAA2B;AACzB,WAAOI,SAAS,CAACE,GAAjB;AACD;;AACD,SAAOF,SAAS,CAACG,aAAjB;AACD,CAVM;AAYA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,OAAD,EAAiBC,MAAjB;AACtB,MAAID,OAAO,KAAK,IAAZ,IAAoBA,OAAO,KAAKE,SAApC,EAA+C,OAAO,EAAP;AAC/C,MAAIF,OAAO,CAACG,MAAR,IAAkBF,MAAtB,EAA8B,OAAOD,OAAP;AAC9B,MAAMI,SAAS,GAAG,KAAlB;AACA,MAAMC,MAAM,GAAGD,SAAS,CAACD,MAAzB;AACA,MAAMG,WAAW,GAAGL,MAAM,GAAGI,MAA7B;AACA,MAAME,UAAU,GAAGC,IAAI,CAACC,IAAL,CAAUH,WAAW,GAAG,CAAxB,CAAnB;AACA,MAAMI,SAAS,GAAGF,IAA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M;AAAzB,OAAD,CAAZ,iBACEwB,6BAAC,QAAD;AACE,QAAA,OAAO,EAAE;AACP,cAAI5B,QAAJ,EAAc;AAAE;AAAS;;AACzBG,UAAAA,aAAa,CAACN,OAAD,CAAb;AACAsC,UAAAA,aAAa;AACd;AALH,SAOG1B,SAAS,CAACsD,6BAPb,CARN,EAoBIC,YAAY,CAAC;AAAEnE,QAAAA,OAAO,SAAT;AAAWE,QAAAA,MAAM,QAAjB;AAAmBK,QAAAA,MAAM;AAAzB,OAAD,CAAZ,iBACEwB,6BAAC,QAAD;AACE,QAAA,OAAO,EAAE;AACP,cAAI5B,QAAJ,EAAc;AAAE;AAAS;;AACzBE,UAAAA,UAAU,CAAC,IAAD,CAAV;AACAiC,UAAAA,aAAa;AACd;AALH,SAOG1B,SAAS,CAACwD,6BAPb,CArBN,CAD4B;AAkC7B;AAnDH,IALN,CAhJF,CADF;AA+MD;;;;"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { a as __spreadArray } from '../tslib.es6-
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-70020af6.js';
|
|
2
2
|
import React__default, { useContext, useState, useRef, useMemo, useEffect } from 'react';
|
|
3
|
-
import { f as format } from '../index-
|
|
3
|
+
import { f as format } from '../index-fd29af9b.js';
|
|
4
4
|
import Avatar from './Avatar.js';
|
|
5
5
|
import ContextMenu, { MenuItems, MenuItem } from './ContextMenu.js';
|
|
6
6
|
import Icon, { IconTypes, IconColors } from './Icon.js';
|
|
7
7
|
import IconButton from './IconButton.js';
|
|
8
8
|
import ImageRenderer from './ImageRenderer.js';
|
|
9
9
|
import LinkLabel from './LinkLabel.js';
|
|
10
|
-
import { a as LabelTypography, b as LabelColors, L as Label } from '../index-
|
|
10
|
+
import { a as LabelTypography, b as LabelColors, L as Label } from '../index-3b997158.js';
|
|
11
11
|
import Loader from './Loader.js';
|
|
12
12
|
import ConnectedUserProfile from './UserProfile.js';
|
|
13
|
-
import { a as UserProfileContext } from '../UserProfileContext-
|
|
14
|
-
import { u as uuidv4 } from '../uuid-
|
|
15
|
-
import { c as copyToClipboard } from '../utils-
|
|
16
|
-
import { u as useLocalization } from '../LocalizationContext-
|
|
17
|
-
import {
|
|
18
|
-
import '../index-
|
|
19
|
-
import '../_rollupPluginBabelHelpers-
|
|
13
|
+
import { a as UserProfileContext } from '../UserProfileContext-c1834696.js';
|
|
14
|
+
import { u as uuidv4 } from '../uuid-118d6514.js';
|
|
15
|
+
import { c as copyToClipboard } from '../utils-e3bda5a7.js';
|
|
16
|
+
import { u as useLocalization } from '../LocalizationContext-9ecb0a32.js';
|
|
17
|
+
import { g as getSenderFromMessage, s as showMenuTrigger, i as isFineCopy, a as isFineEdit, b as isFineResend, c as isFineDelete, d as checkIsPending, e as checkIsFailed } from '../openChannelUtils-d942de1a.js';
|
|
18
|
+
import '../index-526e1c2f.js';
|
|
19
|
+
import '../_rollupPluginBabelHelpers-31a1bb40.js';
|
|
20
20
|
import 'prop-types';
|
|
21
|
-
import '../index-
|
|
21
|
+
import '../index-8cd47fe5.js';
|
|
22
22
|
import 'react-dom';
|
|
23
23
|
import './SortByRow.js';
|
|
24
|
-
import '../stringSet-
|
|
24
|
+
import '../stringSet-8f56c095.js';
|
|
25
25
|
import '../withSendbird.js';
|
|
26
26
|
import '../sendbirdSelectors.js';
|
|
27
|
-
import '../topics-
|
|
28
|
-
import '../utils-
|
|
29
|
-
import '../index-
|
|
27
|
+
import '../topics-27c99fc7.js';
|
|
28
|
+
import '../utils-e5523522.js';
|
|
29
|
+
import '../index-64bbdf03.js';
|
|
30
30
|
|
|
31
31
|
var URL_REG = /[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
|
|
32
32
|
var createUrlTester = function createUrlTester(regexp) {
|
|
@@ -52,6 +52,7 @@ var checkOGIsEnalbed = function checkOGIsEnalbed(message) {
|
|
|
52
52
|
|
|
53
53
|
function OpenchannelOGMessage(_a) {
|
|
54
54
|
var message = _a.message,
|
|
55
|
+
isOperator = _a.isOperator,
|
|
55
56
|
className = _a.className,
|
|
56
57
|
disabled = _a.disabled,
|
|
57
58
|
showEdit = _a.showEdit,
|
|
@@ -84,7 +85,6 @@ function OpenchannelOGMessage(_a) {
|
|
|
84
85
|
var contextMenuRef = useRef(null);
|
|
85
86
|
var avatarRef = useRef(null);
|
|
86
87
|
var isUrl = createUrlTester(URL_REG);
|
|
87
|
-
var isByMe = checkIsByMe(message, userId);
|
|
88
88
|
var isPending = checkIsPending(status);
|
|
89
89
|
var isFailed = checkIsFailed(status);
|
|
90
90
|
var sender = getSenderFromMessage(message);
|
|
@@ -188,7 +188,7 @@ function OpenchannelOGMessage(_a) {
|
|
|
188
188
|
}, /*#__PURE__*/React__default.createElement(Label, {
|
|
189
189
|
className: "sendbird-openchannel-og-message__top__right__title__sender-name",
|
|
190
190
|
type: LabelTypography.CAPTION_2,
|
|
191
|
-
color:
|
|
191
|
+
color: isOperator ? LabelColors.SECONDARY_3 : LabelColors.ONBACKGROUND_2
|
|
192
192
|
}, sender && (sender.friendName || sender.nickname || sender.userId)), /*#__PURE__*/React__default.createElement(Label, {
|
|
193
193
|
className: "sendbird-openchannel-og-message__top__right__title__sent-at",
|
|
194
194
|
type: LabelTypography.CAPTION_3,
|