@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.
Files changed (472) hide show
  1. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -1
  2. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -1
  3. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +11 -6
  4. package/lib/cjs/components/AccountDelete/AccountDelete.js +12 -5
  5. package/lib/cjs/components/AccountRecover/AccountRecover.js +4 -2
  6. package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
  7. package/lib/cjs/components/BuyButton/BuyButton.js +5 -8
  8. package/lib/cjs/components/Categories/Categories.js +1 -1
  9. package/lib/cjs/components/Categories/Skeleton.js +1 -1
  10. package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
  11. package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +1 -3
  12. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +4 -3
  13. package/lib/cjs/components/ChangeCover/ChangeCover.js +6 -2
  14. package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +2 -1
  15. package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -1
  16. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
  17. package/lib/cjs/components/Checkout/Skeleton.js +3 -1
  18. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
  19. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +3 -2
  20. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  21. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
  22. package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  23. package/lib/cjs/components/CommunityPaywalls/Skeleton.js +3 -2
  24. package/lib/cjs/components/Composer/Composer.js +4 -3
  25. package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
  26. package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  27. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
  28. package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  29. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -4
  30. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
  31. package/lib/cjs/components/ConsentSolution/ConsentSolution.js +5 -12
  32. package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
  33. package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  34. package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
  35. package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +2 -1
  36. package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +2 -1
  37. package/lib/cjs/components/CourseForm/CourseForm.js +6 -9
  38. package/lib/cjs/components/CourseForm/Edit.js +2 -6
  39. package/lib/cjs/components/CourseForm/UploadCourseCover.js +2 -1
  40. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +4 -3
  41. package/lib/cjs/components/Courses/Courses.d.ts +4 -0
  42. package/lib/cjs/components/Courses/Courses.js +10 -9
  43. package/lib/cjs/components/Courses/Skeleton.js +1 -1
  44. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
  45. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +8 -5
  46. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
  47. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  48. package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -2
  49. package/lib/cjs/components/EditCourse/Lessons/FieldName.js +2 -1
  50. package/lib/cjs/components/EditCourse/Options.js +2 -1
  51. package/lib/cjs/components/EditCourse/Status.js +1 -1
  52. package/lib/cjs/components/Editor/Editor.js +3 -3
  53. package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +2 -4
  54. package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
  55. package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +3 -5
  56. package/lib/cjs/components/EventForm/EventAddress.js +5 -9
  57. package/lib/cjs/components/EventForm/EventForm.js +51 -89
  58. package/lib/cjs/components/EventForm/UploadEventCover.js +2 -1
  59. package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
  60. package/lib/cjs/components/EventInviteButton/EventInviteButton.js +2 -3
  61. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +16 -5
  62. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  63. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -1
  64. package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  65. package/lib/cjs/components/EventMediaWidget/TriggerButton.js +2 -1
  66. package/lib/cjs/components/EventMediaWidget/index.d.ts +1 -2
  67. package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
  68. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
  69. package/lib/cjs/components/Events/Events.d.ts +4 -0
  70. package/lib/cjs/components/Events/Events.js +9 -14
  71. package/lib/cjs/components/Events/LocationEventsFilter.js +1 -5
  72. package/lib/cjs/components/Events/OngoingEventsFilter.js +2 -6
  73. package/lib/cjs/components/Events/PastEventsFilter.js +2 -6
  74. package/lib/cjs/components/Events/Skeleton.js +1 -1
  75. package/lib/cjs/components/Feed/Feed.js +10 -9
  76. package/lib/cjs/components/Feed/Skeleton.js +1 -1
  77. package/lib/cjs/components/FeedObject/Actions/Actions.js +3 -2
  78. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  79. package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +3 -2
  80. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +2 -1
  81. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
  82. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  83. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  84. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  85. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  86. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +2 -1
  87. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  88. package/lib/cjs/components/FollowUserButton/FollowUserButton.js +2 -1
  89. package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +3 -2
  90. package/lib/cjs/components/GroupActionsMenu/index.js +1 -9
  91. package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +3 -5
  92. package/lib/cjs/components/GroupForm/GroupForm.js +27 -16
  93. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
  94. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +7 -8
  95. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
  96. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -3
  97. package/lib/cjs/components/Groups/Groups.js +9 -9
  98. package/lib/cjs/components/Groups/Skeleton.js +2 -1
  99. package/lib/cjs/components/Incubator/Incubator.js +4 -4
  100. package/lib/cjs/components/Incubator/Skeleton.js +1 -1
  101. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  102. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -3
  103. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  104. package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -3
  105. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  106. package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +2 -1
  107. package/lib/cjs/components/LessonAppbar/LessonAppbar.js +4 -3
  108. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  109. package/lib/cjs/components/LessonEditForm/LessonEditForm.js +2 -1
  110. package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
  111. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +12 -15
  112. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
  113. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
  114. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
  115. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  116. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
  117. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  118. package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +16 -17
  119. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  120. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  121. package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
  122. package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
  123. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
  124. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
  125. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  126. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  127. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  128. package/lib/cjs/components/Notification/Course/Course.js +10 -5
  129. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -4
  130. package/lib/cjs/components/Notification/Event/Event.js +12 -7
  131. package/lib/cjs/components/Notification/Group/Group.js +4 -3
  132. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  133. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
  134. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
  135. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +9 -4
  136. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  137. package/lib/cjs/components/Notification/Notification.js +9 -17
  138. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +5 -4
  139. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  140. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -6
  141. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -6
  142. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  143. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  144. package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +4 -12
  145. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +27 -19
  146. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  147. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +25 -9
  148. package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
  149. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
  150. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +5 -7
  151. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  152. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +26 -39
  153. package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
  154. package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
  155. package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
  156. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
  157. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
  158. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +6 -8
  159. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
  160. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
  161. package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
  162. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  163. package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
  164. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  165. package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
  166. package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
  167. package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
  168. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  169. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  170. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  171. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  172. package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
  173. package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
  174. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  175. package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
  176. package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +1 -3
  177. package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +8 -9
  178. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +6 -4
  179. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +4 -4
  180. package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
  181. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +22 -30
  182. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
  183. package/lib/cjs/components/UserCounters/UserCounters.js +13 -5
  184. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  185. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
  186. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +3 -24
  187. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +4 -2
  188. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
  189. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +9 -8
  190. package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +2 -1
  191. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
  192. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +20 -9
  193. package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
  194. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  195. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +5 -4
  196. package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
  197. package/lib/cjs/components/VoteButton/VoteButton.js +3 -2
  198. package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +2 -3
  199. package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +2 -1
  200. package/lib/cjs/shared/ContributionActionsMenu/index.js +9 -3
  201. package/lib/cjs/shared/CopyTextArea/index.js +6 -13
  202. package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +2 -1
  203. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +5 -6
  204. package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +2 -1
  205. package/lib/cjs/shared/CourseUsersTable/RequestButton.js +2 -1
  206. package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
  207. package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
  208. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
  209. package/lib/cjs/shared/EventActionsMenu/index.js +1 -9
  210. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
  211. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  212. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +8 -2
  213. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  214. package/lib/cjs/shared/Media/File/DisplayComponent.js +6 -4
  215. package/lib/cjs/shared/Media/File/DocComponent.d.ts +0 -2
  216. package/lib/cjs/shared/Media/File/DocComponent.js +2 -3
  217. package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
  218. package/lib/cjs/shared/Media/File/TriggerButton.js +1 -9
  219. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  220. package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
  221. package/lib/cjs/shared/Media/Link/DisplayComponent.js +12 -4
  222. package/lib/cjs/shared/Media/Link/UrlTextField/index.js +1 -3
  223. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  224. package/lib/cjs/shared/PasswordTextField/index.js +5 -7
  225. package/lib/cjs/shared/ScrollContainer/index.js +2 -2
  226. package/lib/cjs/shared/TagChip/index.d.ts +48 -2
  227. package/lib/cjs/shared/TagChip/index.js +2 -2
  228. package/lib/cjs/shared/Tags/index.js +1 -1
  229. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  230. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
  231. package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  232. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +3 -2
  233. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +3 -2
  234. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +12 -7
  235. package/lib/esm/components/AccountDelete/AccountDelete.js +13 -6
  236. package/lib/esm/components/AccountRecover/AccountRecover.js +4 -2
  237. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  238. package/lib/esm/components/BuyButton/BuyButton.js +6 -9
  239. package/lib/esm/components/Categories/Categories.js +1 -1
  240. package/lib/esm/components/Categories/Skeleton.js +1 -1
  241. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  242. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +2 -4
  243. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +5 -4
  244. package/lib/esm/components/ChangeCover/ChangeCover.js +6 -2
  245. package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +3 -2
  246. package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +3 -2
  247. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
  248. package/lib/esm/components/Checkout/Skeleton.js +4 -2
  249. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
  250. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +4 -3
  251. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  252. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
  253. package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  254. package/lib/esm/components/CommunityPaywalls/Skeleton.js +3 -2
  255. package/lib/esm/components/Composer/Composer.js +5 -4
  256. package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
  257. package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  258. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
  259. package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  260. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +3 -5
  261. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
  262. package/lib/esm/components/ConsentSolution/ConsentSolution.js +5 -12
  263. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  264. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  265. package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
  266. package/lib/esm/components/CourseDashboard/Student/ActionButton.js +2 -1
  267. package/lib/esm/components/CourseDashboard/Teacher/Comments.js +2 -1
  268. package/lib/esm/components/CourseForm/CourseForm.js +7 -10
  269. package/lib/esm/components/CourseForm/Edit.js +2 -6
  270. package/lib/esm/components/CourseForm/UploadCourseCover.js +3 -2
  271. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +5 -4
  272. package/lib/esm/components/Courses/Courses.d.ts +4 -0
  273. package/lib/esm/components/Courses/Courses.js +9 -9
  274. package/lib/esm/components/Courses/Skeleton.js +1 -1
  275. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
  276. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +9 -6
  277. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
  278. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  279. package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +4 -3
  280. package/lib/esm/components/EditCourse/Lessons/FieldName.js +3 -2
  281. package/lib/esm/components/EditCourse/Options.js +3 -2
  282. package/lib/esm/components/EditCourse/Status.js +1 -1
  283. package/lib/esm/components/Editor/Editor.js +3 -3
  284. package/lib/esm/components/Editor/plugins/EmojiPlugin.js +2 -4
  285. package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
  286. package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +4 -6
  287. package/lib/esm/components/EventForm/EventAddress.js +5 -9
  288. package/lib/esm/components/EventForm/EventForm.js +53 -91
  289. package/lib/esm/components/EventForm/UploadEventCover.js +3 -2
  290. package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
  291. package/lib/esm/components/EventInviteButton/EventInviteButton.js +2 -3
  292. package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +16 -5
  293. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  294. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -1
  295. package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  296. package/lib/esm/components/EventMediaWidget/TriggerButton.js +3 -2
  297. package/lib/esm/components/EventMediaWidget/index.d.ts +1 -2
  298. package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
  299. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
  300. package/lib/esm/components/Events/Events.d.ts +4 -0
  301. package/lib/esm/components/Events/Events.js +8 -14
  302. package/lib/esm/components/Events/LocationEventsFilter.js +1 -5
  303. package/lib/esm/components/Events/OngoingEventsFilter.js +2 -6
  304. package/lib/esm/components/Events/PastEventsFilter.js +2 -6
  305. package/lib/esm/components/Events/Skeleton.js +1 -1
  306. package/lib/esm/components/Feed/Feed.js +11 -10
  307. package/lib/esm/components/Feed/Skeleton.js +2 -2
  308. package/lib/esm/components/FeedObject/Actions/Actions.js +3 -2
  309. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  310. package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +4 -3
  311. package/lib/esm/components/FeedObject/Actions/Share/Share.js +2 -1
  312. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
  313. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  314. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  315. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  316. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  317. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +3 -2
  318. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  319. package/lib/esm/components/FollowUserButton/FollowUserButton.js +3 -2
  320. package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +4 -3
  321. package/lib/esm/components/GroupActionsMenu/index.js +1 -9
  322. package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +4 -6
  323. package/lib/esm/components/GroupForm/GroupForm.js +28 -17
  324. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
  325. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +7 -8
  326. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
  327. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +5 -4
  328. package/lib/esm/components/Groups/Groups.js +9 -9
  329. package/lib/esm/components/Groups/Skeleton.js +2 -1
  330. package/lib/esm/components/Incubator/Incubator.js +4 -4
  331. package/lib/esm/components/Incubator/Skeleton.js +1 -1
  332. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  333. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +5 -4
  334. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  335. package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +5 -4
  336. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  337. package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +3 -2
  338. package/lib/esm/components/LessonAppbar/LessonAppbar.js +5 -4
  339. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  340. package/lib/esm/components/LessonEditForm/LessonEditForm.js +3 -2
  341. package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
  342. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +13 -16
  343. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
  344. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
  345. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
  346. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  347. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
  348. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  349. package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +10 -11
  350. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  351. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  352. package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
  353. package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
  354. package/lib/esm/components/NavigationToolbar/NotificationMenu.js +5 -2
  355. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
  356. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  357. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  358. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  359. package/lib/esm/components/Notification/Course/Course.js +11 -6
  360. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -4
  361. package/lib/esm/components/Notification/Event/Event.js +13 -8
  362. package/lib/esm/components/Notification/Group/Group.js +5 -4
  363. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  364. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
  365. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
  366. package/lib/esm/components/Notification/LiveStream/LiveStream.js +10 -5
  367. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  368. package/lib/esm/components/Notification/Notification.js +10 -18
  369. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +6 -5
  370. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  371. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -6
  372. package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -6
  373. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  374. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  375. package/lib/esm/components/OnBoardingWidget/ActionsButton.js +4 -12
  376. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +28 -20
  377. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  378. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +25 -9
  379. package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
  380. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
  381. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +6 -8
  382. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  383. package/lib/esm/components/PaymentOrders/PaymentOrders.js +26 -39
  384. package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
  385. package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
  386. package/lib/esm/components/Paywalls/Skeleton.js +1 -1
  387. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
  388. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
  389. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +7 -9
  390. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
  391. package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
  392. package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
  393. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  394. package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
  395. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  396. package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
  397. package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
  398. package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
  399. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  400. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  401. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  402. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  403. package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
  404. package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
  405. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  406. package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
  407. package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +3 -5
  408. package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +9 -10
  409. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +7 -5
  410. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +6 -6
  411. package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
  412. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +22 -30
  413. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
  414. package/lib/esm/components/UserCounters/UserCounters.js +13 -5
  415. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  416. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
  417. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +3 -24
  418. package/lib/esm/components/UserPaymentMethods/Skeleton.js +4 -2
  419. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
  420. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +12 -11
  421. package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +3 -2
  422. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
  423. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +23 -12
  424. package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
  425. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  426. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +6 -5
  427. package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
  428. package/lib/esm/components/VoteButton/VoteButton.js +4 -3
  429. package/lib/esm/shared/AddUsersButton/AddUsersButton.js +2 -3
  430. package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +2 -1
  431. package/lib/esm/shared/ContributionActionsMenu/index.js +9 -3
  432. package/lib/esm/shared/CopyTextArea/index.js +6 -13
  433. package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +3 -2
  434. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +6 -7
  435. package/lib/esm/shared/CourseUsersTable/RemoveButton.js +3 -2
  436. package/lib/esm/shared/CourseUsersTable/RequestButton.js +3 -2
  437. package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
  438. package/lib/esm/shared/DateTimeAgo/index.js +2 -2
  439. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
  440. package/lib/esm/shared/EventActionsMenu/index.js +1 -9
  441. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
  442. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  443. package/lib/esm/shared/LessonCommentActionsMenu/index.js +8 -2
  444. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  445. package/lib/esm/shared/Media/File/DisplayComponent.js +6 -4
  446. package/lib/esm/shared/Media/File/DocComponent.d.ts +0 -2
  447. package/lib/esm/shared/Media/File/DocComponent.js +2 -3
  448. package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
  449. package/lib/esm/shared/Media/File/TriggerButton.js +1 -9
  450. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  451. package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
  452. package/lib/esm/shared/Media/Link/DisplayComponent.js +13 -5
  453. package/lib/esm/shared/Media/Link/UrlTextField/index.js +1 -3
  454. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  455. package/lib/esm/shared/PasswordTextField/index.js +5 -7
  456. package/lib/esm/shared/ScrollContainer/index.js +1 -1
  457. package/lib/esm/shared/TagChip/index.d.ts +48 -2
  458. package/lib/esm/shared/TagChip/index.js +2 -2
  459. package/lib/esm/shared/Tags/index.js +1 -1
  460. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  461. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
  462. package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  463. package/lib/umd/155.js +2 -0
  464. package/lib/umd/155.js.LICENSE.txt +24 -0
  465. package/lib/umd/react-ui.js +1 -1
  466. package/package.json +206 -207
  467. package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +0 -8
  468. package/lib/cjs/components/EventLocationWidget/EventMap.js +0 -28
  469. package/lib/esm/components/EventLocationWidget/EventMap.d.ts +0 -8
  470. package/lib/esm/components/EventLocationWidget/EventMap.js +0 -25
  471. package/lib/umd/484.js +0 -2
  472. package/lib/umd/484.js.LICENSE.txt +0 -9
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventsChipRoot = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  const jsx_runtime_1 = require("react/jsx-runtime");
5
6
  const material_1 = require("@mui/material");
@@ -45,10 +46,10 @@ const Root = (0, material_1.styled)(material_1.Box, {
45
46
  name: constants_1.PREFIX,
46
47
  slot: 'Root'
47
48
  })(() => ({}));
48
- const EventsChipRoot = (0, material_1.styled)(material_1.Chip, {
49
+ exports.EventsChipRoot = (0, material_1.styled)(material_1.Chip, {
49
50
  name: constants_1.PREFIX,
50
51
  slot: 'EventsChipRoot',
51
- shouldForwardProp: (prop) => prop !== 'showFollowed'
52
+ shouldForwardProp: (prop) => prop !== 'showFollowed' && prop !== 'showPastEvents' && prop !== 'showOngoingEvents'
52
53
  })(() => ({}));
53
54
  /**
54
55
  * > API documentation for the Community-JS Events component. Learn about the available props and the CSS API.
@@ -222,24 +223,18 @@ function Events(inProps) {
222
223
  /**
223
224
  * Renders events list
224
225
  */
225
- const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 2 }, { children: filters ? (filters) : showUserEvents ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(EventsChipRoot, { color: showMyEvents ? 'secondary' : 'default', variant: showMyEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByCreatedByMe", defaultMessage: "ui.events.filterByCreatedByMe" }), onClick: () => setShowMyEvents(!showMyEvents),
226
+ const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : showUserEvents ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.EventsChipRoot, { color: showMyEvents ? 'secondary' : 'default', variant: showMyEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByCreatedByMe", defaultMessage: "ui.events.filterByCreatedByMe" }), onClick: () => setShowMyEvents(!showMyEvents),
226
227
  // @ts-expect-error this is needed to use showFollowed into SCEvents
227
- showFollowed: showMyEvents, deleteIcon: showMyEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMyEvents ? () => setShowMyEvents(false) : null, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(PastEventsFilter_1.default, { showPastEvents: showPastEvents, handleClick: handleChipPastClick, handleDeleteClick: handleDeletePastClick, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) }))] })) : general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: "small", fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByName", defaultMessage: "ui.events.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
228
+ showFollowed: showMyEvents, deleteIcon: showMyEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMyEvents ? () => setShowMyEvents(false) : null, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(PastEventsFilter_1.default, { showPastEvents: showPastEvents, handleClick: handleChipPastClick, handleDeleteClick: handleDeletePastClick, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 2 }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) }))] })) : general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByName", defaultMessage: "ui.events.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
228
229
  e.preventDefault();
229
230
  if (e.key === 'Enter') {
230
231
  fetchEvents();
231
232
  }
232
- }, slotProps: {
233
- input: {
234
- endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => fetchEvents(), disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchEvents(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading })) })))
235
- }
236
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) }), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ disabled: showOngoingEvents || loading, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select", slotProps: {
237
- input: {
238
- 'aria-label': `${option.label}`
239
- }
240
- } }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
233
+ }, InputProps: {
234
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => fetchEvents(), disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchEvents(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading })) })))
235
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 2 }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) }), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ disabled: showOngoingEvents || loading, size: 'small', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select", inputProps: { 'aria-label': option.label } }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 2 }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
241
236
  // @ts-expect-error this is needed to use showFollowed into SCEvents
242
- showFollowed: showFollowed, deleteIcon: showFollowed ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showFollowed ? handleDeleteClick : null, disabled: loading }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(OngoingEventsFilter_1.default, { showOngoingEvents: showOngoingEvents, handleClick: handleChipOngoingClick, handleDeleteClick: handleDeleteOngoingClick, disabled: dateSearch !== types_1.SCEventDateFilterType.ALL || loading }) }))] })) : null }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({}, EventsSkeletonComponentProps, { EventSkeletonProps: EventSkeletonComponentProps }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !events.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (onlyStaffEnabled && react_core_1.UserUtils.isStaff(scUserContext.user)) || !onlyStaffEnabled ? ((0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({}, CreateEventButtonProps))) : null })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title", defaultMessage: "ui.events.noEvents.title" }) }))] })) : showUserEvents ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title.personal", defaultMessage: "ui.events.noEvents.title.personal" }) })) })) : null }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 2 }, className: classes.events }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [events.map((event) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.default, Object.assign({ event: event, eventId: event.id }, EventComponentProps)) }), event.id))), authUserId && events.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.itemSkeleton }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({ variant: "outlined", color: "primary", size: "small" }, CreateEventButtonProps, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.skeleton.action.add", defaultMessage: "ui.events.skeleton.action.add" }) })) })) }), "skeleton-item"))] }) })), Boolean(next) && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleNext, className: classes.showMore }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.button.seeMore", defaultMessage: "ui.events.button.seeMore" }) })))] })) })) })] }));
237
+ showFollowed: showFollowed, deleteIcon: showFollowed ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showFollowed ? handleDeleteClick : null, disabled: loading }) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(OngoingEventsFilter_1.default, { showOngoingEvents: showOngoingEvents, handleClick: handleChipOngoingClick, handleDeleteClick: handleDeleteOngoingClick, disabled: dateSearch !== types_1.SCEventDateFilterType.ALL || loading }) }))] })) : null }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({}, EventsSkeletonComponentProps, { EventSkeletonProps: EventSkeletonComponentProps }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !events.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (onlyStaffEnabled && react_core_1.UserUtils.isStaff(scUserContext.user)) || !onlyStaffEnabled ? ((0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({}, CreateEventButtonProps))) : null })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title", defaultMessage: "ui.events.noEvents.title" }) }))] })) : showUserEvents ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title.personal", defaultMessage: "ui.events.noEvents.title.personal" }) })) })) : null }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 2 }, className: classes.events }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [events.map((event) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.default, Object.assign({ event: event, eventId: event.id }, EventComponentProps)) }), event.id))), authUserId && events.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, className: classes.itemSkeleton }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({ variant: "outlined", color: "primary", size: "small" }, CreateEventButtonProps, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.skeleton.action.add", defaultMessage: "ui.events.skeleton.action.add" }) })) })) }), 'skeleton-item'))] }) })), Boolean(next) && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleNext, className: classes.showMore }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.button.seeMore", defaultMessage: "ui.events.button.seeMore" }) })))] })) })) })] }));
243
238
  /**
244
239
  * Renders root object (if content availability community option is false and user is anonymous, component is hidden)
245
240
  */
@@ -39,10 +39,6 @@ function LocationEventsFilter(inProps) {
39
39
  if (autoHide) {
40
40
  return null;
41
41
  }
42
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByLocation", defaultMessage: "ui.events.filterByLocation" }) }), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ disabled: disabled, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.location", defaultMessage: "ui.events.location" }), value: value, onChange: handleOnChange, renderValue: (selected) => locationOptions.find((option) => option.value === selected).label }, { children: locationOptions.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: value === option.value, value: option.value, name: "radio-button-select", slotProps: {
43
- input: {
44
- 'aria-label': `${option.label}`
45
- }
46
- } }), option.label] }), option.value))) }))] })));
42
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByLocation", defaultMessage: "ui.events.filterByLocation" }) }), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ disabled: disabled, size: 'small', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.location", defaultMessage: "ui.events.location" }), value: value, onChange: handleOnChange, renderValue: (selected) => locationOptions.find((option) => option.value === selected).label }, { children: locationOptions.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: value === option.value, value: option.value, name: "radio-button-select", inputProps: { 'aria-label': option.label } }), option.label] }), option.value))) }))] })));
47
43
  }
48
44
  exports.default = LocationEventsFilter;
@@ -5,11 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_intl_1 = require("react-intl");
7
7
  const constants_1 = require("./constants");
8
- const EventsChipRoot = (0, material_1.styled)(material_1.Chip, {
9
- name: constants_1.PREFIX,
10
- slot: 'EventsChipRoot',
11
- shouldForwardProp: (prop) => prop !== 'showOngoingEvents'
12
- })(() => ({}));
8
+ const Events_1 = require("./Events");
13
9
  function OngoingEventsFilter(inProps) {
14
10
  // PROPS
15
11
  const props = (0, material_1.useThemeProps)({
@@ -20,7 +16,7 @@ function OngoingEventsFilter(inProps) {
20
16
  if (autoHide) {
21
17
  return null;
22
18
  }
23
- return ((0, jsx_runtime_1.jsx)(EventsChipRoot, Object.assign({ color: showOngoingEvents ? 'secondary' : 'default', variant: showOngoingEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByOngoingEvents", defaultMessage: "ui.events.filterByOngoingEvents" }), onClick: handleClick,
19
+ return ((0, jsx_runtime_1.jsx)(Events_1.EventsChipRoot, Object.assign({ color: showOngoingEvents ? 'secondary' : 'default', variant: showOngoingEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByOngoingEvents", defaultMessage: "ui.events.filterByOngoingEvents" }), onClick: handleClick,
24
20
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
25
21
  // @ts-ignore
26
22
  showOngoingEvents: showOngoingEvents, deleteIcon: showOngoingEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showOngoingEvents ? handleDeleteClick : undefined }, rest)));
@@ -5,11 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_intl_1 = require("react-intl");
7
7
  const constants_1 = require("./constants");
8
- const EventsChipRoot = (0, material_1.styled)(material_1.Chip, {
9
- name: constants_1.PREFIX,
10
- slot: 'EventsChipRoot',
11
- shouldForwardProp: (prop) => prop !== 'showPastEvents'
12
- })(() => ({}));
8
+ const Events_1 = require("./Events");
13
9
  function PastEventsFilter(inProps) {
14
10
  // PROPS
15
11
  const props = (0, material_1.useThemeProps)({
@@ -20,7 +16,7 @@ function PastEventsFilter(inProps) {
20
16
  if (autoHide) {
21
17
  return null;
22
18
  }
23
- return ((0, jsx_runtime_1.jsx)(EventsChipRoot, Object.assign({ color: showPastEvents ? 'secondary' : 'default', variant: showPastEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByPastEvents", defaultMessage: "ui.events.filterByPastEvents" }), onClick: handleClick,
19
+ return ((0, jsx_runtime_1.jsx)(Events_1.EventsChipRoot, Object.assign({ color: showPastEvents ? 'secondary' : 'default', variant: showPastEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByPastEvents", defaultMessage: "ui.events.filterByPastEvents" }), onClick: handleClick,
24
20
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
25
21
  // @ts-ignore
26
22
  showPastEvents: showPastEvents, deleteIcon: showPastEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showPastEvents ? handleDeleteClick : undefined }, rest)));
@@ -38,6 +38,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
38
38
  */
39
39
  function EventsSkeleton(inProps) {
40
40
  const { className, EventSkeletonProps = {}, eventsNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {} } = inProps, rest = tslib_1.__rest(inProps, ["className", "EventSkeletonProps", "eventsNumber", "GridContainerComponentProps", "GridItemComponentProps"]);
41
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.events }, GridContainerComponentProps, { children: [...Array(eventsNumber)].map((_event, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 } }, GridItemComponentProps, { className: classes.item }, { children: (0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonProps)) }), index))) })) })));
41
+ 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.events }, GridContainerComponentProps, { children: [...Array(eventsNumber)].map((event, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6 }, GridItemComponentProps, { className: classes.item }, { children: (0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonProps)) }), index))) })) })));
42
42
  }
43
43
  exports.default = EventsSkeleton;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // @ts-nocheck
5
6
  const react_1 = tslib_1.__importStar(require("react"));
6
7
  const react_core_1 = require("@selfcommunity/react-core");
7
8
  const material_1 = require("@mui/material");
@@ -92,11 +93,11 @@ const Feed = (inProps, ref) => {
92
93
  const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
93
94
  // CONST
94
95
  const authUserId = scUserContext.user ? scUserContext.user.id : null;
95
- const limit = +(0, react_1.useMemo)(() => endpointQueryParams.limit || Pagination_1.DEFAULT_PAGINATION_LIMIT, [endpointQueryParams]);
96
+ const limit = (0, react_1.useMemo)(() => endpointQueryParams.limit || Pagination_1.DEFAULT_PAGINATION_LIMIT, [endpointQueryParams]);
96
97
  const offset = (0, react_1.useMemo)(() => {
97
98
  if (prefetchedData) {
98
- const currentOffset = +(0, utils_1.getQueryStringParameter)(prefetchedData.previous, 'offset') || 0;
99
- return prefetchedData.previous ? currentOffset + limit : 0;
99
+ const currentOffset = (0, utils_1.getQueryStringParameter)(prefetchedData.previous, 'offset') || 0;
100
+ return prefetchedData.previous ? parseInt(currentOffset) + limit : 0;
100
101
  }
101
102
  return endpointQueryParams.offset || 0;
102
103
  }, [endpointQueryParams, prefetchedData]);
@@ -290,10 +291,10 @@ const Feed = (inProps, ref) => {
290
291
  }, [feedDataObject.componentLoaded, setHeadData, setFeedDataLeft, setFeedDataRight]);
291
292
  /**
292
293
  * Callback subscribe events
293
- * @param _msg
294
+ * @param msg
294
295
  * @param data
295
296
  */
296
- const subscriber = (_msg, data) => {
297
+ const subscriber = (msg, data) => {
297
298
  if (data.refresh) {
298
299
  refresh();
299
300
  }
@@ -400,8 +401,8 @@ const Feed = (inProps, ref) => {
400
401
  setHeadData([...[data], ...headData]);
401
402
  if (syncPagination) {
402
403
  // Adding an element, re-sync next and previous of feedDataObject
403
- const nextOffset = (parseInt((0, utils_1.getQueryStringParameter)(feedDataObject.next, 'offset')) || feedDataObject.results.length - 1) + 1;
404
- const previousOffset = (parseInt((0, utils_1.getQueryStringParameter)(feedDataObject.previous, 'offset')) || +offset) + 1;
404
+ const nextOffset = parseInt((0, utils_1.getQueryStringParameter)(feedDataObject.next, 'offset') || feedDataObject.results.length - 1) + 1;
405
+ const previousOffset = parseInt((0, utils_1.getQueryStringParameter)(feedDataObject.previous, 'offset') || offset) + 1;
405
406
  feedDataObject.updateState({
406
407
  previous: (0, utils_1.updateQueryStringParameter)(feedDataObject.previous, 'offset', previousOffset),
407
408
  next: (0, utils_1.updateQueryStringParameter)(feedDataObject.next, 'offset', nextOffset),
@@ -428,8 +429,8 @@ const Feed = (inProps, ref) => {
428
429
  return ((0, jsx_runtime_1.jsx)(VirtualizedScroller_1.VirtualScrollChild, Object.assign({ onHeightChange: onItemHeightChange }, { children: item.type === 'widget' ? ((0, jsx_runtime_1.jsx)(item.component, Object.assign({ id: `${Feed_1.WIDGET_PREFIX_KEY}${item.position}` }, item.componentProps, (item.publishEvents && { publicationChannel: id }), savedState, { onStateChange: onItemStateChange, onHeightChange: onItemHeightChange }))) : ((0, jsx_runtime_1.jsx)(ItemComponent, Object.assign({ id: `item_${itemIdGenerator(item)}` }, itemPropsGenerator(scUserContext.user, item), ItemProps, { sx: { width: '100%' } }, savedState, { onStateChange: onItemStateChange, onHeightChange: onItemHeightChange }))) })));
429
430
  }, [authUserId]);
430
431
  if (feedDataObject.isLoadingNext && !feedDataLeft.length) {
431
- return ((0, jsx_runtime_1.jsx)(Skeleton_2.default, { children: [...Array(3)].map((_v, i) => ((0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps), i))) }));
432
+ return ((0, jsx_runtime_1.jsx)(Skeleton_2.default, { children: [...Array(3)].map((v, i) => ((0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps), i))) }));
432
433
  }
433
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", spacing: 2, id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(CustomAdv_1.default, Object.assign({ position: types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: (0, jsx_runtime_1.jsxs)(InfiniteScroll_1.default, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.end }, { children: [(0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: endMessage }) })), FooterComponent ? (0, jsx_runtime_1.jsx)(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, (0, jsx_runtime_1.jsx)(VirtualizedScroller_1.default, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: react_core_1.SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: react_core_1.SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: (0, jsx_runtime_1.jsx)(StickyBox_1.default, Object.assign({ className: classes.right }, FeedSidebarProps, { children: (0, jsx_runtime_1.jsx)(react_1.default.Suspense, Object.assign({ fallback: (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => ((0, jsx_runtime_1.jsx)(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
434
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, spacing: 2, id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(CustomAdv_1.default, Object.assign({ position: types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 7 }, { children: (0, jsx_runtime_1.jsxs)(InfiniteScroll_1.default, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: '90%', endMessage: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.end }, { children: [(0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: endMessage }) })), FooterComponent ? (0, jsx_runtime_1.jsx)(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, (0, jsx_runtime_1.jsx)(VirtualizedScroller_1.default, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: react_core_1.SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: react_core_1.SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && ((0, jsx_runtime_1.jsx)(material_1.Hidden, Object.assign({ smDown: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 5 }, { children: (0, jsx_runtime_1.jsx)(StickyBox_1.default, Object.assign({ className: classes.right }, FeedSidebarProps, { children: (0, jsx_runtime_1.jsx)(react_1.default.Suspense, Object.assign({ fallback: (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => ((0, jsx_runtime_1.jsx)(d.component, Object.assign({}, d.componentProps), i))) })) })) })) })))] })));
434
435
  };
435
436
  exports.default = (0, react_1.forwardRef)(Feed);
@@ -41,6 +41,6 @@ const Root = (0, material_1.styled)(material_1.Grid, {
41
41
  function FeedSkeleton(props) {
42
42
  // PROPS
43
43
  const { children = ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } })] })), sidebar = ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, { sx: { mb: 2 } })] })), className } = props;
44
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", spacing: 2, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.left }, { children: children })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.right }, { children: sidebar })) }))] })));
44
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, spacing: 2, className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 7 }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.left }, { children: children })) })), (0, jsx_runtime_1.jsx)(material_1.Hidden, Object.assign({ smDown: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 5 }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: classes.right }, { children: sidebar })) })) }))] })));
45
45
  }
46
46
  exports.default = FeedSkeleton;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
+ const material_2 = require("@mui/material");
6
7
  const Vote_1 = tslib_1.__importDefault(require("./Vote"));
7
8
  const Comment_1 = tslib_1.__importDefault(require("./Comment"));
8
9
  const Share_1 = tslib_1.__importDefault(require("./Share"));
@@ -14,7 +15,7 @@ const classes = {
14
15
  root: `${constants_1.PREFIX}-actions-root`,
15
16
  action: `${constants_1.PREFIX}-actions-action`
16
17
  };
17
- const Root = (0, material_1.styled)(material_1.Grid, {
18
+ const Root = (0, material_1.styled)(material_2.Grid, {
18
19
  name: constants_1.PREFIX,
19
20
  slot: 'ActionsRoot'
20
21
  })(() => ({}));
@@ -43,6 +44,6 @@ function Actions(props) {
43
44
  * Renders action section
44
45
  */
45
46
  const columnWidth = getColumnWidth();
46
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", className: (0, classnames_1.default)(classes.root, className) }, { children: [!hideVoteAction && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Vote_1.default, Object.assign({ feedObjectId: feedObjectId || obj.id, feedObject: obj, feedObjectType: feedObjectType || obj.type }, VoteActionProps)) }))), !hideCommentAction && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Comment_1.default, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, feedObjectTemplate: feedObjectTemplate, onCommentAction: handleExpandActivities }, CommentActionProps)) }))), !hideShareAction && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Share_1.default, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, id: feedObjectId }, ShareActionProps)) })))] })));
47
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, className: (0, classnames_1.default)(classes.root, className) }, { children: [!hideVoteAction && ((0, jsx_runtime_1.jsx)(material_2.Grid, Object.assign({ item: true, xs: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Vote_1.default, Object.assign({ feedObjectId: feedObjectId || obj.id, feedObject: obj, feedObjectType: feedObjectType || obj.type }, VoteActionProps)) }))), !hideCommentAction && ((0, jsx_runtime_1.jsx)(material_2.Grid, Object.assign({ item: true, xs: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Comment_1.default, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, feedObjectTemplate: feedObjectTemplate, onCommentAction: handleExpandActivities }, CommentActionProps)) }))), !hideShareAction && ((0, jsx_runtime_1.jsx)(material_2.Grid, Object.assign({ item: true, xs: columnWidth, className: classes.action }, { children: (0, jsx_runtime_1.jsx)(Share_1.default, Object.assign({ feedObject: obj, feedObjectType: feedObjectType, id: feedObjectId }, ShareActionProps)) })))] })));
47
48
  }
48
49
  exports.default = Actions;
@@ -36,7 +36,7 @@ function Comment(props) {
36
36
  // PROPS
37
37
  const { className, feedObjectId, feedObject, feedObjectType = types_1.SCContributionType.POST, feedObjectTemplate = feedObject_1.SCFeedObjectTemplateType, withAction = true, withAudience = true, inlineAction = false, onViewCommentsAction, onCommentAction } = props, rest = tslib_1.__rest(props, ["className", "feedObjectId", "feedObject", "feedObjectType", "feedObjectTemplate", "withAction", "withAudience", "inlineAction", "onViewCommentsAction", "onCommentAction"]);
38
38
  // STATE
39
- const { obj } = (0, react_core_1.useSCFetchFeedObject)({ id: feedObjectId, feedObject, feedObjectType });
39
+ const { obj, setObj } = (0, react_core_1.useSCFetchFeedObject)({ id: feedObjectId, feedObject, feedObjectType });
40
40
  // CONTEXT
41
41
  const scRoutingContext = (0, react_core_1.useSCRouting)();
42
42
  // INTL
@@ -52,7 +52,7 @@ function Comment(props) {
52
52
  audience = ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", disabled: true, color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 18, width: 50 }) })));
53
53
  }
54
54
  else {
55
- audience = ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: onViewCommentsAction ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: onViewCommentsAction, color: "inherit" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: feedObjectTemplate === feedObject_1.SCFeedObjectTemplateType.DETAIL ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", component: react_core_1.Link, to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(obj), (0, contribution_1.getRouteData)(obj)), classes: { root: classes.viewAudienceButton } }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) })) }));
55
+ audience = ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: onViewCommentsAction ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: onViewCommentsAction, color: "inherit" }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: feedObjectTemplate === feedObject_1.SCFeedObjectTemplateType.DETAIL ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body2' }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", component: react_core_1.Link, to: scRoutingContext.url((0, contribution_1.getContributionRouteName)(obj), (0, contribution_1.getRouteData)(obj)), classes: { root: classes.viewAudienceButton } }, { children: `${intl.formatMessage(messages.comments, { total: obj.comment_count })}` }))) })) }));
56
56
  }
57
57
  }
58
58
  return audience;
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_intl_1 = require("react-intl");
7
+ const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
7
8
  const material_1 = require("@mui/material");
8
9
  const Errors_1 = require("../../../../constants/Errors");
9
10
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
@@ -62,7 +63,7 @@ function Follow(props) {
62
63
  else {
63
64
  setIsFollowing(true);
64
65
  performFollow()
65
- .then(() => {
66
+ .then((data) => {
66
67
  const isFollow = !obj.followed;
67
68
  setObj(Object.assign({}, obj, { followed: isFollow }));
68
69
  setIsFollowing(false);
@@ -89,7 +90,7 @@ function Follow(props) {
89
90
  if (obj.followed) {
90
91
  btnLabel = (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.unfollow", defaultMessage: "ui.feedObject.unfollow" });
91
92
  }
92
- return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: scUserContext.user && obj.author.id !== scUserContext.user.id && !obj.deleted && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: btnLabel }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: (0, classnames_1.default)(classes.button, { [classes.iconized]: iconized, [classes.followed]: obj.followed }), loading: isFollowing, variant: iconized ? 'text' : 'contained', disabled: isFollowing, onClick: follow }, { children: iconized ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: obj.followed ? 'bookmark_added' : 'bookmark_border' }) : btnLabel })) }))) }));
93
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: scUserContext.user && obj.author.id !== scUserContext.user.id && !obj.deleted && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: btnLabel }, { children: (0, jsx_runtime_1.jsx)(LoadingButton_1.default, Object.assign({ className: (0, classnames_1.default)(classes.button, { [classes.iconized]: iconized, [classes.followed]: obj.followed }), loading: isFollowing, variant: iconized ? 'text' : 'contained', disabled: isFollowing, onClick: follow }, { children: iconized ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: obj.followed ? 'bookmark_added' : 'bookmark_border' }) : btnLabel })) }))) }));
93
94
  }
94
95
  /**
95
96
  * Renders share action
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_intl_1 = require("react-intl");
7
+ const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
7
8
  const SharesDialog_1 = tslib_1.__importDefault(require("./SharesDialog"));
8
9
  const material_1 = require("@mui/material");
9
10
  const Media_1 = require("../../../../constants/Media");
@@ -194,7 +195,7 @@ function Share(props) {
194
195
  * @return {JSX.Element}
195
196
  */
196
197
  function renderShareBtn() {
197
- return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: withAction && ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [!inlineAction && withAudience && (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.divider }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: `${intl.formatMessage(messages.share)}` }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: isSharing, onClick: handleOpenShareMenu, className: classes.button }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "share" }) })) })), Boolean(anchorEl) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !isMobile ? ((0, jsx_runtime_1.jsx)(material_1.Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, slotProps: {
198
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: withAction && ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [!inlineAction && withAudience && (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.divider }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: `${intl.formatMessage(messages.share)}` }, { children: (0, jsx_runtime_1.jsx)(LoadingButton_1.default, Object.assign({ loading: isSharing, onClick: handleOpenShareMenu, className: classes.button }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "share" }) })) })), Boolean(anchorEl) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !isMobile ? ((0, jsx_runtime_1.jsx)(material_1.Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, slotProps: {
198
199
  paper: {
199
200
  elevation: 0,
200
201
  sx: {
@@ -69,32 +69,30 @@ function ActivitiesMenu(props) {
69
69
  };
70
70
  };
71
71
  function renderMenuContent() {
72
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [!hideRelevantActivitiesItem && ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.relevantActivities) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.relevantActivitiesDesc", defaultMessage: "ui.feedObject.activitiesMenu.relevantActivitiesDesc" }) }) }))), (0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.RECENT_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.RECENT_COMMENTS) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.recentComments) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.recentCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.recentCommentsDesc" }) }) })), (0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.FIRST_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.FIRST_COMMENTS) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.firstComments) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.firstCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.firstCommentsDesc" }) }) })), scUserContext.user && ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS) }, { children: (followEnabled || connectionEnabled) && ((0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: followEnabled ? intl.formatMessage(messages.followedComments) : intl.formatMessage(messages.connectionsComments) }), secondary: followEnabled ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.followedCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.followedCommentsDesc" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.connectionsCommentsDesc", defaultMessage: "ui.feedObject.activitiesMenu.connectionsCommentsDesc" })) })) })))] }));
72
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [!hideRelevantActivitiesItem && ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.RELEVANCE_ACTIVITIES) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.relevantActivities) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.activitiesMenu.relevantActivitiesDesc', defaultMessage: 'ui.feedObject.activitiesMenu.relevantActivitiesDesc' }) }) }))), (0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.RECENT_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.RECENT_COMMENTS) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.recentComments) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.activitiesMenu.recentCommentsDesc', defaultMessage: 'ui.feedObject.activitiesMenu.recentCommentsDesc' }) }) })), (0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.FIRST_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.FIRST_COMMENTS) }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: intl.formatMessage(messages.firstComments) }), secondary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.activitiesMenu.firstCommentsDesc', defaultMessage: 'ui.feedObject.activitiesMenu.firstCommentsDesc' }) }) })), scUserContext.user && ((0, jsx_runtime_1.jsx)(material_1.ListItemButton, Object.assign({ selected: selectedActivities === feedObject_1.SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS, onClick: handleChangeActivitiesType(feedObject_1.SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS) }, { children: (followEnabled || connectionEnabled) && ((0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)("b", { children: followEnabled ? intl.formatMessage(messages.followedComments) : intl.formatMessage(messages.connectionsComments) }), secondary: followEnabled ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.activitiesMenu.followedCommentsDesc', defaultMessage: 'ui.feedObject.activitiesMenu.followedCommentsDesc' })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.activitiesMenu.connectionsCommentsDesc', defaultMessage: 'ui.feedObject.activitiesMenu.connectionsCommentsDesc' })) })) })))] }));
73
73
  }
74
74
  /**
75
75
  * Renders root object
76
76
  */
77
77
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.selector }, { children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.activitiesMenu.tooltipTitle", defaultMessage: "ui.feedObject.activitiesMenu.tooltipTitle" }) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handleOpen }, { children: [selectedActivities === feedObject_1.SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS && followEnabled
78
78
  ? intl.formatMessage(messages.followedComments)
79
- : intl.formatMessage(messages[`${(0, utils_1.camelCase)(selectedActivities)}`]), "\u00A0 ", (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] })) })) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderMenuContent() }))) : ((0, jsx_runtime_1.jsx)(material_1.Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, slotProps: {
80
- paper: {
81
- elevation: 0,
82
- sx: {
83
- overflow: 'visible',
84
- filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
85
- mt: 1.5,
86
- '&:before': {
87
- content: '""',
88
- display: 'block',
89
- position: 'absolute',
90
- top: 0,
91
- right: 14,
92
- width: 10,
93
- height: 10,
94
- bgcolor: 'background.paper',
95
- transform: 'translateY(-50%) rotate(45deg)',
96
- zIndex: 0
97
- }
79
+ : intl.formatMessage(messages[`${(0, utils_1.camelCase)(selectedActivities)}`]), "\u00A0 ", (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] })) })) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderMenuContent() }))) : ((0, jsx_runtime_1.jsx)(material_1.Menu, Object.assign({ anchorEl: anchorEl, open: true, onClose: handleClose, onClick: handleClose, PaperProps: {
80
+ elevation: 0,
81
+ sx: {
82
+ overflow: 'visible',
83
+ filter: 'drop-shadow(0px 2px 8px rgba(0,0,0,0.32))',
84
+ mt: 1.5,
85
+ '&:before': {
86
+ content: '""',
87
+ display: 'block',
88
+ position: 'absolute',
89
+ top: 0,
90
+ right: 14,
91
+ width: 10,
92
+ height: 10,
93
+ bgcolor: 'background.paper',
94
+ transform: 'translateY(-50%) rotate(45deg)',
95
+ zIndex: 0
98
96
  }
99
97
  }
100
98
  }, transformOrigin: { horizontal: 'right', vertical: 'top' }, anchorOrigin: { horizontal: 'right', vertical: 'bottom' } }, { children: renderMenuContent() }))) }))] })));
@@ -46,7 +46,7 @@ function CommentRelevantActivity(props) {
46
46
  // const summaryHtml = getContributionHtml(commentHtml, scRoutingContext.url);
47
47
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({}, rest, { className: (0, classnames_1.default)(classes.root, className), image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: activityObject.author.username, variant: "circular", src: activityObject.author.avatar, className: classes.avatar }) })), primary: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: intl.formatMessage(messages.comment, {
48
48
  username: ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!activityObject.author.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, activityObject.author) }), { onClick: activityObject.author.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: activityObject.author.username }))),
49
- link: (chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(activityObject.comment)) }, { children: chunks }), "ui.feedObject.relevantActivities.comment.link"))
49
+ link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COMMENT_ROUTE_NAME, (0, contribution_1.getRouteData)(activityObject.comment)) }, { children: chunks }))
50
50
  // comment: (
51
51
  // <>
52
52
  // <Typography variant="body2" gutterBottom dangerouslySetInnerHTML={{__html: summaryHtml}} />
@@ -48,6 +48,6 @@ function RelevantActivities(props) {
48
48
  /**
49
49
  * Renders root object
50
50
  */
51
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: activities.length <= 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.relevantActivities.noResults", defaultMessage: "ui.feedObject.relevantActivities.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(material_1.List, { children: [activities.slice(0, showMaxRelevantActivities).map((a, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))), !openOtherActivities && activities.length > showMaxRelevantActivities && ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, Object.assign({ onClick: () => setOpenOtherActivities((prev) => !prev) }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.relevantActivities.showOthers", defaultMessage: "ui.feedObject.relevantActivities.showOthers" }) }), openOtherActivities ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] }))), (0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ in: openOtherActivities, timeout: "auto", unmountOnExit: true }, { children: activities.slice(showMaxRelevantActivities).map((a, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))) }))] })) })));
51
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: activities.length <= 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.relevantActivities.noResults", defaultMessage: "ui.feedObject.relevantActivities.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(material_1.List, { children: [activities.slice(0, showMaxRelevantActivities).map((a, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))), !openOtherActivities && activities.length > showMaxRelevantActivities && ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, Object.assign({ onClick: () => setOpenOtherActivities((prev) => !prev) }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.relevantActivities.showOthers', defaultMessage: 'ui.feedObject.relevantActivities.showOthers' }) }), openOtherActivities ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" })] }))), (0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ in: openOtherActivities, timeout: "auto", unmountOnExit: true }, { children: activities.slice(showMaxRelevantActivities).map((a, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, Object.assign({ className: classes.activity }, { children: renderActivity(a, i) }), i))) }))] })) })));
52
52
  }
53
53
  exports.default = RelevantActivities;
@@ -49,6 +49,6 @@ function ContributorsFeedObject(props) {
49
49
  if (!contributorsObject.feedObject) {
50
50
  return null;
51
51
  }
52
- 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.Box, { children: contributorsObject.isLoadingNext && !openContributorsDialog ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({}, ContributorsSkeletonProps))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: contributorsObject.contributors.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "text", onClick: () => setOpenContributorsDialog(true), classes: { root: classes.btnParticipants }, color: "inherit" }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.contributors.participants", defaultMessage: "ui.feedObject.contributors.participants" }), ":", (0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, Object.assign({}, rest, { children: [contributorsObject.contributors.map((c, i) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: c.username, src: c.avatar }, i))), [...Array(Math.max(contributorsObject.total - contributorsObject.contributors.length, 0))].map((x, i) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, {}, i)))] }))] })), openContributorsDialog && ((0, jsx_runtime_1.jsx)(BaseDialog_1.default, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.feedObject.contributors.title", id: "ui.feedObject.contributors.title", values: { total: contributorsObject.total } }), onClose: () => setOpenContributorsDialog(false), open: openContributorsDialog }, { children: contributorsObject.isLoadingNext ? ((0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 50 })) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: contributorsObject.contributors.length, next: contributorsObject.getNextPage(), hasMoreNext: Boolean(contributorsObject.next), loaderNext: (0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 30 }), height: 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "center", fontWeight: "bold" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.contributors.noOtherContributors", defaultMessage: "ui.feedObject.contributors.noOtherContributors" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: contributorsObject.contributors.map((c, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(User_1.default, { elevation: 0, user: c, sx: { m: 0 }, onClick: () => setOpenContributorsDialog(false) }, c.id) }, i))) }) }))) })))] })) : null })) }) })));
52
+ 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.Box, { children: contributorsObject.isLoadingNext && !openContributorsDialog ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({}, ContributorsSkeletonProps))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: contributorsObject.contributors.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "text", onClick: () => setOpenContributorsDialog(true), classes: { root: classes.btnParticipants }, color: "inherit" }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }), ":", (0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, Object.assign({}, rest, { children: [contributorsObject.contributors.map((c, i) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: c.username, src: c.avatar }, i))), [...Array(Math.max(contributorsObject.total - contributorsObject.contributors.length, 0))].map((x, i) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, {}, i)))] }))] })), openContributorsDialog && ((0, jsx_runtime_1.jsx)(BaseDialog_1.default, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.feedObject.contributors.title", id: "ui.feedObject.contributors.title", values: { total: contributorsObject.total } }), onClose: () => setOpenContributorsDialog(false), open: openContributorsDialog }, { children: contributorsObject.isLoadingNext ? ((0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 50 })) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: contributorsObject.contributors.length, next: contributorsObject.getNextPage(), hasMoreNext: Boolean(contributorsObject.next), loaderNext: (0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 30 }), height: 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "center", fontWeight: "bold" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.contributors.noOtherContributors", defaultMessage: "ui.feedObject.contributors.noOtherContributors" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: contributorsObject.contributors.map((c, i) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(User_1.default, { elevation: 0, user: c, sx: { m: 0 }, onClick: () => setOpenContributorsDialog(false) }, c.id) }, i))) }) }))) })))] })) : null })) }) })));
53
53
  }
54
54
  exports.default = ContributorsFeedObject;
@@ -37,6 +37,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
37
37
  */
38
38
  function ContributorsSkeleton(props) {
39
39
  const { className = null, AvatarGroupSkeletonProps = {} } = props, rest = tslib_1.__rest(props, ["className", "AvatarGroupSkeletonProps"]);
40
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "text", disabled: true, classes: { root: classes.btnParticipants } }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.contributors.participants", defaultMessage: "ui.feedObject.contributors.participants" }), ":", (0, jsx_runtime_1.jsx)(AvatarGroupSkeleton_1.default, Object.assign({}, props.AvatarGroupSkeletonProps))] })) })));
40
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "text", disabled: true, classes: { root: classes.btnParticipants } }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.feedObject.contributors.participants', defaultMessage: 'ui.feedObject.contributors.participants' }), ":", (0, jsx_runtime_1.jsx)(AvatarGroupSkeleton_1.default, Object.assign({}, props.AvatarGroupSkeletonProps))] })) })));
41
41
  }
42
42
  exports.default = ContributorsSkeleton;
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_core_1 = require("@selfcommunity/react-core");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_intl_1 = require("react-intl");
8
+ const lab_1 = require("@mui/lab");
8
9
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
10
  const constants_1 = require("../../constants");
10
11
  const classes = {
@@ -48,6 +49,6 @@ function Choice(props) {
48
49
  /**
49
50
  * Renders root element
50
51
  */
51
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.label }, { children: choiceObj.choice })), (0, jsx_runtime_1.jsx)(LinearProgressWithLabel, { className: classes.progress, value: renderVotes(choiceObj.vote_count, votes) }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: isVoting === choiceObj.id, variant: choiceObj.voted ? 'contained' : 'outlined', size: "small", disabled: disabled || isVoting !== null || votable || feedObject.draft, className: classes.vote, onClick: handleVoteAction }, { children: choiceObj.voted ? ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.poll.choice.vote", defaultMessage: "ui.feedObject.poll.choice.vote" })) }))] })));
52
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.label }, { children: choiceObj.choice })), (0, jsx_runtime_1.jsx)(LinearProgressWithLabel, { className: classes.progress, value: renderVotes(choiceObj.vote_count, votes) }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: isVoting === choiceObj.id, variant: choiceObj.voted ? 'contained' : 'outlined', size: "small", disabled: disabled || isVoting !== null || votable || feedObject.draft, className: classes.vote, onClick: handleVoteAction }, { children: choiceObj.voted ? ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.feedObject.poll.choice.vote", defaultMessage: "ui.feedObject.poll.choice.vote" })) }))] })));
52
53
  }
53
54
  exports.default = Choice;
@@ -59,6 +59,6 @@ exports.default = (inProps) => {
59
59
  */
60
60
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: mediaObjectTypes.map((mediaObject) => {
61
61
  const { displayProps = {} } = mediaObject;
62
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(mediaObject.displayComponent, Object.assign({ medias: medias }, displayProps, (mediaObject.name !== 'share' && { onMediaClick: handleMediaClick }))) }, mediaObject.name));
62
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(mediaObject.displayComponent, Object.assign({ medias: medias }, displayProps, { onMediaClick: handleMediaClick })) }, mediaObject.name));
63
63
  }) })));
64
64
  };
@@ -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 Errors_1 = require("../../constants/Errors");
8
+ const lab_1 = require("@mui/lab");
8
9
  const react_intl_1 = require("react-intl");
9
10
  const notistack_1 = require("notistack");
10
11
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
@@ -16,7 +17,7 @@ const PREFIX = 'SCFollowUserButton';
16
17
  const classes = {
17
18
  root: `${PREFIX}-root`
18
19
  };
19
- const FollowButton = (0, material_1.styled)(material_1.Button, {
20
+ const FollowButton = (0, material_1.styled)(lab_1.LoadingButton, {
20
21
  name: PREFIX,
21
22
  slot: 'Root',
22
23
  overridesResolver: (props, styles) => styles.root
@@ -9,6 +9,7 @@ const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
9
  const system_1 = require("@mui/system");
10
10
  const notistack_1 = require("notistack");
11
11
  const react_intl_1 = require("react-intl");
12
+ const lab_1 = require("@mui/lab");
12
13
  const utils_1 = require("@selfcommunity/utils");
13
14
  const Errors_1 = require("../../constants/Errors");
14
15
  const errors_1 = require("../../utils/errors");
@@ -17,10 +18,10 @@ const PREFIX = 'SCFriendshipUserButton';
17
18
  const classes = {
18
19
  root: `${PREFIX}-root`
19
20
  };
20
- const Root = (0, material_1.styled)(material_1.Button, {
21
+ const Root = (0, material_1.styled)(lab_1.LoadingButton, {
21
22
  name: PREFIX,
22
23
  slot: 'Root',
23
- overridesResolver: (_props, styles) => styles.root
24
+ overridesResolver: (props, styles) => styles.root
24
25
  })(() => ({}));
25
26
  // TODO: fix component
26
27
  /**
@@ -150,14 +150,6 @@ function GroupActionsMenu(inProps) {
150
150
  if (!scGroup) {
151
151
  return null;
152
152
  }
153
- 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, slotProps: {
154
- paper: {
155
- className: classes.paper
156
- }
157
- }, 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: {
158
- paper: {
159
- className: classes.paper
160
- }
161
- } }, { 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.groupActionsMenu.dialog.msg", defaultMessage: "ui.groupActionsMenu.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupActionsMenu.dialog.confirm", defaultMessage: "ui.groupActionsMenu.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog })), openEdit && (0, jsx_runtime_1.jsx)(GroupForm_1.default, { onClose: handleEditClick, group: scGroup, onSuccess: handleEditSuccess })] }));
153
+ 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.groupActionsMenu.dialog.msg", defaultMessage: "ui.groupActionsMenu.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupActionsMenu.dialog.confirm", defaultMessage: "ui.groupActionsMenu.dialog.confirm" }), onConfirm: handleDeleteThread, onClose: handleCloseDialog })), openEdit && (0, jsx_runtime_1.jsx)(GroupForm_1.default, { onClose: handleEditClick, group: scGroup, onSuccess: handleEditSuccess })] }));
162
154
  }
163
155
  exports.default = GroupActionsMenu;