@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
|
@@ -41,5 +41,5 @@ const Root = styled(Box, {
|
|
|
41
41
|
*/
|
|
42
42
|
export default function ConsentSolutionSkeleton() {
|
|
43
43
|
const ContentSection = () => (_jsxs(_Fragment, { children: [_jsx(Skeleton, { animation: "wave", height: 20, width: "100%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "80%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "60%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "30%" }), _jsx("br", {})] }));
|
|
44
|
-
return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(DialogTitle, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: "70%" }) })), _jsx(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => (_jsx(ContentSection, {}, i))) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(Skeleton, { height: 64, className: classes.consentSwitch }), _jsx(Skeleton, { animation: "wave", height: 20, width: "50%", variant:
|
|
44
|
+
return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(DialogTitle, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: "70%" }) })), _jsx(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => (_jsx(ContentSection, {}, i))) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(Skeleton, { height: 64, className: classes.consentSwitch }), _jsx(Skeleton, { animation: "wave", height: 20, width: "50%", variant: 'text', className: classes.consentSwitchLabel })] })), _jsx(DialogActions, Object.assign({ className: classes.actions }, { children: _jsx(Skeleton, { animation: "wave", height: 40, width: "20%" }) }))] })));
|
|
45
45
|
}
|
|
@@ -31,7 +31,7 @@ function CourseCompletedDialog(inProps) {
|
|
|
31
31
|
const intl = useIntl();
|
|
32
32
|
return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: onClose, actions: _jsx(Button, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.COURSES_ROUTE_NAME, {}), size: "medium", variant: "contained" }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.btn.label", defaultMessage: "ui.course.completedDialog.btn.label" }) })) })), className: classes.root }, { children: _jsxs(Stack, Object.assign({ className: classes.wrapper }, { children: [_jsx("img", { src: clapping, alt: intl.formatMessage({ id: 'ui.course.completedDialog.title', defaultMessage: 'ui.course.completedDialog.title' }), width: 100, height: 100 }), _jsx(Typography, Object.assign({ variant: "h2", className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.title", defaultMessage: "ui.course.completedDialog.title" }) })), _jsx(Typography, Object.assign({ variant: "h4", className: classes.descriptionPt1 }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.description.pt1", defaultMessage: "ui.course.completedDialog.description.pt1" }) })), _jsx(Typography, Object.assign({ variant: "h4", className: classes.descriptionPt2 }, { children: intl.formatMessage({ id: 'ui.course.completedDialog.description.pt2', defaultMessage: 'ui.course.completedDialog.description.pt2' }, {
|
|
33
33
|
courseName: course.name,
|
|
34
|
-
span: (chunks) => (_jsx(Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks })
|
|
34
|
+
span: (chunks) => (_jsx(Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks })))
|
|
35
35
|
}) }))] })) })));
|
|
36
36
|
}
|
|
37
37
|
export default memo(CourseCompletedDialog);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material';
|
|
2
|
-
|
|
2
|
+
import { LoadingButtonProps } from '@mui/lab';
|
|
3
|
+
interface ActionButtonProps extends ButtonProps, Omit<LoadingButtonProps, 'classes'> {
|
|
3
4
|
labelId: string;
|
|
4
5
|
to?: string;
|
|
5
6
|
}
|
|
@@ -3,10 +3,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Button, Typography } from '@mui/material';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import { Link } from '@selfcommunity/react-core';
|
|
6
|
+
import { LoadingButton } from '@mui/lab';
|
|
6
7
|
export default function ActionButton(props) {
|
|
7
8
|
const { labelId, to, size = 'small', color = 'primary', variant = 'contained' } = props, rest = __rest(props, ["labelId", "to", "size", "color", "variant"]);
|
|
8
9
|
if (to) {
|
|
9
10
|
return (_jsx(Button, Object.assign({ component: Link, to: to, size: size, color: color, variant: variant }, rest, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
10
11
|
}
|
|
11
|
-
return (_jsx(
|
|
12
|
+
return (_jsx(LoadingButton, Object.assign({ size: size, color: color, variant: variant }, rest, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
12
13
|
}
|
|
@@ -4,6 +4,7 @@ import { Fragment, memo, useCallback, useEffect, useMemo, useReducer, useState }
|
|
|
4
4
|
import { CacheStrategies, Logger } from '@selfcommunity/utils';
|
|
5
5
|
import { SCOPE_SC_UI } from '../../../constants/Errors';
|
|
6
6
|
import { FormattedDate, FormattedMessage } from 'react-intl';
|
|
7
|
+
import { LoadingButton } from '@mui/lab';
|
|
7
8
|
import { PREFIX } from '../constants';
|
|
8
9
|
import { DEFAULT_PAGINATION_OFFSET } from '../../../constants/Pagination';
|
|
9
10
|
import { actionWidgetTypes, dataWidgetReducer, stateWidgetInitializer } from '../../../utils/widget';
|
|
@@ -100,6 +101,6 @@ function Comments(props) {
|
|
|
100
101
|
if (!state.initialized) {
|
|
101
102
|
return _jsx(CommentsSkeleton, {});
|
|
102
103
|
}
|
|
103
|
-
return (_jsx(Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && _jsx(CommentSkeleton, { id: 1 }), _jsx(
|
|
104
|
+
return (_jsx(Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && _jsx(CommentSkeleton, { id: 1 }), _jsx(LoadingButton, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: isLoading, disabled: !state.next, onClick: handleNext }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.btn.label", defaultMessage: "ui.course.dashboard.teacher.tab.comments.btn.label" }) })) }))] })) : (_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.empty", defaultMessage: "ui.course.dashboard.teacher.tab.comments.empty" }) }))) })));
|
|
104
105
|
}
|
|
105
106
|
export default memo(Comments);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { LoadingButton } from '@mui/lab';
|
|
4
|
+
import { Box, CardActionArea, Card, CardContent, FormGroup, Paper, TextField, Typography, Chip, styled } from '@mui/material';
|
|
4
5
|
import { useThemeProps } from '@mui/system';
|
|
5
6
|
import { CourseService, formatHttpErrorCode } from '@selfcommunity/api-services';
|
|
6
7
|
import { SCPreferences, UserUtils, useSCPaymentsEnabled, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
@@ -280,15 +281,11 @@ export default function CourseForm(inProps) {
|
|
|
280
281
|
/**
|
|
281
282
|
* Renders root object
|
|
282
283
|
*/
|
|
283
|
-
return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(Box, Object.assign({ className: _step === SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === SCCourseFormStepType.GENERAL && (_jsx(Fragment, { children: Object.values(SCCourseTypologyType).map((option, index) => (_jsx(Card, Object.assign({ className: classNames(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF }) }, { children: _jsx(CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: _jsxs(CardContent, { children: [_jsxs(Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [_jsx(FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF && (_jsx(Chip, { variant: "outlined", color: "warning", size: "small", label: _jsx(FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === SCCourseFormStepType.CUSTOMIZATION && (_jsxs(Fragment, { children: [course && (_jsx(Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), _jsxs(FormGroup, Object.assign({ className: classNames(classes.form, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [_jsx(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: _jsx(UploadCourseCover, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), _jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
}, error: Boolean((!!
|
|
288
|
-
input: {
|
|
289
|
-
endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : COURSE_DESCRIPTION_MAX_LENGTH })))
|
|
290
|
-
}
|
|
291
|
-
}, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > COURSE_DESCRIPTION_MAX_LENGTH && (_jsx(FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), _jsx(CategoryAutocomplete, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && _jsx(CourseEdit, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && (_jsx(Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: _jsx(PaywallsConfigurator, Object.assign({}, (course && { contentId: course.id }), { contentType: SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), _jsx(Box, Object.assign({ className: classNames(classes.actions, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: _jsx(Button, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === SCCourseFormStepType.GENERAL
|
|
284
|
+
return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(Box, Object.assign({ className: _step === SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === SCCourseFormStepType.GENERAL && (_jsx(Fragment, { children: Object.values(SCCourseTypologyType).map((option, index) => (_jsx(Card, Object.assign({ className: classNames(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF }) }, { children: _jsx(CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: _jsxs(CardContent, { children: [_jsxs(Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [_jsx(FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF && (_jsx(Chip, { variant: "outlined", color: "warning", size: "small", label: _jsx(FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === SCCourseFormStepType.CUSTOMIZATION && (_jsxs(Fragment, { children: [course && (_jsx(Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), _jsxs(FormGroup, Object.assign({ className: classNames(classes.form, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [_jsx(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: _jsx(UploadCourseCover, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), _jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, InputProps: {
|
|
285
|
+
endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COURSE_TITLE_MAX_LENGTH - field.name.length }))
|
|
286
|
+
}, error: Boolean((!!course && !field.name) || field.name.length > COURSE_TITLE_MAX_LENGTH) || Boolean(error['nameError']), helperText: !!course && !field.name ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : field.name.length > COURSE_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.courseForm.name.error.maxLength", defaultMessage: "ui.courseForm.name.error.maxLength" })) : error['nameError'] ? (error['nameError']) : null }), _jsx(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
|
|
287
|
+
endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : COURSE_DESCRIPTION_MAX_LENGTH })))
|
|
288
|
+
}, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > COURSE_DESCRIPTION_MAX_LENGTH && (_jsx(FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), _jsx(CategoryAutocomplete, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && _jsx(CourseEdit, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && (_jsx(Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: _jsx(PaywallsConfigurator, Object.assign({}, (course && { contentId: course.id }), { contentType: SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), _jsx(Box, Object.assign({ className: classNames(classes.actions, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: _jsx(LoadingButton, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === SCCourseFormStepType.GENERAL
|
|
292
289
|
? !field.type || Object.keys(error).length !== 0
|
|
293
290
|
: _step === SCCourseFormStepType.CUSTOMIZATION &&
|
|
294
291
|
(!field.name ||
|
|
@@ -43,11 +43,7 @@ export default function CourseEdit(inProps) {
|
|
|
43
43
|
/**
|
|
44
44
|
* Renders root object
|
|
45
45
|
*/
|
|
46
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [course.privacy === SCCoursePrivacyType.DRAFT && (_jsxs(Box, Object.assign({ className: classes.access }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), _jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), _jsxs(Box, Object.assign({ className: classes.accessInfo }, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (chunks) => _jsx(Icon, { children: chunks }
|
|
46
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [course.privacy === SCCoursePrivacyType.DRAFT && (_jsxs(Box, Object.assign({ className: classes.access }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), _jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), _jsxs(Box, Object.assign({ className: classes.accessInfo }, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.visibility", defaultMessage: "ui.courseForm.edit.access.info.visibility", values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) }))] }))] })] }))] }))), _jsxs(Box, Object.assign({ className: classes.publish }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.title", defaultMessage: "ui.courseForm.edit.publication.title" }) })), notPublishable ? (_jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle.info", defaultMessage: "ui.courseForm.edit.publication.subtitle.info" }) })] }))) : (_jsx(Typography, Object.assign({ variant: "body1", className: classes.publishInfo }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle", defaultMessage: "ui.courseForm.edit.publication.subtitle" }) }))), _jsx(RadioGroup, { children: Object.values(SCCoursePrivacyType)
|
|
47
47
|
.filter((option) => option !== SCCoursePrivacyType.DRAFT)
|
|
48
|
-
.map((option, index) => (_jsxs(FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [_jsx(FormControlLabel, { control: _jsx(Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), _jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: {
|
|
49
|
-
icon: (chunks) => (_jsx(Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.access.icon`))
|
|
50
|
-
} }) })), _jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.visibility`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.visibility`, values: {
|
|
51
|
-
icon: (chunks) => (_jsx(Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.visibility.icon`))
|
|
52
|
-
} }) }))] })] }), index))) })] }))] })));
|
|
48
|
+
.map((option, index) => (_jsxs(FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [_jsx(FormControlLabel, { control: _jsx(Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), _jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) })), _jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.visibility`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.visibility`, values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) }))] })] }), index))) })] }))] })));
|
|
53
49
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useContext, useRef, useState } from 'react';
|
|
4
|
-
import { Alert, styled, Icon
|
|
4
|
+
import { Alert, styled, Icon } from '@mui/material';
|
|
5
5
|
import { SCUserContext } from '@selfcommunity/react-core';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useThemeProps } from '@mui/system';
|
|
8
8
|
import { PREFIX } from './constants';
|
|
9
|
+
import { LoadingButton } from '@mui/lab';
|
|
9
10
|
import { defineMessages } from 'react-intl';
|
|
10
11
|
const messages = defineMessages({
|
|
11
12
|
errorLoadImage: {
|
|
@@ -16,7 +17,7 @@ const messages = defineMessages({
|
|
|
16
17
|
const classes = {
|
|
17
18
|
root: `${PREFIX}-upload-course-cover-root`
|
|
18
19
|
};
|
|
19
|
-
const Root = styled(
|
|
20
|
+
const Root = styled(LoadingButton, {
|
|
20
21
|
name: PREFIX,
|
|
21
22
|
slot: 'UploadCourseCoverRoot'
|
|
22
23
|
})(() => ({}));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useMemo, useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { styled } from '@mui/material';
|
|
5
5
|
import { CacheStrategies, Logger } from '@selfcommunity/utils';
|
|
6
6
|
import { useSCContext, useSCFetchCourse, useSCUser } from '@selfcommunity/react-core';
|
|
7
7
|
import { SCCoursePrivacyType, SCCourseJoinStatusType } from '@selfcommunity/types';
|
|
8
|
+
import { LoadingButton } from '@mui/lab';
|
|
8
9
|
import { FormattedMessage } from 'react-intl';
|
|
9
10
|
import classNames from 'classnames';
|
|
10
11
|
import { useThemeProps } from '@mui/system';
|
|
@@ -15,11 +16,11 @@ const PREFIX = 'SCCourseJoinButton';
|
|
|
15
16
|
const classes = {
|
|
16
17
|
root: `${PREFIX}-root`
|
|
17
18
|
};
|
|
18
|
-
const Root = styled(
|
|
19
|
+
const Root = styled(LoadingButton, {
|
|
19
20
|
name: PREFIX,
|
|
20
21
|
slot: 'Root',
|
|
21
|
-
overridesResolver: (
|
|
22
|
-
})(() => ({}));
|
|
22
|
+
overridesResolver: (props, styles) => styles.root
|
|
23
|
+
})(({ theme }) => ({}));
|
|
23
24
|
/**
|
|
24
25
|
* > API documentation for the Community-JS Course Subscribe Button component. Learn about the available props and the CSS API.
|
|
25
26
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { GridProps } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { CourseProps, CourseSkeletonProps } from '../Course';
|
|
3
4
|
import { CoursesSkeletonProps } from '../Courses/Skeleton';
|
|
4
5
|
import { CreateCourseButtonProps } from '../CreateCourseButton';
|
|
6
|
+
export declare const CoursesChipRoot: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
|
+
}, "avatar" | "className" | "style" | "classes" | "label" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "icon" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
9
|
export interface CoursesProps {
|
|
6
10
|
/**
|
|
7
11
|
* Overrides or extends the styles applied to the component.
|
|
@@ -39,7 +39,7 @@ const Root = styled(Box, {
|
|
|
39
39
|
name: PREFIX,
|
|
40
40
|
slot: 'Root'
|
|
41
41
|
})(() => ({}));
|
|
42
|
-
const CoursesChipRoot = styled(Chip, {
|
|
42
|
+
export const CoursesChipRoot = styled(Chip, {
|
|
43
43
|
name: PREFIX,
|
|
44
44
|
slot: 'CoursesChipRoot',
|
|
45
45
|
shouldForwardProp: (prop) => prop !== 'showMine' && prop !== 'showManagedCourses'
|
|
@@ -204,22 +204,22 @@ export default function Courses(inProps) {
|
|
|
204
204
|
/**
|
|
205
205
|
* Renders courses list
|
|
206
206
|
*/
|
|
207
|
-
const c = (_jsxs(_Fragment, { children: [showFilters && (_jsx(Grid, Object.assign({ container: true,
|
|
207
|
+
const c = (_jsxs(_Fragment, { children: [showFilters && (_jsx(Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : (_jsxs(_Fragment, { children: [_jsx(Grid, Object.assign({ item: true, xs: 12, md: 3 }, { children: _jsx(TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: _jsx(FormattedMessage, { id: "ui.courses.filterByName", defaultMessage: "ui.courses.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
|
|
208
208
|
e.preventDefault();
|
|
209
209
|
if (e.key === 'Enter') {
|
|
210
210
|
fetchCourses();
|
|
211
211
|
}
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
} }) })), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && (_jsx(Grid, Object.assign({ size: "grow" }, { children: _jsx(CoursesChipRoot, { color: showManagedCourses ? 'primary' : 'default', variant: showManagedCourses ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.courses.filterByManagedByMe", defaultMessage: "ui.courses.filterByManagedByMe" }), onClick: () => setShowManagedCourses(!showManagedCourses),
|
|
212
|
+
}, InputProps: {
|
|
213
|
+
endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? (_jsx(IconButton, Object.assign({ onClick: () => fetchCourses(), disabled: loading }, { children: _jsx(Icon, { children: "search" }) }))) : (_jsx(Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchCourses(), endIcon: _jsx(Icon, { children: "search" }), disabled: loading })) })))
|
|
214
|
+
} }) })), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && (_jsx(Grid, Object.assign({ item: true }, { children: _jsx(CoursesChipRoot, { color: showManagedCourses ? 'primary' : 'default', variant: showManagedCourses ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.courses.filterByManagedByMe", defaultMessage: "ui.courses.filterByManagedByMe" }), onClick: () => setShowManagedCourses(!showManagedCourses),
|
|
217
215
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
218
|
-
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? _jsx(Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), _jsx(Grid, Object.assign({
|
|
216
|
+
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? _jsx(Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), _jsx(Grid, Object.assign({ item: true, xs: 12, md: "auto" }, { children: _jsx(FormControl, Object.assign({ fullWidth: true }, { children: _jsx(CategoryAutocomplete, { onChange: handleOnChangeCategory, className: classes.category, size: "small", multiple: true }) })) })), authUserId && (_jsx(Grid, Object.assign({ item: true }, { children: _jsx(CoursesChipRoot, { color: showMine ? 'primary' : 'default', variant: showMine ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.courses.filterByMine", defaultMessage: "ui.courses.filterByMine" }), onClick: handleChipClick,
|
|
219
217
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
220
218
|
showMine: showMine, deleteIcon: showMine ? _jsx(Icon, { children: "close" }) : null, onDelete: showMine ? handleDeleteClick : null, disabled: loading || showManagedCourses }) })))] })) }))), _jsx(_Fragment, { children: !courses.length ? (_jsx(Box, Object.assign({ className: classes.noResults }, { children: !canCreateCourse && onlyStaffEnabled ? (_jsxs(Stack, Object.assign({ className: classes.studentEmptyView }, { children: [_jsx(Stack, Object.assign({ className: classes.emptyBox }, { children: _jsx(Stack, Object.assign({ className: classes.emptyRotatedBox }, { children: _jsx(Icon, Object.assign({ className: classes.emptyIcon, color: "disabled", fontSize: "large" }, { children: "courses" })) })) })), _jsx(Typography, Object.assign({ variant: "h5", textAlign: "center" }, { children: _jsx(FormattedMessage, { id: "ui.courses.empty.title", defaultMessage: "ui.courses.empty.title" }) })), _jsx(Typography, Object.assign({ variant: "body1", textAlign: "center" }, { children: _jsx(FormattedMessage, { id: "ui.courses.empty.info", defaultMessage: "ui.courses.empty.info" }) }))] }))) : (_jsx(Box, Object.assign({ className: classes.teacherEmptyView }, { children: _jsx(Skeleton, Object.assign({ teacherView: (onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled, coursesNumber: 1 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps })) }))) }))) : (_jsx(InfiniteScroll, Object.assign({ dataLength: courses.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: isMobile ? (_jsx(CourseSkeleton, { template: SCCourseTemplateType.PREVIEW })) : (_jsx(Skeleton, Object.assign({ coursesNumber: 4 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps }))), endMessage: _jsx(Typography, Object.assign({ component: "div", className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.courses.endMessage", defaultMessage: "ui.courses.endMessage", values: {
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
220
|
+
// @ts-ignore
|
|
221
221
|
button: (chunk) => (_jsx(Button, Object.assign({ color: "secondary", variant: "text", onClick: handleScrollUp }, { children: chunk })))
|
|
222
|
-
} }) })) }, { children: _jsx(Grid, Object.assign({ container: true,
|
|
222
|
+
} }) })) }, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: _jsxs(_Fragment, { children: [courses.map((course) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3, className: classes.item }, GridItemComponentProps, { children: _jsx(Course, Object.assign({ courseId: course.id }, CourseComponentProps)) }), course.id))), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && courses.length % 2 !== 0 && (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3, className: classes.itemPlaceholder }, GridItemComponentProps, { children: _jsx(CourseCreatePlaceholder, { CreateCourseButtonComponentProps: CreateCourseButtonComponentProps }) }), "placeholder-item"))] }) })) }))) })] }));
|
|
223
223
|
/**
|
|
224
224
|
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
225
225
|
*/
|
|
@@ -37,5 +37,5 @@ const Root = styled(Box, {
|
|
|
37
37
|
*/
|
|
38
38
|
export default function CoursesSkeleton(inProps) {
|
|
39
39
|
const { className, CourseSkeletonProps = {}, coursesNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {}, teacherView = false } = inProps, rest = __rest(inProps, ["className", "CourseSkeletonProps", "coursesNumber", "GridContainerComponentProps", "GridItemComponentProps", "teacherView"]);
|
|
40
|
-
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true,
|
|
40
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((course, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3 }, GridItemComponentProps, { className: classes.item }, { children: teacherView ? _jsx(CourseCreatePlaceholder, {}) : _jsx(CourseSkeleton, Object.assign({}, CourseSkeletonProps)) }), index))) })) })));
|
|
41
41
|
}
|
|
@@ -100,11 +100,5 @@ export default function CreateLiveStreamDialog(inProps) {
|
|
|
100
100
|
/**
|
|
101
101
|
* Renders root object
|
|
102
102
|
*/
|
|
103
|
-
return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, maxWidth: "md", title: _jsxs(Box, Object.assign({ className: classes.title, component: "span" }, { children: [canShowBackButton && (_jsx(Button, Object.assign({ variant: "text", onClick: handleBack, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.createLivestreamDialog.button.back", defaultMessage: "ui.createLivestreamDialog.button.back" }) }))), _jsx(Box, Object.assign({ component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.createLivestreamDialog.title", defaultMessage: "ui.createLivestreamDialog.title" }) }))] })), fullWidth: true, open: open, scroll: "body", onClose: !canShowBackButton ? onClose : undefined, className: classNames(classes.root, className),
|
|
104
|
-
transition: Transition
|
|
105
|
-
}, slotProps: {
|
|
106
|
-
paper: {
|
|
107
|
-
elevation: 0
|
|
108
|
-
}
|
|
109
|
-
} }, rest, { children: _jsxs(Box, Object.assign({ className: classes.content }, { children: [step === CreateLiveStreamStep.SELECT_TYPE && (_jsx(LiveStreamSelector, { liveSelected: liveType, onLiveSelected: handleLiveTypeSelected, onNext: handleLiveTypeSelectedNext })), step === CreateLiveStreamStep.CREATE_LIVE && (_jsx(_Fragment, { children: liveType === LiveStreamType.EVENT_LIVE ? (_jsx(EventForm, Object.assign({}, EventFormComponentProps, { EventAddressComponentProps: { locations: [SCEventLocationType.LIVESTREAM] }, onSuccess: handleSubmit }))) : (_jsx(LiveStreamForm, Object.assign({}, LiveStreamFormComponentProps, { onSuccess: handleSubmit }))) }))] })) })));
|
|
103
|
+
return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, maxWidth: "md", title: _jsxs(Box, Object.assign({ className: classes.title, component: "span" }, { children: [canShowBackButton && (_jsx(Button, Object.assign({ variant: "text", onClick: handleBack, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.createLivestreamDialog.button.back", defaultMessage: "ui.createLivestreamDialog.button.back" }) }))), _jsx(Box, Object.assign({ component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.createLivestreamDialog.title", defaultMessage: "ui.createLivestreamDialog.title" }) }))] })), fullWidth: true, open: open, scroll: "body", onClose: !canShowBackButton ? onClose : undefined, className: classNames(classes.root, className), TransitionComponent: Transition, PaperProps: { elevation: 0 } }, rest, { children: _jsxs(Box, Object.assign({ className: classes.content }, { children: [step === CreateLiveStreamStep.SELECT_TYPE && (_jsx(LiveStreamSelector, { liveSelected: liveType, onLiveSelected: handleLiveTypeSelected, onNext: handleLiveTypeSelectedNext })), step === CreateLiveStreamStep.CREATE_LIVE && (_jsx(_Fragment, { children: liveType === LiveStreamType.EVENT_LIVE ? (_jsx(EventForm, Object.assign({}, EventFormComponentProps, { EventAddressComponentProps: { locations: [SCEventLocationType.LIVESTREAM] }, onSuccess: handleSubmit }))) : (_jsx(LiveStreamForm, Object.assign({}, LiveStreamFormComponentProps, { onSuccess: handleSubmit }))) }))] })) })));
|
|
110
104
|
}
|
|
@@ -10,7 +10,7 @@ import EventImage from '../../../assets/liveStream/event';
|
|
|
10
10
|
import LiveImage from '../../../assets/liveStream/live';
|
|
11
11
|
import { LiveStreamApiClient } from '@selfcommunity/api-services';
|
|
12
12
|
import { WARNING_THRESHOLD_EXPIRING_SOON } from '../../LiveStreamRoom/constants';
|
|
13
|
-
import { Link, SCPreferences, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
13
|
+
import { Link, SCPreferences, useSCContext, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
14
14
|
import { SCCommunityEnvironment, SCCommunitySubscriptionTier } from '@selfcommunity/types';
|
|
15
15
|
import { HUB_PROD, HUB_STAGE } from '../../PlatformWidget/constants';
|
|
16
16
|
export const PREFIX = 'SCLiveStreamSelector';
|
|
@@ -23,13 +23,13 @@ const classes = {
|
|
|
23
23
|
const Root = styled(Container, {
|
|
24
24
|
name: PREFIX,
|
|
25
25
|
slot: 'Root'
|
|
26
|
-
})(() => ({}));
|
|
26
|
+
})(({ theme }) => ({}));
|
|
27
27
|
// Styled components
|
|
28
28
|
const OptionCard = styled(Paper, {
|
|
29
29
|
name: PREFIX,
|
|
30
30
|
slot: 'optionCardRoot',
|
|
31
31
|
shouldForwardProp: (prop) => prop !== 'selected'
|
|
32
|
-
})(() => ({
|
|
32
|
+
})(({ theme, selected }) => ({
|
|
33
33
|
'& h6': {
|
|
34
34
|
fontWeight: 'bold',
|
|
35
35
|
textTransform: 'uppercase'
|
|
@@ -38,7 +38,7 @@ const OptionCard = styled(Paper, {
|
|
|
38
38
|
const FeatureItem = styled(Box, {
|
|
39
39
|
name: PREFIX,
|
|
40
40
|
slot: 'featureItemRoot'
|
|
41
|
-
})(() => ({}));
|
|
41
|
+
})(({ theme }) => ({}));
|
|
42
42
|
/**
|
|
43
43
|
*> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
|
|
44
44
|
*
|
|
@@ -66,6 +66,7 @@ export default function LiveStreamSelector(inProps) {
|
|
|
66
66
|
});
|
|
67
67
|
const { className, liveSelected, onLiveSelected, onNext } = props;
|
|
68
68
|
// CONTEXT
|
|
69
|
+
const scContext = useSCContext();
|
|
69
70
|
const scUserContext = useSCUser();
|
|
70
71
|
const { enqueueSnackbar } = useSnackbar();
|
|
71
72
|
// STATE
|
|
@@ -161,7 +162,9 @@ export default function LiveStreamSelector(inProps) {
|
|
|
161
162
|
let _message;
|
|
162
163
|
if (isFreeTrialTier && isCommunityOwner && !isEnterpriseTier) {
|
|
163
164
|
_message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningSubscriptionRequired", defaultMessage: "ui.liveStreamForm.selector.warningSubscriptionRequired", values: {
|
|
164
|
-
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
166
|
+
// @ts-ignore
|
|
167
|
+
link: (...chunks) => (_jsx(Link, Object.assign({ target: "_blank", to: `${isStage ? HUB_STAGE : HUB_PROD}dashboard/community/${communityStackId}/subscription` }, { children: chunks })))
|
|
165
168
|
} }));
|
|
166
169
|
}
|
|
167
170
|
else if (timeRemaining !== null && timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON) {
|
|
@@ -183,6 +186,6 @@ export default function LiveStreamSelector(inProps) {
|
|
|
183
186
|
e.preventDefault();
|
|
184
187
|
}
|
|
185
188
|
} }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: option.title })), _jsx(Radio, { checked: selectedOption === option.type })] }), _jsx("img", { src: option.image, alt: "option-image" }), _jsx(Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
|
|
186
|
-
return (_jsx(FeatureItem, Object.assign({
|
|
189
|
+
return (_jsx(FeatureItem, Object.assign({ component: "li" }, { children: _jsx(Typography, Object.assign({ variant: "body2", color: "text.secondary", sx: { flex: 1 } }, { children: feature })) }), featureIndex));
|
|
187
190
|
}) }))] }), index))) })), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ disabled: !selectedOption || !timeRemaining || isFreeTrialTier, variant: "contained", onClick: handleNext, color: "secondary" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.next", defaultMessage: "ui.liveStreamForm.selector.next" }) })) }))] })));
|
|
188
191
|
}
|
|
@@ -7,6 +7,7 @@ import { useThemeProps } from '@mui/system';
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import { useSCPaymentsEnabled } from '@selfcommunity/react-core';
|
|
9
9
|
import { PREFIX } from './constants';
|
|
10
|
+
import { LoadingButton } from '@mui/lab';
|
|
10
11
|
import { PaymentApiClient } from '@selfcommunity/api-services';
|
|
11
12
|
import { Logger } from '@selfcommunity/utils';
|
|
12
13
|
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
@@ -133,10 +134,8 @@ export default function CreatePaymentProductForm(inProps) {
|
|
|
133
134
|
return null;
|
|
134
135
|
}
|
|
135
136
|
console.log(fieldsError);
|
|
136
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Typography, Object.assign({ mb: 1 }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.title", defaultMessage: "ui.createPaymentProductForm.title" }) })), _jsx(TextField, Object.assign({ size: "small", id: "name", label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.name", defaultMessage: "ui.createPaymentProductForm.name" }), variant: "outlined", fullWidth: true, value: name, error: Boolean(fieldsError && fieldsError.name) }, (Boolean(fieldsError && fieldsError.name) && { helperText: fieldsError.name }), { onChange: (e) => handleChange('name', e) })), _jsx(TextField, Object.assign({ size: "small", id: "description", label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.description", defaultMessage: "ui.createPaymentProductForm.description" }), variant: "outlined", fullWidth: true, value: description, onChange: (e) => handleChange('description', e), multiline: true, maxRows: 2, error: Boolean(fieldsError && fieldsError.description) }, (Boolean(fieldsError && fieldsError.description) && { helperText: fieldsError.description }))), _jsx(TextField, { label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.price", defaultMessage: "ui.createPaymentProductForm.price" }), variant: "outlined", value: unitAmount, onChange: (e) => handleChange('unitAmount', e), name: "unitAmount", id: "unitAmount", helperText: fieldsError && fieldsError.unitAmount ? (_jsx(_Fragment, { children: fieldsError.unitAmount })) : (_jsx(_Fragment, { children: intl.formatMessage({ id: 'ui.createPaymentProductForm.minPrice', defaultMessage: 'ui.createPaymentProductForm.minPrice' }, { min: DEFAULT_MIN_PRICE }) })),
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
}, fullWidth: true, error: Boolean(fieldsError && fieldsError.unitAmount) }), error && (_jsx(Typography, Object.assign({ component: "div", className: classes.error, variant: "body2" }, { children: error }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 1 }, { children: [onCancel && (_jsx(Button, Object.assign({ variant: "text", size: "small", color: "inherit", onClick: onCancel }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.btn.cancel", defaultMessage: "ui.createPaymentProductForm.btn.cancel" }) }))), _jsx(Button, Object.assign({ loading: loading, variant: "contained", size: "small", color: "error", onClick: handleCreateProduct }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.btn.create", defaultMessage: "ui.createPaymentProductForm.btn.create" }) }))] }))] })));
|
|
137
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Typography, Object.assign({ mb: 1 }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.title", defaultMessage: "ui.createPaymentProductForm.title" }) })), _jsx(TextField, Object.assign({ size: "small", id: "name", label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.name", defaultMessage: "ui.createPaymentProductForm.name" }), variant: "outlined", fullWidth: true, value: name, error: Boolean(fieldsError && fieldsError.name) }, (Boolean(fieldsError && fieldsError.name) && { helperText: fieldsError.name }), { onChange: (e) => handleChange('name', e) })), _jsx(TextField, Object.assign({ size: "small", id: "description", label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.description", defaultMessage: "ui.createPaymentProductForm.description" }), variant: "outlined", fullWidth: true, value: description, onChange: (e) => handleChange('description', e), multiline: true, maxRows: 2, error: Boolean(fieldsError && fieldsError.description) }, (Boolean(fieldsError && fieldsError.description) && { helperText: fieldsError.description }))), _jsx(TextField, { label: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.price", defaultMessage: "ui.createPaymentProductForm.price" }), variant: "outlined", value: unitAmount, onChange: (e) => handleChange('unitAmount', e), name: "unitAmount", id: "unitAmount", helperText: fieldsError && fieldsError.unitAmount ? (_jsx(_Fragment, { children: fieldsError.unitAmount })) : (_jsx(_Fragment, { children: intl.formatMessage({ id: 'ui.createPaymentProductForm.minPrice', defaultMessage: 'ui.createPaymentProductForm.minPrice' }, { min: DEFAULT_MIN_PRICE }) })), InputProps: {
|
|
138
|
+
startAdornment: _jsx(InputAdornment, Object.assign({ position: "start" }, { children: "\u20AC" })),
|
|
139
|
+
inputComponent: NumericFormatCustom
|
|
140
|
+
}, fullWidth: true, error: Boolean(fieldsError && fieldsError.unitAmount) }), error && (_jsx(Typography, Object.assign({ component: "div", className: classes.error, variant: "body2" }, { children: error }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 1 }, { children: [onCancel && (_jsx(Button, Object.assign({ variant: "text", size: "small", color: "inherit", onClick: onCancel }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.btn.cancel", defaultMessage: "ui.createPaymentProductForm.btn.cancel" }) }))), _jsx(LoadingButton, Object.assign({ loading: loading, variant: "contained", size: "small", color: "error", onClick: handleCreateProduct }, { children: _jsx(FormattedMessage, { id: "ui.createPaymentProductForm.btn.create", defaultMessage: "ui.createPaymentProductForm.btn.create" }) }))] }))] })));
|
|
142
141
|
}
|
|
@@ -8,7 +8,7 @@ const classes = {
|
|
|
8
8
|
const Root = styled(GenericSkeleton, {
|
|
9
9
|
name: PREFIX,
|
|
10
10
|
slot: 'SkeletonRoot'
|
|
11
|
-
})(() => ({}));
|
|
11
|
+
})(({ theme }) => ({}));
|
|
12
12
|
/**
|
|
13
13
|
* > API documentation for the Community-JS Custom Adv Skeleton component. Learn about the available props and the CSS API.
|
|
14
14
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box,
|
|
2
|
+
import { Box, Icon, MenuItem, Select, Typography, useMediaQuery, useTheme } from '@mui/material';
|
|
3
3
|
import { Fragment, memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import { PREFIX } from '../constants';
|
|
6
6
|
import MenuRow from '../MenuRow';
|
|
7
7
|
import { Logger } from '@selfcommunity/utils';
|
|
8
8
|
import { SCOPE_SC_UI } from '../../../constants/Errors';
|
|
9
|
+
import { LoadingButton } from '@mui/lab';
|
|
9
10
|
import { useSnackbar } from 'notistack';
|
|
10
11
|
import { SCCourseLessonStatusType } from '@selfcommunity/types';
|
|
11
12
|
import { CourseService } from '@selfcommunity/api-services';
|
|
@@ -73,12 +74,12 @@ function ChangeLessonStatus(props) {
|
|
|
73
74
|
handleAction(newValue);
|
|
74
75
|
}
|
|
75
76
|
}, [handleAction, value]);
|
|
76
|
-
return (_jsx(Fragment, { children: isMobile ? (_jsx(MenuRow, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, { children: _jsx(
|
|
77
|
+
return (_jsx(Fragment, { children: isMobile ? (_jsx(MenuRow, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, { children: _jsx(LoadingButton, Object.assign({ size: "small", color: "inherit", onClick: handleClick, loading: loading, disabled: loading, "data-value": option.value, sx: {
|
|
77
78
|
padding: 0,
|
|
78
79
|
':hover': {
|
|
79
80
|
backgroundColor: 'unset'
|
|
80
81
|
}
|
|
81
|
-
} }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : (_jsx(Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, Object.assign({ value: option.value }, { children: _jsx(
|
|
82
|
+
} }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : (_jsx(Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, Object.assign({ value: option.value }, { children: _jsx(LoadingButton, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
|
|
82
83
|
padding: 0,
|
|
83
84
|
':hover': {
|
|
84
85
|
backgroundColor: 'unset'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { LoadingButton } from '@mui/lab';
|
|
3
|
+
import { debounce, Icon, IconButton, Stack, TextField, Typography } from '@mui/material';
|
|
3
4
|
import { Fragment, memo, useCallback, useState } from 'react';
|
|
4
5
|
import { PREFIX } from '../constants';
|
|
5
6
|
import { Logger } from '@selfcommunity/utils';
|
|
@@ -74,6 +75,6 @@ function FieldName(props) {
|
|
|
74
75
|
handleDisableEditMode();
|
|
75
76
|
}
|
|
76
77
|
}, [row, isNewRow, handleManageRow, setName, handleDisableEditMode]);
|
|
77
|
-
return (_jsx(Fragment, { children: isNewRow || editMode ? (_jsxs(Stack, Object.assign({ className: classes.editModeWrapper }, { children: [_jsx(TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), _jsx(
|
|
78
|
+
return (_jsx(Fragment, { children: isNewRow || editMode ? (_jsxs(Stack, Object.assign({ className: classes.editModeWrapper }, { children: [_jsx(TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), _jsx(LoadingButton, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleSubmit, loading: loading, disabled: loading, className: classes.editModeSaveButton }, { children: _jsx(Icon, { children: "check" }) })), _jsx(IconButton, Object.assign({ color: "default", size: "small", onClick: handleClose, className: classes.editModeCloseButton }, { children: _jsx(Icon, { children: "close" }) }))] }))) : (_jsx(Typography, Object.assign({ variant: "body1" }, { children: row.name }))) }));
|
|
78
79
|
}
|
|
79
80
|
export default memo(FieldName);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box,
|
|
2
|
+
import { Box, Stack, Typography } from '@mui/material';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import { PREFIX } from './constants';
|
|
5
5
|
import { memo, useCallback, useState } from 'react';
|
|
@@ -8,6 +8,7 @@ import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
|
8
8
|
import { useSnackbar } from 'notistack';
|
|
9
9
|
import SwitchForm from './Options/SwitchForm';
|
|
10
10
|
import useDeepCompareEffect from 'use-deep-compare-effect';
|
|
11
|
+
import { LoadingButton } from '@mui/lab';
|
|
11
12
|
import { CourseService } from '@selfcommunity/api-services';
|
|
12
13
|
const classes = {
|
|
13
14
|
optionsContainer: `${PREFIX}-options-container`,
|
|
@@ -87,6 +88,6 @@ function Options(props) {
|
|
|
87
88
|
});
|
|
88
89
|
});
|
|
89
90
|
}, [course, tempOptions, setCanSave, setLoading]);
|
|
90
|
-
return (_jsxs(Box, Object.assign({ className: classes.optionsContainer }, { children: [_jsx(Stack, Object.assign({ className: classes.optionsWrapper }, { children: Object.entries(OPTIONS).map(([key, value], i) => (_jsx(SwitchForm, { name: key, title: value.title, description: value.description, checked: course[key], handleChangeOptions: handleChange }, i))) })), _jsx(Stack, Object.assign({ className: classes.optionsButtonWrapper }, { children: _jsx(
|
|
91
|
+
return (_jsxs(Box, Object.assign({ className: classes.optionsContainer }, { children: [_jsx(Stack, Object.assign({ className: classes.optionsWrapper }, { children: Object.entries(OPTIONS).map(([key, value], i) => (_jsx(SwitchForm, { name: key, title: value.title, description: value.description, checked: course[key], handleChangeOptions: handleChange }, i))) })), _jsx(Stack, Object.assign({ className: classes.optionsButtonWrapper }, { children: _jsx(LoadingButton, Object.assign({ size: "small", variant: "contained", disabled: !canSave, onClick: handleSubmit, loading: loading }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.editCourse.tab.options.button.save", defaultMessage: "ui.editCourse.tab.options.button.save" }) })) })) }))] })));
|
|
91
92
|
}
|
|
92
93
|
export default memo(Options);
|
|
@@ -24,6 +24,6 @@ export default function Status(props) {
|
|
|
24
24
|
id: `ui.course.privacy.${course.privacy === SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`,
|
|
25
25
|
defaultMessage: `ui.course.privacy.${course.privacy === SCCoursePrivacyType.DRAFT ? 'draft' : course.privacy}`
|
|
26
26
|
}),
|
|
27
|
-
b: (chunks) => (_jsx(Typography, Object.assign({ component: "b", fontWeight: "bold" }, { children: chunks })
|
|
27
|
+
b: (chunks) => (_jsx(Typography, Object.assign({ component: "b", fontWeight: "bold" }, { children: chunks })))
|
|
28
28
|
}) })) })), className: classNames(classes.status, classes.contrastColor) }));
|
|
29
29
|
}
|
|
@@ -34,7 +34,7 @@ const Root = styled(Box, {
|
|
|
34
34
|
overridesResolver: (props, styles) => {
|
|
35
35
|
return [styles.root, props.className.includes(classes.toolbar) && styles.toolbar];
|
|
36
36
|
}
|
|
37
|
-
})(() => ({}));
|
|
37
|
+
})(({ theme }) => ({}));
|
|
38
38
|
const editorTheme = {
|
|
39
39
|
heading: {
|
|
40
40
|
h1: `${PREFIX}-h1`,
|
|
@@ -104,7 +104,7 @@ const Editor = (inProps, ref) => {
|
|
|
104
104
|
name: PREFIX
|
|
105
105
|
});
|
|
106
106
|
const { id = 'editor', className = null, defaultValue = '', toolbar = false, uploadImage = false, uploadFile = false, editable = true, onChange = null, onMediaChange = null, onFocus = null, onBlur = null, action = null, ToolBarProps = {}, MediaPluginProps = {}, placeholder = _jsx(FormattedMessage, { id: "ui.editor.placeholder", defaultMessage: "ui.editor.placeholder" }), isLessonCommentEditor = false } = props;
|
|
107
|
-
const apiRef = useRef(
|
|
107
|
+
const apiRef = useRef();
|
|
108
108
|
// STATE
|
|
109
109
|
const [focused, setFocused] = useState(false);
|
|
110
110
|
// HANDLERS
|
|
@@ -114,7 +114,7 @@ const Editor = (inProps, ref) => {
|
|
|
114
114
|
const handleMediaChange = (media) => {
|
|
115
115
|
onMediaChange && onMediaChange(media);
|
|
116
116
|
};
|
|
117
|
-
const handleError = (error) => {
|
|
117
|
+
const handleError = (error, editor) => {
|
|
118
118
|
console.log(error);
|
|
119
119
|
};
|
|
120
120
|
const handleFocus = () => {
|
|
@@ -14,16 +14,14 @@ function Emoji({ editor, className = '', isLessonCommentEditor = false }) {
|
|
|
14
14
|
const handleOpen = (event) => {
|
|
15
15
|
setEmojiAnchorEl(event.currentTarget);
|
|
16
16
|
};
|
|
17
|
-
const handleEmojiClick = (emojiData) => {
|
|
17
|
+
const handleEmojiClick = (emojiData, event) => {
|
|
18
18
|
editor.focus();
|
|
19
19
|
editor.dispatchCommand(CONTROLLED_TEXT_INSERTION_COMMAND, emojiData.emoji);
|
|
20
20
|
};
|
|
21
21
|
if (isMobile) {
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
return (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ className: className, onClick: handleOpen }, { children: _jsx(Icon, { children: "sentiment_satisfied_alt" }) })), _jsx(Popover, Object.assign({ open: Boolean(emojiAnchorEl), anchorEl: emojiAnchorEl, onClose: () => setEmojiAnchorEl(null),
|
|
25
|
-
transition: Fade
|
|
26
|
-
}, anchorOrigin: isLessonCommentEditor ? { vertical: 'bottom', horizontal: 'left' } : { vertical: 'top', horizontal: 'right' }, transformOrigin: isLessonCommentEditor ? { vertical: 'top', horizontal: 'right' } : { vertical: 'bottom', horizontal: 'left' }, sx: (theme) => {
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ className: className, onClick: handleOpen }, { children: _jsx(Icon, { children: "sentiment_satisfied_alt" }) })), _jsx(Popover, Object.assign({ open: Boolean(emojiAnchorEl), anchorEl: emojiAnchorEl, onClose: () => setEmojiAnchorEl(null), TransitionComponent: Fade, anchorOrigin: isLessonCommentEditor ? { vertical: 'bottom', horizontal: 'left' } : { vertical: 'top', horizontal: 'right' }, transformOrigin: isLessonCommentEditor ? { vertical: 'top', horizontal: 'right' } : { vertical: 'bottom', horizontal: 'left' }, sx: (theme) => {
|
|
27
25
|
return { zIndex: theme.zIndex.tooltip };
|
|
28
26
|
} }, { children: _jsx(EmojiPicker, { onEmojiClick: handleEmojiClick }) }))] }));
|
|
29
27
|
}
|
|
@@ -93,12 +93,10 @@ function FloatingLinkPlugin({ editor, isLink, setIsLink }) {
|
|
|
93
93
|
}
|
|
94
94
|
return (_jsx(Root, Object.assign({ className: classes.root, open: Boolean(anchorEl), anchorEl: anchorEl, placement: "right" }, { children: _jsx(Paper, { children: _jsx(TextField, { size: "small", value: linkUrl, variant: "outlined", onChange: (event) => {
|
|
95
95
|
setLinkUrl(event.target.value);
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
} }, { children: _jsx(Icon, { children: "close" }) })), _jsx(IconButton, Object.assign({ size: "small", tabIndex: 1, onClick: handleLinkSubmission }, { children: _jsx(Icon, { children: "check" }) }))] })))
|
|
101
|
-
}
|
|
96
|
+
}, InputProps: {
|
|
97
|
+
endAdornment: (_jsxs(InputAdornment, Object.assign({ position: "end" }, { children: [_jsx(IconButton, Object.assign({ size: "small", tabIndex: 0, onClick: () => {
|
|
98
|
+
setIsLink(false);
|
|
99
|
+
} }, { children: _jsx(Icon, { children: "close" }) })), _jsx(IconButton, Object.assign({ size: "small", tabIndex: 1, onClick: handleLinkSubmission }, { children: _jsx(Icon, { children: "check" }) }))] })))
|
|
102
100
|
} }) }) })));
|
|
103
101
|
}
|
|
104
102
|
function useFloatingLinkEditorToolbar(editor) {
|