@selfcommunity/react-ui 0.7.9-alpha.54 → 0.7.9-alpha.56
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/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/cjs/components/Group/Group.d.ts +5 -0
- package/lib/cjs/components/Group/Group.js +2 -2
- package/lib/cjs/components/GroupForm/GroupForm.js +2 -1
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +48 -13
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.js +1 -1
- package/lib/cjs/components/Groups/Groups.js +1 -8
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +1 -0
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +9 -1
- package/lib/cjs/components/UserSubscribedGroupsWidget/Skeleton.d.ts +21 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/Skeleton.js +46 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.d.ts +68 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +183 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/constants.d.ts +1 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/constants.js +4 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/index.d.ts +4 -0
- package/lib/cjs/components/UserSubscribedGroupsWidget/index.js +8 -0
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +1 -1
- package/lib/cjs/index.d.ts +2 -1
- package/lib/cjs/index.js +5 -2
- package/lib/esm/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/esm/components/Group/Group.d.ts +5 -0
- package/lib/esm/components/Group/Group.js +4 -4
- package/lib/esm/components/GroupForm/GroupForm.js +2 -1
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +48 -13
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.js +1 -1
- package/lib/esm/components/Groups/Groups.js +1 -8
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +1 -0
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +11 -3
- package/lib/esm/components/UserSubscribedGroupsWidget/Skeleton.d.ts +21 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/Skeleton.js +42 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.d.ts +68 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +180 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/constants.d.ts +1 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/constants.js +1 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/index.d.ts +4 -0
- package/lib/esm/components/UserSubscribedGroupsWidget/index.js +4 -0
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +1 -1
- package/lib/esm/index.d.ts +2 -1
- package/lib/esm/index.js +2 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +5 -5
package/lib/cjs/index.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ import Groups, { GroupsProps, GroupsSkeleton } from './components/Groups';
|
|
|
121
121
|
import GroupForm, { GroupFormProps } from './components/GroupForm';
|
|
122
122
|
import GroupSettingsIconButton, { GroupSettingsIconButtonProps } from './components/GroupSettingsIconButton';
|
|
123
123
|
import GroupInvitedWidget, { GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton } from './components/GroupInvitedWidget';
|
|
124
|
+
import UserSubscribedGroupsWidget, { UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton } from './components/UserSubscribedGroupsWidget';
|
|
124
125
|
/**
|
|
125
126
|
* Constants
|
|
126
127
|
*/
|
|
@@ -145,4 +146,4 @@ import FeedObjectMediaPreview, { FeedObjectMediaPreviewProps } from './component
|
|
|
145
146
|
/**
|
|
146
147
|
* List all exports
|
|
147
148
|
*/
|
|
148
|
-
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton, CreateGroupButtonProps, EditGroupButton, EditGroupButtonProps, GroupInviteButton, GroupInviteButtonProps, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, Group, GroupProps, GroupSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupsProps, GroupsSkeleton, GroupForm, GroupFormProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, StickyBoxProps, StickyBoxComponent, UseStickyBoxProps, TagChip, TagChipProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserAvatar, UserAvatarProps, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, MediaChunkUploaderProps, File, Link, Share, EditMediaProps, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, TWITTER_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT, ConsentSolution, ConsentSolutionProps, ConsentSolutionSkeleton, ConsentSolutionButton, ConsentSolutionButtonProps, LEGAL_POLICIES, DEFAULT_FIELDS, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, PollSuggestionWidgetProps, Incubator, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorDetail, IncubatorDetailProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterProps, FooterSkeleton, BaseItem, BaseItemProps, BaseDialog, BaseDialogProps, GroupSettingsIconButton, GroupSettingsIconButtonProps };
|
|
149
|
+
export { AccountDataPortability, AccountDataPortabilityProps, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDelete, AccountDeleteProps, AccountDeleteButton, AccountDeleteButtonProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AccountChangeMailValidation, AccountChangeMailValidationProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbar, NavigationToolbarProps, NavigationToolbarSkeleton, NavigationMenuIconButton, NavigationMenuContent, NavigationMenuIconButtonProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, Category, CategoryProps, CategorySkeleton, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, Categories, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, ChangeCover, ChangePicture, ChangePictureProps, ChangeCoverProps, Composer, ComposerProps, ComposerIconButton, ComposerIconButtonProps, Editor, EditorProps, EditorSkeleton, FriendshipUserButton, FriendshipButtonProps, Feed, FeedRef, FeedProps, FeedSidebarProps, FeedSkeleton, CategoryFollowButton, CategoryFollowButtonProps, FollowUserButton, FollowUserButtonProps, ConnectionUserButton, FeedObject, FeedObjectProps, FeedObjectSkeleton, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, GenericSkeleton, AvatarGroupSkeleton, CommentObject, CommentsObject, CommentsObjectProps, CommentObjectProps, CommentsObjectSkeleton, CommentObjectSkeleton, CommentObjectReply, CommentObjectReplyProps, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, ReplyComment, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, Notification, NotificationProps, NotificationSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, PlatformWidget, PlatformWidgetProps, PlatformWidgetSkeleton, LocationAutocomplete, LocationAutocompleteProps, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CategoryTrendingPeopleWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectWidgetProps, RelatedFeedObjectsWidgetSkeleton, UserActionIconButton, UserActionIconButtonProps, UserCounters, UserCountersProps, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserInfoDialog, UserInfoDialogProps, UserInfo, UserInfoProps, UserInfoSkeleton, UserProfileBlocked, UserProfileBlockedProps, SCUserProfileFields, SCUserProfileSettings, UserProfileEdit, UserProfileEditProps, UserProfileEditSkeleton, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserSocialAssociation, UserSocialAssociationProps, SCUserSocialAssociations, CustomAdv, CustomAdvProps, CustomAdvSkeleton, User, UserProps, UserSkeleton, PrivateMessageThread, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Widget, WidgetProps, SCFeedWidgetType, SCFeedObjectTemplateType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCMediaObjectType, SCMediaChunkType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupMembersButton, GroupMembersButtonProps, CreateGroupButton, CreateGroupButtonProps, EditGroupButton, EditGroupButtonProps, GroupInviteButton, GroupInviteButtonProps, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, Group, GroupProps, GroupSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupsProps, GroupsSkeleton, GroupForm, GroupFormProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, HiddenPlaceholder, UrlTextField, UsernameTextField, EmailTextField, PasswordTextField, PhoneTextField, MetadataField, InfiniteScroll, StickyBox, useStickyBox, StickyBoxProps, StickyBoxComponent, UseStickyBoxProps, TagChip, TagChipProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserAvatar, UserAvatarProps, Lightbox, CentralProgress, ConfirmDialog, LanguageSwitcher, MediaChunkUploader, MediaChunkUploaderProps, File, Link, Share, EditMediaProps, MEDIA_TYPE_EMBED, FACEBOOK_SHARE, TWITTER_SHARE, LINKEDIN_SHARE, DEFAULT_PRELOAD_OFFSET_VIEWPORT, MIN_PRELOAD_OFFSET_VIEWPORT, MAX_PRELOAD_OFFSET_VIEWPORT, ConsentSolution, ConsentSolutionProps, ConsentSolutionSkeleton, ConsentSolutionButton, ConsentSolutionButtonProps, LEGAL_POLICIES, DEFAULT_FIELDS, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_LIMIT, DEFAULT_WIDGETS_NUMBER, PollSuggestionWidget, PollSuggestionWidgetProps, Incubator, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorDetail, IncubatorDetailProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, ContributionUtils, bytesToSize, getUnseenNotification, getUnseenNotificationCounter, MessageUploaderUtils, getRelativeTime, Footer, FooterProps, FooterSkeleton, BaseItem, BaseItemProps, BaseDialog, BaseDialogProps, GroupSettingsIconButton, GroupSettingsIconButtonProps };
|
package/lib/cjs/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GenericSkeleton = exports.FeedUpdatesWidgetSkeleton = exports.FeedUpdatesWidget = exports.FeedObjectMediaPreview = exports.FeedObjectSkeleton = exports.FeedObject = exports.ConnectionUserButton = exports.FollowUserButton = exports.CategoryFollowButton = exports.FeedSkeleton = exports.Feed = exports.FriendshipUserButton = exports.EditorSkeleton = exports.Editor = exports.ComposerIconButton = exports.Composer = exports.ChangePicture = exports.ChangeCover = exports.CategoriesSuggestionWidgetSkeleton = exports.CategoriesSuggestionWidget = exports.CategoriesPopularWidgetSkeleton = exports.CategoriesPopularWidget = exports.UserFollowedCategoriesWidgetSkeleton = exports.UserFollowedCategoriesWidget = exports.CategoriesSkeleton = exports.Categories = exports.CategoryHeaderSkeleton = exports.CategoryHeader = exports.CategoryFollowersButton = exports.CategoryAutocomplete = exports.CategorySkeleton = exports.Category = exports.BroadcastMessagesSkeleton = exports.BroadcastMessages = exports.BottomNavigation = exports.NavigationMenuContent = exports.NavigationMenuIconButton = exports.NavigationToolbarSkeleton = exports.NavigationToolbar = exports.NavigationToolbarMobileSkeleton = exports.NavigationToolbarMobile = exports.NavigationSettingsIconButton = exports.AccountChangeMailValidation = exports.AccountVerify = exports.AccountReset = exports.AccountRecover = exports.AccountDeleteButton = exports.AccountDelete = exports.AccountDataPortabilityButton = exports.AccountDataPortability = void 0;
|
|
4
4
|
exports.UserConnectionsRequestsSentWidget = exports.UserConnectionsRequestsWidgetSkeleton = exports.UserConnectionsRequestsWidget = exports.UserConnectionsWidgetSkeleton = exports.UserConnectionsWidget = exports.UserFollowersWidgetSkeleton = exports.UserFollowersWidget = exports.UserFollowedUsersWidgetSkeleton = exports.UserFollowedUsersWidget = exports.UserProfileEditSectionAccount = exports.UserProfileEditSectionSettings = exports.UserProfileEditSectionPublicInfo = exports.UserProfileEditSkeleton = exports.UserProfileEdit = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.UserProfileBlocked = exports.UserInfoSkeleton = exports.UserInfo = exports.UserInfoDialog = exports.UserProfileHeaderSkeleton = exports.UserProfileHeader = exports.UserCounters = exports.UserActionIconButton = exports.RelatedFeedObjectsWidgetSkeleton = exports.RelatedFeedObjectsWidget = exports.CategoryTrendingPeopleWidgetSkeleton = exports.CategoryTrendingUsersWidget = exports.CategoryTrendingFeedWidgetSkeleton = exports.CategoryTrendingFeedWidget = exports.LoyaltyProgramWidgetSkeleton = exports.LoyaltyProgramWidget = exports.LocationAutocomplete = exports.PlatformWidgetSkeleton = exports.PlatformWidget = exports.UserSuggestionWidgetSkeleton = exports.UserSuggestionWidget = exports.NotificationSkeleton = exports.Notification = exports.InlineComposerWidgetSkeleton = exports.InlineComposerWidget = exports.ReplyComment = exports.CommentsFeedObjectSkeleton = exports.CommentsFeedObject = exports.CommentObjectReply = exports.CommentObjectSkeleton = exports.CommentsObjectSkeleton = exports.CommentsObject = exports.CommentObject = exports.AvatarGroupSkeleton = void 0;
|
|
5
5
|
exports.Groups = exports.GroupRequestsWidgetSkeleton = exports.GroupRequestsWidget = exports.GroupMembersWidgetSkeleton = exports.GroupMembersWidget = exports.GroupSubscribeButton = exports.GroupSkeleton = exports.Group = exports.GroupInfoWidgetSkeleton = exports.GroupInfoWidget = exports.GroupInviteButton = exports.EditGroupButton = exports.CreateGroupButton = exports.GroupMembersButton = exports.GroupHeaderSkeleton = exports.GroupHeader = exports.ChangeGroupPicture = exports.ChangeGroupCover = exports.SCBroadcastMessageTemplateType = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCCommentsOrderBy = exports.SCFeedObjectTemplateType = exports.Widget = exports.SearchDialog = exports.SearchAutocomplete = exports.SnippetNotificationsSkeleton = exports.SnippetNotifications = exports.ToastNotificationsSkeleton = exports.ToastNotifications = exports.PrivateMessageSettingsIconButton = exports.PrivateMessageComponentSkeleton = exports.PrivateMessageComponent = exports.PrivateMessageSnippetsSkeleton = exports.PrivateMessageSnippets = exports.PrivateMessageEditorSkeleton = exports.PrivateMessageEditor = exports.PrivateMessageSnippetItemSkeleton = exports.PrivateMessageSnippetItem = exports.PrivateMessageThreadItemSkeleton = exports.PrivateMessageThreadItem = exports.PrivateMessageThreadSkeleton = exports.PrivateMessageThread = exports.UserSkeleton = exports.User = exports.CustomAdvSkeleton = exports.CustomAdv = exports.SCUserSocialAssociations = exports.UserSocialAssociation = exports.UserConnectionsRequestsSentWidgetSkeleton = void 0;
|
|
6
|
-
exports.
|
|
7
|
-
exports.GroupSettingsIconButton = exports.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = void 0;
|
|
6
|
+
exports.ContributionUtils = exports.IncubatorSuggestionWidget = exports.IncubatorDetail = exports.IncubatorListWidget = exports.IncubatorSubscribeButton = exports.Incubator = exports.PollSuggestionWidget = exports.DEFAULT_WIDGETS_NUMBER = exports.DEFAULT_PAGINATION_LIMIT = exports.DEFAULT_PAGINATION_OFFSET = exports.DEFAULT_PAGINATION_QUERY_PARAM_NAME = exports.DEFAULT_FIELDS = exports.LEGAL_POLICIES = exports.ConsentSolutionButton = exports.ConsentSolutionSkeleton = exports.ConsentSolution = exports.MAX_PRELOAD_OFFSET_VIEWPORT = exports.MIN_PRELOAD_OFFSET_VIEWPORT = exports.DEFAULT_PRELOAD_OFFSET_VIEWPORT = exports.LINKEDIN_SHARE = exports.TWITTER_SHARE = exports.FACEBOOK_SHARE = exports.MEDIA_TYPE_EMBED = exports.Share = exports.Link = exports.File = exports.MediaChunkUploader = exports.LanguageSwitcher = exports.ConfirmDialog = exports.CentralProgress = exports.Lightbox = exports.UserAvatar = exports.UserDeletedSnackBar = exports.TagChip = exports.useStickyBox = exports.StickyBox = exports.InfiniteScroll = exports.MetadataField = exports.PhoneTextField = exports.PasswordTextField = exports.EmailTextField = exports.UsernameTextField = exports.UrlTextField = exports.HiddenPlaceholder = exports.UserSubscribedGroupsWidgetSkeleton = exports.UserSubscribedGroupsWidget = exports.GroupInvitedWidgetSkeleton = exports.GroupInvitedWidget = exports.GroupForm = exports.GroupsSkeleton = void 0;
|
|
7
|
+
exports.GroupSettingsIconButton = exports.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.bytesToSize = void 0;
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
/**
|
|
10
10
|
* Components
|
|
@@ -315,6 +315,9 @@ exports.GroupSettingsIconButton = GroupSettingsIconButton_1.default;
|
|
|
315
315
|
const GroupInvitedWidget_1 = tslib_1.__importStar(require("./components/GroupInvitedWidget"));
|
|
316
316
|
exports.GroupInvitedWidget = GroupInvitedWidget_1.default;
|
|
317
317
|
Object.defineProperty(exports, "GroupInvitedWidgetSkeleton", { enumerable: true, get: function () { return GroupInvitedWidget_1.GroupInvitedWidgetSkeleton; } });
|
|
318
|
+
const UserSubscribedGroupsWidget_1 = tslib_1.__importStar(require("./components/UserSubscribedGroupsWidget"));
|
|
319
|
+
exports.UserSubscribedGroupsWidget = UserSubscribedGroupsWidget_1.default;
|
|
320
|
+
Object.defineProperty(exports, "UserSubscribedGroupsWidgetSkeleton", { enumerable: true, get: function () { return UserSubscribedGroupsWidget_1.UserSubscribedGroupsWidgetSkeleton; } });
|
|
318
321
|
/**
|
|
319
322
|
* Constants
|
|
320
323
|
*/
|
|
@@ -71,7 +71,7 @@ export default function BottomNavigation(inProps) {
|
|
|
71
71
|
preferences[SCPreferences.CONFIGURATIONS_EXPLORE_STREAM_ENABLED].value ? (React.createElement(BottomNavigationAction, { key: "explore", className: classes.action, component: Link, to: scRoutingContext.url(SCRoutes.EXPLORE_ROUTE_NAME, {}), value: scRoutingContext.url(SCRoutes.EXPLORE_ROUTE_NAME, {}), icon: React.createElement(Icon, null, "explore") })) : null,
|
|
72
72
|
React.createElement(BottomNavigationAction, { key: "composer", className: classNames(classes.composer, classes.action), component: ComposerIconButton, disableRipple: true }),
|
|
73
73
|
groupsEnabled && scUserContext.user ? (React.createElement(BottomNavigationAction, { key: "groups", className: classes.action, component: Link, to: scRoutingContext.url(SCRoutes.GROUPS_ROUTE_NAME, {}), value: scRoutingContext.url(SCRoutes.GROUPS_ROUTE_NAME, {}), icon: React.createElement(Icon, null, "groups") })) : null,
|
|
74
|
-
scUserContext.user ? (React.createElement(BottomNavigationAction, { key: "notifications", className: classes.action, component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}), value: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}), icon: React.createElement(Badge, { badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" },
|
|
74
|
+
scUserContext.user && !groupsEnabled ? (React.createElement(BottomNavigationAction, { key: "notifications", className: classes.action, component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}), value: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}), icon: React.createElement(Badge, { badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" },
|
|
75
75
|
React.createElement(Icon, null, "notifications_active")) })) : null,
|
|
76
76
|
privateMessagingEnabled && scUserContext.user ? (React.createElement(BottomNavigationAction, { key: "messages", className: classes.action, component: Link, to: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}), value: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}), icon: React.createElement(Badge, { badgeContent: 0, color: "secondary" },
|
|
77
77
|
React.createElement(Icon, null, "email")) })) : null
|
|
@@ -58,5 +58,5 @@ export default function ContributorsFeedObject(props) {
|
|
|
58
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
59
|
React.createElement(FormattedMessage, { id: "ui.feedObject.contributors.noOtherContributors", defaultMessage: "ui.feedObject.contributors.noOtherContributors" })) },
|
|
60
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 } }))))))))))) : null)))));
|
|
61
|
+
React.createElement(User, { elevation: 0, user: c, key: c.id, sx: { m: 0 }, onClick: () => setOpenContributorsDialog(false) }))))))))))) : null)))));
|
|
62
62
|
}
|
|
@@ -27,6 +27,11 @@ export interface GroupProps extends WidgetProps {
|
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
29
|
hideActions?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Prop to redirect the user to the group page
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
actionRedirect?: boolean;
|
|
30
35
|
/**
|
|
31
36
|
* Props to spread to the button
|
|
32
37
|
* @default {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React, { useMemo, useState } from 'react';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
-
import { Avatar, Icon, Stack } from '@mui/material';
|
|
4
|
+
import { Avatar, Button, Icon, Stack } from '@mui/material';
|
|
5
5
|
import { SCGroupPrivacyType } from '@selfcommunity/types';
|
|
6
6
|
import { Link, SCRoutes, useSCFetchGroup, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
7
|
-
import { defineMessages, useIntl } from 'react-intl';
|
|
7
|
+
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { useThemeProps } from '@mui/system';
|
|
10
10
|
import BaseItemButton from '../../shared/BaseItemButton';
|
|
@@ -67,7 +67,7 @@ export default function Group(inProps) {
|
|
|
67
67
|
props: inProps,
|
|
68
68
|
name: PREFIX
|
|
69
69
|
});
|
|
70
|
-
const { groupId = null, group = null, className = null, elevation, hideActions = false, groupSubscribeButtonProps = {} } = props, rest = __rest(props, ["groupId", "group", "className", "elevation", "hideActions", "groupSubscribeButtonProps"]);
|
|
70
|
+
const { groupId = null, group = null, className = null, elevation, hideActions = false, actionRedirect = false, groupSubscribeButtonProps = {} } = props, rest = __rest(props, ["groupId", "group", "className", "elevation", "hideActions", "actionRedirect", "groupSubscribeButtonProps"]);
|
|
71
71
|
// STATE
|
|
72
72
|
const { scGroup } = useSCFetchGroup({ id: groupId, group });
|
|
73
73
|
// CONTEXT
|
|
@@ -85,7 +85,7 @@ export default function Group(inProps) {
|
|
|
85
85
|
function renderAuthenticatedActions() {
|
|
86
86
|
return (React.createElement(Stack, { className: classes.actions, direction: "row", alignItems: "center", justifyContent: "center", spacing: 2 },
|
|
87
87
|
isGroupAdmin && React.createElement(Icon, null, "face"),
|
|
88
|
-
React.createElement(GroupSubscribeButton, Object.assign({ group: group, groupId: groupId }, groupSubscribeButtonProps))));
|
|
88
|
+
actionRedirect ? (React.createElement(Button, { size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, scGroup) }, scGroup.privacy === SCGroupPrivacyType.PUBLIC ? (React.createElement(FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.enter", id: "ui.groupSubscribeButton.enter" })) : (React.createElement(FormattedMessage, { defaultMessage: "ui.groupSubscribeButton.requestAccess", id: "ui.groupSubscribeButton.requestAccess" })))) : (React.createElement(GroupSubscribeButton, Object.assign({ group: group, groupId: groupId }, groupSubscribeButtonProps)))));
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Renders group object
|
|
@@ -90,6 +90,7 @@ const Root = styled(BaseDialog, {
|
|
|
90
90
|
* @param inProps
|
|
91
91
|
*/
|
|
92
92
|
export default function GroupForm(inProps) {
|
|
93
|
+
var _a;
|
|
93
94
|
//PROPS
|
|
94
95
|
const props = useThemeProps({
|
|
95
96
|
props: inProps,
|
|
@@ -225,7 +226,7 @@ export default function GroupForm(inProps) {
|
|
|
225
226
|
endAdornment: React.createElement(Typography, { variant: "body2" }, GROUP_TITLE_MAX_LENGTH - field.name.length)
|
|
226
227
|
} }),
|
|
227
228
|
React.createElement(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
|
|
228
|
-
endAdornment: React.createElement(Typography, { variant: "body2" }, GROUP_DESCRIPTION_MAX_LENGTH - field.description.length)
|
|
229
|
+
endAdornment: (React.createElement(Typography, { variant: "body2" }, ((_a = field.description) === null || _a === void 0 ? void 0 : _a.length) ? GROUP_DESCRIPTION_MAX_LENGTH - field.description.length : GROUP_DESCRIPTION_MAX_LENGTH))
|
|
229
230
|
} }),
|
|
230
231
|
React.createElement(Box, { className: classes.privacySection },
|
|
231
232
|
React.createElement(Typography, { variant: "h4" },
|
|
@@ -86,6 +86,7 @@ export default function GroupInviteButton(inProps) {
|
|
|
86
86
|
const [open, setOpen] = useState(false);
|
|
87
87
|
const [isSending, setIsSending] = useState(false);
|
|
88
88
|
const [value, setValue] = useState('');
|
|
89
|
+
const [suggested, setSuggested] = useState([]);
|
|
89
90
|
const [list, setList] = useState([]);
|
|
90
91
|
const [loading, setLoading] = useState(false);
|
|
91
92
|
const [invited, setInvited] = useState([]);
|
|
@@ -124,17 +125,22 @@ export default function GroupInviteButton(inProps) {
|
|
|
124
125
|
const intl = useIntl();
|
|
125
126
|
function fetchResults() {
|
|
126
127
|
setLoading(true);
|
|
127
|
-
|
|
128
|
-
if (scGroup) {
|
|
129
|
-
service = GroupService.getGroupSuggestedUsers(scGroup === null || scGroup === void 0 ? void 0 : scGroup.id, value);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
service = GroupService.getGroupsSuggestedUsers(value);
|
|
133
|
-
}
|
|
134
|
-
service
|
|
128
|
+
GroupService.getGroupSuggestedUsers(scGroup === null || scGroup === void 0 ? void 0 : scGroup.id, value)
|
|
135
129
|
.then((data) => {
|
|
136
130
|
setLoading(false);
|
|
137
|
-
|
|
131
|
+
setSuggested(data.results);
|
|
132
|
+
})
|
|
133
|
+
.catch((error) => {
|
|
134
|
+
setLoading(false);
|
|
135
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function fetchGeneralResults() {
|
|
139
|
+
setLoading(true);
|
|
140
|
+
GroupService.getGroupsSuggestedUsers(value)
|
|
141
|
+
.then((data) => {
|
|
142
|
+
setLoading(false);
|
|
143
|
+
setSuggested(data.results);
|
|
138
144
|
})
|
|
139
145
|
.catch((error) => {
|
|
140
146
|
setLoading(false);
|
|
@@ -142,8 +148,30 @@ export default function GroupInviteButton(inProps) {
|
|
|
142
148
|
});
|
|
143
149
|
}
|
|
144
150
|
useEffect(() => {
|
|
145
|
-
|
|
146
|
-
|
|
151
|
+
if (scGroup === null || scGroup === void 0 ? void 0 : scGroup.id) {
|
|
152
|
+
GroupService.getGroupSuggestedUsers(scGroup === null || scGroup === void 0 ? void 0 : scGroup.id, value).then((data) => {
|
|
153
|
+
setLoading(false);
|
|
154
|
+
setList(data.results);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
GroupService.getGroupsSuggestedUsers(value).then((data) => {
|
|
159
|
+
setLoading(false);
|
|
160
|
+
setList(data.results);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}, [scGroup === null || scGroup === void 0 ? void 0 : scGroup.id]);
|
|
164
|
+
/**
|
|
165
|
+
* If a value is entered in new message field, it fetches user suggested
|
|
166
|
+
*/
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (scGroup) {
|
|
169
|
+
fetchResults();
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
fetchGeneralResults();
|
|
173
|
+
}
|
|
174
|
+
}, [value, scGroup]);
|
|
147
175
|
/**
|
|
148
176
|
* Handles dialog close
|
|
149
177
|
*/
|
|
@@ -180,7 +208,7 @@ export default function GroupInviteButton(inProps) {
|
|
|
180
208
|
switch (reason) {
|
|
181
209
|
case 'input':
|
|
182
210
|
setValue(value);
|
|
183
|
-
!value &&
|
|
211
|
+
!value && setSuggested([]);
|
|
184
212
|
break;
|
|
185
213
|
case 'reset':
|
|
186
214
|
setValue(value);
|
|
@@ -210,6 +238,13 @@ export default function GroupInviteButton(inProps) {
|
|
|
210
238
|
setInvited(invited.filter((v) => v !== option));
|
|
211
239
|
setList((prev) => [...prev, option]);
|
|
212
240
|
};
|
|
241
|
+
const filterOptions = (options, { inputValue }) => {
|
|
242
|
+
return options.filter((option) => {
|
|
243
|
+
const usernameMatch = option.username.toLowerCase().includes(inputValue.toLowerCase());
|
|
244
|
+
const nameMatch = option.real_name.toLowerCase().includes(inputValue.toLowerCase());
|
|
245
|
+
return usernameMatch || nameMatch;
|
|
246
|
+
});
|
|
247
|
+
};
|
|
213
248
|
/**
|
|
214
249
|
* If in group edit mode and logged-in user is not also the group manager, the component is hidden.
|
|
215
250
|
// */
|
|
@@ -230,7 +265,7 @@ export default function GroupInviteButton(inProps) {
|
|
|
230
265
|
React.createElement(LoadingButton, { size: "small", color: "secondary", variant: "contained", onClick: handleSendInvitations, loading: isSending, disabled: !invited.length },
|
|
231
266
|
React.createElement(FormattedMessage, { id: "ui.groupInviteButton.dialog.button.end", defaultMessage: "ui.groupInviteButton.dialog.button.end" }))) },
|
|
232
267
|
React.createElement(Box, { className: classes.dialogContent },
|
|
233
|
-
React.createElement(Autocomplete, { className: classes.autocomplete, loading: loading, size: "small", multiple: true, freeSolo: true, disableClearable: true, options:
|
|
268
|
+
React.createElement(Autocomplete, { className: classes.autocomplete, loading: loading, size: "small", multiple: true, freeSolo: true, disableClearable: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option ? option.username : '...'), isOptionEqualToValue: (option, value) => (option ? value.id === option.id : false), renderTags: () => null, renderOption: (props, option) => (React.createElement(Box, Object.assign({ component: "li" }, props),
|
|
234
269
|
React.createElement(Avatar, { alt: option.username, src: option.avatar }),
|
|
235
270
|
React.createElement(Typography, { ml: 1 }, option.username))), renderInput: (params) => (React.createElement(TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, InputProps: Object.assign(Object.assign({}, params.InputProps), { className: classes.input, startAdornment: (React.createElement(React.Fragment, null,
|
|
236
271
|
React.createElement(InputAdornment, { position: "start" },
|
|
@@ -133,5 +133,5 @@ export default function GroupMembersButton(inProps) {
|
|
|
133
133
|
React.createElement(InfiniteScroll, { dataLength: members.length, next: fetchMembers, hasMoreNext: next !== null || loading, loaderNext: React.createElement(UserSkeleton, { elevation: 0 }), height: isMobile ? '100%' : 400, endMessage: React.createElement(Typography, { className: classes.endMessage },
|
|
134
134
|
React.createElement(FormattedMessage, { id: "ui.groupMembersButton.noOtherMembers", defaultMessage: "ui.groupMembersButton.noOtherMembers" })) },
|
|
135
135
|
React.createElement(List, null, members.map((member) => (React.createElement(ListItem, { key: member.id },
|
|
136
|
-
React.createElement(User, { elevation: 0, user: member }))))))))));
|
|
136
|
+
React.createElement(User, { elevation: 0, user: member, onClick: handleToggleDialogOpen }))))))))));
|
|
137
137
|
}
|
|
@@ -117,13 +117,6 @@ export default function Groups(inProps) {
|
|
|
117
117
|
fetchGroups();
|
|
118
118
|
}
|
|
119
119
|
}, [contentAvailability, authUserId, search]);
|
|
120
|
-
const handleSubscribe = (group) => {
|
|
121
|
-
if (!general) {
|
|
122
|
-
const newGroups = [...groups];
|
|
123
|
-
const _updated = newGroups.filter((g) => g.id !== group.id);
|
|
124
|
-
setGroups(_updated);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
120
|
const handleNext = useMemo(() => () => {
|
|
128
121
|
if (!next) {
|
|
129
122
|
return;
|
|
@@ -172,7 +165,7 @@ export default function Groups(inProps) {
|
|
|
172
165
|
button: (chunk) => (React.createElement(Button, { color: "secondary", variant: "text", onClick: handleScrollUp }, chunk))
|
|
173
166
|
} })) },
|
|
174
167
|
React.createElement(Grid, { container: true, spacing: { xs: 2 }, className: classes.groups }, filteredGroups.map((group) => (React.createElement(Grid, { item: true, xs: 12, sm: 8, md: 6, key: group.id, className: classes.item },
|
|
175
|
-
React.createElement(Group, Object.assign({ group: group, groupId: group.id,
|
|
168
|
+
React.createElement(Group, Object.assign({ group: group, groupId: group.id, actionRedirect: true }, GroupComponentProps)))))))))));
|
|
176
169
|
// RENDER
|
|
177
170
|
if (!contentAvailability && !scUserContext.user) {
|
|
178
171
|
return React.createElement(HiddenPlaceholder, null);
|
|
@@ -59,6 +59,7 @@ export interface NavigationToolbarMobileProps extends ToolbarProps {
|
|
|
59
59
|
|logo|.SCNavigationToolbarMobile-logo|Styles applied to the logo element.|
|
|
60
60
|
|search|.SCNavigationToolbarMobile-search|Styles applied to the search button element|
|
|
61
61
|
|searchDialog|.SCNavigationToolbarMobile-search-dialog|Styles applied to the search dialog element|
|
|
62
|
+
|notifications|.SCNavigationToolbarMobile-notifications|Styles applied to the notifications button element|
|
|
62
63
|
|settings|.SCNavigationToolbarMobile-settings|Styles applied to the settings button element|
|
|
63
64
|
|settingsDialog|.SCNavigationToolbarMobile-settingsDialog|Styles applied to the settings dialog elements|
|
|
64
65
|
|login|.SCNavigationToolbarMobile-login|Styles applied to the login element.|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import { Button, IconButton, styled, Toolbar } from '@mui/material';
|
|
3
|
-
import React, { useCallback, useState } from 'react';
|
|
2
|
+
import { Badge, Button, IconButton, styled, Toolbar } from '@mui/material';
|
|
3
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import { Link, SCPreferences, SCRoutes, useSCPreferences, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
5
5
|
import Icon from '@mui/material/Icon';
|
|
6
6
|
import { useThemeProps } from '@mui/system';
|
|
@@ -11,11 +11,13 @@ import SearchDialog from '../SearchDialog';
|
|
|
11
11
|
import NavigationSettingsIconButton from '../NavigationSettingsIconButton';
|
|
12
12
|
import NavigationMenuIconButton from '../NavigationMenuIconButton';
|
|
13
13
|
import { PREFIX } from './constants';
|
|
14
|
+
import { SCFeatureName } from '@selfcommunity/types';
|
|
14
15
|
const classes = {
|
|
15
16
|
root: `${PREFIX}-root`,
|
|
16
17
|
logo: `${PREFIX}-logo`,
|
|
17
18
|
search: `${PREFIX}-search`,
|
|
18
19
|
searchDialog: `${PREFIX}-search-dialog`,
|
|
20
|
+
notifications: `${PREFIX}-notifications`,
|
|
19
21
|
settings: `${PREFIX}-settings`,
|
|
20
22
|
settingsDialog: `${PREFIX}-settings-dialog`,
|
|
21
23
|
login: `${PREFIX}-login`
|
|
@@ -50,6 +52,7 @@ const Root = styled(Toolbar, {
|
|
|
50
52
|
|logo|.SCNavigationToolbarMobile-logo|Styles applied to the logo element.|
|
|
51
53
|
|search|.SCNavigationToolbarMobile-search|Styles applied to the search button element|
|
|
52
54
|
|searchDialog|.SCNavigationToolbarMobile-search-dialog|Styles applied to the search dialog element|
|
|
55
|
+
|notifications|.SCNavigationToolbarMobile-notifications|Styles applied to the notifications button element|
|
|
53
56
|
|settings|.SCNavigationToolbarMobile-settings|Styles applied to the settings button element|
|
|
54
57
|
|settingsDialog|.SCNavigationToolbarMobile-settingsDialog|Styles applied to the settings dialog elements|
|
|
55
58
|
|login|.SCNavigationToolbarMobile-login|Styles applied to the login element.|
|
|
@@ -67,9 +70,11 @@ export default function NavigationToolbarMobile(inProps) {
|
|
|
67
70
|
const scUserContext = useSCUser();
|
|
68
71
|
const scRoutingContext = useSCRouting();
|
|
69
72
|
// PREFERENCES
|
|
70
|
-
const { preferences } = useSCPreferences();
|
|
73
|
+
const { preferences, features } = useSCPreferences();
|
|
71
74
|
// STATE
|
|
72
75
|
const [searchOpen, setSearchOpen] = useState(false);
|
|
76
|
+
// MEMO
|
|
77
|
+
const groupsEnabled = useMemo(() => features.includes(SCFeatureName.GROUPING), [features]);
|
|
73
78
|
// HANDLERS
|
|
74
79
|
const handleOpenSearch = useCallback(() => {
|
|
75
80
|
setSearchOpen(true);
|
|
@@ -92,6 +97,9 @@ export default function NavigationToolbarMobile(inProps) {
|
|
|
92
97
|
React.createElement(Icon, null, "search")),
|
|
93
98
|
React.createElement(SearchDialog, { className: classes.searchDialog, fullScreen: true, open: searchOpen, SearchAutocompleteProps: Object.assign(Object.assign({}, SearchAutocompleteProps), { onClear: handleCloseSearch }) }))),
|
|
94
99
|
endActions,
|
|
100
|
+
scUserContext.user && groupsEnabled && (React.createElement(IconButton, { className: classes.notifications, component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) },
|
|
101
|
+
React.createElement(Badge, { badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" },
|
|
102
|
+
React.createElement(Icon, null, "notifications_active")))),
|
|
95
103
|
scUserContext.user ? (React.createElement(NavigationSettingsIconButtonComponent, { className: classes.settings })) : (React.createElement(Button, { className: classes.login, color: "inherit", component: Link, to: scRoutingContext.url(SCRoutes.SIGNIN_ROUTE_NAME, {}) },
|
|
96
104
|
React.createElement(FormattedMessage, { id: "ui.appBar.navigation.login", defaultMessage: "ui.appBar.navigation.login" })))));
|
|
97
105
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* > API documentation for the Community-JS User Profile Categories Followed Widget Skeleton component. Learn about the available props and the CSS API.
|
|
3
|
+
|
|
4
|
+
#### Import
|
|
5
|
+
|
|
6
|
+
```jsx
|
|
7
|
+
import {UserSubscribedGroupsWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
#### Component Name
|
|
11
|
+
|
|
12
|
+
The name `SCUserCategoriesFollowedWidget-skeleton-root` can be used when providing style overrides in the theme.
|
|
13
|
+
|
|
14
|
+
#### CSS
|
|
15
|
+
|
|
16
|
+
|Rule Name|Global class|Description|
|
|
17
|
+
|---|---|---|
|
|
18
|
+
|root|.SCUserSubscribedGroupsWidget-skeleton-root|Styles applied to the root element.|
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export default function UserSubscribedGroupsWidgetSkeleton(props: any): JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Widget from '../Widget';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { CardContent, ListItem } from '@mui/material';
|
|
5
|
+
import List from '@mui/material/List';
|
|
6
|
+
import GroupSkeleton from '../Group/Skeleton';
|
|
7
|
+
const PREFIX = 'SCUserSubscribedGroupsWidgetSkeleton';
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${PREFIX}-skeleton-root`,
|
|
10
|
+
list: `${PREFIX}-list`
|
|
11
|
+
};
|
|
12
|
+
const Root = styled(Widget, {
|
|
13
|
+
name: PREFIX,
|
|
14
|
+
slot: 'SkeletonRoot'
|
|
15
|
+
})(() => ({}));
|
|
16
|
+
/**
|
|
17
|
+
* > API documentation for the Community-JS User Profile Categories Followed Widget Skeleton component. Learn about the available props and the CSS API.
|
|
18
|
+
|
|
19
|
+
#### Import
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import {UserSubscribedGroupsWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
#### Component Name
|
|
26
|
+
|
|
27
|
+
The name `SCUserCategoriesFollowedWidget-skeleton-root` can be used when providing style overrides in the theme.
|
|
28
|
+
|
|
29
|
+
#### CSS
|
|
30
|
+
|
|
31
|
+
|Rule Name|Global class|Description|
|
|
32
|
+
|---|---|---|
|
|
33
|
+
|root|.SCUserSubscribedGroupsWidget-skeleton-root|Styles applied to the root element.|
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export default function UserSubscribedGroupsWidgetSkeleton(props) {
|
|
37
|
+
return (React.createElement(Root, Object.assign({ className: classes.root }, props),
|
|
38
|
+
React.createElement(CardContent, null,
|
|
39
|
+
React.createElement(List, { className: classes.list }, [...Array(3)].map((category, index) => (React.createElement(ListItem, { key: index },
|
|
40
|
+
React.createElement(GroupSkeleton, { elevation: 0 })))))),
|
|
41
|
+
");"));
|
|
42
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CacheStrategies } from '@selfcommunity/utils';
|
|
2
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
3
|
+
import { WidgetProps } from '../Widget';
|
|
4
|
+
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
|
|
5
|
+
import { GroupProps } from '../Group';
|
|
6
|
+
export interface UserSubscribedGroupsWidgetProps extends VirtualScrollerItemProps, WidgetProps {
|
|
7
|
+
/**
|
|
8
|
+
* The user id
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
userId: number;
|
|
12
|
+
/**
|
|
13
|
+
* Hides this component
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
autoHide?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Limit the number of groups to show
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
limit?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Props to spread to single group object
|
|
24
|
+
* @default empty object
|
|
25
|
+
*/
|
|
26
|
+
GroupProps?: GroupProps;
|
|
27
|
+
/**
|
|
28
|
+
* Caching strategies
|
|
29
|
+
* @default CacheStrategies.CACHE_FIRST
|
|
30
|
+
*/
|
|
31
|
+
cacheStrategy?: CacheStrategies;
|
|
32
|
+
/**
|
|
33
|
+
* Props to spread to subscribed groups dialog
|
|
34
|
+
* @default {}
|
|
35
|
+
*/
|
|
36
|
+
DialogProps?: BaseDialogProps;
|
|
37
|
+
/**
|
|
38
|
+
* Other props
|
|
39
|
+
*/
|
|
40
|
+
[p: string]: any;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* > API documentation for the Community-JS User Profile Groups Subscribed Widget component. Learn about the available props and the CSS API.
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* This component renders the list of the groups that the given user follows.
|
|
47
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserSubscribedGroups)
|
|
48
|
+
|
|
49
|
+
#### Import
|
|
50
|
+
```jsx
|
|
51
|
+
import {UserSubscribedGroupsWidget} from '@selfcommunity/react-ui';
|
|
52
|
+
```
|
|
53
|
+
#### Component Name
|
|
54
|
+
The name `SCUserSubscribedGroupsWidget` can be used when providing style overrides in the theme.
|
|
55
|
+
|
|
56
|
+
#### CSS
|
|
57
|
+
|
|
58
|
+
|Rule Name|Global class|Description|
|
|
59
|
+
|---|---|---|
|
|
60
|
+
|root|.SCUserSubscribedGroupsWidget-root|Styles applied to the root element.|
|
|
61
|
+
|title|.SCUserSubscribedGroupsWidget-title|Styles applied to the title element.|
|
|
62
|
+
|noResults|.SCUserSubscribedGroupsWidget-no-results|Styles applied to no results section.|
|
|
63
|
+
|showMore|.SCUserSubscribedGroupsWidget-show-more|Styles applied to show more button element.|
|
|
64
|
+
|dialogRoot|.SCUserSubscribedGroupsWidget-dialog-root|Styles applied to the root dialog element.|
|
|
65
|
+
|endMessage|.SCUserSubscribedGroupsWidget-end-message|Styles applied to the end message element.|
|
|
66
|
+
* @param inProps
|
|
67
|
+
*/
|
|
68
|
+
export default function UserSubscribedGroupsWidget(inProps: UserSubscribedGroupsWidgetProps): JSX.Element;
|