@selfcommunity/react-ui 0.7.0-alpha.136 → 0.7.0-alpha.138
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/lib/cjs/components/CommentObject/CommentObject.d.ts +5 -5
- package/lib/cjs/components/CommentObject/CommentObject.d.ts.map +1 -1
- package/lib/cjs/components/CommentObject/CommentObject.js +14 -252
- package/lib/cjs/components/CommentObject/CommentObject.js.map +1 -1
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.d.ts +3 -3
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.d.ts.map +1 -1
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js.map +1 -1
- package/lib/cjs/components/CommentsObject/CommentsObject.d.ts +3 -3
- package/lib/cjs/components/CommentsObject/CommentsObject.d.ts.map +1 -1
- package/lib/cjs/components/CommentsObject/CommentsObject.js +1 -1
- package/lib/cjs/components/CommentsObject/CommentsObject.js.map +1 -1
- package/lib/cjs/components/Composer/Composer.d.ts +2 -2
- package/lib/cjs/components/Composer/Composer.d.ts.map +1 -1
- package/lib/cjs/components/Composer/Composer.js +1 -125
- package/lib/cjs/components/Composer/Composer.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Actions/Actions.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.js +4 -7
- package/lib/cjs/components/FeedObject/Actions/Actions.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Actions/Share/Share.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.d.ts +2 -18
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.js +10 -277
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.js.map +1 -1
- package/lib/cjs/components/FeedObject/Activities/Activities.d.ts +4 -4
- package/lib/cjs/components/FeedObject/Activities/Activities.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/Activities.js.map +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.d.ts +2 -2
- package/lib/cjs/components/FeedObject/Contributors/Contributors.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/FeedObject.d.ts +2 -2
- package/lib/cjs/components/FeedObject/FeedObject.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/FeedObject.js +8 -9
- package/lib/cjs/components/FeedObject/FeedObject.js.map +1 -1
- package/lib/cjs/components/FeedObject/Poll/Poll.d.ts.map +1 -1
- package/lib/cjs/components/FeedObject/Poll/Poll.js +1 -1
- package/lib/cjs/components/FeedObject/Poll/Poll.js.map +1 -1
- package/lib/cjs/components/InlineComposer/InlineComposer.d.ts.map +1 -1
- package/lib/cjs/components/InlineComposer/InlineComposer.js +1 -20
- package/lib/cjs/components/InlineComposer/InlineComposer.js.map +1 -1
- package/lib/cjs/components/Notification/Comment/Comment.d.ts +2 -12
- package/lib/cjs/components/Notification/Comment/Comment.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Comment/Comment.js +7 -12
- package/lib/cjs/components/Notification/Comment/Comment.js.map +1 -1
- package/lib/cjs/components/Notification/Contribution/Contribution.d.ts +2 -12
- package/lib/cjs/components/Notification/Contribution/Contribution.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Contribution/Contribution.js +11 -16
- package/lib/cjs/components/Notification/Contribution/Contribution.js.map +1 -1
- package/lib/cjs/components/Notification/Notification.d.ts.map +1 -1
- package/lib/cjs/components/Notification/Notification.js +7 -33
- package/lib/cjs/components/Notification/Notification.js.map +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +11 -265
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +81 -4
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +11 -27
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +198 -9
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +2 -2
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js.map +1 -1
- package/lib/cjs/components/PrivateMessageThreadItem/Skeleton.d.ts.map +1 -1
- package/lib/cjs/components/PrivateMessageThreadItem/Skeleton.js +2 -4
- package/lib/cjs/components/PrivateMessageThreadItem/Skeleton.js.map +1 -1
- package/lib/cjs/components/RelatedFeedObjects/RelatedFeedObjects.d.ts +2 -2
- package/lib/cjs/components/RelatedFeedObjects/RelatedFeedObjects.d.ts.map +1 -1
- package/lib/cjs/components/RelatedFeedObjects/RelatedFeedObjects.js.map +1 -1
- package/lib/cjs/components/User/User.d.ts +3 -8
- package/lib/cjs/components/User/User.d.ts.map +1 -1
- package/lib/cjs/components/User/User.js +6 -28
- package/lib/cjs/components/User/User.js.map +1 -1
- package/lib/cjs/components/UserInfoDialog/UserInfoDialog.d.ts +1 -1
- package/lib/cjs/components/UserInfoDialog/UserInfoDialog.d.ts.map +1 -1
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +50 -0
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts.map +1 -0
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +174 -0
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js.map +1 -0
- package/lib/cjs/components/VoteAudienceButton/index.d.ts +4 -0
- package/lib/cjs/components/VoteAudienceButton/index.d.ts.map +1 -0
- package/lib/cjs/components/{CommentObject/Reactions/ReactionsDialog → VoteAudienceButton}/index.js +2 -2
- package/lib/cjs/components/VoteAudienceButton/index.js.map +1 -0
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +53 -0
- package/lib/cjs/components/VoteButton/VoteButton.d.ts.map +1 -0
- package/lib/cjs/components/VoteButton/VoteButton.js +152 -0
- package/lib/cjs/components/VoteButton/VoteButton.js.map +1 -0
- package/lib/cjs/components/VoteButton/index.d.ts +4 -0
- package/lib/cjs/components/VoteButton/index.d.ts.map +1 -0
- package/lib/cjs/components/{FeedObject/Actions/Reaction → VoteButton}/index.js +2 -2
- package/lib/cjs/components/VoteButton/index.js.map +1 -0
- package/lib/cjs/shared/BaseDialog/BaseDialog.d.ts +11 -0
- package/lib/cjs/shared/BaseDialog/BaseDialog.d.ts.map +1 -1
- package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -8
- package/lib/cjs/shared/BaseDialog/BaseDialog.js.map +1 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.d.ts +2 -2
- package/lib/cjs/shared/ContributionActionsMenu/index.d.ts.map +1 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.js +14 -15
- package/lib/cjs/shared/ContributionActionsMenu/index.js.map +1 -1
- package/lib/cjs/utils/contribution.d.ts +2 -2
- package/lib/cjs/utils/contribution.d.ts.map +1 -1
- package/lib/cjs/utils/contribution.js +15 -17
- package/lib/cjs/utils/contribution.js.map +1 -1
- package/lib/esm/components/CommentObject/CommentObject.d.ts +5 -5
- package/lib/esm/components/CommentObject/CommentObject.d.ts.map +1 -1
- package/lib/esm/components/CommentObject/CommentObject.js +20 -258
- package/lib/esm/components/CommentObject/CommentObject.js.map +1 -1
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.d.ts +3 -3
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.d.ts.map +1 -1
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +3 -3
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js.map +1 -1
- package/lib/esm/components/CommentsObject/CommentsObject.d.ts +3 -3
- package/lib/esm/components/CommentsObject/CommentsObject.d.ts.map +1 -1
- package/lib/esm/components/CommentsObject/CommentsObject.js +2 -2
- package/lib/esm/components/CommentsObject/CommentsObject.js.map +1 -1
- package/lib/esm/components/Composer/Composer.d.ts +2 -2
- package/lib/esm/components/Composer/Composer.d.ts.map +1 -1
- package/lib/esm/components/Composer/Composer.js +2 -126
- package/lib/esm/components/Composer/Composer.js.map +1 -1
- package/lib/esm/components/Editor/plugins/ImagePlugin.js +1 -1
- package/lib/esm/components/Editor/plugins/ImagePlugin.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Actions.d.ts +2 -2
- package/lib/esm/components/FeedObject/Actions/Actions.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Actions.js +6 -9
- package/lib/esm/components/FeedObject/Actions/Actions.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.d.ts +2 -2
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +3 -3
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.d.ts +2 -2
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -3
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Share/Share.d.ts +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/Share.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/Share.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.d.ts +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.d.ts +2 -18
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.js +12 -255
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.js.map +1 -1
- package/lib/esm/components/FeedObject/Activities/Activities.d.ts +4 -4
- package/lib/esm/components/FeedObject/Activities/Activities.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Activities/Activities.js +2 -2
- package/lib/esm/components/FeedObject/Activities/Activities.js.map +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.d.ts +2 -2
- package/lib/esm/components/FeedObject/Contributors/Contributors.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/FeedObject.d.ts +2 -2
- package/lib/esm/components/FeedObject/FeedObject.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/FeedObject.js +10 -11
- package/lib/esm/components/FeedObject/FeedObject.js.map +1 -1
- package/lib/esm/components/FeedObject/Poll/Poll.d.ts.map +1 -1
- package/lib/esm/components/FeedObject/Poll/Poll.js +2 -2
- package/lib/esm/components/FeedObject/Poll/Poll.js.map +1 -1
- package/lib/esm/components/InlineComposer/InlineComposer.d.ts.map +1 -1
- package/lib/esm/components/InlineComposer/InlineComposer.js +1 -20
- package/lib/esm/components/InlineComposer/InlineComposer.js.map +1 -1
- package/lib/esm/components/Notification/Comment/Comment.d.ts +2 -12
- package/lib/esm/components/Notification/Comment/Comment.d.ts.map +1 -1
- package/lib/esm/components/Notification/Comment/Comment.js +9 -14
- package/lib/esm/components/Notification/Comment/Comment.js.map +1 -1
- package/lib/esm/components/Notification/Contribution/Contribution.d.ts +2 -12
- package/lib/esm/components/Notification/Contribution/Contribution.d.ts.map +1 -1
- package/lib/esm/components/Notification/Contribution/Contribution.js +13 -18
- package/lib/esm/components/Notification/Contribution/Contribution.js.map +1 -1
- package/lib/esm/components/Notification/Notification.d.ts.map +1 -1
- package/lib/esm/components/Notification/Notification.js +7 -33
- package/lib/esm/components/Notification/Notification.js.map +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +15 -269
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +84 -7
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +11 -27
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +201 -12
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js.map +1 -1
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +2 -2
- package/lib/esm/components/PrivateMessageThread/Skeleton.js.map +1 -1
- package/lib/esm/components/PrivateMessageThreadItem/Skeleton.d.ts.map +1 -1
- package/lib/esm/components/PrivateMessageThreadItem/Skeleton.js +2 -4
- package/lib/esm/components/PrivateMessageThreadItem/Skeleton.js.map +1 -1
- package/lib/esm/components/RelatedFeedObjects/RelatedFeedObjects.d.ts +2 -2
- package/lib/esm/components/RelatedFeedObjects/RelatedFeedObjects.d.ts.map +1 -1
- package/lib/esm/components/RelatedFeedObjects/RelatedFeedObjects.js.map +1 -1
- package/lib/esm/components/User/User.d.ts +3 -8
- package/lib/esm/components/User/User.d.ts.map +1 -1
- package/lib/esm/components/User/User.js +6 -28
- package/lib/esm/components/User/User.js.map +1 -1
- package/lib/esm/components/UserInfoDialog/UserInfoDialog.d.ts +1 -1
- package/lib/esm/components/UserInfoDialog/UserInfoDialog.d.ts.map +1 -1
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +50 -0
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts.map +1 -0
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +145 -0
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js.map +1 -0
- package/lib/esm/components/VoteAudienceButton/index.d.ts +4 -0
- package/lib/esm/components/VoteAudienceButton/index.d.ts.map +1 -0
- package/lib/esm/components/VoteAudienceButton/index.js +3 -0
- package/lib/esm/components/VoteAudienceButton/index.js.map +1 -0
- package/lib/esm/components/VoteButton/VoteButton.d.ts +53 -0
- package/lib/esm/components/VoteButton/VoteButton.d.ts.map +1 -0
- package/lib/esm/components/VoteButton/VoteButton.js +123 -0
- package/lib/esm/components/VoteButton/VoteButton.js.map +1 -0
- package/lib/esm/components/VoteButton/index.d.ts +4 -0
- package/lib/esm/components/VoteButton/index.d.ts.map +1 -0
- package/lib/esm/components/VoteButton/index.js +3 -0
- package/lib/esm/components/VoteButton/index.js.map +1 -0
- package/lib/esm/shared/BaseDialog/BaseDialog.d.ts +11 -0
- package/lib/esm/shared/BaseDialog/BaseDialog.d.ts.map +1 -1
- package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -8
- package/lib/esm/shared/BaseDialog/BaseDialog.js.map +1 -1
- package/lib/esm/shared/ContributionActionsMenu/index.d.ts +2 -2
- package/lib/esm/shared/ContributionActionsMenu/index.d.ts.map +1 -1
- package/lib/esm/shared/ContributionActionsMenu/index.js +12 -13
- package/lib/esm/shared/ContributionActionsMenu/index.js.map +1 -1
- package/lib/esm/utils/contribution.d.ts +2 -2
- package/lib/esm/utils/contribution.d.ts.map +1 -1
- package/lib/esm/utils/contribution.js +16 -18
- package/lib/esm/utils/contribution.js.map +1 -1
- package/lib/umd/react-ui.js +11 -11
- package/lib/umd/react-ui.js.LICENSE.txt +1 -1
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +6 -6
- package/lib/cjs/components/CommentObject/Reactions/Reactions.d.ts +0 -23
- package/lib/cjs/components/CommentObject/Reactions/Reactions.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/Reactions.js +0 -97
- package/lib/cjs/components/CommentObject/Reactions/Reactions.js.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.d.ts +0 -34
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.js +0 -129
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.js.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/index.d.ts +0 -4
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/index.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/ReactionsDialog/index.js.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/index.d.ts +0 -4
- package/lib/cjs/components/CommentObject/Reactions/index.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Reactions/index.js +0 -8
- package/lib/cjs/components/CommentObject/Reactions/index.js.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/Votes.d.ts +0 -19
- package/lib/cjs/components/CommentObject/Votes/Votes.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/Votes.js +0 -93
- package/lib/cjs/components/CommentObject/Votes/Votes.js.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/VotesDialog.d.ts +0 -24
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/VotesDialog.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/VotesDialog.js +0 -95
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/VotesDialog.js.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/index.d.ts +0 -4
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/index.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/index.js +0 -8
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/index.js.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/index.d.ts +0 -4
- package/lib/cjs/components/CommentObject/Votes/index.d.ts.map +0 -1
- package/lib/cjs/components/CommentObject/Votes/index.js +0 -8
- package/lib/cjs/components/CommentObject/Votes/index.js.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/Reaction.d.ts +0 -34
- package/lib/cjs/components/FeedObject/Actions/Reaction/Reaction.d.ts.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/Reaction.js +0 -474
- package/lib/cjs/components/FeedObject/Actions/Reaction/Reaction.js.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/ReactionsPopover.d.ts +0 -40
- package/lib/cjs/components/FeedObject/Actions/Reaction/ReactionsPopover.d.ts.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/ReactionsPopover.js +0 -156
- package/lib/cjs/components/FeedObject/Actions/Reaction/ReactionsPopover.js.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/index.d.ts +0 -3
- package/lib/cjs/components/FeedObject/Actions/Reaction/index.d.ts.map +0 -1
- package/lib/cjs/components/FeedObject/Actions/Reaction/index.js.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/Reactions.d.ts +0 -23
- package/lib/esm/components/CommentObject/Reactions/Reactions.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/Reactions.js +0 -68
- package/lib/esm/components/CommentObject/Reactions/Reactions.js.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.d.ts +0 -34
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.js +0 -100
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/ReactionsDialog.js.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/index.d.ts +0 -4
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/index.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/index.js +0 -3
- package/lib/esm/components/CommentObject/Reactions/ReactionsDialog/index.js.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/index.d.ts +0 -4
- package/lib/esm/components/CommentObject/Reactions/index.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Reactions/index.js +0 -3
- package/lib/esm/components/CommentObject/Reactions/index.js.map +0 -1
- package/lib/esm/components/CommentObject/Votes/Votes.d.ts +0 -19
- package/lib/esm/components/CommentObject/Votes/Votes.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Votes/Votes.js +0 -64
- package/lib/esm/components/CommentObject/Votes/Votes.js.map +0 -1
- package/lib/esm/components/CommentObject/Votes/VotesDialog/VotesDialog.d.ts +0 -24
- package/lib/esm/components/CommentObject/Votes/VotesDialog/VotesDialog.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Votes/VotesDialog/VotesDialog.js +0 -66
- package/lib/esm/components/CommentObject/Votes/VotesDialog/VotesDialog.js.map +0 -1
- package/lib/esm/components/CommentObject/Votes/VotesDialog/index.d.ts +0 -4
- package/lib/esm/components/CommentObject/Votes/VotesDialog/index.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Votes/VotesDialog/index.js +0 -3
- package/lib/esm/components/CommentObject/Votes/VotesDialog/index.js.map +0 -1
- package/lib/esm/components/CommentObject/Votes/index.d.ts +0 -4
- package/lib/esm/components/CommentObject/Votes/index.d.ts.map +0 -1
- package/lib/esm/components/CommentObject/Votes/index.js +0 -3
- package/lib/esm/components/CommentObject/Votes/index.js.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/Reaction.d.ts +0 -34
- package/lib/esm/components/FeedObject/Actions/Reaction/Reaction.d.ts.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/Reaction.js +0 -444
- package/lib/esm/components/FeedObject/Actions/Reaction/Reaction.js.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/ReactionsPopover.d.ts +0 -40
- package/lib/esm/components/FeedObject/Actions/Reaction/ReactionsPopover.d.ts.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/ReactionsPopover.js +0 -127
- package/lib/esm/components/FeedObject/Actions/Reaction/ReactionsPopover.js.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/index.d.ts +0 -3
- package/lib/esm/components/FeedObject/Actions/Reaction/index.d.ts.map +0 -1
- package/lib/esm/components/FeedObject/Actions/Reaction/index.js +0 -3
- package/lib/esm/components/FeedObject/Actions/Reaction/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VotesDialog.js","sourceRoot":"","sources":["../../../../../../src/components/CommentObject/Votes/VotesDialog/VotesDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiD;AACjD,2CAA4C;AAC5C,4CAAkD;AAClD,uFAA+D;AAC/D,0EAAkD;AAClD,8DAA0E;AAC1E,gDAA4C;AAC5C,0DAAkE;AAClE,gDAA0E;AAC1E,yDAAyD;AACzD,+EAAuD;AACvD,yFAAiE;AACjE,yDAAiC;AACjC,iDAA4C;AAC5C,wCAA0C;AAE1C,MAAM,MAAM,GAAG,4BAA4B,CAAC;AAE5C,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,GAAG,MAAM,OAAO;CACvB,CAAC;AAEF,MAAM,IAAI,GAAG,IAAA,eAAM,EAAC,cAAG,EAAE;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI;CAClD,CAAC,CAAC,EAAE,CAAC,CAAC;AA2BP,SAAwB,wBAAwB,CAAC,OAAsC;IACrF,QAAQ;IACR,MAAM,KAAK,GAAkC,IAAA,sBAAa,EAAC;QACzD,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;KACb,CAAC,CAAC;IAEH,MAAM,EAAC,eAAe,EAAE,aAAa,EAAE,IAAI,GAAG,KAAK,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC;IAEtE,mBAAmB;IACnB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAC,GAAG,IAAA,oCAAuB,EAAC,EAAC,EAAE,EAAE,eAAe,EAAE,aAAa,EAAC,CAAC,CAAC;IAEpF,QAAQ;IACR,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAU,IAAI,CAAC,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C,mCAAmC,EAAC,EAAE,EAAC,mCAAmC,GAAG,EACrH,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,IACT,SAAS,CAAC,CAAC,CAAC,CACX,8BAAC,yBAAe,IAAC,IAAI,EAAE,EAAE,GAAI,CAC9B,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAc,IACb,UAAU,EAAE,KAAK,CAAC,MAAM,EACxB,IAAI,EAAE,UAAU,EAChB,WAAW,EAAE,IAAI,KAAK,IAAI,EAC1B,UAAU,EAAE,8BAAC,yBAAe,IAAC,IAAI,EAAE,EAAE,GAAI,EACzC,MAAM,EAAE,GAAG,EACX,UAAU,EACR,8BAAC,oBAAU,IAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ;YACxC;gBACE,8BAAC,6BAAgB,IAAC,EAAE,EAAC,0CAA0C,EAAC,cAAc,EAAC,0CAA0C,GAAG,CAC1H,CACO;QAEf,8BAAC,eAAI,QACF,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,8BAAC,mBAAQ,IAAC,GAAG,EAAE,KAAK;YAClB,8BAAC,cAAI,IAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,GAAI,CAC1C,CACZ,CAAC,CACG,CACQ,CAClB,CACU,CACd,CAAC;AACJ,CAAC;AAzED,2CAyEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CommentObject/Votes/VotesDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,EAAE,EAAC,6BAA6B,EAAC,MAAM,eAAe,CAAC;AACtF,eAAe,wBAAwB,CAAC;AACxC,OAAO,EAAC,6BAA6B,EAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const VotesDialog_1 = __importDefault(require("./VotesDialog"));
|
|
7
|
-
exports.default = VotesDialog_1.default;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/CommentObject/Votes/VotesDialog/index.tsx"],"names":[],"mappings":";;;;;AAAA,gEAAsF;AACtF,kBAAe,qBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommentObject/Votes/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAC1C,eAAe,KAAK,CAAC;AACrB,OAAO,EAAC,UAAU,EAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Votes_1 = __importDefault(require("./Votes"));
|
|
7
|
-
exports.default = Votes_1.default;
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/CommentObject/Votes/index.tsx"],"names":[],"mappings":";;;;;AAAA,oDAA0C;AAC1C,kBAAe,eAAK,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { VoteProps } from '../Vote';
|
|
3
|
-
/**
|
|
4
|
-
* We have complex state logic that involves multiple sub-values,
|
|
5
|
-
* so useReducer is preferable to useState.
|
|
6
|
-
* Define all possible auth action types label
|
|
7
|
-
* Use this to export actions and dispatch an action
|
|
8
|
-
*/
|
|
9
|
-
export declare const voteActionTypes: {
|
|
10
|
-
LOADING: string;
|
|
11
|
-
REQUEST_VOTES_LOADING: string;
|
|
12
|
-
REQUEST_VOTES_SUCCESS: string;
|
|
13
|
-
REQUEST_REACTION_SUCCESS: string;
|
|
14
|
-
REQUEST_VOTES_FAILED: string;
|
|
15
|
-
TOGGLE_VOTE_DIALOG: string;
|
|
16
|
-
REFRESHING_VOTES: string;
|
|
17
|
-
VOTING: string;
|
|
18
|
-
REQUEST_VOTING_SUCCESS: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Action types label for reaction actions handler
|
|
22
|
-
*/
|
|
23
|
-
export declare const reactionActionTypes: {
|
|
24
|
-
ADD: string;
|
|
25
|
-
CHANGE: string;
|
|
26
|
-
REMOVE: string;
|
|
27
|
-
};
|
|
28
|
-
export interface TabPanelProps {
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
index: string;
|
|
31
|
-
value: string | any;
|
|
32
|
-
}
|
|
33
|
-
export default function Reaction(inProps: VoteProps): JSX.Element;
|
|
34
|
-
//# sourceMappingURL=Reaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Reaction.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FeedObject/Actions/Reaction/Reaction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AA4B9E,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAkBlC;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;CAU3B,CAAC;AA6EF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAoBF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB;AAWD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CA0bhE"}
|
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.reactionActionTypes = exports.voteActionTypes = void 0;
|
|
41
|
-
const react_1 = __importStar(require("react"));
|
|
42
|
-
const BaseDialog_1 = __importDefault(require("../../../../shared/BaseDialog"));
|
|
43
|
-
const react_intl_1 = require("react-intl");
|
|
44
|
-
const material_1 = require("@mui/material");
|
|
45
|
-
const InfiniteScroll_1 = __importDefault(require("../../../../shared/InfiniteScroll"));
|
|
46
|
-
const Icon_1 = __importDefault(require("@mui/material/Icon"));
|
|
47
|
-
const Skeleton_1 = __importDefault(require("@mui/material/Skeleton"));
|
|
48
|
-
const LoadingButton_1 = __importDefault(require("@mui/lab/LoadingButton"));
|
|
49
|
-
const CentralProgress_1 = __importDefault(require("../../../../shared/CentralProgress"));
|
|
50
|
-
const User_1 = __importDefault(require("../../../User"));
|
|
51
|
-
const Errors_1 = require("../../../../constants/Errors");
|
|
52
|
-
const styles_1 = require("@mui/material/styles");
|
|
53
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
54
|
-
const notistack_1 = require("notistack");
|
|
55
|
-
const types_1 = require("@selfcommunity/types");
|
|
56
|
-
const api_services_1 = require("@selfcommunity/api-services");
|
|
57
|
-
const utils_1 = require("@selfcommunity/utils");
|
|
58
|
-
const react_core_1 = require("@selfcommunity/react-core");
|
|
59
|
-
const system_1 = require("@mui/system");
|
|
60
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
61
|
-
const ReactionsPopover_1 = __importDefault(require("./ReactionsPopover"));
|
|
62
|
-
const messages = (0, react_intl_1.defineMessages)({
|
|
63
|
-
votes: {
|
|
64
|
-
id: 'ui.feedObject.vote.votes',
|
|
65
|
-
defaultMessage: 'ui.feedObject.vote.votes'
|
|
66
|
-
},
|
|
67
|
-
votedByMe: {
|
|
68
|
-
id: 'ui.feedObject.vote.votedByMe',
|
|
69
|
-
defaultMessage: 'ui.feedObject.votedByMe.you'
|
|
70
|
-
},
|
|
71
|
-
votedByOnlyMe: {
|
|
72
|
-
id: 'ui.feedObject.vote.votedByOnlyMe',
|
|
73
|
-
defaultMessage: 'ui.feedObject.votedByOnlyMe.you'
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* We have complex state logic that involves multiple sub-values,
|
|
78
|
-
* so useReducer is preferable to useState.
|
|
79
|
-
* Define all possible auth action types label
|
|
80
|
-
* Use this to export actions and dispatch an action
|
|
81
|
-
*/
|
|
82
|
-
exports.voteActionTypes = {
|
|
83
|
-
LOADING: '_loading_votes',
|
|
84
|
-
REQUEST_VOTES_LOADING: '_request_votes_loading',
|
|
85
|
-
REQUEST_VOTES_SUCCESS: '_request_votes_success',
|
|
86
|
-
REQUEST_REACTION_SUCCESS: '_request_reaction_success',
|
|
87
|
-
REQUEST_VOTES_FAILED: '_request_votes_failed',
|
|
88
|
-
TOGGLE_VOTE_DIALOG: '_toggle_vote_dialog',
|
|
89
|
-
REFRESHING_VOTES: '_refreshing_votes',
|
|
90
|
-
VOTING: '_voting',
|
|
91
|
-
REQUEST_VOTING_SUCCESS: '_request_vote_success'
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* votesReducer manage the state of authentication
|
|
95
|
-
* update the state base on action type
|
|
96
|
-
* @param state
|
|
97
|
-
* @param action
|
|
98
|
-
*/
|
|
99
|
-
function votesReducer(state, action) {
|
|
100
|
-
switch (action.type) {
|
|
101
|
-
case exports.voteActionTypes.REQUEST_VOTES_LOADING:
|
|
102
|
-
return Object.assign({}, state, { loadingVotes: true });
|
|
103
|
-
case exports.voteActionTypes.REQUEST_VOTES_SUCCESS:
|
|
104
|
-
return {
|
|
105
|
-
votes: state.refreshing ? [...state.votes] : [...state.votes, ...action.payload.data],
|
|
106
|
-
loadingVotes: false,
|
|
107
|
-
refreshing: false,
|
|
108
|
-
voting: false,
|
|
109
|
-
next: action.payload.next,
|
|
110
|
-
openVotesDialog: state.openVotesDialog,
|
|
111
|
-
error: null,
|
|
112
|
-
triggered: false
|
|
113
|
-
};
|
|
114
|
-
case exports.voteActionTypes.REQUEST_REACTION_SUCCESS:
|
|
115
|
-
return {
|
|
116
|
-
votes: state.refreshing ? [...state.votes] : action.payload.data,
|
|
117
|
-
loadingVotes: false,
|
|
118
|
-
refreshing: false,
|
|
119
|
-
voting: false,
|
|
120
|
-
next: action.payload.next,
|
|
121
|
-
openVotesDialog: state.openVotesDialog,
|
|
122
|
-
error: null,
|
|
123
|
-
triggered: false
|
|
124
|
-
};
|
|
125
|
-
case exports.voteActionTypes.TOGGLE_VOTE_DIALOG:
|
|
126
|
-
return Object.assign({}, state, { openVotesDialog: !state.openVotesDialog });
|
|
127
|
-
case exports.voteActionTypes.REQUEST_VOTES_FAILED:
|
|
128
|
-
return Object.assign({}, state, { loadingVotes: false, error: action.payload.error, refreshing: false });
|
|
129
|
-
case exports.voteActionTypes.REFRESHING_VOTES:
|
|
130
|
-
return Object.assign({}, state, { votes: [], loadingVotes: false, refreshing: true, error: null });
|
|
131
|
-
case exports.voteActionTypes.VOTING:
|
|
132
|
-
return Object.assign({}, state, { voting: true, error: null });
|
|
133
|
-
case exports.voteActionTypes.REQUEST_VOTING_SUCCESS:
|
|
134
|
-
return Object.assign({}, state, { voting: false, error: null, triggered: true });
|
|
135
|
-
default:
|
|
136
|
-
throw new Error(`Unhandled type: ${action.type}`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Defines initial state
|
|
141
|
-
*/
|
|
142
|
-
function stateInitializer({ feedObjectId = null, feedObject = null, feedObjectType = types_1.SCFeedObjectTypologyType.POST }) {
|
|
143
|
-
const next = feedObjectId && feedObjectType
|
|
144
|
-
? `${api_services_1.Endpoints.VotesList.url({ type: feedObjectType, id: feedObjectId })}`
|
|
145
|
-
: `${api_services_1.Endpoints.VotesList.url({ type: feedObjectType, id: feedObject.id })}`;
|
|
146
|
-
return {
|
|
147
|
-
votes: [],
|
|
148
|
-
loadingVotes: false,
|
|
149
|
-
voting: null,
|
|
150
|
-
refreshing: false,
|
|
151
|
-
next,
|
|
152
|
-
openVotesDialog: false,
|
|
153
|
-
error: null,
|
|
154
|
-
triggered: false
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Action types label for reaction actions handler
|
|
159
|
-
*/
|
|
160
|
-
exports.reactionActionTypes = {
|
|
161
|
-
ADD: 'add',
|
|
162
|
-
CHANGE: 'change',
|
|
163
|
-
REMOVE: 'remove'
|
|
164
|
-
};
|
|
165
|
-
const PREFIX = 'SCReactionAction';
|
|
166
|
-
const classes = {
|
|
167
|
-
root: `${PREFIX}-root`,
|
|
168
|
-
inline: `${PREFIX}-inline`,
|
|
169
|
-
divider: `${PREFIX}-divider`,
|
|
170
|
-
button: `${PREFIX}-button`,
|
|
171
|
-
voted: `${PREFIX}-voted`,
|
|
172
|
-
viewAudienceButton: `${PREFIX}-view-audience-button`,
|
|
173
|
-
reaction: `${PREFIX}-reaction`
|
|
174
|
-
};
|
|
175
|
-
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
176
|
-
name: PREFIX,
|
|
177
|
-
slot: 'Root',
|
|
178
|
-
overridesResolver: (props, styles) => styles.root
|
|
179
|
-
})(({ theme }) => ({}));
|
|
180
|
-
function TabPanel(props) {
|
|
181
|
-
const { children, value, index } = props, other = __rest(props, ["children", "value", "index"]);
|
|
182
|
-
return (react_1.default.createElement("div", Object.assign({ hidden: value !== index, id: `tab-panel-${index}` }, other), value === index && react_1.default.createElement(react_1.default.Fragment, null, children)));
|
|
183
|
-
}
|
|
184
|
-
function Reaction(inProps) {
|
|
185
|
-
const props = (0, system_1.useThemeProps)({
|
|
186
|
-
props: inProps,
|
|
187
|
-
name: PREFIX
|
|
188
|
-
});
|
|
189
|
-
// PROPS
|
|
190
|
-
const { className = null, feedObjectId = null, feedObject = null, feedObjectType = types_1.SCFeedObjectTypologyType.POST, withAudience = true, withAction = true, inlineAction = false, onVoteAction = () => null } = props, rest = __rest(props, ["className", "feedObjectId", "feedObject", "feedObjectType", "withAudience", "withAction", "inlineAction", "onVoteAction"]);
|
|
191
|
-
// CONTEXT
|
|
192
|
-
const scContext = (0, react_core_1.useSCContext)();
|
|
193
|
-
const scUserContext = (0, react_core_1.useSCUser)();
|
|
194
|
-
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
195
|
-
// STATE
|
|
196
|
-
const { obj, setObj } = (0, react_core_1.useSCFetchFeedObject)({ id: feedObjectId, feedObject, feedObjectType });
|
|
197
|
-
const { reactions, isLoading } = (0, react_core_1.useSCFetchReactions)();
|
|
198
|
-
const [state, dispatch] = (0, react_1.useReducer)(votesReducer, {}, () => stateInitializer({ feedObjectId, feedObject, feedObjectType }));
|
|
199
|
-
const [tabIndex, setTabIndex] = (0, react_1.useState)('all');
|
|
200
|
-
const [reaction, setReaction] = (0, react_1.useState)(null);
|
|
201
|
-
const defaultReactionId = 1;
|
|
202
|
-
const defaultReaction = reactions.find((r) => r.id === defaultReactionId);
|
|
203
|
-
const popoverAnchor = (0, react_1.useRef)(null);
|
|
204
|
-
const [timeout, setModalTimeout] = (0, react_1.useState)(null);
|
|
205
|
-
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
206
|
-
const [reactionsList, setReactionsList] = (0, react_1.useState)(obj.reactions_count);
|
|
207
|
-
// INTL
|
|
208
|
-
const intl = (0, react_intl_1.useIntl)();
|
|
209
|
-
// HANDLERS
|
|
210
|
-
const handleChange = (event, newValue) => {
|
|
211
|
-
setTabIndex(newValue);
|
|
212
|
-
};
|
|
213
|
-
function handleMouseEnter() {
|
|
214
|
-
timeout && !hovered && clearTimeout(timeout);
|
|
215
|
-
setModalTimeout(setTimeout(() => setHovered(true), 1000));
|
|
216
|
-
}
|
|
217
|
-
function handleMouseLeave() {
|
|
218
|
-
timeout && clearTimeout(timeout);
|
|
219
|
-
setModalTimeout(setTimeout(() => setHovered(false), 1000));
|
|
220
|
-
}
|
|
221
|
-
function dispatchReactionsActions(type, reactionObj) {
|
|
222
|
-
const list = [...reactionsList];
|
|
223
|
-
let updatedList;
|
|
224
|
-
const index = list.findIndex((r) => r.reaction.id === reactionObj.id);
|
|
225
|
-
const inList = list.length ? list.some((o) => o.reaction.id === reactionObj.id) : false;
|
|
226
|
-
switch (type) {
|
|
227
|
-
case exports.reactionActionTypes.REMOVE:
|
|
228
|
-
if (inList && list[index].count > 1) {
|
|
229
|
-
list[index].count = list[index].count - 1;
|
|
230
|
-
updatedList = list;
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
list.splice(index, 1);
|
|
234
|
-
updatedList = list;
|
|
235
|
-
}
|
|
236
|
-
return updatedList;
|
|
237
|
-
case exports.reactionActionTypes.ADD:
|
|
238
|
-
if (inList) {
|
|
239
|
-
list[index].count = list[index].count + 1;
|
|
240
|
-
updatedList = list;
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
updatedList = [...list, { reaction: reactionObj, count: 1 }];
|
|
244
|
-
}
|
|
245
|
-
return updatedList;
|
|
246
|
-
case exports.reactionActionTypes.CHANGE:
|
|
247
|
-
const i = list.findIndex((r) => r.reaction.id === obj.reaction.id);
|
|
248
|
-
if (!inList) {
|
|
249
|
-
list[i].reaction = list[i].count === 1 ? reactionObj : list[i].reaction;
|
|
250
|
-
list[i].count = list[i].count >= 1 ? list[i].count - 1 : list[i].count;
|
|
251
|
-
setReactionsList(dispatchReactionsActions(exports.reactionActionTypes.ADD, reactionObj));
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
const n = dispatchReactionsActions(exports.reactionActionTypes.REMOVE, obj.reaction);
|
|
255
|
-
const newIndex = n.findIndex((r) => r.reaction.id === reactionObj.id);
|
|
256
|
-
n[newIndex].count = n[newIndex].count + 1;
|
|
257
|
-
setReactionsList(n);
|
|
258
|
-
}
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Handles reaction actions(add, update, delete);
|
|
264
|
-
* @param voted
|
|
265
|
-
* @param r
|
|
266
|
-
*/
|
|
267
|
-
function handleReactions(voted, r) {
|
|
268
|
-
if (voted) {
|
|
269
|
-
const forRemoval = obj.reaction.id === r.id;
|
|
270
|
-
if (forRemoval) {
|
|
271
|
-
setReactionsList(dispatchReactionsActions(exports.reactionActionTypes.REMOVE, obj.reaction));
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
dispatchReactionsActions(exports.reactionActionTypes.CHANGE, r);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
setReactionsList(dispatchReactionsActions(exports.reactionActionTypes.ADD, r));
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Fetches Votes only if obj
|
|
283
|
-
*/
|
|
284
|
-
(0, react_1.useEffect)(() => {
|
|
285
|
-
if (obj && state.next && !state.loading && !state.refreshing && state.openVotesDialog) {
|
|
286
|
-
dispatch({ type: exports.voteActionTypes.REQUEST_VOTES_LOADING });
|
|
287
|
-
fetchVotes()
|
|
288
|
-
.then((data) => {
|
|
289
|
-
dispatch({
|
|
290
|
-
type: exports.voteActionTypes.REQUEST_VOTES_SUCCESS,
|
|
291
|
-
payload: {
|
|
292
|
-
next: data['next'],
|
|
293
|
-
data: data['results']
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
})
|
|
297
|
-
.catch((error) => {
|
|
298
|
-
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}, [state.openVotesDialog]);
|
|
302
|
-
/**
|
|
303
|
-
* Fetches votes only when changing/performing vote and opening votes dialog at the same time.
|
|
304
|
-
*/
|
|
305
|
-
(0, react_1.useEffect)(() => {
|
|
306
|
-
if (obj && !state.loadingVotes && !state.refreshing && state.openVotesDialog) {
|
|
307
|
-
dispatch({ type: exports.voteActionTypes.REQUEST_VOTES_LOADING });
|
|
308
|
-
fetchVotes()
|
|
309
|
-
.then((data) => {
|
|
310
|
-
dispatch({
|
|
311
|
-
type: exports.voteActionTypes.REQUEST_REACTION_SUCCESS,
|
|
312
|
-
payload: {
|
|
313
|
-
next: data['next'],
|
|
314
|
-
data: data['results']
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
})
|
|
318
|
-
.catch((error) => {
|
|
319
|
-
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}, [state.openVotesDialog && state.triggered]);
|
|
323
|
-
/**
|
|
324
|
-
* Opens dialog votes
|
|
325
|
-
*/
|
|
326
|
-
function handleToggleVotesDialog() {
|
|
327
|
-
dispatch({ type: exports.voteActionTypes.TOGGLE_VOTE_DIALOG });
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* fetches Votes
|
|
331
|
-
*/
|
|
332
|
-
const fetchVotes = (0, react_1.useMemo)(() => () => {
|
|
333
|
-
return api_services_1.http
|
|
334
|
-
.request({
|
|
335
|
-
url: obj.type === state.feedObjectType ? state.next : api_services_1.Endpoints.VotesList.url({ type: obj.type, id: obj.id }),
|
|
336
|
-
method: api_services_1.Endpoints.VotesList.method
|
|
337
|
-
})
|
|
338
|
-
.then((res) => {
|
|
339
|
-
if (res.status >= 300) {
|
|
340
|
-
return Promise.reject(res);
|
|
341
|
-
}
|
|
342
|
-
return Promise.resolve(res.data);
|
|
343
|
-
});
|
|
344
|
-
}, [state.next]);
|
|
345
|
-
/**
|
|
346
|
-
* Performs vote with reactions
|
|
347
|
-
*/
|
|
348
|
-
const performReaction = (0, react_1.useMemo)(() => (reaction) => {
|
|
349
|
-
return api_services_1.http
|
|
350
|
-
.request({
|
|
351
|
-
url: api_services_1.Endpoints.Vote.url({ type: obj.type, id: obj.id }),
|
|
352
|
-
method: api_services_1.Endpoints.Vote.method,
|
|
353
|
-
params: {
|
|
354
|
-
reaction: reaction.id
|
|
355
|
-
}
|
|
356
|
-
})
|
|
357
|
-
.then((res) => {
|
|
358
|
-
if (res.status >= 300) {
|
|
359
|
-
return Promise.reject(res);
|
|
360
|
-
}
|
|
361
|
-
return Promise.resolve(res.data);
|
|
362
|
-
});
|
|
363
|
-
}, [obj]);
|
|
364
|
-
/**
|
|
365
|
-
* Performs voteUp/voteDown
|
|
366
|
-
*/
|
|
367
|
-
function vote(reaction) {
|
|
368
|
-
handleMouseLeave();
|
|
369
|
-
setReaction(reaction);
|
|
370
|
-
if (scUserContext.user && Object.prototype.hasOwnProperty.call(obj, 'reaction')) {
|
|
371
|
-
if (react_core_1.UserUtils.isBlocked(scUserContext.user)) {
|
|
372
|
-
enqueueSnackbar(react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.common.userBlocked", defaultMessage: "ui.common.userBlocked" }), {
|
|
373
|
-
variant: 'warning',
|
|
374
|
-
autoHideDuration: 3000
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
if (obj && !state.voting) {
|
|
379
|
-
dispatch({ type: exports.voteActionTypes.VOTING });
|
|
380
|
-
performReaction(reaction)
|
|
381
|
-
.then((data) => {
|
|
382
|
-
dispatch({ type: exports.voteActionTypes.REQUEST_VOTING_SUCCESS });
|
|
383
|
-
const newObj = Object.assign({}, obj, {
|
|
384
|
-
voted: obj.voted && obj.reaction.id !== reaction.id ? true : !obj.voted,
|
|
385
|
-
vote_count: obj.voted && obj.reaction.id === reaction.id
|
|
386
|
-
? obj.vote_count - 1
|
|
387
|
-
: obj.voted && obj.reaction.id !== reaction.id
|
|
388
|
-
? obj.vote_count
|
|
389
|
-
: obj.vote_count + 1,
|
|
390
|
-
reaction: reaction
|
|
391
|
-
});
|
|
392
|
-
setObj(newObj);
|
|
393
|
-
handleReactions(obj.voted, reaction);
|
|
394
|
-
onVoteAction && onVoteAction(newObj);
|
|
395
|
-
})
|
|
396
|
-
.catch((error) => {
|
|
397
|
-
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
scContext.settings.handleAnonymousAction();
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
const handleReactionVote = (r) => {
|
|
407
|
-
vote(r);
|
|
408
|
-
};
|
|
409
|
-
/**
|
|
410
|
-
* Renders audience with detail dialog
|
|
411
|
-
* @return {JSX.Element}
|
|
412
|
-
*/
|
|
413
|
-
function renderAudience() {
|
|
414
|
-
const { loadingVotes, votes, openVotesDialog } = state;
|
|
415
|
-
const filteredVotes = lodash_1.default.groupBy(votes, (v) => v.reaction.label);
|
|
416
|
-
let audience;
|
|
417
|
-
if (withAudience) {
|
|
418
|
-
if (!obj) {
|
|
419
|
-
audience = (react_1.default.createElement(material_1.Button, { variant: "text", size: "small", disabled: true, color: "inherit" },
|
|
420
|
-
react_1.default.createElement(Skeleton_1.default, { animation: "wave", height: 18, width: 50 })));
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
audience = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
424
|
-
react_1.default.createElement(material_1.Button, { variant: "text", size: "small", onClick: handleToggleVotesDialog, disabled: obj.vote_count === 0, className: classes.viewAudienceButton },
|
|
425
|
-
react_1.default.createElement(material_1.AvatarGroup, { max: 3 },
|
|
426
|
-
reactionsList.map((r, i) => (react_1.default.createElement(material_1.Avatar, { alt: r.reaction.label, src: r.reaction.image, key: i, className: classes.reaction }))),
|
|
427
|
-
scUserContext.user && obj.voted ? (react_1.default.createElement(material_1.Typography, { component: 'span' }, obj.vote_count === 1
|
|
428
|
-
? intl.formatMessage(messages.votedByOnlyMe)
|
|
429
|
-
: intl.formatMessage(messages.votedByMe, { total: obj.vote_count - 1 }))) : (react_1.default.createElement(material_1.Typography, { component: 'span' }, `${intl.formatMessage(messages.votes, { total: obj.vote_count })}`)))),
|
|
430
|
-
openVotesDialog && !state.triggered && (react_1.default.createElement(BaseDialog_1.default, { title: react_1.default.createElement(material_1.Tabs, { value: tabIndex, onChange: handleChange, variant: "scrollable", scrollButtons: true, allowScrollButtonsMobile: true },
|
|
431
|
-
react_1.default.createElement(material_1.Tab, { value: 'all', label: react_1.default.createElement(react_intl_1.FormattedMessage, { defaultMessage: "ui.feedObject.votesDialog.reactionsEnabled.title", id: "ui.feedObject.votesDialog.reactionsEnabled.title" }) }),
|
|
432
|
-
reactionsList.map((r, index) => (react_1.default.createElement(material_1.Tab, { icon: react_1.default.createElement(Icon_1.default, null,
|
|
433
|
-
react_1.default.createElement("img", { alt: r.reaction.label, src: r.reaction.image })), iconPosition: "start", label: r.count, key: index, value: r.reaction.label })))), onClose: handleToggleVotesDialog, open: openVotesDialog }, loadingVotes ? (react_1.default.createElement(CentralProgress_1.default, { size: 50 })) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
434
|
-
react_1.default.createElement(TabPanel, { value: 'all', index: tabIndex },
|
|
435
|
-
react_1.default.createElement(InfiniteScroll_1.default, { dataLength: votes.length, next: fetchVotes, hasMoreNext: Boolean(state.next), loaderNext: react_1.default.createElement(CentralProgress_1.default, { size: 30 }), height: 400, endMessage: react_1.default.createElement("p", { style: { textAlign: 'center' } },
|
|
436
|
-
react_1.default.createElement("b", null,
|
|
437
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.votesDialog.noOtherLikes", defaultMessage: "ui.feedObject.votesDialog.noOtherLikes" }))) },
|
|
438
|
-
react_1.default.createElement(material_1.List, null, votes.map((vote, index) => (react_1.default.createElement(material_1.ListItem, { key: index },
|
|
439
|
-
react_1.default.createElement(User_1.default, { elevation: 0, user: vote.user, key: index, sx: { m: 0 }, showReaction: true, reaction: vote.reaction }))))))),
|
|
440
|
-
Object.keys(filteredVotes).map((key, index) => (react_1.default.createElement(react_1.default.Fragment, { key: index },
|
|
441
|
-
react_1.default.createElement(TabPanel, { value: key, index: tabIndex },
|
|
442
|
-
react_1.default.createElement(InfiniteScroll_1.default, { dataLength: votes.length, next: fetchVotes, hasMoreNext: Boolean(state.next), loaderNext: react_1.default.createElement(CentralProgress_1.default, { size: 30 }), height: 400, endMessage: react_1.default.createElement("p", { style: { textAlign: 'center' } },
|
|
443
|
-
react_1.default.createElement("b", null,
|
|
444
|
-
react_1.default.createElement(react_intl_1.FormattedMessage, { id: "ui.feedObject.votesDialog.noOtherLikes", defaultMessage: "ui.feedObject.votesDialog.noOtherLikes" }))) },
|
|
445
|
-
react_1.default.createElement(material_1.List, null, filteredVotes[key].map((vote, index) => (react_1.default.createElement(material_1.ListItem, { key: index },
|
|
446
|
-
react_1.default.createElement(User_1.default, { elevation: 0, user: vote.user, key: index, sx: { m: 0 }, showReaction: true, reaction: vote.reaction }))))))))))))))));
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
return audience;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Renders vote action if withAction==true
|
|
453
|
-
* @return {JSX.Element}
|
|
454
|
-
*/
|
|
455
|
-
function renderVoteButton() {
|
|
456
|
-
const { voting } = state;
|
|
457
|
-
return (react_1.default.createElement(react_1.default.Fragment, null, withAction && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
458
|
-
!inlineAction && withAudience && react_1.default.createElement(material_1.Divider, { className: classes.divider }),
|
|
459
|
-
react_1.default.createElement(LoadingButton_1.default, { ref: popoverAnchor, onClick: () => vote(obj.reaction && obj.voted ? obj.reaction : defaultReaction), onTouchStart: handleMouseEnter, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onTouchMove: handleMouseLeave, loading: voting, disabled: !obj, classes: {
|
|
460
|
-
root: (0, classnames_1.default)(classes.button, {
|
|
461
|
-
[classes.voted]: scUserContext.user && obj.voted && obj.reaction
|
|
462
|
-
})
|
|
463
|
-
} }, scUserContext.user && obj.voted && obj.reaction ? (react_1.default.createElement("img", { alt: obj.reaction.label, src: obj.reaction.image })) : (react_1.default.createElement(Icon_1.default, null, "thumb_up_off_alt"))),
|
|
464
|
-
react_1.default.createElement(ReactionsPopover_1.default, { anchorEl: popoverAnchor.current, open: hovered, onOpen: handleMouseEnter, onClose: handleMouseLeave, reactions: reactions, onReactionSelection: handleReactionVote })))));
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Renders vote action and audience section
|
|
468
|
-
*/
|
|
469
|
-
return (react_1.default.createElement(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className, { [classes.inline]: inlineAction }) }, rest),
|
|
470
|
-
renderAudience(),
|
|
471
|
-
renderVoteButton()));
|
|
472
|
-
}
|
|
473
|
-
exports.default = Reaction;
|
|
474
|
-
//# sourceMappingURL=Reaction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Reaction.js","sourceRoot":"","sources":["../../../../../../src/components/FeedObject/Actions/Reaction/Reaction.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8E;AAC9E,+EAAuD;AACvD,2CAAqE;AACrE,4CAA+G;AAC/G,uFAA+D;AAC/D,8DAAsC;AACtC,sEAA8C;AAC9C,2EAAmD;AACnD,yFAAiE;AACjE,yDAAiC;AACjC,yDAAyD;AACzD,iDAA4C;AAC5C,4DAAoC;AACpC,yCAAsC;AACtC,gDAA2G;AAC3G,8DAA0E;AAC1E,gDAA4C;AAC5C,0DAQmC;AACnC,wCAA0C;AAC1C,oDAAuB;AAEvB,0EAAkD;AAElD,MAAM,QAAQ,GAAG,IAAA,2BAAc,EAAC;IAC9B,KAAK,EAAE;QACL,EAAE,EAAE,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aAAa,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CACjD,uCAAK,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,GAAI,CAC1D,CAAC,CAAC,CAAC,CACF,8BAAC,cAAI,2BAAwB,CAC9B,CACa;YAChB,8BAAC,0BAAgB,IACf,QAAQ,EAAE,aAAa,CAAC,OAAO,EAC/B,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,kBAAkB,GACvC,CACa,CAClB,CACc,CAClB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,OAAO,CACL,8BAAC,IAAI,kBAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,EAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,EAAC,CAAC,IAAM,IAAI;QAC7F,cAAc,EAAE;QAChB,gBAAgB,EAAE,CACd,CACR,CAAC;AACJ,CAAC;AA1bD,2BA0bC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { SCReactionType } from '@selfcommunity/types';
|
|
2
|
-
export interface ReactionPopoverProps {
|
|
3
|
-
/**
|
|
4
|
-
* Overrides or extends the styles applied to the component.
|
|
5
|
-
* @default null
|
|
6
|
-
*/
|
|
7
|
-
className?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The reaction objs to show.
|
|
10
|
-
* @default []
|
|
11
|
-
*/
|
|
12
|
-
reactions: SCReactionType[];
|
|
13
|
-
/**
|
|
14
|
-
* Manages popover open state
|
|
15
|
-
* @default false
|
|
16
|
-
*/
|
|
17
|
-
open: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* The popover anchor element
|
|
20
|
-
*/
|
|
21
|
-
anchorEl: HTMLElement | null;
|
|
22
|
-
/**
|
|
23
|
-
* Callback fired when hovering anchor element
|
|
24
|
-
*/
|
|
25
|
-
onOpen?: () => void;
|
|
26
|
-
/**
|
|
27
|
-
* Callback fired when unhovering anchor element
|
|
28
|
-
*/
|
|
29
|
-
onClose?: (e?: any) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Callback fired when selecting a reaction from the menu
|
|
32
|
-
*/
|
|
33
|
-
onReactionSelection: (reaction: any) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Other props
|
|
36
|
-
*/
|
|
37
|
-
[p: string]: any;
|
|
38
|
-
}
|
|
39
|
-
export default function ReactionsPopover(inProps: ReactionPopoverProps): JSX.Element;
|
|
40
|
-
//# sourceMappingURL=ReactionsPopover.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReactionsPopover.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FeedObject/Actions/Reaction/ReactionsPopover.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AA0DpD,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B;;OAEG;IACH,mBAAmB,EAAE,CAAC,QAAQ,KAAA,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,eAoFrE"}
|