@selfcommunity/react-ui 0.11.0-mui7.29 → 0.11.0-react-17.0.1.3
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 +2 -1
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -1
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +11 -6
- package/lib/cjs/components/AccountDelete/AccountDelete.js +12 -5
- package/lib/cjs/components/AccountRecover/AccountRecover.js +4 -2
- package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
- package/lib/cjs/components/BuyButton/BuyButton.js +5 -8
- 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 +1 -3
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +4 -3
- package/lib/cjs/components/ChangeCover/ChangeCover.js +6 -2
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +2 -1
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -1
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
- package/lib/cjs/components/Checkout/Skeleton.js +3 -1
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +3 -2
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.js +3 -2
- package/lib/cjs/components/Composer/Composer.js +4 -3
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -4
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +5 -12
- 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 +2 -1
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +2 -1
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +2 -1
- package/lib/cjs/components/CourseForm/CourseForm.js +6 -9
- package/lib/cjs/components/CourseForm/Edit.js +2 -6
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +2 -1
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +4 -3
- package/lib/cjs/components/Courses/Courses.d.ts +4 -0
- package/lib/cjs/components/Courses/Courses.js +10 -9
- package/lib/cjs/components/Courses/Skeleton.js +1 -1
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +8 -5
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
- package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -2
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +2 -1
- package/lib/cjs/components/EditCourse/Options.js +2 -1
- 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 +2 -4
- package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
- package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +3 -5
- package/lib/cjs/components/EventForm/EventAddress.js +5 -9
- package/lib/cjs/components/EventForm/EventForm.js +51 -89
- package/lib/cjs/components/EventForm/UploadEventCover.js +2 -1
- package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +2 -3
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +16 -5
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -1
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +2 -1
- package/lib/cjs/components/EventMediaWidget/index.d.ts +1 -2
- package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
- package/lib/cjs/components/Events/Events.d.ts +4 -0
- package/lib/cjs/components/Events/Events.js +9 -14
- package/lib/cjs/components/Events/LocationEventsFilter.js +1 -5
- package/lib/cjs/components/Events/OngoingEventsFilter.js +2 -6
- package/lib/cjs/components/Events/PastEventsFilter.js +2 -6
- package/lib/cjs/components/Events/Skeleton.js +1 -1
- package/lib/cjs/components/Feed/Feed.js +10 -9
- package/lib/cjs/components/Feed/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.js +3 -2
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +3 -2
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +2 -1
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
- 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 +2 -1
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +2 -1
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +3 -2
- package/lib/cjs/components/GroupActionsMenu/index.js +1 -9
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +3 -5
- package/lib/cjs/components/GroupForm/GroupForm.js +27 -16
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +7 -8
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -3
- package/lib/cjs/components/Groups/Groups.js +9 -9
- package/lib/cjs/components/Groups/Skeleton.js +2 -1
- 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 +4 -3
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -3
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +2 -1
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +4 -3
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +2 -1
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +12 -15
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +16 -17
- 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/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
- 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 +10 -5
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -4
- package/lib/cjs/components/Notification/Event/Event.js +12 -7
- package/lib/cjs/components/Notification/Group/Group.js +4 -3
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +9 -4
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
- package/lib/cjs/components/Notification/Notification.js +9 -17
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +5 -4
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -6
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -6
- 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 +4 -12
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +27 -19
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +25 -9
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +5 -7
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +26 -39
- 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 +6 -8
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
- 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 +4 -6
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
- 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 +7 -9
- 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 +1 -3
- package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +8 -9
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +6 -4
- package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +4 -4
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +22 -30
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
- package/lib/cjs/components/UserCounters/UserCounters.js +13 -5
- 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 +3 -24
- package/lib/cjs/components/UserPaymentMethods/Skeleton.js +4 -2
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +9 -8
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +2 -1
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +20 -9
- package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +5 -4
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/cjs/components/VoteButton/VoteButton.js +3 -2
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +2 -3
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +2 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.js +9 -3
- package/lib/cjs/shared/CopyTextArea/index.js +6 -13
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +2 -1
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +5 -6
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +2 -1
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +2 -1
- 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 +2 -1
- package/lib/cjs/shared/EventActionsMenu/index.js +1 -9
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +8 -2
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +6 -4
- package/lib/cjs/shared/Media/File/DocComponent.d.ts +0 -2
- package/lib/cjs/shared/Media/File/DocComponent.js +2 -3
- package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/cjs/shared/Media/File/TriggerButton.js +1 -9
- 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 +12 -4
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +1 -3
- package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
- package/lib/cjs/shared/PasswordTextField/index.js +5 -7
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/TagChip/index.d.ts +48 -2
- package/lib/cjs/shared/TagChip/index.js +2 -2
- package/lib/cjs/shared/Tags/index.js +1 -1
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +3 -2
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +3 -2
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +12 -7
- package/lib/esm/components/AccountDelete/AccountDelete.js +13 -6
- package/lib/esm/components/AccountRecover/AccountRecover.js +4 -2
- package/lib/esm/components/BroadcastMessages/Message.js +1 -1
- package/lib/esm/components/BuyButton/BuyButton.js +6 -9
- 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 +2 -4
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +5 -4
- package/lib/esm/components/ChangeCover/ChangeCover.js +6 -2
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +3 -2
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +3 -2
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
- package/lib/esm/components/Checkout/Skeleton.js +4 -2
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +4 -3
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.js +3 -2
- package/lib/esm/components/Composer/Composer.js +5 -4
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +3 -5
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +5 -12
- 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 +2 -1
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +2 -1
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +2 -1
- package/lib/esm/components/CourseForm/CourseForm.js +7 -10
- package/lib/esm/components/CourseForm/Edit.js +2 -6
- package/lib/esm/components/CourseForm/UploadCourseCover.js +3 -2
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +5 -4
- package/lib/esm/components/Courses/Courses.d.ts +4 -0
- package/lib/esm/components/Courses/Courses.js +9 -9
- package/lib/esm/components/Courses/Skeleton.js +1 -1
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +9 -6
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
- package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +4 -3
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +3 -2
- package/lib/esm/components/EditCourse/Options.js +3 -2
- 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 +2 -4
- package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
- package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +4 -6
- package/lib/esm/components/EventForm/EventAddress.js +5 -9
- package/lib/esm/components/EventForm/EventForm.js +53 -91
- package/lib/esm/components/EventForm/UploadEventCover.js +3 -2
- package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +2 -3
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +16 -5
- package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -1
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +3 -2
- package/lib/esm/components/EventMediaWidget/index.d.ts +1 -2
- package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
- package/lib/esm/components/Events/Events.d.ts +4 -0
- package/lib/esm/components/Events/Events.js +8 -14
- package/lib/esm/components/Events/LocationEventsFilter.js +1 -5
- package/lib/esm/components/Events/OngoingEventsFilter.js +2 -6
- package/lib/esm/components/Events/PastEventsFilter.js +2 -6
- package/lib/esm/components/Events/Skeleton.js +1 -1
- package/lib/esm/components/Feed/Feed.js +11 -10
- package/lib/esm/components/Feed/Skeleton.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Actions.js +3 -2
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +4 -3
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +2 -1
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
- 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 +3 -2
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +3 -2
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +4 -3
- package/lib/esm/components/GroupActionsMenu/index.js +1 -9
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +4 -6
- package/lib/esm/components/GroupForm/GroupForm.js +28 -17
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +7 -8
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +5 -4
- package/lib/esm/components/Groups/Groups.js +9 -9
- package/lib/esm/components/Groups/Skeleton.js +2 -1
- 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 +5 -4
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +5 -4
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +3 -2
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +5 -4
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +3 -2
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +13 -16
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +10 -11
- 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/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +5 -2
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
- 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 +11 -6
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -4
- package/lib/esm/components/Notification/Event/Event.js +13 -8
- package/lib/esm/components/Notification/Group/Group.js +5 -4
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +10 -5
- package/lib/esm/components/Notification/Mention/Mention.js +2 -2
- package/lib/esm/components/Notification/Notification.js +10 -18
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +6 -5
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -6
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -6
- 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 +4 -12
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +28 -20
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +25 -9
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +6 -8
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +26 -39
- 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 +7 -9
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
- 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 +4 -6
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
- 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 +7 -9
- 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 +3 -5
- package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +9 -10
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +7 -5
- package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +6 -6
- package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +22 -30
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
- package/lib/esm/components/UserCounters/UserCounters.js +13 -5
- 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 +3 -24
- package/lib/esm/components/UserPaymentMethods/Skeleton.js +4 -2
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +12 -11
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +3 -2
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +23 -12
- package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +6 -5
- package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/esm/components/VoteButton/VoteButton.js +4 -3
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +2 -3
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +2 -1
- package/lib/esm/shared/ContributionActionsMenu/index.js +9 -3
- package/lib/esm/shared/CopyTextArea/index.js +6 -13
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +3 -2
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +6 -7
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +3 -2
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +3 -2
- 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 +2 -1
- package/lib/esm/shared/EventActionsMenu/index.js +1 -9
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +8 -2
- package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +6 -4
- package/lib/esm/shared/Media/File/DocComponent.d.ts +0 -2
- package/lib/esm/shared/Media/File/DocComponent.js +2 -3
- package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/esm/shared/Media/File/TriggerButton.js +1 -9
- 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 +13 -5
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +1 -3
- package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
- package/lib/esm/shared/PasswordTextField/index.js +5 -7
- package/lib/esm/shared/ScrollContainer/index.js +1 -1
- package/lib/esm/shared/TagChip/index.d.ts +48 -2
- package/lib/esm/shared/TagChip/index.js +2 -2
- package/lib/esm/shared/Tags/index.js +1 -1
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/umd/155.js +2 -0
- package/lib/umd/155.js.LICENSE.txt +24 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +206 -207
- package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +0 -8
- package/lib/cjs/components/EventLocationWidget/EventMap.js +0 -28
- package/lib/esm/components/EventLocationWidget/EventMap.d.ts +0 -8
- package/lib/esm/components/EventLocationWidget/EventMap.js +0 -25
- package/lib/umd/484.js +0 -2
- package/lib/umd/484.js.LICENSE.txt +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface UserPaymentMethodsSkeletonProps {
|
|
3
3
|
/**
|
|
4
4
|
* Overrides or extends the styles applied to the component.
|
|
@@ -11,26 +11,5 @@ export interface UserPaymentMethodsSkeletonProps {
|
|
|
11
11
|
showBillingAddress?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export type UserPaymentMethodsSkeletonRef = {};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#### Import
|
|
18
|
-
|
|
19
|
-
```jsx
|
|
20
|
-
import {UserPaymentMethodsSkeleton} from '@selfcommunity/react-ui';
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
#### Component Name
|
|
24
|
-
|
|
25
|
-
The name `SCUserPaymentMethodsSkeleton-skeleton-root` can be used when providing style overrides in the theme.
|
|
26
|
-
|
|
27
|
-
#### CSS
|
|
28
|
-
|
|
29
|
-
|Rule Name|Global class|Description|
|
|
30
|
-
|---|---|---|
|
|
31
|
-
|root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
|
|
32
|
-
*
|
|
33
|
-
* @param inProps
|
|
34
|
-
*/
|
|
35
|
-
declare const UserPaymentMethodsSkeleton: ForwardRefRenderFunction<UserPaymentMethodsSkeletonRef, UserPaymentMethodsSkeletonProps>;
|
|
36
|
-
export default UserPaymentMethodsSkeleton;
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<UserPaymentMethodsSkeletonProps & React.RefAttributes<UserPaymentMethodsSkeletonRef>>;
|
|
15
|
+
export default _default;
|
|
@@ -2,6 +2,7 @@
|
|
|
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 react_1 = require("react");
|
|
5
6
|
const material_1 = require("@mui/material");
|
|
6
7
|
const constants_1 = require("./constants");
|
|
7
8
|
const system_1 = require("@mui/system");
|
|
@@ -34,8 +35,9 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
34
35
|
|root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
|
|
35
36
|
*
|
|
36
37
|
* @param inProps
|
|
38
|
+
* @param ref
|
|
37
39
|
*/
|
|
38
|
-
const UserPaymentMethodsSkeleton = (inProps) => {
|
|
40
|
+
const UserPaymentMethodsSkeleton = (inProps, ref) => {
|
|
39
41
|
// PROPS
|
|
40
42
|
const props = (0, system_1.useThemeProps)({
|
|
41
43
|
props: inProps,
|
|
@@ -44,4 +46,4 @@ const UserPaymentMethodsSkeleton = (inProps) => {
|
|
|
44
46
|
const { className = null, showBillingAddress = false } = props, rest = tslib_1.__rest(props, ["className", "showBillingAddress"]);
|
|
45
47
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 200 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 50 }) })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 150 }) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 25, height: 25 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", width: 105, height: 35 }) }))] }) })));
|
|
46
48
|
};
|
|
47
|
-
exports.default = UserPaymentMethodsSkeleton;
|
|
49
|
+
exports.default = (0, react_1.forwardRef)(UserPaymentMethodsSkeleton);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface UserPaymentMethodsProps {
|
|
3
3
|
/**
|
|
4
4
|
* Overrides or extends the styles applied to the component.
|
|
@@ -15,27 +15,5 @@ export interface UserPaymentMethodsProps {
|
|
|
15
15
|
[p: string]: any;
|
|
16
16
|
}
|
|
17
17
|
export type UserPaymentMethodsRef = {};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
#### Import
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
import {UserPaymentMethods} from '@selfcommunity/react-ui';
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
#### Component Name
|
|
28
|
-
|
|
29
|
-
The name `SCUserPaymentMethods` can be used when providing style overrides in the theme.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
#### CSS
|
|
33
|
-
|
|
34
|
-
|Rule Name|Global class|Description|
|
|
35
|
-
|---|---|---|
|
|
36
|
-
|root|.SCUserPaymentMethods-root|Styles applied to the root element.|
|
|
37
|
-
|
|
38
|
-
* @param inProps
|
|
39
|
-
*/
|
|
40
|
-
declare const UserPaymentMethods: ForwardRefRenderFunction<UserPaymentMethodsRef, UserPaymentMethodsProps>;
|
|
41
|
-
export default UserPaymentMethods;
|
|
18
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<UserPaymentMethodsProps, "ref"> & React.RefAttributes<UserPaymentMethodsRef>>;
|
|
19
|
+
export default _default;
|
|
@@ -47,13 +47,13 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
47
47
|
|
|
48
48
|
* @param inProps
|
|
49
49
|
*/
|
|
50
|
-
const UserPaymentMethods = (inProps) => {
|
|
50
|
+
const UserPaymentMethods = (inProps, ref) => {
|
|
51
51
|
// PROPS
|
|
52
52
|
const props = (0, system_1.useThemeProps)({
|
|
53
53
|
props: inProps,
|
|
54
54
|
name: constants_1.PREFIX
|
|
55
55
|
});
|
|
56
|
-
const { className = null, showBillingAddress = false } = props;
|
|
56
|
+
const { className = null, showBillingAddress = false } = props, rest = tslib_1.__rest(props, ["className", "showBillingAddress"]);
|
|
57
57
|
// CONTEXT
|
|
58
58
|
const scUserContext = (0, react_core_1.useSCUser)();
|
|
59
59
|
// STATE
|
|
@@ -72,6 +72,7 @@ const UserPaymentMethods = (inProps) => {
|
|
|
72
72
|
const [addPaymentMethodDialogOpen, setAddPaymentMethodDialogOpen] = (0, react_1.useState)(false);
|
|
73
73
|
// HOOKS
|
|
74
74
|
const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
|
|
75
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
75
76
|
const { inView } = (0, react_intersection_observer_1.useInView)({ triggerOnce: false });
|
|
76
77
|
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
77
78
|
/**
|
|
@@ -80,8 +81,8 @@ const UserPaymentMethods = (inProps) => {
|
|
|
80
81
|
const loadMore = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
81
82
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
82
83
|
const loadItems = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
-
|
|
84
|
-
getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
|
|
84
|
+
const startingAfterId = paymentMethods.length ? paymentMethods[paymentMethods.length - 1].id : null;
|
|
85
|
+
/* getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
|
|
85
86
|
setHasMore(res.paymentMethods.has_more);
|
|
86
87
|
setPaymentMethods(paymentMethods.concat(res.paymentMethods.data));
|
|
87
88
|
setIsLoadingPage(false);
|
|
@@ -329,9 +330,9 @@ const UserPaymentMethods = (inProps) => {
|
|
|
329
330
|
if (!isPaymentsEnabled || !scUserContext.user) {
|
|
330
331
|
return null;
|
|
331
332
|
}
|
|
332
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant:
|
|
333
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) })))] })), paymentMethods.length > 0 ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 }, component: material_1.Paper }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.typeMethod", defaultMessage: "ui.userPaymentMethods.typeMethod" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.brand", defaultMessage: "ui.userPaymentMethods.brand" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.expiration", defaultMessage: "ui.userPaymentMethods.expiration" }) }), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.billingDetails", defaultMessage: "ui.userPaymentMethods.billingDetails" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.default", defaultMessage: "ui.userPaymentMethods.default" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.actions", defaultMessage: "ui.userPaymentMethods.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [paymentMethods.map((method, index) => {
|
|
333
334
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
334
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_svg_credit_card_payment_icons_1.PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), (0, jsx_runtime_1.jsxs)(material_1.TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant:
|
|
335
|
-
}), hasMore && (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] })] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant:
|
|
335
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_svg_credit_card_payment_icons_1.PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), (0, jsx_runtime_1.jsxs)(material_1.TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: method.billing_details.name })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [(_f = (_e = method.billing_details) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.line1, (0, jsx_runtime_1.jsx)("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [(_k = (_j = method.billing_details) === null || _j === void 0 ? void 0 : _j.address) === null || _k === void 0 ? void 0 : _k.postal_code, " - ", (_m = (_l = method.billing_details) === null || _l === void 0 ? void 0 : _l.address) === null || _m === void 0 ? void 0 : _m.city, " -", ' ', (_p = (_o = method.billing_details) === null || _o === void 0 ? void 0 : _o.address) === null || _p === void 0 ? void 0 : _p.country] }))] }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))] })) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [method.id === defaultPaymentMethodId, (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: 'contained', onClick: () => handleDelete(method.id) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
|
|
336
|
+
}), hasMore && (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] })] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'contained', onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && ((0, jsx_runtime_1.jsx)(UserChangeAddressDialog_1.default, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && (0, jsx_runtime_1.jsx)(UserAddPaymentMethodDialog_1.default, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
|
|
336
337
|
};
|
|
337
|
-
exports.default = UserPaymentMethods;
|
|
338
|
+
exports.default = (0, react_1.forwardRef)(UserPaymentMethods);
|
|
@@ -8,6 +8,7 @@ const react_intl_1 = require("react-intl");
|
|
|
8
8
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
9
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
10
|
const system_1 = require("@mui/system");
|
|
11
|
+
const lab_1 = require("@mui/lab");
|
|
11
12
|
const notistack_1 = require("notistack");
|
|
12
13
|
const Errors_1 = require("../../constants/Errors");
|
|
13
14
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -78,6 +79,6 @@ function UserProfileBlocked(inProps) {
|
|
|
78
79
|
if (!scUser || !scUserContext.user || loadingBlockedBy) {
|
|
79
80
|
return null;
|
|
80
81
|
}
|
|
81
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, {}), !isMe && blockedBy && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), (0, jsx_runtime_1.jsx)(
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, {}), !isMe && blockedBy && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: "contained", className: classes.button, loading: scUserContext.managers.blockedUsers.loading, disabled: scUserContext.managers.blockedUsers.loading, onClick: handleBlock }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.unBlockUser", defaultMessage: "ui.userProfileBlocked.unBlockUser" }) }))] }))] })));
|
|
82
83
|
}
|
|
83
84
|
exports.default = UserProfileBlocked;
|
|
@@ -12,6 +12,7 @@ const utils_1 = require("@selfcommunity/utils");
|
|
|
12
12
|
const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog"));
|
|
13
13
|
const PasswordTextField_1 = tslib_1.__importDefault(require("../../../shared/PasswordTextField"));
|
|
14
14
|
const EmailTextField_1 = tslib_1.__importDefault(require("../../../shared/EmailTextField"));
|
|
15
|
+
const lab_1 = require("@mui/lab");
|
|
15
16
|
const notistack_1 = require("notistack");
|
|
16
17
|
const constants_1 = require("../constants");
|
|
17
18
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -130,7 +131,7 @@ function AccountCredentials(props) {
|
|
|
130
131
|
e.stopPropagation();
|
|
131
132
|
setIsSubmitting(true);
|
|
132
133
|
api_services_1.UserService.changeUserMail(user === null || user === void 0 ? void 0 : user.id, field.email, !skipEmailValidation, !skipEmailValidation)
|
|
133
|
-
.then(() => {
|
|
134
|
+
.then((res) => {
|
|
134
135
|
setIsEditing(false);
|
|
135
136
|
setIsSubmitting(false);
|
|
136
137
|
if (skipEmailValidation) {
|
|
@@ -155,20 +156,16 @@ function AccountCredentials(props) {
|
|
|
155
156
|
if (!user) {
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.email }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.email", defaultMessage: "ui.userProfileEditAccountCredentials.email" }) })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSubmitting ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(EmailTextField_1.default, { name: "email", disabled: !isEditing || isSubmitting, size: "small", value: field.email, onChange: handleChange, onBlur: handleEmailBlur, error: Boolean(error.email), helperText: error.email && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.email.error.${error.email}`, defaultMessage: `ui.userProfileEditAccountCredentials.email.error.${error.email}` })),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
} }) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.password }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.passwordLabel", defaultMessage: "ui.userProfileEditAccountCredentials.passwordLabel" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setOpenChangePasswordDialog(true), sx: { mb: 1 } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] }), openChangePasswordDialog && ((0, jsx_runtime_1.jsxs)(PasswordDialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.changePasswordTitle), open: openChangePasswordDialog, onClose: handleCloseDialog }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { className: classes.formField, name: "password", disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.password", defaultMessage: "ui.userProfileEditAccountCredentials.password" }), size: "medium", value: field.password, onChange: handleChange, error: Boolean(error.password), helperText: error.password && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.password.error.${error.password}`, defaultMessage: `ui.userProfileEditAccountCredentials.password.error.${error.password}` })) }), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "newPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword" }), size: "medium", value: field.newPassword, onChange: handleChange, error: Boolean(error.newPassword), helperText: error.newPassword && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}`, defaultMessage: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}` })), slotProps: {
|
|
163
|
-
input: {
|
|
164
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "info", onClick: handlePopoverOpen, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "info" }) })) })))
|
|
165
|
-
}
|
|
159
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.email }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.email", defaultMessage: "ui.userProfileEditAccountCredentials.email" }) })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSubmitting ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(EmailTextField_1.default, { name: "email", disabled: !isEditing || isSubmitting, size: "small", value: field.email, onChange: handleChange, onBlur: handleEmailBlur, error: Boolean(error.email), helperText: error.email && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.email.error.${error.email}`, defaultMessage: `ui.userProfileEditAccountCredentials.email.error.${error.email}` })), InputProps: {
|
|
160
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: !isEditing ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => setIsEditing(true), edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))) : error.email ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "error" }, { children: "error" }))) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleSubmitEmail, edge: "end", color: "primary", disabled: !field.email || error.email }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) }))) })))
|
|
161
|
+
} }) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.password }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.passwordLabel", defaultMessage: "ui.userProfileEditAccountCredentials.passwordLabel" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setOpenChangePasswordDialog(true), sx: { mb: 1 } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] }), openChangePasswordDialog && ((0, jsx_runtime_1.jsxs)(PasswordDialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.changePasswordTitle), open: openChangePasswordDialog, onClose: handleCloseDialog }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { className: classes.formField, name: "password", disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.password", defaultMessage: "ui.userProfileEditAccountCredentials.password" }), size: "medium", value: field.password, onChange: handleChange, error: Boolean(error.password), helperText: error.password && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.password.error.${error.password}`, defaultMessage: `ui.userProfileEditAccountCredentials.password.error.${error.password}` })) }), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "newPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword" }), size: "medium", value: field.newPassword, onChange: handleChange, error: Boolean(error.newPassword), helperText: error.newPassword && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}`, defaultMessage: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}` })), InputProps: {
|
|
162
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "info", onClick: handlePopoverOpen, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "info" }) })) })))
|
|
166
163
|
} }), (0, jsx_runtime_1.jsx)(material_1.Popover, Object.assign({ open: open, anchorEl: anchorEl, anchorOrigin: {
|
|
167
164
|
vertical: 'center',
|
|
168
165
|
horizontal: 'left'
|
|
169
166
|
}, transformOrigin: {
|
|
170
167
|
vertical: 'center',
|
|
171
168
|
horizontal: 'right'
|
|
172
|
-
}, onClose: handlePopoverClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component:
|
|
169
|
+
}, onClose: handlePopoverClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span', sx: { whiteSpace: 'pre-line' } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword.info", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword.info" }) })) })) })), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "confirmPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.confirmPassword", defaultMessage: "ui.userProfileEditAccountCredentials.confirmPassword" }), size: "medium", value: field.confirmPassword, onChange: handleChange, onBlur: validateInput, error: Boolean(error.confirmPassword), helperText: error.confirmPassword })] })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ className: classes.confirmChangeButton, loading: isSubmittingPassword, disabled: !field.confirmPassword || Boolean(error.confirmPassword) || Boolean(error.password) || Boolean(error.newPassword), variant: "contained", onClick: handleSubmitPassword }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] })))] })));
|
|
173
170
|
}
|
|
174
171
|
exports.default = AccountCredentials;
|
|
@@ -18,8 +18,9 @@ const types_1 = require("../../../types");
|
|
|
18
18
|
const MetadataField_1 = tslib_1.__importDefault(require("../../../shared/MetadataField"));
|
|
19
19
|
const Errors_1 = require("../../../constants/Errors");
|
|
20
20
|
const date_fns_1 = require("date-fns");
|
|
21
|
-
const it_1 = require("date-fns/locale/it");
|
|
22
|
-
const en_US_1 = require("date-fns/locale/en-US");
|
|
21
|
+
const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
|
|
22
|
+
const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
|
|
23
|
+
const lab_1 = require("@mui/lab");
|
|
23
24
|
const notistack_1 = require("notistack");
|
|
24
25
|
const constants_1 = require("../constants");
|
|
25
26
|
const messages = (0, react_intl_1.defineMessages)({
|
|
@@ -69,7 +70,9 @@ function PublicInfo(props) {
|
|
|
69
70
|
return null;
|
|
70
71
|
}, [scPreferences.preferences]);
|
|
71
72
|
// STATE
|
|
72
|
-
const
|
|
73
|
+
const theme = (0, material_1.useTheme)();
|
|
74
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
75
|
+
const [user, setUser] = (0, react_1.useState)();
|
|
73
76
|
const [error, setError] = (0, react_1.useState)({});
|
|
74
77
|
const [editing, setEditing] = (0, react_1.useState)([]);
|
|
75
78
|
const [saving, setSaving] = (0, react_1.useState)([]);
|
|
@@ -156,10 +159,10 @@ function PublicInfo(props) {
|
|
|
156
159
|
case types_1.SCUserProfileFields.DATE_JOINED:
|
|
157
160
|
return null;
|
|
158
161
|
case types_1.SCUserProfileFields.DATE_OF_BIRTH:
|
|
159
|
-
return ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.
|
|
162
|
+
return ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.default : en_US_1.default }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { label: intl.formatMessage({
|
|
160
163
|
id: `ui.userInfo.${(0, utils_1.camelCase)(field)}`,
|
|
161
164
|
defaultMessage: `ui.userInfo.${field}`
|
|
162
|
-
}), defaultValue: user[field] ?
|
|
165
|
+
}), defaultValue: user[field] ? (0, date_fns_1.parseISO)(user[field]) : null, minDate: DATEPICKER_MINDATE, onChange: (newValue) => {
|
|
163
166
|
const u = user;
|
|
164
167
|
const field = types_1.SCUserProfileFields.DATE_OF_BIRTH;
|
|
165
168
|
const camelField = (0, utils_1.camelCase)(field);
|
|
@@ -181,8 +184,13 @@ function PublicInfo(props) {
|
|
|
181
184
|
}
|
|
182
185
|
setUser(u);
|
|
183
186
|
setEditing([...editing, field]);
|
|
184
|
-
}, disableFuture: true, disabled: isSaving,
|
|
185
|
-
|
|
187
|
+
}, disableFuture: true, disabled: isSaving, slots: {
|
|
188
|
+
inputAdornment: (params) => {
|
|
189
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
const _a = params.children.props, { children } = _a, rest = tslib_1.__rest(_a, ["children"]);
|
|
192
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: 'end' }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, rest, { children: children })), isSaving && (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 10 })] })));
|
|
193
|
+
}
|
|
186
194
|
},
|
|
187
195
|
// onAccept={isMobile ? handleSave(SCUserProfileFields.DATE_OF_BIRTH) : null}
|
|
188
196
|
slotProps: {
|
|
@@ -190,7 +198,10 @@ function PublicInfo(props) {
|
|
|
190
198
|
className: classes.field,
|
|
191
199
|
fullWidth: true,
|
|
192
200
|
variant: 'outlined',
|
|
193
|
-
helperText: _error || null
|
|
201
|
+
helperText: _error || null,
|
|
202
|
+
InputProps: {
|
|
203
|
+
endAdornment: isMobile && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: !isEditing }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) })), isSaving ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 10 }) : null] }))
|
|
204
|
+
}
|
|
194
205
|
}
|
|
195
206
|
} }) }), field));
|
|
196
207
|
case types_1.SCUserProfileFields.BIO:
|
|
@@ -222,6 +233,6 @@ function PublicInfo(props) {
|
|
|
222
233
|
}
|
|
223
234
|
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [startActions, _fields.map((field) => {
|
|
224
235
|
return renderField(field);
|
|
225
|
-
}), (0, jsx_runtime_1.jsx)(
|
|
236
|
+
}), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ className: classes.btnSave, fullWidth: true, variant: "contained", color: "secondary", onClick: handleSave, loading: saving.length > 0, disabled: saving.length > 0 || !editing.length || Object.keys(error).length > 0 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.userInfo.button.save', defaultMessage: 'ui.userInfo.button.save' }) })), endActions] })));
|
|
226
237
|
}
|
|
227
238
|
exports.default = PublicInfo;
|
|
@@ -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
|
|
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({ item: true, md: 12, sm: 12 }, { 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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { LoadingButtonProps } from '@mui/lab';
|
|
1
2
|
import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
|
|
2
|
-
|
|
3
|
-
export interface VoteAudienceButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
3
|
+
export interface VoteAudienceButtonProps extends Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the contribution object to vote
|
|
6
6
|
* @default null
|
|
@@ -3,6 +3,7 @@ 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");
|
|
6
7
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
7
8
|
const system_1 = require("@mui/system");
|
|
8
9
|
const material_1 = require("@mui/material");
|
|
@@ -20,7 +21,7 @@ const classes = {
|
|
|
20
21
|
dialogTabs: `${PREFIX}-dialog-tabs`,
|
|
21
22
|
dialogVoteBadge: `${PREFIX}-dialog-vote-badge`
|
|
22
23
|
};
|
|
23
|
-
const Root = (0, material_1.styled)(
|
|
24
|
+
const Root = (0, material_1.styled)(lab_1.LoadingButton, {
|
|
24
25
|
name: PREFIX,
|
|
25
26
|
slot: 'Root',
|
|
26
27
|
overridesResolver: (_props, styles) => [styles.root, styles.voted]
|
|
@@ -68,10 +69,10 @@ function VoteAudienceButton(inProps) {
|
|
|
68
69
|
// CONTEXT
|
|
69
70
|
const scUserContext = (0, react_core_1.useSCUser)();
|
|
70
71
|
// HANDLERS
|
|
71
|
-
const handleOpen = () => {
|
|
72
|
+
const handleOpen = (_event) => {
|
|
72
73
|
setOpen(true);
|
|
73
74
|
};
|
|
74
|
-
const handleClose = () => {
|
|
75
|
+
const handleClose = (_event) => {
|
|
75
76
|
setOpen(false);
|
|
76
77
|
};
|
|
77
78
|
const handleChangeTab = (_event, newValue) => {
|
|
@@ -104,7 +105,7 @@ function VoteAudienceButton(inProps) {
|
|
|
104
105
|
const audienceIcon = (0, react_1.useMemo)(() => {
|
|
105
106
|
if (reactions.default && !isLoading && !error) {
|
|
106
107
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.reactionList }, { children: contributionReactionsCount &&
|
|
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))) })));
|
|
108
|
+
contributionReactionsCount.slice(0, 3).map((count, _i) => ((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))) })));
|
|
108
109
|
}
|
|
109
110
|
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" });
|
|
110
111
|
}, [reactions.default, isLoading, error, contributionReactionsCount, scUserContext.user, contributionVoted]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { LoadingButtonProps } from '@mui/lab';
|
|
1
2
|
import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
|
|
2
|
-
|
|
3
|
-
export interface VoteButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
3
|
+
export interface VoteButtonProps extends Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, 'onClick' | 'disabled' | 'loading'>> {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the contribution object to vote
|
|
6
6
|
* @default null
|
|
@@ -3,6 +3,7 @@ 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");
|
|
6
7
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
7
8
|
const system_1 = require("@mui/system");
|
|
8
9
|
const material_1 = require("@mui/material");
|
|
@@ -18,7 +19,7 @@ const classes = {
|
|
|
18
19
|
reactionList: `${PREFIX}-reaction-list`,
|
|
19
20
|
reaction: `${PREFIX}-reaction`
|
|
20
21
|
};
|
|
21
|
-
const Root = (0, material_1.styled)(
|
|
22
|
+
const Root = (0, material_1.styled)(lab_1.LoadingButton, {
|
|
22
23
|
name: PREFIX,
|
|
23
24
|
slot: 'Root',
|
|
24
25
|
overridesResolver: (_props, styles) => [styles.root, styles.voted]
|
|
@@ -71,7 +72,7 @@ function VoteButton(inProps) {
|
|
|
71
72
|
handleClearTimeout();
|
|
72
73
|
timeoutRef.current = setTimeout(() => setAnchorEl(event.target), 1000);
|
|
73
74
|
};
|
|
74
|
-
const handleMouseLeave = () => {
|
|
75
|
+
const handleMouseLeave = (_event) => {
|
|
75
76
|
handleClearTimeout();
|
|
76
77
|
timeoutRef.current = setTimeout(() => setAnchorEl(null), 500);
|
|
77
78
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
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");
|
|
5
6
|
const material_1 = require("@mui/material");
|
|
6
7
|
const react_1 = require("react");
|
|
7
8
|
const react_intl_1 = require("react-intl");
|
|
@@ -128,9 +129,7 @@ function AddUsersButton(inProps) {
|
|
|
128
129
|
const handleDelete = (0, react_1.useCallback)((userToDelete) => {
|
|
129
130
|
setInvited((prev) => prev.filter((user) => user.id !== userToDelete.id));
|
|
130
131
|
}, [setInvited]);
|
|
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)(
|
|
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: () => {
|
|
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)(lab_1.LoadingButton, 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)}`, InputProps: Object.assign({}, params.InputProps) }))) }), (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: () => {
|
|
134
133
|
handleDelete(option);
|
|
135
134
|
} }, index))) }))] })) })))] }));
|
|
136
135
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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");
|
|
5
6
|
const material_1 = require("@mui/material");
|
|
6
7
|
const react_intl_1 = require("react-intl");
|
|
7
8
|
const PREFIX = 'SCConfirmDialog';
|
|
@@ -37,6 +38,6 @@ function ConfirmDialog(props) {
|
|
|
37
38
|
/**
|
|
38
39
|
* Renders root object
|
|
39
40
|
*/
|
|
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)(
|
|
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)(lab_1.LoadingButton, 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" }) }))] })] })) }));
|
|
41
42
|
}
|
|
42
43
|
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,9 +808,15 @@ 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
|
|
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) => {
|
|
812
818
|
popperRef.current = ref;
|
|
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:
|
|
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: '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
|
|
814
820
|
? {
|
|
815
821
|
content: ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.deleteContributionInfo", defaultMessage: "ui.contributionActionMenu.deleteContributionInfo" }))
|
|
816
822
|
}
|
|
@@ -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,18 +66,11 @@ 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
|
-
|
|
74
|
-
open: true
|
|
75
|
-
}
|
|
76
|
-
}, 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 }))) })))
|
|
77
|
-
},
|
|
78
|
-
inputLabel: {
|
|
79
|
-
shrink: true
|
|
80
|
-
}
|
|
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, InputProps: {
|
|
70
|
+
disableUnderline: true,
|
|
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, PopperProps: { open: true }, 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 }))) })))
|
|
72
|
+
}, InputLabelProps: {
|
|
73
|
+
shrink: true
|
|
81
74
|
} }, rest)));
|
|
82
75
|
}
|
|
83
76
|
exports.default = CopyTextField;
|
|
@@ -4,6 +4,7 @@ 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");
|
|
7
8
|
const types_1 = require("@selfcommunity/types");
|
|
8
9
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
9
10
|
const utils_1 = require("@selfcommunity/utils");
|
|
@@ -47,7 +48,7 @@ function ChangeUserStatus(props) {
|
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
}, [course, user, setLoading, setValue]);
|
|
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)(
|
|
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)(lab_1.LoadingButton, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
|
|
51
52
|
padding: 0,
|
|
52
53
|
':hover': {
|
|
53
54
|
backgroundColor: 'unset'
|