@selfcommunity/react-ui 0.11.0-mui7.16 → 0.11.0-mui7.18

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 +14 -14
  188. package/lib/umd/54.js +0 -2
  189. /package/lib/umd/{54.js.LICENSE.txt → 484.js.LICENSE.txt} +0 -0
@@ -2,14 +2,13 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
5
- import { TextField, Typography, FormGroup, styled } from '@mui/material';
5
+ import { TextField, Typography, FormGroup, styled, Button } from '@mui/material';
6
6
  import { http, Endpoints } from '@selfcommunity/api-services';
7
7
  import { Logger } from '@selfcommunity/utils';
8
8
  import { useSCUser } from '@selfcommunity/react-core';
9
9
  import BaseDialog from '../../../shared/BaseDialog';
10
10
  import classNames from 'classnames';
11
11
  import { SCOPE_SC_UI } from '../../../constants/Errors';
12
- import { LoadingButton } from '@mui/lab';
13
12
  import { PREFIX } from '../constants';
14
13
  const messages = defineMessages({
15
14
  name: {
@@ -59,7 +58,7 @@ export default function CreateIncubatorDialog(props) {
59
58
  slogan: slogan
60
59
  }
61
60
  })
62
- .then((res) => {
61
+ .then(() => {
63
62
  setIsSubmitting(false);
64
63
  setSubmitted(true);
65
64
  })
@@ -77,7 +76,7 @@ export default function CreateIncubatorDialog(props) {
77
76
  dialogContent = (_jsx(Typography, Object.assign({ variant: 'subtitle2', className: classes.submittedMessage }, { children: _jsx(FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.propose.success", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.propose.success" }) })));
78
77
  }
79
78
  else {
80
- dialogContent = (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ component: 'span', className: classes.intro }, { children: _jsx(FormattedMessage, { id: "ui.incubatorsListDialog.createIncubatorDialog.intro", defaultMessage: "ui.incubatorsListDialog.createIncubatorDialog.intro" }) })), _jsxs(FormGroup, Object.assign({ className: classes.form }, { children: [_jsx(TextField, { required: true, error: Boolean(error), className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: name, onChange: (event) => setName(event.target.value) }), _jsx(TextField, { multiline: true, error: Boolean(error), className: classes.slogan, placeholder: `${intl.formatMessage(messages.slogan)}`, margin: "normal", value: slogan, onChange: (event) => setSlogan(event.target.value) })] })), _jsx(LoadingButton, Object.assign({ loading: isSubmitting, disabled: !name || Boolean(error), variant: "contained", onClick: handleSubmit }, { children: _jsx(FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.button", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.button" }) }))] }));
79
+ dialogContent = (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ component: 'span', className: classes.intro }, { children: _jsx(FormattedMessage, { id: "ui.incubatorsListDialog.createIncubatorDialog.intro", defaultMessage: "ui.incubatorsListDialog.createIncubatorDialog.intro" }) })), _jsxs(FormGroup, Object.assign({ className: classes.form }, { children: [_jsx(TextField, { required: true, error: Boolean(error), className: classes.name, placeholder: `${intl.formatMessage(messages.name)}`, margin: "normal", value: name, onChange: (event) => setName(event.target.value) }), _jsx(TextField, { multiline: true, error: Boolean(error), className: classes.slogan, placeholder: `${intl.formatMessage(messages.slogan)}`, margin: "normal", value: slogan, onChange: (event) => setSlogan(event.target.value) })] })), _jsx(Button, Object.assign({ loading: isSubmitting, disabled: !name || Boolean(error), variant: "contained", onClick: handleSubmit }, { children: _jsx(FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.button", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.button" }) }))] }));
81
80
  }
82
81
  // RENDER
83
82
  return (_jsx(Root, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.incubatorListWidget.createIncubatorDialog.title", defaultMessage: "ui.incubatorListWidget.createIncubatorDialog.title" }), open: open, onClose: onClose, className: classNames(classes.root, className) }, rest, { children: dialogContent })));
@@ -1,9 +1,8 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import { styled } from '@mui/material';
4
+ import { Button, styled } from '@mui/material';
5
5
  import { SCOPE_SC_UI } from '../../constants/Errors';
6
- import { LoadingButton } from '@mui/lab';
7
6
  import { FormattedMessage } from 'react-intl';
8
7
  import classNames from 'classnames';
9
8
  import { CacheStrategies, Logger } from '@selfcommunity/utils';
@@ -13,11 +12,11 @@ const PREFIX = 'SCIncubatorSubscribeButton';
13
12
  const classes = {
14
13
  root: `${PREFIX}-root`
15
14
  };
16
- const Root = styled(LoadingButton, {
15
+ const Root = styled(Button, {
17
16
  name: PREFIX,
18
17
  slot: 'Root',
19
- overridesResolver: (props, styles) => styles.root
20
- })(({ theme }) => ({}));
18
+ overridesResolver: (_props, styles) => styles.root
19
+ })(() => ({}));
21
20
  /**
22
21
  * > API documentation for the Community-JS Incubator Subscribe Button component. Learn about the available props and the CSS API.
23
22
 
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { LoadingButton } from '@mui/lab';
4
- import { styled } from '@mui/material';
3
+ import { Button, styled } from '@mui/material';
5
4
  import { useThemeProps } from '@mui/system';
6
5
  import { EventService } from '@selfcommunity/api-services';
7
6
  import { useSCFetchEvent, useSCFetchUser } from '@selfcommunity/react-core';
@@ -14,7 +13,7 @@ const PREFIX = 'SCInviteUserEventButton';
14
13
  const classes = {
15
14
  root: `${PREFIX}-root`
16
15
  };
17
- const InviteButton = styled(LoadingButton, {
16
+ const InviteButton = styled(Button, {
18
17
  name: PREFIX,
19
18
  slot: 'Root',
20
19
  overridesResolver: (_props, styles) => styles.root
@@ -2,11 +2,10 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useThemeProps } from '@mui/system';
4
4
  import classNames from 'classnames';
5
- import { AppBar, Icon, IconButton, Toolbar, Typography, Box, styled } from '@mui/material';
5
+ import { AppBar, Icon, IconButton, Toolbar, Typography, Box, styled, Button } from '@mui/material';
6
6
  import { PREFIX } from './constants';
7
7
  import { SCLessonActionsType } from '../../types';
8
8
  import { FormattedMessage } from 'react-intl';
9
- import { LoadingButton } from '@mui/lab';
10
9
  const classes = {
11
10
  root: `${PREFIX}-root`,
12
11
  startItems: `${PREFIX}-start-items`,
@@ -16,9 +15,9 @@ const classes = {
16
15
  const Root = styled(AppBar, {
17
16
  name: PREFIX,
18
17
  slot: 'Root',
19
- overridesResolver: (props, styles) => [styles.root],
18
+ overridesResolver: (_props, styles) => [styles.root],
20
19
  shouldForwardProp: (prop) => prop !== 'open'
21
- })(({ theme }) => ({}));
20
+ })(() => ({}));
22
21
  export default function LessonAppbar(inProps) {
23
22
  // PROPS
24
23
  const props = useThemeProps({
@@ -26,5 +25,5 @@ export default function LessonAppbar(inProps) {
26
25
  name: PREFIX
27
26
  });
28
27
  const { className = null, title = '', showComments, activePanel = null, handleOpen, onSave, editMode, onArrowBackClick, updating } = props, rest = __rest(props, ["className", "title", "showComments", "activePanel", "handleOpen", "onSave", "editMode", "onArrowBackClick", "updating"]);
29
- return (_jsx(Root, Object.assign({ position: "fixed", open: Boolean(activePanel), className: classNames(classes.root, className) }, rest, { children: _jsxs(Toolbar, { children: [_jsxs(Box, Object.assign({ className: classes.startItems }, { children: [_jsx(IconButton, Object.assign({ edge: "start", onClick: onArrowBackClick }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, Object.assign({ variant: "h6", className: classes.title }, { children: title }))] })), editMode ? (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.SETTINGS), color: "primary" }, { children: _jsx(Icon, { children: "settings" }) })), _jsx(LoadingButton, Object.assign({ variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: _jsx(FormattedMessage, { id: "ui.lessonAppbar.button.save", defaultMessage: "ui.lessonAppbar.button.save" }) }))] })) : (_jsxs(Box, Object.assign({ className: classes.endItems }, { children: [showComments && (_jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.COMMENTS) }, { children: _jsx(Icon, { children: "chat_bubble_outline" }) }))), _jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.LESSONS) }, { children: _jsx(Icon, { children: "courses" }) }))] })))] }) })));
28
+ return (_jsx(Root, Object.assign({ position: "fixed", open: Boolean(activePanel), className: classNames(classes.root, className) }, rest, { children: _jsxs(Toolbar, { children: [_jsxs(Box, Object.assign({ className: classes.startItems }, { children: [_jsx(IconButton, Object.assign({ edge: "start", onClick: onArrowBackClick }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, Object.assign({ variant: "h6", className: classes.title }, { children: title }))] })), editMode ? (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.SETTINGS), color: "primary" }, { children: _jsx(Icon, { children: "settings" }) })), _jsx(Button, Object.assign({ variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: _jsx(FormattedMessage, { id: "ui.lessonAppbar.button.save", defaultMessage: "ui.lessonAppbar.button.save" }) }))] })) : (_jsxs(Box, Object.assign({ className: classes.endItems }, { children: [showComments && (_jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.COMMENTS) }, { children: _jsx(Icon, { children: "chat_bubble_outline" }) }))), _jsx(IconButton, Object.assign({ onClick: () => handleOpen(SCLessonActionsType.LESSONS) }, { children: _jsx(Icon, { children: "courses" }) }))] })))] }) })));
30
29
  }
@@ -3,11 +3,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import { useThemeProps } from '@mui/system';
5
5
  import classNames from 'classnames';
6
- import { Box, Checkbox, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, styled } from '@mui/material';
6
+ import { Box, Button, Checkbox, FormControl, FormControlLabel, FormLabel, Radio, RadioGroup, styled } from '@mui/material';
7
7
  import { PREFIX } from './constants';
8
8
  import { FormattedMessage } from 'react-intl';
9
9
  import { SCCourseLessonStatusType } from '@selfcommunity/types';
10
- import { LoadingButton } from '@mui/lab';
11
10
  const classes = {
12
11
  root: `${PREFIX}-root`,
13
12
  form: `${PREFIX}-form`,
@@ -37,5 +36,5 @@ export default function LessonEditForm(inProps) {
37
36
  /**
38
37
  * Rendering
39
38
  */
40
- return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: [_jsxs(Box, Object.assign({ className: classes.form }, { children: [_jsxs(FormControl, { children: [_jsx(FormLabel, Object.assign({ id: "status" }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.title", defaultMessage: "ui.lessonEditForm.status.title" }) })), _jsxs(RadioGroup, Object.assign({ "aria-labelledby": "course-status-radio-buttons-group", name: "course-status-radio-buttons-group", value: settings.status, onChange: (e) => handleChange('status', e.target.value) }, { children: [_jsx(FormControlLabel, { value: SCCourseLessonStatusType.DRAFT, control: _jsx(Radio, {}), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.draft", defaultMessage: "ui.lessonEditForm.status.draft" }) }), _jsx(FormControlLabel, { value: SCCourseLessonStatusType.PUBLISHED, control: _jsx(Radio, {}), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.published", defaultMessage: "ui.lessonEditForm.status.published" }) })] }))] }), _jsxs(FormControl, Object.assign({ className: classes.settings }, { children: [_jsx(FormLabel, Object.assign({ id: "settings" }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.settings.title", defaultMessage: "ui.lessonEditForm.settings.title" }) })), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: settings.comments_enabled, onChange: (e) => handleChange('comments_enabled', e.target.checked) }), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.settings.enableComments", defaultMessage: "ui.lessonEditForm.settings.enableComments" }) })] }))] })), _jsx(LoadingButton, Object.assign({ className: classes.button, variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.button.save", defaultMessage: "ui.lessonEditForm.button.save" }) }))] })));
39
+ return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: [_jsxs(Box, Object.assign({ className: classes.form }, { children: [_jsxs(FormControl, { children: [_jsx(FormLabel, Object.assign({ id: "status" }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.title", defaultMessage: "ui.lessonEditForm.status.title" }) })), _jsxs(RadioGroup, Object.assign({ "aria-labelledby": "course-status-radio-buttons-group", name: "course-status-radio-buttons-group", value: settings.status, onChange: (e) => handleChange('status', e.target.value) }, { children: [_jsx(FormControlLabel, { value: SCCourseLessonStatusType.DRAFT, control: _jsx(Radio, {}), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.draft", defaultMessage: "ui.lessonEditForm.status.draft" }) }), _jsx(FormControlLabel, { value: SCCourseLessonStatusType.PUBLISHED, control: _jsx(Radio, {}), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.status.published", defaultMessage: "ui.lessonEditForm.status.published" }) })] }))] }), _jsxs(FormControl, Object.assign({ className: classes.settings }, { children: [_jsx(FormLabel, Object.assign({ id: "settings" }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.settings.title", defaultMessage: "ui.lessonEditForm.settings.title" }) })), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: settings.comments_enabled, onChange: (e) => handleChange('comments_enabled', e.target.checked) }), label: _jsx(FormattedMessage, { id: "ui.lessonEditForm.settings.enableComments", defaultMessage: "ui.lessonEditForm.settings.enableComments" }) })] }))] })), _jsx(Button, Object.assign({ className: classes.button, variant: "contained", size: "small", onClick: onSave, loading: updating }, { children: _jsx(FormattedMessage, { id: "ui.lessonEditForm.button.save", defaultMessage: "ui.lessonEditForm.button.save" }) }))] })));
41
40
  }
@@ -11,8 +11,8 @@ import { DateTimePickerTabs, LocalizationProvider, MobileDateTimePicker } from '
11
11
  import { SCCourseTypologyType } from '@selfcommunity/types';
12
12
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
13
13
  import { useSCContext } from '@selfcommunity/react-core';
14
- import itLocale from 'date-fns/locale/it';
15
- import enLocale from 'date-fns/locale/en-US';
14
+ import { it } from 'date-fns/locale/it';
15
+ import { enUS } from 'date-fns/locale/en-US';
16
16
  import { CourseService } from '@selfcommunity/api-services';
17
17
  import { SCOPE_SC_UI } from '../../constants/Errors';
18
18
  import { Logger } from '@selfcommunity/utils';
@@ -133,7 +133,7 @@ export default function LessonReleaseMenu(inProps) {
133
133
  id: 'ui.lessonReleaseMenu.now.label',
134
134
  defaultMessage: 'ui.lessonReleaseMenu.now.label'
135
135
  });
136
- return (_jsx(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: course && course.type === SCCourseTypologyType.SCHEDULED ? (_jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? itLocale : enLocale, localeText: {
136
+ return (_jsx(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: course && course.type === SCCourseTypologyType.SCHEDULED ? (_jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it : enUS, localeText: {
137
137
  okButtonLabel: `${intl.formatMessage(messages.pickerOkMessage)}`,
138
138
  cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelMessage)}`,
139
139
  clearButtonLabel: `${intl.formatMessage(messages.pickerClearMessage)}`
@@ -1,7 +1,6 @@
1
1
  import { __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { LoadingButton } from '@mui/lab';
4
- import { Alert, Box, FormGroup, Paper, TextField, Typography, styled } from '@mui/material';
3
+ import { Alert, Box, Button, FormGroup, Paper, TextField, Typography, styled } from '@mui/material';
5
4
  import { useThemeProps } from '@mui/system';
6
5
  import { SCCommunityEnvironment, SCCommunitySubscriptionTier } from '@selfcommunity/types';
7
6
  import classNames from 'classnames';
@@ -241,7 +240,7 @@ export default function LiveStreamForm(inProps) {
241
240
  input: {
242
241
  endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) ? LIVE_STREAM_DESCRIPTION_MAX_LENGTH - field.description.length : LIVE_STREAM_DESCRIPTION_MAX_LENGTH })))
243
242
  }
244
- }, error: Boolean(((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), _jsx(LiveStreamSettingsForm, { settings: field.settings, onChange: handleChangeSettings }), genericError && (_jsx(Box, Object.assign({ className: classes.genericError }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.title ||
243
+ }, error: Boolean(((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), _jsx(LiveStreamSettingsForm, { settings: field.settings, onChange: handleChangeSettings }), genericError && (_jsx(Box, Object.assign({ className: classes.genericError }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ loading: field.isSubmitting, disabled: !field.title ||
245
244
  field.isSubmitting ||
246
245
  field.title.length > LIVE_STREAM_TITLE_MAX_LENGTH ||
247
246
  field.description.length > LIVE_STREAM_DESCRIPTION_MAX_LENGTH ||
@@ -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 { useState } from 'react';
4
- import { Avatar, Box, Stack, Typography, styled } from '@mui/material';
4
+ import { Avatar, Box, Button, Stack, Typography, styled } from '@mui/material';
5
5
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
6
6
  import { SCNotificationTypologyType } from '@selfcommunity/types';
7
7
  import { FormattedMessage } from 'react-intl';
@@ -9,7 +9,6 @@ import DateTimeAgo from '../../../shared/DateTimeAgo';
9
9
  import classNames from 'classnames';
10
10
  import { SCCourseTemplateType, SCNotificationObjectTemplateType } from '../../../types';
11
11
  import NotificationItem from '../../../shared/NotificationItem';
12
- import { LoadingButton } from '@mui/lab';
13
12
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
14
13
  import UserAvatar from '../../../shared/UserAvatar';
15
14
  import { PREFIX } from '../constants';
@@ -54,8 +53,6 @@ export default function CourseNotification(props) {
54
53
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
55
54
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
56
55
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
57
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
58
- // @ts-ignore
59
56
  name: notificationObject.type === SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
60
57
  ? notificationObject.comment.lesson_name
61
58
  : notificationObject.course.name,
@@ -71,8 +68,6 @@ export default function CourseNotification(props) {
71
68
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
72
69
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
73
70
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
74
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
75
- // @ts-ignore
76
71
  name: notificationObject.type === SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
77
72
  ? notificationObject.comment.lesson_name
78
73
  : notificationObject.course.name,
@@ -81,5 +76,5 @@ export default function CourseNotification(props) {
81
76
  : SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
82
77
  ? formatLessonUrl(notificationObject)
83
78
  : notificationObject.course) }, { children: chunks })))
84
- } }), notificationObject.type === SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? (_jsx(Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : (_jsx(CourseItem, { course: notificationObject.course, actions: _jsx(_Fragment, {}), template: SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, to: scRoutingContext.url(getRouteName(notificationObject), getRouteParams(notificationObject)) }, { children: _jsx(FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
79
+ } }), notificationObject.type === SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? (_jsx(Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : (_jsx(CourseItem, { course: notificationObject.course, actions: _jsx(_Fragment, {}), template: SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, to: scRoutingContext.url(getRouteName(notificationObject), getRouteParams(notificationObject)) }, { children: _jsx(FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
85
80
  }
@@ -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 { useState } from 'react';
4
- import { Avatar, Box, Icon, Stack, Typography, styled } from '@mui/material';
4
+ import { Avatar, Box, Button, Icon, Stack, Typography, styled } from '@mui/material';
5
5
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
6
6
  import { SCEventLocationType, SCEventSubscriptionStatusType, SCNotificationTypologyType } from '@selfcommunity/types';
7
7
  import { FormattedMessage, useIntl } from 'react-intl';
@@ -9,7 +9,6 @@ import DateTimeAgo from '../../../shared/DateTimeAgo';
9
9
  import classNames from 'classnames';
10
10
  import { SCNotificationObjectTemplateType } from '../../../types';
11
11
  import NotificationItem from '../../../shared/NotificationItem';
12
- import { LoadingButton } from '@mui/lab';
13
12
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
14
13
  import UserAvatar from '../../../shared/UserAvatar';
15
14
  import { PREFIX } from '../constants';
@@ -61,8 +60,6 @@ export default function EventNotification(props) {
61
60
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
62
61
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
63
62
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.event.${notificationObject.type}`, defaultMessage: `ui.notification.event.${notificationObject.type}`, values: {
64
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
65
- // @ts-ignore
66
63
  icon: (...chunks) => _jsx(Icon, { children: chunks }),
67
64
  event: notificationObject.event.name,
68
65
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }))
@@ -74,21 +71,19 @@ export default function EventNotification(props) {
74
71
  month: 'long'
75
72
  }),
76
73
  hour: intl.formatDate(notificationObject.event.start_date, { hour: 'numeric', minute: 'numeric' })
77
- } }) })), _jsxs(Typography, Object.assign({ component: "p", variant: "body2" }, { children: [_jsx(FormattedMessage, { id: `ui.notification.event.privacy.${notificationObject.event.privacy}`, defaultMessage: `ui.notification.event.privacy.${notificationObject.event.privacy}` }), ' ', "-", ' ', notificationObject.event.location === SCEventLocationType.PERSON ? (_jsx(FormattedMessage, { id: `ui.notification.event.address.live.label`, defaultMessage: `ui.notification.event.address.live.label` })) : (_jsx(FormattedMessage, { id: `ui.notification.event.address.online.label`, defaultMessage: `ui.notification.event.address.online.label` }))] }))] }), footer: isToastTemplate ? (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at }), _jsx(Typography, Object.assign({ color: "primary" }, { children: notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT ? (_jsx(LoadingButton, Object.assign({ disabled: disabled, loading: loading, color: 'primary', variant: "text", size: "small", onClick: () => acceptRequest(notificationObject.event) }, { children: disabled ? (_jsx(FormattedMessage, { id: "ui.notification.event.button.accepted", defaultMessage: "ui.notification.event.button.accepted" })) : (_jsx(FormattedMessage, { id: "ui.notification.event.button.accept", defaultMessage: "ui.notification.event.button.accept" })) }))) : (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: _jsx(FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) }))) }))] }))) : (_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
74
+ } }) })), _jsxs(Typography, Object.assign({ component: "p", variant: "body2" }, { children: [_jsx(FormattedMessage, { id: `ui.notification.event.privacy.${notificationObject.event.privacy}`, defaultMessage: `ui.notification.event.privacy.${notificationObject.event.privacy}` }), ' ', "-", ' ', notificationObject.event.location === SCEventLocationType.PERSON ? (_jsx(FormattedMessage, { id: `ui.notification.event.address.live.label`, defaultMessage: `ui.notification.event.address.live.label` })) : (_jsx(FormattedMessage, { id: `ui.notification.event.address.online.label`, defaultMessage: `ui.notification.event.address.online.label` }))] }))] }), footer: isToastTemplate ? (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at }), _jsx(Typography, Object.assign({ color: "primary" }, { children: notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT ? (_jsx(Button, Object.assign({ disabled: disabled, loading: loading, color: "primary", variant: "text", size: "small", onClick: () => acceptRequest(notificationObject.event) }, { children: disabled ? (_jsx(FormattedMessage, { id: "ui.notification.event.button.accepted", defaultMessage: "ui.notification.event.button.accepted" })) : (_jsx(FormattedMessage, { id: "ui.notification.event.button.accept", defaultMessage: "ui.notification.event.button.accept" })) }))) : (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: _jsx(FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) }))) }))] }))) : (_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
78
75
  }
79
76
  return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: _jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
80
77
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
81
78
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
82
79
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
83
80
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
84
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
85
- // @ts-ignore
86
81
  icon: (...chunks) => _jsx(Icon, { children: chunks }),
87
82
  event: notificationObject.event.name,
88
83
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, notificationObject.event) }, { children: chunks }))
89
- } }), _jsx(EventItem, { event: notificationObject.event, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({}, (notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
84
+ } }), _jsx(EventItem, { event: notificationObject.event, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(Button, Object.assign({}, (notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
90
85
  disabled: disabled
91
- }), { loading: loading, color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton } }, (notificationObject.type !== SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
86
+ }), { loading: loading, color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton } }, (notificationObject.type !== SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT && {
92
87
  component: Link,
93
88
  to: scRoutingContext.url(SCRoutes.EVENT_ROUTE_NAME, notificationObject.event)
94
89
  }), { onClick: notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT
@@ -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 { useContext, useEffect, useState } from 'react';
4
- import { Avatar, Box, Stack, Typography, styled } from '@mui/material';
4
+ import { Avatar, Box, Button, Stack, Typography, styled } from '@mui/material';
5
5
  import { Link, SCRoutes, SCUserContext, useSCRouting } from '@selfcommunity/react-core';
6
6
  import { SCGroupSubscriptionStatusType, SCNotificationTypologyType } from '@selfcommunity/types';
7
7
  import { FormattedMessage } from 'react-intl';
@@ -9,7 +9,6 @@ import DateTimeAgo from '../../../shared/DateTimeAgo';
9
9
  import classNames from 'classnames';
10
10
  import { SCNotificationObjectTemplateType } from '../../../types';
11
11
  import NotificationItem from '../../../shared/NotificationItem';
12
- import { LoadingButton } from '@mui/lab';
13
12
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
14
13
  import UserAvatar from '../../../shared/UserAvatar';
15
14
  import { PREFIX } from '../constants';
@@ -63,7 +62,7 @@ export default function GroupNotification(props) {
63
62
  ? scRoutingContext.url(SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
64
63
  : scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: _jsx(FormattedMessage, { id: "ui.notification.group.button.see", defaultMessage: "ui.notification.group.button.see" }) })) })))] }))) }, rest)));
65
64
  }
66
- return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), status && status !== SCGroupSubscriptionStatusType.SUBSCRIBED && (_jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.acceptButton }, component: Link, loading: scUserContext.user ? status === null || manager.isLoading(notificationObject.group) : null, to: notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
65
+ return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), status && status !== SCGroupSubscriptionStatusType.SUBSCRIBED && (_jsx(Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.acceptButton }, component: Link, loading: scUserContext.user ? status === null || manager.isLoading(notificationObject.group) : null, to: notificationObject.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_GROUP ||
67
66
  notificationObject.type === SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_GROUP
68
67
  ? scRoutingContext.url(SCRoutes.GROUP_MEMBERS_ROUTE_NAME, notificationObject.group)
69
68
  : scRoutingContext.url(SCRoutes.GROUP_ROUTE_NAME, notificationObject.group) }, { children: _jsx(FormattedMessage, { id: "ui.notification.group.button.see", defaultMessage: "ui.notification.group.button.see" }) })))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
@@ -1,14 +1,13 @@
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 { useState } from 'react';
4
- import { Avatar, Box, Icon, Stack, Typography, styled } from '@mui/material';
4
+ import { Avatar, Box, Button, Icon, Stack, Typography, styled } from '@mui/material';
5
5
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
6
6
  import { FormattedMessage } from 'react-intl';
7
7
  import DateTimeAgo from '../../../shared/DateTimeAgo';
8
8
  import classNames from 'classnames';
9
9
  import { SCNotificationObjectTemplateType } from '../../../types';
10
10
  import NotificationItem from '../../../shared/NotificationItem';
11
- import { LoadingButton } from '@mui/lab';
12
11
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
13
12
  import UserAvatar from '../../../shared/UserAvatar';
14
13
  import { PREFIX } from '../constants';
@@ -51,8 +50,6 @@ export default function LiveStreamNotification(props) {
51
50
  }), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
52
51
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
53
52
  }), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
54
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
55
- // @ts-ignore
56
53
  icon: (...chunks) => _jsx(Icon, { children: chunks }),
57
54
  live: notificationObject.live_stream.title,
58
55
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
@@ -63,9 +60,7 @@ export default function LiveStreamNotification(props) {
63
60
  }), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar }) })) })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
64
61
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
65
62
  }), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
66
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
67
- // @ts-ignore
68
63
  live: notificationObject.live_stream.title,
69
64
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
70
- } }), _jsx(LiveStream, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
65
+ } }), _jsx(LiveStream, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
71
66
  }
@@ -19,13 +19,12 @@ import LiveStreamNotification from './LiveStream/LiveStream';
19
19
  import { SCOPE_SC_UI } from '../../constants/Errors';
20
20
  import { getContribution, getContributionRouteName, getContributionSnippet, getRouteData } from '../../utils/contribution';
21
21
  import ContributionFollowNotification from './ContributionFollow';
22
- import { Avatar, CardHeader, Collapse, ListItemButton, ListItemText, Tooltip, styled, CardContent, Icon } from '@mui/material';
22
+ import { Avatar, CardHeader, Collapse, ListItemButton, ListItemText, Tooltip, styled, CardContent, Icon, Button } from '@mui/material';
23
23
  import IncubatorApprovedNotification from './IncubatorApproved';
24
24
  import { Endpoints, http } from '@selfcommunity/api-services';
25
25
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
26
26
  import ContributionNotification from './Contribution';
27
27
  import classNames from 'classnames';
28
- import LoadingButton from '@mui/lab/LoadingButton';
29
28
  import Widget from '../Widget';
30
29
  import { useThemeProps } from '@mui/system';
31
30
  import { Logger } from '@selfcommunity/utils';
@@ -139,7 +138,7 @@ export default function UserNotification(inProps) {
139
138
  function handleStopContentNotification(contribution) {
140
139
  setLoadingSuspendNotification(true);
141
140
  performSuspendNotification(contribution)
142
- .then((data) => {
141
+ .then(() => {
143
142
  const newObj = obj;
144
143
  newObj[contribution.type].suspended = !newObj[contribution.type].suspended;
145
144
  setObj(newObj);
@@ -184,7 +183,9 @@ export default function UserNotification(inProps) {
184
183
  let messageNotification = notificationObject.aggregated[0];
185
184
  return (_jsx(CardHeader, { className: classes.header, avatar: _jsx(Link, Object.assign({}, (!messageNotification.message.sender.deleted && {
186
185
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender)
187
- }), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !messageNotification.message.sender.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar }) })) })), titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!messageNotification.message.sender.deleted && {
186
+ }), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !messageNotification.message.sender.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: messageNotification.message.sender.username, variant: "circular", src: messageNotification.message.sender.avatar }) })) })), slotProps: {
187
+ title: { className: classes.title, variant: 'subtitle1' }
188
+ }, title: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!messageNotification.message.sender.deleted && {
188
189
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, messageNotification.message.sender)
189
190
  }), { onClick: messageNotification.message.sender.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: messageNotification.message.sender.username })), ' ', intl.formatMessage(messages.receivePrivateMessage, {
190
191
  total: notificationObject.aggregated.length,
@@ -202,7 +203,9 @@ export default function UserNotification(inProps) {
202
203
  let groupNotification = notificationObject.aggregated[0];
203
204
  return (_jsx(CardHeader, { className: classes.header, avatar: _jsx(Link, Object.assign({}, (!groupNotification.user.deleted && {
204
205
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, groupNotification.user)
205
- }), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !groupNotification.user.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: groupNotification.user.username, variant: "circular", src: groupNotification.user.avatar }) })) })), titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!groupNotification.user.deleted && {
206
+ }), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !groupNotification.user.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: groupNotification.user.username, variant: "circular", src: groupNotification.user.avatar }) })) })), slotProps: {
207
+ title: { className: classes.title, variant: 'subtitle1' }
208
+ }, title: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!groupNotification.user.deleted && {
206
209
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, groupNotification.user)
207
210
  }), { onClick: groupNotification.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: groupNotification.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.aggregated[0].type}`, defaultMessage: `ui.notification.${notificationObject.aggregated[0].type}`, values: {
208
211
  group: groupNotification.group.name,
@@ -223,7 +226,12 @@ export default function UserNotification(inProps) {
223
226
  notificationObject.aggregated[0].type === SCNotificationTypologyType.VOTE_UP ||
224
227
  notificationObject.aggregated[0].type === SCNotificationTypologyType.CONTRIBUTION)) {
225
228
  const contribution = getContribution(notificationObject);
226
- return (_jsx(CardHeader, { className: classes.header, titleTypographyProps: { className: classes.title, variant: 'subtitle1' }, title: _jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(contribution), getRouteData(notificationObject[contribution.type])) }, { children: getContributionSnippet(contribution) })), action: contribution && (_jsx(Tooltip, Object.assign({ title: contribution.suspended ? (_jsx(FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (_jsx(FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) }, { children: _jsx(LoadingButton, Object.assign({ variant: "text", size: "small", loading: loadingSuspendNotification, color: 'inherit', classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, { children: contribution.suspended ? _jsx(Icon, Object.assign({ color: 'primary' }, { children: "notifications_off" })) : _jsx(Icon, Object.assign({ color: 'inherit' }, { children: "notifications_active" })) })) }))) }));
229
+ return (_jsx(CardHeader, { className: classes.header, slotProps: {
230
+ title: {
231
+ className: classes.title,
232
+ variant: 'subtitle1'
233
+ }
234
+ }, title: _jsx(Link, Object.assign({ to: scRoutingContext.url(getContributionRouteName(contribution), getRouteData(notificationObject[contribution.type])) }, { children: getContributionSnippet(contribution) })), action: contribution && (_jsx(Tooltip, Object.assign({ title: contribution.suspended ? (_jsx(FormattedMessage, { id: 'ui.notification.notificationSuspended', defaultMessage: 'ui.notification.notificationSuspended' })) : (_jsx(FormattedMessage, { id: 'ui.notification.notificationSuspend', defaultMessage: 'ui.notification.notificationSuspend' })) }, { children: _jsx(Button, Object.assign({ variant: "text", size: "small", loading: loadingSuspendNotification, color: "inherit", classes: { root: classes.stopButton }, onClick: () => handleStopContentNotification(contribution) }, { children: contribution.suspended ? _jsx(Icon, Object.assign({ color: 'primary' }, { children: "notifications_off" })) : _jsx(Icon, Object.assign({ color: 'inherit' }, { children: "notifications_active" })) })) }))) }));
227
235
  }
228
236
  return null;
229
237
  }
@@ -1,14 +1,13 @@
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 { useContext, useEffect, useMemo, useState } from 'react';
4
- import { Avatar, Box, Stack, Typography, styled } from '@mui/material';
4
+ import { Avatar, Box, Button, Stack, Typography, styled } from '@mui/material';
5
5
  import { Link, SCPreferences, SCRoutes, SCUserContext, useSCPreferences, useSCRouting } from '@selfcommunity/react-core';
6
6
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
7
7
  import DateTimeAgo from '../../../shared/DateTimeAgo';
8
8
  import classNames from 'classnames';
9
9
  import { SCNotificationObjectTemplateType } from '../../../types';
10
10
  import NotificationItem from '../../../shared/NotificationItem';
11
- import { LoadingButton } from '@mui/lab';
12
11
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
13
12
  import UserAvatar from '../../../shared/UserAvatar';
14
13
  import { PREFIX } from '../constants';
@@ -94,7 +93,7 @@ export default function PrivateMessageNotification(props) {
94
93
  ? scRoutingContext.url(SCRoutes.GROUP_MESSAGES_ROUTE_NAME, notificationObject.message.group)
95
94
  : scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, notificationObject.message.sender) }, { children: scUserContext.user && follower ? (_jsx(FormattedMessage, { id: "ui.userToastNotifications.replyMessage", defaultMessage: 'ui.userToastNotifications.replyMessage' })) : (_jsx(FormattedMessage, { id: "ui.userToastNotifications.viewMessage", defaultMessage: 'ui.userToastNotifications.viewMessage' })) })) }))] }))) }, rest)));
96
95
  }
97
- return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.replyButton }, component: Link, loading: notificationObject.message.sender.deleted
96
+ return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(Button, Object.assign({ color: "primary", variant: "outlined", size: "small", classes: { root: classes.replyButton }, component: Link, loading: notificationObject.message.sender.deleted
98
97
  ? null
99
98
  : scUserContext.user
100
99
  ? follower === null || manager.isLoading(notificationObject.message.sender)
@@ -13,7 +13,6 @@ import { formatColorLabel, formatLogoLabel } from '../../../../utils/onBoarding'
13
13
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
14
14
  import { SCOPE_SC_UI } from '../../../../constants/Errors';
15
15
  import { Logger } from '@selfcommunity/utils';
16
- import { LoadingButton } from '@mui/lab';
17
16
  import ScrollContainer from '../../../../shared/ScrollContainer';
18
17
  const messages = defineMessages({
19
18
  titleField: {
@@ -178,9 +177,9 @@ export default function Appearance(inProps) {
178
177
  }, []);
179
178
  return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(Typography, Object.assign({ variant: "h4", className: classes.title, alignSelf: "self-start" }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.appearance", defaultMessage: "ui.onBoardingWidget.appearance" }) })), _jsx(Typography, Object.assign({ className: classes.summary }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.summary", defaultMessage: "ui.onBoardingWidget.step.appearance.summary" }) })), _jsx(Button, Object.assign({ variant: "outlined", size: "small", color: "primary", onClick: handleOpen }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.button", defaultMessage: "ui.onBoardingWidget.step.appearance.button" }) })), _jsxs(DrawerRoot, Object.assign({ className: classes.drawerRoot, anchor: "right", open: Boolean(anchorEl), onClose: handleClose }, { children: [_jsxs(Box, Object.assign({ className: classes.drawerHeader }, { children: [_jsx(Typography, Object.assign({ variant: "h4", color: "primary" }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.header.title", defaultMessage: "ui.onBoardingWidget.step.appearance.header.title" }) })), _jsx(IconButton, Object.assign({ className: classes.drawerHeaderAction, onClick: handleClose }, { children: _jsx(Icon, { children: "close" }) }))] })), _jsxs(Tabs, Object.assign({ value: tab, onChange: handleTabChange, variant: "scrollable", scrollButtons: "auto", "aria-label": "scrollable-tabs" }, { children: [_jsx(Tab, { value: AppearanceTabType.COLOR, label: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.colors.title", defaultMessage: "ui.onBoardingWidget.step.appearance.colors.title" }) }), _jsx(Tab, { value: AppearanceTabType.LOGO, label: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.logo.title", defaultMessage: "ui.onBoardingWidget.step.appearance.logo.title" }) }), _jsx(Tab, { value: AppearanceTabType.SLOGAN, label: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.title", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.title" }) })] })), _jsx(ScrollContainer, { children: _jsxs(Box, Object.assign({ className: classes.drawerContent }, { children: [tab === AppearanceTabType.COLOR && (_jsxs(Box, Object.assign({ className: classes.colorContainer }, { children: [preferences
180
179
  .filter((item) => item.section === SCPreferenceSection.COLORS)
181
- .map((color) => (_jsxs(React.Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: formatColorLabel(color) })), _jsx(Box, { children: _jsx(MuiColorInput, { inputRef: colorRef, className: classes.color, format: "hex", value: color.value, onChange: (value) => handleColorChange(value, color.name), isAlphaHidden: true, PopoverProps: { onClose: handleClosePopover } }) })] }, color.id))), _jsx(LoadingButton, Object.assign({ loading: loading || updating, disabled: loading || updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))), tab === AppearanceTabType.LOGO && (_jsx(_Fragment, { children: preferences
180
+ .map((color) => (_jsxs(React.Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: formatColorLabel(color) })), _jsx(Box, { children: _jsx(MuiColorInput, { inputRef: colorRef, className: classes.color, format: "hex", value: color.value, onChange: (value) => handleColorChange(value, color.name), isAlphaHidden: true, PopoverProps: { onClose: handleClosePopover } }) })] }, color.id))), _jsx(Button, Object.assign({ loading: loading || updating, disabled: loading || updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))), tab === AppearanceTabType.LOGO && (_jsx(_Fragment, { children: preferences
182
181
  .filter((item) => item.section === SCPreferenceSection.LOGO)
183
- .map((logo) => (_jsxs(React.Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: formatLogoLabel(logo.name) })), _jsxs(Box, Object.assign({ className: classes.logoContainer }, { children: [_jsx("img", { src: logo.value, className: classes.logo }), _jsx("input", { type: "file", onChange: (event) => handleUpload(event, logo.name), hidden: true, accept: ".gif,.png,.jpg,.jpeg", id: logo.name }), _jsx(LoadingButton, Object.assign({ className: classes.uploadButton, onClick: () => document.getElementById(`${logo.name}`).click(), loading: Boolean(loadingLogo) && Boolean(logo.name === loadingLogo), disabled: Boolean(loadingLogo) && Boolean(logo.name !== loadingLogo) }, { children: _jsx(Icon, { children: "upload" }) }))] }))] }, logo.id))) })), tab === AppearanceTabType.SLOGAN && (_jsxs(Box, { children: [_jsx(TextField, { multiline: true, fullWidth: true, label: `${intl.formatMessage(messages.titleField)}`, margin: "normal", value: ((_a = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _a === void 0 ? void 0 : _a.value) || '', name: "application_slogan1", onChange: handleChange, slotProps: {
182
+ .map((logo) => (_jsxs(React.Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6" }, { children: formatLogoLabel(logo.name) })), _jsxs(Box, Object.assign({ className: classes.logoContainer }, { children: [_jsx("img", { src: logo.value, className: classes.logo }), _jsx("input", { type: "file", onChange: (event) => handleUpload(event, logo.name), hidden: true, accept: ".gif,.png,.jpg,.jpeg", id: logo.name }), _jsx(Button, Object.assign({ className: classes.uploadButton, onClick: () => document.getElementById(`${logo.name}`).click(), loading: Boolean(loadingLogo) && Boolean(logo.name === loadingLogo), disabled: Boolean(loadingLogo) && Boolean(logo.name !== loadingLogo) }, { children: _jsx(Icon, { children: "upload" }) }))] }))] }, logo.id))) })), tab === AppearanceTabType.SLOGAN && (_jsxs(Box, { children: [_jsx(TextField, { multiline: true, fullWidth: true, label: `${intl.formatMessage(messages.titleField)}`, margin: "normal", value: ((_a = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _a === void 0 ? void 0 : _a.value) || '', name: "application_slogan1", onChange: handleChange, slotProps: {
184
183
  input: {
185
184
  endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = (_b = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.length)
186
185
  ? 50 - ((_d = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan1')) === null || _d === void 0 ? void 0 : _d.value.length)
@@ -192,5 +191,5 @@ export default function Appearance(inProps) {
192
191
  ? 150 - ((_k = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _k === void 0 ? void 0 : _k.value.length)
193
192
  : 150 })))
194
193
  }
195
- }, error: Boolean(((_m = (_l = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 150) }), _jsx(LoadingButton, Object.assign({ loading: updating, disabled: updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))] })) })] }))] })));
194
+ }, error: Boolean(((_m = (_l = preferences === null || preferences === void 0 ? void 0 : preferences.find((item) => item.section === 'text' && item.name === 'application_slogan2')) === null || _l === void 0 ? void 0 : _l.value) === null || _m === void 0 ? void 0 : _m.length) > 150) }), _jsx(Button, Object.assign({ loading: updating, disabled: updating || Object.keys(data).length === 0, variant: "outlined", size: "small", color: "primary", onClick: updatePreference }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.appearance.titleSlogan.button", defaultMessage: "ui.onBoardingWidget.step.appearance.titleSlogan.button" }) }))] }))] })) })] }))] })));
196
195
  }
@@ -3,7 +3,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
3
3
  import { useCallback, useEffect, useState } from 'react';
4
4
  import { Box, Chip, Paper, Table, TableBody, Skeleton, TableCell, TableContainer, TableHead, TableRow, Typography, Stack, CircularProgress, styled, Grid, TextField, InputAdornment, IconButton, Icon, Button, useTheme, useMediaQuery, MenuItem } from '@mui/material';
5
5
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
6
- import LoadingButton from '@mui/lab/LoadingButton';
7
6
  import { useInView } from 'react-intersection-observer';
8
7
  import { PaymentService } from '@selfcommunity/api-services';
9
8
  import { useThemeProps } from '@mui/system';
@@ -22,8 +21,8 @@ import { SCOPE_SC_UI } from '../../constants/Errors';
22
21
  import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
23
22
  import { LocalizationProvider, MobileDatePicker } from '@mui/x-date-pickers';
24
23
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
25
- import itLocale from 'date-fns/locale/it';
26
- import enLocale from 'date-fns/locale/en-US';
24
+ import { it } from 'date-fns/locale/it';
25
+ import { enUS } from 'date-fns/locale/en-US';
27
26
  import Category from '../Category';
28
27
  const PREFIX = 'SCPaymentOrders';
29
28
  const messages = defineMessages({
@@ -207,7 +206,7 @@ export default function PaymentOrders(inProps) {
207
206
  const skeleton = () => {
208
207
  return (_jsxs(TableRow, Object.assign({ ref: ref }, { children: [_jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 20 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 30 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 80, width: 250 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 65 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 65 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 65 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 65 }) })), _jsx(TableCell, Object.assign({ component: "th", scope: "row" }, { children: _jsx(Skeleton, { variant: "text", height: 40, width: 65 }) }))] })));
209
208
  };
210
- return (_jsxs(Root, Object.assign({ variant: "outlined", className: classNames(classes.root, className) }, rest, { children: [_jsxs(Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 3 }, { children: [_jsx(Grid, Object.assign({ size: { md: 3 } }, { children: _jsx(TextField, { className: classes.search, size: "small", fullWidth: true, value: query, label: _jsx(FormattedMessage, { id: "ui.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
209
+ return (_jsxs(Root, Object.assign({ variant: "outlined", className: classNames(classes.root, className) }, rest, { children: [_jsxs(Grid, Object.assign({ container: true, width: "100%", className: classes.filters, gap: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: _jsx(TextField, { className: classes.search, size: "small", fullWidth: true, value: query, label: _jsx(FormattedMessage, { id: "ui.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
211
210
  e.preventDefault();
212
211
  if (e.key === 'Enter') {
213
212
  fetchInvoices();
@@ -219,7 +218,7 @@ export default function PaymentOrders(inProps) {
219
218
  fetchInvoices('');
220
219
  }, disabled: isLoading }, { children: _jsx(Icon, { children: "close" }) }))), isMobile ? (_jsx(IconButton, { onClick: () => fetchInvoices(), disabled: isLoading })) : (_jsx(Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchInvoices(), endIcon: _jsx(Icon, { children: "search" }), disabled: isLoading }))] })))
221
220
  }
222
- } }) })), _jsx(Grid, Object.assign({ size: { md: 3 } }, { children: _jsx(TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: _jsx(FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => (_jsx(MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), _jsx(Grid, Object.assign({ size: { sm: 8, md: 4 } }, { children: _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? itLocale : enLocale, localeText: {
221
+ } }) })), _jsx(Grid, Object.assign({ size: { xs: 12, md: 3 } }, { children: _jsx(TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: _jsx(FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => (_jsx(MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: 8, md: 4 } }, { children: _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it : enUS, localeText: {
223
222
  cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelAction)}`,
224
223
  clearButtonLabel: `${intl.formatMessage(messages.pickerClearAction)}`
225
224
  } }, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 2 }, { children: [_jsx(Grid, Object.assign({ size: 6 }, { children: _jsx(MobileDatePicker, { className: classes.picker, label: _jsx(FormattedMessage, { id: "ui.paymentOrders.dateFrom", defaultMessage: "ui.paymentOrders.dateFrom" }), value: startDate, slots: {
@@ -263,5 +262,5 @@ export default function PaymentOrders(inProps) {
263
262
  hour: 'numeric',
264
263
  minute: 'numeric'
265
264
  })
266
- : '-' })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsx(Chip, { variant: 'outlined', label: _jsx(FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [order.content_type === SCContentType.EVENT && _jsx(PaymentOrderPdfButton, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && (_jsx(LoadingButton, Object.assign({ size: "small", variant: "contained", disabled: true }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrders.pay", defaultMessage: "ui.paymentOrders.pay" }) })))] })) }))] }, index))), orders.length < 1 && (_jsx(TableRow, { children: _jsx(TableCell, Object.assign({ align: "left", colSpan: 6 }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrders.noOrders", defaultMessage: "ui.paymentOrders.noOrders" }) })) })) })), hasMore && _jsx(_Fragment, { children: skeleton() })] })] })) }))) : (_jsx(CircularProgress, {})) }))] })));
265
+ : '-' })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsx(Chip, { variant: 'outlined', label: _jsx(FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [order.content_type === SCContentType.EVENT && _jsx(PaymentOrderPdfButton, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && (_jsx(Button, Object.assign({ size: "small", variant: "contained", disabled: true }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrders.pay", defaultMessage: "ui.paymentOrders.pay" }) })))] })) }))] }, index))), orders.length < 1 && (_jsx(TableRow, { children: _jsx(TableCell, Object.assign({ align: "left", colSpan: 6 }, { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrders.noOrders", defaultMessage: "ui.paymentOrders.noOrders" }) })) })) })), hasMore && _jsx(_Fragment, { children: skeleton() })] })] })) }))) : (_jsx(CircularProgress, {})) }))] })));
267
266
  }
@@ -39,5 +39,5 @@ export default function PaymentProductsSkeleton(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
  }