@selfcommunity/react-ui 0.11.0-react-17.0.1.3 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -2
  2. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
  3. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +6 -11
  4. package/lib/cjs/components/AccountDelete/AccountDelete.js +5 -12
  5. package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
  6. package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
  7. package/lib/cjs/components/BuyButton/BuyButton.js +8 -5
  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 +13 -4
  12. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
  13. package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
  14. package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
  15. package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
  16. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  17. package/lib/cjs/components/Checkout/Skeleton.js +1 -3
  18. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
  19. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
  20. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  21. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
  22. package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  23. package/lib/cjs/components/CommunityPaywalls/Skeleton.js +2 -3
  24. package/lib/cjs/components/Composer/Composer.js +3 -4
  25. package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
  26. package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  27. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
  28. package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  29. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +11 -5
  30. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
  31. package/lib/cjs/components/ConsentSolution/ConsentSolution.js +12 -5
  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 +1 -2
  35. package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
  36. package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
  37. package/lib/cjs/components/CourseForm/CourseForm.js +9 -6
  38. package/lib/cjs/components/CourseForm/Edit.js +6 -2
  39. package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
  40. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
  41. package/lib/cjs/components/Courses/Courses.d.ts +0 -4
  42. package/lib/cjs/components/Courses/Courses.js +10 -11
  43. package/lib/cjs/components/Courses/Skeleton.js +1 -1
  44. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
  45. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +5 -8
  46. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
  47. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  48. package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
  49. package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
  50. package/lib/cjs/components/EditCourse/Options.js +1 -2
  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 +4 -2
  54. package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
  55. package/lib/cjs/components/Event/Skeleton.js +1 -2
  56. package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +7 -4
  57. package/lib/cjs/components/EventForm/EventAddress.js +9 -5
  58. package/lib/cjs/components/EventForm/EventForm.js +89 -51
  59. package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
  60. package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
  61. package/lib/cjs/components/EventInviteButton/EventInviteButton.js +3 -2
  62. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +5 -16
  63. package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +8 -0
  64. package/lib/cjs/components/EventLocationWidget/EventMap.js +28 -0
  65. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  66. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
  67. package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  68. package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
  69. package/lib/cjs/components/EventMediaWidget/index.d.ts +2 -1
  70. package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
  71. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
  72. package/lib/cjs/components/Events/Events.d.ts +0 -4
  73. package/lib/cjs/components/Events/Events.js +14 -9
  74. package/lib/cjs/components/Events/LocationEventsFilter.js +5 -1
  75. package/lib/cjs/components/Events/OngoingEventsFilter.js +6 -2
  76. package/lib/cjs/components/Events/PastEventsFilter.js +6 -2
  77. package/lib/cjs/components/Events/Skeleton.js +1 -1
  78. package/lib/cjs/components/Feed/Feed.js +9 -10
  79. package/lib/cjs/components/Feed/Skeleton.js +1 -1
  80. package/lib/cjs/components/FeedObject/Actions/Actions.js +2 -3
  81. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  82. package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
  83. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
  84. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
  85. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  86. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  87. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  88. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  89. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
  90. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  91. package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
  92. package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
  93. package/lib/cjs/components/GroupActionsMenu/index.js +9 -1
  94. package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +7 -4
  95. package/lib/cjs/components/GroupForm/GroupForm.js +16 -27
  96. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  97. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +8 -7
  98. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
  99. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
  100. package/lib/cjs/components/Groups/Groups.js +10 -10
  101. package/lib/cjs/components/Groups/Skeleton.js +1 -2
  102. package/lib/cjs/components/Incubator/Incubator.js +4 -4
  103. package/lib/cjs/components/Incubator/Skeleton.js +1 -1
  104. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  105. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
  106. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  107. package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
  108. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  109. package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
  110. package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
  111. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  112. package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
  113. package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
  114. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +15 -12
  115. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  116. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
  117. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
  118. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  119. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
  120. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  121. package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +11 -11
  122. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  123. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  124. package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
  125. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
  126. package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
  127. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +2 -5
  128. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  129. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  130. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  131. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  132. package/lib/cjs/components/Notification/Course/Course.js +5 -10
  133. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
  134. package/lib/cjs/components/Notification/Event/Event.js +7 -12
  135. package/lib/cjs/components/Notification/Group/Group.js +3 -4
  136. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  137. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  138. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  139. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +4 -9
  140. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  141. package/lib/cjs/components/Notification/Notification.js +17 -9
  142. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +4 -5
  143. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  144. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
  145. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
  146. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  147. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  148. package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +12 -4
  149. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +19 -27
  150. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  151. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
  152. package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
  153. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  154. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +7 -5
  155. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  156. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +39 -26
  157. package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
  158. package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
  159. package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
  160. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
  161. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
  162. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +8 -6
  163. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
  164. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
  165. package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
  166. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  167. package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
  168. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  169. package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
  170. package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
  171. package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
  172. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  173. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  174. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  175. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  176. package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
  177. package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
  178. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  179. package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
  180. package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +5 -2
  181. package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +9 -8
  182. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -6
  183. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +12 -10
  184. package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
  185. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +30 -22
  186. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  187. package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
  188. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  189. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
  190. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  191. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +2 -4
  192. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  193. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
  194. package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
  195. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
  196. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +9 -20
  197. package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
  198. package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
  199. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  200. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
  201. package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
  202. package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
  203. package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +3 -2
  204. package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  205. package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
  206. package/lib/cjs/shared/CopyTextArea/index.js +12 -6
  207. package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
  208. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +6 -5
  209. package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
  210. package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
  211. package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
  212. package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
  213. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  214. package/lib/cjs/shared/EventActionsMenu/index.js +9 -1
  215. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  216. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  217. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
  218. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  219. package/lib/cjs/shared/Media/File/DisplayComponent.js +4 -6
  220. package/lib/cjs/shared/Media/File/DocComponent.d.ts +2 -0
  221. package/lib/cjs/shared/Media/File/DocComponent.js +3 -2
  222. package/lib/cjs/shared/Media/File/PreviewComponent.js +4 -3
  223. package/lib/cjs/shared/Media/File/TriggerButton.js +9 -1
  224. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  225. package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
  226. package/lib/cjs/shared/Media/Link/DisplayComponent.js +4 -12
  227. package/lib/cjs/shared/Media/Link/UrlTextField/index.js +3 -1
  228. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  229. package/lib/cjs/shared/PasswordTextField/index.js +7 -5
  230. package/lib/cjs/shared/ScrollContainer/index.js +2 -2
  231. package/lib/cjs/shared/TagChip/index.d.ts +2 -48
  232. package/lib/cjs/shared/TagChip/index.js +2 -2
  233. package/lib/cjs/shared/Tags/index.js +9 -9
  234. package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  235. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
  236. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
  237. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +7 -12
  238. package/lib/esm/components/AccountDelete/AccountDelete.js +6 -13
  239. package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
  240. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  241. package/lib/esm/components/BuyButton/BuyButton.js +9 -6
  242. package/lib/esm/components/Categories/Categories.js +1 -1
  243. package/lib/esm/components/Categories/Skeleton.js +1 -1
  244. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  245. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +14 -5
  246. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
  247. package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
  248. package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
  249. package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
  250. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  251. package/lib/esm/components/Checkout/Skeleton.js +2 -4
  252. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
  253. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +3 -4
  254. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  255. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
  256. package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  257. package/lib/esm/components/CommunityPaywalls/Skeleton.js +2 -3
  258. package/lib/esm/components/Composer/Composer.js +4 -5
  259. package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
  260. package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  261. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
  262. package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  263. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +12 -6
  264. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
  265. package/lib/esm/components/ConsentSolution/ConsentSolution.js +12 -5
  266. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  267. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  268. package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
  269. package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
  270. package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
  271. package/lib/esm/components/CourseForm/CourseForm.js +10 -7
  272. package/lib/esm/components/CourseForm/Edit.js +6 -2
  273. package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
  274. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
  275. package/lib/esm/components/Courses/Courses.d.ts +0 -4
  276. package/lib/esm/components/Courses/Courses.js +10 -10
  277. package/lib/esm/components/Courses/Skeleton.js +1 -1
  278. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
  279. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +6 -9
  280. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
  281. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  282. package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
  283. package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
  284. package/lib/esm/components/EditCourse/Options.js +2 -3
  285. package/lib/esm/components/EditCourse/Status.js +1 -1
  286. package/lib/esm/components/Editor/Editor.js +3 -3
  287. package/lib/esm/components/Editor/plugins/EmojiPlugin.js +4 -2
  288. package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
  289. package/lib/esm/components/Event/Skeleton.js +1 -2
  290. package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +8 -5
  291. package/lib/esm/components/EventForm/EventAddress.js +9 -5
  292. package/lib/esm/components/EventForm/EventForm.js +91 -53
  293. package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
  294. package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
  295. package/lib/esm/components/EventInviteButton/EventInviteButton.js +3 -2
  296. package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +5 -16
  297. package/lib/esm/components/EventLocationWidget/EventMap.d.ts +8 -0
  298. package/lib/esm/components/EventLocationWidget/EventMap.js +25 -0
  299. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  300. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
  301. package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  302. package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
  303. package/lib/esm/components/EventMediaWidget/index.d.ts +2 -1
  304. package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
  305. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
  306. package/lib/esm/components/Events/Events.d.ts +0 -4
  307. package/lib/esm/components/Events/Events.js +14 -8
  308. package/lib/esm/components/Events/LocationEventsFilter.js +5 -1
  309. package/lib/esm/components/Events/OngoingEventsFilter.js +6 -2
  310. package/lib/esm/components/Events/PastEventsFilter.js +6 -2
  311. package/lib/esm/components/Events/Skeleton.js +1 -1
  312. package/lib/esm/components/Feed/Feed.js +10 -11
  313. package/lib/esm/components/Feed/Skeleton.js +2 -2
  314. package/lib/esm/components/FeedObject/Actions/Actions.js +2 -3
  315. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  316. package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
  317. package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
  318. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
  319. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  320. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  321. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  322. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  323. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
  324. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  325. package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
  326. package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
  327. package/lib/esm/components/GroupActionsMenu/index.js +9 -1
  328. package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +8 -5
  329. package/lib/esm/components/GroupForm/GroupForm.js +17 -28
  330. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  331. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +8 -7
  332. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
  333. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
  334. package/lib/esm/components/Groups/Groups.js +10 -10
  335. package/lib/esm/components/Groups/Skeleton.js +1 -2
  336. package/lib/esm/components/Incubator/Incubator.js +4 -4
  337. package/lib/esm/components/Incubator/Skeleton.js +1 -1
  338. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  339. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -5
  340. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  341. package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
  342. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  343. package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
  344. package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
  345. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  346. package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
  347. package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
  348. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +16 -13
  349. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  350. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
  351. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
  352. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  353. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
  354. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  355. package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +12 -12
  356. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  357. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  358. package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
  359. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
  360. package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
  361. package/lib/esm/components/NavigationToolbar/NotificationMenu.js +2 -5
  362. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  363. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  364. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  365. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  366. package/lib/esm/components/Notification/Course/Course.js +6 -11
  367. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
  368. package/lib/esm/components/Notification/Event/Event.js +8 -13
  369. package/lib/esm/components/Notification/Group/Group.js +4 -5
  370. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  371. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  372. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  373. package/lib/esm/components/Notification/LiveStream/LiveStream.js +5 -10
  374. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  375. package/lib/esm/components/Notification/Notification.js +18 -10
  376. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +5 -6
  377. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  378. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
  379. package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
  380. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  381. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  382. package/lib/esm/components/OnBoardingWidget/ActionsButton.js +12 -4
  383. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +20 -28
  384. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  385. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
  386. package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
  387. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  388. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +8 -6
  389. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  390. package/lib/esm/components/PaymentOrders/PaymentOrders.js +39 -26
  391. package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
  392. package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
  393. package/lib/esm/components/Paywalls/Skeleton.js +1 -1
  394. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
  395. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
  396. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +9 -7
  397. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
  398. package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
  399. package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
  400. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  401. package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
  402. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  403. package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
  404. package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
  405. package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
  406. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  407. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  408. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  409. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  410. package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
  411. package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
  412. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  413. package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
  414. package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +7 -4
  415. package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +10 -9
  416. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +5 -7
  417. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +14 -12
  418. package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
  419. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +30 -22
  420. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  421. package/lib/esm/components/UserCounters/UserCounters.js +5 -13
  422. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  423. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
  424. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  425. package/lib/esm/components/UserPaymentMethods/Skeleton.js +2 -4
  426. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  427. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +11 -12
  428. package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
  429. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
  430. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +12 -23
  431. package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
  432. package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
  433. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  434. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
  435. package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
  436. package/lib/esm/components/VoteButton/VoteButton.js +3 -4
  437. package/lib/esm/shared/AddUsersButton/AddUsersButton.js +3 -2
  438. package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  439. package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
  440. package/lib/esm/shared/CopyTextArea/index.js +12 -6
  441. package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
  442. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +7 -6
  443. package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
  444. package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
  445. package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
  446. package/lib/esm/shared/DateTimeAgo/index.js +2 -2
  447. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  448. package/lib/esm/shared/EventActionsMenu/index.js +9 -1
  449. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  450. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  451. package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
  452. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  453. package/lib/esm/shared/Media/File/DisplayComponent.js +4 -6
  454. package/lib/esm/shared/Media/File/DocComponent.d.ts +2 -0
  455. package/lib/esm/shared/Media/File/DocComponent.js +3 -2
  456. package/lib/esm/shared/Media/File/PreviewComponent.js +4 -3
  457. package/lib/esm/shared/Media/File/TriggerButton.js +9 -1
  458. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  459. package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
  460. package/lib/esm/shared/Media/Link/DisplayComponent.js +5 -13
  461. package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -1
  462. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  463. package/lib/esm/shared/PasswordTextField/index.js +7 -5
  464. package/lib/esm/shared/ScrollContainer/index.js +1 -1
  465. package/lib/esm/shared/TagChip/index.d.ts +2 -48
  466. package/lib/esm/shared/TagChip/index.js +2 -2
  467. package/lib/esm/shared/Tags/index.js +9 -9
  468. package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  469. package/lib/umd/484.js +2 -0
  470. package/lib/umd/484.js.LICENSE.txt +9 -0
  471. package/lib/umd/react-ui.js +1 -1
  472. package/package.json +207 -206
  473. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
  474. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -14
  475. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
  476. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -10
  477. package/lib/umd/155.js +0 -2
  478. package/lib/umd/155.js.LICENSE.txt +0 -24
@@ -1,8 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import Grid from '@mui/material/Unstable_Grid2';
5
- import { styled } from '@mui/material';
4
+ import { styled, Grid } from '@mui/material';
6
5
  import { useThemeProps } from '@mui/system';
7
6
  import classNames from 'classnames';
8
7
  import { CommunityApiClient } from '@selfcommunity/api-services';
@@ -19,7 +18,7 @@ const classes = {
19
18
  const Root = styled(Grid, {
20
19
  slot: 'Root',
21
20
  name: PREFIX
22
- })(({ theme }) => ({}));
21
+ })(() => ({}));
23
22
  export default function CommunityPaywalls(inProps) {
24
23
  // PROPS
25
24
  const props = useThemeProps({
@@ -62,5 +61,5 @@ export default function CommunityPaywalls(inProps) {
62
61
  if (loading) {
63
62
  return _jsx(CommunityPaywallSkeleton, {});
64
63
  }
65
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), container: true, spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => (_jsx(Grid, Object.assign({ xs: 12, sm: 12, md: 4 }, { children: _jsx(PaymentProduct, Object.assign({ paymentProduct: p, contentType: SCContentType.COMMUNITY, contentId: scCommunity.id }, (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (callbackUrl && { PaymentProductPriceComponentProps: { returnUrlParams: { callbackUrl } } }))) }), i))) })));
64
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => (_jsx(Grid, Object.assign({ size: { xs: 12, md: 4 } }, { children: _jsx(PaymentProduct, Object.assign({ paymentProduct: p, contentType: SCContentType.COMMUNITY, contentId: scCommunity.id }, (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (scCommunity.payment_order && { paymentOrder: scCommunity.payment_order, onUpdatePaymentOrder }), (callbackUrl && { PaymentProductPriceComponentProps: { returnUrlParams: { callbackUrl } } }))) }), i))) })));
66
65
  }
@@ -1,6 +1,6 @@
1
+ import { GridProps } from '@mui/material';
1
2
  import { PaymentProductSkeletonProps } from '../PaymentProduct/Skeleton';
2
- import { Grid2Props } from '@mui/material/Unstable_Grid2';
3
- export interface CommunityPaywallsSkeletonProps extends Grid2Props {
3
+ export interface CommunityPaywallsSkeletonProps extends GridProps {
4
4
  className?: string;
5
5
  PaymentProductSkeletonComponentProps?: PaymentProductSkeletonProps;
6
6
  }
@@ -24,4 +24,4 @@ export interface CommunityPaywallsSkeletonProps extends Grid2Props {
24
24
  |root|.SCCommunityPaywallSkeleton-skeleton-root|Styles applied to the root element.|
25
25
  *
26
26
  */
27
- export default function CommunityPaywallsSkeleton(inProps: any): JSX.Element;
27
+ export default function CommunityPaywallsSkeleton(inProps: CommunityPaywallsSkeletonProps): JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useMediaQuery, useTheme, styled } from '@mui/material';
3
+ import { useMediaQuery, useTheme, styled, Grid } from '@mui/material';
4
4
  import { PREFIX } from './constants';
5
5
  import classNames from 'classnames';
6
6
  import PaymentProductSkeleton from '../PaymentProduct/Skeleton';
7
- import Grid from '@mui/material/Unstable_Grid2';
8
7
  import { useThemeProps } from '@mui/system';
9
8
  const classes = {
10
9
  root: `${PREFIX}-skeleton-root`,
@@ -46,5 +45,5 @@ export default function CommunityPaywallsSkeleton(inProps) {
46
45
  // HOOKS
47
46
  const theme = useTheme();
48
47
  const isMobile = useMediaQuery(theme.breakpoints.down('md'));
49
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), container: true, spacing: 4 }, rest, { children: [...Array(isMobile ? 2 : 3)].map((product, index) => (_jsx(Grid, Object.assign({ xs: 4 }, { children: _jsx(PaymentProductSkeleton, Object.assign({ variant: 'outlined' }, PaymentProductSkeletonComponentProps)) }), index))) })));
48
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: [...Array(isMobile ? 2 : 3)].map((_product, index) => (_jsx(Grid, Object.assign({ size: 4 }, { children: _jsx(PaymentProductSkeleton, Object.assign({ variant: "outlined" }, PaymentProductSkeletonComponentProps)) }), index))) })));
50
49
  }
@@ -5,10 +5,9 @@ import { SCContributionType, SCFeatureName, SCFeedTypologyType } from '@selfcomm
5
5
  import { Endpoints, formatHttpErrorCode, http } from '@selfcommunity/api-services';
6
6
  import { SCPreferences, UserUtils, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
7
7
  import { FormattedMessage } from 'react-intl';
8
- import { Alert, AlertTitle, Box, Dialog, DialogActions, DialogContent, DialogTitle, Fade, IconButton, Slide, useMediaQuery, Icon, styled, useTheme } from '@mui/material';
8
+ import { Alert, AlertTitle, Box, Dialog, DialogActions, DialogContent, DialogTitle, Fade, IconButton, Slide, useMediaQuery, Icon, styled, useTheme, Button } from '@mui/material';
9
9
  import { COMPOSER_POLL_MIN_CHOICES, COMPOSER_TITLE_MAX_LENGTH, COMPOSER_TYPE_POLL } from '../../constants/Composer';
10
10
  import { MEDIA_TYPE_SHARE } from '../../constants/Media';
11
- import LoadingButton from '@mui/lab/LoadingButton';
12
11
  import AudienceLayer from './Layer/AudienceLayer';
13
12
  import { iOS, isClientSideRendering, random, stripHtml } from '@selfcommunity/utils';
14
13
  import classNames from 'classnames';
@@ -202,7 +201,7 @@ export default function Composer(inProps) {
202
201
  const [isLoading, setIsLoading] = useState(editMode);
203
202
  const [loadError, setLoadError] = useState(false);
204
203
  // REFS
205
- const dialogRef = useRef();
204
+ const dialogRef = useRef(null);
206
205
  const unloadRef = useRef(false);
207
206
  const pointerStartY = useRef(null);
208
207
  // Create a ref for medias because of state update error on chunk upload
@@ -459,7 +458,7 @@ export default function Composer(inProps) {
459
458
  });
460
459
  mediasRef.current.medias = _medias;
461
460
  }, []);
462
- const handleMediaTriggerClick = useCallback((mediaObjectType) => (e) => {
461
+ const handleMediaTriggerClick = useCallback((mediaObjectType) => () => {
463
462
  if (mediaObjectType.layerComponent) {
464
463
  handleAddLayer({
465
464
  name: mediaObjectType.name,
@@ -693,7 +692,7 @@ export default function Composer(inProps) {
693
692
  if (!scUserContext.user && !(scUserContext.loading && open)) {
694
693
  return null;
695
694
  }
696
- return (_jsxs(Root, Object.assign({ ref: dialogRef, TransitionComponent: DialogTransition, slots: { backdrop: BackdropScrollDisabled }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: classNames(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [_jsxs("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: handleClosePrompt }, { children: _jsx(Icon, { children: "close" }) })), _jsx(LoadingButton, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? (_jsx(FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : (_jsx(FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Attributes, { value: { categories, event, group, addressing, recipients, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && (_jsx(Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
695
+ return (_jsxs(Root, Object.assign({ ref: dialogRef, slots: { backdrop: BackdropScrollDisabled, transition: DialogTransition }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: classNames(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [_jsxs("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: handleClosePrompt }, { children: _jsx(Icon, { children: "close" }) })), _jsx(Button, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? (_jsx(FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : (_jsx(FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Attributes, { value: { categories, event, group, addressing, recipients, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && (_jsx(Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
697
696
  if (mediaObjectType.previewComponent) {
698
697
  return _jsx(mediaObjectType.previewComponent, { value: medias, onChange: handleChangeMedias }, mediaObjectType.name);
699
698
  }
@@ -18,7 +18,7 @@ const classes = {
18
18
  const Root = styled(Box, {
19
19
  name: PREFIX,
20
20
  slot: 'ContentDiscussionRoot'
21
- })(({ theme }) => ({}));
21
+ })(() => ({}));
22
22
  /**
23
23
  * Default post
24
24
  */
@@ -79,7 +79,9 @@ export default (props) => {
79
79
  return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && (_jsxs(Typography, Object.assign({ className: classes.generalError }, { children: [generalError && _jsx(FormattedMessage, { id: `ui.composer.error.${generalError}`, defaultMessage: `ui.composer.error.${generalError}` }), categoriesError && categoriesError, _jsx("br", {}), addressingError && addressingError] }))), _jsx(TextField, { className: classes.title, ref: titleRef, placeholder: intl.formatMessage({
80
80
  id: 'ui.composer.content.discussion.title.label',
81
81
  defaultMessage: 'ui.composer.content.discussion.title.label'
82
- }), autoFocus: true, fullWidth: true, variant: "outlined", value: value.title, onChange: handleChangeTitle, onKeyDown: handleKeyDownTitle, multiline: true, InputProps: {
83
- endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_TITLE_MAX_LENGTH - value.title.length }))
82
+ }), autoFocus: true, fullWidth: true, variant: "outlined", value: value.title, onChange: handleChangeTitle, onKeyDown: handleKeyDownTitle, multiline: true, slotProps: {
83
+ input: {
84
+ endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_TITLE_MAX_LENGTH - value.title.length }))
85
+ }
84
86
  }, error: Boolean(titleError), helperText: titleError, disabled: disabled }), _jsx(Box, Object.assign({ sx: { [`& .${SCEDITOR_PREFIX}-content`]: { maxHeight: `${editorMaxHeight} !important` } } }, { children: _jsx(Editor, Object.assign({}, EditorProps, { editable: !disabled, className: classes.editor, onChange: handleChangeHtml, defaultValue: value.html })) }))] })));
85
87
  };
@@ -18,14 +18,14 @@ const classes = {
18
18
  const Root = styled(Box, {
19
19
  name: PREFIX,
20
20
  slot: 'ContentLessonRoot'
21
- })(({ theme }) => ({}));
21
+ })(() => ({}));
22
22
  export default (props) => {
23
23
  // PROPS
24
24
  const { className = null, value, error = {}, disabled = false, onChange, onMediaChange, EditorProps = {} } = props;
25
25
  const { error: generalError = null } = Object.assign({}, error);
26
26
  const mediaObjectTypes = [File, Link];
27
27
  const [medias, setMedias] = useState((value === null || value === void 0 ? void 0 : value.medias) || []);
28
- const [openLink, setOpenLink] = useState();
28
+ const [openLink, setOpenLink] = useState(false);
29
29
  const linkInputRef = useRef(null);
30
30
  // HANDLERS
31
31
  const handleChangeHtml = useCallback((html) => {
@@ -7,15 +7,15 @@ import { ReactSortable } from 'react-sortablejs';
7
7
  import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';
8
8
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
9
9
  import { COMPOSER_POLL_MIN_CHOICES, COMPOSER_POLL_MIN_CLOSE_DATE_DELTA, COMPOSER_POLL_TITLE_MAX_LENGTH } from '../../../../constants/Composer';
10
- import itLocale from 'date-fns/locale/it';
11
- import enLocale from 'date-fns/locale/en-US';
10
+ import { it } from 'date-fns/locale/it';
11
+ import { enUS } from 'date-fns/locale/en-US';
12
12
  import classNames from 'classnames';
13
13
  import { useThemeProps } from '@mui/system';
14
14
  import { parseISO } from 'date-fns';
15
15
  import { PREFIX } from '../../constants';
16
16
  const localeMap = {
17
- en: enLocale,
18
- it: itLocale
17
+ en: it,
18
+ it: enUS
19
19
  };
20
20
  const classes = {
21
21
  root: `${PREFIX}-content-poll-root`,
@@ -97,10 +97,14 @@ export default (inProps) => {
97
97
  minDate.setDate(minDate.getDate() + COMPOSER_POLL_MIN_CLOSE_DATE_DELTA);
98
98
  return minDate;
99
99
  }, []);
100
- return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && (_jsxs(Typography, Object.assign({ className: classes.generalError }, { children: [generalError && (_jsx(FormattedMessage, { id: `ui.composer.content.poll.error.${generalError}`, defaultMessage: `ui.composer.content.poll.error.${generalError}` })), categoriesError && categoriesError, _jsx("br", {}), addressingError && addressingError] }))), _jsx(Box, Object.assign({ className: classes.title }, { children: _jsx(TextField, { autoFocus: true, disabled: disabled, label: _jsx(FormattedMessage, { id: "ui.composer.content.poll.title", defaultMessage: "ui.composer.content.poll.title" }), variant: "outlined", value: poll.title, onChange: handleChangeTitle, fullWidth: true, error: Boolean(titleError), helperText: titleError && titleError, InputProps: {
101
- endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_POLL_TITLE_MAX_LENGTH - poll.title.length }))
102
- } }) })), _jsx(Box, Object.assign({ className: classes.choices }, { children: _jsx(ReactSortable, Object.assign({ list: [...poll.choices], setList: handleSortChoices, tag: SortableComponent }, { children: poll.choices.map((choice, index) => (_jsx(TextField, { placeholder: intl.formatMessage(messages.choicePlaceholder), value: choice.choice, onChange: handleChangeChoice(index), variant: "outlined", disabled: disabled, InputProps: {
103
- startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "drag" }) }))),
104
- endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: _jsx(Tooltip, Object.assign({ title: poll.choices.length <= COMPOSER_POLL_MIN_CHOICES ? (_jsx(FormattedMessage, { id: "ui.composer.content.poll.choice.delete.disabled", defaultMessage: "ui.composer.content.poll.choice.delete.disabled" })) : (_jsx(FormattedMessage, { id: "ui.composer.content.poll.choice.delete", defaultMessage: "ui.composer.content.poll.choice.delete" })) }, { children: _jsx("span", { children: _jsx(IconButton, Object.assign({ onClick: handleDeleteChoice(index), disabled: poll.choices.length <= COMPOSER_POLL_MIN_CHOICES, edge: "end" }, { children: _jsx(Icon, { children: "delete" }) })) }) })) })))
100
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && (_jsxs(Typography, Object.assign({ className: classes.generalError }, { children: [generalError && (_jsx(FormattedMessage, { id: `ui.composer.content.poll.error.${generalError}`, defaultMessage: `ui.composer.content.poll.error.${generalError}` })), categoriesError && categoriesError, _jsx("br", {}), addressingError && addressingError] }))), _jsx(Box, Object.assign({ className: classes.title }, { children: _jsx(TextField, { autoFocus: true, disabled: disabled, label: _jsx(FormattedMessage, { id: "ui.composer.content.poll.title", defaultMessage: "ui.composer.content.poll.title" }), variant: "outlined", value: poll.title, onChange: handleChangeTitle, fullWidth: true, error: Boolean(titleError), helperText: titleError && titleError, slotProps: {
101
+ input: {
102
+ endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_POLL_TITLE_MAX_LENGTH - poll.title.length }))
103
+ }
104
+ } }) })), _jsx(Box, Object.assign({ className: classes.choices }, { children: _jsx(ReactSortable, Object.assign({ list: [...poll.choices], setList: handleSortChoices, tag: SortableComponent }, { children: poll.choices.map((choice, index) => (_jsx(TextField, { placeholder: intl.formatMessage(messages.choicePlaceholder), value: choice.choice, onChange: handleChangeChoice(index), variant: "outlined", disabled: disabled, slotProps: {
105
+ input: {
106
+ startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "drag" }) }))),
107
+ endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: _jsx(Tooltip, Object.assign({ title: poll.choices.length <= COMPOSER_POLL_MIN_CHOICES ? (_jsx(FormattedMessage, { id: "ui.composer.content.poll.choice.delete.disabled", defaultMessage: "ui.composer.content.poll.choice.delete.disabled" })) : (_jsx(FormattedMessage, { id: "ui.composer.content.poll.choice.delete", defaultMessage: "ui.composer.content.poll.choice.delete" })) }, { children: _jsx("span", { children: _jsx(IconButton, Object.assign({ onClick: handleDeleteChoice(index), disabled: poll.choices.length <= COMPOSER_POLL_MIN_CHOICES, edge: "end" }, { children: _jsx(Icon, { children: "delete" }) })) }) })) })))
108
+ }
105
109
  } }, index))) })) })), _jsx(Box, Object.assign({ className: classes.choiceNew }, { children: _jsxs(Button, Object.assign({ color: "inherit", variant: "text", onClick: handleAddChoice }, { children: [_jsx(Icon, { children: "add" }), _jsx(FormattedMessage, { id: "ui.composer.content.poll.choice.add", defaultMessage: "ui.composer.choice.add" })] })) })), _jsx(Divider, {}), _jsxs(FormGroup, Object.assign({ className: classes.metadata }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: poll.multiple_choices, onChange: handleChangeMultiple }), label: _jsx(FormattedMessage, { id: "ui.composer.content.poll.multiple", defaultMessage: "ui.composer.content.poll.multiple" }) }), _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: localeMap[intl.locale] }, { children: _jsx(DatePicker, { disabled: disabled, label: _jsx(FormattedMessage, { id: "ui.composer.content.poll.expiration", defaultMessage: "ui.composer.content.poll.expiration" }), value: typeof poll.expiration_at === 'string' ? parseISO(poll.expiration_at) : poll.expiration_at, onChange: handleChangeExpiration, slotProps: { textField: { variant: 'outlined' } }, minDate: minDate }) }))] }))] })));
106
110
  };
@@ -14,7 +14,7 @@ const classes = {
14
14
  const Root = styled(Box, {
15
15
  name: PREFIX,
16
16
  slot: 'ContentPostRoot'
17
- })(({ theme }) => ({}));
17
+ })(() => ({}));
18
18
  /**
19
19
  * Default post
20
20
  */
@@ -32,7 +32,7 @@ export default (props) => {
32
32
  const { className = null, value = Object.assign({}, DEFAULT_POST), error = {}, disabled = false, onChange, EditorProps = {} } = props;
33
33
  const { categoriesError = null, addressingError = null, error: generalError = null } = Object.assign({}, error);
34
34
  // REF
35
- const editorRef = useRef();
35
+ const editorRef = useRef(null);
36
36
  // EFFECTS
37
37
  useEffect(() => {
38
38
  editorRef && editorRef.current && editorRef.current.focus();
@@ -1,5 +1,5 @@
1
1
  import { __rest } from "tslib";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { useCallback, useMemo, useState } from 'react';
4
4
  import { FormattedMessage } from 'react-intl';
5
5
  import parse from 'autosuggest-highlight/parse';
@@ -123,14 +123,20 @@ const AudienceLayer = React.forwardRef((props, ref) => {
123
123
  // Disable all tabs except the currently selected type
124
124
  return type !== valueType;
125
125
  };
126
- return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.title", defaultMessage: "ui.composer.layer.audience.title" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSave }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.save", defaultMessage: "ui.composer.layer.save" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsxs(Tabs, Object.assign({ value: audience, onChange: handleChangeAudience, "aria-label": "audience type" }, { children: [!taggingRequiredEnabled && (_jsx(Tab, { value: AudienceTypes.AUDIENCE_ALL, icon: _jsx(Icon, { children: "public" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.all", defaultMessage: "ui.composer.layer.audience.all" }) })), eventsEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_EVENT), value: AudienceTypes.AUDIENCE_EVENT, icon: _jsx(Icon, { children: "CalendarIcon" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.event", defaultMessage: "ui.composer.layer.audience.event" }) })), groupsEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_GROUP), value: AudienceTypes.AUDIENCE_GROUP, icon: _jsx(Icon, { children: "groups" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.group", defaultMessage: "ui.composer.layer.audience.group" }) })), _jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_TAG), value: AudienceTypes.AUDIENCE_TAG, icon: _jsx(Icon, { children: "label" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag", defaultMessage: "ui.composer.layer.audience.tag" }) }), usersTaggingEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_USERS), value: AudienceTypes.AUDIENCE_USERS, icon: _jsx(Icon, { children: "people_alt" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.users", defaultMessage: "ui.composer.layer.audience.users" }) }))] })), _jsxs(Typography, Object.assign({ className: classes.message }, { children: [audience === AudienceTypes.AUDIENCE_ALL && !taggingRequiredEnabled && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.all.message", defaultMessage: "ui.composer.layer.audience.all.message" })), audience === AudienceTypes.AUDIENCE_EVENT && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.event.message", defaultMessage: "ui.composer.layer.audience.event.message" })), audience === AudienceTypes.AUDIENCE_GROUP && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.group.message", defaultMessage: "ui.composer.layer.audience.group.message" })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag.message", defaultMessage: "ui.composer.layer.audience.tag.message" })), audience === AudienceTypes.AUDIENCE_USERS && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.users.message", defaultMessage: "ui.composer.layer.audience.users.message" }))] })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(Autocomplete, { className: classes.autocomplete, open: autocompleteOpen, onOpen: handleAutocompleteOpen, onClose: handleAutocompleteClose, multiple: true, options: scAddressingTags || [], getOptionLabel: (option) => option.name || '', value: value, selectOnFocus: true, clearOnBlur: true, handleHomeEndKeys: true, clearIcon: null, noOptionsText: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tags.empty", defaultMessage: "ui.composer.layer.audience.tags.empty" }), onChange: handleChange, isOptionEqualToValue: (option, value) => value.id === option.id, renderTags: (value, getTagProps) => {
127
- return value.map((option, index) => _jsx(TagChip, Object.assign({ tag: option }, getTagProps({ index }), { showDescription: true }), option.id));
128
- }, renderOption: (props, option, { selected, inputValue }) => {
126
+ return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.title", defaultMessage: "ui.composer.layer.audience.title" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSave }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.save", defaultMessage: "ui.composer.layer.save" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsxs(Tabs, Object.assign({ value: audience, onChange: handleChangeAudience, "aria-label": "audience type" }, { children: [!taggingRequiredEnabled && (_jsx(Tab, { value: AudienceTypes.AUDIENCE_ALL, icon: _jsx(Icon, { children: "public" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.all", defaultMessage: "ui.composer.layer.audience.all" }) })), eventsEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_EVENT), value: AudienceTypes.AUDIENCE_EVENT, icon: _jsx(Icon, { children: "CalendarIcon" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.event", defaultMessage: "ui.composer.layer.audience.event" }) })), groupsEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_GROUP), value: AudienceTypes.AUDIENCE_GROUP, icon: _jsx(Icon, { children: "groups" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.group", defaultMessage: "ui.composer.layer.audience.group" }) })), _jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_TAG), value: AudienceTypes.AUDIENCE_TAG, icon: _jsx(Icon, { children: "label" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag", defaultMessage: "ui.composer.layer.audience.tag" }) }), usersTaggingEnabled && (_jsx(Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_USERS), value: AudienceTypes.AUDIENCE_USERS, icon: _jsx(Icon, { children: "people_alt" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.users", defaultMessage: "ui.composer.layer.audience.users" }) }))] })), _jsxs(Typography, Object.assign({ className: classes.message }, { children: [audience === AudienceTypes.AUDIENCE_ALL && !taggingRequiredEnabled && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.all.message", defaultMessage: "ui.composer.layer.audience.all.message" })), audience === AudienceTypes.AUDIENCE_EVENT && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.event.message", defaultMessage: "ui.composer.layer.audience.event.message" })), audience === AudienceTypes.AUDIENCE_GROUP && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.group.message", defaultMessage: "ui.composer.layer.audience.group.message" })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag.message", defaultMessage: "ui.composer.layer.audience.tag.message" })), audience === AudienceTypes.AUDIENCE_USERS && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.users.message", defaultMessage: "ui.composer.layer.audience.users.message" }))] })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(Autocomplete, { className: classes.autocomplete, open: autocompleteOpen, onOpen: handleAutocompleteOpen, onClose: handleAutocompleteClose, multiple: true, options: scAddressingTags || [], getOptionLabel: (option) => option.name || '', value: value, selectOnFocus: true, clearOnBlur: true, handleHomeEndKeys: true, clearIcon: null, noOptionsText: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tags.empty", defaultMessage: "ui.composer.layer.audience.tags.empty" }), onChange: handleChange, isOptionEqualToValue: (option, value) => value.id === option.id, renderValue: (value, getItemProps) => {
127
+ return value.map((option, index) => {
128
+ const _a = getItemProps({ index }), { key } = _a, rest = __rest(_a, ["key"]);
129
+ return _jsx(TagChip, Object.assign({ tag: option }, rest, { showDescription: true }), key || option.id);
130
+ });
131
+ }, renderOption: (props, option, { inputValue }) => {
132
+ const { key } = props, rest = __rest(props, ["key"]);
129
133
  const matches = match(option.name, inputValue);
130
134
  const parts = parse(option.name, matches);
131
- return (_jsx("li", Object.assign({}, props, { children: _jsx(TagChip, { showDescription: true, disposable: false, tag: option, label: _jsx(React.Fragment, { children: parts.map((part, index) => (_jsx("span", Object.assign({ style: { fontWeight: part.highlight ? 700 : 400 } }, { children: part.text }), index))) }) }, option.id) })));
135
+ return (_jsx("li", Object.assign({}, rest, { children: _jsx(TagChip, { showDescription: true, disposable: false, tag: option, label: _jsx(React.Fragment, { children: parts.map((part, index) => (_jsx("span", Object.assign({ style: { fontWeight: part.highlight ? 700 : 400 } }, { children: part.text }), index))) }) }, option.id) }), key));
132
136
  }, renderInput: (params) => {
133
- return (_jsx(TextField, Object.assign({}, params, TextFieldProps, { InputProps: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'addressing', endAdornment: _jsx(React.Fragment, { children: params.InputProps.endAdornment }) }) })));
137
+ return (_jsx(TextField, Object.assign({}, params, TextFieldProps, { slotProps: {
138
+ input: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'addressing', endAdornment: _jsx(_Fragment, { children: params.InputProps.endAdornment }) })
139
+ } })));
134
140
  } })), audience === AudienceTypes.AUDIENCE_USERS && _jsx(UserAutocomplete, { onChange: handleUsersChange, defaultValue: value }), audience === AudienceTypes.AUDIENCE_GROUP && _jsx(GroupAutocomplete, { onChange: handleGroupChange, defaultValue: value }), audience === AudienceTypes.AUDIENCE_EVENT && _jsx(EventAutocomplete, { onChange: handleEventChange, defaultValue: value })] }))] })));
135
141
  });
136
142
  export default AudienceLayer;
@@ -3,10 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React, { useCallback, useState } from 'react';
4
4
  import { FormattedMessage } from 'react-intl';
5
5
  import { Box, Button, DialogTitle, IconButton, Typography, DialogContent, Icon, styled } from '@mui/material';
6
- import { LocalizationProvider, StaticDateTimePicker, DateTimePickerTabs } from '@mui/x-date-pickers';
6
+ import { LocalizationProvider, StaticDateTimePicker, DateTimePickerTabs, usePickerContext } from '@mui/x-date-pickers';
7
7
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
8
- import itLocale from 'date-fns/locale/it';
9
- import enLocale from 'date-fns/locale/en-US';
8
+ import { it } from 'date-fns/locale/it';
9
+ import { enUS } from 'date-fns/locale/en-US';
10
10
  import { useSCContext } from '@selfcommunity/react-core';
11
11
  import classNames from 'classnames';
12
12
  import { format, parseISO } from 'date-fns';
@@ -29,7 +29,7 @@ const ScheduledLayer = React.forwardRef((props, ref) => {
29
29
  const { className, onClose, onSave, defaultValue = null } = props, rest = __rest(props, ["className", "onClose", "onSave", "defaultValue"]);
30
30
  //CONTEXT
31
31
  const scContext = useSCContext();
32
- const locale = scContext.settings.locale.default === 'it' ? itLocale : enLocale;
32
+ const locale = scContext.settings.locale.default === 'it' ? it : enUS;
33
33
  // STATE
34
34
  const [scheduledAt, setScheduledAt] = useState(defaultValue ? (typeof defaultValue === 'string' ? parseISO(defaultValue) : defaultValue) : null);
35
35
  const handleUpdate = useCallback((value) => {
@@ -38,15 +38,15 @@ const ScheduledLayer = React.forwardRef((props, ref) => {
38
38
  onSave(value);
39
39
  }
40
40
  }, [onSave]);
41
- const CustomToolbar = (props) => {
42
- const { value } = props;
41
+ const CustomToolbar = () => {
42
+ const { value } = usePickerContext();
43
43
  if (!value)
44
44
  return null;
45
45
  const dayName = capitalize(format(value, 'EEEE', { locale }));
46
46
  const restOfDate = format(value, 'd MMMM yyyy • HH:mm', { locale });
47
47
  return _jsx(Typography, Object.assign({ variant: "h4" }, { children: `${dayName} ${restOfDate}` }));
48
48
  };
49
- return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.title", defaultMessage: "Programma la Pubblicazione" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: () => onSave(scheduledAt), disabled: !scheduledAt }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.submit", defaultMessage: "Attiva Programmazione" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Typography, Object.assign({ className: classes.message }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.message", defaultMessage: "ui.composer.audience.scheduled.message" }) })), _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: locale }, { children: _jsx(StaticDateTimePicker, { className: classes.picker, disablePast: true, value: scheduledAt, onChange: (value) => setScheduledAt(value), onAccept: handleUpdate, slots: {
49
+ return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.title", defaultMessage: "Programma la Pubblicazione" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: () => onSave(scheduledAt), disabled: !scheduledAt }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.submit", defaultMessage: "Attiva Programmazione" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Typography, Object.assign({ className: classes.message }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.message", defaultMessage: "ui.composer.audience.scheduled.message" }) })), _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: locale }, { children: _jsx(StaticDateTimePicker, { className: classes.picker, disablePast: true, value: scheduledAt, onChange: setScheduledAt, onAccept: handleUpdate, slots: {
50
50
  toolbar: CustomToolbar,
51
51
  tabs: (props) => _jsx(DateTimePickerTabs, Object.assign({}, props)),
52
52
  actionBar: () => null
@@ -122,7 +122,6 @@ export default function ConsentSolution(inProps) {
122
122
  const [loading, setLoading] = useState(true);
123
123
  const [loadingAck, setLoadingAck] = useState(false);
124
124
  const [rejected, setRejected] = useState(false);
125
- const [dataPortability, setDataPortability] = useState(null);
126
125
  const [dataPortabilityChecked, setDataPortabilityChecked] = useState(false);
127
126
  const [loadingDeleteAccount, setLoadingDeleteAccount] = useState(false);
128
127
  // CONST
@@ -245,7 +244,7 @@ export default function ConsentSolution(inProps) {
245
244
  const isAccept = Boolean(doc.ack && doc.ack.accepted_at);
246
245
  return (_jsxs(_Fragment, { children: [_jsx(DialogTitle, Object.assign({ className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.acceptDocumentTitle", defaultMessage: "ui.consentSolution.acceptDocumentTitle", values: { label: doc.title } }) })), _jsx(DialogContent, Object.assign({ className: classes.content, dividers: true, ref: contentDialog }, { children: _jsx(Typography, { component: "div", gutterBottom: true, dangerouslySetInnerHTML: {
247
246
  __html: getDocumentBody(doc)
248
- } }) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(FormControlLabel, { className: classes.consentSwitch, control: _jsx(ConsentSolutionSwitch, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? (_jsxs(Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [_jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), _jsx("a", Object.assign({ onClick: () => setView(REJECTION_VIEW), className: classes.deleteAccountButton }, { children: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : (_jsx(_Fragment, { children: _jsx(Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), _jsxs(DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && (_jsx(Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? (_jsx(Button, Object.assign({ size: "small", variant: 'outlined', disabled: !isAccept, onClick: handleNext, className: classes.nextButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.nextButton", defaultMessage: "ui.consentSolution.nextButton" }) }))) : (_jsx(Button, Object.assign({ size: "small", variant: 'outlined', disabled: !isAccept, onClick: (e) => handleClose(e, null), className: classes.closeButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.closeButton", defaultMessage: "ui.consentSolution.closeButton" }) })))] }))] }));
247
+ } }) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(FormControlLabel, { className: classes.consentSwitch, control: _jsx(ConsentSolutionSwitch, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? (_jsxs(Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [_jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), _jsx("a", Object.assign({ onClick: () => setView(REJECTION_VIEW), className: classes.deleteAccountButton }, { children: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : (_jsx(_Fragment, { children: _jsx(Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), _jsxs(DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && (_jsx(Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? (_jsx(Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: handleNext, className: classes.nextButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.nextButton", defaultMessage: "ui.consentSolution.nextButton" }) }))) : (_jsx(Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: (e) => handleClose(e, null), className: classes.closeButton }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.closeButton", defaultMessage: "ui.consentSolution.closeButton" }) })))] }))] }));
249
248
  };
250
249
  /**
251
250
  * Render document detail view
@@ -255,13 +254,19 @@ export default function ConsentSolution(inProps) {
255
254
  if (!doc) {
256
255
  return null;
257
256
  }
258
- return (_jsxs(_Fragment, { children: [_jsx(DialogTitle, Object.assign({ className: classNames(classes.title, classes.titleBack) }, { children: _jsx(Button, Object.assign({ size: "small", variant: 'outlined', onClick: () => setView(ACCEPT_VIEW), className: classes.backButton, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), _jsxs(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [_jsx(AccountDataPortability, { className: classes.dataPortability }), _jsx(Typography, Object.assign({ variant: "h6" }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionTitle", defaultMessage: "ui.consentSolution.deleteAccountDpSectionTitle", values: { username: capitalize(scUserContext.user.username) } }) })), _jsx("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, { communityName, li: (chunks) => _jsx("li", { children: chunks }) }) }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { className: classes.dataPortabilityCheck, checked: dataPortabilityChecked, onChange: () => setDataPortabilityChecked((p) => !p) }), label: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel", defaultMessage: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel" }) }), _jsx("br", {}), _jsx(Button, Object.assign({ size: "small", startIcon: _jsx(Icon, { children: "delete_outlined" }), disabled: !dataPortabilityChecked, variant: 'contained', className: classes.confirmDeleteAccountButton, onClick: () => setView(CONFIRM_DELETE_ACCOUNT) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.confirmDeleteAccountButton", defaultMessage: "ui.consentSolution.confirmDeleteAccountButton" }) })), _jsx(Button, Object.assign({ size: "small", variant: 'outlined', className: classes.logoutAccountButton, startIcon: _jsx(Icon, { children: "upload" }), onClick: handleLogout }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.logoutImmediatelyButton", defaultMessage: "ui.consentSolution.logoutImmediatelyButton" }) }))] }))] }));
257
+ return (_jsxs(_Fragment, { children: [_jsx(DialogTitle, Object.assign({ className: classNames(classes.title, classes.titleBack) }, { children: _jsx(Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setView(ACCEPT_VIEW), className: classes.backButton, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), _jsxs(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [_jsx(AccountDataPortability, { className: classes.dataPortability }), _jsx(Typography, Object.assign({ variant: "h6" }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionTitle", defaultMessage: "ui.consentSolution.deleteAccountDpSectionTitle", values: { username: capitalize(scUserContext.user.username) } }) })), _jsx("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
258
+ communityName,
259
+ li: (chunks) => _jsx("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.1")
260
+ }) }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { className: classes.dataPortabilityCheck, checked: dataPortabilityChecked, onChange: () => setDataPortabilityChecked((p) => !p) }), label: _jsx(FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel", defaultMessage: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel" }) }), _jsx("br", {}), _jsx(Button, Object.assign({ size: "small", startIcon: _jsx(Icon, { children: "delete_outlined" }), disabled: !dataPortabilityChecked, variant: "contained", className: classes.confirmDeleteAccountButton, onClick: () => setView(CONFIRM_DELETE_ACCOUNT) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.confirmDeleteAccountButton", defaultMessage: "ui.consentSolution.confirmDeleteAccountButton" }) })), _jsx(Button, Object.assign({ size: "small", variant: "outlined", className: classes.logoutAccountButton, startIcon: _jsx(Icon, { children: "upload" }), onClick: handleLogout }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.logoutImmediatelyButton", defaultMessage: "ui.consentSolution.logoutImmediatelyButton" }) }))] }))] }));
259
261
  };
260
262
  /**
261
263
  * Render delete account view
262
264
  */
263
265
  const renderDeleteAccountView = () => {
264
- return (_jsxs(_Fragment, { children: [_jsx(DialogTitle, Object.assign({ className: classNames(classes.title, classes.titleBack) }, { children: _jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: () => setView(REJECTION_VIEW), className: classes.backButton, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), _jsxs(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountTitle", defaultMessage: "ui.consentSolution.removeAccountTitle" }) })), _jsx("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, { communityName, li: (chunks) => _jsx("li", { children: chunks }) }) }), _jsx("br", {}), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountConfirm", defaultMessage: "ui.consentSolution.removeAccountConfirm" }) }) }))] })), _jsxs(DialogActions, Object.assign({ className: classes.actions }, { children: [_jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: () => setView(REJECTION_VIEW) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountCancelButton", defaultMessage: "ui.consentSolution.removeAccountCancelButton" }) })), _jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: handleConfirmDeleteAccount }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountConfirmButton", defaultMessage: "ui.consentSolution.removeAccountConfirmButton" }) }))] }))] }));
266
+ return (_jsxs(_Fragment, { children: [_jsx(DialogTitle, Object.assign({ className: classNames(classes.title, classes.titleBack) }, { children: _jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(REJECTION_VIEW), className: classes.backButton, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), _jsxs(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountTitle", defaultMessage: "ui.consentSolution.removeAccountTitle" }) })), _jsx("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
267
+ communityName,
268
+ li: (chunks) => _jsx("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.2")
269
+ }) }), _jsx("br", {}), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx("b", { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountConfirm", defaultMessage: "ui.consentSolution.removeAccountConfirm" }) }) }))] })), _jsxs(DialogActions, Object.assign({ className: classes.actions }, { children: [_jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(REJECTION_VIEW) }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountCancelButton", defaultMessage: "ui.consentSolution.removeAccountCancelButton" }) })), _jsx(Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: handleConfirmDeleteAccount }, { children: _jsx(FormattedMessage, { id: "ui.consentSolution.removeAccountConfirmButton", defaultMessage: "ui.consentSolution.removeAccountConfirmButton" }) }))] }))] }));
265
270
  };
266
271
  /**
267
272
  * If there's no authUserId, component is hidden.
@@ -295,5 +300,7 @@ export default function ConsentSolution(inProps) {
295
300
  /**
296
301
  * Renders root object
297
302
  */
298
- return (_jsx(_Fragment, { children: open && (_jsx(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: classNames(classes.root, className), TransitionComponent: DialogTransition, maxWidth: 'md', fullWidth: true, open: ready, disableEscapeKeyDown: true, onClose: handleClose, scroll: 'paper' }, rest, { children: content() }))) }));
303
+ return (_jsx(_Fragment, { children: open && (_jsx(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: classNames(classes.root, className), slots: {
304
+ transition: DialogTransition
305
+ }, maxWidth: "md", fullWidth: true, open: ready, disableEscapeKeyDown: true, onClose: handleClose, scroll: "paper" }, rest, { children: content() }))) }));
299
306
  }
@@ -41,5 +41,5 @@ const Root = styled(Box, {
41
41
  */
42
42
  export default function ConsentSolutionSkeleton() {
43
43
  const ContentSection = () => (_jsxs(_Fragment, { children: [_jsx(Skeleton, { animation: "wave", height: 20, width: "100%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "80%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "60%" }), _jsx(Skeleton, { animation: "wave", height: 20, width: "30%" }), _jsx("br", {})] }));
44
- return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(DialogTitle, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: "70%" }) })), _jsx(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => (_jsx(ContentSection, {}, i))) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(Skeleton, { height: 64, className: classes.consentSwitch }), _jsx(Skeleton, { animation: "wave", height: 20, width: "50%", variant: 'text', className: classes.consentSwitchLabel })] })), _jsx(DialogActions, Object.assign({ className: classes.actions }, { children: _jsx(Skeleton, { animation: "wave", height: 40, width: "20%" }) }))] })));
44
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(DialogTitle, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: "70%" }) })), _jsx(DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [...Array(2)].map((_, i) => (_jsx(ContentSection, {}, i))) })), _jsxs(DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [_jsx(Skeleton, { height: 64, className: classes.consentSwitch }), _jsx(Skeleton, { animation: "wave", height: 20, width: "50%", variant: "text", className: classes.consentSwitchLabel })] })), _jsx(DialogActions, Object.assign({ className: classes.actions }, { children: _jsx(Skeleton, { animation: "wave", height: 40, width: "20%" }) }))] })));
45
45
  }
@@ -31,7 +31,7 @@ function CourseCompletedDialog(inProps) {
31
31
  const intl = useIntl();
32
32
  return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: onClose, actions: _jsx(Button, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.COURSES_ROUTE_NAME, {}), size: "medium", variant: "contained" }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.btn.label", defaultMessage: "ui.course.completedDialog.btn.label" }) })) })), className: classes.root }, { children: _jsxs(Stack, Object.assign({ className: classes.wrapper }, { children: [_jsx("img", { src: clapping, alt: intl.formatMessage({ id: 'ui.course.completedDialog.title', defaultMessage: 'ui.course.completedDialog.title' }), width: 100, height: 100 }), _jsx(Typography, Object.assign({ variant: "h2", className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.title", defaultMessage: "ui.course.completedDialog.title" }) })), _jsx(Typography, Object.assign({ variant: "h4", className: classes.descriptionPt1 }, { children: _jsx(FormattedMessage, { id: "ui.course.completedDialog.description.pt1", defaultMessage: "ui.course.completedDialog.description.pt1" }) })), _jsx(Typography, Object.assign({ variant: "h4", className: classes.descriptionPt2 }, { children: intl.formatMessage({ id: 'ui.course.completedDialog.description.pt2', defaultMessage: 'ui.course.completedDialog.description.pt2' }, {
33
33
  courseName: course.name,
34
- span: (chunks) => (_jsx(Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks })))
34
+ span: (chunks) => (_jsx(Typography, Object.assign({ component: "span", variant: "inherit", color: "primary" }, { children: chunks }), "ui.course.completedDialog.description.pt2.span"))
35
35
  }) }))] })) })));
36
36
  }
37
37
  export default memo(CourseCompletedDialog);
@@ -1,6 +1,5 @@
1
1
  import { ButtonProps } from '@mui/material';
2
- import { LoadingButtonProps } from '@mui/lab';
3
- interface ActionButtonProps extends ButtonProps, Omit<LoadingButtonProps, 'classes'> {
2
+ interface ActionButtonProps extends ButtonProps, Omit<ButtonProps, 'classes'> {
4
3
  labelId: string;
5
4
  to?: string;
6
5
  }
@@ -3,11 +3,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Button, Typography } from '@mui/material';
4
4
  import { FormattedMessage } from 'react-intl';
5
5
  import { Link } from '@selfcommunity/react-core';
6
- import { LoadingButton } from '@mui/lab';
7
6
  export default function ActionButton(props) {
8
7
  const { labelId, to, size = 'small', color = 'primary', variant = 'contained' } = props, rest = __rest(props, ["labelId", "to", "size", "color", "variant"]);
9
8
  if (to) {
10
9
  return (_jsx(Button, Object.assign({ component: Link, to: to, size: size, color: color, variant: variant }, rest, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
11
10
  }
12
- return (_jsx(LoadingButton, Object.assign({ size: size, color: color, variant: variant }, rest, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
11
+ return (_jsx(Button, Object.assign({ size: size, color: color, variant: variant }, rest, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: labelId, defaultMessage: labelId }) })) })));
13
12
  }
@@ -4,7 +4,6 @@ import { Fragment, memo, useCallback, useEffect, useMemo, useReducer, useState }
4
4
  import { CacheStrategies, Logger } from '@selfcommunity/utils';
5
5
  import { SCOPE_SC_UI } from '../../../constants/Errors';
6
6
  import { FormattedDate, FormattedMessage } from 'react-intl';
7
- import { LoadingButton } from '@mui/lab';
8
7
  import { PREFIX } from '../constants';
9
8
  import { DEFAULT_PAGINATION_OFFSET } from '../../../constants/Pagination';
10
9
  import { actionWidgetTypes, dataWidgetReducer, stateWidgetInitializer } from '../../../utils/widget';
@@ -101,6 +100,6 @@ function Comments(props) {
101
100
  if (!state.initialized) {
102
101
  return _jsx(CommentsSkeleton, {});
103
102
  }
104
- return (_jsx(Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && _jsx(CommentSkeleton, { id: 1 }), _jsx(LoadingButton, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: isLoading, disabled: !state.next, onClick: handleNext }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.btn.label", defaultMessage: "ui.course.dashboard.teacher.tab.comments.btn.label" }) })) }))] })) : (_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.empty", defaultMessage: "ui.course.dashboard.teacher.tab.comments.empty" }) }))) })));
103
+ return (_jsx(Box, Object.assign({ className: classes.container }, { children: state.count > 0 ? (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.number", defaultMessage: "ui.course.dashboard.teacher.tab.comments.number", values: { commentsNumber: state.count } }) })), renderComments, isLoading && _jsx(CommentSkeleton, { id: 1 }), _jsx(Button, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: isLoading, disabled: !state.next, onClick: handleNext }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.btn.label", defaultMessage: "ui.course.dashboard.teacher.tab.comments.btn.label" }) })) }))] })) : (_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.teacher.tab.comments.empty", defaultMessage: "ui.course.dashboard.teacher.tab.comments.empty" }) }))) })));
105
104
  }
106
105
  export default memo(Comments);
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { LoadingButton } from '@mui/lab';
4
- import { Box, CardActionArea, Card, CardContent, FormGroup, Paper, TextField, Typography, Chip, styled } from '@mui/material';
3
+ import { Box, CardActionArea, Card, CardContent, FormGroup, Paper, TextField, Typography, Chip, styled, Button } from '@mui/material';
5
4
  import { useThemeProps } from '@mui/system';
6
5
  import { CourseService, formatHttpErrorCode } from '@selfcommunity/api-services';
7
6
  import { SCPreferences, UserUtils, useSCPaymentsEnabled, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
@@ -281,11 +280,15 @@ export default function CourseForm(inProps) {
281
280
  /**
282
281
  * Renders root object
283
282
  */
284
- return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(Box, Object.assign({ className: _step === SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === SCCourseFormStepType.GENERAL && (_jsx(Fragment, { children: Object.values(SCCourseTypologyType).map((option, index) => (_jsx(Card, Object.assign({ className: classNames(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF }) }, { children: _jsx(CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: _jsxs(CardContent, { children: [_jsxs(Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [_jsx(FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF && (_jsx(Chip, { variant: "outlined", color: "warning", size: "small", label: _jsx(FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === SCCourseFormStepType.CUSTOMIZATION && (_jsxs(Fragment, { children: [course && (_jsx(Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), _jsxs(FormGroup, Object.assign({ className: classNames(classes.form, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [_jsx(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: _jsx(UploadCourseCover, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), _jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, InputProps: {
285
- endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COURSE_TITLE_MAX_LENGTH - field.name.length }))
286
- }, error: Boolean((!!course && !field.name) || field.name.length > COURSE_TITLE_MAX_LENGTH) || Boolean(error['nameError']), helperText: !!course && !field.name ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : field.name.length > COURSE_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.courseForm.name.error.maxLength", defaultMessage: "ui.courseForm.name.error.maxLength" })) : error['nameError'] ? (error['nameError']) : null }), _jsx(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
287
- endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : COURSE_DESCRIPTION_MAX_LENGTH })))
288
- }, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > COURSE_DESCRIPTION_MAX_LENGTH && (_jsx(FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), _jsx(CategoryAutocomplete, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && _jsx(CourseEdit, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && (_jsx(Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: _jsx(PaywallsConfigurator, Object.assign({}, (course && { contentId: course.id }), { contentType: SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), _jsx(Box, Object.assign({ className: classNames(classes.actions, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: _jsx(LoadingButton, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === SCCourseFormStepType.GENERAL
283
+ return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsxs(Box, Object.assign({ className: _step === SCCourseFormStepType.GENERAL ? classes.stepOne : classes.stepTwo }, { children: [_step === SCCourseFormStepType.GENERAL && (_jsx(Fragment, { children: Object.values(SCCourseTypologyType).map((option, index) => (_jsx(Card, Object.assign({ className: classNames(classes.card, { [classes.selected]: option === field.type }, { [classes.disabled]: !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF }) }, { children: _jsx(CardActionArea, Object.assign({ onClick: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['type']: option }))) }, { children: _jsxs(CardContent, { children: [_jsxs(Typography, Object.assign({ variant: "subtitle2", className: classes.cardTitle }, { children: [_jsx(FormattedMessage, { id: `ui.courseForm.${option}.title`, defaultMessage: `ui.courseForm.${option}.title` }), !courseAdvancedEnabled && option !== SCCourseTypologyType.SELF && (_jsx(Chip, { variant: "outlined", color: "warning", size: "small", label: _jsx(FormattedMessage, { id: "ui.courseForm.comingSoon.chip", defaultMessage: "ui.courseForm.comingSoon.chip" }) }))] })), _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.${option}.info`, defaultMessage: `ui.courseForm.${option}.info` }) }))] }) })) }), index))) })), _step === SCCourseFormStepType.CUSTOMIZATION && (_jsxs(Fragment, { children: [course && (_jsx(Typography, Object.assign({ variant: "h5", className: classes.contrastColor }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.title.general", defaultMessage: "ui.courseForm.edit.title.general" }) }))), _jsxs(FormGroup, Object.assign({ className: classNames(classes.form, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: [_jsx(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: _jsx(UploadCourseCover, { isUploading: field.isSubmitting, onChange: handleChangeCover }) })), _jsx(TextField, { required: true, className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: field.name, name: "name", onChange: handleChange, slotProps: {
284
+ input: {
285
+ endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COURSE_TITLE_MAX_LENGTH - field.name.length }))
286
+ }
287
+ }, error: Boolean((!!course && !field.name) || field.name.length > COURSE_TITLE_MAX_LENGTH) || Boolean(error['nameError']), helperText: !!course && !field.name ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : field.name.length > COURSE_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.courseForm.name.error.maxLength", defaultMessage: "ui.courseForm.name.error.maxLength" })) : error['nameError'] ? (error['nameError']) : null }), _jsx(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, slotProps: {
288
+ input: {
289
+ endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? COURSE_DESCRIPTION_MAX_LENGTH - field.description.length : COURSE_DESCRIPTION_MAX_LENGTH })))
290
+ }
291
+ }, error: Boolean((!!field.privacy && !field.description) || ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > COURSE_DESCRIPTION_MAX_LENGTH), helperText: !!field.privacy && !field.description ? (_jsx(FormattedMessage, { id: "ui.courseForm.required", defaultMessage: "ui.courseForm.required" })) : (((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > COURSE_DESCRIPTION_MAX_LENGTH && (_jsx(FormattedMessage, { id: "ui.courseForm.description.error.maxLength", defaultMessage: "ui.courseForm.description.error.maxLength" }))) }), _jsx(CategoryAutocomplete, { defaultValue: field.categories, TextFieldProps: { label: intl.formatMessage(Object.keys(field.categories).length ? messages.category : messages.categoryEmpty) }, multiple: true, onChange: handleOnChangeCategory }), course && _jsx(CourseEdit, { course: course, onPrivacyChange: (privacy) => setField((prev) => (Object.assign(Object.assign({}, prev), { ['privacy']: privacy }))) }), isPaymentsEnabled && isStaff && !hidePaywalls && (_jsx(Box, Object.assign({ className: classes.paywallsConfiguratorWrap }, { children: _jsx(PaywallsConfigurator, Object.assign({}, (course && { contentId: course.id }), { contentType: SCContentType.COURSE, onChangeContentAccessType: handleChangeContentAccessType, onChangePaymentProducts: handleChangePaymentsProducts })) })))] }))] })), _jsx(Box, Object.assign({ className: classNames(classes.actions, _step === SCCourseFormStepType.CUSTOMIZATION && course ? classes.stepCustomization : undefined) }, { children: _jsx(Button, Object.assign({ size: "small", loading: field.isSubmitting, disabled: _step === SCCourseFormStepType.GENERAL
289
292
  ? !field.type || Object.keys(error).length !== 0
290
293
  : _step === SCCourseFormStepType.CUSTOMIZATION &&
291
294
  (!field.name ||
@@ -43,7 +43,11 @@ export default function CourseEdit(inProps) {
43
43
  /**
44
44
  * Renders root object
45
45
  */
46
- return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [course.privacy === SCCoursePrivacyType.DRAFT && (_jsxs(Box, Object.assign({ className: classes.access }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), _jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), _jsxs(Box, Object.assign({ className: classes.accessInfo }, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.visibility", defaultMessage: "ui.courseForm.edit.access.info.visibility", values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) }))] }))] })] }))] }))), _jsxs(Box, Object.assign({ className: classes.publish }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.title", defaultMessage: "ui.courseForm.edit.publication.title" }) })), notPublishable ? (_jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle.info", defaultMessage: "ui.courseForm.edit.publication.subtitle.info" }) })] }))) : (_jsx(Typography, Object.assign({ variant: "body1", className: classes.publishInfo }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle", defaultMessage: "ui.courseForm.edit.publication.subtitle" }) }))), _jsx(RadioGroup, { children: Object.values(SCCoursePrivacyType)
46
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [course.privacy === SCCoursePrivacyType.DRAFT && (_jsxs(Box, Object.assign({ className: classes.access }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.section.title", defaultMessage: "ui.courseForm.edit.access.section.title" }) })), _jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.title", defaultMessage: "ui.courseForm.edit.access.info.title" }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.subtitle", defaultMessage: "ui.courseForm.edit.access.info.subtitle" }) })), _jsxs(Box, Object.assign({ className: classes.accessInfo }, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.access", defaultMessage: "ui.courseForm.edit.access.info.access", values: { icon: (chunks) => _jsx(Icon, { children: chunks }, "ui.courseForm.edit.access.info.access.icon") } }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.access.info.visibility", defaultMessage: "ui.courseForm.edit.access.info.visibility", values: { icon: (chunks) => _jsx(Icon, { children: chunks }, "ui.courseForm.edit.access.info.visibility.icon") } }) }))] }))] })] }))] }))), _jsxs(Box, Object.assign({ className: classes.publish }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.title", defaultMessage: "ui.courseForm.edit.publication.title" }) })), notPublishable ? (_jsxs(Widget, Object.assign({ className: classes.card }, { children: [_jsx(Icon, Object.assign({ fontSize: "medium", color: "warning" }, { children: "error" })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle.info", defaultMessage: "ui.courseForm.edit.publication.subtitle.info" }) })] }))) : (_jsx(Typography, Object.assign({ variant: "body1", className: classes.publishInfo }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.publication.subtitle", defaultMessage: "ui.courseForm.edit.publication.subtitle" }) }))), _jsx(RadioGroup, { children: Object.values(SCCoursePrivacyType)
47
47
  .filter((option) => option !== SCCoursePrivacyType.DRAFT)
48
- .map((option, index) => (_jsxs(FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [_jsx(FormControlLabel, { control: _jsx(Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), _jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) })), _jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.visibility`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.visibility`, values: { icon: (...chunks) => _jsx(Icon, { children: chunks }) } }) }))] })] }), index))) })] }))] })));
48
+ .map((option, index) => (_jsxs(FormControl, Object.assign({ className: classes.privacyItem, disabled: notPublishable }, { children: [_jsx(FormControlLabel, { control: _jsx(Radio, { size: "small", value: option, checked: option === privacy, onChange: handleChange, disabled: notPublishable }), label: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.title`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.title` }) }), _jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.access`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.access`, values: {
49
+ icon: (chunks) => (_jsx(Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.access.icon`))
50
+ } }) })), _jsx(Typography, Object.assign({ variant: "body1", className: classNames(classes.privacyItemInfo, { [classes.disabled]: notPublishable }) }, { children: _jsx(FormattedMessage, { id: `ui.courseForm.edit.publication.option.${option}.visibility`, defaultMessage: `ui.courseForm.edit.publication.option.${option}.visibility`, values: {
51
+ icon: (chunks) => (_jsx(Icon, { children: chunks }, `ui.courseForm.edit.publication.option.${option}.visibility.icon`))
52
+ } }) }))] })] }), index))) })] }))] })));
49
53
  }
@@ -1,12 +1,11 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useContext, useRef, useState } from 'react';
4
- import { Alert, styled, Icon } from '@mui/material';
4
+ import { Alert, styled, Icon, Button } from '@mui/material';
5
5
  import { SCUserContext } from '@selfcommunity/react-core';
6
6
  import classNames from 'classnames';
7
7
  import { useThemeProps } from '@mui/system';
8
8
  import { PREFIX } from './constants';
9
- import { LoadingButton } from '@mui/lab';
10
9
  import { defineMessages } from 'react-intl';
11
10
  const messages = defineMessages({
12
11
  errorLoadImage: {
@@ -17,7 +16,7 @@ const messages = defineMessages({
17
16
  const classes = {
18
17
  root: `${PREFIX}-upload-course-cover-root`
19
18
  };
20
- const Root = styled(LoadingButton, {
19
+ const Root = styled(Button, {
21
20
  name: PREFIX,
22
21
  slot: 'UploadCourseCoverRoot'
23
22
  })(() => ({}));