@selfcommunity/react-ui 0.11.0-react-17.0.1.3 → 1.0.0-alpha.1
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/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -2
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +6 -11
- package/lib/cjs/components/AccountDelete/AccountDelete.js +5 -12
- package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
- package/lib/cjs/components/BuyButton/BuyButton.js +8 -5
- package/lib/cjs/components/Categories/Categories.js +1 -1
- package/lib/cjs/components/Categories/Skeleton.js +1 -1
- package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
- package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +13 -4
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
- package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/cjs/components/Checkout/Skeleton.js +1 -3
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
- package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.js +2 -3
- package/lib/cjs/components/Composer/Composer.js +3 -4
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +11 -5
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +12 -5
- package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/cjs/components/CourseForm/CourseForm.js +9 -6
- package/lib/cjs/components/CourseForm/Edit.js +6 -2
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
- package/lib/cjs/components/Courses/Courses.d.ts +0 -4
- package/lib/cjs/components/Courses/Courses.js +10 -11
- package/lib/cjs/components/Courses/Skeleton.js +1 -1
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +5 -8
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
- package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
- package/lib/cjs/components/EditCourse/Options.js +1 -2
- package/lib/cjs/components/EditCourse/Status.js +1 -1
- package/lib/cjs/components/Editor/Editor.js +3 -3
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +4 -2
- package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
- package/lib/cjs/components/Event/Skeleton.js +1 -2
- package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +7 -4
- package/lib/cjs/components/EventForm/EventAddress.js +9 -5
- package/lib/cjs/components/EventForm/EventForm.js +89 -51
- package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
- package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +3 -2
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +5 -16
- package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +8 -0
- package/lib/cjs/components/EventLocationWidget/EventMap.js +28 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
- package/lib/cjs/components/EventMediaWidget/index.d.ts +2 -1
- package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
- package/lib/cjs/components/Events/Events.d.ts +0 -4
- package/lib/cjs/components/Events/Events.js +14 -9
- package/lib/cjs/components/Events/LocationEventsFilter.js +5 -1
- package/lib/cjs/components/Events/OngoingEventsFilter.js +6 -2
- package/lib/cjs/components/Events/PastEventsFilter.js +6 -2
- package/lib/cjs/components/Events/Skeleton.js +1 -1
- package/lib/cjs/components/Feed/Feed.js +9 -10
- package/lib/cjs/components/Feed/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.js +2 -3
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
- package/lib/cjs/components/GroupActionsMenu/index.js +9 -1
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +7 -4
- package/lib/cjs/components/GroupForm/GroupForm.js +16 -27
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +8 -7
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
- package/lib/cjs/components/Groups/Groups.js +10 -10
- package/lib/cjs/components/Groups/Skeleton.js +1 -2
- package/lib/cjs/components/Incubator/Incubator.js +4 -4
- package/lib/cjs/components/Incubator/Skeleton.js +1 -1
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +15 -12
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +11 -11
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
- package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
- package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/cjs/components/Notification/Course/Course.js +5 -10
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/cjs/components/Notification/Event/Event.js +7 -12
- package/lib/cjs/components/Notification/Group/Group.js +3 -4
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +4 -9
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
- package/lib/cjs/components/Notification/Notification.js +17 -9
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +4 -5
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +12 -4
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +19 -27
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +7 -5
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +39 -26
- package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +8 -6
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +5 -2
- package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +9 -8
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -6
- package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +12 -10
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +30 -22
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
- package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +24 -3
- package/lib/cjs/components/UserPaymentMethods/Skeleton.js +2 -4
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +9 -20
- package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +3 -2
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/cjs/shared/CopyTextArea/index.js +12 -6
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +6 -5
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
- package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
- package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/cjs/shared/EventActionsMenu/index.js +9 -1
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +4 -6
- package/lib/cjs/shared/Media/File/DocComponent.d.ts +2 -0
- package/lib/cjs/shared/Media/File/DocComponent.js +3 -2
- package/lib/cjs/shared/Media/File/PreviewComponent.js +4 -3
- package/lib/cjs/shared/Media/File/TriggerButton.js +9 -1
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +4 -12
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +3 -1
- package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
- package/lib/cjs/shared/PasswordTextField/index.js +7 -5
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/TagChip/index.d.ts +2 -48
- package/lib/cjs/shared/TagChip/index.js +2 -2
- package/lib/cjs/shared/Tags/index.js +9 -9
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +7 -12
- package/lib/esm/components/AccountDelete/AccountDelete.js +6 -13
- package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/esm/components/BroadcastMessages/Message.js +1 -1
- package/lib/esm/components/BuyButton/BuyButton.js +9 -6
- package/lib/esm/components/Categories/Categories.js +1 -1
- package/lib/esm/components/Categories/Skeleton.js +1 -1
- package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
- package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +14 -5
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
- package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/esm/components/Checkout/Skeleton.js +2 -4
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +3 -4
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
- package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.js +2 -3
- package/lib/esm/components/Composer/Composer.js +4 -5
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +12 -6
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +12 -5
- package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/esm/components/CourseForm/CourseForm.js +10 -7
- package/lib/esm/components/CourseForm/Edit.js +6 -2
- package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
- package/lib/esm/components/Courses/Courses.d.ts +0 -4
- package/lib/esm/components/Courses/Courses.js +10 -10
- package/lib/esm/components/Courses/Skeleton.js +1 -1
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +6 -9
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
- package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
- package/lib/esm/components/EditCourse/Options.js +2 -3
- package/lib/esm/components/EditCourse/Status.js +1 -1
- package/lib/esm/components/Editor/Editor.js +3 -3
- package/lib/esm/components/Editor/plugins/EmojiPlugin.js +4 -2
- package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
- package/lib/esm/components/Event/Skeleton.js +1 -2
- package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +8 -5
- package/lib/esm/components/EventForm/EventAddress.js +9 -5
- package/lib/esm/components/EventForm/EventForm.js +91 -53
- package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
- package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +3 -2
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +5 -16
- package/lib/esm/components/EventLocationWidget/EventMap.d.ts +8 -0
- package/lib/esm/components/EventLocationWidget/EventMap.js +25 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
- package/lib/esm/components/EventMediaWidget/index.d.ts +2 -1
- package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
- package/lib/esm/components/Events/Events.d.ts +0 -4
- package/lib/esm/components/Events/Events.js +14 -8
- package/lib/esm/components/Events/LocationEventsFilter.js +5 -1
- package/lib/esm/components/Events/OngoingEventsFilter.js +6 -2
- package/lib/esm/components/Events/PastEventsFilter.js +6 -2
- package/lib/esm/components/Events/Skeleton.js +1 -1
- package/lib/esm/components/Feed/Feed.js +10 -11
- package/lib/esm/components/Feed/Skeleton.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Actions.js +2 -3
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
- package/lib/esm/components/GroupActionsMenu/index.js +9 -1
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +8 -5
- package/lib/esm/components/GroupForm/GroupForm.js +17 -28
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +8 -7
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
- package/lib/esm/components/Groups/Groups.js +10 -10
- package/lib/esm/components/Groups/Skeleton.js +1 -2
- package/lib/esm/components/Incubator/Incubator.js +4 -4
- package/lib/esm/components/Incubator/Skeleton.js +1 -1
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -5
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +16 -13
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +12 -12
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
- package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/esm/components/Notification/Comment/Comment.js +3 -3
- package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/esm/components/Notification/Course/Course.js +6 -11
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/esm/components/Notification/Event/Event.js +8 -13
- package/lib/esm/components/Notification/Group/Group.js +4 -5
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +5 -10
- package/lib/esm/components/Notification/Mention/Mention.js +2 -2
- package/lib/esm/components/Notification/Notification.js +18 -10
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +5 -6
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/esm/components/OnBoardingWidget/ActionsButton.js +12 -4
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +20 -28
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +8 -6
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +39 -26
- package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/esm/components/Paywalls/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
- package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +9 -7
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +7 -4
- package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +10 -9
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +5 -7
- package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +14 -12
- package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +30 -22
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/esm/components/UserCounters/UserCounters.js +5 -13
- package/lib/esm/components/UserInfo/UserInfo.js +1 -1
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +24 -3
- package/lib/esm/components/UserPaymentMethods/Skeleton.js +2 -4
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +11 -12
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +12 -23
- package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
- package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/esm/components/VoteButton/VoteButton.js +3 -4
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +3 -2
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/esm/shared/CopyTextArea/index.js +12 -6
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +7 -6
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
- package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
- package/lib/esm/shared/DateTimeAgo/index.js +2 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/esm/shared/EventActionsMenu/index.js +9 -1
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +4 -6
- package/lib/esm/shared/Media/File/DocComponent.d.ts +2 -0
- package/lib/esm/shared/Media/File/DocComponent.js +3 -2
- package/lib/esm/shared/Media/File/PreviewComponent.js +4 -3
- package/lib/esm/shared/Media/File/TriggerButton.js +9 -1
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
- package/lib/esm/shared/Media/Link/DisplayComponent.js +5 -13
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -1
- package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
- package/lib/esm/shared/PasswordTextField/index.js +7 -5
- package/lib/esm/shared/ScrollContainer/index.js +1 -1
- package/lib/esm/shared/TagChip/index.d.ts +2 -48
- package/lib/esm/shared/TagChip/index.js +2 -2
- package/lib/esm/shared/Tags/index.js +9 -9
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/umd/484.js +2 -0
- package/lib/umd/484.js.LICENSE.txt +9 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +207 -206
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -14
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -10
- package/lib/umd/155.js +0 -2
- package/lib/umd/155.js.LICENSE.txt +0 -24
|
@@ -36,5 +36,9 @@ export default function LocationEventsFilter(inProps) {
|
|
|
36
36
|
if (autoHide) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), fullWidth: true }, { children: [_jsx(InputLabel, { children: _jsx(FormattedMessage, { id: "ui.events.filterByLocation", defaultMessage: "ui.events.filterByLocation" }) }), _jsx(Select, Object.assign({ disabled: disabled, size:
|
|
39
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), fullWidth: true }, { children: [_jsx(InputLabel, { children: _jsx(FormattedMessage, { id: "ui.events.filterByLocation", defaultMessage: "ui.events.filterByLocation" }) }), _jsx(Select, Object.assign({ disabled: disabled, size: "small", label: _jsx(FormattedMessage, { id: "ui.events.location", defaultMessage: "ui.events.location" }), value: value, onChange: handleOnChange, renderValue: (selected) => locationOptions.find((option) => option.value === selected).label }, { children: locationOptions.map((option) => (_jsxs(MenuItem, Object.assign({ value: option.value }, { children: [_jsx(Radio, { checked: value === option.value, value: option.value, name: "radio-button-select", slotProps: {
|
|
40
|
+
input: {
|
|
41
|
+
'aria-label': `${option.label}`
|
|
42
|
+
}
|
|
43
|
+
} }), option.label] }), option.value))) }))] })));
|
|
40
44
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Icon, useThemeProps } from '@mui/material';
|
|
3
|
+
import { Chip, Icon, styled, useThemeProps } from '@mui/material';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import { PREFIX } from './constants';
|
|
6
|
-
|
|
6
|
+
const EventsChipRoot = styled(Chip, {
|
|
7
|
+
name: PREFIX,
|
|
8
|
+
slot: 'EventsChipRoot',
|
|
9
|
+
shouldForwardProp: (prop) => prop !== 'showOngoingEvents'
|
|
10
|
+
})(() => ({}));
|
|
7
11
|
export default function OngoingEventsFilter(inProps) {
|
|
8
12
|
// PROPS
|
|
9
13
|
const props = useThemeProps({
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Icon, useThemeProps } from '@mui/material';
|
|
3
|
+
import { Chip, Icon, styled, useThemeProps } from '@mui/material';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import { PREFIX } from './constants';
|
|
6
|
-
|
|
6
|
+
const EventsChipRoot = styled(Chip, {
|
|
7
|
+
name: PREFIX,
|
|
8
|
+
slot: 'EventsChipRoot',
|
|
9
|
+
shouldForwardProp: (prop) => prop !== 'showPastEvents'
|
|
10
|
+
})(() => ({}));
|
|
7
11
|
export default function PastEventsFilter(inProps) {
|
|
8
12
|
// PROPS
|
|
9
13
|
const props = useThemeProps({
|
|
@@ -36,5 +36,5 @@ const Root = styled(Box, {
|
|
|
36
36
|
*/
|
|
37
37
|
export default function EventsSkeleton(inProps) {
|
|
38
38
|
const { className, EventSkeletonProps = {}, eventsNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {} } = inProps, rest = __rest(inProps, ["className", "EventSkeletonProps", "eventsNumber", "GridContainerComponentProps", "GridItemComponentProps"]);
|
|
39
|
-
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, spacing:
|
|
39
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, width: "100%", spacing: 2, gap: 2, className: classes.events }, GridContainerComponentProps, { children: [...Array(eventsNumber)].map((_event, index) => (_jsx(Grid, Object.assign({ size: { xs: 12, md: 6 } }, GridItemComponentProps, { className: classes.item }, { children: _jsx(EventSkeleton, Object.assign({}, EventSkeletonProps)) }), index))) })) })));
|
|
40
40
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// @ts-nocheck
|
|
3
2
|
import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
3
|
import { Link, SCCache, SCPreferences, SCPreferencesContext, SCUserContext, useIsComponentMountedRef, usePreviousValue, useSCFetchFeed } from '@selfcommunity/react-core';
|
|
5
|
-
import { styled, useTheme, Box, Button, CardContent, Grid,
|
|
4
|
+
import { styled, useTheme, Box, Button, CardContent, Grid, Typography, useMediaQuery } from '@mui/material';
|
|
6
5
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
7
6
|
import { GenericSkeleton } from '../Skeleton';
|
|
8
7
|
import CustomAdv from '../CustomAdv';
|
|
@@ -90,11 +89,11 @@ const Feed = (inProps, ref) => {
|
|
|
90
89
|
const scUserContext = useContext(SCUserContext);
|
|
91
90
|
// CONST
|
|
92
91
|
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
93
|
-
const limit = useMemo(() => endpointQueryParams.limit || DEFAULT_PAGINATION_LIMIT, [endpointQueryParams]);
|
|
92
|
+
const limit = +useMemo(() => endpointQueryParams.limit || DEFAULT_PAGINATION_LIMIT, [endpointQueryParams]);
|
|
94
93
|
const offset = useMemo(() => {
|
|
95
94
|
if (prefetchedData) {
|
|
96
|
-
const currentOffset = getQueryStringParameter(prefetchedData.previous, 'offset') || 0;
|
|
97
|
-
return prefetchedData.previous ?
|
|
95
|
+
const currentOffset = +getQueryStringParameter(prefetchedData.previous, 'offset') || 0;
|
|
96
|
+
return prefetchedData.previous ? currentOffset + limit : 0;
|
|
98
97
|
}
|
|
99
98
|
return endpointQueryParams.offset || 0;
|
|
100
99
|
}, [endpointQueryParams, prefetchedData]);
|
|
@@ -288,10 +287,10 @@ const Feed = (inProps, ref) => {
|
|
|
288
287
|
}, [feedDataObject.componentLoaded, setHeadData, setFeedDataLeft, setFeedDataRight]);
|
|
289
288
|
/**
|
|
290
289
|
* Callback subscribe events
|
|
291
|
-
* @param
|
|
290
|
+
* @param _msg
|
|
292
291
|
* @param data
|
|
293
292
|
*/
|
|
294
|
-
const subscriber = (
|
|
293
|
+
const subscriber = (_msg, data) => {
|
|
295
294
|
if (data.refresh) {
|
|
296
295
|
refresh();
|
|
297
296
|
}
|
|
@@ -398,8 +397,8 @@ const Feed = (inProps, ref) => {
|
|
|
398
397
|
setHeadData([...[data], ...headData]);
|
|
399
398
|
if (syncPagination) {
|
|
400
399
|
// Adding an element, re-sync next and previous of feedDataObject
|
|
401
|
-
const nextOffset = parseInt(getQueryStringParameter(feedDataObject.next, 'offset') || feedDataObject.results.length - 1) + 1;
|
|
402
|
-
const previousOffset = parseInt(getQueryStringParameter(feedDataObject.previous, 'offset') || offset) + 1;
|
|
400
|
+
const nextOffset = (parseInt(getQueryStringParameter(feedDataObject.next, 'offset')) || feedDataObject.results.length - 1) + 1;
|
|
401
|
+
const previousOffset = (parseInt(getQueryStringParameter(feedDataObject.previous, 'offset')) || +offset) + 1;
|
|
403
402
|
feedDataObject.updateState({
|
|
404
403
|
previous: updateQueryStringParameter(feedDataObject.previous, 'offset', previousOffset),
|
|
405
404
|
next: updateQueryStringParameter(feedDataObject.next, 'offset', nextOffset),
|
|
@@ -426,8 +425,8 @@ const Feed = (inProps, ref) => {
|
|
|
426
425
|
return (_jsx(VirtualScrollChild, Object.assign({ onHeightChange: onItemHeightChange }, { children: item.type === 'widget' ? (_jsx(item.component, Object.assign({ id: `${WIDGET_PREFIX_KEY}${item.position}` }, item.componentProps, (item.publishEvents && { publicationChannel: id }), savedState, { onStateChange: onItemStateChange, onHeightChange: onItemHeightChange }))) : (_jsx(ItemComponent, Object.assign({ id: `item_${itemIdGenerator(item)}` }, itemPropsGenerator(scUserContext.user, item), ItemProps, { sx: { width: '100%' } }, savedState, { onStateChange: onItemStateChange, onHeightChange: onItemHeightChange }))) })));
|
|
427
426
|
}, [authUserId]);
|
|
428
427
|
if (feedDataObject.isLoadingNext && !feedDataLeft.length) {
|
|
429
|
-
return (_jsx(FeedSkeleton, { children: [...Array(3)].map((
|
|
428
|
+
return (_jsx(FeedSkeleton, { children: [...Array(3)].map((_v, i) => (_jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps), i))) }));
|
|
430
429
|
}
|
|
431
|
-
return (_jsxs(Root, Object.assign({ container: true, spacing: 2, id: id, className: classNames(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? (_jsx(Grid, Object.assign({
|
|
430
|
+
return (_jsxs(Root, Object.assign({ container: true, width: "100%", spacing: 2, id: id, className: classNames(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? (_jsx(Grid, Object.assign({ size: 12 }, { children: _jsx(CustomAdv, Object.assign({ position: SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, _jsx(Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: _jsxs(InfiniteScroll, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: _jsxs(Box, Object.assign({ className: classes.end }, { children: [_jsx(Widget, Object.assign({ className: classes.endMessage }, { children: _jsx(CardContent, { children: endMessage }) })), FooterComponent ? _jsx(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: _jsx(Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, _jsx(VirtualizedScroller, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && (_jsx(Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: _jsx(StickyBoxComp, Object.assign({ className: classes.right }, FeedSidebarProps, { children: _jsx(React.Suspense, Object.assign({ fallback: _jsx(GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => (_jsx(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
|
|
432
431
|
};
|
|
433
432
|
export default forwardRef(Feed);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { styled, Grid
|
|
3
|
+
import { styled, Grid } from '@mui/material';
|
|
4
4
|
import { GenericSkeleton } from '../Skeleton';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { PREFIX } from './constants';
|
|
@@ -38,5 +38,5 @@ const Root = styled(Grid, {
|
|
|
38
38
|
export default function FeedSkeleton(props) {
|
|
39
39
|
// PROPS
|
|
40
40
|
const { children = (_jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] })), sidebar = (_jsxs(React.Fragment, { children: [_jsx(GenericSkeleton, { sx: { mb: 2 } }), _jsx(GenericSkeleton, { sx: { mb: 2 } })] })), className } = props;
|
|
41
|
-
return (_jsxs(Root, Object.assign({ container: true, spacing: 2, className: classNames(classes.root, className) }, { children: [_jsx(Grid, Object.assign({
|
|
41
|
+
return (_jsxs(Root, Object.assign({ container: true, width: "100%", spacing: 2, className: classNames(classes.root, className) }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: _jsx("div", Object.assign({ className: classes.left }, { children: children })) })), _jsx(Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: _jsx("div", Object.assign({ className: classes.right }, { children: sidebar })) }))] })));
|
|
42
42
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { styled } from '@mui/material';
|
|
3
|
-
import { Grid } from '@mui/material';
|
|
2
|
+
import { Grid, styled } from '@mui/material';
|
|
4
3
|
import Vote from './Vote';
|
|
5
4
|
import Comment from './Comment';
|
|
6
5
|
import Share from './Share';
|
|
@@ -41,5 +40,5 @@ export default function Actions(props) {
|
|
|
41
40
|
* Renders action section
|
|
42
41
|
*/
|
|
43
42
|
const columnWidth = getColumnWidth();
|
|
44
|
-
return (_jsxs(Root, Object.assign({ container: true, className: classNames(classes.root, className) }, { children: [!hideVoteAction && (_jsx(Grid, Object.assign({
|
|
43
|
+
return (_jsxs(Root, Object.assign({ container: true, width: "100%", className: classNames(classes.root, className) }, { children: [!hideVoteAction && (_jsx(Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: _jsx(Vote, Object.assign({ feedObjectId: feedObjectId || obj.id, feedObject: obj, feedObjectType: feedObjectType || obj.type }, VoteActionProps)) }))), !hideCommentAction && (_jsx(Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: _jsx(Comment, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, feedObjectTemplate: feedObjectTemplate, onCommentAction: handleExpandActivities }, CommentActionProps)) }))), !hideShareAction && (_jsx(Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: _jsx(Share, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, id: feedObjectId }, ShareActionProps)) })))] })));
|
|
45
44
|
}
|
|
@@ -34,7 +34,7 @@ export default function Comment(props) {
|
|
|
34
34
|
// PROPS
|
|
35
35
|
const { className, feedObjectId, feedObject, feedObjectType = SCContributionType.POST, feedObjectTemplate = SCFeedObjectTemplateType, withAction = true, withAudience = true, inlineAction = false, onViewCommentsAction, onCommentAction } = props, rest = __rest(props, ["className", "feedObjectId", "feedObject", "feedObjectType", "feedObjectTemplate", "withAction", "withAudience", "inlineAction", "onViewCommentsAction", "onCommentAction"]);
|
|
36
36
|
// STATE
|
|
37
|
-
const { obj
|
|
37
|
+
const { obj } = useSCFetchFeedObject({ id: feedObjectId, feedObject, feedObjectType });
|
|
38
38
|
// CONTEXT
|
|
39
39
|
const scRoutingContext = useSCRouting();
|
|
40
40
|
// INTL
|
|
@@ -50,7 +50,7 @@ export default function Comment(props) {
|
|
|
50
50
|
audience = (_jsx(Button, Object.assign({ variant: "text", size: "small", disabled: true, color: "inherit" }, { children: _jsx(Skeleton, { animation: "wave", height: 18, width: 50 }) })));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
audience = (_jsx(_Fragment, { children: onViewCommentsAction ? (_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: onViewCommentsAction, color: "inherit" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : (_jsx(_Fragment, { children: feedObjectTemplate === SCFeedObjectTemplateType.DETAIL ? (_jsx(Typography, Object.assign({ variant:
|
|
53
|
+
audience = (_jsx(_Fragment, { children: onViewCommentsAction ? (_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: onViewCommentsAction, color: "inherit" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : (_jsx(_Fragment, { children: feedObjectTemplate === SCFeedObjectTemplateType.DETAIL ? (_jsx(Typography, Object.assign({ variant: "body2" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : (_jsx(Button, Object.assign({ variant: "text", size: "small", component: Link, to: scRoutingContext.url(getContributionRouteName(obj), getRouteData(obj)), classes: { root: classes.viewAudienceButton } }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) })) }));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return audience;
|
|
@@ -2,8 +2,7 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import React, { useMemo, useState } from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
|
-
import
|
|
6
|
-
import { Box, Tooltip, styled, Icon } from '@mui/material';
|
|
5
|
+
import { Box, Tooltip, styled, Icon, Button } from '@mui/material';
|
|
7
6
|
import { SCOPE_SC_UI } from '../../../../constants/Errors';
|
|
8
7
|
import classNames from 'classnames';
|
|
9
8
|
import { useSnackbar } from 'notistack';
|
|
@@ -61,7 +60,7 @@ export default function Follow(props) {
|
|
|
61
60
|
else {
|
|
62
61
|
setIsFollowing(true);
|
|
63
62
|
performFollow()
|
|
64
|
-
.then((
|
|
63
|
+
.then(() => {
|
|
65
64
|
const isFollow = !obj.followed;
|
|
66
65
|
setObj(Object.assign({}, obj, { followed: isFollow }));
|
|
67
66
|
setIsFollowing(false);
|
|
@@ -88,7 +87,7 @@ export default function Follow(props) {
|
|
|
88
87
|
if (obj.followed) {
|
|
89
88
|
btnLabel = _jsx(FormattedMessage, { id: "ui.feedObject.unfollow", defaultMessage: "ui.feedObject.unfollow" });
|
|
90
89
|
}
|
|
91
|
-
return (_jsx(React.Fragment, { children: scUserContext.user && obj.author.id !== scUserContext.user.id && !obj.deleted && (_jsx(Tooltip, Object.assign({ title: btnLabel }, { children: _jsx(
|
|
90
|
+
return (_jsx(React.Fragment, { children: scUserContext.user && obj.author.id !== scUserContext.user.id && !obj.deleted && (_jsx(Tooltip, Object.assign({ title: btnLabel }, { children: _jsx(Button, Object.assign({ className: classNames(classes.button, { [classes.iconized]: iconized, [classes.followed]: obj.followed }), loading: isFollowing, variant: iconized ? 'text' : 'contained', disabled: isFollowing, onClick: follow }, { children: iconized ? _jsx(Icon, { children: obj.followed ? 'bookmark_added' : 'bookmark_border' }) : btnLabel })) }))) }));
|
|
92
91
|
}
|
|
93
92
|
/**
|
|
94
93
|
* Renders share action
|
|
@@ -2,7 +2,6 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React, { useContext, useMemo, useState } from 'react';
|
|
4
4
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
5
|
-
import LoadingButton from '@mui/lab/LoadingButton';
|
|
6
5
|
import SharesDialog from './SharesDialog';
|
|
7
6
|
import { Box, Button, Divider, ListItemText, Menu, SwipeableDrawer, Tooltip, useMediaQuery, useTheme, Icon, MenuItem, ListItemIcon, styled, Skeleton } from '@mui/material';
|
|
8
7
|
import { MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_TYPE_SHARE } from '../../../../constants/Media';
|
|
@@ -193,7 +192,7 @@ export default function Share(props) {
|
|
|
193
192
|
* @return {JSX.Element}
|
|
194
193
|
*/
|
|
195
194
|
function renderShareBtn() {
|
|
196
|
-
return (_jsx(React.Fragment, { children: withAction && (_jsxs(React.Fragment, { children: [!inlineAction && withAudience && _jsx(Divider, { className: classes.divider }), _jsx(Tooltip, Object.assign({ title: `${intl.formatMessage(messages.share)}` }, { children: _jsx(
|
|
195
|
+
return (_jsx(React.Fragment, { children: withAction && (_jsxs(React.Fragment, { children: [!inlineAction && withAudience && _jsx(Divider, { className: classes.divider }), _jsx(Tooltip, Object.assign({ title: `${intl.formatMessage(messages.share)}` }, { children: _jsx(Button, Object.assign({ loading: isSharing, onClick: handleOpenShareMenu, className: classes.button }, { children: _jsx(Icon, { children: "share" }) })) })), Boolean(anchorEl) && (_jsx(_Fragment, { children: !isMobile ? (_jsx(Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, slotProps: {
|
|
197
196
|
paper: {
|
|
198
197
|
elevation: 0,
|
|
199
198
|
sx: {
|
|
@@ -67,30 +67,32 @@ export default function ActivitiesMenu(props) {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
function renderMenuContent() {
|
|
70
|
-
return (_jsxs(Box, { children: [!hideRelevantActivitiesItem && (_jsx(ListItemButton, Object.assign({ selected: selectedActivities === SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES, onClick: handleChangeActivitiesType(SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES) }, { children: _jsx(ListItemText, { primary: _jsx("b", { children: intl.formatMessage(messages.relevantActivities) }), secondary: _jsx(FormattedMessage, { id:
|
|
70
|
+
return (_jsxs(Box, { children: [!hideRelevantActivitiesItem && (_jsx(ListItemButton, Object.assign({ selected: selectedActivities === SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES, onClick: handleChangeActivitiesType(SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES) }, { children: _jsx(ListItemText, { primary: _jsx("b", { children: intl.formatMessage(messages.relevantActivities) }), secondary: _jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.relevantActivitiesDesc", defaultMessage: "ui.feedObject.activitiesMenu.relevantActivitiesDesc" }) }) }))), _jsx(ListItemButton, Object.assign({ selected: selectedActivities === SCFeedObjectActivitiesType.RECENT_COMMENTS, onClick: handleChangeActivitiesType(SCFeedObjectActivitiesType.RECENT_COMMENTS) }, { children: _jsx(ListItemText, { primary: _jsx("b", { children: intl.formatMessage(messages.recentComments) }), secondary: _jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.recentCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.recentCommentsDesc" }) }) })), _jsx(ListItemButton, Object.assign({ selected: selectedActivities === SCFeedObjectActivitiesType.FIRST_COMMENTS, onClick: handleChangeActivitiesType(SCFeedObjectActivitiesType.FIRST_COMMENTS) }, { children: _jsx(ListItemText, { primary: _jsx("b", { children: intl.formatMessage(messages.firstComments) }), secondary: _jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.firstCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.firstCommentsDesc" }) }) })), scUserContext.user && (_jsx(ListItemButton, Object.assign({ selected: selectedActivities === SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS, onClick: handleChangeActivitiesType(SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS) }, { children: (followEnabled || connectionEnabled) && (_jsx(ListItemText, { primary: _jsx("b", { children: followEnabled ? intl.formatMessage(messages.followedComments) : intl.formatMessage(messages.connectionsComments) }), secondary: followEnabled ? (_jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.followedCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.followedCommentsDesc" })) : (_jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.connectionsCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.connectionsCommentsDesc" })) })) })))] }));
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Renders root object
|
|
74
74
|
*/
|
|
75
75
|
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Box, Object.assign({ className: classes.selector }, { children: _jsx(Tooltip, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.feedObject.activitiesMenu.tooltipTitle", defaultMessage: "ui.feedObject.activitiesMenu.tooltipTitle" }) }, { children: _jsxs(Button, Object.assign({ variant: "text", size: "small", onClick: handleOpen }, { children: [selectedActivities === SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS && followEnabled
|
|
76
76
|
? intl.formatMessage(messages.followedComments)
|
|
77
|
-
: intl.formatMessage(messages[`${camelCase(selectedActivities)}`]), "\u00A0 ", _jsx(Icon, { children: "expand_more" })] })) })) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderMenuContent() }))) : (_jsx(Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
77
|
+
: intl.formatMessage(messages[`${camelCase(selectedActivities)}`]), "\u00A0 ", _jsx(Icon, { children: "expand_more" })] })) })) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderMenuContent() }))) : (_jsx(Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, slotProps: {
|
|
78
|
+
paper: {
|
|
79
|
+
elevation: 0,
|
|
80
|
+
sx: {
|
|
81
|
+
overflow: 'visible',
|
|
82
|
+
filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
|
|
83
|
+
mt: 1.5,
|
|
84
|
+
'&:before': {
|
|
85
|
+
content: '""',
|
|
86
|
+
display: 'block',
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
top: 0,
|
|
89
|
+
right: 14,
|
|
90
|
+
width: 10,
|
|
91
|
+
height: 10,
|
|
92
|
+
bgcolor: 'background.paper',
|
|
93
|
+
transform: 'translateY(-50%) rotate(45deg)',
|
|
94
|
+
zIndex: 0
|
|
95
|
+
}
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
}, transformOrigin: { horizontal: 'right', vertical: 'top' }, anchorOrigin: { horizontal: 'right', vertical: 'bottom' } }, { children: renderMenuContent() }))) }))] })));
|
|
@@ -44,7 +44,7 @@ export default function CommentRelevantActivity(props) {
|
|
|
44
44
|
// const summaryHtml = getContributionHtml(commentHtml, scRoutingContext.url);
|
|
45
45
|
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.comment, {
|
|
46
46
|
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 }))),
|
|
47
|
-
link: (
|
|
47
|
+
link: (chunks) => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COMMENT_ROUTE_NAME, getRouteData(activityObject.comment)) }, { children: chunks }), "ui.feedObject.relevantActivities.comment.link"))
|
|
48
48
|
// comment: (
|
|
49
49
|
// <>
|
|
50
50
|
// <Typography variant="body2" gutterBottom dangerouslySetInnerHTML={{__html: summaryHtml}} />
|
|
@@ -46,5 +46,5 @@ export default function RelevantActivities(props) {
|
|
|
46
46
|
/**
|
|
47
47
|
* Renders root object
|
|
48
48
|
*/
|
|
49
|
-
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:
|
|
49
|
+
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))) }))] })) })));
|
|
50
50
|
}
|
|
@@ -47,5 +47,5 @@ export default function ContributorsFeedObject(props) {
|
|
|
47
47
|
if (!contributorsObject.feedObject) {
|
|
48
48
|
return null;
|
|
49
49
|
}
|
|
50
|
-
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:
|
|
50
|
+
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 })) }) })));
|
|
51
51
|
}
|
|
@@ -35,5 +35,5 @@ const Root = styled(Box, {
|
|
|
35
35
|
*/
|
|
36
36
|
export default function ContributorsSkeleton(props) {
|
|
37
37
|
const { className = null, AvatarGroupSkeletonProps = {} } = props, rest = __rest(props, ["className", "AvatarGroupSkeletonProps"]);
|
|
38
|
-
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:
|
|
38
|
+
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))] })) })));
|
|
39
39
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useSCContext, useSCUser } from '@selfcommunity/react-core';
|
|
4
|
-
import { Box, Card, Typography, styled, Icon, LinearProgress } from '@mui/material';
|
|
4
|
+
import { Box, Card, Typography, styled, Icon, LinearProgress, Button } from '@mui/material';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
|
-
import { LoadingButton } from '@mui/lab';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
7
|
import { PREFIX } from '../../constants';
|
|
9
8
|
const classes = {
|
|
@@ -47,5 +46,5 @@ export default function Choice(props) {
|
|
|
47
46
|
/**
|
|
48
47
|
* Renders root element
|
|
49
48
|
*/
|
|
50
|
-
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(
|
|
49
|
+
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(Button, Object.assign({ loading: isVoting === choiceObj.id, variant: choiceObj.voted ? 'contained' : 'outlined', size: "small", disabled: disabled || isVoting !== null || votable || feedObject.draft, 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" })) }))] })));
|
|
51
50
|
}
|
|
@@ -57,6 +57,6 @@ export default (inProps) => {
|
|
|
57
57
|
*/
|
|
58
58
|
return (_jsx(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: mediaObjectTypes.map((mediaObject) => {
|
|
59
59
|
const { displayProps = {} } = mediaObject;
|
|
60
|
-
return (_jsx("div", { children: _jsx(mediaObject.displayComponent, Object.assign({ medias: medias }, displayProps, { onMediaClick: handleMediaClick })) }, mediaObject.name));
|
|
60
|
+
return (_jsx("div", { children: _jsx(mediaObject.displayComponent, Object.assign({ medias: medias }, displayProps, (mediaObject.name !== 'share' && { onMediaClick: handleMediaClick }))) }, mediaObject.name));
|
|
61
61
|
}) })));
|
|
62
62
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useContext, useEffect, useState } from 'react';
|
|
4
|
-
import { styled } from '@mui/material';
|
|
4
|
+
import { Button, styled } from '@mui/material';
|
|
5
5
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
6
|
-
import { LoadingButton } from '@mui/lab';
|
|
7
6
|
import { FormattedMessage } from 'react-intl';
|
|
8
7
|
import { useSnackbar } from 'notistack';
|
|
9
8
|
import classNames from 'classnames';
|
|
@@ -15,7 +14,7 @@ const PREFIX = 'SCFollowUserButton';
|
|
|
15
14
|
const classes = {
|
|
16
15
|
root: `${PREFIX}-root`
|
|
17
16
|
};
|
|
18
|
-
const FollowButton = styled(
|
|
17
|
+
const FollowButton = styled(Button, {
|
|
19
18
|
name: PREFIX,
|
|
20
19
|
slot: 'Root',
|
|
21
20
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useContext, useEffect, useState } from 'react';
|
|
4
|
-
import { styled } from '@mui/material';
|
|
4
|
+
import { Button, styled } from '@mui/material';
|
|
5
5
|
import { SCConnectionStatus } from '@selfcommunity/types';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useThemeProps } from '@mui/system';
|
|
8
8
|
import { useSnackbar } from 'notistack';
|
|
9
9
|
import { FormattedMessage } from 'react-intl';
|
|
10
|
-
import { LoadingButton } from '@mui/lab';
|
|
11
10
|
import { Logger } from '@selfcommunity/utils';
|
|
12
11
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
13
12
|
import { catchUnauthorizedActionByBlockedUser } from '../../utils/errors';
|
|
@@ -16,10 +15,10 @@ const PREFIX = 'SCFriendshipUserButton';
|
|
|
16
15
|
const classes = {
|
|
17
16
|
root: `${PREFIX}-root`
|
|
18
17
|
};
|
|
19
|
-
const Root = styled(
|
|
18
|
+
const Root = styled(Button, {
|
|
20
19
|
name: PREFIX,
|
|
21
20
|
slot: 'Root',
|
|
22
|
-
overridesResolver: (
|
|
21
|
+
overridesResolver: (_props, styles) => styles.root
|
|
23
22
|
})(() => ({}));
|
|
24
23
|
// TODO: fix component
|
|
25
24
|
/**
|
|
@@ -148,5 +148,13 @@ export default function GroupActionsMenu(inProps) {
|
|
|
148
148
|
if (!scGroup) {
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
151
|
-
return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { onClick: handleOpen }, { children: _jsx(Icon, { children: "more_vert" }) })), Boolean(anchorEl) && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: true, onClose: handleClose, onOpen: handleOpen,
|
|
151
|
+
return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { onClick: handleOpen }, { children: _jsx(Icon, { children: "more_vert" }) })), Boolean(anchorEl) && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: true, onClose: handleClose, onOpen: handleOpen, slotProps: {
|
|
152
|
+
paper: {
|
|
153
|
+
className: classes.paper
|
|
154
|
+
}
|
|
155
|
+
}, disableSwipeToOpen: true }, { children: _jsx(List, { children: renderList() }) }))) : (_jsx(MenuRoot, Object.assign({ className: classes.menuRoot, anchorEl: anchorEl, open: true, onClose: handleClose, slotProps: {
|
|
156
|
+
paper: {
|
|
157
|
+
className: classes.paper
|
|
158
|
+
}
|
|
159
|
+
} }, { children: renderList() }))) })), openConfirmDialog && (_jsx(ConfirmDialog, { open: openConfirmDialog, title: _jsx(FormattedMessage, { id: "ui.groupActionsMenu.dialog.msg", defaultMessage: "ui.groupActionsMenu.dialog.msg" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.groupActionsMenu.dialog.confirm", defaultMessage: "ui.groupActionsMenu.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog })), openEdit && _jsx(GroupForm, { onClose: handleEditClick, group: scGroup, onSuccess: handleEditSuccess })] }));
|
|
152
160
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import parse from 'autosuggest-highlight/parse';
|
|
@@ -14,7 +14,7 @@ const classes = {
|
|
|
14
14
|
const Root = styled(Autocomplete, {
|
|
15
15
|
name: PREFIX,
|
|
16
16
|
slot: 'Root',
|
|
17
|
-
overridesResolver: (
|
|
17
|
+
overridesResolver: (_props, styles) => styles.root
|
|
18
18
|
})(() => ({}));
|
|
19
19
|
/**
|
|
20
20
|
* > API documentation for the Community-JS Group Autocomplete component. Learn about the available props and the CSS API.
|
|
@@ -70,7 +70,7 @@ const GroupAutocomplete = (inProps) => {
|
|
|
70
70
|
const handleClose = () => {
|
|
71
71
|
setOpen(false);
|
|
72
72
|
};
|
|
73
|
-
const handleChange = (
|
|
73
|
+
const handleChange = (_event, value) => {
|
|
74
74
|
setValue(value);
|
|
75
75
|
};
|
|
76
76
|
// Render
|
|
@@ -81,11 +81,14 @@ const GroupAutocomplete = (inProps) => {
|
|
|
81
81
|
// ));
|
|
82
82
|
// }}
|
|
83
83
|
renderOption: (props, option, { inputValue }) => {
|
|
84
|
+
const { key } = props, rest = __rest(props, ["key"]);
|
|
84
85
|
const matches = match(option.name, inputValue);
|
|
85
86
|
const parts = parse(option.name, matches);
|
|
86
|
-
return (_jsxs(Box, Object.assign({ component: "li" },
|
|
87
|
+
return (_jsxs(Box, Object.assign({ component: "li" }, rest, { children: [_jsx(Avatar, { alt: option.name, src: option.image_small, sx: { marginRight: 1 } }), _jsx(React.Fragment, { children: parts.map((part, index) => (_jsx(Typography, Object.assign({ sx: { fontWeight: part.highlight ? 700 : 400, marginRight: 0.2 } }, { children: part.text }), index))) })] }), key));
|
|
87
88
|
}, renderInput: (params) => {
|
|
88
|
-
return (_jsx(TextField, Object.assign({}, params, TextFieldProps, { margin: "dense",
|
|
89
|
+
return (_jsx(TextField, Object.assign({}, params, TextFieldProps, { margin: "dense", slotProps: {
|
|
90
|
+
input: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'groups', endAdornment: (_jsxs(_Fragment, { children: [isLoading && _jsx(CircularProgress, { color: "inherit", size: 20 }), params.InputProps.endAdornment] })) })
|
|
91
|
+
} })));
|
|
89
92
|
} }, rest)));
|
|
90
93
|
};
|
|
91
94
|
export default GroupAutocomplete;
|
|
@@ -2,13 +2,12 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo, useState } from 'react';
|
|
4
4
|
import { useThemeProps } from '@mui/system';
|
|
5
|
-
import { Avatar, Box, Divider, FormGroup, Icon, Paper, Stack, Switch, TextField, Typography, styled } from '@mui/material';
|
|
5
|
+
import { Avatar, Box, Button, Divider, FormGroup, Icon, Paper, Stack, Switch, TextField, Typography, styled } from '@mui/material';
|
|
6
6
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
7
7
|
import { SCPreferences, UserUtils, useSCPaymentsEnabled, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { PREFIX } from './constants';
|
|
10
10
|
import BaseDialog from '../../shared/BaseDialog';
|
|
11
|
-
import { LoadingButton } from '@mui/lab';
|
|
12
11
|
import ChangeGroupPicture from '../ChangeGroupPicture';
|
|
13
12
|
import ChangeGroupCover from '../ChangeGroupCover';
|
|
14
13
|
import { GROUP_DESCRIPTION_MAX_LENGTH, GROUP_TITLE_MAX_LENGTH } from '../../constants/Group';
|
|
@@ -247,40 +246,30 @@ export default function GroupForm(inProps) {
|
|
|
247
246
|
/**
|
|
248
247
|
* Renders root object
|
|
249
248
|
*/
|
|
250
|
-
return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, title: group ? (_jsx(FormattedMessage, { id: "ui.groupForm.title.edit", defaultMessage: "ui.groupForm.title.edit" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.title", defaultMessage: "ui.groupForm.title" })), open: open, disableEscapeKeyDown: true, onClose: handleClose, className: classNames(classes.root, className), actions: _jsx(
|
|
249
|
+
return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, title: group ? (_jsx(FormattedMessage, { id: "ui.groupForm.title.edit", defaultMessage: "ui.groupForm.title.edit" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.title", defaultMessage: "ui.groupForm.title" })), open: open, disableEscapeKeyDown: true, onClose: handleClose, className: classNames(classes.root, className), actions: _jsx(Button, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
|
|
251
250
|
Object.keys(error).length !== 0 ||
|
|
252
251
|
field.name.length > GROUP_TITLE_MAX_LENGTH ||
|
|
253
|
-
field.name.description > GROUP_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: group ? (_jsx(FormattedMessage, { id: "ui.groupForm.button.edit", defaultMessage: "ui.groupForm.button.edit" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.button.create", defaultMessage: "ui.groupForm.button.create" })) })) }, rest, { children: _jsxs(_Fragment, { children: [_jsxs(_Fragment, { children: [_jsxs(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: [_jsx(Box, Object.assign({ className: classes.avatar }, { children: _jsx(Avatar, { children: field.imageOriginal ? _jsx("img", { src: field.imageOriginal, alt: "avatar" }) : _jsx(Icon, { children: "icon_image" }) }) })), _jsxs(_Fragment, { children: [_jsx(ChangeGroupPicture, { isCreationMode: true, onChange: handleChangeAvatar }), _jsx(ChangeGroupCover, { isCreationMode: true, onChange: handleChangeCover })] })] })), _jsx(Typography, Object.assign({ className: classNames(classes.header, { [classes.error]: error.emotionalImageOriginalError || error.imageOriginalError }), align: "center" }, { children: error.emotionalImageOriginalError || error.imageOriginalError ? (_jsx(FormattedMessage, { id: "ui.groupForm.header.error", defaultMessage: "ui.groupForm.header.error" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.header", defaultMessage: "ui.groupForm.header" })) }))] }), _jsxs(FormGroup, Object.assign({ className: classes.form }, { children: [_jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
field.name.description > GROUP_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: group ? (_jsx(FormattedMessage, { id: "ui.groupForm.button.edit", defaultMessage: "ui.groupForm.button.edit" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.button.create", defaultMessage: "ui.groupForm.button.create" })) })) }, rest, { children: _jsxs(_Fragment, { children: [_jsxs(_Fragment, { children: [_jsxs(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: [_jsx(Box, Object.assign({ className: classes.avatar }, { children: _jsx(Avatar, { children: field.imageOriginal ? _jsx("img", { src: field.imageOriginal, alt: "avatar" }) : _jsx(Icon, { children: "icon_image" }) }) })), _jsxs(_Fragment, { children: [_jsx(ChangeGroupPicture, { isCreationMode: true, onChange: handleChangeAvatar }), _jsx(ChangeGroupCover, { isCreationMode: true, onChange: handleChangeCover })] })] })), _jsx(Typography, Object.assign({ className: classNames(classes.header, { [classes.error]: error.emotionalImageOriginalError || error.imageOriginalError }), align: "center" }, { children: error.emotionalImageOriginalError || error.imageOriginalError ? (_jsx(FormattedMessage, { id: "ui.groupForm.header.error", defaultMessage: "ui.groupForm.header.error" })) : (_jsx(FormattedMessage, { id: "ui.groupForm.header", defaultMessage: "ui.groupForm.header" })) }))] }), _jsxs(FormGroup, Object.assign({ className: classes.form }, { children: [_jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, slotProps: {
|
|
253
|
+
input: {
|
|
254
|
+
endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: GROUP_TITLE_MAX_LENGTH - field.name.length }))
|
|
255
|
+
}
|
|
256
|
+
}, error: Boolean(((_c = field === null || field === void 0 ? void 0 : field.name) === null || _c === void 0 ? void 0 : _c.length) > GROUP_TITLE_MAX_LENGTH), helperText: ((_d = field === null || field === void 0 ? void 0 : field.name) === null || _d === void 0 ? void 0 : _d.length) > GROUP_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.groupForm.name.error.maxLength", defaultMessage: "ui.groupForm.name.error.maxLength" })) : null }), _jsx(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, slotProps: {
|
|
257
|
+
input: {
|
|
258
|
+
endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) ? GROUP_DESCRIPTION_MAX_LENGTH - field.description.length : GROUP_DESCRIPTION_MAX_LENGTH })))
|
|
259
|
+
}
|
|
257
260
|
}, error: Boolean(((_f = field.description) === null || _f === void 0 ? void 0 : _f.length) > GROUP_DESCRIPTION_MAX_LENGTH), helperText: ((_g = field.description) === null || _g === void 0 ? void 0 : _g.length) > GROUP_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.groupForm.description.error.maxLength", defaultMessage: "ui.groupForm.description.error.maxLength" })) : null }), privateEnabled && (_jsxs(Box, Object.assign({ className: classes.privacySection }, { children: [_jsx(Typography, Object.assign({ variant: "h4" }, { children: _jsx(FormattedMessage, { id: "ui.groupForm.privacy.title", defaultMessage: "ui.groupForm.privacy.title", values: {
|
|
258
|
-
|
|
259
|
-
// @ts-ignore
|
|
260
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
261
|
+
b: (chunks) => _jsx("strong", { children: chunks }, "ui.groupForm.privacy.title.b")
|
|
261
262
|
} }) })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: !field.isPublic }) }, { children: [_jsx(Icon, { children: "private" }), _jsx(FormattedMessage, { id: "ui.groupForm.privacy.private", defaultMessage: "ui.groupForm.privacy.private" })] })), _jsx(Switch, { className: classes.switch, checked: field.isPublic, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isPublic']: !field.isPublic }))), disabled: group && group.privacy === SCGroupPrivacyType.PRIVATE }), _jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: field.isPublic }) }, { children: [_jsx(Icon, { children: "public" }), _jsx(FormattedMessage, { id: "ui.groupForm.privacy.public", defaultMessage: "ui.groupForm.privacy.public" })] }))] })), _jsx(Typography, Object.assign({ variant: "body2", className: classes.privacySectionInfo }, { children: field.isPublic ? (_jsx(FormattedMessage, { id: "ui.groupForm.privacy.public.info", defaultMessage: "ui.groupForm.privacy.public.info", values: {
|
|
262
|
-
|
|
263
|
-
// @ts-ignore
|
|
264
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
263
|
+
b: (chunks) => _jsx("strong", { children: chunks }, Math.random())
|
|
265
264
|
} })) : (_jsx(_Fragment, { children: group && group.privacy === SCGroupPrivacyType.PRIVATE ? (_jsx(FormattedMessage, { id: "ui.groupForm.privacy.private.info.edit", defaultMessage: "ui.groupForm.private.public.info.edit", values: {
|
|
266
|
-
|
|
267
|
-
// @ts-ignore
|
|
268
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
265
|
+
b: (chunks) => _jsx("strong", { children: chunks }, Math.random())
|
|
269
266
|
} })) : (_jsx(FormattedMessage, { id: "ui.groupForm.privacy.private.info", defaultMessage: "ui.groupForm.private.public.info", values: {
|
|
270
|
-
|
|
271
|
-
// @ts-ignore
|
|
272
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
267
|
+
b: (chunks) => _jsx("strong", { children: chunks }, Math.random())
|
|
273
268
|
} })) })) }))] }))), privateEnabled && visibilityEnabled && (_jsx(Box, Object.assign({ className: classes.visibilitySection }, { children: ((!field.isPublic && !group) || (group && !field.isPublic)) && (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h4" }, { children: _jsx(FormattedMessage, { id: "ui.groupForm.visibility.title", defaultMessage: "ui.groupForm.visibility.title", values: {
|
|
274
|
-
|
|
275
|
-
// @ts-ignore
|
|
276
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
269
|
+
b: (chunks) => _jsx("strong", { children: chunks }, "ui.groupForm.visibility.title.b")
|
|
277
270
|
} }) })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: !field.isVisible }) }, { children: [_jsx(Icon, { children: "visibility_off" }), _jsx(FormattedMessage, { id: "ui.groupForm.visibility.hidden", defaultMessage: "ui.groupForm.visibility.hidden" })] })), _jsx(Switch, { className: classes.switch, checked: field.isVisible, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isVisible']: !field.isVisible }))) }), _jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: field.isVisible }) }, { children: [_jsx(Icon, { children: "visibility" }), _jsx(FormattedMessage, { id: "ui.groupForm.visibility.visible", defaultMessage: "ui.groupForm.visibility.visible" })] }))] })), _jsx(Typography, Object.assign({ variant: "body2", className: classes.visibilitySectionInfo }, { children: !field.isVisible ? (_jsx(FormattedMessage, { id: "ui.groupForm.visibility.hidden.info", defaultMessage: "ui.groupForm.visibility.hidden.info", values: {
|
|
278
|
-
|
|
279
|
-
// @ts-ignore
|
|
280
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
271
|
+
b: (chunks) => _jsx("strong", { children: chunks }, "ui.groupForm.visibility.hidden.info.b")
|
|
281
272
|
} })) : (_jsx(FormattedMessage, { id: "ui.groupForm.visibility.visible.info", defaultMessage: "ui.groupForm.visibility.visible.info", values: {
|
|
282
|
-
|
|
283
|
-
// @ts-ignore
|
|
284
|
-
b: (chunks) => _jsx("strong", { children: chunks })
|
|
273
|
+
b: (chunks) => _jsx("strong", { children: chunks }, "ui.groupForm.visibility.visible.info.b")
|
|
285
274
|
} })) }))] })) })))] })), isPaymentsEnabled && isStaff && (_jsx(Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: _jsx(PaywallsConfigurator, Object.assign({}, (group && { contentId: group.id }), { contentType: SCContentType.GROUP, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) }))), !group && (_jsxs(_Fragment, { children: [_jsx(Divider, {}), _jsx(Box, Object.assign({ className: classes.inviteSection }, { children: _jsx(GroupInviteButton, { handleInvitations: handleInviteSection }) }))] }))] }) })));
|
|
286
275
|
}
|