@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
|
@@ -31,6 +31,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
31
31
|
*
|
|
32
32
|
*/
|
|
33
33
|
function UserProfileEditSkeleton() {
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: "grow" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", sx: { height: 20, width: '100%' } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", sx: { height: 20, width: '100%' } })] })) })) })));
|
|
35
35
|
}
|
|
36
36
|
exports.default = UserProfileEditSkeleton;
|
|
@@ -165,7 +165,7 @@ function UserSubscribedGroupsWidget(inProps) {
|
|
|
165
165
|
}
|
|
166
166
|
const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.title", defaultMessage: "ui.userSubscribedGroupsWidget.title", values: {
|
|
167
167
|
total: isMe ? state.results.filter((g) => g.subscription_status === types_1.SCGroupSubscriptionStatusType.SUBSCRIBED).length : state.count
|
|
168
|
-
} }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.subtitle.noResults", defaultMessage: "ui.userSubscribedGroupsWidget.subtitle.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, limit).map((group) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Group_1.default, Object.assign({ elevation: 0, group: group,
|
|
168
|
+
} }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.subtitle.noResults", defaultMessage: "ui.userSubscribedGroupsWidget.subtitle.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, limit).map((group) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Group_1.default, Object.assign({ elevation: 0, group: group, GroupSubscribeButtonComponentProps: { onSubscribe: handleOnSubscribe } }, GroupProps)) }, group.id))) }), limit < state.count && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.button.showAll", defaultMessage: "ui.userSubscribedGroupsWidget.button.showAll" }) }))), openDialog && ((0, jsx_runtime_1.jsxs)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.title", defaultMessage: "ui.userSubscribedGroupsWidget.title", values: { total: state.count } }), onClose: handleToggleDialogOpen, open: openDialog, scroll: "paper" }, DialogProps, { children: [(0, jsx_runtime_1.jsxs)(material_1.List, { children: [state.results.map((g) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Group_1.default, Object.assign({ elevation: 0, group: g, groupSubscribeButtonProps: { onSubscribe: handleOnSubscribe } }, GroupProps)) }, g.id))), state.isLoadingNext && ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Group_1.GroupSkeleton, Object.assign({ elevation: 0 }, GroupProps)) }))] }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userSubscribedGroupsWidget.noMoreResults", defaultMessage: "ui.userSubscribedGroupsWidget.noMoreResults" }) }))] })))] }))] }));
|
|
169
169
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: content })));
|
|
170
170
|
}
|
|
171
171
|
exports.default = UserSubscribedGroupsWidget;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LoadingButtonProps } from '@mui/lab';
|
|
2
1
|
import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
|
|
3
|
-
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
export interface VoteAudienceButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the contribution object to vote
|
|
6
6
|
* @default null
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const lab_1 = require("@mui/lab");
|
|
7
6
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
8
7
|
const system_1 = require("@mui/system");
|
|
9
8
|
const material_1 = require("@mui/material");
|
|
@@ -21,7 +20,7 @@ const classes = {
|
|
|
21
20
|
dialogTabs: `${PREFIX}-dialog-tabs`,
|
|
22
21
|
dialogVoteBadge: `${PREFIX}-dialog-vote-badge`
|
|
23
22
|
};
|
|
24
|
-
const Root = (0, material_1.styled)(
|
|
23
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
25
24
|
name: PREFIX,
|
|
26
25
|
slot: 'Root',
|
|
27
26
|
overridesResolver: (_props, styles) => [styles.root, styles.voted]
|
|
@@ -69,10 +68,10 @@ function VoteAudienceButton(inProps) {
|
|
|
69
68
|
// CONTEXT
|
|
70
69
|
const scUserContext = (0, react_core_1.useSCUser)();
|
|
71
70
|
// HANDLERS
|
|
72
|
-
const handleOpen = (
|
|
71
|
+
const handleOpen = () => {
|
|
73
72
|
setOpen(true);
|
|
74
73
|
};
|
|
75
|
-
const handleClose = (
|
|
74
|
+
const handleClose = () => {
|
|
76
75
|
setOpen(false);
|
|
77
76
|
};
|
|
78
77
|
const handleChangeTab = (_event, newValue) => {
|
|
@@ -105,7 +104,7 @@ function VoteAudienceButton(inProps) {
|
|
|
105
104
|
const audienceIcon = (0, react_1.useMemo)(() => {
|
|
106
105
|
if (reactions.default && !isLoading && !error) {
|
|
107
106
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.reactionList }, { children: contributionReactionsCount &&
|
|
108
|
-
contributionReactionsCount.slice(0, 3).map((count
|
|
107
|
+
contributionReactionsCount.slice(0, 3).map((count) => ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: (0, jsx_runtime_1.jsx)("img", { alt: count.reaction.label, src: count.reaction.image, width: "100%", height: "100%" }) }, count.reaction.id))) })));
|
|
109
108
|
}
|
|
110
109
|
return scUserContext.user && contributionVoted ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "thumb_up" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "thumb_up_off_alt" });
|
|
111
110
|
}, [reactions.default, isLoading, error, contributionReactionsCount, scUserContext.user, contributionVoted]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LoadingButtonProps } from '@mui/lab';
|
|
2
1
|
import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
|
|
3
|
-
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
export interface VoteButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the contribution object to vote
|
|
6
6
|
* @default null
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const lab_1 = require("@mui/lab");
|
|
7
6
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
8
7
|
const system_1 = require("@mui/system");
|
|
9
8
|
const material_1 = require("@mui/material");
|
|
@@ -19,7 +18,7 @@ const classes = {
|
|
|
19
18
|
reactionList: `${PREFIX}-reaction-list`,
|
|
20
19
|
reaction: `${PREFIX}-reaction`
|
|
21
20
|
};
|
|
22
|
-
const Root = (0, material_1.styled)(
|
|
21
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
23
22
|
name: PREFIX,
|
|
24
23
|
slot: 'Root',
|
|
25
24
|
overridesResolver: (_props, styles) => [styles.root, styles.voted]
|
|
@@ -72,7 +71,7 @@ function VoteButton(inProps) {
|
|
|
72
71
|
handleClearTimeout();
|
|
73
72
|
timeoutRef.current = setTimeout(() => setAnchorEl(event.target), 1000);
|
|
74
73
|
};
|
|
75
|
-
const handleMouseLeave = (
|
|
74
|
+
const handleMouseLeave = () => {
|
|
76
75
|
handleClearTimeout();
|
|
77
76
|
timeoutRef.current = setTimeout(() => setAnchorEl(null), 500);
|
|
78
77
|
};
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const react_1 = require("react");
|
|
8
7
|
const react_intl_1 = require("react-intl");
|
|
@@ -129,7 +128,9 @@ function AddUsersButton(inProps) {
|
|
|
129
128
|
const handleDelete = (0, react_1.useCallback)((userToDelete) => {
|
|
130
129
|
setInvited((prev) => prev.filter((user) => user.id !== userToDelete.id));
|
|
131
130
|
}, [setInvited]);
|
|
132
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ onClick: handleToggleDialogOpen, variant: variant, color: color, size: size, className: (0, classnames_1.default)(classes.root, classes.contrastColor, className) }, rest, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: label, defaultMessage: label }) })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: handleToggleDialogOpen, title: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.addUserButton.dialog.title", defaultMessage: "ui.addUserButton.dialog.title" }) })), actions: (0, jsx_runtime_1.jsx)(
|
|
131
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ onClick: handleToggleDialogOpen, variant: variant, color: color, size: size, className: (0, classnames_1.default)(classes.root, classes.contrastColor, className) }, rest, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: label, defaultMessage: label }) })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: handleToggleDialogOpen, title: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.addUserButton.dialog.title", defaultMessage: "ui.addUserButton.dialog.title" }) })), actions: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleConfirm, size: "medium", variant: "contained", autoFocus: true, disabled: !invited.length }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.addUserButton.dialog.confirm", defaultMessage: "ui.addUserButton.dialog.confirm" }) })) })), className: classes.dialogRoot }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.dialogAutocompleteWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { loading: loading, size: "small", multiple: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option === null || option === void 0 ? void 0 : option.username) || '...', isOptionEqualToValue: (option, value) => (option === null || option === void 0 ? void 0 : option.id) === value.id, loadingText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.addUserButton.autocomplete.loading", defaultMessage: "ui.addUserButton.autocomplete.loading" }), noOptionsText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.addUserButton.autocomplete.noResults", defaultMessage: "ui.addUserButton.autocomplete.noResults" }), renderTags: () => null, popupIcon: null, disableClearable: true, renderOption: (props, option) => ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ component: "li", flexDirection: "row", gap: "5px" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: option.username })] }))), renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, slotProps: {
|
|
132
|
+
input: Object.assign({}, params.InputProps)
|
|
133
|
+
} }))) }), (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.dialogChipWrapper }, { children: invited.map((option, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { avatar: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), label: option.username, onDelete: () => {
|
|
133
134
|
handleDelete(option);
|
|
134
135
|
} }, index))) }))] })) })))] }));
|
|
135
136
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const react_intl_1 = require("react-intl");
|
|
8
7
|
const PREFIX = 'SCConfirmDialog';
|
|
@@ -38,6 +37,6 @@ function ConfirmDialog(props) {
|
|
|
38
37
|
/**
|
|
39
38
|
* Renders root object
|
|
40
39
|
*/
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Root, { children: (0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ open: open, onClose: handleClose }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: title || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.confirmDialog.title", defaultMessage: "ui.confirmDialog.title" }) }), content && ((0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, Object.assign({ component: "div" }, { children: content })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleClose }, { children: btnCancel || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.confirmDialog.btnCancel", defaultMessage: "ui.confirmDialog.btnCancel" }) })), (0, jsx_runtime_1.jsx)(
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Root, { children: (0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ open: open, onClose: handleClose }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: title || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.confirmDialog.title", defaultMessage: "ui.confirmDialog.title" }) }), content && ((0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, Object.assign({ component: "div" }, { children: content })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleClose }, { children: btnCancel || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.confirmDialog.btnCancel", defaultMessage: "ui.confirmDialog.btnCancel" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleConfirm, variant: "contained", autoFocus: true, loading: isUpdating }, { children: btnConfirm || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.confirmDialog.btnConfirm", defaultMessage: "ui.confirmDialog.btnConfirm" }) }))] })] })) }));
|
|
42
41
|
}
|
|
43
42
|
exports.default = ConfirmDialog;
|
|
@@ -728,7 +728,7 @@ function ContributionActionsMenu(props) {
|
|
|
728
728
|
*/
|
|
729
729
|
function renderFlagContributionSection() {
|
|
730
730
|
const open = openSection === ContributionsActionsMenu_1.FLAG_CONTRIBUTION_SECTION;
|
|
731
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: !contributionObj.deleted && !contributionObj.collapsed && ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem, disabled: isFlagging, onClick: () => handleOpenSection(ContributionsActionsMenu_1.FLAG_CONTRIBUTION_SECTION) }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: flagType !== undefined && flagType !== null ? ((0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ classes: { badge: classes.sectionBadge }, badgeContent: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.sectionWithSelectionIcon }, { children: "check" })), color: "primary" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" })) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.flagContributionWithMotivation", defaultMessage: "ui.contributionActionMenu.flagContributionWithMotivation" }) }), open ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] })), (0, jsx_runtime_1.jsxs)(material_1.Collapse, Object.assign({ in: open, timeout: "auto", unmountOnExit: true }, { children: [renderReports(ContributionsActionsMenu_1.FLAG_CONTRIBUTION_SECTION), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant:
|
|
731
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: !contributionObj.deleted && !contributionObj.collapsed && ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem, disabled: isFlagging, onClick: () => handleOpenSection(ContributionsActionsMenu_1.FLAG_CONTRIBUTION_SECTION) }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: flagType !== undefined && flagType !== null ? ((0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ classes: { badge: classes.sectionBadge }, badgeContent: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.sectionWithSelectionIcon }, { children: "check" })), color: "primary" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "outlined_flag" })) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.flagContributionWithMotivation", defaultMessage: "ui.contributionActionMenu.flagContributionWithMotivation" }) }), open ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] })), (0, jsx_runtime_1.jsxs)(material_1.Collapse, Object.assign({ in: open, timeout: "auto", unmountOnExit: true }, { children: [renderReports(ContributionsActionsMenu_1.FLAG_CONTRIBUTION_SECTION), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "caption", component: "div", className: classes.footerSubItems }, { children: intl.formatMessage(messages.footer) }))] }))] })) }));
|
|
732
732
|
}
|
|
733
733
|
/**
|
|
734
734
|
* Renders section hide actions
|
|
@@ -808,15 +808,9 @@ function ContributionActionsMenu(props) {
|
|
|
808
808
|
/**
|
|
809
809
|
* Renders component
|
|
810
810
|
*/
|
|
811
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton
|
|
812
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
813
|
-
// @ts-ignore
|
|
814
|
-
, Object.assign({
|
|
815
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
816
|
-
// @ts-ignore
|
|
817
|
-
ref: (ref) => {
|
|
811
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ ref: (ref) => {
|
|
818
812
|
popperRef.current = ref;
|
|
819
|
-
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: contributionObj && (contributionObj.collapsed || contributionObj.deleted) ? ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: classes.visibilityIcons }, { children: [contributionObj.collapsed ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility_off" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }), (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] }))) : ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" })) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant:
|
|
813
|
+
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: contributionObj && (contributionObj.collapsed || contributionObj.deleted) ? ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: classes.visibilityIcons }, { children: [contributionObj.collapsed ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility_off" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }), (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] }))) : ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" })) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: (0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, Object.assign({ open: openConfirmDialog }, (currentAction === ContributionsActionsMenu_1.DELETE_CONTRIBUTION
|
|
820
814
|
? {
|
|
821
815
|
content: ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.deleteContributionInfo", defaultMessage: "ui.contributionActionMenu.deleteContributionInfo" }))
|
|
822
816
|
}
|
|
@@ -15,7 +15,7 @@ const classes = {
|
|
|
15
15
|
const Root = (0, material_1.styled)(material_1.TextField, {
|
|
16
16
|
name: PREFIX,
|
|
17
17
|
slot: 'Root',
|
|
18
|
-
overridesResolver: (
|
|
18
|
+
overridesResolver: (_props, styles) => styles.root
|
|
19
19
|
})(({ theme }) => ({
|
|
20
20
|
[`& .${classes.btnCopy}`]: {
|
|
21
21
|
color: theme.palette.secondary.main
|
|
@@ -66,11 +66,17 @@ function CopyTextField(inProps) {
|
|
|
66
66
|
};
|
|
67
67
|
const button = ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "Copy text", edge: "end", onClick: () => handleCopy(value), className: classes.btnCopy }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "insert_link" }) })));
|
|
68
68
|
// RENDER
|
|
69
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), label: label ? label : (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.copyTextField.textToCopy", defaultMessage: "ui.shared.copyTextField.textToCopy" }), margin: "normal", variant: "outlined", disabled: true, fullWidth: true, value: value, multiline: true, onChange: handleChange,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), label: label ? label : (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.copyTextField.textToCopy", defaultMessage: "ui.shared.copyTextField.textToCopy" }), margin: "normal", variant: "outlined", disabled: true, fullWidth: true, value: value, multiline: true, onChange: handleChange, slotProps: {
|
|
70
|
+
input: {
|
|
71
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: openConfirm ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ open: openConfirm, slotProps: {
|
|
72
|
+
popper: {
|
|
73
|
+
open: true
|
|
74
|
+
}
|
|
75
|
+
}, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.copyTextField.textCopied", defaultMessage: "ui.shared.copyTextField.textCopied" }) }, { children: button }))) : ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.copyTextField.textToCopy", defaultMessage: "ui.shared.copyTextField.textToCopy" }) }, { children: button }))) })))
|
|
76
|
+
},
|
|
77
|
+
inputLabel: {
|
|
78
|
+
shrink: true
|
|
79
|
+
}
|
|
74
80
|
} }, rest)));
|
|
75
81
|
}
|
|
76
82
|
exports.default = CopyTextField;
|
|
@@ -4,7 +4,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_intl_1 = require("react-intl");
|
|
7
|
-
const lab_1 = require("@mui/lab");
|
|
8
7
|
const types_1 = require("@selfcommunity/types");
|
|
9
8
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
10
9
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -48,7 +47,7 @@ function ChangeUserStatus(props) {
|
|
|
48
47
|
});
|
|
49
48
|
});
|
|
50
49
|
}, [course, user, setLoading, setValue]);
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ size: "small", value: value, onChange: handleChange }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option }, { children: (0, jsx_runtime_1.jsx)(
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ size: "small", value: value, onChange: handleChange }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
|
|
52
51
|
padding: 0,
|
|
53
52
|
':hover': {
|
|
54
53
|
backgroundColor: 'unset'
|
|
@@ -6,7 +6,6 @@ const material_1 = require("@mui/material");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const react_intl_1 = require("react-intl");
|
|
8
8
|
const RowSkeleton_1 = tslib_1.__importDefault(require("./RowSkeleton"));
|
|
9
|
-
const lab_1 = require("@mui/lab");
|
|
10
9
|
const types_1 = require("@selfcommunity/types");
|
|
11
10
|
const constants_1 = require("./constants");
|
|
12
11
|
const EmptyStatus_1 = tslib_1.__importDefault(require("../EmptyStatus"));
|
|
@@ -139,9 +138,11 @@ function CourseUsersTable(inProps) {
|
|
|
139
138
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { ref: inputRef, placeholder: intl.formatMessage({
|
|
140
139
|
id: 'ui.courseUsersTable.searchBar.placeholder',
|
|
141
140
|
defaultMessage: 'ui.courseUsersTable.searchBar.placeholder'
|
|
142
|
-
}),
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
}), slotProps: {
|
|
142
|
+
input: {
|
|
143
|
+
startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))),
|
|
144
|
+
endAdornment: value.length > 0 ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.endAdornmentWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ color: "inherit", onClick: handleSearchClear }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })) })), (0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "primary", variant: "contained", onClick: handleSearchStart, loading: loadingSearch, disabled: loadingSearch, className: classes.searchButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) })) }))] }))) : undefined
|
|
145
|
+
}
|
|
145
146
|
}, value: value, onChange: handleChange, disabled: users.length === 0 && value.length === 0, fullWidth: true, className: classes.search }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { children: headerCells.map((cell, i, array) => {
|
|
146
147
|
if (i === array.length - 1) {
|
|
147
148
|
return (0, jsx_runtime_1.jsx)(material_1.TableCell, { width: "14%" }, i);
|
|
@@ -150,6 +151,6 @@ function CourseUsersTable(inProps) {
|
|
|
150
151
|
}) }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [users.length > 0 &&
|
|
151
152
|
users.map((user, i) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.avatarWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: user.username, src: user.avatar }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: user.username }))] })) }), mode === course_1.SCCourseUsersTableModeType.DASHBOARD && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.progressWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.LinearProgress, { className: classes.progress, variant: "determinate", value: user.user_completion_rate }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: `${Math.round(user.user_completion_rate)}%` }))] })) })), mode === course_1.SCCourseUsersTableModeType.EDIT && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: user.join_status !== types_1.SCCourseJoinStatusType.CREATOR && scUserContext.user.id !== user.id ? ((0, jsx_runtime_1.jsx)(ChangeUsersStatus_1.default, { course: course, user: user })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.editCourse.tab.users.table.select.${user.join_status}`, defaultMessage: `ui.editCourse.tab.users.table.select.${user.join_status}` }) }))) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedDate, { value: mode === course_1.SCCourseUsersTableModeType.REQUESTS ? user.date_joined : user.joined_at || new Date() }) })) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedDate, { value: mode === course_1.SCCourseUsersTableModeType.REQUESTS ? user.date_joined : user.last_active_at || new Date() }) })) }), mode === course_1.SCCourseUsersTableModeType.EDIT &&
|
|
152
153
|
user.join_status !== types_1.SCCourseJoinStatusType.CREATOR &&
|
|
153
|
-
scUserContext.user.id !== user.id ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(RemoveButton_1.default, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) })) : (mode === course_1.SCCourseUsersTableModeType.EDIT && (0, jsx_runtime_1.jsx)(material_1.TableCell, {})), mode === course_1.SCCourseUsersTableModeType.DASHBOARD && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(SeeProgressButton_1.default, { course: course, user: user }) })), mode === course_1.SCCourseUsersTableModeType.REQUESTS && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(RequestButton_1.default, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) }))] }, i))), state.isLoadingNext && (0, jsx_runtime_1.jsx)(RowSkeleton_1.default, { editMode: mode !== course_1.SCCourseUsersTableModeType.DASHBOARD })] })] }) }), users.length > 0 && ((0, jsx_runtime_1.jsx)(
|
|
154
|
+
scUserContext.user.id !== user.id ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(RemoveButton_1.default, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) })) : (mode === course_1.SCCourseUsersTableModeType.EDIT && (0, jsx_runtime_1.jsx)(material_1.TableCell, {})), mode === course_1.SCCourseUsersTableModeType.DASHBOARD && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(SeeProgressButton_1.default, { course: course, user: user }) })), mode === course_1.SCCourseUsersTableModeType.REQUESTS && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(RequestButton_1.default, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) }))] }, i))), state.isLoadingNext && (0, jsx_runtime_1.jsx)(RowSkeleton_1.default, { editMode: mode !== course_1.SCCourseUsersTableModeType.DASHBOARD })] })] }) }), users.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: state.isLoadingNext, disabled: value.length > 0 || !state.next, className: classes.loadingButton, onClick: handleNext }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.btn.label", defaultMessage: "ui.courseUsersTable.btn.label" }) })) }))), users.length === 0 && ((0, jsx_runtime_1.jsx)(EmptyStatus_1.default, { icon: "face", title: value.length > 0 ? 'ui.courseUsersTable.empty.search.title' : emptyStatusTitle, description: value.length > 0 ? 'ui.courseUsersTable.empty.search.description' : emptyStatusDescription })), dialog && (0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: true, onClose: () => handleOpenDialog(null), onConfirm: handleConfirm })] })));
|
|
154
155
|
}
|
|
155
156
|
exports.default = (0, react_1.memo)(CourseUsersTable);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
8
7
|
const react_1 = require("react");
|
|
@@ -46,6 +45,6 @@ function RemoveButton(props, ref) {
|
|
|
46
45
|
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
47
46
|
handleManageUser: (userToRemove) => handleSubmit(userToRemove)
|
|
48
47
|
}), [handleSubmit]);
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: course_1.SCCourseEditTabType.USERS, user }), loading: loading, disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })));
|
|
50
49
|
}
|
|
51
50
|
exports.default = (0, react_1.memo)((0, react_1.forwardRef)(RemoveButton));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
8
7
|
const react_1 = require("react");
|
|
@@ -74,6 +73,6 @@ function RequestButton(props, ref) {
|
|
|
74
73
|
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
75
74
|
handleManageUser: (userToReject) => handleReject(userToReject)
|
|
76
75
|
}), [handleReject]);
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.requestButtonWrapper }, { children: [(0, jsx_runtime_1.jsx)(
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.requestButtonWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleAccept, loading: acceptLoading, disabled: acceptLoading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: course_1.SCCourseEditTabType.REQUESTS, request: user }), loading: rejectLoading, disabled: rejectLoading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] })));
|
|
78
77
|
}
|
|
79
78
|
exports.default = (0, react_1.memo)((0, react_1.forwardRef)(RequestButton));
|
|
@@ -16,8 +16,8 @@ const classes = {
|
|
|
16
16
|
const Root = (0, material_1.styled)(notistack_1.SnackbarContent, {
|
|
17
17
|
name: PREFIX,
|
|
18
18
|
slot: 'Root',
|
|
19
|
-
overridesResolver: (
|
|
20
|
-
})((
|
|
19
|
+
overridesResolver: (_props, styles) => styles.root
|
|
20
|
+
})(() => ({}));
|
|
21
21
|
/**
|
|
22
22
|
* Custom Snackbar for notistack messages
|
|
23
23
|
* Use this component:
|
|
@@ -13,7 +13,7 @@ const classes = {
|
|
|
13
13
|
const Root = (0, material_1.styled)(material_1.Box, {
|
|
14
14
|
name: PREFIX,
|
|
15
15
|
slot: 'Root',
|
|
16
|
-
overridesResolver: (
|
|
16
|
+
overridesResolver: (_props, styles) => [styles.root]
|
|
17
17
|
})(() => ({
|
|
18
18
|
width: 'auto',
|
|
19
19
|
display: 'inline-flex',
|
|
@@ -37,7 +37,7 @@ function DateTimeAgo(props) {
|
|
|
37
37
|
*/
|
|
38
38
|
if (date) {
|
|
39
39
|
const formattedDate = (0, formatRelativeTime_1.getRelativeTime)(date);
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ as: "span", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [showStartIcon && (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "access_time" }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: `${intl.formatDate(date, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' })}`, enterTouchDelay: 0 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedRelativeTime, { value: -formattedDate.value, unit: formattedDate.unit, numeric: "auto" }) })) }))] })));
|
|
41
41
|
}
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PickerProps } from 'emoji-picker-react';
|
|
2
|
-
interface EmojiPickerProps extends PickerProps {
|
|
2
|
+
export interface EmojiPickerProps extends PickerProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
export default function EmojiPicker(inProps: EmojiPickerProps): JSX.Element;
|
|
6
|
-
export {};
|
|
@@ -165,6 +165,14 @@ function EventActionsMenu(inProps) {
|
|
|
165
165
|
if (!scEvent) {
|
|
166
166
|
return null;
|
|
167
167
|
}
|
|
168
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { onClick: handleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), isMobile ? ((0, jsx_runtime_1.jsx)(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: Boolean(anchorEl), onClose: handleClose, onOpen: handleOpen,
|
|
168
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { onClick: handleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), isMobile ? ((0, jsx_runtime_1.jsx)(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: Boolean(anchorEl), onClose: handleClose, onOpen: handleOpen, slotProps: {
|
|
169
|
+
paper: {
|
|
170
|
+
className: classes.paper
|
|
171
|
+
}
|
|
172
|
+
}, disableSwipeToOpen: true }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: renderList() }) }))) : ((0, jsx_runtime_1.jsx)(MenuRoot, Object.assign({ className: classes.menuRoot, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, slotProps: {
|
|
173
|
+
paper: {
|
|
174
|
+
className: classes.paper
|
|
175
|
+
}
|
|
176
|
+
} }, { children: renderList() }))), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openConfirmDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.eventActionsMenu.dialog.msg", defaultMessage: "ui.shared.eventActionsMenu.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.shared.eventActionsMenu.dialog.confirm", defaultMessage: "ui.shared.eventActionsMenu.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog })), openEdit && (0, jsx_runtime_1.jsx)(EventForm_1.default, { onClose: handleEditClick, event: scEvent, onSuccess: handleEditSuccess })] }));
|
|
169
177
|
}
|
|
170
178
|
exports.default = EventActionsMenu;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const styles_1 = require("@mui/material/styles");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const Widget_1 = tslib_1.__importDefault(require("../../components/Widget"));
|
|
8
7
|
const system_1 = require("@mui/system");
|
|
@@ -13,11 +12,11 @@ const classes = {
|
|
|
13
12
|
root: `${PREFIX}-root`,
|
|
14
13
|
header: `${PREFIX}-header`
|
|
15
14
|
};
|
|
16
|
-
const Root = (0,
|
|
15
|
+
const Root = (0, material_1.styled)(Widget_1.default, {
|
|
17
16
|
name: PREFIX,
|
|
18
17
|
slot: 'Root',
|
|
19
|
-
overridesResolver: (
|
|
20
|
-
})((
|
|
18
|
+
overridesResolver: (_props, styles) => styles.root
|
|
19
|
+
})(() => ({}));
|
|
21
20
|
/**
|
|
22
21
|
* > API documentation for the Community-JS HiddenPurchasableContent component. Learn about the available props and the CSS API.
|
|
23
22
|
|
|
@@ -22,6 +22,6 @@ function ScrolleableTop() {
|
|
|
22
22
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h1", { children: "demo: Infinite Scroll on top" }), (0, jsx_runtime_1.jsx)("hr", {}), (0, jsx_runtime_1.jsx)("div", Object.assign({ id: "scrollableDiv", style: {
|
|
23
23
|
height: 300,
|
|
24
24
|
overflow: 'auto'
|
|
25
|
-
} }, { children: (0, jsx_runtime_1.jsx)(index_1.default, Object.assign({ dataLength: items.length, previous: fetchMoreData, hasMorePrevious: true, loaderPrevious: (0, jsx_runtime_1.jsx)("h4", { children: "Loading prev..." }), scrollableTarget: "scrollableDiv", scrollThreshold:
|
|
25
|
+
} }, { children: (0, jsx_runtime_1.jsx)(index_1.default, Object.assign({ dataLength: items.length, previous: fetchMoreData, hasMorePrevious: true, loaderPrevious: (0, jsx_runtime_1.jsx)("h4", { children: "Loading prev..." }), scrollableTarget: "scrollableDiv", scrollThreshold: "0px" }, { children: items.map((_, index) => ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: style }, { children: ["div - #", index] }), index))) })) }))] }));
|
|
26
26
|
}
|
|
27
27
|
exports.default = ScrolleableTop;
|
|
@@ -181,14 +181,8 @@ function LessonCommentActionsMenu(props) {
|
|
|
181
181
|
/**
|
|
182
182
|
* Renders component
|
|
183
183
|
*/
|
|
184
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton
|
|
185
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
, Object.assign({
|
|
188
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
189
|
-
// @ts-ignore
|
|
190
|
-
ref: (ref) => {
|
|
184
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ ref: (ref) => {
|
|
191
185
|
popperRef.current = ref;
|
|
192
|
-
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant:
|
|
186
|
+
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: (0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openConfirmDialog, onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) }))] })));
|
|
193
187
|
}
|
|
194
188
|
exports.default = LessonCommentActionsMenu;
|
|
@@ -25,7 +25,7 @@ const BaseLightbox = (props) => {
|
|
|
25
25
|
/**
|
|
26
26
|
* Renders root object
|
|
27
27
|
*/
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: classes.root, images: images, visible: visible && index !== -1, index: currentImageIndex, onIndexChange: handleIndexChange, onClose: onClose, afterClose: afterClose, loadingElement: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color:
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: classes.root, images: images, visible: visible && index !== -1, index: currentImageIndex, onIndexChange: handleIndexChange, onClose: onClose, afterClose: afterClose, loadingElement: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "primary" }), toolbarRender: toolbarRender
|
|
29
29
|
? toolbarRender
|
|
30
30
|
: () => {
|
|
31
31
|
return toolbarButtons;
|
|
@@ -63,7 +63,7 @@ exports.default = (props) => {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
setPreview(index);
|
|
66
|
-
onMediaClick(images[index]);
|
|
66
|
+
onMediaClick === null || onMediaClick === void 0 ? void 0 : onMediaClick(images[index]);
|
|
67
67
|
}, [gallery, setPreview, images, onMediaClick]);
|
|
68
68
|
// RENDERING
|
|
69
69
|
const renderTitle = (o) => {
|
|
@@ -87,21 +87,19 @@ exports.default = (props) => {
|
|
|
87
87
|
const overlay = images.length > maxVisible && maxVisible == 1 ? renderCountOverlay(true) : renderOverlay(0);
|
|
88
88
|
const isGif = images[0]['image_mimetype'] ? images[0]['image_mimetype'].includes('image/gif') : false;
|
|
89
89
|
const isLandscape = images[0].image_height < images[0].image_width;
|
|
90
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, style: Object.assign({}, (images[0].image_thumbnail && images[0].image_thumbnail.color ? { backgroundColor: images[0].image_thumbnail.color } : {})) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({
|
|
91
|
-
root: (0, classnames_1.default)(classes.border, classes.heightOne, Object.assign(Object.assign({}, (isGif || isLandscape ? { [classes.background]: true } : { [classes.backgroundPortrait]: true })), { [classes.gallery]: gallery, [classes.heightHalfOne]: images.length > 1 }))
|
|
92
|
-
}, onClick: () => openPreviewImage(0), style: Object.assign({ background: `url(${getImageUrl(images[0], inView && isGif)})` }, (isLandscape ? { paddingTop: `${(100 * images[0].image_height) / images[0].image_width}%` } : {})) }, { children: [overlay, renderTitle(images[0])] })) })));
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", style: Object.assign({}, (images[0].image_thumbnail && images[0].image_thumbnail.color ? { backgroundColor: images[0].image_thumbnail.color } : {})) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ ref: ref, size: 12, className: (0, classnames_1.default)(classes.border, classes.heightOne, Object.assign(Object.assign({}, (isGif || isLandscape ? { [classes.background]: true } : { [classes.backgroundPortrait]: true })), { [classes.gallery]: gallery, [classes.heightHalfOne]: images.length > 1 })), onClick: () => openPreviewImage(0), style: Object.assign({ background: `url(${getImageUrl(images[0], inView && isGif)})` }, (isLandscape ? { paddingTop: `${(100 * images[0].image_height) / images[0].image_width}%` } : {})) }, { children: [overlay, renderTitle(images[0])] })) })));
|
|
93
91
|
};
|
|
94
92
|
const renderTwo = () => {
|
|
95
93
|
const overlay = images.length > maxVisible && [2, 3].includes(+maxVisible) ? renderCountOverlay(true) : renderOverlay(1);
|
|
96
94
|
const conditionalRender = [3, 4].includes(images.length) || (images.length > +maxVisible && [3, 4].includes(+maxVisible));
|
|
97
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({
|
|
95
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 6, className: (0, classnames_1.default)(classes.border, classes.heightTwo, classes.background, { [classes.gallery]: gallery }), onClick: () => openPreviewImage(conditionalRender ? 1 : 0), style: { background: `url(${getImageUrl(conditionalRender ? images[1] : images[0])})` } }, { children: [renderOverlay(conditionalRender ? 1 : 0), renderTitle(images[0])] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 6, className: (0, classnames_1.default)(classes.border, classes.heightTwo, classes.background, { [classes.gallery]: gallery }), onClick: () => openPreviewImage(conditionalRender ? 2 : 1), style: { background: `url(${getImageUrl(conditionalRender ? images[2] : images[1])})` } }, { children: [overlay, renderTitle(images[1])] }))] })));
|
|
98
96
|
};
|
|
99
97
|
const renderThree = () => {
|
|
100
98
|
const conditionalRender = images.length == 4 || (images.length > +maxVisible && +maxVisible == 4);
|
|
101
99
|
const overlay = !maxVisible || maxVisible > 5 || (images.length > maxVisible && [4, 5].includes(+maxVisible))
|
|
102
100
|
? renderCountOverlay(true)
|
|
103
101
|
: renderOverlay(conditionalRender ? 3 : 4);
|
|
104
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({
|
|
102
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 4, className: (0, classnames_1.default)(classes.border, classes.heightThree, classes.background, { [classes.gallery]: gallery }), onClick: () => openPreviewImage(conditionalRender ? 1 : 2), style: { background: `url(${getImageUrl(conditionalRender ? images[1] : images[2])})` } }, { children: [renderOverlay(conditionalRender ? 1 : 2), renderTitle(images[1])] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 4, className: (0, classnames_1.default)(classes.border, classes.heightThree, classes.background, { [classes.gallery]: gallery }), onClick: () => openPreviewImage(conditionalRender ? 2 : 3), style: { background: `url(${getImageUrl(conditionalRender ? images[2] : images[3])})` } }, { children: [renderOverlay(conditionalRender ? 2 : 3), renderTitle(images[2])] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ size: 4, className: (0, classnames_1.default)(classes.border, classes.heightThree, classes.background, { [classes.gallery]: gallery }), onClick: () => openPreviewImage(conditionalRender ? 3 : 4), style: { background: `url(${getImageUrl(conditionalRender ? images[3] : images[4])})` } }, { children: [overlay, renderTitle(images[3])] }))] })));
|
|
105
103
|
};
|
|
106
104
|
const renderOverlay = (id) => {
|
|
107
105
|
if (!gallery) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { SCMediaType } from '@selfcommunity/types';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
2
3
|
interface DocComponentProps {
|
|
3
4
|
document: SCMediaType;
|
|
4
5
|
index?: number;
|
|
5
6
|
onDelete?: (id: number) => void;
|
|
6
7
|
handleDownload?: (id: number) => void;
|
|
7
8
|
onMediaClick?: (media: SCMediaType) => void;
|
|
9
|
+
className?: HTMLAttributes<HTMLDivElement>['className'];
|
|
8
10
|
}
|
|
9
11
|
export default function DocComponent(props: DocComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -7,6 +7,7 @@ const constants_1 = require("./constants");
|
|
|
7
7
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
8
8
|
const types_1 = require("@selfcommunity/types");
|
|
9
9
|
const react_1 = require("react");
|
|
10
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
11
|
const txt_1 = tslib_1.__importDefault(require("../../../assets/composer/txt"));
|
|
11
12
|
const pdf_1 = tslib_1.__importDefault(require("../../../assets/composer/pdf"));
|
|
12
13
|
const doc_1 = tslib_1.__importDefault(require("../../../assets/composer/doc"));
|
|
@@ -36,7 +37,7 @@ function formatBytes(bytes, decimals = 2) {
|
|
|
36
37
|
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
37
38
|
}
|
|
38
39
|
function DocComponent(props) {
|
|
39
|
-
const { document, index, onDelete, handleDownload, onMediaClick } = props;
|
|
40
|
+
const { document, index, onDelete, handleDownload, onMediaClick, className } = props;
|
|
40
41
|
const getImage = (0, react_1.useCallback)(() => {
|
|
41
42
|
switch (document.mimetype) {
|
|
42
43
|
case types_1.SCMimeTypes.PLAIN_TEXT:
|
|
@@ -71,6 +72,6 @@ function DocComponent(props) {
|
|
|
71
72
|
return fallback_1.default;
|
|
72
73
|
}
|
|
73
74
|
}, [document.mimetype]);
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.docRoot }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: document.title, src: getImage() }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.textWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: document.title })), document.size && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.subtitle }, { children: formatBytes(document.size) }))] })), (handleDownload || onDelete) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.actionWrapper }, { children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => onDelete(document.id) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))), handleDownload && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [document.mimetype === types_1.SCMimeTypes.PDF && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, component: react_core_1.Link, to: document.url, target: "_blank", onClick: () => onMediaClick === null || onMediaClick === void 0 ? void 0 : onMediaClick(document) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => handleDownload(index) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))] }))] })))] })));
|
|
75
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.docRoot, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: document.title, src: getImage() }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.textWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title }, { children: document.title })), document.size && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.subtitle }, { children: formatBytes(document.size) }))] })), (handleDownload || onDelete) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.actionWrapper }, { children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => onDelete(document.id) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))), handleDownload && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [document.mimetype === types_1.SCMimeTypes.PDF && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, component: react_core_1.Link, to: document.url, target: "_blank", onClick: () => onMediaClick === null || onMediaClick === void 0 ? void 0 : onMediaClick(document) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => handleDownload(index) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))] }))] })))] })));
|
|
75
76
|
}
|
|
76
77
|
exports.default = DocComponent;
|