@selfcommunity/react-ui 0.7.9-alpha.1 → 0.7.9-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.d.ts +55 -0
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +117 -0
- package/lib/cjs/components/ChangeGroupCover/constants.d.ts +1 -0
- package/lib/cjs/components/ChangeGroupCover/constants.js +4 -0
- package/lib/cjs/components/ChangeGroupCover/index.d.ts +3 -0
- package/lib/cjs/components/ChangeGroupCover/index.js +5 -0
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.d.ts +57 -0
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +117 -0
- package/lib/cjs/components/ChangeGroupPicture/constants.d.ts +1 -0
- package/lib/cjs/components/ChangeGroupPicture/constants.js +4 -0
- package/lib/cjs/components/ChangeGroupPicture/index.d.ts +3 -0
- package/lib/cjs/components/ChangeGroupPicture/index.js +5 -0
- package/lib/cjs/components/CreateGroup/CreateGroup.d.ts +48 -0
- package/lib/cjs/components/CreateGroup/CreateGroup.js +187 -0
- package/lib/cjs/components/CreateGroup/constants.d.ts +1 -0
- package/lib/cjs/components/CreateGroup/constants.js +4 -0
- package/lib/cjs/components/CreateGroup/index.d.ts +3 -0
- package/lib/cjs/components/CreateGroup/index.js +5 -0
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.d.ts +38 -0
- package/lib/cjs/components/CreateGroupButton/CreateGroupButton.js +73 -0
- package/lib/cjs/components/CreateGroupButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateGroupButton/index.js +5 -0
- package/lib/cjs/components/Group/Group.d.ts +67 -0
- package/lib/cjs/components/Group/Group.js +96 -0
- package/lib/cjs/components/Group/Skeleton.d.ts +22 -0
- package/lib/cjs/components/Group/Skeleton.js +42 -0
- package/lib/cjs/components/Group/constants.d.ts +1 -0
- package/lib/cjs/components/Group/constants.js +4 -0
- package/lib/cjs/components/Group/index.d.ts +4 -0
- package/lib/cjs/components/Group/index.js +8 -0
- package/lib/cjs/components/GroupHeader/GroupHeader.d.ts +83 -0
- package/lib/cjs/components/GroupHeader/GroupHeader.js +137 -0
- package/lib/cjs/components/GroupHeader/Skeleton.d.ts +27 -0
- package/lib/cjs/components/GroupHeader/Skeleton.js +56 -0
- package/lib/cjs/components/GroupHeader/constants.d.ts +1 -0
- package/lib/cjs/components/GroupHeader/constants.js +4 -0
- package/lib/cjs/components/GroupHeader/index.d.ts +4 -0
- package/lib/cjs/components/GroupHeader/index.js +8 -0
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.d.ts +52 -0
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +100 -0
- package/lib/cjs/components/GroupInfoWidget/Skeleton.d.ts +21 -0
- package/lib/cjs/components/GroupInfoWidget/Skeleton.js +38 -0
- package/lib/cjs/components/GroupInfoWidget/constants.d.ts +1 -0
- package/lib/cjs/components/GroupInfoWidget/constants.js +4 -0
- package/lib/cjs/components/GroupInfoWidget/index.d.ts +4 -0
- package/lib/cjs/components/GroupInfoWidget/index.js +8 -0
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.d.ts +57 -0
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +259 -0
- package/lib/cjs/components/GroupInviteButton/index.d.ts +3 -0
- package/lib/cjs/components/GroupInviteButton/index.js +5 -0
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.d.ts +46 -0
- package/lib/cjs/components/GroupMembersButton/GroupMembersButton.js +135 -0
- package/lib/cjs/components/GroupMembersButton/index.d.ts +3 -0
- package/lib/cjs/components/GroupMembersButton/index.js +5 -0
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.d.ts +79 -0
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +194 -0
- package/lib/cjs/components/GroupMembersWidget/Skeleton.d.ts +22 -0
- package/lib/cjs/components/GroupMembersWidget/Skeleton.js +38 -0
- package/lib/cjs/components/GroupMembersWidget/constants.d.ts +1 -0
- package/lib/cjs/components/GroupMembersWidget/constants.js +4 -0
- package/lib/cjs/components/GroupMembersWidget/index.d.ts +4 -0
- package/lib/cjs/components/GroupMembersWidget/index.js +8 -0
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +79 -0
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +194 -0
- package/lib/cjs/components/GroupRequestsWidget/Skeleton.d.ts +22 -0
- package/lib/cjs/components/GroupRequestsWidget/Skeleton.js +38 -0
- package/lib/cjs/components/GroupRequestsWidget/constants.d.ts +1 -0
- package/lib/cjs/components/GroupRequestsWidget/constants.js +4 -0
- package/lib/cjs/components/GroupRequestsWidget/index.d.ts +4 -0
- package/lib/cjs/components/GroupRequestsWidget/index.js +8 -0
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +51 -0
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +117 -0
- package/lib/cjs/components/GroupSubscribeButton/index.d.ts +3 -0
- package/lib/cjs/components/GroupSubscribeButton/index.js +5 -0
- package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.d.ts +4 -0
- package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.js +2 -3
- package/lib/cjs/components/User/User.d.ts +12 -0
- package/lib/cjs/components/User/User.js +5 -3
- package/lib/cjs/constants/Group.d.ts +2 -0
- package/lib/cjs/constants/Group.js +5 -0
- package/lib/cjs/index.d.ts +13 -1
- package/lib/cjs/index.js +30 -2
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.d.ts +55 -0
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +114 -0
- package/lib/esm/components/ChangeGroupCover/constants.d.ts +1 -0
- package/lib/esm/components/ChangeGroupCover/constants.js +1 -0
- package/lib/esm/components/ChangeGroupCover/index.d.ts +3 -0
- package/lib/esm/components/ChangeGroupCover/index.js +2 -0
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.d.ts +57 -0
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +114 -0
- package/lib/esm/components/ChangeGroupPicture/constants.d.ts +1 -0
- package/lib/esm/components/ChangeGroupPicture/constants.js +1 -0
- package/lib/esm/components/ChangeGroupPicture/index.d.ts +3 -0
- package/lib/esm/components/ChangeGroupPicture/index.js +2 -0
- package/lib/esm/components/CreateGroup/CreateGroup.d.ts +48 -0
- package/lib/esm/components/CreateGroup/CreateGroup.js +184 -0
- package/lib/esm/components/CreateGroup/constants.d.ts +1 -0
- package/lib/esm/components/CreateGroup/constants.js +1 -0
- package/lib/esm/components/CreateGroup/index.d.ts +3 -0
- package/lib/esm/components/CreateGroup/index.js +2 -0
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.d.ts +38 -0
- package/lib/esm/components/CreateGroupButton/CreateGroupButton.js +70 -0
- package/lib/esm/components/CreateGroupButton/index.d.ts +3 -0
- package/lib/esm/components/CreateGroupButton/index.js +2 -0
- package/lib/esm/components/Group/Group.d.ts +67 -0
- package/lib/esm/components/Group/Group.js +93 -0
- package/lib/esm/components/Group/Skeleton.d.ts +22 -0
- package/lib/esm/components/Group/Skeleton.js +38 -0
- package/lib/esm/components/Group/constants.d.ts +1 -0
- package/lib/esm/components/Group/constants.js +1 -0
- package/lib/esm/components/Group/index.d.ts +4 -0
- package/lib/esm/components/Group/index.js +4 -0
- package/lib/esm/components/GroupHeader/GroupHeader.d.ts +83 -0
- package/lib/esm/components/GroupHeader/GroupHeader.js +134 -0
- package/lib/esm/components/GroupHeader/Skeleton.d.ts +27 -0
- package/lib/esm/components/GroupHeader/Skeleton.js +53 -0
- package/lib/esm/components/GroupHeader/constants.d.ts +1 -0
- package/lib/esm/components/GroupHeader/constants.js +1 -0
- package/lib/esm/components/GroupHeader/index.d.ts +4 -0
- package/lib/esm/components/GroupHeader/index.js +4 -0
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.d.ts +52 -0
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +97 -0
- package/lib/esm/components/GroupInfoWidget/Skeleton.d.ts +21 -0
- package/lib/esm/components/GroupInfoWidget/Skeleton.js +34 -0
- package/lib/esm/components/GroupInfoWidget/constants.d.ts +1 -0
- package/lib/esm/components/GroupInfoWidget/constants.js +1 -0
- package/lib/esm/components/GroupInfoWidget/index.d.ts +4 -0
- package/lib/esm/components/GroupInfoWidget/index.js +4 -0
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.d.ts +57 -0
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +256 -0
- package/lib/esm/components/GroupInviteButton/index.d.ts +3 -0
- package/lib/esm/components/GroupInviteButton/index.js +2 -0
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.d.ts +46 -0
- package/lib/esm/components/GroupMembersButton/GroupMembersButton.js +132 -0
- package/lib/esm/components/GroupMembersButton/index.d.ts +3 -0
- package/lib/esm/components/GroupMembersButton/index.js +2 -0
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.d.ts +79 -0
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +191 -0
- package/lib/esm/components/GroupMembersWidget/Skeleton.d.ts +22 -0
- package/lib/esm/components/GroupMembersWidget/Skeleton.js +34 -0
- package/lib/esm/components/GroupMembersWidget/constants.d.ts +1 -0
- package/lib/esm/components/GroupMembersWidget/constants.js +1 -0
- package/lib/esm/components/GroupMembersWidget/index.d.ts +4 -0
- package/lib/esm/components/GroupMembersWidget/index.js +4 -0
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +79 -0
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +191 -0
- package/lib/esm/components/GroupRequestsWidget/Skeleton.d.ts +22 -0
- package/lib/esm/components/GroupRequestsWidget/Skeleton.js +34 -0
- package/lib/esm/components/GroupRequestsWidget/constants.d.ts +1 -0
- package/lib/esm/components/GroupRequestsWidget/constants.js +1 -0
- package/lib/esm/components/GroupRequestsWidget/index.d.ts +4 -0
- package/lib/esm/components/GroupRequestsWidget/index.js +4 -0
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +51 -0
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +114 -0
- package/lib/esm/components/GroupSubscribeButton/index.d.ts +3 -0
- package/lib/esm/components/GroupSubscribeButton/index.js +2 -0
- package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.d.ts +4 -0
- package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.js +3 -4
- package/lib/esm/components/User/User.d.ts +12 -0
- package/lib/esm/components/User/User.js +5 -3
- package/lib/esm/constants/Group.d.ts +2 -0
- package/lib/esm/constants/Group.js +2 -0
- package/lib/esm/index.d.ts +13 -1
- package/lib/esm/index.js +13 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +6 -6
package/lib/cjs/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
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
|
-
exports.
|
|
6
|
-
exports.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.bytesToSize = 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 = void 0;
|
|
5
|
+
exports.UsernameTextField = exports.UrlTextField = exports.GroupRequestsWidgetSkeleton = exports.GroupRequestsWidget = exports.GroupMembersWidgetSkeleton = exports.GroupMembersWidget = exports.GroupSubscribeButton = exports.Group = exports.GroupInfoWidgetSkeleton = exports.GroupInfoWidget = exports.GroupInviteButton = exports.CreateButton = 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.BaseDialog = exports.BaseItem = exports.FooterSkeleton = exports.Footer = exports.getRelativeTime = exports.MessageUploaderUtils = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.bytesToSize = 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 = void 0;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
/**
|
|
9
9
|
* Components
|
|
@@ -273,6 +273,34 @@ exports.PrivateMessageSettingsIconButton = PrivateMessageSettingsIconButton_1.de
|
|
|
273
273
|
const PrivateMessageComponent_1 = tslib_1.__importStar(require("./components/PrivateMessageComponent"));
|
|
274
274
|
exports.PrivateMessageComponent = PrivateMessageComponent_1.default;
|
|
275
275
|
Object.defineProperty(exports, "PrivateMessageComponentSkeleton", { enumerable: true, get: function () { return PrivateMessageComponent_1.PrivateMessageComponentSkeleton; } });
|
|
276
|
+
const ChangeGroupCover_1 = tslib_1.__importDefault(require("./components/ChangeGroupCover"));
|
|
277
|
+
exports.ChangeGroupCover = ChangeGroupCover_1.default;
|
|
278
|
+
const ChangeGroupPicture_1 = tslib_1.__importDefault(require("./components/ChangeGroupPicture"));
|
|
279
|
+
exports.ChangeGroupPicture = ChangeGroupPicture_1.default;
|
|
280
|
+
const GroupHeader_1 = tslib_1.__importStar(require("./components/GroupHeader"));
|
|
281
|
+
exports.GroupHeader = GroupHeader_1.default;
|
|
282
|
+
Object.defineProperty(exports, "GroupHeaderSkeleton", { enumerable: true, get: function () { return GroupHeader_1.GroupHeaderSkeleton; } });
|
|
283
|
+
const GroupMembersButton_1 = tslib_1.__importDefault(require("./components/GroupMembersButton"));
|
|
284
|
+
exports.GroupMembersButton = GroupMembersButton_1.default;
|
|
285
|
+
const CreateGroupButton_1 = tslib_1.__importDefault(require("./components/CreateGroupButton"));
|
|
286
|
+
exports.CreateGroupButton = CreateGroupButton_1.default;
|
|
287
|
+
const CreateGroupButton_2 = tslib_1.__importDefault(require("./components/CreateGroupButton"));
|
|
288
|
+
exports.CreateButton = CreateGroupButton_2.default;
|
|
289
|
+
const GroupInviteButton_1 = tslib_1.__importDefault(require("./components/GroupInviteButton"));
|
|
290
|
+
exports.GroupInviteButton = GroupInviteButton_1.default;
|
|
291
|
+
const GroupInfoWidget_1 = tslib_1.__importStar(require("./components/GroupInfoWidget"));
|
|
292
|
+
exports.GroupInfoWidget = GroupInfoWidget_1.default;
|
|
293
|
+
Object.defineProperty(exports, "GroupInfoWidgetSkeleton", { enumerable: true, get: function () { return GroupInfoWidget_1.GroupInfoWidgetSkeleton; } });
|
|
294
|
+
const Group_1 = tslib_1.__importDefault(require("./components/Group"));
|
|
295
|
+
exports.Group = Group_1.default;
|
|
296
|
+
const GroupSubscribeButton_1 = tslib_1.__importDefault(require("./components/GroupSubscribeButton"));
|
|
297
|
+
exports.GroupSubscribeButton = GroupSubscribeButton_1.default;
|
|
298
|
+
const GroupMembersWidget_1 = tslib_1.__importStar(require("./components/GroupMembersWidget"));
|
|
299
|
+
exports.GroupMembersWidget = GroupMembersWidget_1.default;
|
|
300
|
+
Object.defineProperty(exports, "GroupMembersWidgetSkeleton", { enumerable: true, get: function () { return GroupMembersWidget_1.GroupMembersWidgetSkeleton; } });
|
|
301
|
+
const GroupRequestsWidget_1 = tslib_1.__importStar(require("./components/GroupRequestsWidget"));
|
|
302
|
+
exports.GroupRequestsWidget = GroupRequestsWidget_1.default;
|
|
303
|
+
Object.defineProperty(exports, "GroupRequestsWidgetSkeleton", { enumerable: true, get: function () { return GroupRequestsWidget_1.GroupRequestsWidgetSkeleton; } });
|
|
276
304
|
/**
|
|
277
305
|
* Constants
|
|
278
306
|
*/
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface ChangeGroupCoverProps {
|
|
2
|
+
/**
|
|
3
|
+
* Id of the group. It is optional only for group creation modal.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
groupId?: number;
|
|
7
|
+
/**
|
|
8
|
+
* On change function.
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
onChange?: (cover: any) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Hides this component
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
autoHide?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Overrides or extends the styles applied to the component.
|
|
19
|
+
* @default null
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Prop to handle cover loading in the create group modal.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
isCreationMode?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Any other properties
|
|
29
|
+
*/
|
|
30
|
+
[p: string]: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* > API documentation for the Community-JS Change Group Cover component. Learn about the available props and the CSS API.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* This component renders a button that allows admins to edit the group cover and a popover that specifies format and sizes allowed.
|
|
37
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/ChangeGroupCover)
|
|
38
|
+
|
|
39
|
+
#### Import
|
|
40
|
+
```jsx
|
|
41
|
+
import {ChangeGroupCover} from '@selfcommunity/react-ui';
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Component Name
|
|
45
|
+
The name `SCChangeGroupCoverButton` can be used when providing style overrides in the theme.
|
|
46
|
+
|
|
47
|
+
#### CSS
|
|
48
|
+
|
|
49
|
+
|Rule Name|Global class|Description|
|
|
50
|
+
|---|---|---|
|
|
51
|
+
|root|.SCChangeGroupCoverButton-root|Styles applied to the root element.|
|
|
52
|
+
|
|
53
|
+
* @param inProps
|
|
54
|
+
*/
|
|
55
|
+
export default function ChangeGroupCover(inProps: ChangeGroupCoverProps): JSX.Element;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React, { useContext, useRef, useState } from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Alert } from '@mui/material';
|
|
5
|
+
import { SCUserContext } from '@selfcommunity/react-core';
|
|
6
|
+
import Icon from '@mui/material/Icon';
|
|
7
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { useThemeProps } from '@mui/system';
|
|
10
|
+
import { PREFIX } from './constants';
|
|
11
|
+
import { LoadingButton } from '@mui/lab';
|
|
12
|
+
import { GroupService } from '@selfcommunity/api-services';
|
|
13
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
14
|
+
import { Logger } from '@selfcommunity/utils';
|
|
15
|
+
const classes = {
|
|
16
|
+
root: `${PREFIX}-root`
|
|
17
|
+
};
|
|
18
|
+
const Root = styled(LoadingButton, {
|
|
19
|
+
name: PREFIX,
|
|
20
|
+
slot: 'Root'
|
|
21
|
+
})(() => ({}));
|
|
22
|
+
const messages = defineMessages({
|
|
23
|
+
errorLoadImage: {
|
|
24
|
+
id: 'ui.changeGroupCover.button.change.alertErrorImage',
|
|
25
|
+
defaultMessage: 'ui.changeGroupCover.button.change.alertErrorImage'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* > API documentation for the Community-JS Change Group Cover component. Learn about the available props and the CSS API.
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* This component renders a button that allows admins to edit the group cover and a popover that specifies format and sizes allowed.
|
|
33
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/ChangeGroupCover)
|
|
34
|
+
|
|
35
|
+
#### Import
|
|
36
|
+
```jsx
|
|
37
|
+
import {ChangeGroupCover} from '@selfcommunity/react-ui';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Component Name
|
|
41
|
+
The name `SCChangeGroupCoverButton` can be used when providing style overrides in the theme.
|
|
42
|
+
|
|
43
|
+
#### CSS
|
|
44
|
+
|
|
45
|
+
|Rule Name|Global class|Description|
|
|
46
|
+
|---|---|---|
|
|
47
|
+
|root|.SCChangeGroupCoverButton-root|Styles applied to the root element.|
|
|
48
|
+
|
|
49
|
+
* @param inProps
|
|
50
|
+
*/
|
|
51
|
+
export default function ChangeGroupCover(inProps) {
|
|
52
|
+
//PROPS
|
|
53
|
+
const props = useThemeProps({
|
|
54
|
+
props: inProps,
|
|
55
|
+
name: PREFIX
|
|
56
|
+
});
|
|
57
|
+
const { groupId, onChange, autoHide, className, isCreationMode = false } = props, rest = __rest(props, ["groupId", "onChange", "autoHide", "className", "isCreationMode"]);
|
|
58
|
+
//CONTEXT
|
|
59
|
+
const scUserContext = useContext(SCUserContext);
|
|
60
|
+
//STATE
|
|
61
|
+
let fileInput = useRef(null);
|
|
62
|
+
const [loading, setLoading] = useState(false);
|
|
63
|
+
const [alert, setAlert] = useState(null);
|
|
64
|
+
// INTL
|
|
65
|
+
const intl = useIntl();
|
|
66
|
+
// Anonymous
|
|
67
|
+
if (!scUserContext.user) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Handles file upload
|
|
72
|
+
* @param event
|
|
73
|
+
*/
|
|
74
|
+
const handleUpload = (event) => {
|
|
75
|
+
fileInput = event.target.files[0];
|
|
76
|
+
isCreationMode ? onChange && onChange(fileInput) : handleSave();
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Handles cover saving after upload action
|
|
80
|
+
*/
|
|
81
|
+
function handleSave() {
|
|
82
|
+
setLoading(true);
|
|
83
|
+
const formData = new FormData();
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
formData.append('emotional_image_original', fileInput);
|
|
87
|
+
GroupService.changeGroupAvatarOrCover(groupId, formData, { headers: { 'Content-Type': 'multipart/form-data' } })
|
|
88
|
+
.then((data) => {
|
|
89
|
+
onChange && onChange(data.emotional_image);
|
|
90
|
+
setLoading(false);
|
|
91
|
+
})
|
|
92
|
+
.catch((error) => {
|
|
93
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
94
|
+
setLoading(false);
|
|
95
|
+
setAlert(intl.formatMessage(messages.errorLoadImage));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* If there is an error
|
|
100
|
+
*/
|
|
101
|
+
if (alert) {
|
|
102
|
+
return (React.createElement(Alert, { color: "error", onClose: () => setAlert(null) }, alert));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Renders root object (if not hidden by autoHide prop)
|
|
106
|
+
*/
|
|
107
|
+
if (!autoHide) {
|
|
108
|
+
return (React.createElement(React.Fragment, null,
|
|
109
|
+
React.createElement("input", { type: "file", onChange: handleUpload, ref: fileInput, hidden: true, accept: ".gif,.png,.jpg,.jpeg" }),
|
|
110
|
+
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), size: "medium", variant: "contained", disabled: loading, onClick: () => fileInput.current.click(), loading: loading }, rest),
|
|
111
|
+
React.createElement(Icon, null, "image"))));
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCChangeGroupCoverButton";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCChangeGroupCoverButton';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface ChangeGroupPictureProps {
|
|
2
|
+
/**
|
|
3
|
+
* Id of the group. It is optional only for group creation modal.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
groupId?: number;
|
|
7
|
+
/**
|
|
8
|
+
* On change function.
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
onChange?: (cover: any) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Hides this component
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
autoHide?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Overrides or extends the styles applied to the component.
|
|
19
|
+
* @default null
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Prop to handle avatar loading in the create group modal.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
isCreationMode?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Any other properties
|
|
29
|
+
*/
|
|
30
|
+
[p: string]: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* > API documentation for the Community-JS Change Group Picture component. Learn about the available props and the CSS API.
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
* This component renders a button that allows admins to manage their group pictures.
|
|
37
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/ChangeGroupPicture)
|
|
38
|
+
|
|
39
|
+
#### Import
|
|
40
|
+
|
|
41
|
+
```jsx
|
|
42
|
+
import {ChangeGroupPicture} from '@selfcommunity/react-ui';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Component Name
|
|
46
|
+
|
|
47
|
+
The name `SCChangeGroupPictureButton` can be used when providing style overrides in the theme.
|
|
48
|
+
|
|
49
|
+
#### CSS
|
|
50
|
+
|
|
51
|
+
|Rule Name|Global class|Description|
|
|
52
|
+
|---|---|---|
|
|
53
|
+
|root|.SCChangeGroupPictureButton-root|Styles applied to the root element.|
|
|
54
|
+
|
|
55
|
+
* @param inProps
|
|
56
|
+
*/
|
|
57
|
+
export default function ChangeGroupPicture(inProps: ChangeGroupPictureProps): JSX.Element;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React, { useContext, useRef, useState } from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Alert } from '@mui/material';
|
|
5
|
+
import Icon from '@mui/material/Icon';
|
|
6
|
+
import { SCUserContext } from '@selfcommunity/react-core';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import { useThemeProps } from '@mui/system';
|
|
9
|
+
import { PREFIX } from './constants';
|
|
10
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
11
|
+
import { GroupService } from '@selfcommunity/api-services';
|
|
12
|
+
import { Logger } from '@selfcommunity/utils';
|
|
13
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
14
|
+
import { LoadingButton } from '@mui/lab';
|
|
15
|
+
const messages = defineMessages({
|
|
16
|
+
errorLoadImage: {
|
|
17
|
+
id: 'ui.changeGroupCover.button.change.alertErrorImage',
|
|
18
|
+
defaultMessage: 'ui.changeGroupCover.button.change.alertErrorImage'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const classes = {
|
|
22
|
+
root: `${PREFIX}-root`
|
|
23
|
+
};
|
|
24
|
+
const Root = styled(LoadingButton, {
|
|
25
|
+
name: PREFIX,
|
|
26
|
+
slot: 'Root'
|
|
27
|
+
})(() => ({}));
|
|
28
|
+
/**
|
|
29
|
+
* > API documentation for the Community-JS Change Group Picture component. Learn about the available props and the CSS API.
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* This component renders a button that allows admins to manage their group pictures.
|
|
33
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/ChangeGroupPicture)
|
|
34
|
+
|
|
35
|
+
#### Import
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import {ChangeGroupPicture} from '@selfcommunity/react-ui';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Component Name
|
|
42
|
+
|
|
43
|
+
The name `SCChangeGroupPictureButton` can be used when providing style overrides in the theme.
|
|
44
|
+
|
|
45
|
+
#### CSS
|
|
46
|
+
|
|
47
|
+
|Rule Name|Global class|Description|
|
|
48
|
+
|---|---|---|
|
|
49
|
+
|root|.SCChangeGroupPictureButton-root|Styles applied to the root element.|
|
|
50
|
+
|
|
51
|
+
* @param inProps
|
|
52
|
+
*/
|
|
53
|
+
export default function ChangeGroupPicture(inProps) {
|
|
54
|
+
//PROPS
|
|
55
|
+
const props = useThemeProps({
|
|
56
|
+
props: inProps,
|
|
57
|
+
name: PREFIX
|
|
58
|
+
});
|
|
59
|
+
const { groupId, onChange, autoHide, className, isCreationMode = false } = props, rest = __rest(props, ["groupId", "onChange", "autoHide", "className", "isCreationMode"]);
|
|
60
|
+
//STATE
|
|
61
|
+
const [loading, setLoading] = useState(false);
|
|
62
|
+
const [alert, setAlert] = useState(null);
|
|
63
|
+
let fileInput = useRef(null);
|
|
64
|
+
//CONTEXT
|
|
65
|
+
const scUserContext = useContext(SCUserContext);
|
|
66
|
+
// INTL
|
|
67
|
+
const intl = useIntl();
|
|
68
|
+
// Anonymous
|
|
69
|
+
if (!scUserContext.user) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Handles avatar upload
|
|
74
|
+
* @param event
|
|
75
|
+
*/
|
|
76
|
+
function handleUpload(event) {
|
|
77
|
+
fileInput = event.target.files[0];
|
|
78
|
+
isCreationMode ? onChange && onChange(fileInput) : handleSave();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Performs save avatar after upload
|
|
82
|
+
*/
|
|
83
|
+
function handleSave() {
|
|
84
|
+
setLoading(true);
|
|
85
|
+
const formData = new FormData();
|
|
86
|
+
formData.append('image_original', fileInput);
|
|
87
|
+
GroupService.changeGroupAvatarOrCover(groupId, formData, { headers: { 'Content-Type': 'multipart/form-data' } })
|
|
88
|
+
.then((data) => {
|
|
89
|
+
setLoading(false);
|
|
90
|
+
onChange && onChange(data.image_bigger);
|
|
91
|
+
})
|
|
92
|
+
.catch((error) => {
|
|
93
|
+
setAlert(intl.formatMessage(messages.errorLoadImage));
|
|
94
|
+
setLoading(false);
|
|
95
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* If there is an error
|
|
100
|
+
*/
|
|
101
|
+
if (alert) {
|
|
102
|
+
return (React.createElement(Alert, { color: "error", onClose: () => setAlert(null) }, alert));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Renders the component (if not hidden by autoHide prop)
|
|
106
|
+
*/
|
|
107
|
+
if (!autoHide) {
|
|
108
|
+
return (React.createElement(React.Fragment, null,
|
|
109
|
+
React.createElement("input", { type: "file", onChange: handleUpload, ref: fileInput, hidden: true, accept: ".gif,.png,.jpg,.jpeg" }),
|
|
110
|
+
React.createElement(Root, Object.assign({ className: classNames(classes.root, className), size: "small", variant: "contained", disabled: loading, onClick: () => fileInput.current.click(), loading: loading }, rest),
|
|
111
|
+
React.createElement(Icon, null, "photo_camera"))));
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCChangeGroupPictureButton";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCChangeGroupPictureButton';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
2
|
+
import { SCGroupType } from '@selfcommunity/types';
|
|
3
|
+
export interface CreateGroupProps extends BaseDialogProps {
|
|
4
|
+
/**
|
|
5
|
+
* Overrides or extends the styles applied to the component.
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Open dialog
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
open?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* On dialog close callback function
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Group Object
|
|
21
|
+
* @default null
|
|
22
|
+
*/
|
|
23
|
+
group?: SCGroupType;
|
|
24
|
+
/**
|
|
25
|
+
* Any other properties
|
|
26
|
+
*/
|
|
27
|
+
[p: string]: any;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
|
|
31
|
+
*
|
|
32
|
+
#### Import
|
|
33
|
+
```jsx
|
|
34
|
+
import {CreateGroupButton} from '@selfcommunity/react-ui';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Component Name
|
|
38
|
+
The name `SCCreateGroup` can be used when providing style overrides in the theme.
|
|
39
|
+
|
|
40
|
+
#### CSS
|
|
41
|
+
|
|
42
|
+
|Rule Name|Global class|Description|
|
|
43
|
+
|---|---|---|
|
|
44
|
+
|root|.SCCreateGroup-root|Styles applied to the root element.|
|
|
45
|
+
|
|
46
|
+
* @param inProps
|
|
47
|
+
*/
|
|
48
|
+
export default function CreateGroup(inProps: CreateGroupProps): JSX.Element;
|