@selfcommunity/react-ui 0.11.0-react-17.0.1.3 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -2
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +6 -11
- package/lib/cjs/components/AccountDelete/AccountDelete.js +5 -12
- package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
- package/lib/cjs/components/BuyButton/BuyButton.js +8 -5
- package/lib/cjs/components/Categories/Categories.js +1 -1
- package/lib/cjs/components/Categories/Skeleton.js +1 -1
- package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
- package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +13 -4
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
- package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/cjs/components/Checkout/Skeleton.js +1 -3
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
- package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.js +2 -3
- package/lib/cjs/components/Composer/Composer.js +3 -4
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +11 -5
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +12 -5
- package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/cjs/components/CourseForm/CourseForm.js +9 -6
- package/lib/cjs/components/CourseForm/Edit.js +6 -2
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
- package/lib/cjs/components/Courses/Courses.d.ts +0 -4
- package/lib/cjs/components/Courses/Courses.js +10 -11
- package/lib/cjs/components/Courses/Skeleton.js +1 -1
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +5 -8
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
- package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
- package/lib/cjs/components/EditCourse/Options.js +1 -2
- package/lib/cjs/components/EditCourse/Status.js +1 -1
- package/lib/cjs/components/Editor/Editor.js +3 -3
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +4 -2
- package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
- package/lib/cjs/components/Event/Skeleton.js +1 -2
- package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +7 -4
- package/lib/cjs/components/EventForm/EventAddress.js +9 -5
- package/lib/cjs/components/EventForm/EventForm.js +89 -51
- package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
- package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +3 -2
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +5 -16
- package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +8 -0
- package/lib/cjs/components/EventLocationWidget/EventMap.js +28 -0
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
- package/lib/cjs/components/EventMediaWidget/index.d.ts +2 -1
- package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
- package/lib/cjs/components/Events/Events.d.ts +0 -4
- package/lib/cjs/components/Events/Events.js +14 -9
- package/lib/cjs/components/Events/LocationEventsFilter.js +5 -1
- package/lib/cjs/components/Events/OngoingEventsFilter.js +6 -2
- package/lib/cjs/components/Events/PastEventsFilter.js +6 -2
- package/lib/cjs/components/Events/Skeleton.js +1 -1
- package/lib/cjs/components/Feed/Feed.js +9 -10
- package/lib/cjs/components/Feed/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.js +2 -3
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
- package/lib/cjs/components/GroupActionsMenu/index.js +9 -1
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +7 -4
- package/lib/cjs/components/GroupForm/GroupForm.js +16 -27
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +8 -7
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
- package/lib/cjs/components/Groups/Groups.js +10 -10
- package/lib/cjs/components/Groups/Skeleton.js +1 -2
- package/lib/cjs/components/Incubator/Incubator.js +4 -4
- package/lib/cjs/components/Incubator/Skeleton.js +1 -1
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +15 -12
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +11 -11
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
- package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
- package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/cjs/components/Notification/Course/Course.js +5 -10
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/cjs/components/Notification/Event/Event.js +7 -12
- package/lib/cjs/components/Notification/Group/Group.js +3 -4
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +4 -9
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
- package/lib/cjs/components/Notification/Notification.js +17 -9
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +4 -5
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +12 -4
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +19 -27
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +7 -5
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +39 -26
- package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +8 -6
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +5 -2
- package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +9 -8
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -6
- package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +12 -10
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +30 -22
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
- package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +24 -3
- package/lib/cjs/components/UserPaymentMethods/Skeleton.js +2 -4
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +9 -20
- package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +3 -2
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/cjs/shared/CopyTextArea/index.js +12 -6
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +6 -5
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
- package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
- package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/cjs/shared/EventActionsMenu/index.js +9 -1
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +4 -6
- package/lib/cjs/shared/Media/File/DocComponent.d.ts +2 -0
- package/lib/cjs/shared/Media/File/DocComponent.js +3 -2
- package/lib/cjs/shared/Media/File/PreviewComponent.js +4 -3
- package/lib/cjs/shared/Media/File/TriggerButton.js +9 -1
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +4 -12
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +3 -1
- package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
- package/lib/cjs/shared/PasswordTextField/index.js +7 -5
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/TagChip/index.d.ts +2 -48
- package/lib/cjs/shared/TagChip/index.js +2 -2
- package/lib/cjs/shared/Tags/index.js +9 -9
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +7 -12
- package/lib/esm/components/AccountDelete/AccountDelete.js +6 -13
- package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
- package/lib/esm/components/BroadcastMessages/Message.js +1 -1
- package/lib/esm/components/BuyButton/BuyButton.js +9 -6
- package/lib/esm/components/Categories/Categories.js +1 -1
- package/lib/esm/components/Categories/Skeleton.js +1 -1
- package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
- package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +14 -5
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
- package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
- package/lib/esm/components/Checkout/Skeleton.js +2 -4
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +3 -4
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
- package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.js +2 -3
- package/lib/esm/components/Composer/Composer.js +4 -5
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +12 -6
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +12 -5
- package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
- package/lib/esm/components/CourseForm/CourseForm.js +10 -7
- package/lib/esm/components/CourseForm/Edit.js +6 -2
- package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
- package/lib/esm/components/Courses/Courses.d.ts +0 -4
- package/lib/esm/components/Courses/Courses.js +10 -10
- package/lib/esm/components/Courses/Skeleton.js +1 -1
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +6 -9
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
- package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
- package/lib/esm/components/EditCourse/Options.js +2 -3
- package/lib/esm/components/EditCourse/Status.js +1 -1
- package/lib/esm/components/Editor/Editor.js +3 -3
- package/lib/esm/components/Editor/plugins/EmojiPlugin.js +4 -2
- package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
- package/lib/esm/components/Event/Skeleton.js +1 -2
- package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +8 -5
- package/lib/esm/components/EventForm/EventAddress.js +9 -5
- package/lib/esm/components/EventForm/EventForm.js +91 -53
- package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
- package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +3 -2
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +5 -16
- package/lib/esm/components/EventLocationWidget/EventMap.d.ts +8 -0
- package/lib/esm/components/EventLocationWidget/EventMap.js +25 -0
- package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
- package/lib/esm/components/EventMediaWidget/index.d.ts +2 -1
- package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
- package/lib/esm/components/Events/Events.d.ts +0 -4
- package/lib/esm/components/Events/Events.js +14 -8
- package/lib/esm/components/Events/LocationEventsFilter.js +5 -1
- package/lib/esm/components/Events/OngoingEventsFilter.js +6 -2
- package/lib/esm/components/Events/PastEventsFilter.js +6 -2
- package/lib/esm/components/Events/Skeleton.js +1 -1
- package/lib/esm/components/Feed/Feed.js +10 -11
- package/lib/esm/components/Feed/Skeleton.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Actions.js +2 -3
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
- package/lib/esm/components/GroupActionsMenu/index.js +9 -1
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +8 -5
- package/lib/esm/components/GroupForm/GroupForm.js +17 -28
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +8 -7
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
- package/lib/esm/components/Groups/Groups.js +10 -10
- package/lib/esm/components/Groups/Skeleton.js +1 -2
- package/lib/esm/components/Incubator/Incubator.js +4 -4
- package/lib/esm/components/Incubator/Skeleton.js +1 -1
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -5
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +16 -13
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +12 -12
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
- package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +2 -5
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
- package/lib/esm/components/Notification/Comment/Comment.js +3 -3
- package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/esm/components/Notification/Course/Course.js +6 -11
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
- package/lib/esm/components/Notification/Event/Event.js +8 -13
- package/lib/esm/components/Notification/Group/Group.js +4 -5
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +5 -10
- package/lib/esm/components/Notification/Mention/Mention.js +2 -2
- package/lib/esm/components/Notification/Notification.js +18 -10
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +5 -6
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/esm/components/OnBoardingWidget/ActionsButton.js +12 -4
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +20 -28
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +8 -6
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +39 -26
- package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/esm/components/Paywalls/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
- package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +9 -7
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +7 -4
- package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +10 -9
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +5 -7
- package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +14 -12
- package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +30 -22
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
- package/lib/esm/components/UserCounters/UserCounters.js +5 -13
- package/lib/esm/components/UserInfo/UserInfo.js +1 -1
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +24 -3
- package/lib/esm/components/UserPaymentMethods/Skeleton.js +2 -4
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +11 -12
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +12 -23
- package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
- package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/esm/components/VoteButton/VoteButton.js +3 -4
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +3 -2
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
- package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
- package/lib/esm/shared/CopyTextArea/index.js +12 -6
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +7 -6
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
- package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
- package/lib/esm/shared/DateTimeAgo/index.js +2 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
- package/lib/esm/shared/EventActionsMenu/index.js +9 -1
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
- package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +4 -6
- package/lib/esm/shared/Media/File/DocComponent.d.ts +2 -0
- package/lib/esm/shared/Media/File/DocComponent.js +3 -2
- package/lib/esm/shared/Media/File/PreviewComponent.js +4 -3
- package/lib/esm/shared/Media/File/TriggerButton.js +9 -1
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
- package/lib/esm/shared/Media/Link/DisplayComponent.js +5 -13
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -1
- package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
- package/lib/esm/shared/PasswordTextField/index.js +7 -5
- package/lib/esm/shared/ScrollContainer/index.js +1 -1
- package/lib/esm/shared/TagChip/index.d.ts +2 -48
- package/lib/esm/shared/TagChip/index.js +2 -2
- package/lib/esm/shared/Tags/index.js +9 -9
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/umd/484.js +2 -0
- package/lib/umd/484.js.LICENSE.txt +9 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +207 -206
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -14
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -10
- package/lib/umd/155.js +0 -2
- package/lib/umd/155.js.LICENSE.txt +0 -24
|
@@ -125,7 +125,6 @@ function ConsentSolution(inProps) {
|
|
|
125
125
|
const [loading, setLoading] = (0, react_1.useState)(true);
|
|
126
126
|
const [loadingAck, setLoadingAck] = (0, react_1.useState)(false);
|
|
127
127
|
const [rejected, setRejected] = (0, react_1.useState)(false);
|
|
128
|
-
const [dataPortability, setDataPortability] = (0, react_1.useState)(null);
|
|
129
128
|
const [dataPortabilityChecked, setDataPortabilityChecked] = (0, react_1.useState)(false);
|
|
130
129
|
const [loadingDeleteAccount, setLoadingDeleteAccount] = (0, react_1.useState)(false);
|
|
131
130
|
// CONST
|
|
@@ -248,7 +247,7 @@ function ConsentSolution(inProps) {
|
|
|
248
247
|
const isAccept = Boolean(doc.ack && doc.ack.accepted_at);
|
|
249
248
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.acceptDocumentTitle", defaultMessage: "ui.consentSolution.acceptDocumentTitle", values: { label: doc.title } }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true, ref: contentDialog }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "div", gutterBottom: true, dangerouslySetInnerHTML: {
|
|
250
249
|
__html: (0, legalPages_1.getDocumentBody)(doc)
|
|
251
|
-
} }) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { className: classes.consentSwitch, control: (0, jsx_runtime_1.jsx)(ConsentSolutionSwitch_1.default, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? ((0, jsx_runtime_1.jsxs)(material_1.Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), (0, jsx_runtime_1.jsx)("a", Object.assign({ onClick: () => setView(exports.REJECTION_VIEW), className: classes.deleteAccountButton }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant:
|
|
250
|
+
} }) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { className: classes.consentSwitch, control: (0, jsx_runtime_1.jsx)(ConsentSolutionSwitch_1.default, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? ((0, jsx_runtime_1.jsxs)(material_1.Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), (0, jsx_runtime_1.jsx)("a", Object.assign({ onClick: () => setView(exports.REJECTION_VIEW), className: classes.deleteAccountButton }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: handleNext, className: classes.nextButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.nextButton", defaultMessage: "ui.consentSolution.nextButton" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: (e) => handleClose(e, null), className: classes.closeButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.closeButton", defaultMessage: "ui.consentSolution.closeButton" }) })))] }))] }));
|
|
252
251
|
};
|
|
253
252
|
/**
|
|
254
253
|
* Render document detail view
|
|
@@ -258,13 +257,19 @@ function ConsentSolution(inProps) {
|
|
|
258
257
|
if (!doc) {
|
|
259
258
|
return null;
|
|
260
259
|
}
|
|
261
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant:
|
|
260
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setView(exports.ACCEPT_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(AccountDataPortability_1.default, { className: classes.dataPortability }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionTitle", defaultMessage: "ui.consentSolution.deleteAccountDpSectionTitle", values: { username: (0, utils_1.capitalize)(scUserContext.user.username) } }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
|
|
261
|
+
communityName,
|
|
262
|
+
li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.1")
|
|
263
|
+
}) }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { className: classes.dataPortabilityCheck, checked: dataPortabilityChecked, onChange: () => setDataPortabilityChecked((p) => !p) }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel", defaultMessage: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel" }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete_outlined" }), disabled: !dataPortabilityChecked, variant: "contained", className: classes.confirmDeleteAccountButton, onClick: () => setView(exports.CONFIRM_DELETE_ACCOUNT) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.confirmDeleteAccountButton", defaultMessage: "ui.consentSolution.confirmDeleteAccountButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", className: classes.logoutAccountButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "upload" }), onClick: handleLogout }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.logoutImmediatelyButton", defaultMessage: "ui.consentSolution.logoutImmediatelyButton" }) }))] }))] }));
|
|
262
264
|
};
|
|
263
265
|
/**
|
|
264
266
|
* Render delete account view
|
|
265
267
|
*/
|
|
266
268
|
const renderDeleteAccountView = () => {
|
|
267
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant:
|
|
269
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(exports.REJECTION_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountTitle", defaultMessage: "ui.consentSolution.removeAccountTitle" }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
|
|
270
|
+
communityName,
|
|
271
|
+
li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.2")
|
|
272
|
+
}) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirm", defaultMessage: "ui.consentSolution.removeAccountConfirm" }) }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(exports.REJECTION_VIEW) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountCancelButton", defaultMessage: "ui.consentSolution.removeAccountCancelButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: handleConfirmDeleteAccount }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirmButton", defaultMessage: "ui.consentSolution.removeAccountConfirmButton" }) }))] }))] }));
|
|
268
273
|
};
|
|
269
274
|
/**
|
|
270
275
|
* If there's no authUserId, component is hidden.
|
|
@@ -298,6 +303,8 @@ function ConsentSolution(inProps) {
|
|
|
298
303
|
/**
|
|
299
304
|
* Renders root object
|
|
300
305
|
*/
|
|
301
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: (0, classnames_1.default)(classes.root, className),
|
|
306
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: (0, classnames_1.default)(classes.root, className), slots: {
|
|
307
|
+
transition: DialogTransition
|
|
308
|
+
}, maxWidth: "md", fullWidth: true, open: ready, disableEscapeKeyDown: true, onClose: handleClose, scroll: "paper" }, rest, { children: content() }))) }));
|
|
302
309
|
}
|
|
303
310
|
exports.default = ConsentSolution;
|
|
@@ -43,6 +43,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
43
43
|
*/
|
|
44
44
|
function ConsentSolutionSkeleton() {
|
|
45
45
|
const ContentSection = () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "100%" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "80%" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "60%" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "30%" }), (0, jsx_runtime_1.jsx)("br", {})] }));
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: "70%" }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => ((0, jsx_runtime_1.jsx)(ContentSection, {}, i))) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: 64, className: classes.consentSwitch }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "50%", variant:
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: "70%" }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => ((0, jsx_runtime_1.jsx)(ContentSection, {}, i))) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: 64, className: classes.consentSwitch }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "50%", variant: "text", className: classes.consentSwitchLabel })] })), (0, jsx_runtime_1.jsx)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 40, width: "20%" }) }))] })));
|
|
47
47
|
}
|
|
48
48
|
exports.default = ConsentSolutionSkeleton;
|
|
@@ -34,7 +34,7 @@ function CourseCompletedDialog(inProps) {
|
|
|
34
34
|
const intl = (0, react_intl_1.useIntl)();
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: onClose, actions: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.COURSES_ROUTE_NAME, {}), size: "medium", variant: "contained" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.completedDialog.btn.label", defaultMessage: "ui.course.completedDialog.btn.label" }) })) })), className: classes.root }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.wrapper }, { children: [(0, jsx_runtime_1.jsx)("img", { src: clapping_1.default, alt: intl.formatMessage({ id: 'ui.course.completedDialog.title', defaultMessage: 'ui.course.completedDialog.title' }), width: 100, height: 100 }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h2", className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.completedDialog.title", defaultMessage: "ui.course.completedDialog.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.descriptionPt1 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.completedDialog.description.pt1", defaultMessage: "ui.course.completedDialog.description.pt1" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.descriptionPt2 }, { children: intl.formatMessage({ id: 'ui.course.completedDialog.description.pt2', defaultMessage: 'ui.course.completedDialog.description.pt2' }, {
|
|
36
36
|
courseName: course.name,
|
|
37
|
-
span: (chunks) => ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks })))
|
|
37
|
+
span: (chunks) => ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks }), "ui.course.completedDialog.description.pt2.span"))
|
|
38
38
|
}) }))] })) })));
|
|
39
39
|
}
|
|
40
40
|
exports.default = (0, react_1.memo)(CourseCompletedDialog);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
interface ActionButtonProps extends ButtonProps, Omit<LoadingButtonProps, 'classes'> {
|
|
2
|
+
interface ActionButtonProps extends ButtonProps, Omit<ButtonProps, 'classes'> {
|
|
4
3
|
labelId: string;
|
|
5
4
|
to?: string;
|
|
6
5
|
}
|
|
@@ -5,12 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const react_intl_1 = require("react-intl");
|
|
7
7
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
8
|
-
const lab_1 = require("@mui/lab");
|
|
9
8
|
function ActionButton(props) {
|
|
10
9
|
const { labelId, to, size = 'small', color = 'primary', variant = 'contained' } = props, rest = tslib_1.__rest(props, ["labelId", "to", "size", "color", "variant"]);
|
|
11
10
|
if (to) {
|
|
12
11
|
return ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: to, size: size, color: color, variant: variant }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
13
12
|
}
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: size, color: color, variant: variant }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
|
|
15
14
|
}
|
|
16
15
|
exports.default = ActionButton;
|
|
@@ -6,7 +6,6 @@ const react_1 = require("react");
|
|
|
6
6
|
const utils_1 = require("@selfcommunity/utils");
|
|
7
7
|
const Errors_1 = require("../../../constants/Errors");
|
|
8
8
|
const react_intl_1 = require("react-intl");
|
|
9
|
-
const lab_1 = require("@mui/lab");
|
|
10
9
|
const constants_1 = require("../constants");
|
|
11
10
|
const Pagination_1 = require("../../../constants/Pagination");
|
|
12
11
|
const widget_1 = require("../../../utils/widget");
|
|
@@ -103,6 +102,6 @@ function Comments(props) {
|
|
|
103
102
|
if (!state.initialized) {
|
|
104
103
|
return (0, jsx_runtime_1.jsx)(CommentsSkeleton, {});
|
|
105
104
|
}
|
|
106
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && (0, jsx_runtime_1.jsx)(CommentSkeleton, { id: 1 }), (0, jsx_runtime_1.jsx)(
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && (0, jsx_runtime_1.jsx)(CommentSkeleton, { id: 1 }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: isLoading, disabled: !state.next, onClick: handleNext }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.btn.label", defaultMessage: "ui.course.dashboard.teacher.tab.comments.btn.label" }) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.empty", defaultMessage: "ui.course.dashboard.teacher.tab.comments.empty" }) }))) })));
|
|
107
106
|
}
|
|
108
107
|
exports.default = (0, react_1.memo)(Comments);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const system_1 = require("@mui/system");
|
|
8
7
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -283,11 +282,15 @@ function CourseForm(inProps) {
|
|
|
283
282
|
/**
|
|
284
283
|
* Renders root object
|
|
285
284
|
*/
|
|
286
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: _step === Course_1.SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === Course_1.SCCourseFormStepType.GENERAL && ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: Object.values(types_1.SCCourseTypologyType).map((option, index) => ((0, jsx_runtime_1.jsx)(material_1.Card, Object.assign({ className: (0, classnames_1.default)(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== types_1.SCCourseTypologyType.SELF }) }, { children: (0, jsx_runtime_1.jsx)(material_1.CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== types_1.SCCourseTypologyType.SELF && ((0, jsx_runtime_1.jsx)(material_1.Chip, { variant: "outlined", color: "warning", size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [course && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: (0, classnames_1.default)(classes.form, _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: (0, jsx_runtime_1.jsx)(UploadCourseCover_1.default, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), (0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}, error: Boolean((!!
|
|
285
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: _step === Course_1.SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === Course_1.SCCourseFormStepType.GENERAL && ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: Object.values(types_1.SCCourseTypologyType).map((option, index) => ((0, jsx_runtime_1.jsx)(material_1.Card, Object.assign({ className: (0, classnames_1.default)(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== types_1.SCCourseTypologyType.SELF }) }, { children: (0, jsx_runtime_1.jsx)(material_1.CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== types_1.SCCourseTypologyType.SELF && ((0, jsx_runtime_1.jsx)(material_1.Chip, { variant: "outlined", color: "warning", size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [course && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: (0, classnames_1.default)(classes.form, _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: (0, jsx_runtime_1.jsx)(UploadCourseCover_1.default, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), (0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, slotProps: {
|
|
286
|
+
input: {
|
|
287
|
+
endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Course_1.COURSE_TITLE_MAX_LENGTH - field.name.length }))
|
|
288
|
+
}
|
|
289
|
+
}, error: Boolean((!!course && !field.name) || field.name.length > Course_1.COURSE_TITLE_MAX_LENGTH) || Boolean(error['nameError']), helperText: !!course && !field.name ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : field.name.length > Course_1.COURSE_TITLE_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.name.error.maxLength", defaultMessage: "ui.courseForm.name.error.maxLength" })) : error['nameError'] ? (error['nameError']) : null }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, slotProps: {
|
|
290
|
+
input: {
|
|
291
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? Course_1.COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : Course_1.COURSE_DESCRIPTION_MAX_LENGTH })))
|
|
292
|
+
}
|
|
293
|
+
}, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > Course_1.COURSE_DESCRIPTION_MAX_LENGTH && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && (0, jsx_runtime_1.jsx)(Edit_1.default, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: (0, jsx_runtime_1.jsx)(PaywallsConfigurator_1.default, Object.assign({}, (course && { contentId: course.id }), { contentType: types_1.SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: (0, classnames_1.default)(classes.actions, _step === Course_1.SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === Course_1.SCCourseFormStepType.GENERAL
|
|
291
294
|
? !field.type || Object.keys(error).length !== 0
|
|
292
295
|
: _step === Course_1.SCCourseFormStepType.CUSTOMIZATION &&
|
|
293
296
|
(!field.name ||
|
|
@@ -45,8 +45,12 @@ function CourseEdit(inProps) {
|
|
|
45
45
|
/**
|
|
46
46
|
* Renders root object
|
|
47
47
|
*/
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [course.privacy === types_1.SCCoursePrivacyType.DRAFT && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.access }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), (0, jsx_runtime_1.jsxs)(Widget_1.default, Object.assign({ className: classes.card }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.accessInfo }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [course.privacy === types_1.SCCoursePrivacyType.DRAFT && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.access }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), (0, jsx_runtime_1.jsxs)(Widget_1.default, Object.assign({ className: classes.card }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.accessInfo }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, "ui.courseForm.edit.access.info.access.icon") } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.access.info.visibility", defaultMessage: "ui.courseForm.edit.access.info.visibility", values: { icon: (chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, "ui.courseForm.edit.access.info.visibility.icon") } }) }))] }))] })] }))] }))), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.publish }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.publication.title", defaultMessage: "ui.courseForm.edit.publication.title" }) })), notPublishable ? ((0, jsx_runtime_1.jsxs)(Widget_1.default, Object.assign({ className: classes.card }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle.info", defaultMessage: "ui.courseForm.edit.publication.subtitle.info" }) })] }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.publishInfo }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle", defaultMessage: "ui.courseForm.edit.publication.subtitle" }) }))), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { children: Object.values(types_1.SCCoursePrivacyType)
|
|
49
49
|
.filter((option) => option !== types_1.SCCoursePrivacyType.DRAFT)
|
|
50
|
-
.map((option, index) => ((0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: (0, classnames_1.default)(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: {
|
|
50
|
+
.map((option, index) => ((0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: (0, classnames_1.default)(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: {
|
|
51
|
+
icon: (chunks) => ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.access.icon`))
|
|
52
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: (0, classnames_1.default)(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.visibility`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.visibility`, values: {
|
|
53
|
+
icon: (chunks) => ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.visibility.icon`))
|
|
54
|
+
} }) }))] })] }), index))) })] }))] })));
|
|
51
55
|
}
|
|
52
56
|
exports.default = CourseEdit;
|
|
@@ -8,7 +8,6 @@ const react_core_1 = require("@selfcommunity/react-core");
|
|
|
8
8
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
9
9
|
const system_1 = require("@mui/system");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
|
-
const lab_1 = require("@mui/lab");
|
|
12
11
|
const react_intl_1 = require("react-intl");
|
|
13
12
|
const messages = (0, react_intl_1.defineMessages)({
|
|
14
13
|
errorLoadImage: {
|
|
@@ -19,7 +18,7 @@ const messages = (0, react_intl_1.defineMessages)({
|
|
|
19
18
|
const classes = {
|
|
20
19
|
root: `${constants_1.PREFIX}-upload-course-cover-root`
|
|
21
20
|
};
|
|
22
|
-
const Root = (0, material_1.styled)(
|
|
21
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
23
22
|
name: constants_1.PREFIX,
|
|
24
23
|
slot: 'UploadCourseCoverRoot'
|
|
25
24
|
})(() => ({}));
|
|
@@ -7,7 +7,6 @@ const material_1 = require("@mui/material");
|
|
|
7
7
|
const utils_1 = require("@selfcommunity/utils");
|
|
8
8
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
9
|
const types_1 = require("@selfcommunity/types");
|
|
10
|
-
const lab_1 = require("@mui/lab");
|
|
11
10
|
const react_intl_1 = require("react-intl");
|
|
12
11
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
13
12
|
const system_1 = require("@mui/system");
|
|
@@ -18,11 +17,11 @@ const PREFIX = 'SCCourseJoinButton';
|
|
|
18
17
|
const classes = {
|
|
19
18
|
root: `${PREFIX}-root`
|
|
20
19
|
};
|
|
21
|
-
const Root = (0, material_1.styled)(
|
|
20
|
+
const Root = (0, material_1.styled)(material_1.Button, {
|
|
22
21
|
name: PREFIX,
|
|
23
22
|
slot: 'Root',
|
|
24
|
-
overridesResolver: (
|
|
25
|
-
})((
|
|
23
|
+
overridesResolver: (_props, styles) => styles.root
|
|
24
|
+
})(() => ({}));
|
|
26
25
|
/**
|
|
27
26
|
* > API documentation for the Community-JS Course Subscribe Button component. Learn about the available props and the CSS API.
|
|
28
27
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { GridProps } from '@mui/material';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import { CourseProps, CourseSkeletonProps } from '../Course';
|
|
4
3
|
import { CoursesSkeletonProps } from '../Courses/Skeleton';
|
|
5
4
|
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>, {}, {}>;
|
|
9
5
|
export interface CoursesProps {
|
|
10
6
|
/**
|
|
11
7
|
* Overrides or extends the styles applied to the component.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CoursesChipRoot = void 0;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
@@ -42,7 +41,7 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
42
41
|
name: constants_1.PREFIX,
|
|
43
42
|
slot: 'Root'
|
|
44
43
|
})(() => ({}));
|
|
45
|
-
|
|
44
|
+
const CoursesChipRoot = (0, material_1.styled)(material_1.Chip, {
|
|
46
45
|
name: constants_1.PREFIX,
|
|
47
46
|
slot: 'CoursesChipRoot',
|
|
48
47
|
shouldForwardProp: (prop) => prop !== 'showMine' && prop !== 'showManagedCourses'
|
|
@@ -207,22 +206,22 @@ function Courses(inProps) {
|
|
|
207
206
|
/**
|
|
208
207
|
* Renders courses list
|
|
209
208
|
*/
|
|
210
|
-
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
209
|
+
const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 2 }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: "small", fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByName", defaultMessage: "ui.courses.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
|
|
211
210
|
e.preventDefault();
|
|
212
211
|
if (e.key === 'Enter') {
|
|
213
212
|
fetchCourses();
|
|
214
213
|
}
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
|
|
214
|
+
}, slotProps: {
|
|
215
|
+
input: {
|
|
216
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => fetchCourses(), disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchCourses(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading })) })))
|
|
217
|
+
}
|
|
218
|
+
} }) })), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(CoursesChipRoot, { color: showManagedCourses ? 'primary' : 'default', variant: showManagedCourses ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByManagedByMe", defaultMessage: "ui.courses.filterByManagedByMe" }), onClick: () => setShowManagedCourses(!showManagedCourses),
|
|
218
219
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
219
|
-
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
220
|
+
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 'auto' } }, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(CategoryAutocomplete_1.default, { onChange: handleOnChangeCategory, className: classes.category, size: "small", multiple: true }) })) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(CoursesChipRoot, { color: showMine ? 'primary' : 'default', variant: showMine ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.filterByMine", defaultMessage: "ui.courses.filterByMine" }), onClick: handleChipClick,
|
|
220
221
|
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
221
|
-
showMine: showMine, deleteIcon: showMine ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMine ? handleDeleteClick : null, disabled: loading || showManagedCourses }) }))
|
|
222
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
223
|
-
// @ts-ignore
|
|
222
|
+
showMine: showMine, deleteIcon: showMine ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMine ? handleDeleteClick : null, disabled: loading || showManagedCourses }) }))] })) }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !courses.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: !canCreateCourse && onlyStaffEnabled ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.studentEmptyView }, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.emptyBox }, { children: (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.emptyRotatedBox }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.emptyIcon, color: "disabled", fontSize: "large" }, { children: "courses" })) })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", textAlign: "center" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.empty.title", defaultMessage: "ui.courses.empty.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", textAlign: "center" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.empty.info", defaultMessage: "ui.courses.empty.info" }) }))] }))) : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.teacherEmptyView }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ teacherView: (onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled, coursesNumber: 1 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps })) }))) }))) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: courses.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: isMobile ? ((0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, { template: course_1.SCCourseTemplateType.PREVIEW })) : ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ coursesNumber: 4 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps }))), endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courses.endMessage", defaultMessage: "ui.courses.endMessage", values: {
|
|
224
223
|
button: (chunk) => ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleScrollUp }, { children: chunk })))
|
|
225
|
-
} }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [courses.map((course) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
224
|
+
} }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [courses.map((course) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 }, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ courseId: course.id }, CourseComponentProps)) }), course.id))), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && courses.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 }, className: classes.itemPlaceholder }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, { CreateCourseButtonComponentProps: CreateCourseButtonComponentProps }) }), "placeholder-item"))] }) })) }))) })] }));
|
|
226
225
|
/**
|
|
227
226
|
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
228
227
|
*/
|
|
@@ -39,6 +39,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
39
39
|
*/
|
|
40
40
|
function CoursesSkeleton(inProps) {
|
|
41
41
|
const { className, CourseSkeletonProps = {}, coursesNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {}, teacherView = false } = inProps, rest = tslib_1.__rest(inProps, ["className", "CourseSkeletonProps", "coursesNumber", "GridContainerComponentProps", "GridItemComponentProps", "teacherView"]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((_course, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6, lg: 3 } }, GridItemComponentProps, { className: classes.item }, { children: teacherView ? (0, jsx_runtime_1.jsx)(CreatePlaceholder_1.default, {}) : (0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, Object.assign({}, CourseSkeletonProps)) }), index))) })) })));
|
|
43
43
|
}
|
|
44
44
|
exports.default = CoursesSkeleton;
|
|
@@ -102,6 +102,12 @@ function CreateLiveStreamDialog(inProps) {
|
|
|
102
102
|
/**
|
|
103
103
|
* Renders root object
|
|
104
104
|
*/
|
|
105
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, maxWidth: "md", title: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.title, component: "span" }, { children: [canShowBackButton && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", onClick: handleBack, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createLivestreamDialog.button.back", defaultMessage: "ui.createLivestreamDialog.button.back" }) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createLivestreamDialog.title", defaultMessage: "ui.createLivestreamDialog.title" }) }))] })), fullWidth: true, open: open, scroll: "body", onClose: !canShowBackButton ? onClose : undefined, className: (0, classnames_1.default)(classes.root, className),
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, maxWidth: "md", title: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.title, component: "span" }, { children: [canShowBackButton && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", onClick: handleBack, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createLivestreamDialog.button.back", defaultMessage: "ui.createLivestreamDialog.button.back" }) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createLivestreamDialog.title", defaultMessage: "ui.createLivestreamDialog.title" }) }))] })), fullWidth: true, open: open, scroll: "body", onClose: !canShowBackButton ? onClose : undefined, className: (0, classnames_1.default)(classes.root, className), slots: {
|
|
106
|
+
transition: Transition
|
|
107
|
+
}, slotProps: {
|
|
108
|
+
paper: {
|
|
109
|
+
elevation: 0
|
|
110
|
+
}
|
|
111
|
+
} }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [step === types_2.CreateLiveStreamStep.SELECT_TYPE && ((0, jsx_runtime_1.jsx)(LiveStreamSelector_1.default, { liveSelected: liveType, onLiveSelected: handleLiveTypeSelected, onNext: handleLiveTypeSelectedNext })), step === types_2.CreateLiveStreamStep.CREATE_LIVE && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: liveType === types_2.LiveStreamType.EVENT_LIVE ? ((0, jsx_runtime_1.jsx)(EventForm_1.default, Object.assign({}, EventFormComponentProps, { EventAddressComponentProps: { locations: [types_1.SCEventLocationType.LIVESTREAM] }, onSuccess: handleSubmit }))) : ((0, jsx_runtime_1.jsx)(LiveStreamForm_1.default, Object.assign({}, LiveStreamFormComponentProps, { onSuccess: handleSubmit }))) }))] })) })));
|
|
106
112
|
}
|
|
107
113
|
exports.default = CreateLiveStreamDialog;
|
|
@@ -27,13 +27,13 @@ const classes = {
|
|
|
27
27
|
const Root = (0, material_1.styled)(material_1.Container, {
|
|
28
28
|
name: exports.PREFIX,
|
|
29
29
|
slot: 'Root'
|
|
30
|
-
})((
|
|
30
|
+
})(() => ({}));
|
|
31
31
|
// Styled components
|
|
32
32
|
const OptionCard = (0, material_1.styled)(material_1.Paper, {
|
|
33
33
|
name: exports.PREFIX,
|
|
34
34
|
slot: 'optionCardRoot',
|
|
35
35
|
shouldForwardProp: (prop) => prop !== 'selected'
|
|
36
|
-
})((
|
|
36
|
+
})(() => ({
|
|
37
37
|
'& h6': {
|
|
38
38
|
fontWeight: 'bold',
|
|
39
39
|
textTransform: 'uppercase'
|
|
@@ -42,7 +42,7 @@ const OptionCard = (0, material_1.styled)(material_1.Paper, {
|
|
|
42
42
|
const FeatureItem = (0, material_1.styled)(material_1.Box, {
|
|
43
43
|
name: exports.PREFIX,
|
|
44
44
|
slot: 'featureItemRoot'
|
|
45
|
-
})((
|
|
45
|
+
})(() => ({}));
|
|
46
46
|
/**
|
|
47
47
|
*> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
|
|
48
48
|
*
|
|
@@ -70,7 +70,6 @@ function LiveStreamSelector(inProps) {
|
|
|
70
70
|
});
|
|
71
71
|
const { className, liveSelected, onLiveSelected, onNext } = props;
|
|
72
72
|
// CONTEXT
|
|
73
|
-
const scContext = (0, react_core_1.useSCContext)();
|
|
74
73
|
const scUserContext = (0, react_core_1.useSCUser)();
|
|
75
74
|
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
76
75
|
// STATE
|
|
@@ -166,9 +165,7 @@ function LiveStreamSelector(inProps) {
|
|
|
166
165
|
let _message;
|
|
167
166
|
if (isFreeTrialTier && isCommunityOwner && !isEnterpriseTier) {
|
|
168
167
|
_message = ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.selector.warningSubscriptionRequired", defaultMessage: "ui.liveStreamForm.selector.warningSubscriptionRequired", values: {
|
|
169
|
-
|
|
170
|
-
// @ts-ignore
|
|
171
|
-
link: (...chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "_blank", to: `${isStage ? constants_2.HUB_STAGE : constants_2.HUB_PROD}dashboard/community/${communityStackId}/subscription` }, { children: chunks })))
|
|
168
|
+
link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "_blank", to: `${isStage ? constants_2.HUB_STAGE : constants_2.HUB_PROD}dashboard/community/${communityStackId}/subscription` }, { children: chunks }), "ui.liveStreamForm.selector.warningSubscriptionRequired.link"))
|
|
172
169
|
} }));
|
|
173
170
|
}
|
|
174
171
|
else if (timeRemaining !== null && timeRemaining <= constants_1.WARNING_THRESHOLD_EXPIRING_SOON) {
|
|
@@ -190,7 +187,7 @@ function LiveStreamSelector(inProps) {
|
|
|
190
187
|
e.preventDefault();
|
|
191
188
|
}
|
|
192
189
|
} }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: option.title })), (0, jsx_runtime_1.jsx)(material_1.Radio, { checked: selectedOption === option.type })] }), (0, jsx_runtime_1.jsx)("img", { src: option.image, alt: "option-image" }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
|
|
193
|
-
return ((0, jsx_runtime_1.jsx)(FeatureItem, Object.assign({
|
|
190
|
+
return ((0, jsx_runtime_1.jsx)(FeatureItem, Object.assign({ as: "li" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "text.secondary", sx: { flex: 1 } }, { children: feature })) }), featureIndex));
|
|
194
191
|
}) }))] }), index))) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: !selectedOption || !timeRemaining || isFreeTrialTier, variant: "contained", onClick: handleNext, color: "secondary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.selector.next", defaultMessage: "ui.liveStreamForm.selector.next" }) })) }))] })));
|
|
195
192
|
}
|
|
196
193
|
exports.default = LiveStreamSelector;
|
|
@@ -9,7 +9,6 @@ const system_1 = require("@mui/system");
|
|
|
9
9
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
10
10
|
const react_core_1 = require("@selfcommunity/react-core");
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
14
13
|
const utils_1 = require("@selfcommunity/utils");
|
|
15
14
|
const Errors_1 = require("../../constants/Errors");
|
|
@@ -136,9 +135,11 @@ function CreatePaymentProductForm(inProps) {
|
|
|
136
135
|
return null;
|
|
137
136
|
}
|
|
138
137
|
console.log(fieldsError);
|
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ mb: 1 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.title", defaultMessage: "ui.createPaymentProductForm.title" }) })), (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ size: "small", id: "name", label: (0, jsx_runtime_1.jsx)(react_intl_1.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) })), (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ size: "small", id: "description", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }))), (0, jsx_runtime_1.jsx)(material_1.TextField, { label: (0, jsx_runtime_1.jsx)(react_intl_1.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 ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: fieldsError.unitAmount })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: intl.formatMessage({ id: 'ui.createPaymentProductForm.minPrice', defaultMessage: 'ui.createPaymentProductForm.minPrice' }, { min: Payments_1.DEFAULT_MIN_PRICE }) })),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
138
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ mb: 1 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.title", defaultMessage: "ui.createPaymentProductForm.title" }) })), (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ size: "small", id: "name", label: (0, jsx_runtime_1.jsx)(react_intl_1.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) })), (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ size: "small", id: "description", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }))), (0, jsx_runtime_1.jsx)(material_1.TextField, { label: (0, jsx_runtime_1.jsx)(react_intl_1.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 ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: fieldsError.unitAmount })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: intl.formatMessage({ id: 'ui.createPaymentProductForm.minPrice', defaultMessage: 'ui.createPaymentProductForm.minPrice' }, { min: Payments_1.DEFAULT_MIN_PRICE }) })), slotProps: {
|
|
139
|
+
input: {
|
|
140
|
+
startAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: "\u20AC" })),
|
|
141
|
+
inputComponent: NumericFormatCustom
|
|
142
|
+
}
|
|
143
|
+
}, fullWidth: true, error: Boolean(fieldsError && fieldsError.unitAmount) }), error && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.error, variant: "body2" }, { children: error }))), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "flex-end", spacing: 1 }, { children: [onCancel && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", color: "inherit", onClick: onCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.btn.cancel", defaultMessage: "ui.createPaymentProductForm.btn.cancel" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: loading, variant: "contained", size: "small", color: "error", onClick: handleCreateProduct }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.createPaymentProductForm.btn.create", defaultMessage: "ui.createPaymentProductForm.btn.create" }) }))] }))] })));
|
|
143
144
|
}
|
|
144
145
|
exports.default = CreatePaymentProductForm;
|
|
@@ -10,7 +10,7 @@ const classes = {
|
|
|
10
10
|
const Root = (0, material_1.styled)(Skeleton_1.GenericSkeleton, {
|
|
11
11
|
name: constants_1.PREFIX,
|
|
12
12
|
slot: 'SkeletonRoot'
|
|
13
|
-
})((
|
|
13
|
+
})(() => ({}));
|
|
14
14
|
/**
|
|
15
15
|
* > API documentation for the Community-JS Custom Adv Skeleton component. Learn about the available props and the CSS API.
|
|
16
16
|
|
|
@@ -9,7 +9,6 @@ const constants_1 = require("../constants");
|
|
|
9
9
|
const MenuRow_1 = tslib_1.__importDefault(require("../MenuRow"));
|
|
10
10
|
const utils_1 = require("@selfcommunity/utils");
|
|
11
11
|
const Errors_1 = require("../../../constants/Errors");
|
|
12
|
-
const lab_1 = require("@mui/lab");
|
|
13
12
|
const notistack_1 = require("notistack");
|
|
14
13
|
const types_1 = require("@selfcommunity/types");
|
|
15
14
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
@@ -77,12 +76,12 @@ function ChangeLessonStatus(props) {
|
|
|
77
76
|
handleAction(newValue);
|
|
78
77
|
}
|
|
79
78
|
}, [handleAction, value]);
|
|
80
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(MenuRow_1.default, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(
|
|
79
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(MenuRow_1.default, Object.assign({ buttonClassName: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, icon: icon }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", onClick: handleClick, loading: loading, disabled: loading, "data-value": option.value, sx: {
|
|
81
80
|
padding: 0,
|
|
82
81
|
':hover': {
|
|
83
82
|
backgroundColor: 'unset'
|
|
84
83
|
}
|
|
85
|
-
} }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: (0, jsx_runtime_1.jsx)(
|
|
84
|
+
} }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: option.id, defaultMessage: option.id }) })) })) }, i))) }))) : ((0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ className: hasPublished ? classes.changeLessonStatusPublishedWrapper : undefined, size: "small", value: value, onChange: handleChange, disabled: disabled }, { children: OPTIONS.map((option, i) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
|
|
86
85
|
padding: 0,
|
|
87
86
|
':hover': {
|
|
88
87
|
backgroundColor: 'unset'
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const lab_1 = require("@mui/lab");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
7
6
|
const react_1 = require("react");
|
|
8
7
|
const constants_1 = require("../constants");
|
|
@@ -78,6 +77,6 @@ function FieldName(props) {
|
|
|
78
77
|
handleDisableEditMode();
|
|
79
78
|
}
|
|
80
79
|
}, [row, isNewRow, handleManageRow, setName, handleDisableEditMode]);
|
|
81
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isNewRow || editMode ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.editModeWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), (0, jsx_runtime_1.jsx)(
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: isNewRow || editMode ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.editModeWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { type: "text", variant: "outlined", size: "small", focused: true, autoFocus: true, defaultValue: row.name, onChange: handleChange }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleSubmit, loading: loading, disabled: loading, className: classes.editModeSaveButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ color: "default", size: "small", onClick: handleClose, className: classes.editModeCloseButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: row.name }))) }));
|
|
82
81
|
}
|
|
83
82
|
exports.default = (0, react_1.memo)(FieldName);
|