@selfcommunity/react-ui 0.11.0-mui7.21 → 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 (198) 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/CourseDashboard/Teacher.js +1 -1
  14. package/lib/cjs/components/CourseForm/Edit.js +6 -2
  15. package/lib/cjs/components/Courses/Courses.js +1 -1
  16. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  17. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  18. package/lib/cjs/components/EditCourse/EditCourse.js +1 -1
  19. package/lib/cjs/components/EditCourse/Status.js +1 -1
  20. package/lib/cjs/components/EventForm/EventForm.js +2 -2
  21. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  22. package/lib/cjs/components/EventMembersWidget/EventMembersWidget.js +3 -3
  23. package/lib/cjs/components/EventMembersWidget/Skeleton.js +1 -1
  24. package/lib/cjs/components/Events/LocationEventsFilter.js +1 -1
  25. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  26. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
  27. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  28. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  29. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  30. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  31. package/lib/cjs/components/GroupForm/GroupForm.js +7 -7
  32. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  33. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
  34. package/lib/cjs/components/Incubator/Incubator.js +2 -2
  35. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  36. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
  37. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  38. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  39. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  40. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +1 -1
  41. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  42. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  43. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
  44. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  45. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  46. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  47. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  48. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  49. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  50. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  51. package/lib/cjs/components/Notification/Course/Course.js +4 -4
  52. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
  53. package/lib/cjs/components/Notification/Event/Event.js +4 -4
  54. package/lib/cjs/components/Notification/Group/Group.js +2 -2
  55. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  56. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  57. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  58. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +3 -3
  59. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  60. package/lib/cjs/components/Notification/Notification.js +5 -5
  61. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
  62. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  63. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
  64. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
  65. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  66. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  67. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +10 -7
  68. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  69. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
  70. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  71. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  72. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +1 -1
  73. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +1 -1
  74. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +1 -1
  75. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  76. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  77. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  78. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  79. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  80. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +3 -3
  81. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +1 -1
  82. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +1 -1
  83. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
  84. package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
  85. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  86. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +6 -7
  87. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
  88. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +2 -2
  89. package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
  90. package/lib/cjs/shared/DateTimeAgo/index.js +1 -1
  91. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  92. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  93. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
  94. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  95. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  96. package/lib/cjs/shared/Tags/index.js +1 -1
  97. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
  98. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +2 -2
  99. package/lib/esm/components/AccountDelete/AccountDelete.js +3 -3
  100. package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
  101. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  102. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  103. package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
  104. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  105. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +5 -5
  106. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
  107. package/lib/esm/components/ConsentSolution/ConsentSolution.js +9 -3
  108. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  109. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  110. package/lib/esm/components/CourseDashboard/Teacher.js +1 -1
  111. package/lib/esm/components/CourseForm/Edit.js +6 -2
  112. package/lib/esm/components/Courses/Courses.js +1 -1
  113. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  114. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  115. package/lib/esm/components/EditCourse/EditCourse.js +1 -1
  116. package/lib/esm/components/EditCourse/Status.js +1 -1
  117. package/lib/esm/components/EventForm/EventForm.js +2 -2
  118. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  119. package/lib/esm/components/EventMembersWidget/EventMembersWidget.js +3 -3
  120. package/lib/esm/components/EventMembersWidget/Skeleton.js +1 -1
  121. package/lib/esm/components/Events/LocationEventsFilter.js +1 -1
  122. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  123. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +1 -1
  124. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  125. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  126. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  127. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  128. package/lib/esm/components/GroupForm/GroupForm.js +7 -7
  129. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  130. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +1 -1
  131. package/lib/esm/components/Incubator/Incubator.js +2 -2
  132. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  133. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +2 -2
  134. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  135. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  136. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  137. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +1 -1
  138. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  139. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  140. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -1
  141. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  142. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  143. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  144. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  145. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  146. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  147. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  148. package/lib/esm/components/Notification/Course/Course.js +4 -4
  149. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
  150. package/lib/esm/components/Notification/Event/Event.js +4 -4
  151. package/lib/esm/components/Notification/Group/Group.js +2 -2
  152. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  153. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  154. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  155. package/lib/esm/components/Notification/LiveStream/LiveStream.js +3 -3
  156. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  157. package/lib/esm/components/Notification/Notification.js +5 -5
  158. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +3 -3
  159. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  160. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
  161. package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
  162. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  163. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  164. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +11 -8
  165. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  166. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
  167. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  168. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  169. package/lib/esm/components/PaymentOrders/PaymentOrders.js +1 -1
  170. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +1 -1
  171. package/lib/esm/components/PlatformWidget/PlatformWidget.js +1 -1
  172. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  173. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  174. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +1 -1
  175. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  176. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  177. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -4
  178. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +1 -1
  179. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +1 -1
  180. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -1
  181. package/lib/esm/components/UserCounters/UserCounters.js +5 -13
  182. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  183. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
  184. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +1 -1
  185. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +2 -2
  186. package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
  187. package/lib/esm/shared/DateTimeAgo/index.js +1 -1
  188. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  189. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  190. package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
  191. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  192. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  193. package/lib/esm/shared/Tags/index.js +1 -1
  194. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +2 -2
  195. package/lib/umd/484.js +1 -1
  196. package/lib/umd/484.js.LICENSE.txt +1 -1
  197. package/lib/umd/react-ui.js +1 -1
  198. package/package.json +10 -10
@@ -35,36 +35,20 @@ export default function App(inProps) {
35
35
  // STATE
36
36
  const [tab, setTab] = useState(0);
37
37
  // HANDLERS
38
- const handleChange = (event, newValue) => {
38
+ const handleChange = (_event, newValue) => {
39
39
  setTab(newValue);
40
40
  };
41
41
  return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(Typography, Object.assign({ variant: "h4", className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.title", defaultMessage: "ui.onBoardingWidget.step.app.title" }) })), _jsx(Typography, Object.assign({ className: classes.summary }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.summary", defaultMessage: "ui.onBoardingWidget.step.app.summary" }) })), _jsxs(Tabs, Object.assign({ className: classes.tabs, value: tab, onChange: handleChange, centered: true, variant: "fullWidth", indicatorColor: "primary" }, { children: [_jsx(Tab, { label: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.tab.android", defaultMessage: "ui.onBoardingWidget.step.app.tab.android" }) }), _jsx(Tab, { label: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.tab.ios", defaultMessage: "ui.onBoardingWidget.step.app.tab.ios" }) })] })), _jsxs(Box, Object.assign({ className: classes.tabContent }, { children: [tab === 0 && (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ className: classes.summary }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.android", defaultMessage: "ui.onBoardingWidget.step.app.android" }) })), _jsx(Typography, Object.assign({ className: classes.step }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.android.a", defaultMessage: "ui.onBoardingWidget.step.app.android.a", values: {
42
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
43
- // @ts-ignore
44
- icon: (...chunks) => _jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
45
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
46
- // @ts-ignore
47
- b: (...chunks) => _jsx("strong", { children: chunks })
42
+ icon: (chunks) => (_jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks }), "ui.onBoardingWidget.step.app.android.a.icon")),
43
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.onBoardingWidget.step.app.android.a.b")
48
44
  } }) })), _jsx(Typography, Object.assign({ className: classes.step }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.android.b", defaultMessage: "ui.onBoardingWidget.step.app.android.b", values: {
49
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
50
- // @ts-ignore
51
- icon: (...chunks) => _jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
52
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
53
- // @ts-ignore
54
- b: (...chunks) => _jsx("strong", { children: chunks })
45
+ icon: (chunks) => (_jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks }), "ui.onBoardingWidget.step.app.android.b.icon")),
46
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.onBoardingWidget.step.app.android.b.b")
55
47
  } }) })), _jsx(CardMedia, { className: classes.imageAndroid, component: "img", src: AndroidPlaceholder })] })), tab === 1 && (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ className: classes.summary }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios", defaultMessage: "ui.onBoardingWidget.step.app.ios" }) })), _jsx(Typography, Object.assign({ className: classes.step }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios.a", defaultMessage: "ui.onBoardingWidget.step.app.ios.a", values: {
56
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
57
- // @ts-ignore
58
- icon: (...chunks) => _jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
59
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
60
- // @ts-ignore
61
- b: (...chunks) => _jsx("strong", { children: chunks })
48
+ icon: (chunks) => (_jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks }), "ui.onBoardingWidget.step.app.ios.a.icon")),
49
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.onBoardingWidget.step.app.ios.a.b")
62
50
  } }) })), _jsx(Typography, Object.assign({ className: classes.step }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.app.ios.b", defaultMessage: "ui.onBoardingWidget.step.app.ios.b", values: {
63
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
64
- // @ts-ignore
65
- icon: (...chunks) => _jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks })),
66
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
67
- // @ts-ignore
68
- b: (...chunks) => _jsx("strong", { children: chunks })
51
+ icon: (chunks) => (_jsx(Icon, Object.assign({ fontSize: "medium" }, { children: chunks }), "ui.onBoardingWidget.step.app.ios.b.icon")),
52
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.onBoardingWidget.step.app.ios.b.b")
69
53
  } }) })), _jsx(CardMedia, { className: classes.image, component: "img", src: IosPlaceholder })] })), _jsx(Button, Object.assign({ className: classes.button, size: "small", variant: "outlined", color: "secondary", onClick: onCompleteAction, disabled: (step === null || step === void 0 ? void 0 : step.status) === SCOnBoardingStepStatusType.COMPLETED || (step === null || step === void 0 ? void 0 : step.status) === SCOnBoardingStepStatusType.IN_PROGRESS }, { children: "Ok!" }))] }))] })));
70
54
  }
@@ -87,14 +87,8 @@ export default function Category(inProps) {
87
87
  return message;
88
88
  }, [progress]);
89
89
  return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(Typography, Object.assign({ variant: "h4", className: classes.title }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.categories", defaultMessage: "ui.onBoardingWidget.categories" }) })), _jsx(Typography, Object.assign({ className: classes.summary }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.category.summary", defaultMessage: "ui.onBoardingWidget.step.category.summary" }) })), (step === null || step === void 0 ? void 0 : step.status) !== SCOnBoardingStepStatusType.IN_PROGRESS && (_jsxs(_Fragment, { children: [_jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.category.generation.steps", defaultMessage: "ui.onBoardingWidget.step.category.generation.steps", values: {
90
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
91
- // @ts-ignore
92
- iconA: (...chunks) => _jsx(CircledLetter, { letter: "a", statement: chunks }),
93
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
94
- // @ts-ignore
95
- iconB: (...chunks) => _jsx(CircledLetter, { letter: "b", statement: chunks }),
96
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
97
- // @ts-ignore
98
- iconC: (...chunks) => _jsx(CircledLetter, { letter: "c", statement: chunks })
90
+ iconA: (chunks) => _jsx(CircledLetter, { letter: "a", statement: chunks }, "ui.onBoardingWidget.step.category.generation.steps.iconA"),
91
+ iconB: (chunks) => _jsx(CircledLetter, { letter: "b", statement: chunks }, "ui.onBoardingWidget.step.category.generation.steps.iconB"),
92
+ iconC: (chunks) => _jsx(CircledLetter, { letter: "c", statement: chunks }, "ui.onBoardingWidget.step.category.generation.steps.iconC")
99
93
  } }) }), _jsx(CardMedia, { className: classes.image, component: "img", src: CategoryAPlaceholder }), _jsx(CardMedia, { className: classes.image, component: "img", src: CategoryBPlaceholder })] })), _jsx(Box, Object.assign({ component: "span", className: classes.action }, { children: (step === null || step === void 0 ? void 0 : step.status) === SCOnBoardingStepStatusType.COMPLETED ? (_jsx(Alert, Object.assign({ severity: "success" }, { children: _jsx(FormattedMessage, { id: "ui.onBoardingWidget.step.categories.success", defaultMessage: "ui.onBoardingWidget.step.categories.success" }) }))) : (step === null || step === void 0 ? void 0 : step.status) === SCOnBoardingStepStatusType.IN_PROGRESS ? (_jsxs(Box, Object.assign({ className: classes.progress }, { children: [_jsx(Player, { autoplay: true, loop: true, src: animatedProgress, className: classes.animationProgress, controls: false }), _jsx(ProgressBar, { value: progress, hideBar: true, loadingMessage: _jsx(Typography, Object.assign({ variant: "h4" }, { children: getLoadingMessage })) })] }))) : (_jsx(Button, Object.assign({ size: "small", variant: "contained", color: "secondary", onClick: handleCategoriesCreation, endIcon: _jsx(Icon, { children: hover ? 'ai_stars' : 'magic_wand' }), onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.onBoardingWidget.step.category.button", id: "ui.onBoardingWidget.step.category.button" }) }))) }))] })));
100
94
  }
@@ -73,5 +73,5 @@ export default function PaymentOrder(inProps) {
73
73
  hour: 'numeric',
74
74
  minute: 'numeric'
75
75
  })
76
- } }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.price", defaultMessage: "ui.paymentOrder.price", values: { price: getConvertedAmount(scPaymentOrder.payment_price) } }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary", component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.status", defaultMessage: "ui.paymentOrder.status" }) })), _jsx(Chip, { className: classes.status, variant: 'outlined', label: _jsx(FormattedMessage, { id: "ui.paymentOrder.status.paid", defaultMessage: "ui.paymentOrder.status.paid" }), color: "success", size: "small" }), _jsx("br", {}), scPaymentOrder && !hidePaymentOrderPdfButton && (_jsx(PaymentOrderPdfButton, Object.assign({ paymentOrder: scPaymentOrder, label: _jsx(FormattedMessage, { id: "ui.paymentOrder.ticket.view", defaultMessage: "ui.paymentOrder.ticket.view" }) }, PaymentOrderPdfButtonComponentProps)))] }))] })));
76
+ } }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.price", defaultMessage: "ui.paymentOrder.price", values: { price: getConvertedAmount(scPaymentOrder.payment_price) } }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary", component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.status", defaultMessage: "ui.paymentOrder.status" }) })), _jsx(Chip, { className: classes.status, variant: "outlined", label: _jsx(FormattedMessage, { id: "ui.paymentOrder.status.paid", defaultMessage: "ui.paymentOrder.status.paid" }), color: "success", size: "small" }), _jsx("br", {}), scPaymentOrder && !hidePaymentOrderPdfButton && (_jsx(PaymentOrderPdfButton, Object.assign({ paymentOrder: scPaymentOrder, label: _jsx(FormattedMessage, { id: "ui.paymentOrder.ticket.view", defaultMessage: "ui.paymentOrder.ticket.view" }) }, PaymentOrderPdfButtonComponentProps)))] }))] })));
77
77
  }
@@ -268,5 +268,5 @@ export default function PaymentOrders(inProps) {
268
268
  hour: 'numeric',
269
269
  minute: 'numeric'
270
270
  })
271
- : '-' })), _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, {})) }))] })));
271
+ : '-' })), _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, {})) }))] })));
272
272
  }
@@ -36,7 +36,7 @@ export default function PaywallsDialog(inProps) {
36
36
  return null;
37
37
  }
38
38
  return (_jsx(Root, Object.assign({ maxWidth: "sm", fullWidth: true, title: (PaywallsComponentProps && ((_a = PaywallsComponentProps.prefetchedPaymentContentStatus) === null || _a === void 0 ? void 0 : _a.payment_order)) ||
39
- (PaywallsComponentProps.content && PaywallsComponentProps.content.payment_order) ? (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title.purchased", defaultMessage: "ui.paywallsDialog.title.purchased" })) : (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title", defaultMessage: "ui.paywallsDialog.title" })), scroll: 'paper', open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), slots: {
39
+ (PaywallsComponentProps.content && PaywallsComponentProps.content.payment_order) ? (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title.purchased", defaultMessage: "ui.paywallsDialog.title.purchased" })) : (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title", defaultMessage: "ui.paywallsDialog.title" })), scroll: "paper", open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), slots: {
40
40
  transition: Transition
41
41
  }, DialogContentProps: { dividers: false } }, rest, { children: _jsx(Paywalls, Object.assign({}, PaywallsComponentProps)) })));
42
42
  }
@@ -291,7 +291,7 @@ export default function PlatformWidget(inProps) {
291
291
  /**
292
292
  * Render tutorial
293
293
  */
294
- const tutorial = (_jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.tutorial }, { children: [!isTutorialOpen && (_jsx(Grid, Object.assign({ size: "auto", alignItems: "center", justifyContent: "center" }, { children: _jsx(IconButton, Object.assign({ size: "medium", onClick: handleOpenTutorial }, { children: _jsx(Icon, { children: "info" }) })) }))), _jsx(Collapse, Object.assign({ in: isTutorialOpen, className: classes.tutorialContent }, { children: isTutorialOpen && (_jsxs(Grid, Object.assign({ size: "auto" }, { children: [_jsxs(Typography, Object.assign({ variant: 'body2', className: classes.tutorialTitle, component: 'div' }, { children: [_jsx(Grow, Object.assign({ in: true, timeout: 1000 }, { children: _jsx("span", { children: actions[tutorialIndex].title }) })), _jsx(IconButton, Object.assign({ size: 'small', className: classes.tutorialTitleClose, onClick: handleCloseTutorial }, { children: _jsx(Icon, { children: "close" }) }))] })), _jsx(Grow, Object.assign({ in: true, timeout: 1200 }, { children: _jsx(Typography, Object.assign({ variant: 'body2', className: classes.tutorialDesc }, { children: actions[tutorialIndex].content })) })), _jsx(Divider, { className: classes.divider }), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2, className: classes.tutorialControls }, { children: [_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: handlePrevious, className: classNames(classes.btnStep, classes.btnPreviousStep) }, { children: tutorialIndex === 0 ? (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.skip", defaultMessage: "ui.platformWidget.tutorial.skip" })) : (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.previous", defaultMessage: "ui.platformWidget.tutorial.previous" })) })), _jsxs(Typography, Object.assign({ component: 'div' }, { children: [tutorialIndex + 1, "/", actions.length] })), _jsx(Button, Object.assign({ variant: "contained", size: "small", color: "primary", onClick: handleNext, className: classNames(classes.btnStep, classes.btnNextStep) }, { children: tutorialIndex === actions.length - 1 ? (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.close", defaultMessage: "ui.platformWidget.tutorial.close" })) : (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.next", defaultMessage: "ui.platformWidget.tutorial.next" })) }))] }))] }))) }))] })));
294
+ const tutorial = (_jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: isAdmin ? 1 : 3, justifyContent: "center", className: classes.tutorial }, { children: [!isTutorialOpen && (_jsx(Grid, Object.assign({ size: "auto", alignItems: "center", justifyContent: "center" }, { children: _jsx(IconButton, Object.assign({ size: "medium", onClick: handleOpenTutorial }, { children: _jsx(Icon, { children: "info" }) })) }))), _jsx(Collapse, Object.assign({ in: isTutorialOpen, className: classes.tutorialContent }, { children: isTutorialOpen && (_jsxs(Grid, Object.assign({ size: "auto" }, { children: [_jsxs(Typography, Object.assign({ variant: "body2", className: classes.tutorialTitle, component: "div" }, { children: [_jsx(Grow, Object.assign({ in: true, timeout: 1000 }, { children: _jsx("span", { children: actions[tutorialIndex].title }) })), _jsx(IconButton, Object.assign({ size: "small", className: classes.tutorialTitleClose, onClick: handleCloseTutorial }, { children: _jsx(Icon, { children: "close" }) }))] })), _jsx(Grow, Object.assign({ in: true, timeout: 1200 }, { children: _jsx(Typography, Object.assign({ variant: "body2", className: classes.tutorialDesc }, { children: actions[tutorialIndex].content })) })), _jsx(Divider, { className: classes.divider }), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2, className: classes.tutorialControls }, { children: [_jsx(Button, Object.assign({ variant: "text", size: "small", onClick: handlePrevious, className: classNames(classes.btnStep, classes.btnPreviousStep) }, { children: tutorialIndex === 0 ? (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.skip", defaultMessage: "ui.platformWidget.tutorial.skip" })) : (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.previous", defaultMessage: "ui.platformWidget.tutorial.previous" })) })), _jsxs(Typography, Object.assign({ component: "div" }, { children: [tutorialIndex + 1, "/", actions.length] })), _jsx(Button, Object.assign({ variant: "contained", size: "small", color: "primary", onClick: handleNext, className: classNames(classes.btnStep, classes.btnNextStep) }, { children: tutorialIndex === actions.length - 1 ? (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.close", defaultMessage: "ui.platformWidget.tutorial.close" })) : (_jsx(FormattedMessage, { id: "ui.platformWidget.tutorial.next", defaultMessage: "ui.platformWidget.tutorial.next" })) }))] }))] }))) }))] })));
295
295
  /**
296
296
  * Renders platform card
297
297
  */
@@ -106,7 +106,7 @@ export default function MessageMediaUploader(props) {
106
106
  url: `${scContext.settings.portal}${Endpoints.PrivateMessageUploadMediaInChunks.url()}`,
107
107
  headers: { Authorization: `Bearer ${scContext.settings.session.authToken.accessToken}` },
108
108
  method: Endpoints.PrivateMessageUploadMediaInChunks.method
109
- }, chunkSize: 204800, multiple: true, chunked: true, maxConcurrent: 2, fileFilter: filterBySizeAndType }, { children: [_jsx(MessageChunkUploader, { onSuccess: handleSuccess, onProgress: handleProgress, onError: handleError }), !files.length && Object.keys(uploading).length === 0 && Object.keys(errors).length === 0 && (_jsxs(UploadDropZone, Object.assign({ className: classes.uploadSection }, { children: [_jsx(UploadButton, { inputFieldName: "file", className: classes.uploadButton }), _jsx(Typography, Object.assign({ textAlign: 'center', fontWeight: 'medium' }, { children: _jsx(FormattedMessage, { id: "ui.privateMessage.editor.media.uploader.msg", defaultMessage: "ui.privateMessage.editor.media.uploader.msg" }) }))] }))), _jsxs(List, Object.assign({ className: classes.previewContent }, { children: [previews.length !== 0 &&
109
+ }, chunkSize: 204800, multiple: true, chunked: true, maxConcurrent: 2, fileFilter: filterBySizeAndType }, { children: [_jsx(MessageChunkUploader, { onSuccess: handleSuccess, onProgress: handleProgress, onError: handleError }), !files.length && Object.keys(uploading).length === 0 && Object.keys(errors).length === 0 && (_jsxs(UploadDropZone, Object.assign({ className: classes.uploadSection }, { children: [_jsx(UploadButton, { inputFieldName: "file", className: classes.uploadButton }), _jsx(Typography, Object.assign({ textAlign: "center", fontWeight: "medium" }, { children: _jsx(FormattedMessage, { id: "ui.privateMessage.editor.media.uploader.msg", defaultMessage: "ui.privateMessage.editor.media.uploader.msg" }) }))] }))), _jsxs(List, Object.assign({ className: classes.previewContent }, { children: [previews.length !== 0 &&
110
110
  previews.map((item, index) => {
111
111
  var _a;
112
112
  return (_jsx(React.Fragment, { children: 'file' in item && (_jsxs(ListItem, Object.assign({ className: classes.previewItem }, getMouseEvents(() => handleMouseEnter(item.file_uuid), () => handleMouseLeave(item.file_uuid)), { children: ['video_url' in item ? (_jsx("video", { src: item.video_url })) : (_jsx("img", { src: item.file.type.startsWith(SCMessageFileType.PDF) && !item.file_url
@@ -114,6 +114,6 @@ export default function MessageMediaUploader(props) {
114
114
  : !item.file_url
115
115
  ? documentPlaceholder
116
116
  : item.file_url })), _jsx(ImageListItemBar, { className: classNames(classes.previewActions, { [classes.progress]: item.completed }), title: typeof item.completed !== 'undefined' &&
117
- item.completed !== 0 && _jsx(Typography, Object.assign({ textAlign: "center" }, { children: `${Math.round(item.completed)}%` })), actionIcon: _jsx(_Fragment, { children: isHovered[item.file_uuid] && Object.keys(uploading).length === 0 && (_jsx(IconButton, Object.assign({ onClick: () => handleClear(item.file_uuid), size: "small" }, { children: _jsx(Icon, { children: "delete" }) }))) }) }), isHovered[item.file_uuid] && (_jsxs(Box, Object.assign({ component: 'span', className: classes.previewInfo }, { children: [_jsx(Typography, Object.assign({ noWrap: true, textAlign: 'center' }, { children: item.file.name })), _jsx(Typography, Object.assign({ textAlign: 'center', fontWeight: 'light' }, { children: bytesToSize(item.file.size) }))] })))] }), (_a = item.id) !== null && _a !== void 0 ? _a : item.file_uuid)) }, index));
117
+ item.completed !== 0 && _jsx(Typography, Object.assign({ textAlign: "center" }, { children: `${Math.round(item.completed)}%` })), actionIcon: _jsx(_Fragment, { children: isHovered[item.file_uuid] && Object.keys(uploading).length === 0 && (_jsx(IconButton, Object.assign({ onClick: () => handleClear(item.file_uuid), size: "small" }, { children: _jsx(Icon, { children: "delete" }) }))) }) }), isHovered[item.file_uuid] && (_jsxs(Box, Object.assign({ component: "span", className: classes.previewInfo }, { children: [_jsx(Typography, Object.assign({ noWrap: true, textAlign: "center" }, { children: item.file.name })), _jsx(Typography, Object.assign({ textAlign: "center", fontWeight: "light" }, { children: bytesToSize(item.file.size) }))] })))] }), (_a = item.id) !== null && _a !== void 0 ? _a : item.file_uuid)) }, index));
118
118
  }), previews.length !== 0 && action] }))] })) })] })));
119
119
  }
@@ -36,5 +36,5 @@ const Root = styled(Card, {
36
36
  *
37
37
  */
38
38
  export default function PrivateMessageSnippetsSkeleton(props) {
39
- return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(CardContent, { children: [_jsxs(Stack, Object.assign({ direction: "column", justifyContent: "center", spacing: 1, alignItems: "center" }, { children: [_jsx(Button, Object.assign({ variant: "outlined", size: "medium", disabled: true, className: classes.button }, { children: _jsx(Skeleton, { height: 20, width: 100, variant: 'rectangular' }) })), _jsx(Skeleton, { height: 25, width: '100%', variant: 'rounded', className: classes.searchBar })] })), _jsx(List, Object.assign({ className: classes.list }, { children: [...Array(6)].map((category, index) => (_jsx(PrivateMessageSnippetItemSkeleton, { elevation: 0 }, index))) }))] }) })));
39
+ return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(CardContent, { children: [_jsxs(Stack, Object.assign({ direction: "column", justifyContent: "center", spacing: 1, alignItems: "center" }, { children: [_jsx(Button, Object.assign({ variant: "outlined", size: "medium", disabled: true, className: classes.button }, { children: _jsx(Skeleton, { height: 20, width: 100, variant: "rectangular" }) })), _jsx(Skeleton, { height: 25, width: "100%", variant: "rounded", className: classes.searchBar })] })), _jsx(List, Object.assign({ className: classes.list }, { children: [...Array(6)].map((category, index) => (_jsx(PrivateMessageSnippetItemSkeleton, { elevation: 0 }, index))) }))] }) })));
40
40
  }
@@ -458,7 +458,7 @@ export default function PrivateMessageThread(inProps) {
458
458
  if (loadingMessageObjs) {
459
459
  return _jsx(PrivateMessageThreadSkeleton, {});
460
460
  }
461
- return (_jsxs(CardContent, { children: [_jsx(InfiniteScroll, Object.assign({ height: '100%', dataLength: messageObjs.length, previous: handlePrevious, inverse: true, hasMorePrevious: Boolean(previous), loaderPrevious: _jsx(PrivateMessageThreadItemSkeleton, {}) }, { children: _jsx(List, Object.assign({ ref: messagesEndRef }, { children: Object.keys(formattedMessages).map((key) => (_jsx("li", Object.assign({ className: classes.section }, { children: _jsxs("ul", { children: [_jsx(ListSubheader, { children: _jsx(Typography, Object.assign({ align: "center", className: classes.subHeader }, { children: key })) }), formattedMessages[key].map((msg) => {
461
+ return (_jsxs(CardContent, { children: [_jsx(InfiniteScroll, Object.assign({ height: "100%", dataLength: messageObjs.length, previous: handlePrevious, inverse: true, hasMorePrevious: Boolean(previous), loaderPrevious: _jsx(PrivateMessageThreadItemSkeleton, {}) }, { children: _jsx(List, Object.assign({ ref: messagesEndRef }, { children: Object.keys(formattedMessages).map((key) => (_jsx("li", Object.assign({ className: classes.section }, { children: _jsxs("ul", { children: [_jsx(ListSubheader, { children: _jsx(Typography, Object.assign({ align: "center", className: classes.subHeader }, { children: key })) }), formattedMessages[key].map((msg) => {
462
462
  var _a;
463
463
  return (_jsxs(Box, Object.assign({ className: classes.item }, { children: [msg.group && ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) !== msg.sender.username && (_jsx(ListItemAvatar, { children: _jsx(Avatar, { alt: msg.sender.username, src: msg.sender.avatar, className: classes.avatar }) })), _jsx(PrivateMessageThreadItem, { className: authUserId === msg.sender.id ? classes.sender : classes.receiver, message: msg, mouseEvents: {
464
464
  onMouseEnter: () => handleMouseEnter(msg.id),
@@ -35,5 +35,5 @@ const Root = styled(Card, {
35
35
  export default function PrivateMessageThreadSkeleton(props) {
36
36
  const theme = useTheme();
37
37
  const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
38
- return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(CardContent, { children: [_jsxs(List, Object.assign({ className: classes.list }, { children: [_jsx(ListSubheader, Object.assign({ sx: { display: 'flex', justifyContent: 'center' } }, { children: _jsx(Skeleton, { animation: "wave", height: 30, width: 120, style: { borderRadius: 20 } }) })), [...Array(isMobile ? 6 : 8)].map((item, index) => (_jsx(PrivateMessageThreadItemSkeleton, { index: index }, index)))] })), _jsx(Box, Object.assign({ className: classes.editor }, { children: _jsx(Skeleton, { animation: "wave", height: 55, width: '100%', variant: 'rectangular' }) }))] }) })));
38
+ return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsxs(CardContent, { children: [_jsxs(List, Object.assign({ className: classes.list }, { children: [_jsx(ListSubheader, Object.assign({ sx: { display: 'flex', justifyContent: 'center' } }, { children: _jsx(Skeleton, { animation: "wave", height: 30, width: 120, style: { borderRadius: 20 } }) })), [...Array(isMobile ? 6 : 8)].map((item, index) => (_jsx(PrivateMessageThreadItemSkeleton, { index: index }, index)))] })), _jsx(Box, Object.assign({ className: classes.editor }, { children: _jsx(Skeleton, { animation: "wave", height: 55, width: "100%", variant: "rectangular" }) }))] }) })));
39
39
  }
@@ -154,10 +154,10 @@ export default function SnippetNotifications(inProps) {
154
154
  }, [scUserContext.user, initialized]);
155
155
  /**
156
156
  * Notification subscriber
157
- * @param msg
157
+ * @param _msg
158
158
  * @param data
159
159
  */
160
- const notificationSubscriber = (msg, data) => {
160
+ const notificationSubscriber = (_msg, data) => {
161
161
  /**
162
162
  * Ignore notifications of type: notification_banner
163
163
  * (data.data.activity_type === SCNotificationTypologyType.NOTIFICATION_BANNER)
@@ -288,9 +288,9 @@ export default function SnippetNotifications(inProps) {
288
288
  /**
289
289
  * Renders root object
290
290
  */
291
- return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: _jsx(Box, Object.assign({ className: classes.notificationsWrap }, { children: !initialized || loading ? (_jsx(Skeleton, { elevation: 0 })) : (_jsx(ScrollContainer, Object.assign({}, ScrollContainerProps, { children: _jsxs(MenuList, Object.assign({ className: classes.list, disabledItemsFocusable: true, disableListWrap: true }, { children: [scUserContext.user.unseen_notification_banners_counter ? (_jsx(MenuItem, Object.assign({ className: classNames(classes.item, classes.broadcastMessagesBanner), component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: _jsx(NotificationItem, { template: SCNotificationObjectTemplateType.SNIPPET, isNew: true, disableTypography: true, image: _jsx(Avatar, { alt: preferences[SCPreferences.TEXT_APPLICATION_NAME], src: preferences[SCPreferences.LOGO_NAVBAR_LOGO_MOBILE] }), primary: _jsx(Typography, Object.assign({ component: 'div' }, { children: intl.formatMessage({ id: 'ui.snippetNotifications.broadcastMessages', defaultMessage: 'ui.snippetNotifications.broadcastMessages' }, {
291
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, rest, { children: _jsx(Box, Object.assign({ className: classes.notificationsWrap }, { children: !initialized || loading ? (_jsx(Skeleton, { elevation: 0 })) : (_jsx(ScrollContainer, Object.assign({}, ScrollContainerProps, { children: _jsxs(MenuList, Object.assign({ className: classes.list, disabledItemsFocusable: true, disableListWrap: true }, { children: [scUserContext.user.unseen_notification_banners_counter ? (_jsx(MenuItem, Object.assign({ className: classNames(classes.item, classes.broadcastMessagesBanner), component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: _jsx(NotificationItem, { template: SCNotificationObjectTemplateType.SNIPPET, isNew: true, disableTypography: true, image: _jsx(Avatar, { alt: preferences[SCPreferences.TEXT_APPLICATION_NAME], src: preferences[SCPreferences.LOGO_NAVBAR_LOGO_MOBILE] }), primary: _jsx(Typography, Object.assign({ component: "div" }, { children: intl.formatMessage({ id: 'ui.snippetNotifications.broadcastMessages', defaultMessage: 'ui.snippetNotifications.broadcastMessages' }, {
292
292
  count: scUserContext.user.unseen_notification_banners_counter,
293
- b: (...chunks) => _jsx("strong", { children: chunks }),
294
- link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: chunks }))
293
+ b: (chunks) => _jsx("strong", { children: chunks }, "ui.snippetNotifications.broadcastMessages.b"),
294
+ link: (chunks) => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: chunks }), "ui.snippetNotifications.broadcastMessages.link"))
295
295
  }) })) }) }), "banner")) : null, notifications.length === 0 ? (_jsx(MenuItem, Object.assign({ className: classes.emptyBoxNotifications }, { children: _jsx(FormattedMessage, { id: "ui.snippetNotifications.noNotifications", defaultMessage: "ui.snippetNotifications.noNotifications" }) }))) : (notifications.slice(0, showMax).map((notificationObject, i) => notificationObject.aggregated.map((n, k) => (_jsx(MenuItem, Object.assign({ className: classes.item, onClick: (e) => handleSingleNotificationClick(e, n), disableRipple: true, disableTouchRipple: true }, { children: renderAggregatedItem(n, i) }), k)))))] })) }))) })) })));
296
296
  }
@@ -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 React, { useState } from 'react';
4
4
  import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
@@ -53,7 +53,7 @@ export default function UserAddPaymentMethodForm(inProps) {
53
53
  props: inProps,
54
54
  name: PREFIX
55
55
  });
56
- const { className = null, customer, collectBillingAddress = false, handleSuccess, handleClose } = props, rest = __rest(props, ["className", "customer", "collectBillingAddress", "handleSuccess", "handleClose"]);
56
+ const { className = null, customer, collectBillingAddress = false, handleSuccess, handleClose } = props;
57
57
  // CONTEXT
58
58
  const scUserContext = useSCUser();
59
59
  // STATE
@@ -129,10 +129,10 @@ export default function UserAddPaymentMethodForm(inProps) {
129
129
  if (!isPaymentsEnabled || !scUserContext.user) {
130
130
  return null;
131
131
  }
132
- return (_jsx(Root, Object.assign({ className: classes.root }, { children: _jsxs("form", Object.assign({ onSubmit: handleSubmit }, { children: [_jsx(PaymentElement, { id: "payment-element", options: paymentElementOptions, onReady: () => setReady(true) }), collectBillingAddress && (_jsx(Paper, Object.assign({ variant: "outlined", className: classes.address }, { children: Object.keys(addressState).length && !isEditingBillingAddress ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: addressState.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [addressState.address.line1, _jsx("br", {}), addressState.address.line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [addressState.address.postal_code, " - ", addressState.address.city, " - ", addressState.address.country] })), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: "Change" }))] })) : (_jsxs(_Fragment, { children: [_jsx(AddressElement, { onChange: (event) => {
132
+ return (_jsx(Root, Object.assign({ className: classes.root }, { children: _jsxs("form", Object.assign({ onSubmit: handleSubmit }, { children: [_jsx(PaymentElement, { id: "payment-element", options: paymentElementOptions, onReady: () => setReady(true) }), collectBillingAddress && (_jsx(Paper, Object.assign({ variant: "outlined", className: classes.address }, { children: Object.keys(addressState).length && !isEditingBillingAddress ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: addressState.name })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [addressState.address.line1, _jsx("br", {}), addressState.address.line2] })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [addressState.address.postal_code, " - ", addressState.address.city, " - ", addressState.address.country] })), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: "contained", disabled: !elements, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: "Change" }))] })) : (_jsxs(_Fragment, { children: [_jsx(AddressElement, { onChange: (event) => {
133
133
  setAddressState(event.value);
134
134
  }, options: {
135
135
  mode: 'billing',
136
136
  defaultValues: addressState
137
- } }), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements || loading || !ready, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: _jsx(FormattedMessage, { id: 'ui.userAddPaymentMethodForm.useDefaultMethod', defaultMessage: 'ui.userAddPaymentMethodForm.useDefaultMethod' }) }))] })) }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 2, mt: 3 }, { children: [_jsx(Button, Object.assign({ onClick: onHandleClose, variant: "outlined" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.cancelButton", defaultMessage: "ui.userAddPaymentMethodForm.cancelButton" }) })), _jsx(Button, Object.assign({ disabled: !ready, loading: loading, type: "submit", variant: "contained" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.addButton", defaultMessage: "ui.userAddPaymentMethodForm.addButton" }) }))] })), errorMessage && _jsx("div", { children: errorMessage })] })) })));
137
+ } }), _jsx(Button, Object.assign({ sx: { mt: 1 }, variant: "contained", disabled: !elements || loading || !ready, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.useDefaultMethod", defaultMessage: "ui.userAddPaymentMethodForm.useDefaultMethod" }) }))] })) }))), _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 2, mt: 3 }, { children: [_jsx(Button, Object.assign({ onClick: onHandleClose, variant: "outlined" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.cancelButton", defaultMessage: "ui.userAddPaymentMethodForm.cancelButton" }) })), _jsx(Button, Object.assign({ disabled: !ready, loading: loading, type: "submit", variant: "contained" }, { children: _jsx(FormattedMessage, { id: "ui.userAddPaymentMethodForm.addButton", defaultMessage: "ui.userAddPaymentMethodForm.addButton" }) }))] })), errorMessage && _jsx("div", { children: errorMessage })] })) })));
138
138
  }
@@ -109,7 +109,7 @@ const UserAutocomplete = (inProps) => {
109
109
  }, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, TextFieldProps, { margin: "dense", slotProps: {
110
110
  input: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'off', endAdornment: filteredUsers.length > 0 ? (_jsxs(_Fragment, { children: [isLoading && _jsx(CircularProgress, { color: "inherit", size: 20 }), params.InputProps.endAdornment] })) : null })
111
111
  } }))) }, rest)), _jsx(Typography, Object.assign({ variant: "body2", color: "primary", className: classes.info }, { children: _jsx(FormattedMessage, { id: "ui.userAutocomplete.textarea.info", defaultMessage: "ui.userAutocomplete.textarea.info", values: {
112
- icon: (...chunks) => _jsx(Icon, { children: chunks })
112
+ icon: (chunks) => _jsx(Icon, { children: chunks }, "ui.userAutocomplete.textarea.info.icon")
113
113
  } }) })), _jsx(TextField, { label: _jsx(FormattedMessage, { id: "ui.userAutocomplete.textarea.label", defaultMessage: "ui.userAutocomplete.textarea.label" }), multiline: true, minRows: 4, fullWidth: true, margin: "normal", value: textAreaValue, onChange: handleTextAreaChange })] })));
114
114
  };
115
115
  export default UserAutocomplete;
@@ -443,7 +443,7 @@ const UserBillingInfo = (inProps, ref) => {
443
443
  if (!isPaymentsEnabled || !scUserContext.user) {
444
444
  return null;
445
445
  }
446
- return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), id: id }, rest, { ref: componentRef }, { children: _jsx(Fragment, { children: state.isLoading ? (_jsx(UserBillingInfoSkeleton, { mode: mode })) : (_jsx(Fragment, { children: state.mode === UserBillingInfoMode.READ ? (_jsxs(_Fragment, { children: [state.name ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.name })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_line1, _jsx("br", {}), state.address_line2] })), _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: [state.address_postal_code, " - ", state.address_city, " - ", state.address_country && state.address_country.label] })), Boolean(state.tax_code && !state.isBusiness) && _jsx(Typography, Object.assign({ variant: 'body1' }, { children: state.tax_code })), state.isBusiness && (_jsxs(_Fragment, { children: [state.tax_id_data && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["SDI: ", state.sdi] })), state.pec && _jsxs(Typography, Object.assign({ variant: 'body1' }, { children: ["PEC: ", state.pec] }))] }))] })) : (_jsx(Typography, Object.assign({ variant: 'body1' }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && (_jsx(Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', size: 'small', disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: _jsx(FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : (_jsx(Box, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "name", name: "name", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address1", defaultMessage: "ui.userBillingInfo.address1" }), onChange: handleChange('address_line1'), value: state.address_line1, error: Boolean(state.addressLine1Error), helperText: state.addressLine1Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address2", defaultMessage: "ui.userBillingInfo.address2" }), onChange: handleChange('address_line2'), value: state.address_line2, error: Boolean(state.addressLine2Error), helperText: state.addressLine2Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(Autocomplete, { id: "country-select-demo", options: countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
446
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className), id: id }, rest, { ref: componentRef }, { children: _jsx(Fragment, { children: state.isLoading ? (_jsx(UserBillingInfoSkeleton, { mode: mode })) : (_jsx(Fragment, { children: state.mode === UserBillingInfoMode.READ ? (_jsxs(_Fragment, { children: [state.name ? (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: state.name })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [state.address_line1, _jsx("br", {}), state.address_line2] })), _jsxs(Typography, Object.assign({ variant: "body1" }, { children: [state.address_postal_code, " - ", state.address_city, " - ", state.address_country && state.address_country.label] })), Boolean(state.tax_code && !state.isBusiness) && _jsx(Typography, Object.assign({ variant: "body1" }, { children: state.tax_code })), state.isBusiness && (_jsxs(_Fragment, { children: [state.tax_id_data && _jsxs(Typography, Object.assign({ variant: "body1" }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && _jsxs(Typography, Object.assign({ variant: "body1" }, { children: ["SDI: ", state.sdi] })), state.pec && _jsxs(Typography, Object.assign({ variant: "body1" }, { children: ["PEC: ", state.pec] }))] }))] })) : (_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && (_jsx(Button, Object.assign({ sx: { mt: 1 }, variant: "contained", size: "small", disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: _jsx(FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : (_jsx(Box, { children: _jsxs(Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [_jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "name", name: "name", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address1", defaultMessage: "ui.userBillingInfo.address1" }), onChange: handleChange('address_line1'), value: state.address_line1, error: Boolean(state.addressLine1Error), helperText: state.addressLine1Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.address2", defaultMessage: "ui.userBillingInfo.address2" }), onChange: handleChange('address_line2'), value: state.address_line2, error: Boolean(state.addressLine2Error), helperText: state.addressLine2Error, fullWidth: true }) })), _jsx(Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: _jsx(Autocomplete, { id: "country-select-demo", options: countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
447
447
  const { key } = props, rest = __rest(props, ["key"]);
448
448
  return (_jsxs(Box, Object.assign({ component: "li", sx: { '& > img': { mr: 2, flexShrink: 0 } } }, rest, { children: [_jsx("img", { loading: "lazy", width: "20", srcSet: `https://flagcdn.com/w40/${option.code.toLowerCase()}.png 2x`, src: `https://flagcdn.com/w20/${option.code.toLowerCase()}.png`, alt: "" }), option.label, " (", option.code, ")"] }), key));
449
449
  }, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { label: _jsx(FormattedMessage, { id: "ui.userBillingInfo.country", defaultMessage: "ui.userBillingInfo.country" }), fullWidth: true, id: "address_country", name: "address_country", error: Boolean(state.addressCountryError), slotProps: {
@@ -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
  }
@@ -186,7 +186,7 @@ export default function PublicInfo(props) {
186
186
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
187
187
  // @ts-ignore
188
188
  const _a = params.children.props, { children } = _a, rest = __rest(_a, ["children"]);
189
- return (_jsxs(InputAdornment, Object.assign({ position: 'end' }, { children: [_jsx(IconButton, Object.assign({}, rest, { children: children })), isSaving && _jsx(CircularProgress, { size: 10 })] })));
189
+ return (_jsxs(InputAdornment, Object.assign({ position: "end" }, { children: [_jsx(IconButton, Object.assign({}, rest, { children: children })), isSaving && _jsx(CircularProgress, { size: 10 })] })));
190
190
  }
191
191
  },
192
192
  // onAccept={isMobile ? handleSave(SCUserProfileFields.DATE_OF_BIRTH) : null}
@@ -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
  }