@selfcommunity/react-ui 0.11.0-mui7.22 → 0.11.0-mui7.23

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 (190) hide show
  1. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +2 -2
  2. package/lib/cjs/components/AccountDelete/AccountDelete.js +3 -3
  3. package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
  4. package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
  5. package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
  6. package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
  7. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  8. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +5 -5
  9. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
  10. package/lib/cjs/components/ConsentSolution/ConsentSolution.js +9 -3
  11. package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
  12. package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  13. package/lib/cjs/components/CourseForm/Edit.js +6 -2
  14. package/lib/cjs/components/Courses/Courses.js +1 -1
  15. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  16. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  17. package/lib/cjs/components/EditCourse/Status.js +1 -1
  18. package/lib/cjs/components/EventForm/EventForm.js +2 -2
  19. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  20. package/lib/cjs/components/Events/LocationEventsFilter.js +1 -1
  21. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  22. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
  23. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  24. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  25. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  26. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  27. package/lib/cjs/components/GroupForm/GroupForm.js +7 -7
  28. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  29. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
  30. package/lib/cjs/components/Incubator/Incubator.js +2 -2
  31. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  32. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
  33. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  34. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  35. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  36. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +1 -1
  37. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  38. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  39. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
  40. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  41. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  42. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  43. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  44. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  45. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  46. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  47. package/lib/cjs/components/Notification/Course/Course.js +4 -4
  48. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
  49. package/lib/cjs/components/Notification/Event/Event.js +4 -4
  50. package/lib/cjs/components/Notification/Group/Group.js +2 -2
  51. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  52. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  53. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  54. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +3 -3
  55. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  56. package/lib/cjs/components/Notification/Notification.js +5 -5
  57. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
  58. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  59. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
  60. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
  61. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  62. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  63. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +10 -7
  64. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  65. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
  66. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  67. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  68. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +1 -1
  69. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +1 -1
  70. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +1 -1
  71. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  72. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  73. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  74. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  75. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  76. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +3 -3
  77. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +1 -1
  78. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +1 -1
  79. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
  80. package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
  81. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  82. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +6 -7
  83. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
  84. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +1 -1
  85. package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
  86. package/lib/cjs/shared/DateTimeAgo/index.js +1 -1
  87. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  88. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  89. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
  90. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  91. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  92. package/lib/cjs/shared/Tags/index.js +1 -1
  93. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
  94. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +2 -2
  95. package/lib/esm/components/AccountDelete/AccountDelete.js +3 -3
  96. package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
  97. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  98. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  99. package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
  100. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  101. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +5 -5
  102. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
  103. package/lib/esm/components/ConsentSolution/ConsentSolution.js +9 -3
  104. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  105. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  106. package/lib/esm/components/CourseForm/Edit.js +6 -2
  107. package/lib/esm/components/Courses/Courses.js +1 -1
  108. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  109. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  110. package/lib/esm/components/EditCourse/Status.js +1 -1
  111. package/lib/esm/components/EventForm/EventForm.js +2 -2
  112. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  113. package/lib/esm/components/Events/LocationEventsFilter.js +1 -1
  114. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  115. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
  116. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  117. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  118. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  119. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  120. package/lib/esm/components/GroupForm/GroupForm.js +7 -7
  121. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  122. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
  123. package/lib/esm/components/Incubator/Incubator.js +2 -2
  124. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  125. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
  126. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  127. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  128. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  129. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +1 -1
  130. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  131. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  132. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
  133. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  134. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  135. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  136. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  137. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  138. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  139. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  140. package/lib/esm/components/Notification/Course/Course.js +4 -4
  141. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
  142. package/lib/esm/components/Notification/Event/Event.js +4 -4
  143. package/lib/esm/components/Notification/Group/Group.js +2 -2
  144. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  145. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  146. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  147. package/lib/esm/components/Notification/LiveStream/LiveStream.js +3 -3
  148. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  149. package/lib/esm/components/Notification/Notification.js +5 -5
  150. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
  151. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  152. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
  153. package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
  154. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  155. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  156. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +11 -8
  157. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  158. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
  159. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  160. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  161. package/lib/esm/components/PaymentOrders/PaymentOrders.js +1 -1
  162. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +1 -1
  163. package/lib/esm/components/PlatformWidget/PlatformWidget.js +1 -1
  164. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  165. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  166. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  167. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  168. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  169. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -4
  170. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +1 -1
  171. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +1 -1
  172. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
  173. package/lib/esm/components/UserCounters/UserCounters.js +5 -13
  174. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  175. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
  176. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
  177. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +1 -1
  178. package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
  179. package/lib/esm/shared/DateTimeAgo/index.js +1 -1
  180. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  181. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  182. package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
  183. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  184. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  185. package/lib/esm/shared/Tags/index.js +1 -1
  186. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
  187. package/lib/umd/484.js +1 -1
  188. package/lib/umd/484.js.LICENSE.txt +1 -1
  189. package/lib/umd/react-ui.js +1 -1
  190. package/package.json +10 -10
@@ -74,7 +74,7 @@ export default function UserChangeAddressDialog(inProps) {
74
74
  if (!isPaymentsEnabled || !scUserContext.user) {
75
75
  return null;
76
76
  }
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: {
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: {
78
78
  mode: 'billing',
79
79
  defaultValues: addressState
80
80
  } }) })) })));
@@ -16,7 +16,7 @@ const classes = {
16
16
  const Root = styled(Box, {
17
17
  name: PREFIX,
18
18
  slot: 'Root',
19
- overridesResolver: (props, styles) => styles.root
19
+ overridesResolver: (_props, styles) => styles.root
20
20
  })(() => ({}));
21
21
  /**
22
22
  * > API documentation for the Community-JS User Counters component. Learn about the available props and the CSS API.
@@ -91,23 +91,15 @@ export default function UserCounters(inProps) {
91
91
  return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(_Fragment, { children: (followEnabled || connectionEnabled) &&
92
92
  (followEnabled ? (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ className: classes.button, variant: "text", component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWINGS_ROUTE_NAME, scUser) }, { children: _jsx(FormattedMessage, { id: "ui.userCounters.followings", defaultMessage: "ui.userCounters.followings", values: {
93
93
  count: scUser === null || scUser === void 0 ? void 0 : scUser.followings_counter,
94
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
95
- // @ts-ignore
96
- b: (chunks) => _jsx("strong", { children: chunks })
94
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.userCounters.followings.b")
97
95
  } }) })), _jsx(Bullet, {}), _jsx(Button, Object.assign({ className: classes.button, variant: "text", component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWERS_ROUTE_NAME, scUser) }, { children: _jsx(FormattedMessage, { id: "ui.userCounters.followers", defaultMessage: "ui.userCounters.followers", values: {
98
96
  count: scUser === null || scUser === void 0 ? void 0 : scUser.followers_counter,
99
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
100
- // @ts-ignore
101
- b: (chunks) => _jsx("strong", { children: chunks })
97
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.userCounters.followers.b")
102
98
  } }) }))] })) : (_jsxs(_Fragment, { children: [_jsx(Button, Object.assign({ className: classes.button, variant: "text", component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_CONNECTIONS_ROUTE_NAME, scUser) }, { children: _jsx(FormattedMessage, { id: "ui.userCounters.connections", defaultMessage: "ui.userCounters.connections", values: {
103
99
  count: scUser === null || scUser === void 0 ? void 0 : scUser.connections_counter,
104
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
105
- // @ts-ignore
106
- b: (chunks) => _jsx("strong", { children: chunks })
100
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.userCounters.connections.b")
107
101
  } }) })), _jsx(Bullet, {})] }))) }), categoryFollowEnabled && (_jsx(Button, Object.assign({ className: classes.button, variant: "text", component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_CATEGORIES_ROUTE_NAME, scUser) }, { children: _jsx(FormattedMessage, { id: "ui.userCounters.categories", defaultMessage: "ui.userCounters.categories", values: {
108
102
  count: scUser === null || scUser === void 0 ? void 0 : scUser.categories_counter,
109
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
110
- // @ts-ignore
111
- b: (chunks) => _jsx("strong", { children: chunks })
103
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.userCounters.categories.b")
112
104
  } }) })))] })));
113
105
  }
@@ -120,7 +120,7 @@ export default function UserInfo(inProps) {
120
120
  case SCUserProfileFields.DATE_OF_BIRTH:
121
121
  return `${intl.formatDate(user[field], { year: 'numeric', month: 'numeric', day: 'numeric' })}`;
122
122
  case SCUserProfileFields.TAGS:
123
- return (_jsx(Tags, { tags: user.tags.filter((t) => t.visible), type: TagsComponentType.LIST, direction: 'row', TagChipProps: { clickable: false, disposable: false } }));
123
+ return (_jsx(Tags, { tags: user.tags.filter((t) => t.visible), type: TagsComponentType.LIST, direction: "row", TagChipProps: { clickable: false, disposable: false } }));
124
124
  case SCUserProfileFields.WEBSITE:
125
125
  return (_jsx("a", Object.assign({ href: user[field], target: '_blank' }, { children: user[field] })));
126
126
  default:
@@ -1,4 +1,4 @@
1
- import { __awaiter, __rest } from "tslib";
1
+ import { __awaiter } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import { Box, Button, Checkbox, CircularProgress, Icon, IconButton, Paper, Stack, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Typography, styled } from '@mui/material';
@@ -7,7 +7,7 @@ import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
7
7
  import { useThemeProps } from '@mui/system';
8
8
  import { PREFIX } from './constants';
9
9
  import UserPaymentMethodsSkeleton from './Skeleton';
10
- import { FormattedMessage, useIntl } from 'react-intl';
10
+ import { FormattedMessage } from 'react-intl';
11
11
  import { useInView } from 'react-intersection-observer';
12
12
  import { useSnackbar } from 'notistack';
13
13
  import ConfirmDialog from '../../shared/ConfirmDialog/ConfirmDialog';
@@ -51,7 +51,7 @@ const UserPaymentMethods = (inProps) => {
51
51
  props: inProps,
52
52
  name: PREFIX
53
53
  });
54
- const { className = null, showBillingAddress = false } = props, rest = __rest(props, ["className", "showBillingAddress"]);
54
+ const { className = null, showBillingAddress = false } = props;
55
55
  // CONTEXT
56
56
  const scUserContext = useSCUser();
57
57
  // STATE
@@ -70,7 +70,6 @@ const UserPaymentMethods = (inProps) => {
70
70
  const [addPaymentMethodDialogOpen, setAddPaymentMethodDialogOpen] = useState(false);
71
71
  // HOOKS
72
72
  const { isPaymentsEnabled } = useSCPaymentsEnabled();
73
- const intl = useIntl();
74
73
  const { inView } = useInView({ triggerOnce: false });
75
74
  const { enqueueSnackbar } = useSnackbar();
76
75
  /**
@@ -79,8 +78,8 @@ const UserPaymentMethods = (inProps) => {
79
78
  const loadMore = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
80
79
  // eslint-disable-next-line @typescript-eslint/require-await
81
80
  const loadItems = () => __awaiter(void 0, void 0, void 0, function* () {
82
- const startingAfterId = paymentMethods.length ? paymentMethods[paymentMethods.length - 1].id : null;
83
- /* getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
81
+ /* const startingAfterId = paymentMethods.length ? paymentMethods[paymentMethods.length - 1].id : null;
82
+ getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
84
83
  setHasMore(res.paymentMethods.has_more);
85
84
  setPaymentMethods(paymentMethods.concat(res.paymentMethods.data));
86
85
  setIsLoadingPage(false);
@@ -328,9 +327,9 @@ const UserPaymentMethods = (inProps) => {
328
327
  if (!isPaymentsEnabled || !scUserContext.user) {
329
328
  return null;
330
329
  }
331
- return (_jsx(Root, Object.assign({ className: classes.root }, { children: isLoading ? (_jsx(UserPaymentMethodsSkeleton, {})) : (_jsxs(_Fragment, { children: [_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [_jsx(Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && (_jsx(Button, Object.assign({ size: "small", variant: 'outlined', onClick: handleOpenAddPaymentMethodDialog }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) })))] })), paymentMethods.length > 0 ? (_jsx(TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 }, component: Paper }, { children: _jsxs(Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.typeMethod", defaultMessage: "ui.userPaymentMethods.typeMethod" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.brand", defaultMessage: "ui.userPaymentMethods.brand" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.expiration", defaultMessage: "ui.userPaymentMethods.expiration" }) }), showBillingAddress && (_jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.billingDetails", defaultMessage: "ui.userPaymentMethods.billingDetails" }) })), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.default", defaultMessage: "ui.userPaymentMethods.default" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.actions", defaultMessage: "ui.userPaymentMethods.actions" }) })] }) }), _jsxs(TableBody, { children: [paymentMethods.map((method, index) => {
330
+ return (_jsx(Root, Object.assign({ className: classes.root }, { children: isLoading ? (_jsx(UserPaymentMethodsSkeleton, {})) : (_jsxs(_Fragment, { children: [_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [_jsx(Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && (_jsx(Button, Object.assign({ size: "small", variant: "outlined", onClick: handleOpenAddPaymentMethodDialog }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) })))] })), paymentMethods.length > 0 ? (_jsx(TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 }, component: Paper }, { children: _jsxs(Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.typeMethod", defaultMessage: "ui.userPaymentMethods.typeMethod" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.brand", defaultMessage: "ui.userPaymentMethods.brand" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.expiration", defaultMessage: "ui.userPaymentMethods.expiration" }) }), showBillingAddress && (_jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.billingDetails", defaultMessage: "ui.userPaymentMethods.billingDetails" }) })), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.default", defaultMessage: "ui.userPaymentMethods.default" }) }), _jsx(TableCell, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.actions", defaultMessage: "ui.userPaymentMethods.actions" }) })] }) }), _jsxs(TableBody, { children: [paymentMethods.map((method, index) => {
332
331
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
333
- return (_jsxs(TableRow, { children: [_jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && (_jsxs(_Fragment, { children: [_jsx(PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), _jsxs(Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), _jsxs(TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && (_jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: method.billing_details.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [(_f = (_e = method.billing_details) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.line1, _jsx("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [(_k = (_j = method.billing_details) === null || _j === void 0 ? void 0 : _j.address) === null || _k === void 0 ? void 0 : _k.postal_code, " - ", (_m = (_l = method.billing_details) === null || _l === void 0 ? void 0 : _l.address) === null || _m === void 0 ? void 0 : _m.city, " -", ' ', (_p = (_o = method.billing_details) === null || _o === void 0 ? void 0 : _o.address) === null || _p === void 0 ? void 0 : _p.country] }))] }), _jsx(IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: _jsx(Icon, { children: "edit" }) }))] })) }))), _jsx(TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? (_jsx(CircularProgress, { size: 20 })) : (_jsxs(_Fragment, { children: [method.id === defaultPaymentMethodId, _jsx(Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsx(Button, Object.assign({ variant: 'contained', onClick: () => handleDelete(method.id) }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
334
- }), hasMore && _jsx(UserPaymentMethodsSkeleton, {})] })] })) }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body2", mb: 2 }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), _jsx(Button, Object.assign({ size: "small", variant: 'contained', onClick: handleOpenAddPaymentMethodDialog }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && (_jsx(ConfirmDialog, { open: openDeleteDialog, title: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && (_jsx(UserChangeAddressDialog, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && _jsx(UserAddPaymentMethodDialog, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
332
+ return (_jsxs(TableRow, { children: [_jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && (_jsxs(_Fragment, { children: [_jsx(PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), _jsxs(Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), _jsxs(TableCell, Object.assign({ scope: "row" }, { children: [(_c = method.card) === null || _c === void 0 ? void 0 : _c.exp_month, "/", (_d = method.card) === null || _d === void 0 ? void 0 : _d.exp_year] })), showBillingAddress && (_jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: method.billing_details.name })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [(_f = (_e = method.billing_details) === null || _e === void 0 ? void 0 : _e.address) === null || _f === void 0 ? void 0 : _f.line1, _jsx("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [(_k = (_j = method.billing_details) === null || _j === void 0 ? void 0 : _j.address) === null || _k === void 0 ? void 0 : _k.postal_code, " - ", (_m = (_l = method.billing_details) === null || _l === void 0 ? void 0 : _l.address) === null || _m === void 0 ? void 0 : _m.city, " -", ' ', (_p = (_o = method.billing_details) === null || _o === void 0 ? void 0 : _o.address) === null || _p === void 0 ? void 0 : _p.country] }))] }), _jsx(IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: _jsx(Icon, { children: "edit" }) }))] })) }))), _jsx(TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? (_jsx(CircularProgress, { size: 20 })) : (_jsxs(_Fragment, { children: [method.id === defaultPaymentMethodId, _jsx(Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), _jsx(TableCell, Object.assign({ scope: "row" }, { children: _jsx(Button, Object.assign({ variant: "contained", onClick: () => handleDelete(method.id) }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
333
+ }), hasMore && _jsx(UserPaymentMethodsSkeleton, {})] })] })) }))) : (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body2", mb: 2 }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), _jsx(Button, Object.assign({ size: "small", variant: "contained", onClick: handleOpenAddPaymentMethodDialog }, { children: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && (_jsx(ConfirmDialog, { open: openDeleteDialog, title: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && (_jsx(UserChangeAddressDialog, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && _jsx(UserAddPaymentMethodDialog, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
335
334
  };
336
335
  export default UserPaymentMethods;
@@ -167,5 +167,5 @@ export default function AccountCredentials(props) {
167
167
  }, transformOrigin: {
168
168
  vertical: 'center',
169
169
  horizontal: 'right'
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" }) }))] })))] })));
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" }) }))] })))] })));
171
171
  }
@@ -230,5 +230,5 @@ export default function PublicInfo(props) {
230
230
  }
231
231
  return (_jsxs(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: [startActions, _fields.map((field) => {
232
232
  return renderField(field);
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] })));
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] })));
234
234
  }
@@ -726,7 +726,7 @@ export default function ContributionActionsMenu(props) {
726
726
  */
727
727
  function renderFlagContributionSection() {
728
728
  const open = openSection === FLAG_CONTRIBUTION_SECTION;
729
- return (_jsx(Box, { children: !contributionObj.deleted && !contributionObj.collapsed && (_jsxs(Box, { children: [_jsxs(MenuItem, Object.assign({ className: classes.subItem, disabled: isFlagging, onClick: () => handleOpenSection(FLAG_CONTRIBUTION_SECTION) }, { children: [_jsx(ListItemIcon, { children: flagType !== undefined && flagType !== null ? (_jsx(Badge, Object.assign({ classes: { badge: classes.sectionBadge }, badgeContent: _jsx(Icon, Object.assign({ className: classes.sectionWithSelectionIcon }, { children: "check" })), color: "primary" }, { children: _jsx(Icon, { children: "outlined_flag" }) }))) : (_jsx(Icon, { children: "outlined_flag" })) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: "ui.contributionActionMenu.flagContributionWithMotivation", defaultMessage: "ui.contributionActionMenu.flagContributionWithMotivation" }) }), open ? _jsx(Icon, { children: "expand_less" }) : _jsx(Icon, { children: "expand_more" })] })), _jsxs(Collapse, Object.assign({ in: open, timeout: "auto", unmountOnExit: true }, { children: [renderReports(FLAG_CONTRIBUTION_SECTION), _jsx(Typography, Object.assign({ variant: 'caption', component: "div", className: classes.footerSubItems }, { children: intl.formatMessage(messages.footer) }))] }))] })) }));
729
+ return (_jsx(Box, { children: !contributionObj.deleted && !contributionObj.collapsed && (_jsxs(Box, { children: [_jsxs(MenuItem, Object.assign({ className: classes.subItem, disabled: isFlagging, onClick: () => handleOpenSection(FLAG_CONTRIBUTION_SECTION) }, { children: [_jsx(ListItemIcon, { children: flagType !== undefined && flagType !== null ? (_jsx(Badge, Object.assign({ classes: { badge: classes.sectionBadge }, badgeContent: _jsx(Icon, Object.assign({ className: classes.sectionWithSelectionIcon }, { children: "check" })), color: "primary" }, { children: _jsx(Icon, { children: "outlined_flag" }) }))) : (_jsx(Icon, { children: "outlined_flag" })) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: "ui.contributionActionMenu.flagContributionWithMotivation", defaultMessage: "ui.contributionActionMenu.flagContributionWithMotivation" }) }), open ? _jsx(Icon, { children: "expand_less" }) : _jsx(Icon, { children: "expand_more" })] })), _jsxs(Collapse, Object.assign({ in: open, timeout: "auto", unmountOnExit: true }, { children: [renderReports(FLAG_CONTRIBUTION_SECTION), _jsx(Typography, Object.assign({ variant: "caption", component: "div", className: classes.footerSubItems }, { children: intl.formatMessage(messages.footer) }))] }))] })) }));
730
730
  }
731
731
  /**
732
732
  * Renders section hide actions
@@ -806,15 +806,9 @@ export default function ContributionActionsMenu(props) {
806
806
  /**
807
807
  * Renders component
808
808
  */
809
- return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(IconButton
810
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
811
- // @ts-ignore
812
- , Object.assign({
813
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
814
- // @ts-ignore
815
- ref: (ref) => {
809
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(IconButton, Object.assign({ ref: (ref) => {
816
810
  popperRef.current = ref;
817
- }, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: contributionObj && (contributionObj.collapsed || contributionObj.deleted) ? (_jsxs("span", Object.assign({ className: classes.visibilityIcons }, { children: [contributionObj.collapsed ? _jsx(Icon, { children: "visibility_off" }) : _jsx(Icon, { children: "delete" }), _jsx(Icon, { children: "expand_more" })] }))) : (_jsx(Icon, { children: "more_vert" })) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : (_jsx(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && (_jsx(ConfirmDialog, Object.assign({ open: openConfirmDialog }, (currentAction === DELETE_CONTRIBUTION
811
+ }, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: contributionObj && (contributionObj.collapsed || contributionObj.deleted) ? (_jsxs("span", Object.assign({ className: classes.visibilityIcons }, { children: [contributionObj.collapsed ? _jsx(Icon, { children: "visibility_off" }) : _jsx(Icon, { children: "delete" }), _jsx(Icon, { children: "expand_more" })] }))) : (_jsx(Icon, { children: "more_vert" })) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : (_jsx(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && (_jsx(ConfirmDialog, Object.assign({ open: openConfirmDialog }, (currentAction === DELETE_CONTRIBUTION
818
812
  ? {
819
813
  content: (_jsx(FormattedMessage, { id: "ui.contributionActionMenu.deleteContributionInfo", defaultMessage: "ui.contributionActionMenu.deleteContributionInfo" }))
820
814
  }
@@ -35,7 +35,7 @@ export default function DateTimeAgo(props) {
35
35
  */
36
36
  if (date) {
37
37
  const formattedDate = getRelativeTime(date);
38
- return (_jsxs(Root, Object.assign({ as: "span", className: classNames(classes.root, className) }, rest, { children: [showStartIcon && _jsx(Icon, { children: "access_time" }), _jsx(Tooltip, Object.assign({ title: `${intl.formatDate(date, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' })}`, enterTouchDelay: 0 }, { children: _jsx(Typography, Object.assign({ variant: 'body2', component: 'span' }, { children: _jsx(FormattedRelativeTime, { value: -formattedDate.value, unit: formattedDate.unit, numeric: "auto" }) })) }))] })));
38
+ return (_jsxs(Root, Object.assign({ as: "span", className: classNames(classes.root, className) }, rest, { children: [showStartIcon && _jsx(Icon, { children: "access_time" }), _jsx(Tooltip, Object.assign({ title: `${intl.formatDate(date, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' })}`, enterTouchDelay: 0 }, { children: _jsx(Typography, Object.assign({ variant: "body2", component: "span" }, { children: _jsx(FormattedRelativeTime, { value: -formattedDate.value, unit: formattedDate.unit, numeric: "auto" }) })) }))] })));
39
39
  }
40
40
  return null;
41
41
  }
@@ -1,6 +1,5 @@
1
1
  import { PickerProps } from 'emoji-picker-react';
2
- interface EmojiPickerProps extends PickerProps {
2
+ export interface EmojiPickerProps extends PickerProps {
3
3
  className?: string;
4
4
  }
5
5
  export default function EmojiPicker(inProps: EmojiPickerProps): JSX.Element;
6
- export {};
@@ -19,5 +19,5 @@ export default function ScrolleableTop() {
19
19
  return (_jsxs("div", { children: [_jsx("h1", { children: "demo: Infinite Scroll on top" }), _jsx("hr", {}), _jsx("div", Object.assign({ id: "scrollableDiv", style: {
20
20
  height: 300,
21
21
  overflow: 'auto'
22
- } }, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: items.length, previous: fetchMoreData, hasMorePrevious: true, loaderPrevious: _jsx("h4", { children: "Loading prev..." }), scrollableTarget: "scrollableDiv", scrollThreshold: '0px' }, { children: items.map((_, index) => (_jsxs("div", Object.assign({ style: style }, { children: ["div - #", index] }), index))) })) }))] }));
22
+ } }, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: items.length, previous: fetchMoreData, hasMorePrevious: true, loaderPrevious: _jsx("h4", { children: "Loading prev..." }), scrollableTarget: "scrollableDiv", scrollThreshold: "0px" }, { children: items.map((_, index) => (_jsxs("div", Object.assign({ style: style }, { children: ["div - #", index] }), index))) })) }))] }));
23
23
  }
@@ -179,13 +179,7 @@ export default function LessonCommentActionsMenu(props) {
179
179
  /**
180
180
  * Renders component
181
181
  */
182
- return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(IconButton
183
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
184
- // @ts-ignore
185
- , Object.assign({
186
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
187
- // @ts-ignore
188
- ref: (ref) => {
182
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(IconButton, Object.assign({ ref: (ref) => {
189
183
  popperRef.current = ref;
190
- }, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: _jsx(Icon, { children: "more_vert" }) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : (_jsx(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && (_jsx(ConfirmDialog, { open: openConfirmDialog, onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) }))] })));
184
+ }, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: _jsx(Icon, { children: "more_vert" }) })), open && (_jsx(_Fragment, { children: isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : (_jsx(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && (_jsx(ConfirmDialog, { open: openConfirmDialog, onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) }))] })));
191
185
  }
@@ -23,7 +23,7 @@ const BaseLightbox = (props) => {
23
23
  /**
24
24
  * Renders root object
25
25
  */
26
- return (_jsx(Root, Object.assign({}, rest, { className: classes.root, images: images, visible: visible && index !== -1, index: currentImageIndex, onIndexChange: handleIndexChange, onClose: onClose, afterClose: afterClose, loadingElement: _jsx(CircularProgress, { color: 'primary' }), toolbarRender: toolbarRender
26
+ return (_jsx(Root, Object.assign({}, rest, { className: classes.root, images: images, visible: visible && index !== -1, index: currentImageIndex, onIndexChange: handleIndexChange, onClose: onClose, afterClose: afterClose, loadingElement: _jsx(CircularProgress, { color: "primary" }), toolbarRender: toolbarRender
27
27
  ? toolbarRender
28
28
  : () => {
29
29
  return toolbarButtons;
@@ -176,7 +176,7 @@ export default (props) => {
176
176
  return Promise.resolve({ options });
177
177
  }
178
178
  else if (isImageType(items[0].file.type)) {
179
- return new Promise((resolve, reject) => {
179
+ return new Promise((resolve) => {
180
180
  Promise.all(items.map((item) => __awaiter(void 0, void 0, void 0, function* () {
181
181
  return Object.assign(Object.assign({}, item), { file: item.file.type === 'image/gif' ? item.file : yield createThumbnail(item.file) });
182
182
  })))
@@ -109,7 +109,7 @@ export default function Tags(props) {
109
109
  }
110
110
  ] }, { children: (_a) => {
111
111
  var { TransitionProps, placement } = _a, rest = __rest(_a, ["TransitionProps", "placement"]);
112
- return (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(_Fragment, { children: [renderTitle(), _jsx(StackList, Object.assign({ spacing: 2 }, rest, { children: tags
112
+ return (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: "outlined", className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(_Fragment, { children: [renderTitle(), _jsx(StackList, Object.assign({ spacing: 2 }, rest, { children: tags
113
113
  .filter((tag) => tag.visible)
114
114
  .map((tag) => (_jsx(ItemList, { children: _jsx(TagChip, Object.assign({ tag: tag, onClick: onClickTag }, TagChipProps, { showDescription: true })) }, tag.id))) }))] }) })) })) })));
115
115
  } }))] }))) : (_jsxs(ListRoot, { children: [renderTitle(), _jsx(StackList, Object.assign({ spacing: 1, direction: rest.direction ? rest.direction : 'column' }, { children: tags
@@ -1,5 +1,5 @@
1
1
  import type { StoryObj } from '@storybook/react';
2
- import SCUpScalingTierBadge from './index';
3
- declare const _default: import("storybook/internal/csf").ComponentAnnotations<import("@storybook/react/dist/types-7abe74eb").R, import("./index").UpScalingTierProps>;
2
+ import SCUpScalingTierBadge, { UpScalingTierProps } from './index';
3
+ declare const _default: import("storybook/internal/csf").ComponentAnnotations<import("@storybook/react/dist/types-7abe74eb").R, UpScalingTierProps>;
4
4
  export default _default;
5
5
  export declare const Base: StoryObj<typeof SCUpScalingTierBadge>;