@selfcommunity/react-ui 0.11.0-mui7.17 → 0.11.0-mui7.19

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 (189) hide show
  1. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -2
  2. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
  3. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +4 -9
  4. package/lib/cjs/components/AccountDelete/AccountDelete.js +2 -9
  5. package/lib/cjs/components/BuyButton/BuyButton.js +1 -2
  6. package/lib/cjs/components/Categories/Categories.js +1 -1
  7. package/lib/cjs/components/Categories/Skeleton.js +1 -1
  8. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
  9. package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
  10. package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
  11. package/lib/cjs/components/Checkout/Skeleton.js +1 -1
  12. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +1 -2
  13. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +1 -1
  14. package/lib/cjs/components/Composer/Composer.js +1 -2
  15. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +4 -4
  16. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +5 -5
  17. package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
  18. package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
  19. package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
  20. package/lib/cjs/components/CourseForm/CourseForm.js +1 -2
  21. package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
  22. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
  23. package/lib/cjs/components/Courses/Courses.js +3 -3
  24. package/lib/cjs/components/Courses/Skeleton.js +1 -1
  25. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +1 -2
  26. package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
  27. package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
  28. package/lib/cjs/components/EditCourse/Options.js +1 -2
  29. package/lib/cjs/components/EventForm/EventForm.js +5 -6
  30. package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
  31. package/lib/cjs/components/EventInviteButton/EventInviteButton.js +1 -2
  32. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
  33. package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  34. package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
  35. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +1 -2
  36. package/lib/cjs/components/Events/Events.js +4 -4
  37. package/lib/cjs/components/Events/Skeleton.js +1 -1
  38. package/lib/cjs/components/Feed/Feed.js +1 -1
  39. package/lib/cjs/components/Feed/Skeleton.js +1 -1
  40. package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
  41. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
  42. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
  43. package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
  44. package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
  45. package/lib/cjs/components/GroupForm/GroupForm.js +1 -2
  46. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +1 -2
  47. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
  48. package/lib/cjs/components/Groups/Groups.js +2 -2
  49. package/lib/cjs/components/Groups/Skeleton.js +1 -1
  50. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -3
  51. package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
  52. package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
  53. package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
  54. package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
  55. package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +3 -3
  56. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +1 -2
  57. package/lib/cjs/components/Notification/Course/Course.js +1 -6
  58. package/lib/cjs/components/Notification/Event/Event.js +3 -8
  59. package/lib/cjs/components/Notification/Group/Group.js +1 -2
  60. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +1 -6
  61. package/lib/cjs/components/Notification/Notification.js +13 -5
  62. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +1 -2
  63. package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +3 -4
  64. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +5 -6
  65. package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
  66. package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
  67. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
  68. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -1
  69. package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
  70. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -2
  71. package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
  72. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +2 -4
  73. package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
  74. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +8 -9
  75. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  76. package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
  77. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -2
  78. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +4 -5
  79. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  80. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
  81. package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
  82. package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
  83. package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +1 -2
  84. package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  85. package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
  86. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +2 -3
  87. package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
  88. package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
  89. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  90. package/lib/cjs/shared/Media/File/DisplayComponent.js +2 -2
  91. package/lib/cjs/shared/ScrollContainer/index.js +2 -2
  92. package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  93. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
  94. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
  95. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +5 -10
  96. package/lib/esm/components/AccountDelete/AccountDelete.js +3 -10
  97. package/lib/esm/components/BuyButton/BuyButton.js +2 -3
  98. package/lib/esm/components/Categories/Categories.js +1 -1
  99. package/lib/esm/components/Categories/Skeleton.js +1 -1
  100. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
  101. package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
  102. package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
  103. package/lib/esm/components/Checkout/Skeleton.js +1 -1
  104. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +2 -3
  105. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +1 -1
  106. package/lib/esm/components/Composer/Composer.js +2 -3
  107. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +4 -4
  108. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
  109. package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
  110. package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
  111. package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
  112. package/lib/esm/components/CourseForm/CourseForm.js +2 -3
  113. package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
  114. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
  115. package/lib/esm/components/Courses/Courses.js +3 -3
  116. package/lib/esm/components/Courses/Skeleton.js +1 -1
  117. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +1 -2
  118. package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
  119. package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
  120. package/lib/esm/components/EditCourse/Options.js +2 -3
  121. package/lib/esm/components/EventForm/EventForm.js +6 -7
  122. package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
  123. package/lib/esm/components/EventInviteButton/EventInviteButton.js +1 -2
  124. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
  125. package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  126. package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
  127. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +1 -2
  128. package/lib/esm/components/Events/Events.js +4 -4
  129. package/lib/esm/components/Events/Skeleton.js +1 -1
  130. package/lib/esm/components/Feed/Feed.js +1 -1
  131. package/lib/esm/components/Feed/Skeleton.js +1 -1
  132. package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
  133. package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
  134. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
  135. package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
  136. package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
  137. package/lib/esm/components/GroupForm/GroupForm.js +2 -3
  138. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +1 -2
  139. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
  140. package/lib/esm/components/Groups/Groups.js +2 -2
  141. package/lib/esm/components/Groups/Skeleton.js +1 -1
  142. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
  143. package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
  144. package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
  145. package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
  146. package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
  147. package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +3 -3
  148. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +2 -3
  149. package/lib/esm/components/Notification/Course/Course.js +2 -7
  150. package/lib/esm/components/Notification/Event/Event.js +4 -9
  151. package/lib/esm/components/Notification/Group/Group.js +2 -3
  152. package/lib/esm/components/Notification/LiveStream/LiveStream.js +2 -7
  153. package/lib/esm/components/Notification/Notification.js +14 -6
  154. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +2 -3
  155. package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +3 -4
  156. package/lib/esm/components/PaymentOrders/PaymentOrders.js +5 -6
  157. package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
  158. package/lib/esm/components/Paywalls/Skeleton.js +1 -1
  159. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
  160. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +1 -1
  161. package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
  162. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -2
  163. package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
  164. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +2 -4
  165. package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
  166. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +8 -9
  167. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  168. package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
  169. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -2
  170. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +5 -6
  171. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  172. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
  173. package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
  174. package/lib/esm/components/VoteButton/VoteButton.js +3 -4
  175. package/lib/esm/shared/AddUsersButton/AddUsersButton.js +1 -2
  176. package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  177. package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
  178. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +3 -4
  179. package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
  180. package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
  181. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  182. package/lib/esm/shared/Media/File/DisplayComponent.js +2 -2
  183. package/lib/esm/shared/ScrollContainer/index.js +1 -1
  184. package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  185. package/lib/umd/484.js +2 -0
  186. package/lib/umd/react-ui.js +1 -1
  187. package/package.json +15 -15
  188. package/lib/umd/54.js +0 -2
  189. /package/lib/umd/{54.js.LICENSE.txt → 484.js.LICENSE.txt} +0 -0
@@ -39,5 +39,5 @@ export default function PaywallsSkeleton(inProps) {
39
39
  // HOOKS
40
40
  const theme = useTheme();
41
41
  const isMobile = useMediaQuery(theme.breakpoints.down('md'));
42
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => (_jsx(Grid, { children: _jsx(PaymentProductSkeleton, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }, index))) })) })));
42
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => (_jsx(Grid, Object.assign({ size: 12 }, { children: _jsx(PaymentProductSkeleton, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }), index))) })) })));
43
43
  }
@@ -39,5 +39,5 @@ export default function PaywallsConfiguratorSkeleton(inProps) {
39
39
  // HOOKS
40
40
  const theme = useTheme();
41
41
  const isMobile = useMediaQuery(theme.breakpoints.down('md'));
42
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => (_jsx(Grid, { children: _jsx(PaymentProductSkeleton, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }, index))) })) })));
42
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, width: "100%", spacing: { xs: 3 }, className: classes.products }, { children: [...Array(isMobile ? 1 : 2)].map((_product, index) => (_jsx(Grid, Object.assign({ size: 12 }, { children: _jsx(PaymentProductSkeleton, Object.assign({ elevation: 0, variant: "outlined" }, PaymentProductSkeletonProps)) }), index))) })) })));
43
43
  }
@@ -58,5 +58,5 @@ export default function PdfPreviewDialog(inProps) {
58
58
  }
59
59
  return (_jsxs(Root, Object.assign({ fullScreen: true, scroll: "paper", open: true, maxWidth: "md" }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), slots: {
60
60
  transition: Transition
61
- }, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [_jsx(AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: _jsxs(Toolbar, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && (_jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: _jsx(Icon, { children: "download" }) }))), _jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: _jsx(Icon, { children: "close" }) }))] }) })), _jsx(Grid, Object.assign({ container: true, width: "100%", className: classes.content }, { children: _jsx(Grid, Object.assign({ justifyContent: "center", alignContent: "center" }, { children: _jsx(PdfPreview, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
61
+ }, DialogContentProps: { sx: { overflow: 'hidden' } } }, rest, { children: [_jsx(AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: _jsxs(Toolbar, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && (_jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: _jsx(Icon, { children: "download" }) }))), _jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: _jsx(Icon, { children: "close" }) }))] }) })), _jsx(Grid, Object.assign({ container: true, width: "100%", className: classes.content }, { children: _jsx(Grid, Object.assign({ size: 12, justifyContent: "center", alignContent: "center" }, { children: _jsx(PdfPreview, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
62
62
  }
@@ -34,5 +34,5 @@ const Root = styled(Widget, {
34
34
  *
35
35
  */
36
36
  export default function PlatformWidgetSkeleton(props) {
37
- return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", justifyContent: "center", className: classes.content }, { children: [_jsx(Grid, Object.assign({ className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: 170 }) })), _jsxs(Grid, Object.assign({ className: classes.actions }, { children: [_jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 })] })), _jsx(Grid, Object.assign({ justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: _jsx(Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
37
+ return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", justifyContent: "center", className: classes.content }, { children: [_jsx(Grid, Object.assign({ size: 12, className: classes.title }, { children: _jsx(Skeleton, { animation: "wave", height: 25, width: 170 }) })), _jsxs(Grid, Object.assign({ size: 12, className: classes.actions }, { children: [_jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 }), _jsx(Skeleton, { animation: "wave", height: 35, width: 110 })] })), _jsx(Grid, Object.assign({ size: 12, justifyContent: "center", alignItems: "center", className: classes.tutorial }, { children: _jsx(Skeleton, { animation: "wave", variant: "circular", width: 25, height: 25 }) }))] })) })));
38
38
  }
@@ -151,7 +151,7 @@ export default function PrivateMessageComponent(inProps) {
151
151
  * Renders snippets section
152
152
  */
153
153
  function renderSnippets() {
154
- return (_jsx(Grid, Object.assign({ size: { md: 5 }, className: classNames(classes.snippetsBox, { [classes.hide]: isMobile && mobileThreadView }) }, { children: _jsx(PrivateMessageSnippets, { snippetActions: {
154
+ return (_jsx(Grid, Object.assign({ size: { xs: 12, md: 5 }, className: classNames(classes.snippetsBox, { [classes.hide]: isMobile && mobileThreadView }) }, { children: _jsx(PrivateMessageSnippets, { snippetActions: {
155
155
  onSnippetClick: handleThreadOpening,
156
156
  onNewMessageClick: handleOpenNewMessage,
157
157
  onDeleteConfirm: handleDeleteThread
@@ -161,7 +161,7 @@ export default function PrivateMessageComponent(inProps) {
161
161
  * Renders thread section
162
162
  */
163
163
  function renderThread() {
164
- return (_jsx(Grid, Object.assign({ size: { md: 7 }, className: classNames(classes.threadBox, { [classes.hide]: isMobile && mobileSnippetsView }) }, { children: _jsx(PrivateMessageThread, { threadObj: obj, type: _type, openNewMessage: openNewMessage, onNewMessageClose: handleMessageBack, onNewMessageSent: handleOnNewMessageSent, onSingleMessageOpen: handleSingleMessage, elevation: 0 }) })));
164
+ return (_jsx(Grid, Object.assign({ size: { xs: 12, md: 7 }, className: classNames(classes.threadBox, { [classes.hide]: isMobile && mobileSnippetsView }) }, { children: _jsx(PrivateMessageThread, { threadObj: obj, type: _type, openNewMessage: openNewMessage, onNewMessageClose: handleMessageBack, onNewMessageSent: handleOnNewMessageSent, onSingleMessageOpen: handleSingleMessage, elevation: 0 }) })));
165
165
  }
166
166
  /**
167
167
  * Renders the component (if not hidden by autoHide prop)
@@ -39,5 +39,5 @@ export default function PrivateMessageComponentSkeleton(props) {
39
39
  const { className } = props;
40
40
  const theme = useTheme();
41
41
  const isMobile = useMediaQuery(theme.breakpoints.down('md'));
42
- return (_jsxs(Root, Object.assign({ container: true, width: "100%", className: classNames(classes.root, className) }, { children: [!isMobile && (_jsx(Grid, Object.assign({ size: { md: 5 }, className: classes.snippetsSection }, { children: _jsx(PrivateMessageSnippetsSkeleton, {}) }))), _jsx(Grid, Object.assign({ size: { md: 7 }, className: classes.threadSection }, { children: _jsx(PrivateMessageThreadSkeleton, {}) }))] })));
42
+ return (_jsxs(Root, Object.assign({ container: true, width: "100%", className: classNames(classes.root, className) }, { children: [!isMobile && (_jsx(Grid, Object.assign({ size: { xs: 12, md: 5 }, className: classes.snippetsSection }, { children: _jsx(PrivateMessageSnippetsSkeleton, {}) }))), _jsx(Grid, Object.assign({ size: { xs: 12, md: 7 }, className: classes.threadSection }, { children: _jsx(PrivateMessageThreadSkeleton, {}) }))] })));
43
43
  }
@@ -1,17 +1,15 @@
1
1
  import { __awaiter, __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { useState } from 'react';
4
- import { styled } from '@mui/material/styles';
5
4
  import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
6
5
  import { useThemeProps } from '@mui/system';
7
6
  import { PREFIX } from './constants';
8
7
  import BaseDialog from '../../shared/BaseDialog';
9
8
  import { FormattedMessage, useIntl } from 'react-intl';
10
9
  import { loadStripe } from '@stripe/stripe-js';
11
- import { Button, Paper, Stack, Typography } from '@mui/material';
10
+ import { Button, Paper, Stack, styled, Typography } from '@mui/material';
12
11
  import { AddressElement, PaymentElement, useElements } from '@stripe/react-stripe-js';
13
12
  import { getDefaultLocale } from '../../utils/payment';
14
- import { LoadingButton } from '@mui/lab';
15
13
  import { useSnackbar } from 'notistack';
16
14
  const classes = {
17
15
  root: `${PREFIX}-root`,
@@ -136,5 +134,5 @@ export default function UserAddPaymentMethodForm(inProps) {
136
134
  }, options: {
137
135
  mode: 'billing',
138
136
  defaultValues: addressState
139
- } }), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements || loading || !ready, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: _jsx(FormattedMessage, { id: 'ui.userAddPaymentMethodForm.useDefaultMethod', defaultMessage: 'ui.userAddPaymentMethodForm.useDefaultMethod' }) }))] })) }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 2, mt: 3 }, { children: [_jsx(Button, Object.assign({ onClick: onHandleClose, variant: "outlined" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.cancelButton", defaultMessage: "ui.userAddPaymentMethodForm.cancelButton" }) })), _jsx(LoadingButton, Object.assign({ disabled: !ready, loading: loading, type: "submit", variant: "contained" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.addButton", defaultMessage: "ui.userAddPaymentMethodForm.addButton" }) }))] })), errorMessage && _jsx("div", { children: errorMessage })] })) })));
137
+ } }), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements || loading || !ready, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: _jsx(FormattedMessage, { id: 'ui.userAddPaymentMethodForm.useDefaultMethod', defaultMessage: 'ui.userAddPaymentMethodForm.useDefaultMethod' }) }))] })) }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 2, mt: 3 }, { children: [_jsx(Button, Object.assign({ onClick: onHandleClose, variant: "outlined" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.cancelButton", defaultMessage: "ui.userAddPaymentMethodForm.cancelButton" }) })), _jsx(Button, Object.assign({ disabled: !ready, loading: loading, type: "submit", variant: "contained" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.addButton", defaultMessage: "ui.userAddPaymentMethodForm.addButton" }) }))] })), errorMessage && _jsx("div", { children: errorMessage })] })) })));
140
138
  }
@@ -5,5 +5,5 @@ export default function UserBillingInfoSkeleton(props) {
5
5
  if (props.mode === UserBillingInfoMode.READ) {
6
6
  return (_jsxs(Box, { children: [_jsx(Skeleton, { variant: "rectangular", height: 15, width: 200, sx: { mb: 2 } }), _jsx(Skeleton, { variant: "rectangular", height: 15, width: 250, sx: { mb: 2 } }), _jsx(Skeleton, { variant: "rectangular", height: 15, width: 220, sx: { mb: 2 } }), _jsx(Skeleton, { variant: "rectangular", height: 15, width: 190, sx: { mb: 2 } })] }));
7
7
  }
8
- return (_jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { sm: 6 }, justifyContent: "center" }, { children: _jsx(Skeleton, { variant: "rounded", height: 30, width: 100 }) }))] })));
8
+ return (_jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 } }, { children: _jsx(Skeleton, { variant: "rectangular", height: 50 }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 6 }, justifyContent: "center" }, { children: _jsx(Skeleton, { variant: "rounded", height: 30, width: 100 }) }))] })));
9
9
  }
@@ -12,7 +12,6 @@ import { reducer, getInitialState, actionTypes } from './reducer';
12
12
  import { countries, COUNTRY_CODES } from '../../constants/Country';
13
13
  import UserBillingInfoSkeleton from './Skeleton';
14
14
  import Grow from '@mui/material/Grow';
15
- import { LoadingButton } from '@mui/lab';
16
15
  import { useSnackbar } from 'notistack';
17
16
  // import {getCountryOption} from '../../utils/address';
18
17
  import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
@@ -444,7 +443,7 @@ const UserBillingInfo = (inProps, ref) => {
444
443
  if (!isPaymentsEnabled || !scUserContext.user) {
445
444
  return null;
446
445
  }
447
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), id: id }, rest, { ref: componentRef }, { children: _jsx(Fragment, { children: state.isLoading ? (_jsx(UserBillingInfoSkeleton, { mode: mode })) : (_jsx(Fragment, { children: state.mode === UserBillingInfoMode.READ ? (_jsxs(_Fragment, { children: [state.name ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_line1, _jsx("br", {}), state.address_line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_postal_code, " - ", state.address_city, " - ", state.address_country && state.address_country.label] })), Boolean(state.tax_code && !state.isBusiness) && _jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.tax_code })), state.isBusiness && (_jsxs(_Fragment, { children: [state.tax_id_data && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["SDI: ", state.sdi] })), state.pec && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["PEC: ", state.pec] }))] }))] })) : (_jsx(Typography, Object.assign({ variant: 'body1' }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && (_jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', size: 'small', disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: _jsx(FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : (_jsx(Box, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "name", name: "name", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address1", defaultMessage: "ui.userBillingInfo.address1" }), onChange: handleChange('address_line1'), value: state.address_line1, error: Boolean(state.addressLine1Error), helperText: state.addressLine1Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address2", defaultMessage: "ui.userBillingInfo.address2" }), onChange: handleChange('address_line2'), value: state.address_line2, error: Boolean(state.addressLine2Error), helperText: state.addressLine2Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(Autocomplete, { id: "country-select-demo", options: countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
446
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), id: id }, rest, { ref: componentRef }, { children: _jsx(Fragment, { children: state.isLoading ? (_jsx(UserBillingInfoSkeleton, { mode: mode })) : (_jsx(Fragment, { children: state.mode === UserBillingInfoMode.READ ? (_jsxs(_Fragment, { children: [state.name ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_line1, _jsx("br", {}), state.address_line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_postal_code, " - ", state.address_city, " - ", state.address_country && state.address_country.label] })), Boolean(state.tax_code && !state.isBusiness) && _jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.tax_code })), state.isBusiness && (_jsxs(_Fragment, { children: [state.tax_id_data && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["SDI: ", state.sdi] })), state.pec && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["PEC: ", state.pec] }))] }))] })) : (_jsx(Typography, Object.assign({ variant: 'body1' }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && (_jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', size: 'small', disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: _jsx(FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : (_jsx(Box, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "name", name: "name", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address1", defaultMessage: "ui.userBillingInfo.address1" }), onChange: handleChange('address_line1'), value: state.address_line1, error: Boolean(state.addressLine1Error), helperText: state.addressLine1Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address2", defaultMessage: "ui.userBillingInfo.address2" }), onChange: handleChange('address_line2'), value: state.address_line2, error: Boolean(state.addressLine2Error), helperText: state.addressLine2Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(Autocomplete, { id: "country-select-demo", options: countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
448
447
  const { key } = props, rest = __rest(props, ["key"]);
449
448
  return (_jsxs(Box, Object.assign({ component: "li", sx: { '& > img': { mr: 2, flexShrink: 0 } } }, rest, { children: [_jsx("img", { loading: "lazy", width: "20", srcSet: `https://flagcdn.com/w40/${option.code.toLowerCase()}.png 2x`, src: `https://flagcdn.com/w20/${option.code.toLowerCase()}.png`, alt: "" }), option.label, " (", option.code, ")"] }), key));
450
449
  }, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.country", defaultMessage: "ui.userBillingInfo.country" }), fullWidth: true, id: "address_country", name: "address_country", error: Boolean(state.addressCountryError), slotProps: {
@@ -453,22 +452,22 @@ const UserBillingInfo = (inProps, ref) => {
453
452
  })),
454
453
  htmlInput: Object.assign(Object.assign({}, params.inputProps), { autoComplete: 'new-password' // disable autocomplete and autofill
455
454
  })
456
- } }))) }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_state", name: "address_state", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.state", defaultMessage: "ui.userBillingInfo.state" }), onChange: handleChange('address_state'), value: state.address_state, error: Boolean(state.addressStateError), helperText: state.addressStateError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_postal_code", name: "address_postal_code", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.postalCode", defaultMessage: "ui.userBillingInfo.postalCode" }), onChange: handleChange('address_postal_code'), value: state.address_postal_code, error: Boolean(state.addressPostalCodeError), helperText: state.addressPostalCodeError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_city", name: "address_city", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.city", defaultMessage: "ui.userBillingInfo.city" }), onChange: handleChange('address_city'), value: state.address_city, error: Boolean(state.addressCityError), helperText: state.addressCityError, slotProps: {
455
+ } }))) }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_state", name: "address_state", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.state", defaultMessage: "ui.userBillingInfo.state" }), onChange: handleChange('address_state'), value: state.address_state, error: Boolean(state.addressStateError), helperText: state.addressStateError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_postal_code", name: "address_postal_code", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.postalCode", defaultMessage: "ui.userBillingInfo.postalCode" }), onChange: handleChange('address_postal_code'), value: state.address_postal_code, error: Boolean(state.addressPostalCodeError), helperText: state.addressPostalCodeError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_city", name: "address_city", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.city", defaultMessage: "ui.userBillingInfo.city" }), onChange: handleChange('address_city'), value: state.address_city, error: Boolean(state.addressCityError), helperText: state.addressCityError, slotProps: {
457
456
  input: {
458
457
  startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "public" }) })))
459
458
  }
460
- }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "phone", name: "phone", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.phone", defaultMessage: "ui.userBillingInfo.phone" }), onChange: handleChange('phone'), value: state.phone, error: Boolean(state.phoneError), helperText: state.phoneError, slotProps: {
459
+ }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "phone", name: "phone", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.phone", defaultMessage: "ui.userBillingInfo.phone" }), onChange: handleChange('phone'), value: state.phone, error: Boolean(state.phoneError), helperText: state.phoneError, slotProps: {
461
460
  input: {
462
461
  startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "person" }) })))
463
462
  }
464
- }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "tax_code", name: "tax_code", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxCode", defaultMessage: "ui.userBillingInfo.taxCode" }), onChange: handleChange('tax_code'), value: state.tax_code, error: Boolean(state.taxCodeError), helperText: state.taxCodeError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsx(FormGroup, { children: _jsx(FormControlLabel, { disabled: Boolean(disableButtons), control: _jsx(Checkbox, Object.assign({ checked: state.isBusiness }, ((state.taxIdDataError || state.sdiError || state.pecError) && { color: 'secondary' }), { className: classNames({
463
+ }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "tax_code", name: "tax_code", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxCode", defaultMessage: "ui.userBillingInfo.taxCode" }), onChange: handleChange('tax_code'), value: state.tax_code, error: Boolean(state.taxCodeError), helperText: state.taxCodeError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsx(FormGroup, { children: _jsx(FormControlLabel, { disabled: Boolean(disableButtons), control: _jsx(Checkbox, Object.assign({ checked: state.isBusiness }, ((state.taxIdDataError || state.sdiError || state.pecError) && { color: 'secondary' }), { className: classNames({
465
464
  [classes.error]: state.taxIdDataError || state.sdiError || state.pecError
466
465
  }), onChange: handleSetBusiness })), label: _jsx("span", Object.assign({ className: classNames({
467
466
  [classes.error]: state.taxIdDataError || state.sdiError || state.pecError
468
467
  }) }, { children: intl.formatMessage({
469
468
  id: 'component.billingInfo.accountBusiness',
470
469
  defaultMessage: 'component.billingInfo.accountBusiness'
471
- }) })) }) }) })), state.isBusiness && (_jsx(Grow, Object.assign({ in: state.isBusiness }, { children: _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "tax_id_data", name: "tax_id_data", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxId", defaultMessage: "ui.userBillingInfo.taxId" }), onChange: handleChange('tax_id_data'), value: state.tax_id_data ? state.tax_id_data.value : null, error: Boolean(state.taxIdDataError), helperText: `${state.taxIdDataError ? state.taxIdDataError : ''} ${state.address_country && state.address_country.code && VAT_EXAMPLE[state.address_country.code]
470
+ }) })) }) }) })), state.isBusiness && (_jsx(Grow, Object.assign({ in: state.isBusiness }, { children: _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "tax_id_data", name: "tax_id_data", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxId", defaultMessage: "ui.userBillingInfo.taxId" }), onChange: handleChange('tax_id_data'), value: state.tax_id_data ? state.tax_id_data.value : null, error: Boolean(state.taxIdDataError), helperText: `${state.taxIdDataError ? state.taxIdDataError : ''} ${state.address_country && state.address_country.code && VAT_EXAMPLE[state.address_country.code]
472
471
  ? intl.formatMessage({
473
472
  id: 'component.billingInfo.requiredFormat',
474
473
  defaultMessage: 'component.billingInfo.requiredFormat'
@@ -479,12 +478,12 @@ const UserBillingInfo = (inProps, ref) => {
479
478
  input: {
480
479
  endAdornment: state.taxIdVerificationStatus !== null && (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: state.taxIdVerificationStatus === 'verified' ? (_jsx(Icon, Object.assign({ color: "primary" }, { children: "done" }))) : state.taxIdVerificationStatus === 'pending' ? (_jsx(Tooltip, Object.assign({ id: "tooltip-warning", title: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxCheckPending", defaultMessage: "ui.userBillingInfo.taxCheckPending" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: _jsx(Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) : (_jsx(Tooltip, Object.assign({ id: "tooltip-warning", title: _jsx(FormattedMessage, { id: "ui.userBillingInfo.taxCheckWarning", defaultMessage: "ui.userBillingInfo.taxCheckWarning" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: _jsx(Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) })))
481
480
  }
482
- }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "sdi", name: "sdi", label: `${intl.formatMessage({ id: 'component.billingInfo.sdi', defaultMessage: 'component.billingInfo.sdi' })} ${((_a = state.address_country) === null || _a === void 0 ? void 0 : _a.code) === COUNTRY_CODES.IT
481
+ }, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "sdi", name: "sdi", label: `${intl.formatMessage({ id: 'component.billingInfo.sdi', defaultMessage: 'component.billingInfo.sdi' })} ${((_a = state.address_country) === null || _a === void 0 ? void 0 : _a.code) === COUNTRY_CODES.IT
483
482
  ? intl.formatMessage({
484
483
  id: 'component.billingInfo.field.optional',
485
484
  defaultMessage: 'component.billingInfo.field.optional'
486
485
  })
487
- : ''}`, onChange: handleChange('sdi'), value: state.sdi, error: Boolean(state.sdiError), helperText: state.sdiError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "pec", name: "pec", label: `${intl.formatMessage({ id: 'component.billingInfo.pec', defaultMessage: 'component.billingInfo.pec' })} ${((_b = state.address_country) === null || _b === void 0 ? void 0 : _b.code) === COUNTRY_CODES.IT
486
+ : ''}`, onChange: handleChange('sdi'), value: state.sdi, error: Boolean(state.sdiError), helperText: state.sdiError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "pec", name: "pec", label: `${intl.formatMessage({ id: 'component.billingInfo.pec', defaultMessage: 'component.billingInfo.pec' })} ${((_b = state.address_country) === null || _b === void 0 ? void 0 : _b.code) === COUNTRY_CODES.IT
488
487
  ? intl.formatMessage({
489
488
  id: 'component.billingInfo.field.optional',
490
489
  defaultMessage: 'component.billingInfo.field.optional'
@@ -494,6 +493,6 @@ const UserBillingInfo = (inProps, ref) => {
494
493
  type: 'email',
495
494
  startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "email" }) })))
496
495
  }
497
- }, fullWidth: true }) }))] })) })) }))), state.error && (_jsx(Grid, Object.assign({ size: "grow" }, { children: _jsx(Typography, Object.assign({ align: "left", color: "secondary" }, { children: state.error })) }))), _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsxs(Typography, Object.assign({ align: "left" }, { children: [_jsx(LoadingButton, Object.assign({ variant: "contained", size: "small", color: "primary", disabled: state.isProcessing || Boolean(disableButtons), loading: state.isProcessing, onClick: handleSubmit }, { children: buttonLabel })), onBack && state.initialDataCompleted && (_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: handleBack, disabled: Boolean(disableButtons) }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.back", defaultMessage: "ui.userBillingInfo.back" }) })))] })) }))] })) })) })) }) })));
496
+ }, fullWidth: true }) }))] })) })) }))), state.error && (_jsx(Grid, Object.assign({ size: "grow" }, { children: _jsx(Typography, Object.assign({ align: "left", color: "secondary" }, { children: state.error })) }))), _jsx(Grid, Object.assign({ size: "grow" }, { children: _jsxs(Typography, Object.assign({ align: "left" }, { children: [_jsx(Button, Object.assign({ variant: "contained", size: "small", color: "primary", disabled: state.isProcessing || Boolean(disableButtons), loading: state.isProcessing, onClick: handleSubmit }, { children: buttonLabel })), onBack && state.initialDataCompleted && (_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: handleBack, disabled: Boolean(disableButtons) }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.back", defaultMessage: "ui.userBillingInfo.back" }) })))] })) }))] })) })) })) }) })));
498
497
  };
499
498
  export default forwardRef(UserBillingInfo);
@@ -9,7 +9,6 @@ import { useThemeProps } from '@mui/system';
9
9
  import { PREFIX } from './constants';
10
10
  import BaseDialog from '../../shared/BaseDialog';
11
11
  import { FormattedMessage, useIntl } from 'react-intl';
12
- import { LoadingButton } from '@mui/lab';
13
12
  import { AddressElement, Elements } from '@stripe/react-stripe-js';
14
13
  import { loadStripe } from '@stripe/stripe-js';
15
14
  import { getDefaultAppearanceStyle, getDefaultLocale } from '../../utils/payment';
@@ -75,7 +74,7 @@ export default function UserChangeAddressDialog(inProps) {
75
74
  if (!isPaymentsEnabled || !scUserContext.user) {
76
75
  return null;
77
76
  }
78
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), title: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.title", id: "component.userChangeAddressDialog.title" }), open: open, actions: _jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ variant: 'outlined', onClick: handleClose }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnClose", id: "component.userChangeAddressDialog.btnClose" }) })), _jsx(LoadingButton, Object.assign({ loading: loading, disabled: loading, variant: 'contained', onClick: handleSave }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnSave", id: "component.userChangeAddressDialog.btnSave" }) }))] }) }, rest, { children: _jsx(Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: _jsx(AddressElement, { onChange: handleChangeAddress, options: {
77
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), title: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.title", id: "component.userChangeAddressDialog.title" }), open: open, actions: _jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ variant: 'outlined', onClick: handleClose }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnClose", id: "component.userChangeAddressDialog.btnClose" }) })), _jsx(Button, Object.assign({ loading: loading, disabled: loading, variant: 'contained', onClick: handleSave }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnSave", id: "component.userChangeAddressDialog.btnSave" }) }))] }) }, rest, { children: _jsx(Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: _jsx(AddressElement, { onChange: handleChangeAddress, options: {
79
78
  mode: 'billing',
80
79
  defaultValues: addressState
81
80
  } }) })) })));
@@ -1,12 +1,11 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from 'react';
4
- import { Box, Divider, Typography, styled } from '@mui/material';
4
+ import { Box, Button, Divider, Typography, styled } from '@mui/material';
5
5
  import { FormattedMessage } from 'react-intl';
6
6
  import { useSCFetchUser, useSCFetchUserBlockedBy, useSCUser } from '@selfcommunity/react-core';
7
7
  import classNames from 'classnames';
8
8
  import { useThemeProps } from '@mui/system';
9
- import { LoadingButton } from '@mui/lab';
10
9
  import { useSnackbar } from 'notistack';
11
10
  import { SCOPE_SC_UI } from '../../constants/Errors';
12
11
  import { Logger } from '@selfcommunity/utils';
@@ -77,5 +76,5 @@ export default function UserProfileBlocked(inProps) {
77
76
  if (!scUser || !scUserContext.user || loadingBlockedBy) {
78
77
  return null;
79
78
  }
80
- return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Divider, {}), !isMe && blockedBy && (_jsx(Typography, Object.assign({ variant: "body1", className: classes.info }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.info }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), _jsx(LoadingButton, Object.assign({ variant: "contained", className: classes.button, loading: scUserContext.managers.blockedUsers.loading, disabled: scUserContext.managers.blockedUsers.loading, onClick: handleBlock }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.unBlockUser", defaultMessage: "ui.userProfileBlocked.unBlockUser" }) }))] }))] })));
79
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Divider, {}), !isMe && blockedBy && (_jsx(Typography, Object.assign({ variant: "body1", className: classes.info }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.info }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), _jsx(Button, Object.assign({ variant: "contained", className: classes.button, loading: scUserContext.managers.blockedUsers.loading, disabled: scUserContext.managers.blockedUsers.loading, onClick: handleBlock }, { children: _jsx(FormattedMessage, { id: "ui.userProfileBlocked.unBlockUser", defaultMessage: "ui.userProfileBlocked.unBlockUser" }) }))] }))] })));
81
80
  }
@@ -10,7 +10,6 @@ import { Logger } from '@selfcommunity/utils';
10
10
  import BaseDialog from '../../../shared/BaseDialog';
11
11
  import PasswordTextField from '../../../shared/PasswordTextField';
12
12
  import EmailTextField from '../../../shared/EmailTextField';
13
- import { LoadingButton } from '@mui/lab';
14
13
  import { useSnackbar } from 'notistack';
15
14
  import { PREFIX } from '../constants';
16
15
  const messages = defineMessages({
@@ -168,5 +167,5 @@ export default function AccountCredentials(props) {
168
167
  }, transformOrigin: {
169
168
  vertical: 'center',
170
169
  horizontal: 'right'
171
- }, onClose: handlePopoverClose }, { children: _jsx(Box, Object.assign({ sx: { p: '10px' } }, { children: _jsx(Typography, Object.assign({ component: 'span', sx: { whiteSpace: 'pre-line' } }, { children: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword.info", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword.info" }) })) })) })), _jsx(PasswordTextField, { name: "confirmPassword", className: classes.formField, disabled: isSubmittingPassword, label: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.confirmPassword", defaultMessage: "ui.userProfileEditAccountCredentials.confirmPassword" }), size: "medium", value: field.confirmPassword, onChange: handleChange, onBlur: validateInput, error: Boolean(error.confirmPassword), helperText: error.confirmPassword })] })), _jsx(LoadingButton, Object.assign({ className: classes.confirmChangeButton, loading: isSubmittingPassword, disabled: !field.confirmPassword || Boolean(error.confirmPassword) || Boolean(error.password) || Boolean(error.newPassword), variant: "contained", onClick: handleSubmitPassword }, { children: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] })))] })));
170
+ }, onClose: handlePopoverClose }, { children: _jsx(Box, Object.assign({ sx: { p: '10px' } }, { children: _jsx(Typography, Object.assign({ component: 'span', sx: { whiteSpace: 'pre-line' } }, { children: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword.info", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword.info" }) })) })) })), _jsx(PasswordTextField, { name: "confirmPassword", className: classes.formField, disabled: isSubmittingPassword, label: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.confirmPassword", defaultMessage: "ui.userProfileEditAccountCredentials.confirmPassword" }), size: "medium", value: field.confirmPassword, onChange: handleChange, onBlur: validateInput, error: Boolean(error.confirmPassword), helperText: error.confirmPassword })] })), _jsx(Button, Object.assign({ className: classes.confirmChangeButton, loading: isSubmittingPassword, disabled: !field.confirmPassword || Boolean(error.confirmPassword) || Boolean(error.password) || Boolean(error.newPassword), variant: "contained", onClick: handleSubmitPassword }, { children: _jsx(FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] })))] })));
172
171
  }
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useMemo, useState } from 'react';
4
- import { Box, CircularProgress, IconButton, InputAdornment, MenuItem, TextField, useMediaQuery, useTheme, Icon, styled } from '@mui/material';
4
+ import { Box, CircularProgress, IconButton, InputAdornment, MenuItem, TextField, useMediaQuery, useTheme, Icon, styled, Button } from '@mui/material';
5
5
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
6
6
  import { Endpoints, formatHttpErrorCode, http } from '@selfcommunity/api-services';
7
7
  import { camelCase, Logger } from '@selfcommunity/utils';
@@ -16,9 +16,8 @@ import { SCUserProfileFields } from '../../../types';
16
16
  import MetadataField from '../../../shared/MetadataField';
17
17
  import { SCOPE_SC_UI } from '../../../constants/Errors';
18
18
  import { format, isBefore, isValid, parseISO, startOfHour } from 'date-fns';
19
- import itLocale from 'date-fns/locale/it';
20
- import enLocale from 'date-fns/locale/en-US';
21
- import { LoadingButton } from '@mui/lab';
19
+ import { it } from 'date-fns/locale/it';
20
+ import { enUS } from 'date-fns/locale/en-US';
22
21
  import { useSnackbar } from 'notistack';
23
22
  import { PREFIX } from '../constants';
24
23
  const messages = defineMessages({
@@ -157,7 +156,7 @@ export default function PublicInfo(props) {
157
156
  case SCUserProfileFields.DATE_JOINED:
158
157
  return null;
159
158
  case SCUserProfileFields.DATE_OF_BIRTH:
160
- return (_jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? itLocale : enLocale }, { children: _jsx(DatePicker, { label: intl.formatMessage({
159
+ return (_jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it : enUS }, { children: _jsx(DatePicker, { label: intl.formatMessage({
161
160
  id: `ui.userInfo.${camelCase(field)}`,
162
161
  defaultMessage: `ui.userInfo.${field}`
163
162
  }), defaultValue: user[field] ? parseISO(user[field]) : null, minDate: DATEPICKER_MINDATE, onChange: (newValue) => {
@@ -231,5 +230,5 @@ export default function PublicInfo(props) {
231
230
  }
232
231
  return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: [startActions, _fields.map((field) => {
233
232
  return renderField(field);
234
- }), _jsx(LoadingButton, Object.assign({ className: classes.btnSave, fullWidth: true, variant: "contained", color: "secondary", onClick: handleSave, loading: saving.length > 0, disabled: saving.length > 0 || !editing.length || Object.keys(error).length > 0 }, { children: _jsx(FormattedMessage, { id: 'ui.userInfo.button.save', defaultMessage: 'ui.userInfo.button.save' }) })), endActions] })));
233
+ }), _jsx(Button, Object.assign({ className: classes.btnSave, fullWidth: true, variant: "contained", color: "secondary", onClick: handleSave, loading: saving.length > 0, disabled: saving.length > 0 || !editing.length || Object.keys(error).length > 0 }, { children: _jsx(FormattedMessage, { id: 'ui.userInfo.button.save', defaultMessage: 'ui.userInfo.button.save' }) })), endActions] })));
235
234
  }
@@ -1,6 +1,6 @@
1
- import { LoadingButtonProps } from '@mui/lab';
2
1
  import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
3
- export interface VoteAudienceButtonProps extends Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, 'onClick' | 'disabled' | 'loading'>> {
2
+ import { ButtonProps } from '@mui/material';
3
+ export interface VoteAudienceButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
4
4
  /**
5
5
  * Id of the contribution object to vote
6
6
  * @default null
@@ -1,10 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useMemo, useState } from 'react';
4
- import { LoadingButton } from '@mui/lab';
5
4
  import classNames from 'classnames';
6
5
  import { useThemeProps } from '@mui/system';
7
- import { Avatar, Box, List, ListItem, Tab, Tabs, Typography, Icon, styled } from '@mui/material';
6
+ import { Avatar, Box, List, ListItem, Tab, Tabs, Typography, Icon, styled, Button } from '@mui/material';
8
7
  import { FormattedMessage } from 'react-intl';
9
8
  import { useSCFetchVote, useSCUser } from '@selfcommunity/react-core';
10
9
  import BaseDialog from '../../shared/BaseDialog';
@@ -19,7 +18,7 @@ const classes = {
19
18
  dialogTabs: `${PREFIX}-dialog-tabs`,
20
19
  dialogVoteBadge: `${PREFIX}-dialog-vote-badge`
21
20
  };
22
- const Root = styled(LoadingButton, {
21
+ const Root = styled(Button, {
23
22
  name: PREFIX,
24
23
  slot: 'Root',
25
24
  overridesResolver: (_props, styles) => [styles.root, styles.voted]
@@ -67,10 +66,10 @@ export default function VoteAudienceButton(inProps) {
67
66
  // CONTEXT
68
67
  const scUserContext = useSCUser();
69
68
  // HANDLERS
70
- const handleOpen = (_event) => {
69
+ const handleOpen = () => {
71
70
  setOpen(true);
72
71
  };
73
- const handleClose = (_event) => {
72
+ const handleClose = () => {
74
73
  setOpen(false);
75
74
  };
76
75
  const handleChangeTab = (_event, newValue) => {
@@ -103,7 +102,7 @@ export default function VoteAudienceButton(inProps) {
103
102
  const audienceIcon = useMemo(() => {
104
103
  if (reactions.default && !isLoading && !error) {
105
104
  return (_jsx(Box, Object.assign({ className: classes.reactionList }, { children: contributionReactionsCount &&
106
- contributionReactionsCount.slice(0, 3).map((count, _i) => (_jsx(Icon, { children: _jsx("img", { alt: count.reaction.label, src: count.reaction.image, width: "100%", height: "100%" }) }, count.reaction.id))) })));
105
+ contributionReactionsCount.slice(0, 3).map((count) => (_jsx(Icon, { children: _jsx("img", { alt: count.reaction.label, src: count.reaction.image, width: "100%", height: "100%" }) }, count.reaction.id))) })));
107
106
  }
108
107
  return scUserContext.user && contributionVoted ? _jsx(Icon, { children: "thumb_up" }) : _jsx(Icon, { children: "thumb_up_off_alt" });
109
108
  }, [reactions.default, isLoading, error, contributionReactionsCount, scUserContext.user, contributionVoted]);
@@ -1,6 +1,6 @@
1
- import { LoadingButtonProps } from '@mui/lab';
2
1
  import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types';
3
- export interface VoteButtonProps extends Pick<LoadingButtonProps, Exclude<keyof LoadingButtonProps, 'onClick' | 'disabled' | 'loading'>> {
2
+ import { ButtonProps } from '@mui/material';
3
+ export interface VoteButtonProps extends Pick<ButtonProps, Exclude<keyof ButtonProps, 'onClick' | 'disabled' | 'loading'>> {
4
4
  /**
5
5
  * Id of the contribution object to vote
6
6
  * @default null
@@ -1,10 +1,9 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMemo, useRef, useState } from 'react';
4
- import { LoadingButton } from '@mui/lab';
5
4
  import classNames from 'classnames';
6
5
  import { useThemeProps } from '@mui/system';
7
- import { IconButton, Paper, Popper, Tooltip, useMediaQuery, useTheme, styled, Icon } from '@mui/material';
6
+ import { IconButton, Paper, Popper, Tooltip, useMediaQuery, useTheme, styled, Icon, Button } from '@mui/material';
8
7
  import { UserUtils, useSCContext, useSCFetchVote, useSCUser } from '@selfcommunity/react-core';
9
8
  import { FormattedMessage } from 'react-intl';
10
9
  import { useSnackbar } from 'notistack';
@@ -17,7 +16,7 @@ const classes = {
17
16
  reactionList: `${PREFIX}-reaction-list`,
18
17
  reaction: `${PREFIX}-reaction`
19
18
  };
20
- const Root = styled(LoadingButton, {
19
+ const Root = styled(Button, {
21
20
  name: PREFIX,
22
21
  slot: 'Root',
23
22
  overridesResolver: (_props, styles) => [styles.root, styles.voted]
@@ -70,7 +69,7 @@ export default function VoteButton(inProps) {
70
69
  handleClearTimeout();
71
70
  timeoutRef.current = setTimeout(() => setAnchorEl(event.target), 1000);
72
71
  };
73
- const handleMouseLeave = (_event) => {
72
+ const handleMouseLeave = () => {
74
73
  handleClearTimeout();
75
74
  timeoutRef.current = setTimeout(() => setAnchorEl(null), 500);
76
75
  };
@@ -1,6 +1,5 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { LoadingButton } from '@mui/lab';
4
3
  import { Autocomplete, Avatar, Button, Chip, Stack, styled, TextField, Typography, useThemeProps } from '@mui/material';
5
4
  import { Fragment, memo, useCallback, useEffect, useState } from 'react';
6
5
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
@@ -127,7 +126,7 @@ function AddUsersButton(inProps) {
127
126
  const handleDelete = useCallback((userToDelete) => {
128
127
  setInvited((prev) => prev.filter((user) => user.id !== userToDelete.id));
129
128
  }, [setInvited]);
130
- return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ onClick: handleToggleDialogOpen, variant: variant, color: color, size: size, className: classNames(classes.root, classes.contrastColor, className) }, rest, { children: _jsx(FormattedMessage, { id: label, defaultMessage: label }) })), openDialog && (_jsx(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: handleToggleDialogOpen, title: _jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.addUserButton.dialog.title", defaultMessage: "ui.addUserButton.dialog.title" }) })), actions: _jsx(LoadingButton, Object.assign({ onClick: handleConfirm, size: "medium", variant: "contained", autoFocus: true, disabled: !invited.length }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.addUserButton.dialog.confirm", defaultMessage: "ui.addUserButton.dialog.confirm" }) })) })), className: classes.dialogRoot }, { children: _jsxs(Stack, Object.assign({ className: classes.dialogAutocompleteWrapper }, { children: [_jsx(Autocomplete, { loading: loading, size: "small", multiple: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option === null || option === void 0 ? void 0 : option.username) || '...', isOptionEqualToValue: (option, value) => (option === null || option === void 0 ? void 0 : option.id) === value.id, loadingText: _jsx(FormattedMessage, { id: "ui.addUserButton.autocomplete.loading", defaultMessage: "ui.addUserButton.autocomplete.loading" }), noOptionsText: _jsx(FormattedMessage, { id: "ui.addUserButton.autocomplete.noResults", defaultMessage: "ui.addUserButton.autocomplete.noResults" }), renderTags: () => null, popupIcon: null, disableClearable: true, renderOption: (props, option) => (_jsxs(Stack, Object.assign({ component: "li", flexDirection: "row", gap: "5px" }, props, { children: [_jsx(Avatar, { alt: option.username, src: option.avatar }), _jsx(Typography, { children: option.username })] }))), renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, slotProps: {
129
+ return (_jsxs(Fragment, { children: [_jsx(Root, Object.assign({ onClick: handleToggleDialogOpen, variant: variant, color: color, size: size, className: classNames(classes.root, classes.contrastColor, className) }, rest, { children: _jsx(FormattedMessage, { id: label, defaultMessage: label }) })), openDialog && (_jsx(DialogRoot, Object.assign({ DialogContentProps: { dividers: false }, open: true, onClose: handleToggleDialogOpen, title: _jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.addUserButton.dialog.title", defaultMessage: "ui.addUserButton.dialog.title" }) })), actions: _jsx(Button, Object.assign({ onClick: handleConfirm, size: "medium", variant: "contained", autoFocus: true, disabled: !invited.length }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.addUserButton.dialog.confirm", defaultMessage: "ui.addUserButton.dialog.confirm" }) })) })), className: classes.dialogRoot }, { children: _jsxs(Stack, Object.assign({ className: classes.dialogAutocompleteWrapper }, { children: [_jsx(Autocomplete, { loading: loading, size: "small", multiple: true, options: suggested, onChange: handleChange, onInputChange: handleInputChange, inputValue: value, filterOptions: filterOptions, value: invited, getOptionLabel: (option) => (option === null || option === void 0 ? void 0 : option.username) || '...', isOptionEqualToValue: (option, value) => (option === null || option === void 0 ? void 0 : option.id) === value.id, loadingText: _jsx(FormattedMessage, { id: "ui.addUserButton.autocomplete.loading", defaultMessage: "ui.addUserButton.autocomplete.loading" }), noOptionsText: _jsx(FormattedMessage, { id: "ui.addUserButton.autocomplete.noResults", defaultMessage: "ui.addUserButton.autocomplete.noResults" }), renderTags: () => null, popupIcon: null, disableClearable: true, renderOption: (props, option) => (_jsxs(Stack, Object.assign({ component: "li", flexDirection: "row", gap: "5px" }, props, { children: [_jsx(Avatar, { alt: option.username, src: option.avatar }), _jsx(Typography, { children: option.username })] }))), renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { variant: "outlined", placeholder: `${intl.formatMessage(messages.placeholder)}`, slotProps: {
131
130
  input: Object.assign({}, params.InputProps)
132
131
  } }))) }), _jsx(Stack, Object.assign({ className: classes.dialogChipWrapper }, { children: invited.map((option, index) => (_jsx(Chip, { avatar: _jsx(Avatar, { alt: option.username, src: option.avatar }), label: option.username, onDelete: () => {
133
132
  handleDelete(option);
@@ -1,6 +1,5 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { LoadingButton } from '@mui/lab';
4
3
  import { styled, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Card } from '@mui/material';
5
4
  import { FormattedMessage } from 'react-intl';
6
5
  const PREFIX = 'SCConfirmDialog';
@@ -36,5 +35,5 @@ export default function ConfirmDialog(props) {
36
35
  /**
37
36
  * Renders root object
38
37
  */
39
- return (_jsx(Root, { children: _jsxs(Dialog, Object.assign({ open: open, onClose: handleClose }, rest, { children: [_jsx(DialogTitle, { children: title || _jsx(FormattedMessage, { id: "ui.confirmDialog.title", defaultMessage: "ui.confirmDialog.title" }) }), content && (_jsx(DialogContent, { children: _jsx(DialogContentText, Object.assign({ component: "div" }, { children: content })) })), _jsxs(DialogActions, { children: [_jsx(Button, Object.assign({ onClick: handleClose }, { children: btnCancel || _jsx(FormattedMessage, { id: "ui.confirmDialog.btnCancel", defaultMessage: "ui.confirmDialog.btnCancel" }) })), _jsx(LoadingButton, Object.assign({ onClick: handleConfirm, variant: "contained", autoFocus: true, loading: isUpdating }, { children: btnConfirm || _jsx(FormattedMessage, { id: "ui.confirmDialog.btnConfirm", defaultMessage: "ui.confirmDialog.btnConfirm" }) }))] })] })) }));
38
+ return (_jsx(Root, { children: _jsxs(Dialog, Object.assign({ open: open, onClose: handleClose }, rest, { children: [_jsx(DialogTitle, { children: title || _jsx(FormattedMessage, { id: "ui.confirmDialog.title", defaultMessage: "ui.confirmDialog.title" }) }), content && (_jsx(DialogContent, { children: _jsx(DialogContentText, Object.assign({ component: "div" }, { children: content })) })), _jsxs(DialogActions, { children: [_jsx(Button, Object.assign({ onClick: handleClose }, { children: btnCancel || _jsx(FormattedMessage, { id: "ui.confirmDialog.btnCancel", defaultMessage: "ui.confirmDialog.btnCancel" }) })), _jsx(Button, Object.assign({ onClick: handleConfirm, variant: "contained", autoFocus: true, loading: isUpdating }, { children: btnConfirm || _jsx(FormattedMessage, { id: "ui.confirmDialog.btnConfirm", defaultMessage: "ui.confirmDialog.btnConfirm" }) }))] })] })) }));
40
39
  }
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { MenuItem, Select, Typography } from '@mui/material';
2
+ import { Button, MenuItem, Select, Typography } from '@mui/material';
3
3
  import { memo, useCallback, useEffect, useState } from 'react';
4
4
  import { FormattedMessage } from 'react-intl';
5
- import { LoadingButton } from '@mui/lab';
6
5
  import { SCCourseJoinStatusType } from '@selfcommunity/types';
7
6
  import { CourseService } from '@selfcommunity/api-services';
8
7
  import { Logger } from '@selfcommunity/utils';
@@ -46,7 +45,7 @@ function ChangeUserStatus(props) {
46
45
  });
47
46
  });
48
47
  }, [course, user, setLoading, setValue]);
49
- return (_jsx(Select, Object.assign({ size: "small", value: value, onChange: handleChange }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, Object.assign({ value: option }, { children: _jsx(LoadingButton, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
48
+ return (_jsx(Select, Object.assign({ size: "small", value: value, onChange: handleChange }, { children: OPTIONS.map((option, i) => (_jsx(MenuItem, Object.assign({ value: option }, { children: _jsx(Button, Object.assign({ size: "small", color: "inherit", loading: loading, disabled: loading, sx: {
50
49
  padding: 0,
51
50
  ':hover': {
52
51
  backgroundColor: 'unset'
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Avatar, Box, Icon, IconButton, InputAdornment, LinearProgress, Stack, styled, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, Typography, useThemeProps } from '@mui/material';
2
+ import { Avatar, Box, Button, Icon, IconButton, InputAdornment, LinearProgress, Stack, styled, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, Typography, useThemeProps } from '@mui/material';
3
3
  import { memo, useCallback, useEffect, useRef, useState } from 'react';
4
4
  import { FormattedDate, FormattedMessage, useIntl } from 'react-intl';
5
5
  import RowSkeleton from './RowSkeleton';
6
- import { LoadingButton } from '@mui/lab';
7
6
  import { SCCourseJoinStatusType } from '@selfcommunity/types';
8
7
  import { PREFIX } from './constants';
9
8
  import EmptyStatus from '../EmptyStatus';
@@ -139,7 +138,7 @@ function CourseUsersTable(inProps) {
139
138
  }), slotProps: {
140
139
  input: {
141
140
  startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "search" }) }))),
142
- endAdornment: value.length > 0 ? (_jsxs(Stack, Object.assign({ className: classes.endAdornmentWrapper }, { children: [_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(IconButton, Object.assign({ color: "inherit", onClick: handleSearchClear }, { children: _jsx(Icon, { children: "close" }) })) })), _jsx(InputAdornment, Object.assign({ position: "end" }, { children: _jsx(LoadingButton, Object.assign({ color: "primary", variant: "contained", onClick: handleSearchStart, loading: loadingSearch, disabled: loadingSearch, className: classes.searchButton }, { children: _jsx(Icon, { children: "search" }) })) }))] }))) : undefined
141
+ endAdornment: value.length > 0 ? (_jsxs(Stack, Object.assign({ className: classes.endAdornmentWrapper }, { children: [_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(IconButton, Object.assign({ color: "inherit", onClick: handleSearchClear }, { children: _jsx(Icon, { children: "close" }) })) })), _jsx(InputAdornment, Object.assign({ position: "end" }, { children: _jsx(Button, Object.assign({ color: "primary", variant: "contained", onClick: handleSearchStart, loading: loadingSearch, disabled: loadingSearch, className: classes.searchButton }, { children: _jsx(Icon, { children: "search" }) })) }))] }))) : undefined
143
142
  }
144
143
  }, value: value, onChange: handleChange, disabled: users.length === 0 && value.length === 0, fullWidth: true, className: classes.search }), _jsx(TableContainer, { children: _jsxs(Table, { children: [_jsx(TableHead, { children: _jsx(TableRow, { children: headerCells.map((cell, i, array) => {
145
144
  if (i === array.length - 1) {
@@ -149,6 +148,6 @@ function CourseUsersTable(inProps) {
149
148
  }) }) }), _jsxs(TableBody, { children: [users.length > 0 &&
150
149
  users.map((user, i) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsxs(Stack, Object.assign({ className: classes.avatarWrapper }, { children: [_jsx(Avatar, { alt: user.username, src: user.avatar }), _jsx(Typography, Object.assign({ variant: "body2" }, { children: user.username }))] })) }), mode === SCCourseUsersTableModeType.DASHBOARD && (_jsx(TableCell, { children: _jsxs(Stack, Object.assign({ className: classes.progressWrapper }, { children: [_jsx(LinearProgress, { className: classes.progress, variant: "determinate", value: user.user_completion_rate }), _jsx(Typography, Object.assign({ variant: "body1" }, { children: `${Math.round(user.user_completion_rate)}%` }))] })) })), mode === SCCourseUsersTableModeType.EDIT && (_jsx(TableCell, { children: user.join_status !== SCCourseJoinStatusType.CREATOR && scUserContext.user.id !== user.id ? (_jsx(ChangeUserStatus, { course: course, user: user })) : (_jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: `ui.editCourse.tab.users.table.select.${user.join_status}`, defaultMessage: `ui.editCourse.tab.users.table.select.${user.join_status}` }) }))) })), _jsx(TableCell, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedDate, { value: mode === SCCourseUsersTableModeType.REQUESTS ? user.date_joined : user.joined_at || new Date() }) })) }), _jsx(TableCell, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedDate, { value: mode === SCCourseUsersTableModeType.REQUESTS ? user.date_joined : user.last_active_at || new Date() }) })) }), mode === SCCourseUsersTableModeType.EDIT &&
151
150
  user.join_status !== SCCourseJoinStatusType.CREATOR &&
152
- scUserContext.user.id !== user.id ? (_jsx(TableCell, { children: _jsx(RemoveButton, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) })) : (mode === SCCourseUsersTableModeType.EDIT && _jsx(TableCell, {})), mode === SCCourseUsersTableModeType.DASHBOARD && (_jsx(TableCell, { children: _jsx(SeeProgressButton, { course: course, user: user }) })), mode === SCCourseUsersTableModeType.REQUESTS && (_jsx(TableCell, { children: _jsx(RequestButton, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) }))] }, i))), state.isLoadingNext && _jsx(RowSkeleton, { editMode: mode !== SCCourseUsersTableModeType.DASHBOARD })] })] }) }), users.length > 0 && (_jsx(LoadingButton, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: state.isLoadingNext, disabled: value.length > 0 || !state.next, className: classes.loadingButton, onClick: handleNext }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.courseUsersTable.btn.label", defaultMessage: "ui.courseUsersTable.btn.label" }) })) }))), users.length === 0 && (_jsx(EmptyStatus, { icon: "face", title: value.length > 0 ? 'ui.courseUsersTable.empty.search.title' : emptyStatusTitle, description: value.length > 0 ? 'ui.courseUsersTable.empty.search.description' : emptyStatusDescription })), dialog && _jsx(ConfirmDialog, { open: true, onClose: () => handleOpenDialog(null), onConfirm: handleConfirm })] })));
151
+ scUserContext.user.id !== user.id ? (_jsx(TableCell, { children: _jsx(RemoveButton, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) })) : (mode === SCCourseUsersTableModeType.EDIT && _jsx(TableCell, {})), mode === SCCourseUsersTableModeType.DASHBOARD && (_jsx(TableCell, { children: _jsx(SeeProgressButton, { course: course, user: user }) })), mode === SCCourseUsersTableModeType.REQUESTS && (_jsx(TableCell, { children: _jsx(RequestButton, { ref: buttonRef, course: course, user: user, handleOpenDialog: handleOpenDialog }) }))] }, i))), state.isLoadingNext && _jsx(RowSkeleton, { editMode: mode !== SCCourseUsersTableModeType.DASHBOARD })] })] }) }), users.length > 0 && (_jsx(Button, Object.assign({ size: "small", variant: "outlined", color: "inherit", loading: state.isLoadingNext, disabled: value.length > 0 || !state.next, className: classes.loadingButton, onClick: handleNext }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.courseUsersTable.btn.label", defaultMessage: "ui.courseUsersTable.btn.label" }) })) }))), users.length === 0 && (_jsx(EmptyStatus, { icon: "face", title: value.length > 0 ? 'ui.courseUsersTable.empty.search.title' : emptyStatusTitle, description: value.length > 0 ? 'ui.courseUsersTable.empty.search.description' : emptyStatusDescription })), dialog && _jsx(ConfirmDialog, { open: true, onClose: () => handleOpenDialog(null), onConfirm: handleConfirm })] })));
153
152
  }
154
153
  export default memo(CourseUsersTable);
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { LoadingButton } from '@mui/lab';
3
- import { Icon } from '@mui/material';
2
+ import { Button, Icon } from '@mui/material';
4
3
  import { CourseService } from '@selfcommunity/api-services';
5
4
  import { forwardRef, memo, useCallback, useImperativeHandle, useState } from 'react';
6
5
  import { SCOPE_SC_UI } from '../../constants/Errors';
@@ -43,6 +42,6 @@ function RemoveButton(props, ref) {
43
42
  useImperativeHandle(ref, () => ({
44
43
  handleManageUser: (userToRemove) => handleSubmit(userToRemove)
45
44
  }), [handleSubmit]);
46
- return (_jsx(LoadingButton, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: SCCourseEditTabType.USERS, user }), loading: loading, disabled: loading }, { children: _jsx(Icon, { children: "close" }) })));
45
+ return (_jsx(Button, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: SCCourseEditTabType.USERS, user }), loading: loading, disabled: loading }, { children: _jsx(Icon, { children: "close" }) })));
47
46
  }
48
47
  export default memo(forwardRef(RemoveButton));
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LoadingButton } from '@mui/lab';
3
- import { Icon, Stack } from '@mui/material';
2
+ import { Button, Icon, Stack } from '@mui/material';
4
3
  import { CourseService } from '@selfcommunity/api-services';
5
4
  import { forwardRef, memo, useCallback, useImperativeHandle, useState } from 'react';
6
5
  import { SCOPE_SC_UI } from '../../constants/Errors';
@@ -71,6 +70,6 @@ function RequestButton(props, ref) {
71
70
  useImperativeHandle(ref, () => ({
72
71
  handleManageUser: (userToReject) => handleReject(userToReject)
73
72
  }), [handleReject]);
74
- return (_jsxs(Stack, Object.assign({ className: classes.requestButtonWrapper }, { children: [_jsx(LoadingButton, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleAccept, loading: acceptLoading, disabled: acceptLoading }, { children: _jsx(Icon, { children: "check" }) })), _jsx(LoadingButton, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: SCCourseEditTabType.REQUESTS, request: user }), loading: rejectLoading, disabled: rejectLoading }, { children: _jsx(Icon, { children: "close" }) }))] })));
73
+ return (_jsxs(Stack, Object.assign({ className: classes.requestButtonWrapper }, { children: [_jsx(Button, Object.assign({ size: "small", color: "primary", variant: "outlined", onClick: handleAccept, loading: acceptLoading, disabled: acceptLoading }, { children: _jsx(Icon, { children: "check" }) })), _jsx(Button, Object.assign({ size: "small", color: "inherit", variant: "outlined", onClick: () => handleOpenDialog({ tab: SCCourseEditTabType.REQUESTS, request: user }), loading: rejectLoading, disabled: rejectLoading }, { children: _jsx(Icon, { children: "close" }) }))] })));
75
74
  }
76
75
  export default memo(forwardRef(RequestButton));
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { styled } from '@mui/material/styles';
4
- import { Typography } from '@mui/material';
3
+ import { styled, Typography } from '@mui/material';
5
4
  import Widget from '../../components/Widget';
6
5
  import { useThemeProps } from '@mui/system';
7
6
  import classNames from 'classnames';
@@ -14,8 +13,8 @@ const classes = {
14
13
  const Root = styled(Widget, {
15
14
  name: PREFIX,
16
15
  slot: 'Root',
17
- overridesResolver: (props, styles) => styles.root
18
- })(({ theme }) => ({}));
16
+ overridesResolver: (_props, styles) => styles.root
17
+ })(() => ({}));
19
18
  /**
20
19
  * > API documentation for the Community-JS HiddenPurchasableContent component. Learn about the available props and the CSS API.
21
20