@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
@@ -16,7 +16,7 @@ const classes = {
16
16
  const Root = (0, material_1.styled)(material_1.Autocomplete, {
17
17
  name: PREFIX,
18
18
  slot: 'Root',
19
- overridesResolver: (_props, styles) => styles.root
19
+ overridesResolver: (props, styles) => styles.root
20
20
  })(() => ({}));
21
21
  /**
22
22
  * > API documentation for the Community-JS Group Autocomplete component. Learn about the available props and the CSS API.
@@ -72,7 +72,7 @@ const GroupAutocomplete = (inProps) => {
72
72
  const handleClose = () => {
73
73
  setOpen(false);
74
74
  };
75
- const handleChange = (_event, value) => {
75
+ const handleChange = (event, value) => {
76
76
  setValue(value);
77
77
  };
78
78
  // Render
@@ -87,9 +87,7 @@ const GroupAutocomplete = (inProps) => {
87
87
  const parts = (0, parse_1.default)(option.name, matches);
88
88
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: "li" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.name, src: option.image_small, sx: { marginRight: 1 } }), (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: parts.map((part, index) => ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ sx: { fontWeight: part.highlight ? 700 : 400, marginRight: 0.2 } }, { children: part.text }), index))) })] })));
89
89
  }, renderInput: (params) => {
90
- return ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, TextFieldProps, { margin: "dense", slotProps: {
91
- input: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'groups', endAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isLoading && (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "inherit", size: 20 }), params.InputProps.endAdornment] })) })
92
- } })));
90
+ return ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, TextFieldProps, { margin: "dense", InputProps: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'groups', endAdornment: ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [isLoading ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "inherit", size: 20 }) : null, params.InputProps.endAdornment] })) }) })));
93
91
  } }, rest)));
94
92
  };
95
93
  exports.default = GroupAutocomplete;
@@ -10,6 +10,7 @@ const react_core_1 = require("@selfcommunity/react-core");
10
10
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
11
  const constants_1 = require("./constants");
12
12
  const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
13
+ const lab_1 = require("@mui/lab");
13
14
  const ChangeGroupPicture_1 = tslib_1.__importDefault(require("../ChangeGroupPicture"));
14
15
  const ChangeGroupCover_1 = tslib_1.__importDefault(require("../ChangeGroupCover"));
15
16
  const Group_1 = require("../../constants/Group");
@@ -248,31 +249,41 @@ function GroupForm(inProps) {
248
249
  /**
249
250
  * Renders root object
250
251
  */
251
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, title: group ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.title.edit", defaultMessage: "ui.groupForm.title.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.title", defaultMessage: "ui.groupForm.title" })), open: open, disableEscapeKeyDown: true, onClose: handleClose, className: (0, classnames_1.default)(classes.root, className), actions: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
252
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, title: group ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.title.edit", defaultMessage: "ui.groupForm.title.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.title", defaultMessage: "ui.groupForm.title" })), open: open, disableEscapeKeyDown: true, onClose: handleClose, className: (0, classnames_1.default)(classes.root, className), actions: (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
252
253
  Object.keys(error).length !== 0 ||
253
254
  field.name.length > Group_1.GROUP_TITLE_MAX_LENGTH ||
254
- field.name.description > Group_1.GROUP_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: group ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.button.edit", defaultMessage: "ui.groupForm.button.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.button.create", defaultMessage: "ui.groupForm.button.create" })) })) }, rest, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.avatar }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { children: field.imageOriginal ? (0, jsx_runtime_1.jsx)("img", { src: field.imageOriginal, alt: "avatar" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "icon_image" }) }) })), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ChangeGroupPicture_1.default, { isCreationMode: true, onChange: handleChangeAvatar }), (0, jsx_runtime_1.jsx)(ChangeGroupCover_1.default, { isCreationMode: true, onChange: handleChangeCover })] })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.header, { [classes.error]: error.emotionalImageOriginalError || error.imageOriginalError }), align: "center" }, { children: error.emotionalImageOriginalError || error.imageOriginalError ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.header.error", defaultMessage: "ui.groupForm.header.error" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.header", defaultMessage: "ui.groupForm.header" })) }))] }), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, slotProps: {
255
- input: {
256
- endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Group_1.GROUP_TITLE_MAX_LENGTH - field.name.length }))
257
- }
258
- }, error: Boolean(((_c = field === null || field === void 0 ? void 0 : field.name) === null || _c === void 0 ? void 0 : _c.length) > Group_1.GROUP_TITLE_MAX_LENGTH), helperText: ((_d = field === null || field === void 0 ? void 0 : field.name) === null || _d === void 0 ? void 0 : _d.length) > Group_1.GROUP_TITLE_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.name.error.maxLength", defaultMessage: "ui.groupForm.name.error.maxLength" })) : null }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, slotProps: {
259
- input: {
260
- endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) ? Group_1.GROUP_DESCRIPTION_MAX_LENGTH - field.description.length : Group_1.GROUP_DESCRIPTION_MAX_LENGTH })))
261
- }
255
+ field.name.description > Group_1.GROUP_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: group ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.button.edit", defaultMessage: "ui.groupForm.button.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.button.create", defaultMessage: "ui.groupForm.button.create" })) })) }, rest, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.avatar }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { children: field.imageOriginal ? (0, jsx_runtime_1.jsx)("img", { src: field.imageOriginal, alt: "avatar" }) : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "icon_image" }) }) })), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ChangeGroupPicture_1.default, { isCreationMode: true, onChange: handleChangeAvatar }), (0, jsx_runtime_1.jsx)(ChangeGroupCover_1.default, { isCreationMode: true, onChange: handleChangeCover })] })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.header, { [classes.error]: error.emotionalImageOriginalError || error.imageOriginalError }), align: "center" }, { children: error.emotionalImageOriginalError || error.imageOriginalError ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.header.error", defaultMessage: "ui.groupForm.header.error" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.header", defaultMessage: "ui.groupForm.header" })) }))] }), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, InputProps: {
256
+ endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Group_1.GROUP_TITLE_MAX_LENGTH - field.name.length }))
257
+ }, error: Boolean(((_c = field === null || field === void 0 ? void 0 : field.name) === null || _c === void 0 ? void 0 : _c.length) > Group_1.GROUP_TITLE_MAX_LENGTH), helperText: ((_d = field === null || field === void 0 ? void 0 : field.name) === null || _d === void 0 ? void 0 : _d.length) > Group_1.GROUP_TITLE_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.name.error.maxLength", defaultMessage: "ui.groupForm.name.error.maxLength" })) : null }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
258
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) ? Group_1.GROUP_DESCRIPTION_MAX_LENGTH - field.description.length : Group_1.GROUP_DESCRIPTION_MAX_LENGTH })))
262
259
  }, error: Boolean(((_f = field.description) === null || _f === void 0 ? void 0 : _f.length) > Group_1.GROUP_DESCRIPTION_MAX_LENGTH), helperText: ((_g = field.description) === null || _g === void 0 ? void 0 : _g.length) > Group_1.GROUP_DESCRIPTION_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.description.error.maxLength", defaultMessage: "ui.groupForm.description.error.maxLength" })) : null }), privateEnabled && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.privacySection }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.title", defaultMessage: "ui.groupForm.privacy.title", values: {
263
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupForm.privacy.title.b")
260
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
261
+ // @ts-ignore
262
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
264
263
  } }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: !field.isPublic }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.private", defaultMessage: "ui.groupForm.privacy.private" })] })), (0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, checked: field.isPublic, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isPublic']: !field.isPublic }))), disabled: group && group.privacy === types_1.SCGroupPrivacyType.PRIVATE }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: field.isPublic }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.public", defaultMessage: "ui.groupForm.privacy.public" })] }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.privacySectionInfo }, { children: field.isPublic ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.public.info", defaultMessage: "ui.groupForm.privacy.public.info", values: {
265
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
264
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
265
+ // @ts-ignore
266
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
266
267
  } })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: group && group.privacy === types_1.SCGroupPrivacyType.PRIVATE ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.private.info.edit", defaultMessage: "ui.groupForm.private.public.info.edit", values: {
267
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
268
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
269
+ // @ts-ignore
270
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
268
271
  } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.privacy.private.info", defaultMessage: "ui.groupForm.private.public.info", values: {
269
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
272
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
273
+ // @ts-ignore
274
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
270
275
  } })) })) }))] }))), privateEnabled && visibilityEnabled && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.visibilitySection }, { children: ((!field.isPublic && !group) || (group && !field.isPublic)) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.title", defaultMessage: "ui.groupForm.visibility.title", values: {
271
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupForm.visibility.title.b")
276
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
277
+ // @ts-ignore
278
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
272
279
  } }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: !field.isVisible }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility_off" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.hidden", defaultMessage: "ui.groupForm.visibility.hidden" })] })), (0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, checked: field.isVisible, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isVisible']: !field.isVisible }))) }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: field.isVisible }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.visible", defaultMessage: "ui.groupForm.visibility.visible" })] }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.visibilitySectionInfo }, { children: !field.isVisible ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.hidden.info", defaultMessage: "ui.groupForm.visibility.hidden.info", values: {
273
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupForm.visibility.hidden.info.b")
280
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
281
+ // @ts-ignore
282
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
274
283
  } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.visible.info", defaultMessage: "ui.groupForm.visibility.visible.info", values: {
275
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupForm.visibility.visible.info.b")
284
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
285
+ // @ts-ignore
286
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
276
287
  } })) }))] })) })))] })), isPaymentsEnabled && isStaff && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: (0, jsx_runtime_1.jsx)(PaywallsConfigurator_1.default, Object.assign({}, (group && { contentId: group.id }), { contentType: types_1.SCContentType.GROUP, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) }))), !group && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, {}), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.inviteSection }, { children: (0, jsx_runtime_1.jsx)(GroupInviteButton_1.default, { handleInvitations: handleInviteSection }) }))] }))] }) })));
277
288
  }
278
289
  exports.default = GroupForm;
@@ -105,15 +105,25 @@ function GroupInfoWidget(inProps) {
105
105
  * Renders root object
106
106
  */
107
107
  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.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.title", defaultMessage: "ui.groupInfoWidget.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.description }, { children: scGroup.description })), privateEnabled && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.privacy }, { children: scGroup.privacy === types_1.SCGroupPrivacyType.PUBLIC ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.privacyTitle }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.privacy.public", defaultMessage: "ui.groupInfoWidget.privacy.public" })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.privacy.public.info", defaultMessage: "ui.groupInfoWidget.privacy.public.info", values: {
108
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupInfoWidget.privacy.public.info.b")
108
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
109
+ // @ts-ignore
110
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
109
111
  } }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.privacyTitle }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.privacy.private", defaultMessage: "ui.groupInfoWidget.privacy.private" })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.privacy.private.info", defaultMessage: "ui.groupInfoWidget.private.public.info", values: {
110
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupInfoWidget.private.public.info.b")
112
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
113
+ // @ts-ignore
114
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
111
115
  } }) }))] })) }))), privateEnabled && visibilityEnabled && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: scGroup.privacy === types_1.SCGroupPrivacyType.PRIVATE && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.visibility }, { children: scGroup.visible ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityTitle }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.visible", defaultMessage: "ui.groupForm.visibility.visible" })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.visible.info", defaultMessage: "ui.groupForm.visibility.visible.info", values: {
112
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupInfoWidget.private.public.info.b")
116
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
117
+ // @ts-ignore
118
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
113
119
  } }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.visibilityTitle }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility_off" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.hidden", defaultMessage: "ui.groupForm.visibility.hidden" })] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupForm.visibility.hidden.info", defaultMessage: "ui.groupForm.visibility.hidden.info", values: {
114
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupForm.visibility.hidden.info.b")
120
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
121
+ // @ts-ignore
122
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
115
123
  } }) }))] })) }))) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.date }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.date", defaultMessage: "ui.groupInfoWidget.date", values: { date: intl.formatDate(scGroup.created_at, { day: 'numeric', year: 'numeric', month: 'long' }) } }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ component: "div", className: classes.admin }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInfoWidget.admin", defaultMessage: "ui.groupInfoWidget.admin", values: {
116
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupInfoWidget.admin.b")
124
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
125
+ // @ts-ignore
126
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
117
127
  } }), (0, jsx_runtime_1.jsx)(User_1.default, { userId: (_a = scGroup === null || scGroup === void 0 ? void 0 : scGroup.managed_by) === null || _a === void 0 ? void 0 : _a.id, elevation: 0, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) })] }))] }) })));
118
128
  }
119
129
  exports.default = GroupInfoWidget;
@@ -9,6 +9,7 @@ const react_intl_1 = require("react-intl");
9
9
  const react_core_1 = require("@selfcommunity/react-core");
10
10
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
11
  const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
12
+ const lab_1 = require("@mui/lab");
12
13
  const api_services_1 = require("@selfcommunity/api-services");
13
14
  const User_1 = tslib_1.__importDefault(require("../User"));
14
15
  const Errors_1 = require("../../constants/Errors");
@@ -37,13 +38,13 @@ const classes = {
37
38
  const Root = (0, material_1.styled)(material_1.Button, {
38
39
  name: PREFIX,
39
40
  slot: 'Root',
40
- overridesResolver: (_props, styles) => styles.root
41
- })(() => ({}));
41
+ overridesResolver: (props, styles) => styles.root
42
+ })(({ theme }) => ({}));
42
43
  const DialogRoot = (0, material_1.styled)(BaseDialog_1.default, {
43
44
  name: PREFIX,
44
45
  slot: 'Root',
45
- overridesResolver: (_props, styles) => styles.dialogRoot
46
- })(() => ({}));
46
+ overridesResolver: (props, styles) => styles.dialogRoot
47
+ })(({ theme }) => ({}));
47
48
  /**
48
49
  *> API documentation for the Community-JS Group Invite Button component. Learn about the available props and the CSS API.
49
50
  *
@@ -204,7 +205,7 @@ function GroupInviteButton(inProps) {
204
205
  }
205
206
  };
206
207
  // Autocomplete Handlers
207
- const handleInputChange = (_event, value, reason) => {
208
+ const handleInputChange = (event, value, reason) => {
208
209
  switch (reason) {
209
210
  case 'input':
210
211
  setValue(value);
@@ -254,9 +255,7 @@ function GroupInviteButton(inProps) {
254
255
  /**
255
256
  * Renders root object
256
257
  */
257
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "add" }) }, rest, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton", defaultMessage: "ui.groupInviteButton" }) })), open && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, className: classes.dialogRoot, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.dialogTitle }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.title", defaultMessage: "ui.groupInviteButton.dialog.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSendInvitations, loading: isSending, disabled: !invited.length }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.button.end", defaultMessage: "ui.groupInviteButton.dialog.button.end" }) }))] }) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.dialogContent }, { children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { className: classes.autocomplete, loading: loading, size: "small", multiple: true, freeSolo: true, disableClearable: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option ? option.username : '...'), isOptionEqualToValue: (option, value) => (option ? value.id === option.id : false), renderTags: () => null, renderOption: (props, option) => ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: "li" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ ml: 1 }, { children: option.username }))] }))), renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, slotProps: {
258
- input: Object.assign(Object.assign({}, params.InputProps), { className: classes.input, startAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.icon }, { children: "search" })) })), params.InputProps.startAdornment] })) })
259
- } }))) }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.invitedBox }, { children: invited.map((option, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { avatar: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), label: option.username, onDelete: () => {
258
+ return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), onClick: handleClose, variant: scGroup ? 'contained' : 'outlined', color: scGroup ? 'secondary' : 'inherit', startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "add" }) }, rest, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton", defaultMessage: "ui.groupInviteButton" }) })), open && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, className: classes.dialogRoot, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.dialogTitle }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.title", defaultMessage: "ui.groupInviteButton.dialog.title" }) })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSendInvitations, loading: isSending, disabled: !invited.length }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.button.end", defaultMessage: "ui.groupInviteButton.dialog.button.end" }) }))] }) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.dialogContent }, { children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { className: classes.autocomplete, loading: loading, size: "small", multiple: true, freeSolo: true, disableClearable: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option ? option.username : '...'), isOptionEqualToValue: (option, value) => (option ? value.id === option.id : false), renderTags: () => null, renderOption: (props, option) => ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: "li" }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ ml: 1 }, { children: option.username }))] }))), renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, InputProps: Object.assign(Object.assign({}, params.InputProps), { className: classes.input, startAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.icon }, { children: "search" })) })), params.InputProps.startAdornment] })) }) }))) }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.invitedBox }, { children: invited.map((option, index) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { avatar: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: option.username, src: option.avatar }), label: option.username, onDelete: () => {
260
259
  handleDelete(option);
261
260
  }, style: { marginRight: 8 } }, index))) })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.suggested }, { children: [list.length !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", fontWeight: "bold" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupInviteButton.dialog.content.list", defaultMessage: "ui.groupInviteButton.dialog.content.list" }) }))), list.slice(0, 5).map((user, index) => ((0, jsx_runtime_1.jsx)(User_1.default, { elevation: 0, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), user: user, userId: user.id, buttonProps: { onClick: () => handleUserInvite(user) } }, index)))] }))] })) })))] }));
262
261
  }
@@ -133,16 +133,10 @@ function GroupSettingsIconButton(inProps) {
133
133
  ];
134
134
  }
135
135
  };
136
- 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: {
137
- paper: {
138
- className: classes.paper
139
- }
140
- }, 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: {
141
- paper: {
142
- className: classes.paper
143
- }
144
- } }, { 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.groupSettingsIconButton.dialog.msg", defaultMessage: "ui.groupSettingsIconButton.dialog.msg", values: {
145
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, "ui.groupSettingsIconButton.dialog.msg.b"),
136
+ 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.groupSettingsIconButton.dialog.msg", defaultMessage: "ui.groupSettingsIconButton.dialog.msg", values: {
137
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
138
+ // @ts-ignore
139
+ b: (...chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }),
146
140
  user: user.username,
147
141
  group: group.name
148
142
  } }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groupSettingsIconButton.dialog.confirm", defaultMessage: "ui.groupSettingsIconButton.dialog.confirm" }), onConfirm: handleRemoveUser, onClose: handleCloseDialog }))] }));
@@ -7,6 +7,7 @@ const material_1 = require("@mui/material");
7
7
  const utils_1 = require("@selfcommunity/utils");
8
8
  const react_core_1 = require("@selfcommunity/react-core");
9
9
  const types_1 = require("@selfcommunity/types");
10
+ const lab_1 = require("@mui/lab");
10
11
  const react_intl_1 = require("react-intl");
11
12
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
12
13
  const system_1 = require("@mui/system");
@@ -18,11 +19,11 @@ const PREFIX = 'SCGroupSubscribeButton';
18
19
  const classes = {
19
20
  root: `${PREFIX}-root`
20
21
  };
21
- const Root = (0, material_1.styled)(material_1.Button, {
22
+ const Root = (0, material_1.styled)(lab_1.LoadingButton, {
22
23
  name: PREFIX,
23
24
  slot: 'Root',
24
- overridesResolver: (_props, styles) => styles.root
25
- })(() => ({}));
25
+ overridesResolver: (props, styles) => styles.root
26
+ })(({ theme }) => ({}));
26
27
  const BuyButtonRoot = (0, material_1.styled)(BuyButton_1.default, {
27
28
  name: PREFIX,
28
29
  slot: 'BuyButtonRoot'
@@ -174,21 +174,21 @@ function Groups(inProps) {
174
174
  /**
175
175
  * Renders groups list
176
176
  */
177
- const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && (groups.length !== 0 || search.length !== 0) && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", direction: "row", justifyContent: "center", alignItems: "center", className: classes.filters }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, fullWidth: true, value: search, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.filterByName", defaultMessage: "ui.groups.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
177
+ const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && (groups.length !== 0 || search.length !== 0) && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, direction: "row", justifyContent: "center", alignItems: "center", className: classes.filters }, { children: filters ? (filters) : ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, fullWidth: true, value: search, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.filterByName", defaultMessage: "ui.groups.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
178
178
  e.preventDefault();
179
179
  if (e.key === 'Enter') {
180
180
  fetchGroups();
181
181
  }
182
- }, slotProps: {
183
- input: {
184
- endAdornment: ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: [search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => {
185
- setSearch('');
186
- fetchGroups('');
187
- }, disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => fetchGroups(), 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: () => fetchGroups(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading }))] })))
188
- }
182
+ }, InputProps: {
183
+ endAdornment: ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: [search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => {
184
+ setSearch('');
185
+ fetchGroups('');
186
+ }, disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => fetchGroups(), 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: () => fetchGroups(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading }))] })))
189
187
  } }) }))) }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !groups.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: search.length ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.noResults", defaultMessage: "ui.groups.noResults" }) }))) : !onlyStaffEnabled ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.noGroups.title", defaultMessage: "ui.groups.noGroups.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.noGroups.subtitle", defaultMessage: "ui.groups.noGroups.subtitle" }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.noGroups.title.onlyStaff", defaultMessage: "ui.groups.noGroups.title.onlyStaff" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.noGroups.subtitle.onlyStaff", defaultMessage: "ui.groups.noGroups.subtitle.onlyStaff" }) }))] })) }))) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: groups.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: isMobile ? (0, jsx_runtime_1.jsx)(Group_1.GroupSkeleton, {}) : (0, jsx_runtime_1.jsx)(Skeleton_1.default, { groupsNumber: 2 }), endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "div", className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.groups.endMessage", defaultMessage: "ui.groups.endMessage", values: {
188
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
189
+ // @ts-ignore
190
190
  button: (chunk) => ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleScrollUp }, { children: chunk })))
191
- } }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 2 }, className: classes.groups }, { children: groups.map((group) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: 8, md: 6 }, className: classes.item }, { children: (0, jsx_runtime_1.jsx)(Group_1.default, Object.assign({ group: group, groupId: group.id, actionRedirect: true }, GroupComponentProps)) }), group.id))) })) }))) })] }));
191
+ } }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 2 }, className: classes.groups }, { children: groups.map((group) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 8, md: 6, className: classes.item }, { children: (0, jsx_runtime_1.jsx)(Group_1.default, Object.assign({ group: group, groupId: group.id, actionRedirect: true }, GroupComponentProps)) }), group.id))) })) }))) })] }));
192
192
  // RENDER
193
193
  if (!contentAvailability && !scUserContext.user) {
194
194
  return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ ;
5
6
  const constants_1 = require("./constants");
6
7
  const material_1 = require("@mui/material");
7
8
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
@@ -37,6 +38,6 @@ const Root = (0, material_1.styled)(material_1.Box, {
37
38
  */
38
39
  function GroupsSkeleton(inProps) {
39
40
  const { className, GroupSkeletonProps = {}, groupsNumber = 20 } = inProps, rest = tslib_1.__rest(inProps, ["className", "GroupSkeletonProps", "groupsNumber"]);
40
- 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.groups }, { children: [...Array(groupsNumber)].map((_category, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: 8, md: 6 } }, { children: (0, jsx_runtime_1.jsx)(Group_1.GroupSkeleton, Object.assign({ elevation: 0, variant: "outlined" }, GroupSkeletonProps)) }), 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.groups }, { children: [...Array(groupsNumber)].map((category, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 8, md: 6 }, { children: (0, jsx_runtime_1.jsx)(Group_1.GroupSkeleton, Object.assign({ elevation: 0, variant: 'outlined' }, GroupSkeletonProps)) }), index))) })) })));
41
42
  }
42
43
  exports.default = GroupsSkeleton;
@@ -26,7 +26,7 @@ const Root = (0, material_1.styled)(Widget_1.default, {
26
26
  })(() => ({}));
27
27
  function LinearProgressWithLabel(_a) {
28
28
  var { className } = _a, props = tslib_1.__rest(_a, ["className"]);
29
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(material_1.LinearProgress, Object.assign({ variant: "determinate" }, props)), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { position: 'absolute', top: '3px', left: props.value + 2 + '%', transform: 'translateX(-50%)' } }, { children: props.subscribers !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "text.secondary" }, { children: props.subscribers }))) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 2, className: className }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.proposal", id: "ui.incubator.progressBar.proposal" }) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.collectingSubscribers", id: "ui.incubator.progressBar.collectingSubscribers" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ align: "right" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.approved", id: "ui.incubator.progressBar.approved" }) })) }))] }))] })));
29
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(material_1.LinearProgress, Object.assign({ variant: "determinate" }, props)), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { position: 'absolute', top: '3px', left: props.value + 2 + '%', transform: 'translateX(-50%)' } }, { children: props.subscribers !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "text.secondary" }, { children: props.subscribers }))) })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 2, className: className }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.proposal", id: "ui.incubator.progressBar.proposal" }) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.collectingSubscribers", id: "ui.incubator.progressBar.collectingSubscribers" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ align: "right" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.progressBar.approved", id: "ui.incubator.progressBar.approved" }) })) }))] }))] })));
30
30
  }
31
31
  /**
32
32
  * > API documentation for the Community-JS Incubator component. Learn about the available props and the CSS API.
@@ -61,7 +61,7 @@ function Incubator(inProps) {
61
61
  });
62
62
  const { incubatorId = null, incubator = null, className = null, autoHide = false, subscribeButtonProps = {}, ButtonProps = {}, detailView = false } = props, rest = tslib_1.__rest(props, ["incubatorId", "incubator", "className", "autoHide", "subscribeButtonProps", "ButtonProps", "detailView"]);
63
63
  // STATE
64
- const { scIncubator } = (0, react_core_1.useSCFetchIncubator)({ id: incubatorId, incubator });
64
+ const { scIncubator, setSCIncubator } = (0, react_core_1.useSCFetchIncubator)({ id: incubatorId, incubator });
65
65
  // CONTEXT
66
66
  const scRoutingContext = (0, react_core_1.useSCRouting)();
67
67
  const [openAlert, setOpenAlert] = (0, react_1.useState)(false);
@@ -86,8 +86,8 @@ function Incubator(inProps) {
86
86
  if (autoHide) {
87
87
  return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
88
88
  }
89
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", className: classes.name }, ButtonProps, { children: scIncubator.name })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.proposedBy", id: "ui.incubator.proposedBy", values: {
89
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", className: classes.name }, ButtonProps, { children: scIncubator.name })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubator.proposedBy", id: "ui.incubator.proposedBy", values: {
90
90
  username: ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!scIncubator.user.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scIncubator.user) }), { onClick: scIncubator.user.deleted ? () => setOpenAlert(true) : null }, { children: scIncubator.user.username })))
91
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "p", className: !detailView ? classes.slogan : null }, { children: scIncubator.slogan })), (0, jsx_runtime_1.jsx)(LinearProgressWithLabel, { className: classes.progressBar, value: renderVotes(scIncubator.subscribers_count, scIncubator.subscribers_threshold), subscribers: scIncubator.subscribers_count })] }), (0, jsx_runtime_1.jsx)(material_1.CardActions, { children: (0, jsx_runtime_1.jsx)(IncubatorSubscribeButton_1.default, Object.assign({ incubator: scIncubator }, subscribeButtonProps)) })] })), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
91
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'p', className: !detailView ? classes.slogan : null }, { children: scIncubator.slogan })), (0, jsx_runtime_1.jsx)(LinearProgressWithLabel, { className: classes.progressBar, value: renderVotes(scIncubator.subscribers_count, scIncubator.subscribers_threshold), subscribers: scIncubator.subscribers_count })] }), (0, jsx_runtime_1.jsx)(material_1.CardActions, { children: (0, jsx_runtime_1.jsx)(IncubatorSubscribeButton_1.default, Object.assign({ incubator: scIncubator }, subscribeButtonProps)) })] })), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
92
92
  }
93
93
  exports.default = Incubator;
@@ -41,6 +41,6 @@ const Root = (0, material_1.styled)(Widget_1.default, {
41
41
  *
42
42
  */
43
43
  function IncubatorSkeleton(props) {
44
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, props, { children: [(0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.primary }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "40%", variant: "text" }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.secondary }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "50%", variant: "text" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "80%", variant: "text" })] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 1, className: classes.progressBar }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "100%", variant: "rectangular" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) }))] }))] }), (0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.action }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: true, variant: "outlined", size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 50, variant: "text" }) })) }))] })));
44
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, props, { children: [(0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.primary }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "40%", variant: "text" }) })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.secondary }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "50%", variant: "text" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "80%", variant: "text" })] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 1, className: classes.progressBar }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: "100%", variant: "rectangular" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: "100%", variant: "text" }) }))] }))] }), (0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.action }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: true, variant: 'outlined', size: 'small' }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 20, width: 50, variant: "text" }) })) }))] })));
45
45
  }
46
46
  exports.default = IncubatorSkeleton;
@@ -235,7 +235,7 @@ function IncubatorDetail(inProps) {
235
235
  /**
236
236
  * Renders root element
237
237
  */
238
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: scIncubator.user.avatar, src: scIncubator.user.avatar }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.title }, { children: [`${intl.formatMessage(messages.intro, { name: scIncubator.name })}`, " "] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span" }, { children: (0, jsx_runtime_1.jsxs)(react_core_1.Link, Object.assign({}, (!scIncubator.user.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scIncubator.user) }), { onClick: scIncubator.user.deleted ? () => setOpenAlert(true) : null }, { children: ["@", scIncubator.user.username] })) }))] })] }), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: scIncubator, detailView: true, subscribeButtonProps: { onSubscribe: handleUpdates } }, IncubatorProps)), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.subscribers }, { children: loading && !scIncubator ? ((0, jsx_runtime_1.jsx)(AvatarGroupSkeleton_1.default, Object.assign({}, rest))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: total > 0 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleToggleSubscribersDialog, disabled: loading || !scIncubator }, { children: (0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, Object.assign({}, rest, { children: [subscribers.map((u) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: u.username, src: u.avatar }, u.id))), [...Array(Math.max(0, total - subscribers.length))].map((x, i // Add max to 0 to prevent creation of array with negative index during state update
239
- ) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, {}, i)))] })) }))) : null })) })), openSubscribersDialog && ((0, jsx_runtime_1.jsx)(BaseDialog_1.default, Object.assign({ title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubatorDetail.subscribersSection.title", id: "ui.incubatorDetail.subscribersSection.title" }), " (", total, ")"] }), onClose: handleToggleSubscribersDialog, open: openSubscribersDialog }, { children: loading ? ((0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 50 })) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: total, next: fetchSubscribers, hasMoreNext: next !== null, 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.incubatorDetail.subscribersSection.noMoreSubscribers", defaultMessage: "ui.incubatorDetail.subscribersSection.noMoreSubscribers" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: subscribers.map((s, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(User_1.default, { elevation: 0, user: s }, index) }, (s.id, index)))) }) }))) }))), (0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ elevation: 1, className: classes.shareCard }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.title", defaultMessage: "ui.incubatorDetail.shareSection.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.share", defaultMessage: "ui.incubatorDetail.shareSection.share" }) })), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.copyUrlForm }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.copyText, variant: "outlined", value: portal }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.copyButton, variant: "contained", onClick: copy }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.button.copy", defaultMessage: "ui.incubatorDetail.shareSection.button.copy" }) }))] })), alert && ((0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ onClose: () => setAlert(false) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.copied", defaultMessage: "ui.incubatorDetail.shareSection.copied" }) }))), isSocialShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.invite", defaultMessage: "ui.incubatorDetail.shareSection.invite" }) }))), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.shareSection }, { children: [facebookShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.FACEBOOK_SHARE + portal, 'facebook-share-dialog', 'width=626,height=436') }, { children: "facebook" }))), xShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.X_SHARE + portal, 'x-share-dialog', 'width=626,height=436') }, { children: "x" }))), linkedinShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.LINKEDIN_SHARE + portal, 'linkedin-share-dialog', 'width=626,height=436') }, { children: "linkedin" })))] }))] }) }))] }) })), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
238
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: scIncubator.user.avatar, src: scIncubator.user.avatar }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.title }, { children: [`${intl.formatMessage(messages.intro, { name: scIncubator.name })}`, " "] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span' }, { children: (0, jsx_runtime_1.jsxs)(react_core_1.Link, Object.assign({}, (!scIncubator.user.deleted && { to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scIncubator.user) }), { onClick: scIncubator.user.deleted ? () => setOpenAlert(true) : null }, { children: ["@", scIncubator.user.username] })) }))] })] }), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: scIncubator, detailView: true, subscribeButtonProps: { onSubscribe: handleUpdates } }, IncubatorProps)), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.subscribers }, { children: loading && !scIncubator ? ((0, jsx_runtime_1.jsx)(AvatarGroupSkeleton_1.default, Object.assign({}, rest))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: total > 0 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleToggleSubscribersDialog, disabled: loading || !scIncubator }, { children: (0, jsx_runtime_1.jsxs)(material_1.AvatarGroup, Object.assign({}, rest, { children: [subscribers.map((u) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: u.username, src: u.avatar }, u.id))), [...Array(Math.max(0, total - subscribers.length))].map((x, i // Add max to 0 to prevent creation of array with negative index during state update
239
+ ) => ((0, jsx_runtime_1.jsx)(material_1.Avatar, {}, i)))] })) }))) : null })) })), openSubscribersDialog && ((0, jsx_runtime_1.jsx)(BaseDialog_1.default, Object.assign({ title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.incubatorDetail.subscribersSection.title", id: "ui.incubatorDetail.subscribersSection.title" }), " (", total, ")"] }), onClose: handleToggleSubscribersDialog, open: openSubscribersDialog }, { children: loading ? ((0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 50 })) : ((0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: total, next: fetchSubscribers, hasMoreNext: next !== null, 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.incubatorDetail.subscribersSection.noMoreSubscribers", defaultMessage: "ui.incubatorDetail.subscribersSection.noMoreSubscribers" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: subscribers.map((s, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(User_1.default, { elevation: 0, user: s }, index) }, (s.id, index)))) }) }))) }))), (0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ elevation: 1, className: classes.shareCard }, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'h6' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.title", defaultMessage: "ui.incubatorDetail.shareSection.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'subtitle1' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.share", defaultMessage: "ui.incubatorDetail.shareSection.share" }) })), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.copyUrlForm }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.copyText, variant: "outlined", value: portal }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.copyButton, variant: "contained", onClick: copy }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.button.copy", defaultMessage: "ui.incubatorDetail.shareSection.button.copy" }) }))] })), alert && ((0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ onClose: () => setAlert(false) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.copied", defaultMessage: "ui.incubatorDetail.shareSection.copied" }) }))), isSocialShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'subtitle2' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorDetail.shareSection.invite", defaultMessage: "ui.incubatorDetail.shareSection.invite" }) }))), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.shareSection }, { children: [facebookShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.FACEBOOK_SHARE + portal, 'facebook-share-dialog', 'width=626,height=436') }, { children: "facebook" }))), xShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.X_SHARE + portal, 'x-share-dialog', 'width=626,height=436') }, { children: "x" }))), linkedinShareEnabled && ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ classes: { root: classes.shareMenuIcon }, fontSize: "small", onClick: () => window.open(SocialShare_1.LINKEDIN_SHARE + portal, 'linkedin-share-dialog', 'width=626,height=436') }, { children: "linkedin" })))] }))] }) }))] }) })), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
240
240
  }
241
241
  exports.default = IncubatorDetail;
@@ -11,6 +11,7 @@ const react_core_1 = require("@selfcommunity/react-core");
11
11
  const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog"));
12
12
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
13
13
  const Errors_1 = require("../../../constants/Errors");
14
+ const lab_1 = require("@mui/lab");
14
15
  const constants_1 = require("../constants");
15
16
  const messages = (0, react_intl_1.defineMessages)({
16
17
  name: {
@@ -60,7 +61,7 @@ function CreateIncubatorDialog(props) {
60
61
  slogan: slogan
61
62
  }
62
63
  })
63
- .then(() => {
64
+ .then((res) => {
64
65
  setIsSubmitting(false);
65
66
  setSubmitted(true);
66
67
  })
@@ -75,10 +76,10 @@ function CreateIncubatorDialog(props) {
75
76
  }
76
77
  let dialogContent;
77
78
  if (submitted) {
78
- dialogContent = ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle2", className: classes.submittedMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.propose.success", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.propose.success" }) })));
79
+ dialogContent = ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'subtitle2', className: classes.submittedMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.propose.success", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.propose.success" }) })));
79
80
  }
80
81
  else {
81
- dialogContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", className: classes.intro }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorsListDialog.createIncubatorDialog.intro", defaultMessage: "ui.incubatorsListDialog.createIncubatorDialog.intro" }) })), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, error: Boolean(error), className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: name, onChange: (event) => setName(event.target.value) }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, error: Boolean(error), className: classes.slogan, placeholder: `${intl.formatMessage(messages.slogan)}`, margin: "normal", value: slogan, onChange: (event) => setSlogan(event.target.value) })] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: isSubmitting, disabled: !name || Boolean(error), variant: "contained", onClick: handleSubmit }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.button", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.button" }) }))] }));
82
+ dialogContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span', className: classes.intro }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorsListDialog.createIncubatorDialog.intro", defaultMessage: "ui.incubatorsListDialog.createIncubatorDialog.intro" }) })), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, error: Boolean(error), className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: name, onChange: (event) => setName(event.target.value) }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, error: Boolean(error), className: classes.slogan, placeholder: `${intl.formatMessage(messages.slogan)}`, margin: "normal", value: slogan, onChange: (event) => setSlogan(event.target.value) })] })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: isSubmitting, disabled: !name || Boolean(error), variant: "contained", onClick: handleSubmit }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.button", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.button" }) }))] }));
82
83
  }
83
84
  // RENDER
84
85
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.title", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.title" }), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: dialogContent })));
@@ -36,12 +36,12 @@ const classes = {
36
36
  const Root = (0, material_1.styled)(Widget_1.default, {
37
37
  name: constants_1.PREFIX,
38
38
  slot: 'Root',
39
- overridesResolver: (_props, styles) => styles.root
40
- })(() => ({}));
39
+ overridesResolver: (props, styles) => styles.root
40
+ })(({ theme }) => ({}));
41
41
  const DialogRoot = (0, material_1.styled)(BaseDialog_1.default, {
42
42
  name: constants_1.PREFIX,
43
43
  slot: 'DialogRoot'
44
- })(() => ({}));
44
+ })(({ theme }) => ({}));
45
45
  /**
46
46
  * > API documentation for the Community-JS Incubator List Widget component. Learn about the available props and the CSS API.
47
47
  *
@@ -218,10 +218,10 @@ function IncubatorListWidget(inProps) {
218
218
  if (!state.initialized) {
219
219
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
220
220
  }
221
- const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.header }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.helpPopover, color: "primary", "aria-label": "info", component: "span", onClick: handleClickHelpButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "help_outline" }) })), isOpen && ((0, jsx_runtime_1.jsx)(material_1.Popover, Object.assign({ open: isOpen, anchorEl: anchorEl, onClose: handlePopoverClose, anchorOrigin: {
221
+ const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.header }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: 'h5' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" }) })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.helpPopover, color: "primary", "aria-label": "info", component: "span", onClick: handleClickHelpButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "help_outline" }) })), isOpen && ((0, jsx_runtime_1.jsx)(material_1.Popover, Object.assign({ open: isOpen, anchorEl: anchorEl, onClose: handlePopoverClose, anchorOrigin: {
222
222
  vertical: 'bottom',
223
223
  horizontal: 'right'
224
- } }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", sx: { whiteSpace: 'pre-line' } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.popover", defaultMessage: "ui.incubatorListWidget.popover" }) })) })) })))] })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.noResults", defaultMessage: "ui.incubatorListWidget.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, state.visibleItems).map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.actions }, { children: [state.count > state.visibleItems && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.ShowAll", defaultMessage: "ui.incubatorListWidget.ShowAll" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setOpenCreateIncubatorDialog(true) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.SuggestNewTopic", defaultMessage: "ui.incubatorListWidget.SuggestNewTopic" }) }))] }))] })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, DialogProps, { children: (0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: (0, jsx_runtime_1.jsx)(Incubator_1.IncubatorSkeleton, Object.assign({ elevation: 0 }, IncubatorProps)), height: isMobile ? '100vh' : 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.noMoreIncubators", defaultMessage: "ui.incubatorListWidget.noMoreIncubators" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }) })) }))), openCreateIncubatorDialog && ((0, jsx_runtime_1.jsx)(CreateIncubatorDialog_1.default, { className: classes.createDialog, open: openCreateIncubatorDialog, onClose: handleCreateIncubatorDialogClose })), openIncubatorDetailDialog && ((0, jsx_runtime_1.jsx)(IncubatorDetail_1.default, { open: openIncubatorDetailDialog, onClose: handleIncubatorDetailDialogClose, incubator: detailObj, onSubscriptionsUpdate: handleSubscriptionsUpdate }))] }));
224
+ } }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span', sx: { whiteSpace: 'pre-line' } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.popover", defaultMessage: "ui.incubatorListWidget.popover" }) })) })) })))] })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.noResults", defaultMessage: "ui.incubatorListWidget.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, state.visibleItems).map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.actions }, { children: [state.count > state.visibleItems && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.ShowAll", defaultMessage: "ui.incubatorListWidget.ShowAll" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setOpenCreateIncubatorDialog(true) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.SuggestNewTopic", defaultMessage: "ui.incubatorListWidget.SuggestNewTopic" }) }))] }))] })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.title", defaultMessage: "ui.incubatorListWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, DialogProps, { children: (0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: (0, jsx_runtime_1.jsx)(Incubator_1.IncubatorSkeleton, Object.assign({ elevation: 0 }, IncubatorProps)), height: isMobile ? '100vh' : 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorListWidget.noMoreIncubators", defaultMessage: "ui.incubatorListWidget.noMoreIncubators" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }) })) }))), openCreateIncubatorDialog && ((0, jsx_runtime_1.jsx)(CreateIncubatorDialog_1.default, { className: classes.createDialog, open: openCreateIncubatorDialog, onClose: handleCreateIncubatorDialogClose })), openIncubatorDetailDialog && ((0, jsx_runtime_1.jsx)(IncubatorDetail_1.default, { open: openIncubatorDetailDialog, onClose: handleIncubatorDetailDialogClose, incubator: detailObj, onSubscriptionsUpdate: handleSubscriptionsUpdate }))] }));
225
225
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: content })));
226
226
  }
227
227
  exports.default = IncubatorListWidget;
@@ -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 classnames_1 = tslib_1.__importDefault(require("classnames"));
10
11
  const utils_1 = require("@selfcommunity/utils");
@@ -14,11 +15,11 @@ const PREFIX = 'SCIncubatorSubscribeButton';
14
15
  const classes = {
15
16
  root: `${PREFIX}-root`
16
17
  };
17
- const Root = (0, material_1.styled)(material_1.Button, {
18
+ const Root = (0, material_1.styled)(lab_1.LoadingButton, {
18
19
  name: PREFIX,
19
20
  slot: 'Root',
20
- overridesResolver: (_props, styles) => styles.root
21
- })(() => ({}));
21
+ overridesResolver: (props, styles) => styles.root
22
+ })(({ theme }) => ({}));
22
23
  /**
23
24
  * > API documentation for the Community-JS Incubator Subscribe Button component. Learn about the available props and the CSS API.
24
25
 
@@ -187,7 +187,7 @@ function IncubatorSuggestionWidget(inProps) {
187
187
  if (!state.initialized) {
188
188
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
189
189
  }
190
- const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.title", defaultMessage: "ui.incubatorSuggestionWidget.title" }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.noResults", defaultMessage: "ui.incubatorSuggestionWidget.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, state.visibleItems).map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }), state.count > state.visibleItems && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.ShowAll", defaultMessage: "ui.incubatorSuggestionWidget.ShowAll" }) })))] })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.title", defaultMessage: "ui.incubatorSuggestionWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, DialogProps, { children: (0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: (0, jsx_runtime_1.jsx)(Incubator_1.IncubatorSkeleton, Object.assign({ elevation: 0 }, IncubatorProps)), height: isMobile ? '100vh' : 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.noMoreIncubators", defaultMessage: "ui.incubatorSuggestionWidget.noMoreIncubators" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }) })) }))), openIncubatorDetailDialog && ((0, jsx_runtime_1.jsx)(IncubatorDetail_1.default, { open: openIncubatorDetailDialog, onClose: handleIncubatorDetailDialogClose, incubator: detailObj, onSubscriptionsUpdate: handleSubscriptionsUpdate }))] }));
190
+ const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: 'h5' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.title", defaultMessage: "ui.incubatorSuggestionWidget.title" }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.noResults", defaultMessage: "ui.incubatorSuggestionWidget.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.slice(0, state.visibleItems).map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }), state.count > state.visibleItems && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.ShowAll", defaultMessage: "ui.incubatorSuggestionWidget.ShowAll" }) })))] })), openDialog && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.title", defaultMessage: "ui.incubatorSuggestionWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, DialogProps, { children: (0, jsx_runtime_1.jsx)(InfiniteScroll_1.default, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: (0, jsx_runtime_1.jsx)(Incubator_1.IncubatorSkeleton, Object.assign({ elevation: 0 }, IncubatorProps)), height: isMobile ? '100vh' : 400, endMessage: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.incubatorSuggestionWidget.noMoreIncubators", defaultMessage: "ui.incubatorSuggestionWidget.noMoreIncubators" }) })) }, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: state.results.map((incubator) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Incubator_1.default, Object.assign({ elevation: 0, incubator: incubator, subscribeButtonProps: { onSubscribe: handleSubscriptionsUpdate }, ButtonProps: { onClick: () => handleIncubatorDetailDialogOpening(incubator) } }, IncubatorProps)) }, incubator.id))) }) })) }))), openIncubatorDetailDialog && ((0, jsx_runtime_1.jsx)(IncubatorDetail_1.default, { open: openIncubatorDetailDialog, onClose: handleIncubatorDetailDialogClose, incubator: detailObj, onSubscriptionsUpdate: handleSubscriptionsUpdate }))] }));
191
191
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: content })));
192
192
  }
193
193
  exports.default = IncubatorSuggestionWidget;