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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -1
  2. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -1
  3. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +11 -6
  4. package/lib/cjs/components/AccountDelete/AccountDelete.js +12 -5
  5. package/lib/cjs/components/AccountRecover/AccountRecover.js +4 -2
  6. package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
  7. package/lib/cjs/components/BuyButton/BuyButton.js +5 -8
  8. package/lib/cjs/components/Categories/Categories.js +1 -1
  9. package/lib/cjs/components/Categories/Skeleton.js +1 -1
  10. package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
  11. package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +1 -3
  12. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +4 -3
  13. package/lib/cjs/components/ChangeCover/ChangeCover.js +6 -2
  14. package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +2 -1
  15. package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -1
  16. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
  17. package/lib/cjs/components/Checkout/Skeleton.js +3 -1
  18. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
  19. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +3 -2
  20. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  21. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
  22. package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  23. package/lib/cjs/components/CommunityPaywalls/Skeleton.js +3 -2
  24. package/lib/cjs/components/Composer/Composer.js +4 -3
  25. package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
  26. package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  27. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
  28. package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  29. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -4
  30. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
  31. package/lib/cjs/components/ConsentSolution/ConsentSolution.js +5 -12
  32. package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
  33. package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  34. package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
  35. package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +2 -1
  36. package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +2 -1
  37. package/lib/cjs/components/CourseForm/CourseForm.js +6 -9
  38. package/lib/cjs/components/CourseForm/Edit.js +2 -6
  39. package/lib/cjs/components/CourseForm/UploadCourseCover.js +2 -1
  40. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +4 -3
  41. package/lib/cjs/components/Courses/Courses.d.ts +4 -0
  42. package/lib/cjs/components/Courses/Courses.js +10 -9
  43. package/lib/cjs/components/Courses/Skeleton.js +1 -1
  44. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
  45. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +8 -5
  46. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
  47. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  48. package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -2
  49. package/lib/cjs/components/EditCourse/Lessons/FieldName.js +2 -1
  50. package/lib/cjs/components/EditCourse/Options.js +2 -1
  51. package/lib/cjs/components/EditCourse/Status.js +1 -1
  52. package/lib/cjs/components/Editor/Editor.js +3 -3
  53. package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +2 -4
  54. package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
  55. package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +3 -5
  56. package/lib/cjs/components/EventForm/EventAddress.js +5 -9
  57. package/lib/cjs/components/EventForm/EventForm.js +51 -89
  58. package/lib/cjs/components/EventForm/UploadEventCover.js +2 -1
  59. package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
  60. package/lib/cjs/components/EventInviteButton/EventInviteButton.js +2 -3
  61. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +16 -5
  62. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  63. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -1
  64. package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  65. package/lib/cjs/components/EventMediaWidget/TriggerButton.js +2 -1
  66. package/lib/cjs/components/EventMediaWidget/index.d.ts +1 -2
  67. package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
  68. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
  69. package/lib/cjs/components/Events/Events.d.ts +4 -0
  70. package/lib/cjs/components/Events/Events.js +9 -14
  71. package/lib/cjs/components/Events/LocationEventsFilter.js +1 -5
  72. package/lib/cjs/components/Events/OngoingEventsFilter.js +2 -6
  73. package/lib/cjs/components/Events/PastEventsFilter.js +2 -6
  74. package/lib/cjs/components/Events/Skeleton.js +1 -1
  75. package/lib/cjs/components/Feed/Feed.js +10 -9
  76. package/lib/cjs/components/Feed/Skeleton.js +1 -1
  77. package/lib/cjs/components/FeedObject/Actions/Actions.js +3 -2
  78. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  79. package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +3 -2
  80. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +2 -1
  81. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
  82. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  83. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  84. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  85. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  86. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +2 -1
  87. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  88. package/lib/cjs/components/FollowUserButton/FollowUserButton.js +2 -1
  89. package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +3 -2
  90. package/lib/cjs/components/GroupActionsMenu/index.js +1 -9
  91. package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +3 -5
  92. package/lib/cjs/components/GroupForm/GroupForm.js +27 -16
  93. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
  94. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +7 -8
  95. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
  96. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -3
  97. package/lib/cjs/components/Groups/Groups.js +9 -9
  98. package/lib/cjs/components/Groups/Skeleton.js +2 -1
  99. package/lib/cjs/components/Incubator/Incubator.js +4 -4
  100. package/lib/cjs/components/Incubator/Skeleton.js +1 -1
  101. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  102. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -3
  103. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  104. package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -3
  105. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  106. package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +2 -1
  107. package/lib/cjs/components/LessonAppbar/LessonAppbar.js +4 -3
  108. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  109. package/lib/cjs/components/LessonEditForm/LessonEditForm.js +2 -1
  110. package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
  111. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +12 -15
  112. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
  113. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
  114. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
  115. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  116. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
  117. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  118. package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +16 -17
  119. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  120. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  121. package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
  122. package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
  123. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +5 -2
  124. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
  125. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  126. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  127. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  128. package/lib/cjs/components/Notification/Course/Course.js +10 -5
  129. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +2 -4
  130. package/lib/cjs/components/Notification/Event/Event.js +12 -7
  131. package/lib/cjs/components/Notification/Group/Group.js +4 -3
  132. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  133. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
  134. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
  135. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +9 -4
  136. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  137. package/lib/cjs/components/Notification/Notification.js +9 -17
  138. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +5 -4
  139. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  140. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +2 -6
  141. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +2 -6
  142. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  143. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  144. package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +4 -12
  145. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +27 -19
  146. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  147. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +25 -9
  148. package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
  149. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
  150. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +5 -7
  151. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  152. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +26 -39
  153. package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
  154. package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
  155. package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
  156. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
  157. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
  158. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +6 -8
  159. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
  160. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
  161. package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
  162. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  163. package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
  164. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  165. package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
  166. package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
  167. package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
  168. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  169. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  170. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  171. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  172. package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
  173. package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
  174. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  175. package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
  176. package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +1 -3
  177. package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +8 -9
  178. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +6 -4
  179. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +4 -4
  180. package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
  181. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +22 -30
  182. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
  183. package/lib/cjs/components/UserCounters/UserCounters.js +13 -5
  184. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  185. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
  186. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +3 -24
  187. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +4 -2
  188. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
  189. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +9 -8
  190. package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +2 -1
  191. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
  192. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +20 -9
  193. package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
  194. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  195. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +5 -4
  196. package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
  197. package/lib/cjs/components/VoteButton/VoteButton.js +3 -2
  198. package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +2 -3
  199. package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +2 -1
  200. package/lib/cjs/shared/ContributionActionsMenu/index.js +9 -3
  201. package/lib/cjs/shared/CopyTextArea/index.js +6 -13
  202. package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +2 -1
  203. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +5 -6
  204. package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +2 -1
  205. package/lib/cjs/shared/CourseUsersTable/RequestButton.js +2 -1
  206. package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
  207. package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
  208. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
  209. package/lib/cjs/shared/EventActionsMenu/index.js +1 -9
  210. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
  211. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  212. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +8 -2
  213. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  214. package/lib/cjs/shared/Media/File/DisplayComponent.js +6 -4
  215. package/lib/cjs/shared/Media/File/DocComponent.d.ts +0 -2
  216. package/lib/cjs/shared/Media/File/DocComponent.js +2 -3
  217. package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
  218. package/lib/cjs/shared/Media/File/TriggerButton.js +1 -9
  219. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  220. package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
  221. package/lib/cjs/shared/Media/Link/DisplayComponent.js +12 -4
  222. package/lib/cjs/shared/Media/Link/UrlTextField/index.js +1 -3
  223. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  224. package/lib/cjs/shared/PasswordTextField/index.js +5 -7
  225. package/lib/cjs/shared/ScrollContainer/index.js +2 -2
  226. package/lib/cjs/shared/TagChip/index.d.ts +48 -2
  227. package/lib/cjs/shared/TagChip/index.js +2 -2
  228. package/lib/cjs/shared/Tags/index.js +1 -1
  229. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  230. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
  231. package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  232. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +3 -2
  233. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +3 -2
  234. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +12 -7
  235. package/lib/esm/components/AccountDelete/AccountDelete.js +13 -6
  236. package/lib/esm/components/AccountRecover/AccountRecover.js +4 -2
  237. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  238. package/lib/esm/components/BuyButton/BuyButton.js +6 -9
  239. package/lib/esm/components/Categories/Categories.js +1 -1
  240. package/lib/esm/components/Categories/Skeleton.js +1 -1
  241. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  242. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +2 -4
  243. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +5 -4
  244. package/lib/esm/components/ChangeCover/ChangeCover.js +6 -2
  245. package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +3 -2
  246. package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +3 -2
  247. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +8 -4
  248. package/lib/esm/components/Checkout/Skeleton.js +4 -2
  249. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
  250. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +4 -3
  251. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  252. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +4 -3
  253. package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  254. package/lib/esm/components/CommunityPaywalls/Skeleton.js +3 -2
  255. package/lib/esm/components/Composer/Composer.js +5 -4
  256. package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +3 -5
  257. package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  258. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +9 -13
  259. package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  260. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +3 -5
  261. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
  262. package/lib/esm/components/ConsentSolution/ConsentSolution.js +5 -12
  263. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  264. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  265. package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +2 -1
  266. package/lib/esm/components/CourseDashboard/Student/ActionButton.js +2 -1
  267. package/lib/esm/components/CourseDashboard/Teacher/Comments.js +2 -1
  268. package/lib/esm/components/CourseForm/CourseForm.js +7 -10
  269. package/lib/esm/components/CourseForm/Edit.js +2 -6
  270. package/lib/esm/components/CourseForm/UploadCourseCover.js +3 -2
  271. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +5 -4
  272. package/lib/esm/components/Courses/Courses.d.ts +4 -0
  273. package/lib/esm/components/Courses/Courses.js +9 -9
  274. package/lib/esm/components/Courses/Skeleton.js +1 -1
  275. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +1 -7
  276. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +9 -6
  277. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +5 -6
  278. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  279. package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +4 -3
  280. package/lib/esm/components/EditCourse/Lessons/FieldName.js +3 -2
  281. package/lib/esm/components/EditCourse/Options.js +3 -2
  282. package/lib/esm/components/EditCourse/Status.js +1 -1
  283. package/lib/esm/components/Editor/Editor.js +3 -3
  284. package/lib/esm/components/Editor/plugins/EmojiPlugin.js +2 -4
  285. package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +4 -6
  286. package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +4 -6
  287. package/lib/esm/components/EventForm/EventAddress.js +5 -9
  288. package/lib/esm/components/EventForm/EventForm.js +53 -91
  289. package/lib/esm/components/EventForm/UploadEventCover.js +3 -2
  290. package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
  291. package/lib/esm/components/EventInviteButton/EventInviteButton.js +2 -3
  292. package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +16 -5
  293. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  294. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -1
  295. package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  296. package/lib/esm/components/EventMediaWidget/TriggerButton.js +3 -2
  297. package/lib/esm/components/EventMediaWidget/index.d.ts +1 -2
  298. package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
  299. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +4 -11
  300. package/lib/esm/components/Events/Events.d.ts +4 -0
  301. package/lib/esm/components/Events/Events.js +8 -14
  302. package/lib/esm/components/Events/LocationEventsFilter.js +1 -5
  303. package/lib/esm/components/Events/OngoingEventsFilter.js +2 -6
  304. package/lib/esm/components/Events/PastEventsFilter.js +2 -6
  305. package/lib/esm/components/Events/Skeleton.js +1 -1
  306. package/lib/esm/components/Feed/Feed.js +11 -10
  307. package/lib/esm/components/Feed/Skeleton.js +2 -2
  308. package/lib/esm/components/FeedObject/Actions/Actions.js +3 -2
  309. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  310. package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +4 -3
  311. package/lib/esm/components/FeedObject/Actions/Share/Share.js +2 -1
  312. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +18 -20
  313. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  314. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  315. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  316. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  317. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +3 -2
  318. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  319. package/lib/esm/components/FollowUserButton/FollowUserButton.js +3 -2
  320. package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +4 -3
  321. package/lib/esm/components/GroupActionsMenu/index.js +1 -9
  322. package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +4 -6
  323. package/lib/esm/components/GroupForm/GroupForm.js +28 -17
  324. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +15 -5
  325. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +7 -8
  326. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -10
  327. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +5 -4
  328. package/lib/esm/components/Groups/Groups.js +9 -9
  329. package/lib/esm/components/Groups/Skeleton.js +2 -1
  330. package/lib/esm/components/Incubator/Incubator.js +4 -4
  331. package/lib/esm/components/Incubator/Skeleton.js +1 -1
  332. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  333. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +5 -4
  334. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  335. package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +5 -4
  336. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  337. package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +3 -2
  338. package/lib/esm/components/LessonAppbar/LessonAppbar.js +5 -4
  339. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  340. package/lib/esm/components/LessonEditForm/LessonEditForm.js +3 -2
  341. package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +16 -24
  342. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +13 -16
  343. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +8 -10
  344. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +1 -5
  345. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +3 -7
  346. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  347. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +3 -1
  348. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  349. package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +10 -11
  350. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  351. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  352. package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
  353. package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +1 -9
  354. package/lib/esm/components/NavigationToolbar/NotificationMenu.js +5 -2
  355. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +1 -3
  356. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  357. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  358. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  359. package/lib/esm/components/Notification/Course/Course.js +11 -6
  360. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +2 -4
  361. package/lib/esm/components/Notification/Event/Event.js +13 -8
  362. package/lib/esm/components/Notification/Group/Group.js +5 -4
  363. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  364. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +1 -3
  365. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +3 -5
  366. package/lib/esm/components/Notification/LiveStream/LiveStream.js +10 -5
  367. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  368. package/lib/esm/components/Notification/Notification.js +10 -18
  369. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +6 -5
  370. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  371. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +2 -6
  372. package/lib/esm/components/Notification/UserConnection/UserConnection.js +2 -6
  373. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  374. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  375. package/lib/esm/components/OnBoardingWidget/ActionsButton.js +4 -12
  376. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +28 -20
  377. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  378. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +25 -9
  379. package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +14 -17
  380. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +9 -3
  381. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +6 -8
  382. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  383. package/lib/esm/components/PaymentOrders/PaymentOrders.js +26 -39
  384. package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
  385. package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
  386. package/lib/esm/components/Paywalls/Skeleton.js +1 -1
  387. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
  388. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
  389. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +7 -9
  390. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -3
  391. package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
  392. package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
  393. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  394. package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
  395. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  396. package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +4 -6
  397. package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +1 -9
  398. package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +8 -10
  399. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  400. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  401. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  402. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  403. package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
  404. package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +7 -9
  405. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  406. package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
  407. package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +3 -5
  408. package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +9 -10
  409. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +7 -5
  410. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +6 -6
  411. package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
  412. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +22 -30
  413. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +2 -1
  414. package/lib/esm/components/UserCounters/UserCounters.js +13 -5
  415. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  416. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
  417. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +3 -24
  418. package/lib/esm/components/UserPaymentMethods/Skeleton.js +4 -2
  419. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +3 -25
  420. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +12 -11
  421. package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +3 -2
  422. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +7 -10
  423. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +23 -12
  424. package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
  425. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  426. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +6 -5
  427. package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
  428. package/lib/esm/components/VoteButton/VoteButton.js +4 -3
  429. package/lib/esm/shared/AddUsersButton/AddUsersButton.js +2 -3
  430. package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +2 -1
  431. package/lib/esm/shared/ContributionActionsMenu/index.js +9 -3
  432. package/lib/esm/shared/CopyTextArea/index.js +6 -13
  433. package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +3 -2
  434. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +6 -7
  435. package/lib/esm/shared/CourseUsersTable/RemoveButton.js +3 -2
  436. package/lib/esm/shared/CourseUsersTable/RequestButton.js +3 -2
  437. package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
  438. package/lib/esm/shared/DateTimeAgo/index.js +2 -2
  439. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +2 -1
  440. package/lib/esm/shared/EventActionsMenu/index.js +1 -9
  441. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +4 -3
  442. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  443. package/lib/esm/shared/LessonCommentActionsMenu/index.js +8 -2
  444. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  445. package/lib/esm/shared/Media/File/DisplayComponent.js +6 -4
  446. package/lib/esm/shared/Media/File/DocComponent.d.ts +0 -2
  447. package/lib/esm/shared/Media/File/DocComponent.js +2 -3
  448. package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
  449. package/lib/esm/shared/Media/File/TriggerButton.js +1 -9
  450. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  451. package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
  452. package/lib/esm/shared/Media/Link/DisplayComponent.js +13 -5
  453. package/lib/esm/shared/Media/Link/UrlTextField/index.js +1 -3
  454. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  455. package/lib/esm/shared/PasswordTextField/index.js +5 -7
  456. package/lib/esm/shared/ScrollContainer/index.js +1 -1
  457. package/lib/esm/shared/TagChip/index.d.ts +48 -2
  458. package/lib/esm/shared/TagChip/index.js +2 -2
  459. package/lib/esm/shared/Tags/index.js +1 -1
  460. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  461. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
  462. package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  463. package/lib/umd/155.js +2 -0
  464. package/lib/umd/155.js.LICENSE.txt +24 -0
  465. package/lib/umd/react-ui.js +1 -1
  466. package/package.json +206 -207
  467. package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +0 -8
  468. package/lib/cjs/components/EventLocationWidget/EventMap.js +0 -28
  469. package/lib/esm/components/EventLocationWidget/EventMap.d.ts +0 -8
  470. package/lib/esm/components/EventLocationWidget/EventMap.js +0 -25
  471. package/lib/umd/484.js +0 -2
  472. package/lib/umd/484.js.LICENSE.txt +0 -9
@@ -32,7 +32,7 @@ function ChangePictureDialog(props) {
32
32
  const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
33
33
  const scContext = (0, react_1.useContext)(react_core_1.SCContext);
34
34
  //STATE
35
- const [, setFile] = (0, react_1.useState)(scUserContext.user['avatar']);
35
+ const [file, setFile] = (0, react_1.useState)(scUserContext.user['avatar']);
36
36
  const [error, setError] = (0, react_1.useState)(false);
37
37
  const [alert, setAlert] = (0, react_1.useState)(false);
38
38
  const [primary, setPrimary] = (0, react_1.useState)(null);
@@ -177,8 +177,12 @@ function ChangePictureDialog(props) {
177
177
  * Renders root object
178
178
  */
179
179
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.dialogRoot, className), title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.changePicture.title", id: "ui.changePicture.title" }), onClose: onClose, open: open }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.upload }, { children: [alert ? ((0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ color: "error", onClose: () => setAlert(false) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.button.upload.alert", defaultMessage: "ui.changePicture.button.upload.alert" }) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", { type: "file", onChange: handleUpload, ref: fileInput, hidden: true, accept: ".gif,.png,.jpg,.jpeg" }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: loading || isDeletingAvatar, variant: "outlined", onClick: () => fileInput.current.click(), color: error ? 'error' : 'primary', startIcon: loading ? null : (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "folder_open" }) }, { children: loading ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 15 })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: error ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.button.upload.error", defaultMessage: "ui.changePicture.button.upload.error" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.button.upload", defaultMessage: "ui.changePicture.button.upload" })) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", fontSize: "small", color: "text.secondary", gutterBottom: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.info", defaultMessage: "ui.changePicture.info", values: {
180
- li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }, "ui.changePicture.info.li"),
181
- ul: (chunks) => (0, jsx_runtime_1.jsx)("ul", { children: chunks }, "ui.changePicture.info.ul")
182
- } }) }))] })), (0, jsx_runtime_1.jsx)(material_1.ImageList, Object.assign({ cols: 3, rowHeight: "auto", id: "avatarsList", classes: { root: classes.imagesList } }, { children: avatars.map((avatar) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.imageItem }, { children: (0, jsx_runtime_1.jsxs)(material_1.ImageListItem, Object.assign({ className: primary === avatar.id ? classes.primary : '', onClick: () => selectPrimaryAvatar(avatar) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: avatar.avatar, loading: "lazy", alt: "img" }), (0, jsx_runtime_1.jsx)(material_1.ImageListItemBar, { position: "top", actionIcon: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(avatar.id), size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) })) })] }), avatar.id) }), avatar.id))) })), openDeleteAvatarDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteAvatarDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.dialog.msg", defaultMessage: "ui.changePicture.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.dialog.confirm", defaultMessage: "ui.changePicture.dialog.confirm" }), onConfirm: deleteAvatar, isUpdating: isDeletingAvatar, onClose: () => setOpenDeleteAvatarDialog(false) }))] })));
180
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
181
+ // @ts-ignore
182
+ li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }),
183
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
184
+ // @ts-ignore
185
+ ul: (chunks) => (0, jsx_runtime_1.jsx)("ul", { children: chunks })
186
+ } }) }))] })), (0, jsx_runtime_1.jsx)(material_1.ImageList, Object.assign({ cols: 3, rowHeight: 'auto', id: "avatarsList", classes: { root: classes.imagesList } }, { children: avatars.map((avatar) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.imageItem }, { children: (0, jsx_runtime_1.jsxs)(material_1.ImageListItem, Object.assign({ className: primary === avatar.id ? classes.primary : '', onClick: () => selectPrimaryAvatar(avatar) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: avatar.avatar, loading: "lazy", alt: 'img' }), (0, jsx_runtime_1.jsx)(material_1.ImageListItemBar, { position: "top", actionIcon: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleOpen(avatar.id), size: "small" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) })) })] }), avatar.id) }), avatar.id))) })), openDeleteAvatarDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteAvatarDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.dialog.msg", defaultMessage: "ui.changePicture.dialog.msg" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.changePicture.dialog.confirm", defaultMessage: "ui.changePicture.dialog.confirm" }), onConfirm: deleteAvatar, isUpdating: isDeletingAvatar, onClose: () => setOpenDeleteAvatarDialog(false) }))] })));
183
187
  }
184
188
  exports.default = ChangePictureDialog;
@@ -80,6 +80,8 @@ const Root = (0, material_1.styled)(material_1.Grid, {
80
80
  */
81
81
  function CheckoutSkeleton(inProps) {
82
82
  const { className = {} } = inProps, rest = tslib_1.__rest(inProps, ["className"]);
83
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%" }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.left, classes.paper, classes.header) }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150, width: "100%" }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.right, classes.header) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ sx: { display: { xs: 'none', md: 'flex' } }, direction: "column", spacing: 2, pt: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, width: 190 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 90, width: "100%" })] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: (0, classnames_1.default)(classes.left, classes.paper) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 30, width: 140 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150 }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: { xs: 'none', md: 'block' } } }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 200 })] }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.right }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: { xs: 'none', md: 'block' } } }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 70 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 340 })] }))] })) }))] })));
83
+ // HOOKS
84
+ const theme = (0, material_1.useTheme)();
85
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 6, className: (0, classnames_1.default)(classes.left, classes.paper, classes.header) }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150, width: '100%' }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 6, className: (0, classnames_1.default)(classes.right, classes.header) }, { children: (0, jsx_runtime_1.jsx)(material_1.Hidden, Object.assign({ mdDown: true }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "column", spacing: 2, pt: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, width: 190 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 90, width: '100%' })] })) })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 6, className: (0, classnames_1.default)(classes.left, classes.paper) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 30, width: 140 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 150 }), (0, jsx_runtime_1.jsxs)(material_1.Hidden, Object.assign({ mdDown: true }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 200 })] }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 6, className: classes.right }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 110 }), (0, jsx_runtime_1.jsxs)(material_1.Hidden, Object.assign({ mdDown: true }, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 70 }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 340 })] }))] })) }))] })));
84
86
  }
85
87
  exports.default = CheckoutSkeleton;
@@ -29,9 +29,9 @@ const Root = (0, material_1.styled)(material_1.Dialog, {
29
29
  const Transition = react_1.default.forwardRef(function Transition(props, ref) {
30
30
  return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
31
31
  });
32
- const NoTransition = function NoTransition(props) {
33
- return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: props.children });
34
- };
32
+ const NoTransition = react_1.default.forwardRef(function NoTransition(props, ref) {
33
+ return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
34
+ });
35
35
  function CheckoutReturnDialog(inProps) {
36
36
  // PROPS
37
37
  const props = (0, system_1.useThemeProps)({
@@ -42,7 +42,7 @@ function CheckoutReturnDialog(inProps) {
42
42
  // STATE
43
43
  const [loading, setLoading] = (0, react_1.useState)(true);
44
44
  const [contentType, setContentType] = (0, react_1.useState)(null);
45
- const [, setContentId] = (0, react_1.useState)(null);
45
+ const [contentId, setContentId] = (0, react_1.useState)(null);
46
46
  const [content, setContent] = (0, react_1.useState)(null);
47
47
  const [paymentPrice, setPaymentPrice] = (0, react_1.useState)(null);
48
48
  // HOOKS
@@ -138,25 +138,25 @@ function CheckoutReturnDialog(inProps) {
138
138
  if (contentType === types_1.SCContentType.EVENT) {
139
139
  footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: paymentPrice && paymentPrice.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.recurrent.event", defaultMessage: "ui.checkoutReturnDialog.buy.recurrent.event", values: {
140
140
  frequency: (0, checkout_1.getPaymentRecurringLabel)(paymentPrice.recurring_interval, scContext.settings.locale.default)
141
- } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.event", defaultMessage: "ui.checkoutReturnDialog.buy.event" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: "contained", onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.event.button", defaultMessage: "ui.checkoutReturnDialog.event.button" }) }))] }));
141
+ } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.event", defaultMessage: "ui.checkoutReturnDialog.buy.event" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: 'contained', onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.event.button", defaultMessage: "ui.checkoutReturnDialog.event.button" }) }))] }));
142
142
  }
143
143
  else if (contentType === types_1.SCContentType.CATEGORY) {
144
- footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy", defaultMessage: "ui.checkoutReturnDialog.buy" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: "contained", onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.category.button", defaultMessage: "ui.checkoutReturnDialog.category.button" }) }))] }));
144
+ footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy", defaultMessage: "ui.checkoutReturnDialog.buy" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: 'contained', onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.category.button", defaultMessage: "ui.checkoutReturnDialog.category.button" }) }))] }));
145
145
  }
146
146
  else if (contentType === types_1.SCContentType.COURSE) {
147
147
  footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: paymentPrice && paymentPrice.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.recurrent.course", defaultMessage: "ui.checkoutReturnDialog.buy.recurrent.course", values: {
148
148
  frequency: (0, checkout_1.getPaymentRecurringLabel)(paymentPrice.recurring_interval, scContext.settings.locale.default)
149
- } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.course", defaultMessage: "ui.checkoutReturnDialog.buy.course" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: "contained", onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.course.button", defaultMessage: "ui.checkoutReturnDialog.course.button" }) }))] }));
149
+ } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.course", defaultMessage: "ui.checkoutReturnDialog.buy.course" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: 'contained', onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.course.button", defaultMessage: "ui.checkoutReturnDialog.course.button" }) }))] }));
150
150
  }
151
151
  else if (contentType === types_1.SCContentType.GROUP) {
152
152
  footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: paymentPrice && paymentPrice.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.recurrent.group", defaultMessage: "ui.checkoutReturnDialog.buy.recurrent.group", values: {
153
153
  frequency: (0, checkout_1.getPaymentRecurringLabel)(paymentPrice.recurring_interval, scContext.settings.locale.default)
154
- } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.group", defaultMessage: "ui.checkoutReturnDialog.buy.group" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: "contained", onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.group.button", defaultMessage: "ui.checkoutReturnDialog.group.button" }) }))] }));
154
+ } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.group", defaultMessage: "ui.checkoutReturnDialog.buy.group" })) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: 'contained', onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.group.button", defaultMessage: "ui.checkoutReturnDialog.group.button" }) }))] }));
155
155
  }
156
156
  else if (contentType === types_1.SCContentType.COMMUNITY) {
157
157
  footer = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [paymentPrice && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.payment.success", defaultMessage: "ui.checkoutReturnDialog.payment.success" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: paymentPrice.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.recurrent.community", defaultMessage: "ui.checkoutReturnDialog.buy.recurrent.community", values: {
158
158
  frequency: (0, checkout_1.getPaymentRecurringLabel)(paymentPrice.recurring_interval, scContext.settings.locale.default)
159
- } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.community", defaultMessage: "ui.checkoutReturnDialog.buy.community" })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: "contained", onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.community.button", defaultMessage: "ui.checkoutReturnDialog.community.button" }) }))] }));
159
+ } })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.buy.community", defaultMessage: "ui.checkoutReturnDialog.buy.community" })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "medium", variant: 'contained', onClick: handleViewPurchasedObject, component: react_core_1.Link, className: classes.btn }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.checkoutReturnDialog.community.button", defaultMessage: "ui.checkoutReturnDialog.community.button" }) }))] }));
160
160
  }
161
161
  return ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ spacing: 2, justifyContent: "center", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(Grow_1.default, Object.assign({ in: true, style: { transitionDelay: '300ms' } }, { children: (0, jsx_runtime_1.jsx)("img", { src: success_1.default, className: classes.img, alt: intl.formatMessage({
162
162
  id: 'ui.checkoutReturnDialog.buy',
@@ -166,6 +166,6 @@ function CheckoutReturnDialog(inProps) {
166
166
  if (!isPaymentsEnabled) {
167
167
  return null;
168
168
  }
169
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ maxWidth: "sm", fullWidth: true, scroll: "paper", open: true }, (disableInitialTransition ? { slots: { transition: NoTransition } } : { slots: { transition: Transition } }), { className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: renderTitle() }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: loading ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}) : renderContent() })] })));
169
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ maxWidth: 'sm', fullWidth: true, scroll: 'paper', open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className), TransitionComponent: Transition }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: renderTitle() }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: loading ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}) : renderContent() })] })));
170
170
  }
171
171
  exports.default = CheckoutReturnDialog;
@@ -9,6 +9,7 @@ const material_1 = require("@mui/material");
9
9
  const react_core_1 = require("@selfcommunity/react-core");
10
10
  const Editor_1 = tslib_1.__importDefault(require("../Editor"));
11
11
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
12
+ const lab_1 = require("@mui/lab");
12
13
  const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
13
14
  const UserAvatar_1 = tslib_1.__importDefault(require("../../shared/UserAvatar"));
14
15
  const system_1 = require("@mui/system");
@@ -76,7 +77,7 @@ function CommentObjectReply(inProps) {
76
77
  const theme = (0, material_1.useTheme)();
77
78
  const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
78
79
  // REFS
79
- let editor = (0, react_1.useRef)(null);
80
+ let editor = (0, react_1.useRef)();
80
81
  /**
81
82
  * When CommentObjectReply is mount
82
83
  * if autoFocus === true focus on editor
@@ -132,6 +133,6 @@ function CommentObjectReply(inProps) {
132
133
  // RENDER
133
134
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id }, rest, { disableTypography: true, onClick: handleEditorFocus, elevation: elevation, className: (0, classnames_1.default)(classes.root, className), image: showAvatar &&
134
135
  (!scUserContext.user ? ((0, jsx_runtime_1.jsx)(material_1.Avatar, { variant: "circular", className: classes.avatar })) : ((0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !scUserContext.user.community_badge }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar, classes: { root: classes.avatar } }) })))), secondary: (0, jsx_runtime_1.jsxs)(Widget_1.default, Object.assign({ className: (0, classnames_1.default)(classes.comment, { [classes.hasValue]: !isEditorEmpty }) }, WidgetProps, { children: [media && media.length > 0 && (0, jsx_runtime_1.jsx)(PreviewComponent_1.default, { value: media, onChange: handleChangeMedias, className: classes.media }), (0, jsx_runtime_1.jsx)(Editor_1.default, Object.assign({ ref: editor, onChange: handleChangeText, defaultValue: html, editable: editable, uploadImage: true, action: replyIcon &&
135
- onReply && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleReply, className: classes.iconReply, disabled: uploadingMedia }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) }))) }, EditorProps, { MediaPluginProps: { isUploading: setUploadingMedia, onMediaAdd: handleChangeMedia } })), !isEditorEmpty && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 2, className: classes.actions }, { children: [onReply && !replyIcon && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", onClick: handleReply, loading: !editable, className: classes.buttonReply }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.reply", defaultMessage: "ui.commentObject.replyComment.reply" }) }))), onSave && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [onCancel && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handleCancel, disabled: !editable, color: "inherit", className: classes.buttonCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.cancel", defaultMessage: "ui.commentObject.replyComment.cancel" }) }))), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", onClick: handleSave, loading: !editable, className: classes.buttonSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.save", defaultMessage: "ui.commentObject.replyComment.save" }) }))] }))] })))] })) })));
136
+ onReply && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleReply, className: classes.iconReply, disabled: uploadingMedia }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "send" }) }))) }, EditorProps, { MediaPluginProps: { isUploading: setUploadingMedia, onMediaAdd: handleChangeMedia } })), !isEditorEmpty && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 2, className: classes.actions }, { children: [onReply && !replyIcon && ((0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: "outlined", size: "small", onClick: handleReply, loading: !editable, className: classes.buttonReply }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.reply", defaultMessage: "ui.commentObject.replyComment.reply" }) }))), onSave && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [onCancel && ((0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: 'text', size: "small", onClick: handleCancel, disabled: !editable, color: "inherit", className: classes.buttonCancel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.cancel", defaultMessage: "ui.commentObject.replyComment.cancel" }) }))), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: "outlined", size: "small", onClick: handleSave, loading: !editable, className: classes.buttonSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentObject.replyComment.save", defaultMessage: "ui.commentObject.replyComment.save" }) }))] }))] })))] })) })));
136
137
  }
137
138
  exports.default = CommentObjectReply;
@@ -80,7 +80,7 @@ function CommentsFeedObject(inProps) {
80
80
  const objId = commentsObject.feedObject ? commentsObject.feedObject.id : null;
81
81
  const commentObjId = commentObj ? commentObj.id : null;
82
82
  // REFS
83
- const commentsContainerRef = (0, react_1.useRef)(null);
83
+ const commentsContainerRef = (0, react_1.useRef)();
84
84
  /**
85
85
  * Total number of comments
86
86
  */
@@ -90,7 +90,7 @@ function CommentsFeedObject(inProps) {
90
90
  */
91
91
  const renderTitle = (0, react_1.useMemo)(() => () => {
92
92
  if (showTitle) {
93
- return ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", gutterBottom: true, color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
93
+ return ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", gutterBottom: true, color: 'inherit' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
94
94
  }
95
95
  return null;
96
96
  }, [total, isLoading]);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const Unstable_Grid2_1 = tslib_1.__importDefault(require("@mui/material/Unstable_Grid2"));
6
7
  const material_1 = require("@mui/material");
7
8
  const system_1 = require("@mui/system");
8
9
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
@@ -17,10 +18,10 @@ const Errors_1 = require("../../constants/Errors");
17
18
  const classes = {
18
19
  root: `${constants_1.PREFIX}-root`
19
20
  };
20
- const Root = (0, material_1.styled)(material_1.Grid, {
21
+ const Root = (0, material_1.styled)(Unstable_Grid2_1.default, {
21
22
  slot: 'Root',
22
23
  name: constants_1.PREFIX
23
- })(() => ({}));
24
+ })(({ theme }) => ({}));
24
25
  function CommunityPaywalls(inProps) {
25
26
  // PROPS
26
27
  const props = (0, system_1.useThemeProps)({
@@ -63,6 +64,6 @@ function CommunityPaywalls(inProps) {
63
64
  if (loading) {
64
65
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
65
66
  }
66
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 4 } }, { children: (0, jsx_runtime_1.jsx)(PaymentProduct_1.default, Object.assign({ paymentProduct: p, contentType: types_1.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))) })));
67
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, spacing: 4 }, rest, { children: scCommunity.paywalls.map((p, i) => ((0, jsx_runtime_1.jsx)(Unstable_Grid2_1.default, Object.assign({ xs: 12, sm: 12, md: 4 }, { children: (0, jsx_runtime_1.jsx)(PaymentProduct_1.default, Object.assign({ paymentProduct: p, contentType: types_1.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))) })));
67
68
  }
68
69
  exports.default = CommunityPaywalls;
@@ -1,6 +1,6 @@
1
- import { GridProps } from '@mui/material';
2
1
  import { PaymentProductSkeletonProps } from '../PaymentProduct/Skeleton';
3
- export interface CommunityPaywallsSkeletonProps extends GridProps {
2
+ import { Grid2Props } from '@mui/material/Unstable_Grid2';
3
+ export interface CommunityPaywallsSkeletonProps extends Grid2Props {
4
4
  className?: string;
5
5
  PaymentProductSkeletonComponentProps?: PaymentProductSkeletonProps;
6
6
  }
@@ -24,4 +24,4 @@ export interface CommunityPaywallsSkeletonProps extends GridProps {
24
24
  |root|.SCCommunityPaywallSkeleton-skeleton-root|Styles applied to the root element.|
25
25
  *
26
26
  */
27
- export default function CommunityPaywallsSkeleton(inProps: CommunityPaywallsSkeletonProps): JSX.Element;
27
+ export default function CommunityPaywallsSkeleton(inProps: any): JSX.Element;
@@ -6,12 +6,13 @@ const material_1 = require("@mui/material");
6
6
  const constants_1 = require("./constants");
7
7
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
8
  const Skeleton_1 = tslib_1.__importDefault(require("../PaymentProduct/Skeleton"));
9
+ const Unstable_Grid2_1 = tslib_1.__importDefault(require("@mui/material/Unstable_Grid2"));
9
10
  const system_1 = require("@mui/system");
10
11
  const classes = {
11
12
  root: `${constants_1.PREFIX}-skeleton-root`,
12
13
  products: `${constants_1.PREFIX}-products`
13
14
  };
14
- const Root = (0, material_1.styled)(material_1.Grid, {
15
+ const Root = (0, material_1.styled)(Unstable_Grid2_1.default, {
15
16
  name: constants_1.PREFIX,
16
17
  slot: 'SkeletonRoot'
17
18
  })(() => ({
@@ -47,6 +48,6 @@ function CommunityPaywallsSkeleton(inProps) {
47
48
  // HOOKS
48
49
  const theme = (0, material_1.useTheme)();
49
50
  const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
50
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, width: "100%", spacing: 4 }, rest, { children: [...Array(isMobile ? 2 : 3)].map((_product, index) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 4 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ variant: "outlined" }, PaymentProductSkeletonComponentProps)) }), index))) })));
51
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), container: true, spacing: 4 }, rest, { children: [...Array(isMobile ? 2 : 3)].map((product, index) => ((0, jsx_runtime_1.jsx)(Unstable_Grid2_1.default, Object.assign({ xs: 4 }, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({ variant: 'outlined' }, PaymentProductSkeletonComponentProps)) }), index))) })));
51
52
  }
52
53
  exports.default = CommunityPaywallsSkeleton;
@@ -10,6 +10,7 @@ const react_intl_1 = require("react-intl");
10
10
  const material_1 = require("@mui/material");
11
11
  const Composer_1 = require("../../constants/Composer");
12
12
  const Media_1 = require("../../constants/Media");
13
+ const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
13
14
  const AudienceLayer_1 = tslib_1.__importDefault(require("./Layer/AudienceLayer"));
14
15
  const utils_1 = require("@selfcommunity/utils");
15
16
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
@@ -203,7 +204,7 @@ function Composer(inProps) {
203
204
  const [isLoading, setIsLoading] = (0, react_1.useState)(editMode);
204
205
  const [loadError, setLoadError] = (0, react_1.useState)(false);
205
206
  // REFS
206
- const dialogRef = (0, react_1.useRef)(null);
207
+ const dialogRef = (0, react_1.useRef)();
207
208
  const unloadRef = (0, react_1.useRef)(false);
208
209
  const pointerStartY = (0, react_1.useRef)(null);
209
210
  // Create a ref for medias because of state update error on chunk upload
@@ -460,7 +461,7 @@ function Composer(inProps) {
460
461
  });
461
462
  mediasRef.current.medias = _medias;
462
463
  }, []);
463
- const handleMediaTriggerClick = (0, react_1.useCallback)((mediaObjectType) => () => {
464
+ const handleMediaTriggerClick = (0, react_1.useCallback)((mediaObjectType) => (e) => {
464
465
  if (mediaObjectType.layerComponent) {
465
466
  handleAddLayer({
466
467
  name: mediaObjectType.name,
@@ -694,7 +695,7 @@ function Composer(inProps) {
694
695
  if (!scUserContext.user && !(scUserContext.loading && open)) {
695
696
  return null;
696
697
  }
697
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: dialogRef, slots: { backdrop: BackdropScrollDisabled_1.default, transition: DialogTransition }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: (0, classnames_1.default)(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [(0, jsx_runtime_1.jsxs)("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClosePrompt }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(Attributes_1.default, { value: { categories, event, group, addressing, recipients, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
698
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: dialogRef, TransitionComponent: DialogTransition, slots: { backdrop: BackdropScrollDisabled_1.default }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: (0, classnames_1.default)(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [(0, jsx_runtime_1.jsxs)("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleClosePrompt }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) })), (0, jsx_runtime_1.jsx)(LoadingButton_1.default, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(Attributes_1.default, { value: { categories, event, group, addressing, recipients, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
698
699
  if (mediaObjectType.previewComponent) {
699
700
  return (0, jsx_runtime_1.jsx)(mediaObjectType.previewComponent, { value: medias, onChange: handleChangeMedias }, mediaObjectType.name);
700
701
  }
@@ -21,7 +21,7 @@ const classes = {
21
21
  const Root = (0, material_1.styled)(material_1.Box, {
22
22
  name: constants_1.PREFIX,
23
23
  slot: 'ContentDiscussionRoot'
24
- })(() => ({}));
24
+ })(({ theme }) => ({}));
25
25
  /**
26
26
  * Default post
27
27
  */
@@ -82,9 +82,7 @@ exports.default = (props) => {
82
82
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.generalError }, { children: [generalError && (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.composer.error.${generalError}`, defaultMessage: `ui.composer.error.${generalError}` }), categoriesError && categoriesError, (0, jsx_runtime_1.jsx)("br", {}), addressingError && addressingError] }))), (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.title, ref: titleRef, placeholder: intl.formatMessage({
83
83
  id: 'ui.composer.content.discussion.title.label',
84
84
  defaultMessage: 'ui.composer.content.discussion.title.label'
85
- }), autoFocus: true, fullWidth: true, variant: "outlined", value: value.title, onChange: handleChangeTitle, onKeyDown: handleKeyDownTitle, multiline: true, slotProps: {
86
- input: {
87
- endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Composer_1.COMPOSER_TITLE_MAX_LENGTH - value.title.length }))
88
- }
85
+ }), autoFocus: true, fullWidth: true, variant: "outlined", value: value.title, onChange: handleChangeTitle, onKeyDown: handleKeyDownTitle, multiline: true, InputProps: {
86
+ endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Composer_1.COMPOSER_TITLE_MAX_LENGTH - value.title.length }))
89
87
  }, error: Boolean(titleError), helperText: titleError, disabled: disabled }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { [`& .${constants_2.PREFIX}-content`]: { maxHeight: `${editorMaxHeight} !important` } } }, { children: (0, jsx_runtime_1.jsx)(Editor_1.default, Object.assign({}, EditorProps, { editable: !disabled, className: classes.editor, onChange: handleChangeHtml, defaultValue: value.html })) }))] })));
90
88
  };
@@ -21,14 +21,14 @@ const classes = {
21
21
  const Root = (0, material_1.styled)(material_1.Box, {
22
22
  name: constants_1.PREFIX,
23
23
  slot: 'ContentLessonRoot'
24
- })(() => ({}));
24
+ })(({ theme }) => ({}));
25
25
  exports.default = (props) => {
26
26
  // PROPS
27
27
  const { className = null, value, error = {}, disabled = false, onChange, onMediaChange, EditorProps = {} } = props;
28
28
  const { error: generalError = null } = Object.assign({}, error);
29
29
  const mediaObjectTypes = [Media_1.File, Media_1.Link];
30
30
  const [medias, setMedias] = (0, react_1.useState)((value === null || value === void 0 ? void 0 : value.medias) || []);
31
- const [openLink, setOpenLink] = (0, react_1.useState)(false);
31
+ const [openLink, setOpenLink] = (0, react_1.useState)();
32
32
  const linkInputRef = (0, react_1.useRef)(null);
33
33
  // HANDLERS
34
34
  const handleChangeHtml = (0, react_1.useCallback)((html) => {
@@ -9,15 +9,15 @@ const react_sortablejs_1 = require("react-sortablejs");
9
9
  const x_date_pickers_1 = require("@mui/x-date-pickers");
10
10
  const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
11
11
  const Composer_1 = require("../../../../constants/Composer");
12
- const it_1 = require("date-fns/locale/it");
13
- const en_US_1 = require("date-fns/locale/en-US");
12
+ const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
13
+ const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
14
14
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
15
15
  const system_1 = require("@mui/system");
16
16
  const date_fns_1 = require("date-fns");
17
17
  const constants_1 = require("../../constants");
18
18
  const localeMap = {
19
- en: it_1.it,
20
- it: en_US_1.enUS
19
+ en: en_US_1.default,
20
+ it: it_1.default
21
21
  };
22
22
  const classes = {
23
23
  root: `${constants_1.PREFIX}-content-poll-root`,
@@ -99,14 +99,10 @@ exports.default = (inProps) => {
99
99
  minDate.setDate(minDate.getDate() + Composer_1.COMPOSER_POLL_MIN_CLOSE_DATE_DELTA);
100
100
  return minDate;
101
101
  }, []);
102
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.generalError }, { children: [generalError && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.composer.content.poll.error.${generalError}`, defaultMessage: `ui.composer.content.poll.error.${generalError}` })), categoriesError && categoriesError, (0, jsx_runtime_1.jsx)("br", {}), addressingError && addressingError] }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { autoFocus: true, disabled: disabled, label: (0, jsx_runtime_1.jsx)(react_intl_1.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: {
103
- input: {
104
- endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Composer_1.COMPOSER_POLL_TITLE_MAX_LENGTH - poll.title.length }))
105
- }
106
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.choices }, { children: (0, jsx_runtime_1.jsx)(react_sortablejs_1.ReactSortable, Object.assign({ list: [...poll.choices], setList: handleSortChoices, tag: SortableComponent }, { children: poll.choices.map((choice, index) => ((0, jsx_runtime_1.jsx)(material_1.TextField, { placeholder: intl.formatMessage(messages.choicePlaceholder), value: choice.choice, onChange: handleChangeChoice(index), variant: "outlined", disabled: disabled, slotProps: {
107
- input: {
108
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "drag" }) }))),
109
- endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: poll.choices.length <= Composer_1.COMPOSER_POLL_MIN_CHOICES ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.choice.delete.disabled", defaultMessage: "ui.composer.content.poll.choice.delete.disabled" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.choice.delete", defaultMessage: "ui.composer.content.poll.choice.delete" })) }, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleDeleteChoice(index), disabled: poll.choices.length <= Composer_1.COMPOSER_POLL_MIN_CHOICES, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) })) }) })) })))
110
- }
102
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && ((0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.generalError }, { children: [generalError && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.composer.content.poll.error.${generalError}`, defaultMessage: `ui.composer.content.poll.error.${generalError}` })), categoriesError && categoriesError, (0, jsx_runtime_1.jsx)("br", {}), addressingError && addressingError] }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { autoFocus: true, disabled: disabled, label: (0, jsx_runtime_1.jsx)(react_intl_1.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: {
103
+ endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: Composer_1.COMPOSER_POLL_TITLE_MAX_LENGTH - poll.title.length }))
104
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.choices }, { children: (0, jsx_runtime_1.jsx)(react_sortablejs_1.ReactSortable, Object.assign({ list: [...poll.choices], setList: handleSortChoices, tag: SortableComponent }, { children: poll.choices.map((choice, index) => ((0, jsx_runtime_1.jsx)(material_1.TextField, { placeholder: intl.formatMessage(messages.choicePlaceholder), value: choice.choice, onChange: handleChangeChoice(index), variant: "outlined", disabled: disabled, InputProps: {
105
+ startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "drag" }) }))),
106
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: poll.choices.length <= Composer_1.COMPOSER_POLL_MIN_CHOICES ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.choice.delete.disabled", defaultMessage: "ui.composer.content.poll.choice.delete.disabled" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.choice.delete", defaultMessage: "ui.composer.content.poll.choice.delete" })) }, { children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleDeleteChoice(index), disabled: poll.choices.length <= Composer_1.COMPOSER_POLL_MIN_CHOICES, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) })) }) })) })))
111
107
  } }, index))) })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.choiceNew }, { children: (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ color: "inherit", variant: "text", onClick: handleAddChoice }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "add" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.choice.add", defaultMessage: "ui.composer.choice.add" })] })) })), (0, jsx_runtime_1.jsx)(material_1.Divider, {}), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.metadata }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: poll.multiple_choices, onChange: handleChangeMultiple }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.multiple", defaultMessage: "ui.composer.content.poll.multiple" }) }), (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: localeMap[intl.locale] }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { disabled: disabled, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.content.poll.expiration", defaultMessage: "ui.composer.content.poll.expiration" }), value: typeof poll.expiration_at === 'string' ? (0, date_fns_1.parseISO)(poll.expiration_at) : poll.expiration_at, onChange: handleChangeExpiration, slotProps: { textField: { variant: 'outlined' } }, minDate: minDate }) }))] }))] })));
112
108
  };
@@ -17,7 +17,7 @@ const classes = {
17
17
  const Root = (0, material_1.styled)(material_1.Box, {
18
18
  name: constants_1.PREFIX,
19
19
  slot: 'ContentPostRoot'
20
- })(() => ({}));
20
+ })(({ theme }) => ({}));
21
21
  /**
22
22
  * Default post
23
23
  */
@@ -35,7 +35,7 @@ exports.default = (props) => {
35
35
  const { className = null, value = Object.assign({}, DEFAULT_POST), error = {}, disabled = false, onChange, EditorProps = {} } = props;
36
36
  const { categoriesError = null, addressingError = null, error: generalError = null } = Object.assign({}, error);
37
37
  // REF
38
- const editorRef = (0, react_1.useRef)(null);
38
+ const editorRef = (0, react_1.useRef)();
39
39
  // EFFECTS
40
40
  (0, react_1.useEffect)(() => {
41
41
  editorRef && editorRef.current && editorRef.current.focus();
@@ -128,14 +128,12 @@ const AudienceLayer = react_1.default.forwardRef((props, ref) => {
128
128
  };
129
129
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: ref, className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.title", defaultMessage: "ui.composer.layer.audience.title" }) }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.save", defaultMessage: "ui.composer.layer.save" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ value: audience, onChange: handleChangeAudience, "aria-label": "audience type" }, { children: [!taggingRequiredEnabled && ((0, jsx_runtime_1.jsx)(material_1.Tab, { value: AudienceTypes.AUDIENCE_ALL, icon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.all", defaultMessage: "ui.composer.layer.audience.all" }) })), eventsEnabled && ((0, jsx_runtime_1.jsx)(material_1.Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_EVENT), value: AudienceTypes.AUDIENCE_EVENT, icon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.event", defaultMessage: "ui.composer.layer.audience.event" }) })), groupsEnabled && ((0, jsx_runtime_1.jsx)(material_1.Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_GROUP), value: AudienceTypes.AUDIENCE_GROUP, icon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "groups" }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.group", defaultMessage: "ui.composer.layer.audience.group" }) })), (0, jsx_runtime_1.jsx)(material_1.Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_TAG), value: AudienceTypes.AUDIENCE_TAG, icon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "label" }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.tag", defaultMessage: "ui.composer.layer.audience.tag" }) }), usersTaggingEnabled && ((0, jsx_runtime_1.jsx)(material_1.Tab, { disabled: isAudienceTypeSelected(AudienceTypes.AUDIENCE_USERS), value: AudienceTypes.AUDIENCE_USERS, icon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "people_alt" }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.users", defaultMessage: "ui.composer.layer.audience.users" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.message }, { children: [audience === AudienceTypes.AUDIENCE_ALL && !taggingRequiredEnabled && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.all.message", defaultMessage: "ui.composer.layer.audience.all.message" })), audience === AudienceTypes.AUDIENCE_EVENT && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.event.message", defaultMessage: "ui.composer.layer.audience.event.message" })), audience === AudienceTypes.AUDIENCE_GROUP && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.group.message", defaultMessage: "ui.composer.layer.audience.group.message" })), audience === AudienceTypes.AUDIENCE_TAG && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.tag.message", defaultMessage: "ui.composer.layer.audience.tag.message" })), audience === AudienceTypes.AUDIENCE_USERS && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.audience.users.message", defaultMessage: "ui.composer.layer.audience.users.message" }))] })), audience === AudienceTypes.AUDIENCE_TAG && ((0, jsx_runtime_1.jsx)(material_1.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: (0, jsx_runtime_1.jsx)(react_intl_1.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) => {
130
130
  return value.map((option, index) => (0, jsx_runtime_1.jsx)(TagChip_1.default, Object.assign({ tag: option }, getTagProps({ index }), { showDescription: true }), option.id));
131
- }, renderOption: (props, option, { inputValue }) => {
131
+ }, renderOption: (props, option, { selected, inputValue }) => {
132
132
  const matches = (0, match_1.default)(option.name, inputValue);
133
133
  const parts = (0, parse_1.default)(option.name, matches);
134
134
  return ((0, jsx_runtime_1.jsx)("li", Object.assign({}, props, { children: (0, jsx_runtime_1.jsx)(TagChip_1.default, { showDescription: true, disposable: false, tag: option, label: (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: parts.map((part, index) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ style: { fontWeight: part.highlight ? 700 : 400 } }, { children: part.text }), index))) }) }, option.id) })));
135
135
  }, renderInput: (params) => {
136
- return ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, TextFieldProps, { slotProps: {
137
- input: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'addressing', endAdornment: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: params.InputProps.endAdornment }) })
138
- } })));
136
+ return ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, TextFieldProps, { InputProps: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'addressing', endAdornment: (0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: params.InputProps.endAdornment }) }) })));
139
137
  } })), audience === AudienceTypes.AUDIENCE_USERS && (0, jsx_runtime_1.jsx)(UserAutocomplete_1.default, { onChange: handleUsersChange, defaultValue: value }), audience === AudienceTypes.AUDIENCE_GROUP && (0, jsx_runtime_1.jsx)(GroupAutocomplete_1.default, { onChange: handleGroupChange, defaultValue: value }), audience === AudienceTypes.AUDIENCE_EVENT && (0, jsx_runtime_1.jsx)(EventAutocomplete_1.default, { onChange: handleEventChange, defaultValue: value })] }))] })));
140
138
  });
141
139
  exports.default = AudienceLayer;
@@ -7,8 +7,8 @@ const react_intl_1 = require("react-intl");
7
7
  const material_1 = require("@mui/material");
8
8
  const x_date_pickers_1 = require("@mui/x-date-pickers");
9
9
  const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
10
- const it_1 = require("date-fns/locale/it");
11
- const en_US_1 = require("date-fns/locale/en-US");
10
+ const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
11
+ const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
12
12
  const react_core_1 = require("@selfcommunity/react-core");
13
13
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
14
  const date_fns_1 = require("date-fns");
@@ -31,7 +31,7 @@ const ScheduledLayer = react_1.default.forwardRef((props, ref) => {
31
31
  const { className, onClose, onSave, defaultValue = null } = props, rest = tslib_1.__rest(props, ["className", "onClose", "onSave", "defaultValue"]);
32
32
  //CONTEXT
33
33
  const scContext = (0, react_core_1.useSCContext)();
34
- const locale = scContext.settings.locale.default === 'it' ? it_1.it : en_US_1.enUS;
34
+ const locale = scContext.settings.locale.default === 'it' ? it_1.default : en_US_1.default;
35
35
  // STATE
36
36
  const [scheduledAt, setScheduledAt] = (0, react_1.useState)(defaultValue ? (typeof defaultValue === 'string' ? (0, date_fns_1.parseISO)(defaultValue) : defaultValue) : null);
37
37
  const handleUpdate = (0, react_1.useCallback)((value) => {
@@ -40,15 +40,15 @@ const ScheduledLayer = react_1.default.forwardRef((props, ref) => {
40
40
  onSave(value);
41
41
  }
42
42
  }, [onSave]);
43
- const CustomToolbar = () => {
44
- const { value } = (0, x_date_pickers_1.usePickerContext)();
43
+ const CustomToolbar = (props) => {
44
+ const { value } = props;
45
45
  if (!value)
46
46
  return null;
47
47
  const dayName = (0, utils_1.capitalize)((0, date_fns_1.format)(value, 'EEEE', { locale }));
48
48
  const restOfDate = (0, date_fns_1.format)(value, 'd MMMM yyyy • HH:mm', { locale });
49
49
  return (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4" }, { children: `${dayName} ${restOfDate}` }));
50
50
  };
51
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: ref, className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.title", defaultMessage: "Programma la Pubblicazione" }) }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: () => onSave(scheduledAt), disabled: !scheduledAt }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.submit", defaultMessage: "Attiva Programmazione" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.message }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.message", defaultMessage: "ui.composer.audience.scheduled.message" }) })), (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: locale }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.StaticDateTimePicker, { className: classes.picker, disablePast: true, value: scheduledAt, onChange: setScheduledAt, onAccept: handleUpdate, slots: {
51
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ ref: ref, className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.title", defaultMessage: "Programma la Pubblicazione" }) }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: () => onSave(scheduledAt), disabled: !scheduledAt }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.submit", defaultMessage: "Attiva Programmazione" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.message }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.layer.scheduled.message", defaultMessage: "ui.composer.audience.scheduled.message" }) })), (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: locale }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.StaticDateTimePicker, { className: classes.picker, disablePast: true, value: scheduledAt, onChange: (value) => setScheduledAt(value), onAccept: handleUpdate, slots: {
52
52
  toolbar: CustomToolbar,
53
53
  tabs: (props) => (0, jsx_runtime_1.jsx)(x_date_pickers_1.DateTimePickerTabs, Object.assign({}, props)),
54
54
  actionBar: () => null
@@ -125,6 +125,7 @@ function ConsentSolution(inProps) {
125
125
  const [loading, setLoading] = (0, react_1.useState)(true);
126
126
  const [loadingAck, setLoadingAck] = (0, react_1.useState)(false);
127
127
  const [rejected, setRejected] = (0, react_1.useState)(false);
128
+ const [dataPortability, setDataPortability] = (0, react_1.useState)(null);
128
129
  const [dataPortabilityChecked, setDataPortabilityChecked] = (0, react_1.useState)(false);
129
130
  const [loadingDeleteAccount, setLoadingDeleteAccount] = (0, react_1.useState)(false);
130
131
  // CONST
@@ -247,7 +248,7 @@ function ConsentSolution(inProps) {
247
248
  const isAccept = Boolean(doc.ack && doc.ack.accepted_at);
248
249
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: classes.title }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.acceptDocumentTitle", defaultMessage: "ui.consentSolution.acceptDocumentTitle", values: { label: doc.title } }) })), (0, jsx_runtime_1.jsx)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true, ref: contentDialog }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "div", gutterBottom: true, dangerouslySetInnerHTML: {
249
250
  __html: (0, legalPages_1.getDocumentBody)(doc)
250
- } }) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { className: classes.consentSwitch, control: (0, jsx_runtime_1.jsx)(ConsentSolutionSwitch_1.default, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? ((0, jsx_runtime_1.jsxs)(material_1.Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), (0, jsx_runtime_1.jsx)("a", Object.assign({ onClick: () => setView(exports.REJECTION_VIEW), className: classes.deleteAccountButton }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: handleNext, className: classes.nextButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.nextButton", defaultMessage: "ui.consentSolution.nextButton" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: !isAccept, onClick: (e) => handleClose(e, null), className: classes.closeButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.closeButton", defaultMessage: "ui.consentSolution.closeButton" }) })))] }))] }));
251
+ } }) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.consent, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { className: classes.consentSwitch, control: (0, jsx_runtime_1.jsx)(ConsentSolutionSwitch_1.default, { loading: loadingAck, disabled: loadingAck, checked: isAccept, onChange: () => handleChangeConsent(!isAccept), name: "consent" }), label: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchLabel", defaultMessage: "ui.consentSolution.consentSwitchLabel" }) }) }), rejected ? ((0, jsx_runtime_1.jsxs)(material_1.Alert, Object.assign({ severity: "error", className: classes.alertAcceptDocument }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountAlert", defaultMessage: "ui.consentSolution.deleteAccountAlert" }), (0, jsx_runtime_1.jsx)("a", Object.assign({ onClick: () => setView(exports.REJECTION_VIEW), className: classes.deleteAccountButton }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccount", defaultMessage: "ui.consentSolution.deleteAccount" }) }) }))] }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", className: classes.acceptConditions }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.consentSwitchDetail", defaultMessage: "ui.consentSolution.consentSwitchDetail" }) })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [currentDocument > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", onClick: () => setCurrentDocument((prev) => prev - 1), className: classes.backButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) }))), currentDocument < documents.length - 1 ? ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', disabled: !isAccept, onClick: handleNext, className: classes.nextButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.nextButton", defaultMessage: "ui.consentSolution.nextButton" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', disabled: !isAccept, onClick: (e) => handleClose(e, null), className: classes.closeButton }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.closeButton", defaultMessage: "ui.consentSolution.closeButton" }) })))] }))] }));
251
252
  };
252
253
  /**
253
254
  * Render document detail view
@@ -257,19 +258,13 @@ function ConsentSolution(inProps) {
257
258
  if (!doc) {
258
259
  return null;
259
260
  }
260
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setView(exports.ACCEPT_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(AccountDataPortability_1.default, { className: classes.dataPortability }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionTitle", defaultMessage: "ui.consentSolution.deleteAccountDpSectionTitle", values: { username: (0, utils_1.capitalize)(scUserContext.user.username) } }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
261
- communityName,
262
- li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.1")
263
- }) }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { className: classes.dataPortabilityCheck, checked: dataPortabilityChecked, onChange: () => setDataPortabilityChecked((p) => !p) }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel", defaultMessage: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel" }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete_outlined" }), disabled: !dataPortabilityChecked, variant: "contained", className: classes.confirmDeleteAccountButton, onClick: () => setView(exports.CONFIRM_DELETE_ACCOUNT) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.confirmDeleteAccountButton", defaultMessage: "ui.consentSolution.confirmDeleteAccountButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", className: classes.logoutAccountButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "upload" }), onClick: handleLogout }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.logoutImmediatelyButton", defaultMessage: "ui.consentSolution.logoutImmediatelyButton" }) }))] }))] }));
261
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', onClick: () => setView(exports.ACCEPT_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(AccountDataPortability_1.default, { className: classes.dataPortability }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionTitle", defaultMessage: "ui.consentSolution.deleteAccountDpSectionTitle", values: { username: (0, utils_1.capitalize)(scUserContext.user.username) } }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, { communityName, li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }) }) }), (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { className: classes.dataPortabilityCheck, checked: dataPortabilityChecked, onChange: () => setDataPortabilityChecked((p) => !p) }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel", defaultMessage: "ui.consentSolution.deleteAccountDpSectionCheckboxLabel" }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete_outlined" }), disabled: !dataPortabilityChecked, variant: 'contained', className: classes.confirmDeleteAccountButton, onClick: () => setView(exports.CONFIRM_DELETE_ACCOUNT) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.confirmDeleteAccountButton", defaultMessage: "ui.consentSolution.confirmDeleteAccountButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', className: classes.logoutAccountButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "upload" }), onClick: handleLogout }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.logoutImmediatelyButton", defaultMessage: "ui.consentSolution.logoutImmediatelyButton" }) }))] }))] }));
264
262
  };
265
263
  /**
266
264
  * Render delete account view
267
265
  */
268
266
  const renderDeleteAccountView = () => {
269
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(exports.REJECTION_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountTitle", defaultMessage: "ui.consentSolution.removeAccountTitle" }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, {
270
- communityName,
271
- li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }, "ui.consentSolution.deleteAccountDpSectionInfo.li.2")
272
- }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirm", defaultMessage: "ui.consentSolution.removeAccountConfirm" }) }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: () => setView(exports.REJECTION_VIEW) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountCancelButton", defaultMessage: "ui.consentSolution.removeAccountCancelButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: "outlined", onClick: handleConfirmDeleteAccount }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirmButton", defaultMessage: "ui.consentSolution.removeAccountConfirmButton" }) }))] }))] }));
267
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.titleBack) }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: () => setView(exports.REJECTION_VIEW), className: classes.backButton, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "arrow_back" }) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.backButton", defaultMessage: "ui.consentSolution.backButton" }) })) })), (0, jsx_runtime_1.jsxs)(material_1.DialogContent, Object.assign({ className: classes.content, dividers: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountTitle", defaultMessage: "ui.consentSolution.removeAccountTitle" }) })), (0, jsx_runtime_1.jsx)("ul", { children: intl.formatMessage(messages.deleteAccountDpSectionInfo, { communityName, li: (chunks) => (0, jsx_runtime_1.jsx)("li", { children: chunks }) }) }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirm", defaultMessage: "ui.consentSolution.removeAccountConfirm" }) }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, Object.assign({ className: classes.actions }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: () => setView(exports.REJECTION_VIEW) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountCancelButton", defaultMessage: "ui.consentSolution.removeAccountCancelButton" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", disabled: loadingDeleteAccount, variant: 'outlined', onClick: handleConfirmDeleteAccount }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.consentSolution.removeAccountConfirmButton", defaultMessage: "ui.consentSolution.removeAccountConfirmButton" }) }))] }))] }));
273
268
  };
274
269
  /**
275
270
  * If there's no authUserId, component is hidden.
@@ -303,8 +298,6 @@ function ConsentSolution(inProps) {
303
298
  /**
304
299
  * Renders root object
305
300
  */
306
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: (0, classnames_1.default)(classes.root, className), slots: {
307
- transition: DialogTransition
308
- }, maxWidth: "md", fullWidth: true, open: ready, disableEscapeKeyDown: true, onClose: handleClose, scroll: "paper" }, rest, { children: content() }))) }));
301
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: open && ((0, jsx_runtime_1.jsx)(Root, Object.assign({ "aria-describedby": "consent--solution-dialog", className: (0, classnames_1.default)(classes.root, className), TransitionComponent: DialogTransition, maxWidth: 'md', fullWidth: true, open: ready, disableEscapeKeyDown: true, onClose: handleClose, scroll: 'paper' }, rest, { children: content() }))) }));
309
302
  }
310
303
  exports.default = ConsentSolution;