@selfcommunity/react-ui 0.7.50-events.41 → 0.7.50-events.43
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/AccountChangeMailValidation/AccountChangeMailValidation.js +3 -8
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +16 -25
- package/lib/cjs/components/AccountDataPortabilityButton/AccountDataPortabilityButton.js +3 -6
- package/lib/cjs/components/AccountDelete/AccountDelete.js +16 -23
- package/lib/cjs/components/AccountDeleteButton/AccountDeleteButton.js +3 -6
- package/lib/cjs/components/AccountRecover/AccountRecover.js +8 -12
- package/lib/cjs/components/AccountReset/AccountReset.js +3 -12
- package/lib/cjs/components/AccountVerify/AccountVerify.js +3 -8
- package/lib/cjs/components/BottomNavigation/BottomNavigation.js +19 -20
- package/lib/cjs/components/BroadcastMessages/BroadcastMessages.js +3 -10
- package/lib/cjs/components/BroadcastMessages/Message.js +6 -23
- package/lib/cjs/components/BroadcastMessages/Skeleton.js +3 -15
- package/lib/cjs/components/Categories/Categories.js +5 -10
- package/lib/cjs/components/Categories/Skeleton.js +2 -4
- package/lib/cjs/components/CategoriesPopularWidget/CategoriesPopularWidget.js +5 -17
- package/lib/cjs/components/CategoriesPopularWidget/Skeleton.js +2 -2
- package/lib/cjs/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +5 -17
- package/lib/cjs/components/CategoriesSuggestionWidget/Skeleton.js +2 -5
- package/lib/cjs/components/Category/Category.js +4 -4
- package/lib/cjs/components/Category/Skeleton.js +2 -3
- package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +6 -9
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -2
- package/lib/cjs/components/CategoryFollowersButton/CategoryFollowersButton.js +3 -8
- package/lib/cjs/components/CategoryHeader/CategoryHeader.js +3 -12
- package/lib/cjs/components/CategoryHeader/Skeleton.js +2 -7
- package/lib/cjs/components/CategoryTrendingFeedWidget/CategoryTrendingFeedWidget.js +7 -19
- package/lib/cjs/components/CategoryTrendingFeedWidget/Skeleton.js +2 -4
- package/lib/cjs/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +5 -17
- package/lib/cjs/components/CategoryTrendingUsersWidget/Skeleton.js +2 -5
- package/lib/cjs/components/ChangeCover/ChangeCover.js +18 -41
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +4 -6
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +4 -6
- package/lib/cjs/components/ChangePicture/ChangePicture.js +3 -4
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +10 -22
- package/lib/cjs/components/CommentObject/CommentObject.js +11 -37
- package/lib/cjs/components/CommentObject/Skeleton.js +2 -6
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +3 -12
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +8 -14
- package/lib/cjs/components/CommentsFeedObject/Skeleton.js +2 -3
- package/lib/cjs/components/CommentsObject/CommentsObject.js +27 -48
- package/lib/cjs/components/CommentsObject/Skeleton.js +2 -2
- package/lib/cjs/components/Composer/Attributes/Attributes.js +5 -8
- package/lib/cjs/components/Composer/Composer.js +24 -46
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +8 -11
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +9 -28
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +3 -5
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +13 -31
- package/lib/cjs/components/Composer/Layer/CategoryLayer/CategoryLayer.js +2 -10
- package/lib/cjs/components/Composer/Layer/CloseLayer/CloseLayer.js +2 -16
- package/lib/cjs/components/Composer/Layer/LocationLayer/LocationLayer.js +2 -10
- package/lib/cjs/components/Composer/Skeleton.js +2 -3
- package/lib/cjs/components/Composer/TypeSwitchButtonGroup/TypeSwitchButtonGroup.js +3 -8
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.js +5 -8
- package/lib/cjs/components/ConnectionUserButton/ConnectionUserButton.js +2 -1
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +9 -58
- package/lib/cjs/components/ConsentSolution/Skeleton.js +3 -16
- package/lib/cjs/components/ConsentSolutionButton/ConsentSolutionButton.js +2 -4
- package/lib/cjs/components/CreateEventButton/CreateEventButton.js +2 -3
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +3 -4
- package/lib/cjs/components/CustomAdv/CustomAdv.js +5 -6
- package/lib/cjs/components/CustomAdv/Skeleton.js +2 -3
- package/lib/cjs/components/EditEventButton/EditEventButton.js +2 -3
- package/lib/cjs/components/EditGroupButton/EditGroupButton.js +2 -3
- package/lib/cjs/components/Editor/Editor.js +3 -21
- package/lib/cjs/components/Editor/Skeleton.js +2 -3
- package/lib/cjs/components/Editor/nodes/ImageNode.js +5 -6
- package/lib/cjs/components/Editor/plugins/AutoLinkPlugin.js +2 -11
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +12 -15
- package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +7 -13
- package/lib/cjs/components/Editor/plugins/HashtagPlugin.js +11 -11
- package/lib/cjs/components/Editor/plugins/ImagePlugin.js +9 -10
- package/lib/cjs/components/Editor/plugins/LexicalRichTextPlugin.js +2 -12
- package/lib/cjs/components/Editor/plugins/MentionsPlugin.js +11 -16
- package/lib/cjs/components/Editor/plugins/OnChangePlugin.js +2 -3
- package/lib/cjs/components/Editor/plugins/ToolbarPlugin.js +9 -40
- package/lib/cjs/components/Editor/shared/useDecorators.js +2 -4
- package/lib/cjs/components/Event/Event.js +3 -10
- package/lib/cjs/components/Event/Skeleton.js +2 -8
- package/lib/cjs/components/EventForm/EventAddress.js +6 -14
- package/lib/cjs/components/EventForm/EventForm.js +46 -86
- package/lib/cjs/components/EventForm/UploadEventCover.js +4 -6
- package/lib/cjs/components/EventHeader/EventHeader.js +36 -52
- package/lib/cjs/components/EventHeader/Skeleton.js +2 -12
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +11 -13
- package/lib/cjs/components/EventInfoWidget/Skeleton.d.ts +1 -0
- package/lib/cjs/components/EventInfoWidget/Skeleton.js +20 -0
- package/lib/cjs/components/EventInfoWidget/index.d.ts +2 -1
- package/lib/cjs/components/EventInfoWidget/index.js +3 -1
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +4 -24
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +8 -16
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +2 -8
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +12 -15
- package/lib/cjs/components/Events/Events.js +25 -52
- package/lib/cjs/components/Events/Skeleton.js +2 -4
- package/lib/cjs/components/Feed/Feed.js +11 -29
- package/lib/cjs/components/Feed/Skeleton.js +3 -12
- package/lib/cjs/components/FeedObject/Actions/Actions.js +2 -8
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +5 -11
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +6 -6
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +29 -60
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +3 -5
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.js +2 -5
- package/lib/cjs/components/FeedObject/Activities/Activities.js +9 -10
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +23 -37
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +18 -20
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/FollowActivity/FollowActivity.js +5 -7
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/PollVoteActivity/PollVoteActivity.js +5 -7
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +7 -12
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/VoteUpActivity/VoteUpActivity.js +5 -7
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +3 -13
- package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +2 -6
- package/lib/cjs/components/FeedObject/FeedObject.js +23 -110
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +3 -8
- package/lib/cjs/components/FeedObject/Poll/Poll.js +5 -21
- package/lib/cjs/components/FeedObject/Skeleton.js +4 -16
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +5 -6
- package/lib/cjs/components/FeedUpdatesWidget/FeedUpdatesWidget.js +5 -8
- package/lib/cjs/components/FeedUpdatesWidget/Skeleton.js +2 -2
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +5 -4
- package/lib/cjs/components/Footer/Footer.js +4 -7
- package/lib/cjs/components/Footer/Skeleton.js +2 -4
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +9 -8
- package/lib/cjs/components/Group/Group.js +7 -13
- package/lib/cjs/components/Group/Skeleton.js +2 -3
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +5 -8
- package/lib/cjs/components/GroupForm/GroupForm.js +36 -75
- package/lib/cjs/components/GroupHeader/GroupHeader.js +6 -34
- package/lib/cjs/components/GroupHeader/Skeleton.js +2 -12
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +24 -54
- package/lib/cjs/components/GroupInfoWidget/Skeleton.js +2 -3
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +4 -24
- package/lib/cjs/components/GroupInvitedWidget/GroupInvitedWidget.js +5 -18
- package/lib/cjs/components/GroupInvitedWidget/Skeleton.js +2 -3
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.js +3 -8
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +11 -28
- package/lib/cjs/components/GroupMembersWidget/Skeleton.js +2 -3
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +5 -16
- package/lib/cjs/components/GroupRequestsWidget/Skeleton.js +2 -3
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +13 -21
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +8 -7
- package/lib/cjs/components/Groups/Groups.js +10 -23
- package/lib/cjs/components/Groups/Skeleton.js +2 -4
- package/lib/cjs/components/Incubator/Incubator.js +8 -28
- package/lib/cjs/components/Incubator/Skeleton.js +2 -20
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +4 -46
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +5 -12
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +8 -32
- package/lib/cjs/components/IncubatorListWidget/Skeleton.js +2 -4
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -2
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +5 -18
- package/lib/cjs/components/IncubatorSuggestionWidget/Skeleton.js +2 -4
- package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.js +5 -11
- package/lib/cjs/components/InlineComposerWidget/Skeleton.js +2 -7
- package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +6 -7
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +5 -13
- package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +2 -11
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -11
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.js +3 -4
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuIconButton.js +4 -13
- package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +35 -75
- package/lib/cjs/components/NavigationToolbar/NavigationToolbar.js +14 -51
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/cjs/components/NavigationToolbar/Skeleton.js +2 -5
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +11 -27
- package/lib/cjs/components/NavigationToolbarMobile/Skeleton.js +2 -3
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +2 -15
- package/lib/cjs/components/Notification/Comment/Comment.js +11 -27
- package/lib/cjs/components/Notification/Contribution/Contribution.js +11 -28
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +4 -19
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -17
- package/lib/cjs/components/Notification/Group/Group.js +17 -30
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +8 -16
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -9
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +4 -16
- package/lib/cjs/components/Notification/Mention/Mention.js +7 -22
- package/lib/cjs/components/Notification/Notification.js +37 -57
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +24 -47
- package/lib/cjs/components/Notification/Skeleton.js +3 -7
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +2 -16
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +5 -7
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +5 -15
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +5 -15
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +6 -19
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +20 -53
- package/lib/cjs/components/PlatformWidget/Skeleton.js +2 -3
- package/lib/cjs/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +3 -12
- package/lib/cjs/components/PollSuggestionWidget/PollSnippet/Skeleton.js +2 -2
- package/lib/cjs/components/PollSuggestionWidget/PollSuggestionWidget.js +5 -17
- package/lib/cjs/components/PollSuggestionWidget/Skeleton.js +2 -6
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +6 -9
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +2 -6
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +16 -37
- package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +9 -18
- package/lib/cjs/components/PrivateMessageEditor/Skeleton.js +2 -3
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -31
- package/lib/cjs/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +12 -19
- package/lib/cjs/components/PrivateMessageSnippetItem/Skeleton.js +2 -5
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -16
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +2 -8
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +14 -35
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +2 -9
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +15 -33
- package/lib/cjs/components/PrivateMessageThreadItem/Skeleton.js +2 -3
- package/lib/cjs/components/RelatedFeedObjectsWidget/RelatedFeedObjectsWidget.js +6 -21
- package/lib/cjs/components/RelatedFeedObjectsWidget/Skeleton.js +2 -3
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +5 -8
- package/lib/cjs/components/SearchDialog/SearchDialog.js +2 -4
- package/lib/cjs/components/Skeleton/AvatarGroupSkeleton.js +2 -3
- package/lib/cjs/components/Skeleton/GenericSkeleton.js +2 -6
- package/lib/cjs/components/SnippetNotifications/Skeleton.js +3 -3
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +23 -28
- package/lib/cjs/components/ToastNotifications/Skeleton.js +2 -3
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +16 -15
- package/lib/cjs/components/User/Skeleton.js +2 -3
- package/lib/cjs/components/User/User.js +6 -14
- package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +16 -31
- package/lib/cjs/components/UserConnectionsRequestsSentWidget/Skeleton.js +2 -3
- package/lib/cjs/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +5 -17
- package/lib/cjs/components/UserConnectionsRequestsWidget/Skeleton.js +2 -3
- package/lib/cjs/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -17
- package/lib/cjs/components/UserConnectionsWidget/Skeleton.js +2 -3
- package/lib/cjs/components/UserConnectionsWidget/UserConnectionsWidget.js +5 -17
- package/lib/cjs/components/UserCounters/UserCounters.js +19 -28
- package/lib/cjs/components/UserFollowedCategoriesWidget/Skeleton.js +2 -2
- package/lib/cjs/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +5 -20
- package/lib/cjs/components/UserFollowedUsersWidget/Skeleton.js +2 -3
- package/lib/cjs/components/UserFollowedUsersWidget/UserFollowedUsersWidget.js +5 -17
- package/lib/cjs/components/UserFollowersWidget/Skeleton.js +2 -3
- package/lib/cjs/components/UserFollowersWidget/UserFollowersWidget.js +5 -17
- package/lib/cjs/components/UserInfo/Skeleton.js +2 -6
- package/lib/cjs/components/UserInfo/UserInfo.js +13 -14
- package/lib/cjs/components/UserInfoDialog/UserInfoDialog.js +3 -5
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +4 -11
- package/lib/cjs/components/UserProfileEdit/Section/Account.js +3 -13
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +15 -37
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +15 -25
- package/lib/cjs/components/UserProfileEdit/Section/Settings.js +7 -37
- package/lib/cjs/components/UserProfileEdit/Section/SettingsSkeleton.js +2 -5
- package/lib/cjs/components/UserProfileEdit/Skeleton.js +2 -6
- package/lib/cjs/components/UserProfileEdit/UserProfileEdit.js +2 -9
- package/lib/cjs/components/UserProfileHeader/Skeleton.js +2 -13
- package/lib/cjs/components/UserProfileHeader/UserProfileHeader.js +4 -21
- package/lib/cjs/components/UserSocialAssociation/UserSocialAssociation.js +2 -16
- package/lib/cjs/components/UserSubscribedGroupsWidget/Skeleton.js +2 -6
- package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +7 -22
- package/lib/cjs/components/UserSuggestionWidget/Skeleton.js +2 -5
- package/lib/cjs/components/UserSuggestionWidget/UserSuggestionWidget.js +5 -17
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +9 -23
- package/lib/cjs/components/VoteButton/VoteButton.js +9 -15
- package/lib/cjs/components/Widget/index.js +3 -2
- package/lib/cjs/shared/AutoPlayer/index.js +6 -7
- package/lib/cjs/shared/BaseDialog/BaseDialog.js +3 -10
- package/lib/cjs/shared/BaseItem/BaseItem.js +4 -10
- package/lib/cjs/shared/BaseItemButton/BaseItemButton.js +4 -10
- package/lib/cjs/shared/Bullet/index.js +2 -1
- package/lib/cjs/shared/Calendar/index.js +2 -3
- package/lib/cjs/shared/CentralProgress/index.js +3 -4
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +2 -9
- package/lib/cjs/shared/ConsentSolutionSwitch/index.js +5 -8
- package/lib/cjs/shared/ContributionActionsMenu/index.js +22 -85
- package/lib/cjs/shared/CustomSnackMessage/index.js +3 -7
- package/lib/cjs/shared/DateTimeAgo/index.js +2 -6
- package/lib/cjs/shared/EmailTextField/index.js +3 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.js +2 -2
- package/lib/cjs/shared/EventInfoDetails/index.js +5 -22
- package/lib/cjs/shared/HiddenPlaceholder/index.js +2 -3
- package/lib/cjs/shared/InfiniteScroll/index.js +8 -19
- package/lib/cjs/shared/InfiniteScroll/stories/InfiniteScrollWithHeight.js +3 -8
- package/lib/cjs/shared/InfiniteScroll/stories/PullDownToRefreshInfScroll.js +3 -7
- package/lib/cjs/shared/InfiniteScroll/stories/ScrollableTargetFixedInfScroll.js +13 -18
- package/lib/cjs/shared/InfiniteScroll/stories/ScrollableTargetInfScroll.js +3 -8
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +6 -11
- package/lib/cjs/shared/InfiniteScroll/stories/WindowInfiniteScrollComponent.js +3 -6
- package/lib/cjs/shared/LanguageSwitcher/index.js +3 -5
- package/lib/cjs/shared/Lightbox/Lightbox.js +4 -3
- package/lib/cjs/shared/MarkRead/MarkRead.js +3 -3
- package/lib/cjs/shared/Media/File/DisplayComponent.js +13 -42
- package/lib/cjs/shared/Media/File/Lightbox/index.js +5 -5
- package/lib/cjs/shared/Media/File/PreviewComponent.js +5 -9
- package/lib/cjs/shared/Media/File/TriggerButton.js +14 -25
- package/lib/cjs/shared/Media/File/asUploadButton.js +3 -2
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +8 -15
- package/lib/cjs/shared/Media/Link/LayerComponent.js +2 -11
- package/lib/cjs/shared/Media/Link/PreviewComponent.js +2 -4
- package/lib/cjs/shared/Media/Link/TriggerButton.js +2 -3
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +5 -7
- package/lib/cjs/shared/Media/Share/DisplayComponent.js +3 -3
- package/lib/cjs/shared/MetadataField/MetadataField.js +8 -7
- package/lib/cjs/shared/NewChip/NewChip.js +2 -2
- package/lib/cjs/shared/NotificationItem/NotificationItem.js +3 -12
- package/lib/cjs/shared/PasswordTextField/index.js +4 -6
- package/lib/cjs/shared/PhoneTextField/index.js +3 -2
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/StickyBox/index.js +6 -5
- package/lib/cjs/shared/TagChip/index.js +2 -2
- package/lib/cjs/shared/Tags/index.js +11 -23
- package/lib/cjs/shared/UrlTextField/index.js +3 -2
- package/lib/cjs/shared/UserAvatar/UserAvatar.js +3 -2
- package/lib/cjs/shared/UserDeletedSnackBar/UserDeletedSnackBar.js +3 -5
- package/lib/cjs/shared/UsernameTextField/index.js +3 -2
- package/lib/cjs/shared/VirtualizedScroller/VirtualScrollerChild.js +2 -2
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.js +3 -2
- package/lib/cjs/utils/contribution.js +3 -4
- package/lib/cjs/utils/errors.js +3 -4
- package/lib/esm/components/AccountChangeMailValidation/AccountChangeMailValidation.js +3 -8
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +16 -25
- package/lib/esm/components/AccountDataPortabilityButton/AccountDataPortabilityButton.js +3 -6
- package/lib/esm/components/AccountDelete/AccountDelete.js +16 -23
- package/lib/esm/components/AccountDeleteButton/AccountDeleteButton.js +3 -6
- package/lib/esm/components/AccountRecover/AccountRecover.js +8 -12
- package/lib/esm/components/AccountReset/AccountReset.js +3 -12
- package/lib/esm/components/AccountVerify/AccountVerify.js +3 -8
- package/lib/esm/components/BottomNavigation/BottomNavigation.js +19 -20
- package/lib/esm/components/BroadcastMessages/BroadcastMessages.js +3 -10
- package/lib/esm/components/BroadcastMessages/Message.js +6 -23
- package/lib/esm/components/BroadcastMessages/Skeleton.js +3 -15
- package/lib/esm/components/Categories/Categories.js +5 -10
- package/lib/esm/components/Categories/Skeleton.js +2 -4
- package/lib/esm/components/CategoriesPopularWidget/CategoriesPopularWidget.js +5 -17
- package/lib/esm/components/CategoriesPopularWidget/Skeleton.js +2 -2
- package/lib/esm/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +5 -17
- package/lib/esm/components/CategoriesSuggestionWidget/Skeleton.js +2 -5
- package/lib/esm/components/Category/Category.js +4 -4
- package/lib/esm/components/Category/Skeleton.js +2 -3
- package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +6 -9
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +3 -2
- package/lib/esm/components/CategoryFollowersButton/CategoryFollowersButton.js +3 -8
- package/lib/esm/components/CategoryHeader/CategoryHeader.js +3 -12
- package/lib/esm/components/CategoryHeader/Skeleton.js +2 -7
- package/lib/esm/components/CategoryTrendingFeedWidget/CategoryTrendingFeedWidget.js +7 -19
- package/lib/esm/components/CategoryTrendingFeedWidget/Skeleton.js +2 -4
- package/lib/esm/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +5 -17
- package/lib/esm/components/CategoryTrendingUsersWidget/Skeleton.js +2 -5
- package/lib/esm/components/ChangeCover/ChangeCover.js +18 -41
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +4 -6
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +4 -6
- package/lib/esm/components/ChangePicture/ChangePicture.js +3 -4
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +10 -22
- package/lib/esm/components/CommentObject/CommentObject.js +11 -37
- package/lib/esm/components/CommentObject/Skeleton.js +2 -6
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +3 -12
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +8 -14
- package/lib/esm/components/CommentsFeedObject/Skeleton.js +2 -2
- package/lib/esm/components/CommentsObject/CommentsObject.js +27 -48
- package/lib/esm/components/CommentsObject/Skeleton.js +2 -2
- package/lib/esm/components/Composer/Attributes/Attributes.js +5 -8
- package/lib/esm/components/Composer/Composer.js +24 -46
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +8 -11
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +9 -28
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +3 -5
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +13 -31
- package/lib/esm/components/Composer/Layer/CategoryLayer/CategoryLayer.js +2 -10
- package/lib/esm/components/Composer/Layer/CloseLayer/CloseLayer.js +2 -16
- package/lib/esm/components/Composer/Layer/LocationLayer/LocationLayer.js +2 -10
- package/lib/esm/components/Composer/Skeleton.js +2 -3
- package/lib/esm/components/Composer/TypeSwitchButtonGroup/TypeSwitchButtonGroup.js +3 -8
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.js +5 -8
- package/lib/esm/components/ConnectionUserButton/ConnectionUserButton.js +2 -1
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +9 -58
- package/lib/esm/components/ConsentSolution/Skeleton.js +3 -16
- package/lib/esm/components/ConsentSolutionButton/ConsentSolutionButton.js +2 -4
- package/lib/esm/components/CreateEventButton/CreateEventButton.js +2 -3
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +3 -4
- package/lib/esm/components/CustomAdv/CustomAdv.js +5 -6
- package/lib/esm/components/CustomAdv/Skeleton.js +2 -2
- package/lib/esm/components/EditEventButton/EditEventButton.js +2 -3
- package/lib/esm/components/EditGroupButton/EditGroupButton.js +2 -3
- package/lib/esm/components/Editor/Editor.js +3 -21
- package/lib/esm/components/Editor/Skeleton.js +2 -2
- package/lib/esm/components/Editor/nodes/ImageNode.js +5 -5
- package/lib/esm/components/Editor/plugins/AutoLinkPlugin.js +2 -10
- package/lib/esm/components/Editor/plugins/EmojiPlugin.js +12 -15
- package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +7 -13
- package/lib/esm/components/Editor/plugins/HashtagPlugin.js +11 -11
- package/lib/esm/components/Editor/plugins/ImagePlugin.js +9 -10
- package/lib/esm/components/Editor/plugins/LexicalRichTextPlugin.js +2 -12
- package/lib/esm/components/Editor/plugins/MentionsPlugin.js +11 -16
- package/lib/esm/components/Editor/plugins/OnChangePlugin.js +2 -2
- package/lib/esm/components/Editor/plugins/ToolbarPlugin.js +9 -40
- package/lib/esm/components/Editor/shared/useDecorators.js +2 -3
- package/lib/esm/components/Event/Event.js +3 -10
- package/lib/esm/components/Event/Skeleton.js +2 -8
- package/lib/esm/components/EventForm/EventAddress.js +6 -14
- package/lib/esm/components/EventForm/EventForm.js +46 -86
- package/lib/esm/components/EventForm/UploadEventCover.js +4 -6
- package/lib/esm/components/EventHeader/EventHeader.js +36 -52
- package/lib/esm/components/EventHeader/Skeleton.js +2 -12
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +11 -13
- package/lib/esm/components/EventInfoWidget/Skeleton.d.ts +1 -0
- package/lib/esm/components/EventInfoWidget/Skeleton.js +16 -0
- package/lib/esm/components/EventInfoWidget/index.d.ts +2 -1
- package/lib/esm/components/EventInfoWidget/index.js +2 -1
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +4 -24
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +8 -16
- package/lib/esm/components/EventLocationWidget/Skeleton.js +2 -8
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +12 -15
- package/lib/esm/components/Events/Events.js +25 -52
- package/lib/esm/components/Events/Skeleton.js +2 -4
- package/lib/esm/components/Feed/Feed.js +11 -29
- package/lib/esm/components/Feed/Skeleton.js +3 -12
- package/lib/esm/components/FeedObject/Actions/Actions.js +2 -8
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +5 -11
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +6 -6
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +29 -60
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +3 -5
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.js +2 -5
- package/lib/esm/components/FeedObject/Activities/Activities.js +9 -10
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +23 -37
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +18 -20
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/FollowActivity/FollowActivity.js +5 -7
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/PollVoteActivity/PollVoteActivity.js +5 -7
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +7 -12
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/VoteUpActivity/VoteUpActivity.js +5 -7
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +3 -13
- package/lib/esm/components/FeedObject/Contributors/Skeleton.js +2 -6
- package/lib/esm/components/FeedObject/FeedObject.js +23 -110
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +3 -8
- package/lib/esm/components/FeedObject/Poll/Poll.js +5 -21
- package/lib/esm/components/FeedObject/Skeleton.js +4 -16
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +5 -6
- package/lib/esm/components/FeedUpdatesWidget/FeedUpdatesWidget.js +5 -8
- package/lib/esm/components/FeedUpdatesWidget/Skeleton.js +2 -2
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +5 -4
- package/lib/esm/components/Footer/Footer.js +4 -7
- package/lib/esm/components/Footer/Skeleton.js +2 -4
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +9 -8
- package/lib/esm/components/Group/Group.js +7 -13
- package/lib/esm/components/Group/Skeleton.js +2 -3
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +5 -8
- package/lib/esm/components/GroupForm/GroupForm.js +36 -75
- package/lib/esm/components/GroupHeader/GroupHeader.js +6 -34
- package/lib/esm/components/GroupHeader/Skeleton.js +2 -12
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +24 -54
- package/lib/esm/components/GroupInfoWidget/Skeleton.js +2 -2
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +4 -24
- package/lib/esm/components/GroupInvitedWidget/GroupInvitedWidget.js +5 -18
- package/lib/esm/components/GroupInvitedWidget/Skeleton.js +2 -2
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.js +3 -8
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +11 -28
- package/lib/esm/components/GroupMembersWidget/Skeleton.js +2 -2
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +5 -16
- package/lib/esm/components/GroupRequestsWidget/Skeleton.js +2 -2
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +13 -21
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +8 -7
- package/lib/esm/components/Groups/Groups.js +10 -23
- package/lib/esm/components/Groups/Skeleton.js +2 -4
- package/lib/esm/components/Incubator/Incubator.js +8 -28
- package/lib/esm/components/Incubator/Skeleton.js +2 -20
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +4 -46
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +5 -12
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +8 -32
- package/lib/esm/components/IncubatorListWidget/Skeleton.js +2 -4
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -2
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +5 -18
- package/lib/esm/components/IncubatorSuggestionWidget/Skeleton.js +2 -4
- package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.js +5 -11
- package/lib/esm/components/InlineComposerWidget/Skeleton.js +2 -7
- package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +6 -7
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +5 -13
- package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +2 -11
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -11
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.js +3 -4
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuIconButton.js +4 -13
- package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +35 -75
- package/lib/esm/components/NavigationToolbar/NavigationToolbar.js +14 -51
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/esm/components/NavigationToolbar/Skeleton.js +2 -5
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +11 -27
- package/lib/esm/components/NavigationToolbarMobile/Skeleton.js +2 -3
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +2 -15
- package/lib/esm/components/Notification/Comment/Comment.js +11 -27
- package/lib/esm/components/Notification/Contribution/Contribution.js +11 -28
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +4 -19
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -17
- package/lib/esm/components/Notification/Group/Group.js +17 -30
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +8 -16
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +2 -9
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +4 -16
- package/lib/esm/components/Notification/Mention/Mention.js +7 -22
- package/lib/esm/components/Notification/Notification.js +37 -57
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +24 -47
- package/lib/esm/components/Notification/Skeleton.js +3 -7
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +2 -16
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +5 -7
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +5 -15
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +5 -15
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +6 -19
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +20 -53
- package/lib/esm/components/PlatformWidget/Skeleton.js +2 -2
- package/lib/esm/components/PollSuggestionWidget/PollSnippet/PollSnippet.js +3 -12
- package/lib/esm/components/PollSuggestionWidget/PollSnippet/Skeleton.js +2 -2
- package/lib/esm/components/PollSuggestionWidget/PollSuggestionWidget.js +5 -17
- package/lib/esm/components/PollSuggestionWidget/Skeleton.js +2 -6
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +6 -9
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +2 -6
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +16 -37
- package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +9 -18
- package/lib/esm/components/PrivateMessageEditor/Skeleton.js +2 -2
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -31
- package/lib/esm/components/PrivateMessageSnippetItem/PrivateMessageSnippetItem.js +12 -19
- package/lib/esm/components/PrivateMessageSnippetItem/Skeleton.js +2 -5
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -16
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +2 -8
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +14 -35
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +2 -9
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +15 -33
- package/lib/esm/components/PrivateMessageThreadItem/Skeleton.js +2 -3
- package/lib/esm/components/RelatedFeedObjectsWidget/RelatedFeedObjectsWidget.js +6 -21
- package/lib/esm/components/RelatedFeedObjectsWidget/Skeleton.js +2 -2
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +5 -8
- package/lib/esm/components/SearchDialog/SearchDialog.js +2 -4
- package/lib/esm/components/Skeleton/AvatarGroupSkeleton.js +2 -3
- package/lib/esm/components/Skeleton/GenericSkeleton.js +2 -6
- package/lib/esm/components/SnippetNotifications/Skeleton.js +3 -3
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +23 -28
- package/lib/esm/components/ToastNotifications/Skeleton.js +2 -2
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +16 -15
- package/lib/esm/components/User/Skeleton.js +2 -3
- package/lib/esm/components/User/User.js +6 -14
- package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +16 -31
- package/lib/esm/components/UserConnectionsRequestsSentWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +5 -17
- package/lib/esm/components/UserConnectionsRequestsWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -17
- package/lib/esm/components/UserConnectionsWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserConnectionsWidget/UserConnectionsWidget.js +5 -17
- package/lib/esm/components/UserCounters/UserCounters.js +19 -28
- package/lib/esm/components/UserFollowedCategoriesWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +5 -20
- package/lib/esm/components/UserFollowedUsersWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserFollowedUsersWidget/UserFollowedUsersWidget.js +5 -17
- package/lib/esm/components/UserFollowersWidget/Skeleton.js +2 -2
- package/lib/esm/components/UserFollowersWidget/UserFollowersWidget.js +5 -17
- package/lib/esm/components/UserInfo/Skeleton.js +2 -6
- package/lib/esm/components/UserInfo/UserInfo.js +13 -14
- package/lib/esm/components/UserInfoDialog/UserInfoDialog.js +3 -5
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +4 -11
- package/lib/esm/components/UserProfileEdit/Section/Account.js +3 -13
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +15 -37
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +15 -25
- package/lib/esm/components/UserProfileEdit/Section/Settings.js +7 -37
- package/lib/esm/components/UserProfileEdit/Section/SettingsSkeleton.js +2 -5
- package/lib/esm/components/UserProfileEdit/Skeleton.js +2 -6
- package/lib/esm/components/UserProfileEdit/UserProfileEdit.js +2 -9
- package/lib/esm/components/UserProfileHeader/Skeleton.js +2 -13
- package/lib/esm/components/UserProfileHeader/UserProfileHeader.js +4 -21
- package/lib/esm/components/UserSocialAssociation/UserSocialAssociation.js +2 -16
- package/lib/esm/components/UserSubscribedGroupsWidget/Skeleton.js +2 -6
- package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +7 -22
- package/lib/esm/components/UserSuggestionWidget/Skeleton.js +2 -5
- package/lib/esm/components/UserSuggestionWidget/UserSuggestionWidget.js +5 -17
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +9 -23
- package/lib/esm/components/VoteButton/VoteButton.js +9 -15
- package/lib/esm/components/Widget/index.js +3 -2
- package/lib/esm/shared/AutoPlayer/index.js +5 -6
- package/lib/esm/shared/BaseDialog/BaseDialog.js +3 -10
- package/lib/esm/shared/BaseItem/BaseItem.js +4 -10
- package/lib/esm/shared/BaseItemButton/BaseItemButton.js +4 -10
- package/lib/esm/shared/Bullet/index.js +2 -1
- package/lib/esm/shared/Calendar/index.js +2 -3
- package/lib/esm/shared/CentralProgress/index.js +3 -4
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +2 -9
- package/lib/esm/shared/ConsentSolutionSwitch/index.js +5 -8
- package/lib/esm/shared/ContributionActionsMenu/index.js +22 -85
- package/lib/esm/shared/CustomSnackMessage/index.js +3 -7
- package/lib/esm/shared/DateTimeAgo/index.js +2 -6
- package/lib/esm/shared/EmailTextField/index.js +3 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.js +2 -2
- package/lib/esm/shared/EventInfoDetails/index.js +5 -22
- package/lib/esm/shared/HiddenPlaceholder/index.js +2 -2
- package/lib/esm/shared/InfiniteScroll/index.js +8 -18
- package/lib/esm/shared/InfiniteScroll/stories/InfiniteScrollWithHeight.js +3 -8
- package/lib/esm/shared/InfiniteScroll/stories/PullDownToRefreshInfScroll.js +3 -7
- package/lib/esm/shared/InfiniteScroll/stories/ScrollableTargetFixedInfScroll.js +13 -18
- package/lib/esm/shared/InfiniteScroll/stories/ScrollableTargetInfScroll.js +3 -8
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +6 -11
- package/lib/esm/shared/InfiniteScroll/stories/WindowInfiniteScrollComponent.js +3 -6
- package/lib/esm/shared/LanguageSwitcher/index.js +3 -5
- package/lib/esm/shared/Lightbox/Lightbox.js +4 -3
- package/lib/esm/shared/MarkRead/MarkRead.js +3 -3
- package/lib/esm/shared/Media/File/DisplayComponent.js +13 -42
- package/lib/esm/shared/Media/File/Lightbox/index.js +5 -5
- package/lib/esm/shared/Media/File/PreviewComponent.js +5 -9
- package/lib/esm/shared/Media/File/TriggerButton.js +14 -25
- package/lib/esm/shared/Media/File/asUploadButton.js +3 -2
- package/lib/esm/shared/Media/Link/DisplayComponent.js +8 -15
- package/lib/esm/shared/Media/Link/LayerComponent.js +2 -11
- package/lib/esm/shared/Media/Link/PreviewComponent.js +2 -4
- package/lib/esm/shared/Media/Link/TriggerButton.js +2 -3
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +5 -7
- package/lib/esm/shared/Media/Share/DisplayComponent.js +3 -3
- package/lib/esm/shared/MetadataField/MetadataField.js +8 -7
- package/lib/esm/shared/NewChip/NewChip.js +2 -2
- package/lib/esm/shared/NotificationItem/NotificationItem.js +3 -12
- package/lib/esm/shared/PasswordTextField/index.js +4 -6
- package/lib/esm/shared/PhoneTextField/index.js +3 -2
- package/lib/esm/shared/ScrollContainer/index.js +2 -2
- package/lib/esm/shared/StickyBox/index.js +3 -2
- package/lib/esm/shared/TagChip/index.js +2 -2
- package/lib/esm/shared/Tags/index.js +11 -23
- package/lib/esm/shared/UrlTextField/index.js +3 -2
- package/lib/esm/shared/UserAvatar/UserAvatar.js +3 -2
- package/lib/esm/shared/UserDeletedSnackBar/UserDeletedSnackBar.js +3 -5
- package/lib/esm/shared/UsernameTextField/index.js +3 -2
- package/lib/esm/shared/VirtualizedScroller/VirtualScrollerChild.js +2 -2
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.js +3 -2
- package/lib/esm/utils/contribution.js +3 -3
- package/lib/esm/utils/errors.js +3 -3
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
package/lib/esm/components/FeedObject/Activities/RelevantActivities/FollowActivity/FollowActivity.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { Avatar } from '@mui/material';
|
|
5
6
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
@@ -39,10 +40,7 @@ export default function FollowRelevantActivity(inProps) {
|
|
|
39
40
|
// INTL
|
|
40
41
|
const intl = useIntl();
|
|
41
42
|
// RENDER
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
username: (React.createElement(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), activityObject.author.username))
|
|
46
|
-
})), secondary: React.createElement(DateTimeAgo, { date: activityObject.active_at }) })),
|
|
47
|
-
openAlert && React.createElement(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })));
|
|
43
|
+
return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({}, rest, { className: classNames(classes.root, className), image: _jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar }) })), primary: _jsx(_Fragment, { children: intl.formatMessage(messages.follow, {
|
|
44
|
+
username: (_jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: activityObject.author.username })))
|
|
45
|
+
}) }), secondary: _jsx(DateTimeAgo, { date: activityObject.active_at }) })), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
48
46
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { Avatar } from '@mui/material';
|
|
5
6
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
@@ -34,10 +35,7 @@ export default function PollVoteRelevantActivity(props) {
|
|
|
34
35
|
// INTL
|
|
35
36
|
const intl = useIntl();
|
|
36
37
|
// RENDER
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
username: (React.createElement(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), activityObject.author.username))
|
|
41
|
-
})), secondary: React.createElement(DateTimeAgo, { date: activityObject.active_at }) })),
|
|
42
|
-
openAlert && React.createElement(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })));
|
|
38
|
+
return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({}, rest, { className: classNames(classes.root, className), image: _jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar }) })), primary: _jsx(_Fragment, { children: intl.formatMessage(messages.pollVote, {
|
|
39
|
+
username: (_jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: activityObject.author.username })))
|
|
40
|
+
}) }), secondary: _jsx(DateTimeAgo, { date: activityObject.active_at }) })), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
43
41
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { Box, Collapse, List, ListItem, ListItemButton, ListItemText, Typography } from '@mui/material';
|
|
5
6
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -31,27 +32,21 @@ export default function RelevantActivities(props) {
|
|
|
31
32
|
*/
|
|
32
33
|
function renderActivity(a, i) {
|
|
33
34
|
if (a.type === SCFeedUnitActivityTypologyType.COMMENT) {
|
|
34
|
-
return
|
|
35
|
+
return _jsx(CommentRelevantActivity, { activityObject: a, elevation: 0 }, i);
|
|
35
36
|
}
|
|
36
37
|
else if (a.type === SCFeedUnitActivityTypologyType.FOLLOW) {
|
|
37
|
-
return
|
|
38
|
+
return _jsx(FollowRelevantActivity, { activityObject: a, elevation: 0 }, i);
|
|
38
39
|
}
|
|
39
40
|
else if (a.type === SCFeedUnitActivityTypologyType.VOTE) {
|
|
40
|
-
return
|
|
41
|
+
return _jsx(VoteUpRelevantActivity, { activityObject: a, elevation: 0 }, i);
|
|
41
42
|
}
|
|
42
43
|
else if (a.type === SCFeedUnitActivityTypologyType.POLLVOTE) {
|
|
43
|
-
return
|
|
44
|
+
return _jsx(PollVoteRelevantActivity, { activityObject: a, elevation: 0 }, i);
|
|
44
45
|
}
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* Renders root object
|
|
49
50
|
*/
|
|
50
|
-
return (
|
|
51
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.relevantActivities.noResults", defaultMessage: "ui.feedObject.relevantActivities.noResults" }))) : (React.createElement(List, null,
|
|
52
|
-
activities.slice(0, showMaxRelevantActivities).map((a, i) => (React.createElement(ListItem, { className: classes.activity, key: i }, renderActivity(a, i)))),
|
|
53
|
-
!openOtherActivities && activities.length > showMaxRelevantActivities && (React.createElement(ListItemButton, { onClick: () => setOpenOtherActivities((prev) => !prev) },
|
|
54
|
-
React.createElement(ListItemText, { primary: React.createElement(FormattedMessage, { id: 'ui.feedObject.relevantActivities.showOthers', defaultMessage: 'ui.feedObject.relevantActivities.showOthers' }) }),
|
|
55
|
-
openOtherActivities ? React.createElement(Icon, null, "expand_less") : React.createElement(Icon, null, "expand_more"))),
|
|
56
|
-
React.createElement(Collapse, { in: openOtherActivities, timeout: "auto", unmountOnExit: true }, activities.slice(showMaxRelevantActivities).map((a, i) => (React.createElement(ListItem, { className: classes.activity, key: i }, renderActivity(a, i)))))))));
|
|
51
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: activities.length <= 0 ? (_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.relevantActivities.noResults", defaultMessage: "ui.feedObject.relevantActivities.noResults" }) }))) : (_jsxs(List, { children: [activities.slice(0, showMaxRelevantActivities).map((a, i) => (_jsx(ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))), !openOtherActivities && activities.length > showMaxRelevantActivities && (_jsxs(ListItemButton, Object.assign({ onClick: () => setOpenOtherActivities((prev) => !prev) }, { children: [_jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: 'ui.feedObject.relevantActivities.showOthers', defaultMessage: 'ui.feedObject.relevantActivities.showOthers' }) }), openOtherActivities ? _jsx(Icon, { children: "expand_less" }) : _jsx(Icon, { children: "expand_more" })] }))), _jsx(Collapse, Object.assign({ in: openOtherActivities, timeout: "auto", unmountOnExit: true }, { children: activities.slice(showMaxRelevantActivities).map((a, i) => (_jsx(ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))) }))] })) })));
|
|
57
52
|
}
|
package/lib/esm/components/FeedObject/Activities/RelevantActivities/VoteUpActivity/VoteUpActivity.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { Avatar } from '@mui/material';
|
|
5
6
|
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
@@ -34,10 +35,7 @@ export default function VoteUpRelevantActivity(props) {
|
|
|
34
35
|
// INTL
|
|
35
36
|
const intl = useIntl();
|
|
36
37
|
// RENDER
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
username: (React.createElement(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { className: classes.username, onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }), activityObject.author.username))
|
|
41
|
-
})), secondary: React.createElement(DateTimeAgo, { date: activityObject.active_at }) })),
|
|
42
|
-
openAlert && React.createElement(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })));
|
|
38
|
+
return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({}, rest, { className: classNames(classes.root, className), image: _jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar }) })), primary: _jsx(_Fragment, { children: intl.formatMessage(messages.vote, {
|
|
39
|
+
username: (_jsx(Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { className: classes.username, onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }, { children: activityObject.author.username })))
|
|
40
|
+
}) }), secondary: _jsx(DateTimeAgo, { date: activityObject.active_at }) })), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
43
41
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { CacheStrategies } from '@selfcommunity/utils';
|
|
5
6
|
import { useSCFetchContributors } from '@selfcommunity/react-core';
|
|
@@ -47,16 +48,5 @@ export default function ContributorsFeedObject(props) {
|
|
|
47
48
|
if (!contributorsObject.feedObject) {
|
|
48
49
|
return null;
|
|
49
50
|
}
|
|
50
|
-
return (
|
|
51
|
-
React.createElement(Box, null, contributorsObject.isLoadingNext && !openContributorsDialog ? (React.createElement(ContributorsSkeleton, Object.assign({}, ContributorsSkeletonProps))) : (React.createElement(React.Fragment, null, contributorsObject.contributors.length > 0 ? (React.createElement(React.Fragment, null,
|
|
52
|
-
React.createElement(Button, { variant: "text", onClick: () => setOpenContributorsDialog(true), classes: { root: classes.btnParticipants }, color: "inherit" },
|
|
53
|
-
React.createElement(FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }),
|
|
54
|
-
":",
|
|
55
|
-
React.createElement(AvatarGroup, Object.assign({}, rest),
|
|
56
|
-
contributorsObject.contributors.map((c, i) => (React.createElement(Avatar, { alt: c.username, src: c.avatar, key: i }))),
|
|
57
|
-
[...Array(Math.max(contributorsObject.total - contributorsObject.contributors.length, 0))].map((x, i) => (React.createElement(Avatar, { key: i }))))),
|
|
58
|
-
openContributorsDialog && (React.createElement(BaseDialog, { title: React.createElement(FormattedMessage, { defaultMessage: "ui.feedObject.contributors.title", id: "ui.feedObject.contributors.title", values: { total: contributorsObject.total } }), onClose: () => setOpenContributorsDialog(false), open: openContributorsDialog }, contributorsObject.isLoadingNext ? (React.createElement(CentralProgress, { size: 50 })) : (React.createElement(InfiniteScroll, { dataLength: contributorsObject.contributors.length, next: contributorsObject.getNextPage(), hasMoreNext: Boolean(contributorsObject.next), loaderNext: React.createElement(CentralProgress, { size: 30 }), height: 400, endMessage: React.createElement(Typography, { variant: "body2", align: "center", fontWeight: "bold" },
|
|
59
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.contributors.noOtherContributors", defaultMessage: "ui.feedObject.contributors.noOtherContributors" })) },
|
|
60
|
-
React.createElement(List, null, contributorsObject.contributors.map((c, i) => (React.createElement(ListItem, { key: i },
|
|
61
|
-
React.createElement(User, { elevation: 0, user: c, key: c.id, sx: { m: 0 }, onClick: () => setOpenContributorsDialog(false) }))))))))))) : null)))));
|
|
51
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Box, { children: contributorsObject.isLoadingNext && !openContributorsDialog ? (_jsx(ContributorsSkeleton, Object.assign({}, ContributorsSkeletonProps))) : (_jsx(_Fragment, { children: contributorsObject.contributors.length > 0 ? (_jsxs(_Fragment, { children: [_jsxs(Button, Object.assign({ variant: "text", onClick: () => setOpenContributorsDialog(true), classes: { root: classes.btnParticipants }, color: "inherit" }, { children: [_jsx(FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }), ":", _jsxs(AvatarGroup, Object.assign({}, rest, { children: [contributorsObject.contributors.map((c, i) => (_jsx(Avatar, { alt: c.username, src: c.avatar }, i))), [...Array(Math.max(contributorsObject.total - contributorsObject.contributors.length, 0))].map((x, i) => (_jsx(Avatar, {}, i)))] }))] })), openContributorsDialog && (_jsx(BaseDialog, Object.assign({ title: _jsx(FormattedMessage, { defaultMessage: "ui.feedObject.contributors.title", id: "ui.feedObject.contributors.title", values: { total: contributorsObject.total } }), onClose: () => setOpenContributorsDialog(false), open: openContributorsDialog }, { children: contributorsObject.isLoadingNext ? (_jsx(CentralProgress, { size: 50 })) : (_jsx(InfiniteScroll, Object.assign({ dataLength: contributorsObject.contributors.length, next: contributorsObject.getNextPage(), hasMoreNext: Boolean(contributorsObject.next), loaderNext: _jsx(CentralProgress, { size: 30 }), height: 400, endMessage: _jsx(Typography, Object.assign({ variant: "body2", align: "center", fontWeight: "bold" }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.contributors.noOtherContributors", defaultMessage: "ui.feedObject.contributors.noOtherContributors" }) })) }, { children: _jsx(List, { children: contributorsObject.contributors.map((c, i) => (_jsx(ListItem, { children: _jsx(User, { elevation: 0, user: c, sx: { m: 0 }, onClick: () => setOpenContributorsDialog(false) }, c.id) }, i))) }) }))) })))] })) : null })) }) })));
|
|
62
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { Box, Button } from '@mui/material';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -36,9 +36,5 @@ const Root = styled(Box, {
|
|
|
36
36
|
*/
|
|
37
37
|
export default function ContributorsSkeleton(props) {
|
|
38
38
|
const { className = null, AvatarGroupSkeletonProps = {} } = props, rest = __rest(props, ["className", "AvatarGroupSkeletonProps"]);
|
|
39
|
-
return (
|
|
40
|
-
React.createElement(Button, { variant: "text", disabled: true, classes: { root: classes.btnParticipants } },
|
|
41
|
-
React.createElement(FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }),
|
|
42
|
-
":",
|
|
43
|
-
React.createElement(AvatarGroupSkeleton, Object.assign({}, props.AvatarGroupSkeletonProps)))));
|
|
39
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(Button, Object.assign({ variant: "text", disabled: true, classes: { root: classes.btnParticipants } }, { children: [_jsx(FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }), ":", _jsx(AvatarGroupSkeleton, Object.assign({}, props.AvatarGroupSkeletonProps))] })) })));
|
|
44
40
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
3
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import CardContent from '@mui/material/CardContent';
|
|
@@ -228,13 +229,13 @@ export default function FeedObject(inProps) {
|
|
|
228
229
|
* else render ContributionActionsMenu
|
|
229
230
|
*/
|
|
230
231
|
const renderHeaderAction = () => {
|
|
231
|
-
return (
|
|
232
|
+
return (_jsx(ContributionActionsMenu, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, onEditContribution: handleToggleEdit, onHideContribution: handleHide, onDeleteContribution: handleDelete, onRestoreContribution: handleRestore, onSuspendNotificationContribution: handleSuspendNotification, onFlagContribution: handleFlag }, ContributionActionsMenuProps)));
|
|
232
233
|
};
|
|
233
234
|
/**
|
|
234
235
|
* Handle flag obj
|
|
235
236
|
*/
|
|
236
237
|
const handleFlag = useCallback((obj, type, flagged) => {
|
|
237
|
-
enqueueSnackbar(flagged ? (
|
|
238
|
+
enqueueSnackbar(flagged ? (_jsx(FormattedMessage, { id: "ui.feedObject.flagSent", defaultMessage: "ui.feedObject.flagSent" })) : (_jsx(FormattedMessage, { id: "ui.feedObject.flagRemoved", defaultMessage: "ui.feedObject.flagRemoved" })), {
|
|
238
239
|
autoHideDuration: 3000
|
|
239
240
|
});
|
|
240
241
|
}, []);
|
|
@@ -261,7 +262,7 @@ export default function FeedObject(inProps) {
|
|
|
261
262
|
*/
|
|
262
263
|
const handleSuspendNotification = useCallback(() => {
|
|
263
264
|
updateObject(Object.assign({}, obj, { suspended: !obj.suspended }));
|
|
264
|
-
enqueueSnackbar(obj.suspended ? (
|
|
265
|
+
enqueueSnackbar(obj.suspended ? (_jsx(FormattedMessage, { id: "ui.feedObject.notificationsEnabled", defaultMessage: "ui.feedObject.notificationsEnabled" })) : (_jsx(FormattedMessage, { id: "ui.feedObject.notificationsDisabled", defaultMessage: "ui.feedObject.notificationsDisabled" })), {
|
|
265
266
|
autoHideDuration: 3000
|
|
266
267
|
});
|
|
267
268
|
}, [obj]);
|
|
@@ -347,7 +348,7 @@ export default function FeedObject(inProps) {
|
|
|
347
348
|
scContext.settings.handleAnonymousAction();
|
|
348
349
|
}
|
|
349
350
|
else if (UserUtils.isBlocked(scUserContext.user)) {
|
|
350
|
-
enqueueSnackbar(
|
|
351
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.common.userBlocked", defaultMessage: "ui.common.userBlocked" }), {
|
|
351
352
|
variant: 'warning',
|
|
352
353
|
autoHideDuration: 3000
|
|
353
354
|
});
|
|
@@ -379,7 +380,7 @@ export default function FeedObject(inProps) {
|
|
|
379
380
|
.catch((error) => {
|
|
380
381
|
Logger.error(SCOPE_SC_UI, error);
|
|
381
382
|
if (!catchUnauthorizedActionByBlockedUser(error, scUserContext.managers.blockedUsers.isBlocked(obj.author), enqueueSnackbar)) {
|
|
382
|
-
enqueueSnackbar(
|
|
383
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.common.error.action", defaultMessage: "ui.common.error.action" }), {
|
|
383
384
|
variant: 'error',
|
|
384
385
|
autoHideDuration: 3000
|
|
385
386
|
});
|
|
@@ -397,25 +398,19 @@ export default function FeedObject(inProps) {
|
|
|
397
398
|
? getContributionHtml(obj.html, scRoutingContext.url)
|
|
398
399
|
: getContributionHtml(contributionHtml, scRoutingContext.url);
|
|
399
400
|
if (template === SCFeedObjectTemplateType.SHARE) {
|
|
400
|
-
return (
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
} }),
|
|
404
|
-
!expanded && summaryHtmlTruncated && (React.createElement(Button, { size: "small", variant: "text", color: "inherit", className: classes.showMore, onClick: handleToggleSummary },
|
|
405
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.content.showMore", defaultMessage: "ui.feedObject.content.showMore" })))));
|
|
401
|
+
return (_jsxs(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.text }, { children: [_jsx(Typography, { component: "span", className: classes.text, variant: "body2", gutterBottom: true, dangerouslySetInnerHTML: {
|
|
402
|
+
__html: summaryHtml
|
|
403
|
+
} }), !expanded && summaryHtmlTruncated && (_jsx(Button, Object.assign({ size: "small", variant: "text", color: "inherit", className: classes.showMore, onClick: handleToggleSummary }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.content.showMore", defaultMessage: "ui.feedObject.content.showMore" }) })))] })));
|
|
406
404
|
}
|
|
407
405
|
else if (template === SCFeedObjectTemplateType.DETAIL) {
|
|
408
|
-
return (
|
|
406
|
+
return (_jsx(Typography, { component: "div", gutterBottom: true, className: classes.text, dangerouslySetInnerHTML: {
|
|
409
407
|
__html: summaryHtml
|
|
410
408
|
} }));
|
|
411
409
|
}
|
|
412
410
|
else {
|
|
413
|
-
return (
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
} }),
|
|
417
|
-
!expanded && summaryHtmlTruncated && (React.createElement(Button, { size: "small", variant: "text", color: "inherit", className: classes.showMore, onClick: handleToggleSummary },
|
|
418
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.content.showMore", defaultMessage: "ui.feedObject.content.showMore" })))));
|
|
411
|
+
return (_jsxs(Typography, Object.assign({ component: "div", gutterBottom: true, className: classes.text }, { children: [_jsx(Typography, { component: "span", dangerouslySetInnerHTML: {
|
|
412
|
+
__html: summaryHtml
|
|
413
|
+
} }), !expanded && summaryHtmlTruncated && (_jsx(Button, Object.assign({ size: "small", variant: "text", color: "inherit", className: classes.showMore, onClick: handleToggleSummary }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.content.showMore", defaultMessage: "ui.feedObject.content.showMore" }) })))] })));
|
|
419
414
|
}
|
|
420
415
|
}, [obj, template, expanded]);
|
|
421
416
|
/**
|
|
@@ -426,108 +421,26 @@ export default function FeedObject(inProps) {
|
|
|
426
421
|
let objElement;
|
|
427
422
|
if ((!obj && error) ||
|
|
428
423
|
((obj === null || obj === void 0 ? void 0 : obj.deleted) && !scUserContext.user && !(UserUtils.isAdmin(scUserContext.user) || UserUtils.isModerator(scUserContext.user)))) {
|
|
429
|
-
objElement = (
|
|
430
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.error", defaultMessage: "ui.feedObject.error" })));
|
|
424
|
+
objElement = (_jsx(CardContent, Object.assign({ className: classNames(classes.error, classes.content) }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.error", defaultMessage: "ui.feedObject.error" }) })));
|
|
431
425
|
}
|
|
432
426
|
else if (template === SCFeedObjectTemplateType.PREVIEW ||
|
|
433
427
|
template === SCFeedObjectTemplateType.DETAIL ||
|
|
434
428
|
template === SCFeedObjectTemplateType.SEARCH) {
|
|
435
|
-
objElement = (
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.event.id, label: obj.event.name, icon: React.createElement(Icon, null, "CalendarIcon"), component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true })))),
|
|
442
|
-
obj.categories.map((c) => (React.createElement(Link, { to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, c), key: c.id },
|
|
443
|
-
React.createElement(Typography, { variant: "overline" }, c.name)))))),
|
|
444
|
-
obj.group && !obj.categories.length && (React.createElement("div", { className: classes.group },
|
|
445
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.group.id, icon: React.createElement(Icon, null, "groups"), label: obj.group.name, component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }))),
|
|
446
|
-
obj.event && !obj.categories.length && (React.createElement("div", { className: classes.event },
|
|
447
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.event.id, icon: React.createElement(Icon, null, "CalendarIcon"), label: obj.event.name, component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }))),
|
|
448
|
-
React.createElement(CardHeader, { className: classes.header, avatar: React.createElement(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null }),
|
|
449
|
-
React.createElement(UserAvatar, { hide: !obj.author.community_badge },
|
|
450
|
-
React.createElement(Avatar, { "aria-label": "recipe", src: obj.author.avatar, className: classes.avatar }, obj.author.username))), title: React.createElement(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), obj.author.username), subheader: React.createElement(React.Fragment, null,
|
|
451
|
-
React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt },
|
|
452
|
-
React.createElement(DateTimeAgo, { component: 'span', date: obj.added_at })),
|
|
453
|
-
obj.location && (React.createElement(React.Fragment, null,
|
|
454
|
-
React.createElement(Bullet, null),
|
|
455
|
-
React.createElement(Box, { className: classes.location },
|
|
456
|
-
React.createElement(Icon, null, "add_location_alt"), (_a = obj.location) === null || _a === void 0 ? void 0 :
|
|
457
|
-
_a.location))),
|
|
458
|
-
React.createElement(Bullet, null),
|
|
459
|
-
React.createElement(Box, { className: classes.tag }, obj.addressing.length > 0 ? (React.createElement(Tags, { tags: obj.addressing, TagChipProps: { disposable: false, clickable: false } })) : obj.group ? (React.createElement(Tooltip, { title: `${intl.formatMessage(messages.visibleToGroup, { group: obj.group.name })}` },
|
|
460
|
-
React.createElement(Icon, { color: "disabled", fontSize: "small" }, "groups"))) : (React.createElement(Tooltip, { title: `${intl.formatMessage(messages.visibleToAll)}` },
|
|
461
|
-
React.createElement(Icon, { color: "disabled", fontSize: "small" }, "public"))))), action: renderHeaderAction() }),
|
|
462
|
-
React.createElement(CardContent, { classes: { root: classes.content } },
|
|
463
|
-
React.createElement(Box, { className: classes.titleSection }, 'title' in obj && (React.createElement(React.Fragment, null, template === SCFeedObjectTemplateType.DETAIL ? (React.createElement(Typography, { variant: "body1", gutterBottom: true, className: classes.title }, obj.title)) : (React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) },
|
|
464
|
-
React.createElement(Typography, { variant: "body1", gutterBottom: true, className: classes.title }, obj.title)))))),
|
|
465
|
-
React.createElement(Box, { className: classes.textSection }, getContributionSummary(obj, template)),
|
|
466
|
-
React.createElement(Box, { className: classes.mediasSection },
|
|
467
|
-
React.createElement(FeedObjectMediaPreview, Object.assign({ medias: obj.medias }, FeedObjectMediaPreviewProps))),
|
|
468
|
-
React.createElement(Box, { className: classes.pollsSection }, obj['poll'] && (React.createElement(PollObject, Object.assign({ visible: pollVisible ||
|
|
469
|
-
template === SCFeedObjectTemplateType.DETAIL ||
|
|
470
|
-
Boolean(obj.type !== SCContributionType.DISCUSSION && !obj.html && !obj.medias.length), feedObject: obj, pollObject: obj['poll'], onChange: handleChangePoll, onToggleVisibility: handleTogglePollVisibility }, PollObjectProps)))),
|
|
471
|
-
React.createElement(Box, { className: classes.infoSection },
|
|
472
|
-
React.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 },
|
|
473
|
-
!hideParticipantsPreview && (React.createElement(ContributorsFeedObject, Object.assign({ feedObject: obj, feedObjectType: obj.type }, ContributorsFeedObjectProps, { cacheStrategy: cacheStrategy }))),
|
|
474
|
-
!hideFollowAction && React.createElement(Follow, Object.assign({ feedObject: obj, feedObjectType: obj.type, handleFollow: handleFollow }, FollowButtonProps))))),
|
|
475
|
-
React.createElement(CardActions, { className: classes.actionsSection },
|
|
476
|
-
React.createElement(Actions, Object.assign({ feedObjectId: feedObjectId, feedObjectType: feedObjectType, feedObject: obj, hideCommentAction: template === SCFeedObjectTemplateType.DETAIL, handleExpandActivities: template === SCFeedObjectTemplateType.PREVIEW ? handleExpandActivities : null, VoteActionProps: { onVoteAction: handleVoteSuccess } }, ActionsProps)),
|
|
477
|
-
(template === SCFeedObjectTemplateType.DETAIL || expandedActivities) && (React.createElement(Box, { className: classes.replyContent },
|
|
478
|
-
React.createElement(CommentObjectReplyComponent, Object.assign({ id: `reply-feedObject-${obj.id}`, onReply: handleReply, editable: !isReplying || Boolean(obj), key: Number(isReplying) }, CommentObjectReplyComponentProps))))),
|
|
479
|
-
template === SCFeedObjectTemplateType.PREVIEW && (obj.comment_count > 0 || (feedObjectActivities && feedObjectActivities.length > 0)) && (React.createElement(Collapse, { in: expandedActivities, timeout: "auto", classes: { root: classes.activitiesSection } },
|
|
480
|
-
React.createElement(CardContent, { className: classes.activitiesContent },
|
|
481
|
-
React.createElement(Activities, Object.assign({ feedObject: obj, key: selectedActivities, feedObjectActivities: feedObjectActivities, activitiesType: selectedActivities, onSetSelectedActivities: handleSelectedActivities, comments: comments, CommentsObjectProps: {
|
|
482
|
-
CommentComponentProps: Object.assign({ onDelete: handleDeleteComment, truncateContent: true, CommentsObjectComponentProps: { inPlaceLoadMoreContents: false } }, CommentComponentProps),
|
|
483
|
-
CommentObjectSkeletonProps: CommentObjectSkeletonProps
|
|
484
|
-
}, cacheStrategy: cacheStrategy }, ActivitiesProps))))),
|
|
485
|
-
composerOpen && (React.createElement(Composer, { open: composerOpen, feedObject: obj, onClose: handleToggleEdit, onSuccess: handleEditSuccess, maxWidth: "sm", fullWidth: true })))) : (React.createElement(FeedObjectSkeleton, Object.assign({ template: template }, FeedObjectSkeletonProps)))));
|
|
429
|
+
objElement = (_jsx(React.Fragment, { children: obj ? (_jsxs(Box, Object.assign({ className: classNames({ [classes.deleted]: obj && obj.deleted }) }, { children: [obj.categories.length > 0 && (_jsxs("div", Object.assign({ className: classes.category }, { children: [_jsxs(_Fragment, { children: [obj.group && (_jsx("div", Object.assign({ className: classes.group }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "groups" }), component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }, obj.group.id) }))), obj.event && (_jsx("div", Object.assign({ className: classes.event }, { children: _jsx(Chip, { color: "secondary", size: "small", label: obj.event.name, icon: _jsx(Icon, { children: "CalendarIcon" }), component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }, obj.event.id) })))] }), obj.categories.map((c) => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, c) }, { children: _jsx(Typography, Object.assign({ variant: "overline" }, { children: c.name })) }), c.id)))] }))), obj.group && !obj.categories.length && (_jsx("div", Object.assign({ className: classes.group }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "groups" }), label: obj.group.name, component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }, obj.group.id) }))), obj.event && !obj.categories.length && (_jsx("div", Object.assign({ className: classes.event }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "CalendarIcon" }), label: obj.event.name, component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }, obj.event.id) }))), _jsx(CardHeader, { className: classes.header, avatar: _jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !obj.author.community_badge }, { children: _jsx(Avatar, Object.assign({ "aria-label": "recipe", src: obj.author.avatar, className: classes.avatar }, { children: obj.author.username })) })) })), title: _jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: obj.author.username })), subheader: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt }, { children: _jsx(DateTimeAgo, { component: 'span', date: obj.added_at }) })), obj.location && (_jsxs(_Fragment, { children: [_jsx(Bullet, {}), _jsxs(Box, Object.assign({ className: classes.location }, { children: [_jsx(Icon, { children: "add_location_alt" }), (_a = obj.location) === null || _a === void 0 ? void 0 : _a.location] }))] })), _jsx(Bullet, {}), _jsx(Box, Object.assign({ className: classes.tag }, { children: obj.addressing.length > 0 ? (_jsx(Tags, { tags: obj.addressing, TagChipProps: { disposable: false, clickable: false } })) : obj.group ? (_jsx(Tooltip, Object.assign({ title: `${intl.formatMessage(messages.visibleToGroup, { group: obj.group.name })}` }, { children: _jsx(Icon, Object.assign({ color: "disabled", fontSize: "small" }, { children: "groups" })) }))) : (_jsx(Tooltip, Object.assign({ title: `${intl.formatMessage(messages.visibleToAll)}` }, { children: _jsx(Icon, Object.assign({ color: "disabled", fontSize: "small" }, { children: "public" })) }))) }))] }), action: renderHeaderAction() }), _jsxs(CardContent, Object.assign({ classes: { root: classes.content } }, { children: [_jsx(Box, Object.assign({ className: classes.titleSection }, { children: 'title' in obj && (_jsx(_Fragment, { children: template === SCFeedObjectTemplateType.DETAIL ? (_jsx(Typography, Object.assign({ variant: "body1", gutterBottom: true, className: classes.title }, { children: obj.title }))) : (_jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) }, { children: _jsx(Typography, Object.assign({ variant: "body1", gutterBottom: true, className: classes.title }, { children: obj.title })) }))) })) })), _jsx(Box, Object.assign({ className: classes.textSection }, { children: getContributionSummary(obj, template) })), _jsx(Box, Object.assign({ className: classes.mediasSection }, { children: _jsx(FeedObjectMediaPreview, Object.assign({ medias: obj.medias }, FeedObjectMediaPreviewProps)) })), _jsx(Box, Object.assign({ className: classes.pollsSection }, { children: obj['poll'] && (_jsx(PollObject, Object.assign({ visible: pollVisible ||
|
|
430
|
+
template === SCFeedObjectTemplateType.DETAIL ||
|
|
431
|
+
Boolean(obj.type !== SCContributionType.DISCUSSION && !obj.html && !obj.medias.length), feedObject: obj, pollObject: obj['poll'], onChange: handleChangePoll, onToggleVisibility: handleTogglePollVisibility }, PollObjectProps))) })), _jsx(Box, Object.assign({ className: classes.infoSection }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [!hideParticipantsPreview && (_jsx(ContributorsFeedObject, Object.assign({ feedObject: obj, feedObjectType: obj.type }, ContributorsFeedObjectProps, { cacheStrategy: cacheStrategy }))), !hideFollowAction && _jsx(Follow, Object.assign({ feedObject: obj, feedObjectType: obj.type, handleFollow: handleFollow }, FollowButtonProps))] })) }))] })), _jsxs(CardActions, Object.assign({ className: classes.actionsSection }, { children: [_jsx(Actions, Object.assign({ feedObjectId: feedObjectId, feedObjectType: feedObjectType, feedObject: obj, hideCommentAction: template === SCFeedObjectTemplateType.DETAIL, handleExpandActivities: template === SCFeedObjectTemplateType.PREVIEW ? handleExpandActivities : null, VoteActionProps: { onVoteAction: handleVoteSuccess } }, ActionsProps)), (template === SCFeedObjectTemplateType.DETAIL || expandedActivities) && (_jsx(Box, Object.assign({ className: classes.replyContent }, { children: _jsx(CommentObjectReplyComponent, Object.assign({ id: `reply-feedObject-${obj.id}`, onReply: handleReply, editable: !isReplying || Boolean(obj) }, CommentObjectReplyComponentProps), Number(isReplying)) })))] })), template === SCFeedObjectTemplateType.PREVIEW && (obj.comment_count > 0 || (feedObjectActivities && feedObjectActivities.length > 0)) && (_jsx(Collapse, Object.assign({ in: expandedActivities, timeout: "auto", classes: { root: classes.activitiesSection } }, { children: _jsx(CardContent, Object.assign({ className: classes.activitiesContent }, { children: _jsx(Activities, Object.assign({ feedObject: obj, feedObjectActivities: feedObjectActivities, activitiesType: selectedActivities, onSetSelectedActivities: handleSelectedActivities, comments: comments, CommentsObjectProps: {
|
|
432
|
+
CommentComponentProps: Object.assign({ onDelete: handleDeleteComment, truncateContent: true, CommentsObjectComponentProps: { inPlaceLoadMoreContents: false } }, CommentComponentProps),
|
|
433
|
+
CommentObjectSkeletonProps: CommentObjectSkeletonProps
|
|
434
|
+
}, cacheStrategy: cacheStrategy }, ActivitiesProps), selectedActivities) })) }))), composerOpen && (_jsx(Composer, { open: composerOpen, feedObject: obj, onClose: handleToggleEdit, onSuccess: handleEditSuccess, maxWidth: "sm", fullWidth: true }))] }))) : (_jsx(FeedObjectSkeleton, Object.assign({ template: template }, FeedObjectSkeletonProps))) }));
|
|
486
435
|
}
|
|
487
436
|
else if (template === SCFeedObjectTemplateType.SHARE) {
|
|
488
|
-
objElement = (React.
|
|
489
|
-
obj.categories.length > 0 && (React.createElement("div", { className: classes.category },
|
|
490
|
-
React.createElement(React.Fragment, null,
|
|
491
|
-
obj.group && (React.createElement("div", { className: classes.group },
|
|
492
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.group.id, icon: React.createElement(Icon, null, "groups"), component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }))),
|
|
493
|
-
obj.event && (React.createElement("div", { className: classes.event },
|
|
494
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.event.id, icon: React.createElement(Icon, null, "CalendarIcon"), component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true })))),
|
|
495
|
-
obj.categories.map((c) => (React.createElement(Link, { to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, c), key: c.id },
|
|
496
|
-
React.createElement(Typography, { variant: "overline" }, c.name)))))),
|
|
497
|
-
obj.group && !obj.categories.length && (React.createElement("div", { className: classes.group },
|
|
498
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.group.id, icon: React.createElement(Icon, null, "groups"), label: obj.group.name, component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }))),
|
|
499
|
-
obj.event && !obj.categories.length && (React.createElement("div", { className: classes.event },
|
|
500
|
-
React.createElement(Chip, { color: "secondary", size: "small", key: obj.event.id, icon: React.createElement(Icon, null, "groups"), label: obj.event.name, component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }))),
|
|
501
|
-
React.createElement(CardHeader, { classes: { root: classes.header }, avatar: React.createElement(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }),
|
|
502
|
-
React.createElement(UserAvatar, { hide: !obj.author.community_badge },
|
|
503
|
-
React.createElement(Avatar, { "aria-label": "recipe", src: obj.author.avatar, className: classes.avatar }, obj.author.username))), title: React.createElement(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), obj.author.username), subheader: React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt },
|
|
504
|
-
React.createElement(DateTimeAgo, { date: obj.added_at })) }),
|
|
505
|
-
React.createElement(CardContent, { classes: { root: classes.content } },
|
|
506
|
-
React.createElement(Box, { className: classes.titleSection }, 'title' in obj && (React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) },
|
|
507
|
-
React.createElement(Typography, { variant: "body1", gutterBottom: true, className: classes.title }, obj.title)))),
|
|
508
|
-
React.createElement(Box, { className: classes.textSection }, getContributionSummary(obj, template)),
|
|
509
|
-
React.createElement(Box, { className: classes.mediasSection },
|
|
510
|
-
React.createElement(FeedObjectMediaPreview, Object.assign({ medias: obj.medias }, FeedObjectMediaPreviewProps))),
|
|
511
|
-
React.createElement(Box, { className: classes.pollsSection }, obj['poll'] && (React.createElement(PollObject, Object.assign({ feedObject: obj, pollObject: obj['poll'], onChange: handleChangePoll, visible: Boolean(obj.type !== SCContributionType.DISCUSSION && !obj.html && !obj.medias.length) }, PollObjectProps))))))) : (React.createElement(FeedObjectSkeleton, Object.assign({ template: template }, FeedObjectSkeletonProps)))));
|
|
437
|
+
objElement = (_jsx(React.Fragment, { children: obj ? (_jsxs(React.Fragment, { children: [obj.categories.length > 0 && (_jsxs("div", Object.assign({ className: classes.category }, { children: [_jsxs(_Fragment, { children: [obj.group && (_jsx("div", Object.assign({ className: classes.group }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "groups" }), component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }, obj.group.id) }))), obj.event && (_jsx("div", Object.assign({ className: classes.event }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "CalendarIcon" }), component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }, obj.event.id) })))] }), obj.categories.map((c) => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, c) }, { children: _jsx(Typography, Object.assign({ variant: "overline" }, { children: c.name })) }), c.id)))] }))), obj.group && !obj.categories.length && (_jsx("div", Object.assign({ className: classes.group }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "groups" }), label: obj.group.name, component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, obj.group), clickable: true }, obj.group.id) }))), obj.event && !obj.categories.length && (_jsx("div", Object.assign({ className: classes.event }, { children: _jsx(Chip, { color: "secondary", size: "small", icon: _jsx(Icon, { children: "groups" }), label: obj.event.name, component: Link, to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, obj.event), clickable: true }, obj.event.id) }))), _jsx(CardHeader, { classes: { root: classes.header }, avatar: _jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: _jsx(UserAvatar, Object.assign({ hide: !obj.author.community_badge }, { children: _jsx(Avatar, Object.assign({ "aria-label": "recipe", src: obj.author.avatar, className: classes.avatar }, { children: obj.author.username })) })) })), title: _jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: obj.author.username })), subheader: _jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt }, { children: _jsx(DateTimeAgo, { date: obj.added_at }) })) }), _jsxs(CardContent, Object.assign({ classes: { root: classes.content } }, { children: [_jsx(Box, Object.assign({ className: classes.titleSection }, { children: 'title' in obj && (_jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) }, { children: _jsx(Typography, Object.assign({ variant: "body1", gutterBottom: true, className: classes.title }, { children: obj.title })) }))) })), _jsx(Box, Object.assign({ className: classes.textSection }, { children: getContributionSummary(obj, template) })), _jsx(Box, Object.assign({ className: classes.mediasSection }, { children: _jsx(FeedObjectMediaPreview, Object.assign({ medias: obj.medias }, FeedObjectMediaPreviewProps)) })), _jsx(Box, Object.assign({ className: classes.pollsSection }, { children: obj['poll'] && (_jsx(PollObject, Object.assign({ feedObject: obj, pollObject: obj['poll'], onChange: handleChangePoll, visible: Boolean(obj.type !== SCContributionType.DISCUSSION && !obj.html && !obj.medias.length) }, PollObjectProps))) }))] }))] })) : (_jsx(FeedObjectSkeleton, Object.assign({ template: template }, FeedObjectSkeletonProps))) }));
|
|
512
438
|
}
|
|
513
439
|
else {
|
|
514
|
-
objElement = (
|
|
515
|
-
React.createElement(UserAvatar, { hide: !obj.author.community_badge },
|
|
516
|
-
React.createElement(Avatar, { alt: obj.author.username, variant: "circular", src: obj.author.avatar, className: classes.avatar }))), primary: React.createElement(Box, null,
|
|
517
|
-
React.createElement(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }), obj.author.username),
|
|
518
|
-
React.createElement(Typography, { variant: "body2", className: classes.snippetContent },
|
|
519
|
-
React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) }, getContributionSnippet(obj)))), disableTypography: true, secondary: React.createElement(Stack, { direction: "row", justifyContent: "space-between", spacing: 2, alignItems: "center" },
|
|
520
|
-
React.createElement(Link, { to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt },
|
|
521
|
-
React.createElement(DateTimeAgo, { component: "span", date: obj.added_at })),
|
|
522
|
-
React.createElement(Button, { component: Link, to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), variant: "text", color: "secondary", size: "small" },
|
|
523
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.comment", defaultMessage: "ui.feedObject.comment" }))) })) : (React.createElement(FeedObjectSkeleton, Object.assign({}, FeedObjectSkeletonProps)))));
|
|
440
|
+
objElement = (_jsx(React.Fragment, { children: obj ? (_jsx(BaseItem, { elevation: 0, className: classes.snippet, image: _jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !obj.author.community_badge }, { children: _jsx(Avatar, { alt: obj.author.username, variant: "circular", src: obj.author.avatar, className: classes.avatar }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!obj.author.deleted && { to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, obj.author) }), { onClick: obj.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: obj.author.username })), _jsx(Typography, Object.assign({ variant: "body2", className: classes.snippetContent }, { children: _jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)) }, { children: getContributionSnippet(obj) })) }))] }), disableTypography: true, secondary: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", spacing: 2, alignItems: "center" }, { children: [_jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), className: classes.activityAt }, { children: _jsx(DateTimeAgo, { component: "span", date: obj.added_at }) })), _jsx(Button, Object.assign({ component: Link, to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), variant: "text", color: "secondary", size: "small" }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.comment", defaultMessage: "ui.feedObject.comment" }) }))] })) })) : (_jsx(FeedObjectSkeleton, Object.assign({}, FeedObjectSkeletonProps))) }));
|
|
524
441
|
}
|
|
525
442
|
/**
|
|
526
443
|
* Renders root object
|
|
527
444
|
*/
|
|
528
|
-
return (
|
|
529
|
-
React.createElement(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest),
|
|
530
|
-
obj && markRead && React.createElement(MarkRead, { endpoint: Endpoints.FeedObjectMarkRead, data: { object: [obj.id] } }),
|
|
531
|
-
objElement),
|
|
532
|
-
openAlert && React.createElement(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })));
|
|
445
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest, { children: [obj && markRead && _jsx(MarkRead, { endpoint: Endpoints.FeedObjectMarkRead, data: { object: [obj.id] } }), objElement] })), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
533
446
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { useSCContext, useSCUser } from '@selfcommunity/react-core';
|
|
5
5
|
import { Box, Card, Typography } from '@mui/material';
|
|
@@ -21,9 +21,7 @@ const Root = styled(Card, {
|
|
|
21
21
|
})(() => ({}));
|
|
22
22
|
function LinearProgressWithLabel(_a) {
|
|
23
23
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
24
|
-
return (
|
|
25
|
-
React.createElement(LinearProgress, Object.assign({ variant: "determinate" }, props)),
|
|
26
|
-
React.createElement(Typography, { variant: "body2", color: "text.secondary" }, `${Math.round(props.value)}%`)));
|
|
24
|
+
return (_jsxs(Box, Object.assign({ className: className }, { children: [_jsx(LinearProgress, Object.assign({ variant: "determinate" }, props)), _jsx(Typography, Object.assign({ variant: "body2", color: "text.secondary" }, { children: `${Math.round(props.value)}%` }))] })));
|
|
27
25
|
}
|
|
28
26
|
export default function Choice(props) {
|
|
29
27
|
//PROPS
|
|
@@ -52,8 +50,5 @@ export default function Choice(props) {
|
|
|
52
50
|
/**
|
|
53
51
|
* Renders root element
|
|
54
52
|
*/
|
|
55
|
-
return (
|
|
56
|
-
React.createElement(Typography, { className: classes.label }, choiceObj.choice),
|
|
57
|
-
React.createElement(LinearProgressWithLabel, { className: classes.progress, value: renderVotes(choiceObj.vote_count, votes) }),
|
|
58
|
-
React.createElement(LoadingButton, { loading: isVoting === choiceObj.id, variant: choiceObj.voted ? 'contained' : 'outlined', size: "small", disabled: disabled || isVoting !== null || votable, className: classes.vote, onClick: handleVoteAction }, choiceObj.voted ? (React.createElement(Icon, null, "check")) : (React.createElement(FormattedMessage, { id: "ui.feedObject.poll.choice.vote", defaultMessage: "ui.feedObject.poll.choice.vote" })))));
|
|
53
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Typography, Object.assign({ className: classes.label }, { children: choiceObj.choice })), _jsx(LinearProgressWithLabel, { className: classes.progress, value: renderVotes(choiceObj.vote_count, votes) }), _jsx(LoadingButton, Object.assign({ loading: isVoting === choiceObj.id, variant: choiceObj.voted ? 'contained' : 'outlined', size: "small", disabled: disabled || isVoting !== null || votable, className: classes.vote, onClick: handleVoteAction }, { children: choiceObj.voted ? (_jsx(Icon, { children: "check" })) : (_jsx(FormattedMessage, { id: "ui.feedObject.poll.choice.vote", defaultMessage: "ui.feedObject.poll.choice.vote" })) }))] })));
|
|
59
54
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import Card from '@mui/material/Card';
|
|
5
6
|
import { http, Endpoints } from '@selfcommunity/api-services';
|
|
@@ -147,26 +148,9 @@ export default function PollObject(props) {
|
|
|
147
148
|
/**
|
|
148
149
|
* Renders the poll object
|
|
149
150
|
*/
|
|
150
|
-
let objElement =
|
|
151
|
+
let objElement = _jsx(_Fragment, {});
|
|
151
152
|
if (pollObject) {
|
|
152
|
-
objElement = (
|
|
153
|
-
React.createElement(CardHeader, { title: React.createElement(React.Fragment, null,
|
|
154
|
-
React.createElement(Button, { className: classes.toggleButton, onClick: handleToggleCollapsedClick, "aria-expanded": collapsed, endIcon: React.createElement(Icon, { className: classNames(classes.expandIcon, { [classes.collapsedIcon]: collapsed }) }, "arrow_upward") }, collapsed ? intl.formatMessage(messages.showPoll) : intl.formatMessage(messages.hidePoll))) }),
|
|
155
|
-
React.createElement(Collapse, { in: !collapsed, timeout: "auto", unmountOnExit: true },
|
|
156
|
-
React.createElement(CardContent, null,
|
|
157
|
-
React.createElement(Typography, { variant: "body1", className: classes.title }, obj.title),
|
|
158
|
-
obj.expiration_at && Date.parse(obj.expiration_at) >= new Date().getTime() && (React.createElement(Typography, { variant: "body2", className: classes.expiration },
|
|
159
|
-
`${intl.formatMessage(messages.expDate)}`,
|
|
160
|
-
`${intl.formatDate(Date.parse(obj.expiration_at), { year: 'numeric', month: 'numeric', day: 'numeric' })}`)),
|
|
161
|
-
obj.closed && (React.createElement(Typography, { variant: "body2", className: classes.closed },
|
|
162
|
-
React.createElement(FormattedMessage, { id: "ui.feedObject.poll.closed", defaultMessage: "ui.feedObject.poll.closed" }))),
|
|
163
|
-
React.createElement(List, null, choices.map((choice, index) => (React.createElement(ListItem, { key: index },
|
|
164
|
-
React.createElement(Choice, { elevation: 0, choiceObj: choice, feedObject: disabled ? null : feedObject, votes: votes, vote: vote, isVoting: isVoting, votable: votable }))))),
|
|
165
|
-
multipleChoices ? (React.createElement("div", { className: classes.votes },
|
|
166
|
-
React.createElement(Icon, null, "list"),
|
|
167
|
-
React.createElement(Typography, null, `${intl.formatMessage(messages.votes, { total: votes })}`))) : (React.createElement("div", { className: classes.voters },
|
|
168
|
-
React.createElement(Icon, null, "people_alt"),
|
|
169
|
-
React.createElement(Typography, null, `${intl.formatMessage(messages.voters, { total: votes })}`)))))));
|
|
153
|
+
objElement = (_jsxs(_Fragment, { children: [_jsx(CardHeader, { title: _jsx(_Fragment, { children: _jsx(Button, Object.assign({ className: classes.toggleButton, onClick: handleToggleCollapsedClick, "aria-expanded": collapsed, endIcon: _jsx(Icon, Object.assign({ className: classNames(classes.expandIcon, { [classes.collapsedIcon]: collapsed }) }, { children: "arrow_upward" })) }, { children: collapsed ? intl.formatMessage(messages.showPoll) : intl.formatMessage(messages.hidePoll) })) }) }), _jsx(Collapse, Object.assign({ in: !collapsed, timeout: "auto", unmountOnExit: true }, { children: _jsxs(CardContent, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.title }, { children: obj.title })), obj.expiration_at && Date.parse(obj.expiration_at) >= new Date().getTime() && (_jsxs(Typography, Object.assign({ variant: "body2", className: classes.expiration }, { children: [`${intl.formatMessage(messages.expDate)}`, `${intl.formatDate(Date.parse(obj.expiration_at), { year: 'numeric', month: 'numeric', day: 'numeric' })}`] }))), obj.closed && (_jsx(Typography, Object.assign({ variant: "body2", className: classes.closed }, { children: _jsx(FormattedMessage, { id: "ui.feedObject.poll.closed", defaultMessage: "ui.feedObject.poll.closed" }) }))), _jsx(List, { children: choices.map((choice, index) => (_jsx(ListItem, { children: _jsx(Choice, { elevation: 0, choiceObj: choice, feedObject: disabled ? null : feedObject, votes: votes, vote: vote, isVoting: isVoting, votable: votable }) }, index))) }), multipleChoices ? (_jsxs("div", Object.assign({ className: classes.votes }, { children: [_jsx(Icon, { children: "list" }), _jsx(Typography, { children: `${intl.formatMessage(messages.votes, { total: votes })}` })] }))) : (_jsxs("div", Object.assign({ className: classes.voters }, { children: [_jsx(Icon, { children: "people_alt" }), _jsx(Typography, { children: `${intl.formatMessage(messages.voters, { total: votes })}` })] })))] }) }))] }));
|
|
170
154
|
}
|
|
171
155
|
useEffect(() => {
|
|
172
156
|
setChoices(pollObject.choices);
|
|
@@ -174,5 +158,5 @@ export default function PollObject(props) {
|
|
|
174
158
|
/**
|
|
175
159
|
* Renders root element
|
|
176
160
|
*/
|
|
177
|
-
return (
|
|
161
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: objElement })));
|
|
178
162
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import Widget from '../Widget';
|
|
4
5
|
import { styled } from '@mui/material/styles';
|
|
@@ -41,23 +42,10 @@ export default function FeedObjectSkeleton(props) {
|
|
|
41
42
|
const theme = useTheme();
|
|
42
43
|
let obj;
|
|
43
44
|
if (template === SCFeedObjectTemplateType.PREVIEW || template === SCFeedObjectTemplateType.DETAIL || template === SCFeedObjectTemplateType.SEARCH) {
|
|
44
|
-
obj = (React.
|
|
45
|
-
React.createElement(CardHeader, { avatar: React.createElement(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }), title: React.createElement(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), subheader: React.createElement(Skeleton, { animation: "wave", height: 10, width: "40%" }) }),
|
|
46
|
-
React.createElement(Skeleton, { animation: "wave", variant: "rectangular", className: classes.media }),
|
|
47
|
-
React.createElement(CardContent, null,
|
|
48
|
-
React.createElement(React.Fragment, null,
|
|
49
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, style: { marginBottom: 6 } }),
|
|
50
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }),
|
|
51
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, width: "60%" })))));
|
|
45
|
+
obj = (_jsxs(React.Fragment, { children: [_jsx(CardHeader, { avatar: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }), title: _jsx(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), subheader: _jsx(Skeleton, { animation: "wave", height: 10, width: "40%" }) }), _jsx(Skeleton, { animation: "wave", variant: "rectangular", className: classes.media }), _jsx(CardContent, { children: _jsxs(React.Fragment, { children: [_jsx(Skeleton, { animation: "wave", height: 10, style: { marginBottom: 6 } }), _jsx(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), _jsx(Skeleton, { animation: "wave", height: 10, width: "60%" })] }) })] }));
|
|
52
46
|
}
|
|
53
47
|
else {
|
|
54
|
-
obj = (React.
|
|
55
|
-
React.createElement(CardHeader, { avatar: React.createElement(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }), title: React.createElement(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), subheader: React.createElement(Skeleton, { animation: "wave", height: 10, width: "40%" }) }),
|
|
56
|
-
React.createElement(CardContent, null,
|
|
57
|
-
React.createElement(React.Fragment, null,
|
|
58
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, style: { marginBottom: 6 } }),
|
|
59
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }),
|
|
60
|
-
React.createElement(Skeleton, { animation: "wave", height: 10, width: "60%", style: { marginBottom: 6 } })))));
|
|
48
|
+
obj = (_jsxs(React.Fragment, { children: [_jsx(CardHeader, { avatar: _jsx(Skeleton, { animation: "wave", variant: "circular", width: theme.selfcommunity.user.avatar.sizeMedium, height: theme.selfcommunity.user.avatar.sizeMedium }), title: _jsx(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), subheader: _jsx(Skeleton, { animation: "wave", height: 10, width: "40%" }) }), _jsx(CardContent, { children: _jsxs(React.Fragment, { children: [_jsx(Skeleton, { animation: "wave", height: 10, style: { marginBottom: 6 } }), _jsx(Skeleton, { animation: "wave", height: 10, width: "80%", style: { marginBottom: 6 } }), _jsx(Skeleton, { animation: "wave", height: 10, width: "60%", style: { marginBottom: 6 } })] }) })] }));
|
|
61
49
|
}
|
|
62
|
-
return (
|
|
50
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, `${PREFIX}-${template}`) }, rest, { children: obj })));
|
|
63
51
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import Box from '@mui/material/Box';
|
|
5
5
|
import { useSCMediaClick } from '@selfcommunity/react-core';
|
|
@@ -56,9 +56,8 @@ export default (inProps) => {
|
|
|
56
56
|
* The adornment prop is used to insert the controls
|
|
57
57
|
* for re-editing the media at the top of the group of elements
|
|
58
58
|
*/
|
|
59
|
-
return (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})));
|
|
59
|
+
return (_jsx(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: mediaObjectTypes.map((mediaObject) => {
|
|
60
|
+
const { displayProps = {} } = mediaObject;
|
|
61
|
+
return (_jsx("div", { children: _jsx(mediaObject.displayComponent, Object.assign({ medias: medias }, displayProps, { onMediaClick: handleMediaClick })) }, mediaObject.name));
|
|
62
|
+
}) })));
|
|
64
63
|
};
|