@selfcommunity/react-ui 0.11.0-mui7.29 → 0.11.0-react-17.0.1.2

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