@selfcommunity/react-ui 0.11.0-mui7.29 → 0.11.0-react-17.0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -1
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -1
- package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +11 -6
- package/lib/cjs/components/AccountDelete/AccountDelete.js +12 -5
- package/lib/cjs/components/AccountRecover/AccountRecover.js +4 -2
- package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
- package/lib/cjs/components/BuyButton/BuyButton.js +5 -8
- package/lib/cjs/components/Categories/Categories.js +1 -1
- package/lib/cjs/components/Categories/Skeleton.js +1 -1
- package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
- package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +1 -3
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +4 -3
- package/lib/cjs/components/ChangeCover/ChangeCover.js +6 -2
- package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +2 -1
- package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -1
- package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
- package/lib/cjs/components/Checkout/Skeleton.js +3 -1
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +3 -2
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/cjs/components/CommunityPaywalls/Skeleton.js +3 -2
- package/lib/cjs/components/Composer/Composer.js +4 -3
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -4
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
- package/lib/cjs/components/ConsentSolution/ConsentSolution.js +5 -12
- package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +2 -1
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +2 -1
- package/lib/cjs/components/CourseForm/CourseForm.js +6 -9
- package/lib/cjs/components/CourseForm/Edit.js +2 -6
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +2 -1
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +4 -3
- package/lib/cjs/components/Courses/Courses.d.ts +4 -0
- package/lib/cjs/components/Courses/Courses.js +10 -9
- package/lib/cjs/components/Courses/Skeleton.js +1 -1
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +8 -5
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
- package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -2
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +2 -1
- package/lib/cjs/components/EditCourse/Options.js +2 -1
- package/lib/cjs/components/EditCourse/Status.js +1 -1
- package/lib/cjs/components/Editor/Editor.js +3 -3
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +2 -4
- package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
- package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +3 -5
- package/lib/cjs/components/EventForm/EventAddress.js +5 -9
- package/lib/cjs/components/EventForm/EventForm.js +51 -89
- package/lib/cjs/components/EventForm/UploadEventCover.js +2 -1
- package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventInviteButton/EventInviteButton.js +2 -3
- package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +16 -5
- package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -1
- package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/cjs/components/EventMediaWidget/TriggerButton.js +2 -1
- package/lib/cjs/components/EventMediaWidget/index.d.ts +1 -2
- package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
- package/lib/cjs/components/Events/Events.d.ts +4 -0
- package/lib/cjs/components/Events/Events.js +9 -14
- package/lib/cjs/components/Events/LocationEventsFilter.js +1 -5
- package/lib/cjs/components/Events/OngoingEventsFilter.js +2 -6
- package/lib/cjs/components/Events/PastEventsFilter.js +2 -6
- package/lib/cjs/components/Events/Skeleton.js +1 -1
- package/lib/cjs/components/Feed/Feed.js +10 -9
- package/lib/cjs/components/Feed/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Actions/Actions.js +3 -2
- package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +3 -2
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +2 -1
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +2 -1
- package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +2 -1
- package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +3 -2
- package/lib/cjs/components/GroupActionsMenu/index.js +1 -9
- package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +3 -5
- package/lib/cjs/components/GroupForm/GroupForm.js +27 -16
- package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
- package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +7 -8
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -3
- package/lib/cjs/components/Groups/Groups.js +9 -9
- package/lib/cjs/components/Groups/Skeleton.js +2 -1
- package/lib/cjs/components/Incubator/Incubator.js +4 -4
- package/lib/cjs/components/Incubator/Skeleton.js +1 -1
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -3
- package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -3
- package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +2 -1
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +4 -3
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +2 -1
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +12 -15
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +16 -17
- package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
- package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
- package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
- package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/cjs/components/Notification/Course/Course.js +10 -5
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -4
- package/lib/cjs/components/Notification/Event/Event.js +12 -7
- package/lib/cjs/components/Notification/Group/Group.js +4 -3
- package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +9 -4
- package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
- package/lib/cjs/components/Notification/Notification.js +9 -17
- package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +5 -4
- package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -6
- package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -6
- package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +4 -12
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +27 -19
- package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +25 -9
- package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
- package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +5 -7
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +26 -39
- package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +6 -8
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
- package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
- package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
- package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
- package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +1 -3
- package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +8 -9
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +6 -4
- package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +4 -4
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +22 -30
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
- package/lib/cjs/components/UserCounters/UserCounters.js +13 -5
- package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +3 -24
- package/lib/cjs/components/UserPaymentMethods/Skeleton.js +4 -2
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +9 -8
- package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +2 -1
- package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +20 -9
- package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +5 -4
- package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/cjs/components/VoteButton/VoteButton.js +3 -2
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +2 -3
- package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +2 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.js +9 -3
- package/lib/cjs/shared/CopyTextArea/index.js +6 -13
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +2 -1
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +5 -6
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +2 -1
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +2 -1
- package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
- package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
- package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
- package/lib/cjs/shared/EventActionsMenu/index.js +1 -9
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
- package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +8 -2
- package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +6 -4
- package/lib/cjs/shared/Media/File/DocComponent.d.ts +0 -2
- package/lib/cjs/shared/Media/File/DocComponent.js +2 -3
- package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/cjs/shared/Media/File/TriggerButton.js +1 -9
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +12 -4
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +1 -3
- package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
- package/lib/cjs/shared/PasswordTextField/index.js +5 -7
- package/lib/cjs/shared/ScrollContainer/index.js +2 -2
- package/lib/cjs/shared/TagChip/index.d.ts +48 -2
- package/lib/cjs/shared/TagChip/index.js +2 -2
- package/lib/cjs/shared/Tags/index.js +1 -1
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
- package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +3 -2
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +3 -2
- package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +12 -7
- package/lib/esm/components/AccountDelete/AccountDelete.js +13 -6
- package/lib/esm/components/AccountRecover/AccountRecover.js +4 -2
- package/lib/esm/components/BroadcastMessages/Message.js +1 -1
- package/lib/esm/components/BuyButton/BuyButton.js +6 -9
- package/lib/esm/components/Categories/Categories.js +1 -1
- package/lib/esm/components/Categories/Skeleton.js +1 -1
- package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
- package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +2 -4
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +5 -4
- package/lib/esm/components/ChangeCover/ChangeCover.js +6 -2
- package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +3 -2
- package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +3 -2
- package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
- package/lib/esm/components/Checkout/Skeleton.js +4 -2
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +4 -3
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
- package/lib/esm/components/CommunityPaywalls/Skeleton.js +3 -2
- package/lib/esm/components/Composer/Composer.js +5 -4
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +3 -5
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
- package/lib/esm/components/ConsentSolution/ConsentSolution.js +5 -12
- package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
- package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +2 -1
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +2 -1
- package/lib/esm/components/CourseForm/CourseForm.js +7 -10
- package/lib/esm/components/CourseForm/Edit.js +2 -6
- package/lib/esm/components/CourseForm/UploadCourseCover.js +3 -2
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +5 -4
- package/lib/esm/components/Courses/Courses.d.ts +4 -0
- package/lib/esm/components/Courses/Courses.js +9 -9
- package/lib/esm/components/Courses/Skeleton.js +1 -1
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +9 -6
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
- package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +4 -3
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +3 -2
- package/lib/esm/components/EditCourse/Options.js +3 -2
- package/lib/esm/components/EditCourse/Status.js +1 -1
- package/lib/esm/components/Editor/Editor.js +3 -3
- package/lib/esm/components/Editor/plugins/EmojiPlugin.js +2 -4
- package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
- package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +4 -6
- package/lib/esm/components/EventForm/EventAddress.js +5 -9
- package/lib/esm/components/EventForm/EventForm.js +53 -91
- package/lib/esm/components/EventForm/UploadEventCover.js +3 -2
- package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
- package/lib/esm/components/EventInviteButton/EventInviteButton.js +2 -3
- package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +16 -5
- package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -1
- package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
- package/lib/esm/components/EventMediaWidget/TriggerButton.js +3 -2
- package/lib/esm/components/EventMediaWidget/index.d.ts +1 -2
- package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
- package/lib/esm/components/Events/Events.d.ts +4 -0
- package/lib/esm/components/Events/Events.js +8 -14
- package/lib/esm/components/Events/LocationEventsFilter.js +1 -5
- package/lib/esm/components/Events/OngoingEventsFilter.js +2 -6
- package/lib/esm/components/Events/PastEventsFilter.js +2 -6
- package/lib/esm/components/Events/Skeleton.js +1 -1
- package/lib/esm/components/Feed/Feed.js +11 -10
- package/lib/esm/components/Feed/Skeleton.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Actions.js +3 -2
- package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +4 -3
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +2 -1
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
- package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
- package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +3 -2
- package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +3 -2
- package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +4 -3
- package/lib/esm/components/GroupActionsMenu/index.js +1 -9
- package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +4 -6
- package/lib/esm/components/GroupForm/GroupForm.js +28 -17
- package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
- package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +7 -8
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +5 -4
- package/lib/esm/components/Groups/Groups.js +9 -9
- package/lib/esm/components/Groups/Skeleton.js +2 -1
- package/lib/esm/components/Incubator/Incubator.js +4 -4
- package/lib/esm/components/Incubator/Skeleton.js +1 -1
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
- package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +5 -4
- package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
- package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +5 -4
- package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
- package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +3 -2
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +5 -4
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +3 -2
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +13 -16
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
- package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +10 -11
- package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
- package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
- package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
- package/lib/esm/components/NavigationToolbar/NotificationMenu.js +5 -2
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
- package/lib/esm/components/Notification/Comment/Comment.js +3 -3
- package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
- package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
- package/lib/esm/components/Notification/Course/Course.js +11 -6
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -4
- package/lib/esm/components/Notification/Event/Event.js +13 -8
- package/lib/esm/components/Notification/Group/Group.js +5 -4
- package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +10 -5
- package/lib/esm/components/Notification/Mention/Mention.js +2 -2
- package/lib/esm/components/Notification/Notification.js +10 -18
- package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +6 -5
- package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
- package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -6
- package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -6
- package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
- package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
- package/lib/esm/components/OnBoardingWidget/ActionsButton.js +4 -12
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +28 -20
- package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
- package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +25 -9
- package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
- package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +6 -8
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +26 -39
- package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
- package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
- package/lib/esm/components/Paywalls/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
- package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +7 -9
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
- package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
- package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
- package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
- package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
- package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
- package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
- package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
- package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
- package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
- package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
- package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
- package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +3 -5
- package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +9 -10
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +7 -5
- package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +6 -6
- package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +22 -30
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
- package/lib/esm/components/UserCounters/UserCounters.js +13 -5
- package/lib/esm/components/UserInfo/UserInfo.js +1 -1
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
- package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +3 -24
- package/lib/esm/components/UserPaymentMethods/Skeleton.js +4 -2
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +12 -11
- package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +3 -2
- package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +23 -12
- package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
- package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +6 -5
- package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
- package/lib/esm/components/VoteButton/VoteButton.js +4 -3
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +2 -3
- package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +2 -1
- package/lib/esm/shared/ContributionActionsMenu/index.js +9 -3
- package/lib/esm/shared/CopyTextArea/index.js +6 -13
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +3 -2
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +6 -7
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +3 -2
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +3 -2
- package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
- package/lib/esm/shared/DateTimeAgo/index.js +2 -2
- package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
- package/lib/esm/shared/EventActionsMenu/index.js +1 -9
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
- package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +8 -2
- package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +6 -4
- package/lib/esm/shared/Media/File/DocComponent.d.ts +0 -2
- package/lib/esm/shared/Media/File/DocComponent.js +2 -3
- package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/esm/shared/Media/File/TriggerButton.js +1 -9
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
- package/lib/esm/shared/Media/Link/DisplayComponent.js +13 -5
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +1 -3
- package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
- package/lib/esm/shared/PasswordTextField/index.js +5 -7
- package/lib/esm/shared/ScrollContainer/index.js +1 -1
- package/lib/esm/shared/TagChip/index.d.ts +48 -2
- package/lib/esm/shared/TagChip/index.js +2 -2
- package/lib/esm/shared/Tags/index.js +1 -1
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
- package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
- package/lib/umd/155.js +2 -0
- package/lib/umd/155.js.LICENSE.txt +24 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +206 -207
- package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +0 -8
- package/lib/cjs/components/EventLocationWidget/EventMap.js +0 -28
- package/lib/esm/components/EventLocationWidget/EventMap.d.ts +0 -8
- package/lib/esm/components/EventLocationWidget/EventMap.js +0 -25
- package/lib/umd/484.js +0 -2
- package/lib/umd/484.js.LICENSE.txt +0 -9
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const react_intl_1 = require("react-intl");
|
|
8
|
+
const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
|
|
8
9
|
const react_intersection_observer_1 = require("react-intersection-observer");
|
|
9
10
|
const api_services_1 = require("@selfcommunity/api-services");
|
|
10
11
|
const system_1 = require("@mui/system");
|
|
@@ -23,15 +24,11 @@ const Errors_1 = require("../../constants/Errors");
|
|
|
23
24
|
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
24
25
|
const x_date_pickers_1 = require("@mui/x-date-pickers");
|
|
25
26
|
const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
|
|
26
|
-
const it_1 = require("date-fns/locale/it");
|
|
27
|
-
const en_US_1 = require("date-fns/locale/en-US");
|
|
27
|
+
const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
|
|
28
|
+
const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
|
|
28
29
|
const Category_1 = tslib_1.__importDefault(require("../Category"));
|
|
29
30
|
const PREFIX = 'SCPaymentOrders';
|
|
30
31
|
const messages = (0, react_intl_1.defineMessages)({
|
|
31
|
-
datePicker: {
|
|
32
|
-
id: 'ui.paymentOrders.picker.date',
|
|
33
|
-
defaultMessage: 'ui.paymentOrders.picker.date'
|
|
34
|
-
},
|
|
35
32
|
dateFrom: {
|
|
36
33
|
id: 'ui.paymentOrders.dateFrom',
|
|
37
34
|
defaultMessage: 'ui.paymentOrders.dateFrom'
|
|
@@ -212,52 +209,42 @@ function PaymentOrders(inProps) {
|
|
|
212
209
|
const skeleton = () => {
|
|
213
210
|
return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, Object.assign({ ref: ref }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 20 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 30 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 80, width: 250 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 65 }) }))] })));
|
|
214
211
|
};
|
|
215
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true,
|
|
212
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 3, lg: 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.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
|
|
216
213
|
e.preventDefault();
|
|
217
214
|
if (e.key === 'Enter') {
|
|
218
215
|
fetchInvoices();
|
|
219
216
|
}
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateFrom", defaultMessage: "ui.paymentOrders.dateFrom" }), value: startDate, enableAccessibleFieldDOMStructure: false, localeText: {
|
|
231
|
-
toolbarTitle: intl.formatMessage(messages.datePicker)
|
|
232
|
-
}, slots: {
|
|
233
|
-
openPickerButton: (params) => ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, params, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) })))
|
|
217
|
+
}, InputProps: {
|
|
218
|
+
endAdornment: ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: [query.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => {
|
|
219
|
+
setQuery('');
|
|
220
|
+
fetchInvoices('');
|
|
221
|
+
}, disabled: isLoading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => fetchInvoices(), disabled: isLoading })) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchInvoices(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: isLoading }))] })))
|
|
222
|
+
} }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 3, lg: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 8, md: 4 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.default : en_US_1.default, localeText: {
|
|
223
|
+
cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelAction)}`,
|
|
224
|
+
clearButtonLabel: `${intl.formatMessage(messages.pickerClearAction)}`
|
|
225
|
+
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateFrom", defaultMessage: "ui.paymentOrders.dateFrom" }), value: startDate, slots: {
|
|
226
|
+
textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { size: "small", InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.dateFrom)}`, endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) }) }))) }) })))
|
|
234
227
|
}, slotProps: {
|
|
235
228
|
actionBar: {
|
|
236
229
|
actions: ['cancel', 'clear', 'accept']
|
|
237
230
|
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
}
|
|
231
|
+
toolbar: {
|
|
232
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
233
|
+
// @ts-ignore
|
|
234
|
+
toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.picker.date", defaultMessage: "ui.paymentOrders.picker.date" })
|
|
244
235
|
}
|
|
245
|
-
}, onChange: setStartDate }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
246
|
-
|
|
247
|
-
}, slots: {
|
|
248
|
-
openPickerButton: (params) => ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, params, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) })))
|
|
236
|
+
}, onChange: (newValue) => setStartDate(newValue) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateTo", defaultMessage: "ui.paymentOrders.dateTo" }), value: endDate, slots: {
|
|
237
|
+
textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { size: "small", InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.dateTo)}`, endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) }) }))) }) })))
|
|
249
238
|
}, slotProps: {
|
|
250
239
|
actionBar: {
|
|
251
240
|
actions: ['cancel', 'clear', 'accept']
|
|
252
241
|
},
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
}
|
|
242
|
+
toolbar: {
|
|
243
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.picker.date", defaultMessage: "ui.paymentOrders.picker.date" })
|
|
259
246
|
}
|
|
260
|
-
}, onChange: setEndDate }) }))] })) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.content }, { children: !isLoading ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "5%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.number", defaultMessage: "ui.paymentOrders.number" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "7%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType", defaultMessage: "ui.paymentOrders.contentType" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "38%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.content", defaultMessage: "ui.paymentOrders.content" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.price", defaultMessage: "ui.paymentOrders.price" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "12%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.createdAt", defaultMessage: "ui.paymentOrders.createdAt" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "13%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.expired_at", defaultMessage: "ui.paymentOrders.expired_at" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status", defaultMessage: "ui.paymentOrders.status" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.actions", defaultMessage: "ui.paymentOrders.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [orders.map((order, index) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)("b", { children: order.id }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.paymentOrders.contentType.${order.content_type}`, defaultMessage: `ui.paymentOrders.contentType.${order.content_type}` }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: renderContent(order) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, payment_1.getConvertedAmount)(order.payment_price) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: order.created_at &&
|
|
247
|
+
}, onChange: (newValue) => setEndDate(newValue) }) }))] })) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.content }, { children: !isLoading ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "5%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.number", defaultMessage: "ui.paymentOrders.number" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "7%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType", defaultMessage: "ui.paymentOrders.contentType" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "38%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.content", defaultMessage: "ui.paymentOrders.content" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.price", defaultMessage: "ui.paymentOrders.price" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "12%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.createdAt", defaultMessage: "ui.paymentOrders.createdAt" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "13%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.expired_at", defaultMessage: "ui.paymentOrders.expired_at" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status", defaultMessage: "ui.paymentOrders.status" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.actions", defaultMessage: "ui.paymentOrders.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [orders.map((order, index) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)("b", { children: order.id }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.paymentOrders.contentType.${order.content_type}`, defaultMessage: `ui.paymentOrders.contentType.${order.content_type}` }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: renderContent(order) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, payment_1.getConvertedAmount)(order.payment_price) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: order.created_at &&
|
|
261
248
|
intl.formatDate(new Date(order.created_at), {
|
|
262
249
|
year: 'numeric',
|
|
263
250
|
month: 'numeric',
|
|
@@ -272,6 +259,6 @@ function PaymentOrders(inProps) {
|
|
|
272
259
|
hour: 'numeric',
|
|
273
260
|
minute: 'numeric'
|
|
274
261
|
})
|
|
275
|
-
: '-' })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { variant:
|
|
262
|
+
: '-' })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { variant: 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [order.content_type === types_1.SCContentType.EVENT && (0, jsx_runtime_1.jsx)(PaymentOrderPdfButton_1.default, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && ((0, jsx_runtime_1.jsx)(LoadingButton_1.default, Object.assign({ size: "small", variant: "contained", disabled: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.pay", defaultMessage: "ui.paymentOrders.pay" }) })))] })) }))] }, index))), orders.length < 1 && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ align: "left", colSpan: 6 }, { 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.paymentOrders.noOrders", defaultMessage: "ui.paymentOrders.noOrders" }) })) })) })), hasMore && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: skeleton() })] })] })) }))) : ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) }))] })));
|
|
276
263
|
}
|
|
277
264
|
exports.default = PaymentOrders;
|
|
@@ -46,7 +46,7 @@ function PaymentProductSkeleton(inProps) {
|
|
|
46
46
|
props: inProps,
|
|
47
47
|
name: `${constants_1.PREFIX}Skeleton`
|
|
48
48
|
});
|
|
49
|
-
const rest = tslib_1.__rest(props, []);
|
|
49
|
+
const { className } = props, rest = tslib_1.__rest(props, ["className"]);
|
|
50
50
|
// HOOKS
|
|
51
51
|
const theme = (0, material_1.useTheme)();
|
|
52
52
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
@@ -41,6 +41,6 @@ function PaymentProductsSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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,
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: 'outlined' }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaymentProductsSkeleton;
|
|
@@ -41,6 +41,6 @@ function PaywallsSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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,
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: 'outlined' }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaywallsSkeleton;
|
|
@@ -15,6 +15,8 @@ const Errors_1 = require("../../constants/Errors");
|
|
|
15
15
|
const react_intl_1 = require("react-intl");
|
|
16
16
|
const payment_1 = require("../../utils/payment");
|
|
17
17
|
const ClickAwayListener_1 = tslib_1.__importDefault(require("@mui/material/ClickAwayListener"));
|
|
18
|
+
const Popper_1 = tslib_1.__importDefault(require("@mui/material/Popper"));
|
|
19
|
+
const List_1 = tslib_1.__importDefault(require("@mui/material/List"));
|
|
18
20
|
const CreatePaymentProductForm_1 = tslib_1.__importDefault(require("../CreatePaymentProductForm"));
|
|
19
21
|
const classes = {
|
|
20
22
|
root: `${constants_1.PREFIX}-root`,
|
|
@@ -45,7 +47,7 @@ const PaymentProductsAutocompletePopper = (0, material_1.styled)(material_1.Box,
|
|
|
45
47
|
slot: 'PaymentProductsAutocompletePopperRoot',
|
|
46
48
|
overridesResolver: (_props, styles) => styles.paymentProductsAutocompletePopperRoot
|
|
47
49
|
})(() => ({}));
|
|
48
|
-
const PaymentProductsPopper = (0, material_1.styled)(
|
|
50
|
+
const PaymentProductsPopper = (0, material_1.styled)(Popper_1.default, {
|
|
49
51
|
name: constants_1.PREFIX,
|
|
50
52
|
slot: 'PaymentProductsPopperRoot',
|
|
51
53
|
overridesResolver: (_props, styles) => styles.paymentProductsPopperRoot
|
|
@@ -215,7 +217,7 @@ function PaywallsConfigurator(inProps) {
|
|
|
215
217
|
if (!isPaymentsEnabled) {
|
|
216
218
|
return null;
|
|
217
219
|
}
|
|
218
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes.contentAccessType }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.selectAccessType", defaultMessage: "ui.paywallsConfigurator.selectAccessType" }) }), (0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === constants_1.ContentAccessType.FREE, onChange: handleChange(constants_1.ContentAccessType.FREE), disabled: disabled || loading, variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Radio, { checked: expanded === constants_1.ContentAccessType.FREE }), "aria-controls": "free-content", id: "free-header" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free", defaultMessage: "ui.paywallsConfigurator.free" }) }), ": ", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free.label", defaultMessage: "ui.paywallsConfigurator.free.label" })] }) })), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free.info", defaultMessage: "ui.paywallsConfigurator.free.info" }) }) })] })), (0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === constants_1.ContentAccessType.PAID, onChange: handleChange(constants_1.ContentAccessType.PAID), disabled: disabled || loading, variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Radio, { checked: expanded === constants_1.ContentAccessType.PAID }), "aria-controls": "paid-content", id: "paid-header" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid", defaultMessage: "ui.paywallsConfigurator.paid" }) }), ": ", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid.label", defaultMessage: "ui.paywallsConfigurator.paid.label" })] }) })), (0, jsx_runtime_1.jsxs)(material_1.AccordionDetails, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid.info", defaultMessage: "ui.paywallsConfigurator.paid.info" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-around", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ style: { flexGrow: 1 }, component: "div" }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.connected.products", defaultMessage: "ui.paywallsConfigurator.connected.products" }) }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", disableRipple: true, onClick: handleToggleCreatePaymentPrice, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "add" }), className: classes.btnAddPaymentProduct }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.connected.products.btnNew", defaultMessage: "ui.paywallsConfigurator.connected.products.btnNew" }) }))] })), loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [createPrice && ((0, jsx_runtime_1.jsx)(material_1.Zoom, Object.assign({ in: createPrice }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(CreatePaymentProductForm_1.default, { className: classes.newProduct, onCreate: handleCreatePaymentPrice, onCancel: handleToggleCreatePaymentPrice }) }) }))), (0, jsx_runtime_1.jsxs)(
|
|
220
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes.contentAccessType }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.selectAccessType", defaultMessage: "ui.paywallsConfigurator.selectAccessType" }) }), (0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === constants_1.ContentAccessType.FREE, onChange: handleChange(constants_1.ContentAccessType.FREE), disabled: disabled || loading, variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Radio, { checked: expanded === constants_1.ContentAccessType.FREE }), "aria-controls": "free-content", id: "free-header" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free", defaultMessage: "ui.paywallsConfigurator.free" }) }), ": ", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free.label", defaultMessage: "ui.paywallsConfigurator.free.label" })] }) })), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.free.info", defaultMessage: "ui.paywallsConfigurator.free.info" }) }) })] })), (0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === constants_1.ContentAccessType.PAID, onChange: handleChange(constants_1.ContentAccessType.PAID), disabled: disabled || loading, variant: "outlined" }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Radio, { checked: expanded === constants_1.ContentAccessType.PAID }), "aria-controls": "paid-content", id: "paid-header" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { children: [(0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid", defaultMessage: "ui.paywallsConfigurator.paid" }) }), ": ", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid.label", defaultMessage: "ui.paywallsConfigurator.paid.label" })] }) })), (0, jsx_runtime_1.jsxs)(material_1.AccordionDetails, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.paid.info", defaultMessage: "ui.paywallsConfigurator.paid.info" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-around", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ style: { flexGrow: 1 }, component: "div" }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.connected.products", defaultMessage: "ui.paywallsConfigurator.connected.products" }) }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", disableRipple: true, onClick: handleToggleCreatePaymentPrice, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "add" }), className: classes.btnAddPaymentProduct }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.connected.products.btnNew", defaultMessage: "ui.paywallsConfigurator.connected.products.btnNew" }) }))] })), loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [createPrice && ((0, jsx_runtime_1.jsx)(material_1.Zoom, Object.assign({ in: createPrice }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(CreatePaymentProductForm_1.default, { className: classes.newProduct, onCreate: handleCreatePaymentPrice, onCancel: handleToggleCreatePaymentPrice }) }) }))), (0, jsx_runtime_1.jsxs)(List_1.default, Object.assign({ dense: true, className: classes.selectedPaymentProductsList }, { children: [!value.length && ((0, jsx_runtime_1.jsx)(material_1.ListItem, Object.assign({ className: classes.noProducts, divider: true }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: intl.formatMessage({
|
|
219
221
|
id: 'ui.paywallsConfigurator.connected.noProducts',
|
|
220
222
|
defaultMessage: 'ui.paywallsConfigurator.connected.noProducts'
|
|
221
223
|
}) }) }), -1)), value.map((p, i) => {
|
|
@@ -242,9 +244,7 @@ function PaywallsConfigurator(inProps) {
|
|
|
242
244
|
return;
|
|
243
245
|
}
|
|
244
246
|
setPendingValue(newValue);
|
|
245
|
-
}, disableCloseOnSelect: true,
|
|
246
|
-
popper: PopperComponent
|
|
247
|
-
}, renderTags: () => null, noOptionsText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.noProducts", defaultMessage: "ui.paywallsConfigurator.noProducts" }), renderOption: renderOption, options: getOptions, isOptionEqualToValue: (option, value) => option.id === value.id, getOptionLabel: (option) => option.name.toString(), renderInput: (params) => ((0, jsx_runtime_1.jsx)(FilterInputRoot, { disabled: loadingProducts || loading, ref: params.InputProps.ref, inputProps: params.inputProps, autoFocus: true, placeholder: intl.formatMessage({
|
|
247
|
+
}, disableCloseOnSelect: true, PopperComponent: PopperComponent, renderTags: () => null, noOptionsText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.noProducts", defaultMessage: "ui.paywallsConfigurator.noProducts" }), renderOption: renderOption, options: getOptions, isOptionEqualToValue: (option, value) => option.id === value.id, getOptionLabel: (option) => option.name.toString(), renderInput: (params) => ((0, jsx_runtime_1.jsx)(FilterInputRoot, { disabled: loadingProducts || loading, ref: params.InputProps.ref, inputProps: params.inputProps, autoFocus: true, placeholder: intl.formatMessage({
|
|
248
248
|
id: 'ui.paywallsConfigurator.filterByName',
|
|
249
249
|
defaultMessage: 'ui.paywallsConfigurator.filterByName'
|
|
250
250
|
}) })) }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.paymentProductsPopperFooter }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", disableRipple: true, onClick: handleClose, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsConfigurator.popper.btnConfirm", defaultMessage: "ui.paywallsConfigurator.popper.btnConfirm" }) })) }))] }) })) })))] })] }))] }))) })));
|
|
@@ -41,6 +41,6 @@ function PaywallsConfiguratorSkeleton(inProps) {
|
|
|
41
41
|
// HOOKS
|
|
42
42
|
const theme = (0, material_1.useTheme)();
|
|
43
43
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
44
|
-
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,
|
|
44
|
+
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.products }, { children: [...Array(isMobile ? 1 : 2)].map((product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ elevation: 0, variant: 'outlined' }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
45
45
|
}
|
|
46
46
|
exports.default = PaywallsConfiguratorSkeleton;
|
|
@@ -17,13 +17,13 @@ const classes = {
|
|
|
17
17
|
const Root = (0, material_1.styled)(BaseDialog_1.default, {
|
|
18
18
|
slot: 'Root',
|
|
19
19
|
name: PREFIX
|
|
20
|
-
})(() => ({}));
|
|
20
|
+
})(({ theme }) => ({}));
|
|
21
21
|
const Transition = react_1.default.forwardRef(function Transition(props, ref) {
|
|
22
22
|
return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
|
|
23
23
|
});
|
|
24
|
-
const NoTransition = function NoTransition(props) {
|
|
25
|
-
return (0, jsx_runtime_1.
|
|
26
|
-
};
|
|
24
|
+
const NoTransition = react_1.default.forwardRef(function NoTransition(props, ref) {
|
|
25
|
+
return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
|
|
26
|
+
});
|
|
27
27
|
function PaywallsDialog(inProps) {
|
|
28
28
|
var _a;
|
|
29
29
|
// PROPS
|
|
@@ -37,9 +37,7 @@ function PaywallsDialog(inProps) {
|
|
|
37
37
|
if (!isPaymentsEnabled) {
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ maxWidth:
|
|
41
|
-
(PaywallsComponentProps.content && PaywallsComponentProps.content.payment_order) ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsDialog.title.purchased", defaultMessage: "ui.paywallsDialog.title.purchased" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsDialog.title", defaultMessage: "ui.paywallsDialog.title" })), scroll:
|
|
42
|
-
transition: Transition
|
|
43
|
-
}, DialogContentProps: { dividers: false } }, rest, { children: (0, jsx_runtime_1.jsx)(Paywalls_1.default, Object.assign({}, PaywallsComponentProps)) })));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ maxWidth: 'sm', fullWidth: true, title: (PaywallsComponentProps && ((_a = PaywallsComponentProps.prefetchedPaymentContentStatus) === null || _a === void 0 ? void 0 : _a.payment_order)) ||
|
|
41
|
+
(PaywallsComponentProps.content && PaywallsComponentProps.content.payment_order) ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsDialog.title.purchased", defaultMessage: "ui.paywallsDialog.title.purchased" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paywallsDialog.title", defaultMessage: "ui.paywallsDialog.title" })), scroll: 'paper', open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className), TransitionComponent: Transition, DialogContentProps: { dividers: false } }, rest, { children: (0, jsx_runtime_1.jsx)(Paywalls_1.default, Object.assign({}, PaywallsComponentProps)) })));
|
|
44
42
|
}
|
|
45
43
|
exports.default = PaywallsDialog;
|
|
@@ -58,8 +58,6 @@ function PdfPreviewDialog(inProps) {
|
|
|
58
58
|
if (!isPaymentsEnabled) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ fullScreen: true, scroll: "paper", open: true, maxWidth: "md" }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className),
|
|
62
|
-
transition: Transition
|
|
63
|
-
}, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12, justifyContent: "center", alignContent: "center" }, { children: (0, jsx_runtime_1.jsx)(PdfPreview_1.default, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ fullScreen: true, scroll: "paper", open: true, maxWidth: "md" }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className), TransitionComponent: Transition, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignContent: "center" }, { children: (0, jsx_runtime_1.jsx)(PdfPreview_1.default, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
|
|
64
62
|
}
|
|
65
63
|
exports.default = PdfPreviewDialog;
|
|
@@ -57,11 +57,11 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
57
57
|
display: 'flex',
|
|
58
58
|
paddingBottom: 0,
|
|
59
59
|
boxShadow: 'inset -1px -3px 7px -4px #CECECE',
|
|
60
|
-
|
|
60
|
+
'-webkit-overflow-scrolling': 'touch',
|
|
61
61
|
overflowX: 'auto',
|
|
62
62
|
overflowY: 'hidden',
|
|
63
63
|
scrollbarWidth: 'none' /* Firefox */,
|
|
64
|
-
|
|
64
|
+
'-ms-overflow-style': 'none' /* IE and Edge */,
|
|
65
65
|
'&::-webkit-scrollbar': {
|
|
66
66
|
display: 'none'
|
|
67
67
|
}
|
|
@@ -293,13 +293,13 @@ function PlatformWidget(inProps) {
|
|
|
293
293
|
/**
|
|
294
294
|
* Render tutorial
|
|
295
295
|
*/
|
|
296
|
-
const tutorial = ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true,
|
|
296
|
+
const tutorial = ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.tutorial }, { children: [!isTutorialOpen && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: "auto", alignItems: "center", justifyContent: "center" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", onClick: handleOpenTutorial }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "info" }) })) }))), (0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ in: isTutorialOpen, className: classes.tutorialContent }, { children: isTutorialOpen && ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: "auto" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body2', className: classes.tutorialTitle, component: 'div' }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({ in: true, timeout: 1000 }, { children: (0, jsx_runtime_1.jsx)("span", { children: actions[tutorialIndex].title }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: 'small', className: classes.tutorialTitleClose, onClick: handleCloseTutorial }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({ in: true, timeout: 1200 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body2', className: classes.tutorialDesc }, { children: actions[tutorialIndex].content })) })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.divider }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2, className: classes.tutorialControls }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handlePrevious, className: (0, classnames_1.default)(classes.btnStep, classes.btnPreviousStep) }, { children: tutorialIndex === 0 ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.skip", defaultMessage: "ui.platformWidget.tutorial.skip" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.previous", defaultMessage: "ui.platformWidget.tutorial.previous" })) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: 'div' }, { children: [tutorialIndex + 1, "/", actions.length] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", color: "primary", onClick: handleNext, className: (0, classnames_1.default)(classes.btnStep, classes.btnNextStep) }, { children: tutorialIndex === actions.length - 1 ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.close", defaultMessage: "ui.platformWidget.tutorial.close" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.platformWidget.tutorial.next", defaultMessage: "ui.platformWidget.tutorial.next" })) }))] }))] }))) }))] })));
|
|
297
297
|
/**
|
|
298
298
|
* Renders platform card
|
|
299
299
|
*/
|
|
300
|
-
const content = ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true,
|
|
301
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
302
|
-
}), (0, jsx_runtime_1.jsx)(material_1.Grid, {
|
|
300
|
+
const content = ((0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: title ? (title) : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.platformWidget.title.tooltip", defaultMessage: "ui.platformWidget.title.tooltip" }), placement: "top" }, { children: (0, jsx_runtime_1.jsx)("img", { src: logo_1.default, alt: "logo" }) })) }))) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1, className: classes.action }), actions.map((a, i) => {
|
|
301
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: "auto", className: (0, classnames_1.default)(classes.action, { [classes.actionHighlighted]: tutorialIndex === i && isTutorialOpen }) }, { children: a.render }), i));
|
|
302
|
+
}), (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 1, className: classes.action })] }))] })));
|
|
303
303
|
/**
|
|
304
304
|
* Renders root object (if not hidden by autoHide prop)
|
|
305
305
|
*/
|
|
@@ -37,6 +37,6 @@ const Root = (0, material_1.styled)(Widget_1.default, {
|
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
function PlatformWidgetSkeleton(props) {
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true,
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, justifyContent: "center", className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 25, width: 170 }) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ item: true, xs: 12, className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 35, width: 110 })] })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
|
|
41
41
|
}
|
|
42
42
|
exports.default = PlatformWidgetSkeleton;
|
|
@@ -153,7 +153,7 @@ function PrivateMessageComponent(inProps) {
|
|
|
153
153
|
* Renders snippets section
|
|
154
154
|
*/
|
|
155
155
|
function renderSnippets() {
|
|
156
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
156
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 5, className: (0, classnames_1.default)(classes.snippetsBox, { [classes.hide]: isMobile && mobileThreadView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageSnippets_1.default, { snippetActions: {
|
|
157
157
|
onSnippetClick: handleThreadOpening,
|
|
158
158
|
onNewMessageClick: handleOpenNewMessage,
|
|
159
159
|
onDeleteConfirm: handleDeleteThread
|
|
@@ -163,7 +163,7 @@ function PrivateMessageComponent(inProps) {
|
|
|
163
163
|
* Renders thread section
|
|
164
164
|
*/
|
|
165
165
|
function renderThread() {
|
|
166
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({
|
|
166
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 7, className: (0, classnames_1.default)(classes.threadBox, { [classes.hide]: isMobile && mobileSnippetsView }) }, { children: (0, jsx_runtime_1.jsx)(PrivateMessageThread_1.default, { threadObj: obj, type: _type, openNewMessage: openNewMessage, onNewMessageClose: handleMessageBack, onNewMessageSent: handleOnNewMessageSent, onSingleMessageOpen: handleSingleMessage, elevation: 0 }) })));
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Renders the component (if not hidden by autoHide prop)
|
|
@@ -171,6 +171,6 @@ function PrivateMessageComponent(inProps) {
|
|
|
171
171
|
if (!authUserId || !privateMessagingEnabled) {
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true
|
|
174
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true }, rest, { className: (0, classnames_1.default)(classes.root, className) }, { children: [renderSnippets(), renderThread()] })));
|
|
175
175
|
}
|
|
176
176
|
exports.default = PrivateMessageComponent;
|
|
@@ -42,6 +42,6 @@ function PrivateMessageComponentSkeleton(props) {
|
|
|
42
42
|
const { className } = props;
|
|
43
43
|
const theme = (0, material_1.useTheme)();
|
|
44
44
|
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
45
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true,
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, className: (0, classnames_1.default)(classes.root, className) }, { children: [!isMobile && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 5, className: classes.snippetsSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 7, className: classes.threadSection }, { children: (0, jsx_runtime_1.jsx)(Skeleton_2.default, {}) }))] })));
|
|
46
46
|
}
|
|
47
47
|
exports.default = PrivateMessageComponentSkeleton;
|
|
@@ -109,7 +109,7 @@ function MessageMediaUploader(props) {
|
|
|
109
109
|
url: `${scContext.settings.portal}${api_services_1.Endpoints.PrivateMessageUploadMediaInChunks.url()}`,
|
|
110
110
|
headers: { Authorization: `Bearer ${scContext.settings.session.authToken.accessToken}` },
|
|
111
111
|
method: api_services_1.Endpoints.PrivateMessageUploadMediaInChunks.method
|
|
112
|
-
}, chunkSize: 204800, multiple: true, chunked: true, maxConcurrent: 2, fileFilter: filterBySizeAndType }, { children: [(0, jsx_runtime_1.jsx)(MessageChunkUploader_1.default, { onSuccess: handleSuccess, onProgress: handleProgress, onError: handleError }), !files.length && Object.keys(uploading).length === 0 && Object.keys(errors).length === 0 && ((0, jsx_runtime_1.jsxs)(upload_drop_zone_1.default, Object.assign({ className: classes.uploadSection }, { children: [(0, jsx_runtime_1.jsx)(UploadButton, { inputFieldName: "file", className: classes.uploadButton }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ textAlign:
|
|
112
|
+
}, chunkSize: 204800, multiple: true, chunked: true, maxConcurrent: 2, fileFilter: filterBySizeAndType }, { children: [(0, jsx_runtime_1.jsx)(MessageChunkUploader_1.default, { onSuccess: handleSuccess, onProgress: handleProgress, onError: handleError }), !files.length && Object.keys(uploading).length === 0 && Object.keys(errors).length === 0 && ((0, jsx_runtime_1.jsxs)(upload_drop_zone_1.default, Object.assign({ className: classes.uploadSection }, { children: [(0, jsx_runtime_1.jsx)(UploadButton, { inputFieldName: "file", className: classes.uploadButton }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ textAlign: 'center', fontWeight: 'medium' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessage.editor.media.uploader.msg", defaultMessage: "ui.privateMessage.editor.media.uploader.msg" }) }))] }))), (0, jsx_runtime_1.jsxs)(material_1.List, Object.assign({ className: classes.previewContent }, { children: [previews.length !== 0 &&
|
|
113
113
|
previews.map((item, index) => {
|
|
114
114
|
var _a;
|
|
115
115
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: 'file' in item && ((0, jsx_runtime_1.jsxs)(material_1.ListItem, Object.assign({ className: classes.previewItem }, getMouseEvents(() => handleMouseEnter(item.file_uuid), () => handleMouseLeave(item.file_uuid)), { children: ['video_url' in item ? ((0, jsx_runtime_1.jsx)("video", { src: item.video_url })) : ((0, jsx_runtime_1.jsx)("img", { src: item.file.type.startsWith(types_1.SCMessageFileType.PDF) && !item.file_url
|
|
@@ -117,7 +117,7 @@ function MessageMediaUploader(props) {
|
|
|
117
117
|
: !item.file_url
|
|
118
118
|
? thumbnailCoverter_1.documentPlaceholder
|
|
119
119
|
: item.file_url })), (0, jsx_runtime_1.jsx)(material_1.ImageListItemBar, { className: (0, classnames_1.default)(classes.previewActions, { [classes.progress]: item.completed }), title: typeof item.completed !== 'undefined' &&
|
|
120
|
-
item.completed !== 0 && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ textAlign: "center" }, { children: `${Math.round(item.completed)}%` })), actionIcon: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isHovered[item.file_uuid] && Object.keys(uploading).length === 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleClear(item.file_uuid), size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))) }) }), isHovered[item.file_uuid] && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component:
|
|
120
|
+
item.completed !== 0 && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ textAlign: "center" }, { children: `${Math.round(item.completed)}%` })), actionIcon: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isHovered[item.file_uuid] && Object.keys(uploading).length === 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleClear(item.file_uuid), size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))) }) }), isHovered[item.file_uuid] && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: 'span', className: classes.previewInfo }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ noWrap: true, textAlign: 'center' }, { children: item.file.name })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ textAlign: 'center', fontWeight: 'light' }, { children: (0, sizeCoverter_1.bytesToSize)(item.file.size) }))] })))] }), (_a = item.id) !== null && _a !== void 0 ? _a : item.file_uuid)) }, index));
|
|
121
121
|
}), previews.length !== 0 && action] }))] })) })] })));
|
|
122
122
|
}
|
|
123
123
|
exports.default = MessageMediaUploader;
|
|
@@ -96,7 +96,7 @@ function PrivateMessageEditor(inProps) {
|
|
|
96
96
|
const handleMessageInput = (event) => {
|
|
97
97
|
setMessage(event.target.value);
|
|
98
98
|
};
|
|
99
|
-
const handleEmojiClick = (emojiData) => {
|
|
99
|
+
const handleEmojiClick = (emojiData, event) => {
|
|
100
100
|
const cursorPosition = ref.current.selectionEnd;
|
|
101
101
|
const start = ref.current.value.substring(0, ref.current.selectionStart);
|
|
102
102
|
const end = ref.current.value.substring(ref.current.selectionStart);
|
|
@@ -126,11 +126,9 @@ function PrivateMessageEditor(inProps) {
|
|
|
126
126
|
return ((0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ severity: "error", action: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ color: "inherit", size: "small", onClick: onErrorRemove }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessage.editor.error.send.msg", defaultMessage: "ui.privateMessage.editor.error.send.msg" }) })));
|
|
127
127
|
}
|
|
128
128
|
function renderContent() {
|
|
129
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: openMediaSection ? ((0, jsx_runtime_1.jsx)(MessageMediaUploader_1.default, { className: classes.mediaUploader, open: openMediaSection, onClose: handleMediaSectionClose, forwardMessageFile: handleMessageFiles, isUploading: setUploading, action: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: (!message && !messageFiles.length) || uploading, onClick: handleMessageSend }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) })) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [openEmojiSection && (0, jsx_runtime_1.jsx)(EmojiPicker_1.default, { className: classes.emojiSection, onEmojiClick: handleEmojiClick, width: "100%", searchDisabled: true }), (0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", inputRef: ref, disabled: Boolean(messageFiles.length) || openMediaSection, className: classes.messageInput, multiline: true, placeholder: `${intl.formatMessage(messages.placeholder)}`, value: message, onChange: handleMessageInput, maxRows: 2, onSelect: () => setOpenEmojiSection(false),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: (!message && !messageFiles.length) || uploading, onClick: handleMessageSend }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) })))
|
|
133
|
-
}
|
|
129
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: openMediaSection ? ((0, jsx_runtime_1.jsx)(MessageMediaUploader_1.default, { className: classes.mediaUploader, open: openMediaSection, onClose: handleMediaSectionClose, forwardMessageFile: handleMessageFiles, isUploading: setUploading, action: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: (!message && !messageFiles.length) || uploading, onClick: handleMessageSend }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) })) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [openEmojiSection && (0, jsx_runtime_1.jsx)(EmojiPicker_1.default, { className: classes.emojiSection, onEmojiClick: handleEmojiClick, width: "100%", searchDisabled: true }), (0, jsx_runtime_1.jsx)(material_1.TextField, { size: "small", inputRef: ref, disabled: Boolean(messageFiles.length) || openMediaSection, className: classes.messageInput, multiline: true, placeholder: `${intl.formatMessage(messages.placeholder)}`, value: message, onChange: handleMessageInput, maxRows: 2, onSelect: () => setOpenEmojiSection(false), InputProps: {
|
|
130
|
+
startAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: openMediaSection, onClick: () => setOpenEmojiSection(!openEmojiSection) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "sentiment_satisfied_alt" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: message !== '' || openEmojiSection, onClick: () => setOpenMediaSection(true) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "attach_file" }) }))] })),
|
|
131
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: (!message && !messageFiles.length) || uploading, onClick: handleMessageSend }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) })))
|
|
134
132
|
} })] })) }));
|
|
135
133
|
}
|
|
136
134
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: (0, classnames_1.default)(classes.root, className, { [classes.ios]: isIOS }) }, { children: renderContent() })));
|
package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js
CHANGED
|
@@ -122,14 +122,6 @@ function PrivateMessageSettingsIconButton(inProps) {
|
|
|
122
122
|
];
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { onClick: handleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), Boolean(anchorEl) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: true, onClose: handleClose, onOpen: handleOpen,
|
|
126
|
-
paper: {
|
|
127
|
-
className: classes.paper
|
|
128
|
-
}
|
|
129
|
-
}, disableSwipeToOpen: true }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: renderList() }) }))) : ((0, jsx_runtime_1.jsx)(MenuRoot, Object.assign({ className: classes.menuRoot, anchorEl: anchorEl, open: true, onClose: handleClose, slotProps: {
|
|
130
|
-
paper: {
|
|
131
|
-
className: classes.paper
|
|
132
|
-
}
|
|
133
|
-
} }, { children: renderList() }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openConfirmDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessageSettingsIconButton.dialog.msg", defaultMessage: "ui.privateMessageSettingsIconButton.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessageSettingsIconButton.dialog.confirm", defaultMessage: "ui.privateMessageSettingsIconButton.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog }))] }));
|
|
125
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { onClick: handleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "more_vert" }) })), Boolean(anchorEl) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(SwipeableDrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "bottom", open: true, onClose: handleClose, onOpen: handleOpen, PaperProps: { className: classes.paper }, disableSwipeToOpen: true }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: renderList() }) }))) : ((0, jsx_runtime_1.jsx)(MenuRoot, Object.assign({ className: classes.menuRoot, anchorEl: anchorEl, open: true, onClose: handleClose, PaperProps: { className: classes.paper } }, { children: renderList() }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openConfirmDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessageSettingsIconButton.dialog.msg", defaultMessage: "ui.privateMessageSettingsIconButton.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessageSettingsIconButton.dialog.confirm", defaultMessage: "ui.privateMessageSettingsIconButton.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog }))] }));
|
|
134
126
|
}
|
|
135
127
|
exports.default = PrivateMessageSettingsIconButton;
|
|
@@ -188,7 +188,7 @@ function PrivateMessageSnippets(inProps) {
|
|
|
188
188
|
/**
|
|
189
189
|
* Notification subscriber
|
|
190
190
|
*/
|
|
191
|
-
const subscriber = (
|
|
191
|
+
const subscriber = (msg, data) => {
|
|
192
192
|
const res = data.data;
|
|
193
193
|
updateSnippetsParams(res.thread_id, res.notification_obj.snippet.thread_status, res.notification_obj.snippet.headline);
|
|
194
194
|
};
|
|
@@ -209,13 +209,13 @@ function PrivateMessageSnippets(inProps) {
|
|
|
209
209
|
* Thread/ Private Message Component subscriptions handlers
|
|
210
210
|
*/
|
|
211
211
|
(0, react_1.useEffect)(() => {
|
|
212
|
-
const threadSubscriber = pubsub_js_1.default.subscribe('snippetsChannel', (
|
|
212
|
+
const threadSubscriber = pubsub_js_1.default.subscribe('snippetsChannel', (msg, data) => {
|
|
213
213
|
handleSnippetsUpdate(data);
|
|
214
214
|
});
|
|
215
|
-
const snippetsSubscriber = pubsub_js_1.default.subscribe('snippetsChannelDelete', (
|
|
215
|
+
const snippetsSubscriber = pubsub_js_1.default.subscribe('snippetsChannelDelete', (msg, data) => {
|
|
216
216
|
handleSnippetsUpdate(data, true, types_1.SCPrivateMessageType.USER);
|
|
217
217
|
});
|
|
218
|
-
const snippetsGroupSubscriber = pubsub_js_1.default.subscribe('snippetsChannelDeleteGroup', (
|
|
218
|
+
const snippetsGroupSubscriber = pubsub_js_1.default.subscribe('snippetsChannelDeleteGroup', (msg, data) => {
|
|
219
219
|
handleSnippetsUpdate(data, true, types_1.SCPrivateMessageType.GROUP);
|
|
220
220
|
});
|
|
221
221
|
return () => {
|
|
@@ -234,12 +234,10 @@ function PrivateMessageSnippets(inProps) {
|
|
|
234
234
|
/**
|
|
235
235
|
* Renders the component
|
|
236
236
|
*/
|
|
237
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: (0, classnames_1.default)(classes.root, className) }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "medium", className: classes.newMessageButton, onClick: handleOpenNewMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessage.snippets.button.newMessage", defaultMessage: "ui.privateMessage.snippets.button.newMessage" }) })), data.snippets.length !== 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.searchBar, variant: "outlined", margin: "normal", fullWidth: true, id: `${constants_1.PREFIX}-search`, placeholder: `${intl.formatMessage(messages.placeholder)}`, size: "small", onChange: handleChange, value: search,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.clear, disabled: !search, onClick: handleClear, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })))
|
|
242
|
-
}
|
|
237
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: (0, classnames_1.default)(classes.root, className) }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "medium", className: classes.newMessageButton, onClick: handleOpenNewMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.privateMessage.snippets.button.newMessage", defaultMessage: "ui.privateMessage.snippets.button.newMessage" }) })), data.snippets.length !== 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.searchBar, variant: "outlined", margin: "normal", fullWidth: true, id: `${constants_1.PREFIX}-search`, placeholder: `${intl.formatMessage(messages.placeholder)}`, size: "small", onChange: handleChange, value: search, InputProps: {
|
|
238
|
+
className: classes.input,
|
|
239
|
+
startAdornment: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.icon }, { children: "search" })),
|
|
240
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.clear, disabled: !search, onClick: handleClear, size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })))
|
|
243
241
|
} }), (0, jsx_runtime_1.jsx)(material_1.List, { children: filteredSnippets.map((message) => ((0, jsx_runtime_1.jsx)(PrivateMessageSnippetItem_1.default, { message: message, onItemClick: () => handleOpenThread(message), secondaryAction: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [message.thread_status === types_1.SCPrivateMessageStatusType.NEW && (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "secondary" }, { children: "fiber_manual_record" })), !isMobile && ((0, jsx_runtime_1.jsx)(PrivateMessageSettingsIconButton_1.default, { threadToDelete: (message === null || message === void 0 ? void 0 : message.group) ? message.group.id : messageReceiver(message, authUserId), onItemDeleteConfirm: () => handleDeleteConversation(messageReceiver(message, authUserId)), user: messageReceiver(message, authUserId, true), group: message === null || message === void 0 ? void 0 : message.group }))] }), selected: isSelected(message) }, message.id))) })] }))] }) })));
|
|
244
242
|
}
|
|
245
243
|
exports.default = PrivateMessageSnippets;
|
|
@@ -39,6 +39,6 @@ const Root = (0, material_1.styled)(material_1.Card, {
|
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
41
|
function PrivateMessageSnippetsSkeleton(props) {
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "column", justifyContent: "center", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "medium", disabled: true, className: classes.button }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: 20, width: 100, variant:
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "column", justifyContent: "center", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "medium", disabled: true, className: classes.button }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: 20, width: 100, variant: 'rectangular' }) })), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { height: 25, width: '100%', variant: 'rounded', className: classes.searchBar })] })), (0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ className: classes.list }, { children: [...Array(6)].map((category, index) => ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { elevation: 0 }, index))) }))] }) })));
|
|
43
43
|
}
|
|
44
44
|
exports.default = PrivateMessageSnippetsSkeleton;
|
|
@@ -25,7 +25,7 @@ export interface PrivateMessageThreadProps extends CardProps {
|
|
|
25
25
|
* Callback fired when new message section is closed
|
|
26
26
|
* @default null
|
|
27
27
|
*/
|
|
28
|
-
onNewMessageClose?: (dispatch
|
|
28
|
+
onNewMessageClose?: (dispatch: any) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Callback fired when a single message section is open
|
|
31
31
|
* @default null
|