@selfcommunity/react-ui 0.11.0-react-17.0.1.3 → 1.0.0-alpha.1

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 (478) hide show
  1. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +1 -2
  2. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +1 -2
  3. package/lib/cjs/components/AccountDataPortability/AccountDataPortability.js +6 -11
  4. package/lib/cjs/components/AccountDelete/AccountDelete.js +5 -12
  5. package/lib/cjs/components/AccountRecover/AccountRecover.js +2 -4
  6. package/lib/cjs/components/BroadcastMessages/Message.js +1 -1
  7. package/lib/cjs/components/BuyButton/BuyButton.js +8 -5
  8. package/lib/cjs/components/Categories/Categories.js +1 -1
  9. package/lib/cjs/components/Categories/Skeleton.js +1 -1
  10. package/lib/cjs/components/Categories/prefetchedCategories.js +115 -115
  11. package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +13 -4
  12. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +3 -4
  13. package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -6
  14. package/lib/cjs/components/ChangeGroupCover/ChangeGroupCover.js +1 -2
  15. package/lib/cjs/components/ChangeGroupPicture/ChangeGroupPicture.js +1 -2
  16. package/lib/cjs/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  17. package/lib/cjs/components/Checkout/Skeleton.js +1 -3
  18. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +10 -10
  19. package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +2 -3
  20. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  21. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
  22. package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  23. package/lib/cjs/components/CommunityPaywalls/Skeleton.js +2 -3
  24. package/lib/cjs/components/Composer/Composer.js +3 -4
  25. package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
  26. package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  27. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
  28. package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  29. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +11 -5
  30. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +6 -6
  31. package/lib/cjs/components/ConsentSolution/ConsentSolution.js +12 -5
  32. package/lib/cjs/components/ConsentSolution/Skeleton.js +1 -1
  33. package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  34. package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
  35. package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +1 -2
  36. package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +1 -2
  37. package/lib/cjs/components/CourseForm/CourseForm.js +9 -6
  38. package/lib/cjs/components/CourseForm/Edit.js +6 -2
  39. package/lib/cjs/components/CourseForm/UploadCourseCover.js +1 -2
  40. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +3 -4
  41. package/lib/cjs/components/Courses/Courses.d.ts +0 -4
  42. package/lib/cjs/components/Courses/Courses.js +10 -11
  43. package/lib/cjs/components/Courses/Skeleton.js +1 -1
  44. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
  45. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +5 -8
  46. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
  47. package/lib/cjs/components/CustomAdv/Skeleton.js +1 -1
  48. package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +2 -3
  49. package/lib/cjs/components/EditCourse/Lessons/FieldName.js +1 -2
  50. package/lib/cjs/components/EditCourse/Options.js +1 -2
  51. package/lib/cjs/components/EditCourse/Status.js +1 -1
  52. package/lib/cjs/components/Editor/Editor.js +3 -3
  53. package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +4 -2
  54. package/lib/cjs/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
  55. package/lib/cjs/components/Event/Skeleton.js +1 -2
  56. package/lib/cjs/components/EventAutocomplete/EventAutocomplete.js +7 -4
  57. package/lib/cjs/components/EventForm/EventAddress.js +9 -5
  58. package/lib/cjs/components/EventForm/EventForm.js +89 -51
  59. package/lib/cjs/components/EventForm/UploadEventCover.js +1 -2
  60. package/lib/cjs/components/EventInfoWidget/index.d.ts +1 -1
  61. package/lib/cjs/components/EventInviteButton/EventInviteButton.js +3 -2
  62. package/lib/cjs/components/EventLocationWidget/EventLocationWidget.js +5 -16
  63. package/lib/cjs/components/EventLocationWidget/EventMap.d.ts +8 -0
  64. package/lib/cjs/components/EventLocationWidget/EventMap.js +28 -0
  65. package/lib/cjs/components/EventLocationWidget/Skeleton.js +1 -1
  66. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +1 -2
  67. package/lib/cjs/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  68. package/lib/cjs/components/EventMediaWidget/TriggerButton.js +1 -2
  69. package/lib/cjs/components/EventMediaWidget/index.d.ts +2 -1
  70. package/lib/cjs/components/EventMembersWidget/index.d.ts +1 -1
  71. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
  72. package/lib/cjs/components/Events/Events.d.ts +0 -4
  73. package/lib/cjs/components/Events/Events.js +14 -9
  74. package/lib/cjs/components/Events/LocationEventsFilter.js +5 -1
  75. package/lib/cjs/components/Events/OngoingEventsFilter.js +6 -2
  76. package/lib/cjs/components/Events/PastEventsFilter.js +6 -2
  77. package/lib/cjs/components/Events/Skeleton.js +1 -1
  78. package/lib/cjs/components/Feed/Feed.js +9 -10
  79. package/lib/cjs/components/Feed/Skeleton.js +1 -1
  80. package/lib/cjs/components/FeedObject/Actions/Actions.js +2 -3
  81. package/lib/cjs/components/FeedObject/Actions/Comment/Comment.js +2 -2
  82. package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +2 -3
  83. package/lib/cjs/components/FeedObject/Actions/Share/Share.js +1 -2
  84. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
  85. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  86. package/lib/cjs/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  87. package/lib/cjs/components/FeedObject/Contributors/Contributors.js +1 -1
  88. package/lib/cjs/components/FeedObject/Contributors/Skeleton.js +1 -1
  89. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -2
  90. package/lib/cjs/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  91. package/lib/cjs/components/FollowUserButton/FollowUserButton.js +1 -2
  92. package/lib/cjs/components/FriendshipUserButton/FriendshipUserButton.js +2 -3
  93. package/lib/cjs/components/GroupActionsMenu/index.js +9 -1
  94. package/lib/cjs/components/GroupAutocomplete/GroupAutocomplete.js +7 -4
  95. package/lib/cjs/components/GroupForm/GroupForm.js +16 -27
  96. package/lib/cjs/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  97. package/lib/cjs/components/GroupInviteButton/GroupInviteButton.js +8 -7
  98. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
  99. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +3 -4
  100. package/lib/cjs/components/Groups/Groups.js +10 -10
  101. package/lib/cjs/components/Groups/Skeleton.js +1 -2
  102. package/lib/cjs/components/Incubator/Incubator.js +4 -4
  103. package/lib/cjs/components/Incubator/Skeleton.js +1 -1
  104. package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +2 -2
  105. package/lib/cjs/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -4
  106. package/lib/cjs/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  107. package/lib/cjs/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +3 -4
  108. package/lib/cjs/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  109. package/lib/cjs/components/InviteUserEventButton/InviteUserEventButton.js +1 -2
  110. package/lib/cjs/components/LessonAppbar/LessonAppbar.js +3 -4
  111. package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  112. package/lib/cjs/components/LessonEditForm/LessonEditForm.js +1 -2
  113. package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
  114. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +15 -12
  115. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  116. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
  117. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
  118. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  119. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
  120. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  121. package/lib/cjs/components/LocationAutocomplete/LocationAutocomplete.js +11 -11
  122. package/lib/cjs/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  123. package/lib/cjs/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  124. package/lib/cjs/components/MyEventsWidget/index.d.ts +1 -1
  125. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
  126. package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
  127. package/lib/cjs/components/NavigationToolbar/NotificationMenu.js +2 -5
  128. package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  129. package/lib/cjs/components/Notification/Comment/Comment.js +3 -3
  130. package/lib/cjs/components/Notification/Contribution/Contribution.js +1 -1
  131. package/lib/cjs/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  132. package/lib/cjs/components/Notification/Course/Course.js +5 -10
  133. package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +4 -2
  134. package/lib/cjs/components/Notification/Event/Event.js +7 -12
  135. package/lib/cjs/components/Notification/Group/Group.js +3 -4
  136. package/lib/cjs/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  137. package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  138. package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  139. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +4 -9
  140. package/lib/cjs/components/Notification/Mention/Mention.js +2 -2
  141. package/lib/cjs/components/Notification/Notification.js +17 -9
  142. package/lib/cjs/components/Notification/PrivateMessage/PrivateMessage.js +4 -5
  143. package/lib/cjs/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  144. package/lib/cjs/components/Notification/UserBlocked/UserBlocked.js +6 -2
  145. package/lib/cjs/components/Notification/UserConnection/UserConnection.js +6 -2
  146. package/lib/cjs/components/Notification/UserFollow/UserFollow.js +2 -2
  147. package/lib/cjs/components/Notification/VoteUp/VoteUp.js +2 -2
  148. package/lib/cjs/components/OnBoardingWidget/ActionsButton.js +12 -4
  149. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +19 -27
  150. package/lib/cjs/components/OnBoardingWidget/Skeleton.js +1 -1
  151. package/lib/cjs/components/OnBoardingWidget/Steps/App/App.js +9 -25
  152. package/lib/cjs/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
  153. package/lib/cjs/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  154. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +7 -5
  155. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +1 -1
  156. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +39 -26
  157. package/lib/cjs/components/PaymentProduct/Skeleton.js +1 -1
  158. package/lib/cjs/components/PaymentProducts/Skeleton.js +1 -1
  159. package/lib/cjs/components/Paywalls/Skeleton.js +1 -1
  160. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +5 -5
  161. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +1 -1
  162. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +8 -6
  163. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
  164. package/lib/cjs/components/PlatformWidget/PlatformWidget.js +6 -6
  165. package/lib/cjs/components/PlatformWidget/Skeleton.js +1 -1
  166. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  167. package/lib/cjs/components/PrivateMessageComponent/Skeleton.js +1 -1
  168. package/lib/cjs/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  169. package/lib/cjs/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
  170. package/lib/cjs/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
  171. package/lib/cjs/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
  172. package/lib/cjs/components/PrivateMessageSnippets/Skeleton.js +1 -1
  173. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  174. package/lib/cjs/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  175. package/lib/cjs/components/PrivateMessageThread/Skeleton.js +1 -1
  176. package/lib/cjs/components/RelatedEventsWidget/index.d.ts +1 -1
  177. package/lib/cjs/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
  178. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +5 -5
  179. package/lib/cjs/components/SuggestedEventsWidget/index.d.ts +1 -1
  180. package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +5 -2
  181. package/lib/cjs/components/UserActionIconButton/UserActionIconButton.js +9 -8
  182. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +4 -6
  183. package/lib/cjs/components/UserAutocomplete/UserAutocomplete.js +12 -10
  184. package/lib/cjs/components/UserBillingInfo/Skeleton.js +1 -1
  185. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +30 -22
  186. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  187. package/lib/cjs/components/UserCounters/UserCounters.js +5 -13
  188. package/lib/cjs/components/UserInfo/UserInfo.js +1 -1
  189. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +1 -1
  190. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  191. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +2 -4
  192. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  193. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +8 -9
  194. package/lib/cjs/components/UserProfileBlocked/UserProfileBlocked.js +1 -2
  195. package/lib/cjs/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
  196. package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +9 -20
  197. package/lib/cjs/components/UserProfileEdit/Skeleton.js +1 -1
  198. package/lib/cjs/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
  199. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  200. package/lib/cjs/components/VoteAudienceButton/VoteAudienceButton.js +4 -5
  201. package/lib/cjs/components/VoteButton/VoteButton.d.ts +2 -2
  202. package/lib/cjs/components/VoteButton/VoteButton.js +2 -3
  203. package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +3 -2
  204. package/lib/cjs/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  205. package/lib/cjs/shared/ContributionActionsMenu/index.js +3 -9
  206. package/lib/cjs/shared/CopyTextArea/index.js +12 -6
  207. package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +1 -2
  208. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +6 -5
  209. package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +1 -2
  210. package/lib/cjs/shared/CourseUsersTable/RequestButton.js +1 -2
  211. package/lib/cjs/shared/CustomSnackMessage/index.js +2 -2
  212. package/lib/cjs/shared/DateTimeAgo/index.js +2 -2
  213. package/lib/cjs/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  214. package/lib/cjs/shared/EventActionsMenu/index.js +9 -1
  215. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  216. package/lib/cjs/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  217. package/lib/cjs/shared/LessonCommentActionsMenu/index.js +2 -8
  218. package/lib/cjs/shared/Lightbox/BaseLightbox.js +1 -1
  219. package/lib/cjs/shared/Media/File/DisplayComponent.js +4 -6
  220. package/lib/cjs/shared/Media/File/DocComponent.d.ts +2 -0
  221. package/lib/cjs/shared/Media/File/DocComponent.js +3 -2
  222. package/lib/cjs/shared/Media/File/PreviewComponent.js +4 -3
  223. package/lib/cjs/shared/Media/File/TriggerButton.js +9 -1
  224. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  225. package/lib/cjs/shared/Media/File/asUploadButton.js +1 -1
  226. package/lib/cjs/shared/Media/Link/DisplayComponent.js +4 -12
  227. package/lib/cjs/shared/Media/Link/UrlTextField/index.js +3 -1
  228. package/lib/cjs/shared/MessageChunkUploader/index.js +1 -1
  229. package/lib/cjs/shared/PasswordTextField/index.js +7 -5
  230. package/lib/cjs/shared/ScrollContainer/index.js +2 -2
  231. package/lib/cjs/shared/TagChip/index.d.ts +2 -48
  232. package/lib/cjs/shared/TagChip/index.js +2 -2
  233. package/lib/cjs/shared/Tags/index.js +9 -9
  234. package/lib/cjs/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  235. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +2 -3
  236. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +2 -3
  237. package/lib/esm/components/AccountDataPortability/AccountDataPortability.js +7 -12
  238. package/lib/esm/components/AccountDelete/AccountDelete.js +6 -13
  239. package/lib/esm/components/AccountRecover/AccountRecover.js +2 -4
  240. package/lib/esm/components/BroadcastMessages/Message.js +1 -1
  241. package/lib/esm/components/BuyButton/BuyButton.js +9 -6
  242. package/lib/esm/components/Categories/Categories.js +1 -1
  243. package/lib/esm/components/Categories/Skeleton.js +1 -1
  244. package/lib/esm/components/Categories/prefetchedCategories.js +115 -115
  245. package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +14 -5
  246. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +4 -5
  247. package/lib/esm/components/ChangeCover/ChangeCover.js +2 -6
  248. package/lib/esm/components/ChangeGroupCover/ChangeGroupCover.js +2 -3
  249. package/lib/esm/components/ChangeGroupPicture/ChangeGroupPicture.js +2 -3
  250. package/lib/esm/components/ChangePicture/ChangePictureDialog/ChangePictureDialog.js +4 -8
  251. package/lib/esm/components/Checkout/Skeleton.js +2 -4
  252. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +11 -11
  253. package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +3 -4
  254. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +2 -2
  255. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +3 -4
  256. package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +3 -3
  257. package/lib/esm/components/CommunityPaywalls/Skeleton.js +2 -3
  258. package/lib/esm/components/Composer/Composer.js +4 -5
  259. package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +5 -3
  260. package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +2 -2
  261. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +13 -9
  262. package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  263. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +12 -6
  264. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +7 -7
  265. package/lib/esm/components/ConsentSolution/ConsentSolution.js +12 -5
  266. package/lib/esm/components/ConsentSolution/Skeleton.js +1 -1
  267. package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +1 -1
  268. package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +1 -2
  269. package/lib/esm/components/CourseDashboard/Student/ActionButton.js +1 -2
  270. package/lib/esm/components/CourseDashboard/Teacher/Comments.js +1 -2
  271. package/lib/esm/components/CourseForm/CourseForm.js +10 -7
  272. package/lib/esm/components/CourseForm/Edit.js +6 -2
  273. package/lib/esm/components/CourseForm/UploadCourseCover.js +2 -3
  274. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +4 -5
  275. package/lib/esm/components/Courses/Courses.d.ts +0 -4
  276. package/lib/esm/components/Courses/Courses.js +10 -10
  277. package/lib/esm/components/Courses/Skeleton.js +1 -1
  278. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +7 -1
  279. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +6 -9
  280. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +6 -5
  281. package/lib/esm/components/CustomAdv/Skeleton.js +1 -1
  282. package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +3 -4
  283. package/lib/esm/components/EditCourse/Lessons/FieldName.js +2 -3
  284. package/lib/esm/components/EditCourse/Options.js +2 -3
  285. package/lib/esm/components/EditCourse/Status.js +1 -1
  286. package/lib/esm/components/Editor/Editor.js +3 -3
  287. package/lib/esm/components/Editor/plugins/EmojiPlugin.js +4 -2
  288. package/lib/esm/components/Editor/plugins/FloatingLinkPlugin.js +6 -4
  289. package/lib/esm/components/Event/Skeleton.js +1 -2
  290. package/lib/esm/components/EventAutocomplete/EventAutocomplete.js +8 -5
  291. package/lib/esm/components/EventForm/EventAddress.js +9 -5
  292. package/lib/esm/components/EventForm/EventForm.js +91 -53
  293. package/lib/esm/components/EventForm/UploadEventCover.js +2 -3
  294. package/lib/esm/components/EventInfoWidget/index.d.ts +1 -1
  295. package/lib/esm/components/EventInviteButton/EventInviteButton.js +3 -2
  296. package/lib/esm/components/EventLocationWidget/EventLocationWidget.js +5 -16
  297. package/lib/esm/components/EventLocationWidget/EventMap.d.ts +8 -0
  298. package/lib/esm/components/EventLocationWidget/EventMap.js +25 -0
  299. package/lib/esm/components/EventLocationWidget/Skeleton.js +1 -1
  300. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +1 -2
  301. package/lib/esm/components/EventMediaWidget/TriggerButton.d.ts +2 -2
  302. package/lib/esm/components/EventMediaWidget/TriggerButton.js +2 -3
  303. package/lib/esm/components/EventMediaWidget/index.d.ts +2 -1
  304. package/lib/esm/components/EventMembersWidget/index.d.ts +1 -1
  305. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +11 -4
  306. package/lib/esm/components/Events/Events.d.ts +0 -4
  307. package/lib/esm/components/Events/Events.js +14 -8
  308. package/lib/esm/components/Events/LocationEventsFilter.js +5 -1
  309. package/lib/esm/components/Events/OngoingEventsFilter.js +6 -2
  310. package/lib/esm/components/Events/PastEventsFilter.js +6 -2
  311. package/lib/esm/components/Events/Skeleton.js +1 -1
  312. package/lib/esm/components/Feed/Feed.js +10 -11
  313. package/lib/esm/components/Feed/Skeleton.js +2 -2
  314. package/lib/esm/components/FeedObject/Actions/Actions.js +2 -3
  315. package/lib/esm/components/FeedObject/Actions/Comment/Comment.js +2 -2
  316. package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -4
  317. package/lib/esm/components/FeedObject/Actions/Share/Share.js +1 -2
  318. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +20 -18
  319. package/lib/esm/components/FeedObject/Activities/RelevantActivities/CommentActivity/CommentActivity.js +1 -1
  320. package/lib/esm/components/FeedObject/Activities/RelevantActivities/RelevantActivities.js +1 -1
  321. package/lib/esm/components/FeedObject/Contributors/Contributors.js +1 -1
  322. package/lib/esm/components/FeedObject/Contributors/Skeleton.js +1 -1
  323. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +2 -3
  324. package/lib/esm/components/FeedObjectMediaPreview/FeedObjectMediaPreview.js +1 -1
  325. package/lib/esm/components/FollowUserButton/FollowUserButton.js +2 -3
  326. package/lib/esm/components/FriendshipUserButton/FriendshipUserButton.js +3 -4
  327. package/lib/esm/components/GroupActionsMenu/index.js +9 -1
  328. package/lib/esm/components/GroupAutocomplete/GroupAutocomplete.js +8 -5
  329. package/lib/esm/components/GroupForm/GroupForm.js +17 -28
  330. package/lib/esm/components/GroupInfoWidget/GroupInfoWidget.js +5 -15
  331. package/lib/esm/components/GroupInviteButton/GroupInviteButton.js +8 -7
  332. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +10 -4
  333. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +4 -5
  334. package/lib/esm/components/Groups/Groups.js +10 -10
  335. package/lib/esm/components/Groups/Skeleton.js +1 -2
  336. package/lib/esm/components/Incubator/Incubator.js +4 -4
  337. package/lib/esm/components/Incubator/Skeleton.js +1 -1
  338. package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +2 -2
  339. package/lib/esm/components/IncubatorListWidget/CreateIncubatorDialog/CreateIncubatorDialog.js +4 -5
  340. package/lib/esm/components/IncubatorListWidget/IncubatorListWidget.js +5 -5
  341. package/lib/esm/components/IncubatorSubscribeButton/IncubatorSubscribeButton.js +4 -5
  342. package/lib/esm/components/IncubatorSuggestionWidget/IncubatorSuggestionWidget.js +1 -1
  343. package/lib/esm/components/InviteUserEventButton/InviteUserEventButton.js +2 -3
  344. package/lib/esm/components/LessonAppbar/LessonAppbar.js +4 -5
  345. package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +1 -1
  346. package/lib/esm/components/LessonEditForm/LessonEditForm.js +2 -3
  347. package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +24 -16
  348. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +16 -13
  349. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +10 -8
  350. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +5 -1
  351. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamSettingsMenu.js +7 -3
  352. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +3 -3
  353. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +1 -3
  354. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +1 -1
  355. package/lib/esm/components/LocationAutocomplete/LocationAutocomplete.js +12 -12
  356. package/lib/esm/components/LoyaltyProgramWidget/LoyaltyProgramWidget.js +1 -1
  357. package/lib/esm/components/LoyaltyProgramWidget/Skeleton.js +1 -1
  358. package/lib/esm/components/MyEventsWidget/index.d.ts +1 -1
  359. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +3 -2
  360. package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +9 -1
  361. package/lib/esm/components/NavigationToolbar/NotificationMenu.js +2 -5
  362. package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +3 -1
  363. package/lib/esm/components/Notification/Comment/Comment.js +3 -3
  364. package/lib/esm/components/Notification/Contribution/Contribution.js +1 -1
  365. package/lib/esm/components/Notification/ContributionFollow/ContributionFollow.js +2 -2
  366. package/lib/esm/components/Notification/Course/Course.js +6 -11
  367. package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +4 -2
  368. package/lib/esm/components/Notification/Event/Event.js +8 -13
  369. package/lib/esm/components/Notification/Group/Group.js +4 -5
  370. package/lib/esm/components/Notification/IncubatorApproved/IncubatorApproved.js +3 -3
  371. package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
  372. package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
  373. package/lib/esm/components/Notification/LiveStream/LiveStream.js +5 -10
  374. package/lib/esm/components/Notification/Mention/Mention.js +2 -2
  375. package/lib/esm/components/Notification/Notification.js +18 -10
  376. package/lib/esm/components/Notification/PrivateMessage/PrivateMessage.js +5 -6
  377. package/lib/esm/components/Notification/UndeletedFor/UndeletedFor.js +1 -1
  378. package/lib/esm/components/Notification/UserBlocked/UserBlocked.js +6 -2
  379. package/lib/esm/components/Notification/UserConnection/UserConnection.js +6 -2
  380. package/lib/esm/components/Notification/UserFollow/UserFollow.js +2 -2
  381. package/lib/esm/components/Notification/VoteUp/VoteUp.js +2 -2
  382. package/lib/esm/components/OnBoardingWidget/ActionsButton.js +12 -4
  383. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +20 -28
  384. package/lib/esm/components/OnBoardingWidget/Skeleton.js +1 -1
  385. package/lib/esm/components/OnBoardingWidget/Steps/App/App.js +9 -25
  386. package/lib/esm/components/OnBoardingWidget/Steps/Appearance/Appearance.js +17 -14
  387. package/lib/esm/components/OnBoardingWidget/Steps/Category/Category.js +3 -9
  388. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +8 -6
  389. package/lib/esm/components/PaymentOrder/PaymentOrder.js +1 -1
  390. package/lib/esm/components/PaymentOrders/PaymentOrders.js +39 -26
  391. package/lib/esm/components/PaymentProduct/Skeleton.js +1 -1
  392. package/lib/esm/components/PaymentProducts/Skeleton.js +1 -1
  393. package/lib/esm/components/Paywalls/Skeleton.js +1 -1
  394. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +4 -4
  395. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +1 -1
  396. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +9 -7
  397. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +3 -1
  398. package/lib/esm/components/PlatformWidget/PlatformWidget.js +6 -6
  399. package/lib/esm/components/PlatformWidget/Skeleton.js +1 -1
  400. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +3 -3
  401. package/lib/esm/components/PrivateMessageComponent/Skeleton.js +1 -1
  402. package/lib/esm/components/PrivateMessageEditor/MessageMediaUploader/index.js +2 -2
  403. package/lib/esm/components/PrivateMessageEditor/PrivateMessageEditor.js +6 -4
  404. package/lib/esm/components/PrivateMessageSettingsIconButton/PrivateMessageSettingsIconButton.js +9 -1
  405. package/lib/esm/components/PrivateMessageSnippets/PrivateMessageSnippets.js +10 -8
  406. package/lib/esm/components/PrivateMessageSnippets/Skeleton.js +1 -1
  407. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.d.ts +1 -1
  408. package/lib/esm/components/PrivateMessageThread/PrivateMessageThread.js +7 -7
  409. package/lib/esm/components/PrivateMessageThread/Skeleton.js +1 -1
  410. package/lib/esm/components/RelatedEventsWidget/index.d.ts +1 -1
  411. package/lib/esm/components/SearchAutocomplete/SearchAutocomplete.js +13 -8
  412. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +5 -5
  413. package/lib/esm/components/SuggestedEventsWidget/index.d.ts +1 -1
  414. package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +7 -4
  415. package/lib/esm/components/UserActionIconButton/UserActionIconButton.js +10 -9
  416. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +5 -7
  417. package/lib/esm/components/UserAutocomplete/UserAutocomplete.js +14 -12
  418. package/lib/esm/components/UserBillingInfo/Skeleton.js +1 -1
  419. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +30 -22
  420. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +1 -2
  421. package/lib/esm/components/UserCounters/UserCounters.js +5 -13
  422. package/lib/esm/components/UserInfo/UserInfo.js +1 -1
  423. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +1 -1
  424. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +24 -3
  425. package/lib/esm/components/UserPaymentMethods/Skeleton.js +2 -4
  426. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +25 -3
  427. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +11 -12
  428. package/lib/esm/components/UserProfileBlocked/UserProfileBlocked.js +2 -3
  429. package/lib/esm/components/UserProfileEdit/Section/AccountCredentials.js +10 -7
  430. package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +12 -23
  431. package/lib/esm/components/UserProfileEdit/Skeleton.js +1 -1
  432. package/lib/esm/components/UserSubscribedGroupsWidget/UserSubscribedGroupsWidget.js +1 -1
  433. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.d.ts +2 -2
  434. package/lib/esm/components/VoteAudienceButton/VoteAudienceButton.js +5 -6
  435. package/lib/esm/components/VoteButton/VoteButton.d.ts +2 -2
  436. package/lib/esm/components/VoteButton/VoteButton.js +3 -4
  437. package/lib/esm/shared/AddUsersButton/AddUsersButton.js +3 -2
  438. package/lib/esm/shared/ConfirmDialog/ConfirmDialog.js +1 -2
  439. package/lib/esm/shared/ContributionActionsMenu/index.js +3 -9
  440. package/lib/esm/shared/CopyTextArea/index.js +12 -6
  441. package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +2 -3
  442. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +7 -6
  443. package/lib/esm/shared/CourseUsersTable/RemoveButton.js +2 -3
  444. package/lib/esm/shared/CourseUsersTable/RequestButton.js +2 -3
  445. package/lib/esm/shared/CustomSnackMessage/index.js +2 -2
  446. package/lib/esm/shared/DateTimeAgo/index.js +2 -2
  447. package/lib/esm/shared/EmojiPicker/EmojiPicker.d.ts +1 -2
  448. package/lib/esm/shared/EventActionsMenu/index.js +9 -1
  449. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +3 -4
  450. package/lib/esm/shared/InfiniteScroll/stories/ScrolleableTop.js +1 -1
  451. package/lib/esm/shared/LessonCommentActionsMenu/index.js +2 -8
  452. package/lib/esm/shared/Lightbox/BaseLightbox.js +1 -1
  453. package/lib/esm/shared/Media/File/DisplayComponent.js +4 -6
  454. package/lib/esm/shared/Media/File/DocComponent.d.ts +2 -0
  455. package/lib/esm/shared/Media/File/DocComponent.js +3 -2
  456. package/lib/esm/shared/Media/File/PreviewComponent.js +4 -3
  457. package/lib/esm/shared/Media/File/TriggerButton.js +9 -1
  458. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  459. package/lib/esm/shared/Media/File/asUploadButton.js +3 -3
  460. package/lib/esm/shared/Media/Link/DisplayComponent.js +5 -13
  461. package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -1
  462. package/lib/esm/shared/MessageChunkUploader/index.js +1 -1
  463. package/lib/esm/shared/PasswordTextField/index.js +7 -5
  464. package/lib/esm/shared/ScrollContainer/index.js +1 -1
  465. package/lib/esm/shared/TagChip/index.d.ts +2 -48
  466. package/lib/esm/shared/TagChip/index.js +2 -2
  467. package/lib/esm/shared/Tags/index.js +9 -9
  468. package/lib/esm/shared/VirtualizedScroller/VirtualizedScroller.d.ts +1 -1
  469. package/lib/umd/484.js +2 -0
  470. package/lib/umd/484.js.LICENSE.txt +9 -0
  471. package/lib/umd/react-ui.js +1 -1
  472. package/package.json +207 -206
  473. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
  474. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -14
  475. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +0 -5
  476. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +0 -10
  477. package/lib/umd/155.js +0 -2
  478. package/lib/umd/155.js.LICENSE.txt +0 -24
@@ -14,7 +14,6 @@ const reducer_1 = require("./reducer");
14
14
  const Country_1 = require("../../constants/Country");
15
15
  const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
16
16
  const Grow_1 = tslib_1.__importDefault(require("@mui/material/Grow"));
17
- const lab_1 = require("@mui/lab");
18
17
  const notistack_1 = require("notistack");
19
18
  // import {getCountryOption} from '../../utils/address';
20
19
  const react_core_1 = require("@selfcommunity/react-core");
@@ -71,7 +70,7 @@ const UserBillingInfo = (inProps, ref) => {
71
70
  const scUserContext = (0, react_core_1.useSCUser)();
72
71
  // STATE
73
72
  const [state, dispatch] = (0, react_1.useReducer)(reducer_1.reducer, (0, reducer_1.getInitialState)({ mode }));
74
- const [customer, setCustomer] = (0, react_1.useState)();
73
+ const [customer] = (0, react_1.useState)();
75
74
  // HOOKS
76
75
  const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
77
76
  const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
@@ -446,47 +445,56 @@ const UserBillingInfo = (inProps, ref) => {
446
445
  if (!isPaymentsEnabled || !scUserContext.user) {
447
446
  return null;
448
447
  }
449
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), id: id }, rest, { ref: componentRef }, { children: (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: state.isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { mode: mode })) : ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: state.mode === Billing_1.UserBillingInfoMode.READ ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [state.name ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: state.name })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [state.address_line1, (0, jsx_runtime_1.jsx)("br", {}), state.address_line2] })), (0, jsx_runtime_1.jsxs)(material_1.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) && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: state.tax_code })), state.isBusiness && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [state.tax_id_data && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: ["SDI: ", state.sdi] })), state.pec && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: ["PEC: ", state.pec] }))] }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', size: 'small', disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "name", name: "name", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { id: "country-select-demo", options: Country_1.countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
450
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
451
- // @ts-ignore
448
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), id: id }, rest, { ref: componentRef }, { children: (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: state.isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, { mode: mode })) : ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: state.mode === Billing_1.UserBillingInfoMode.READ ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [state.name ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: state.name })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1" }, { children: [state.address_line1, (0, jsx_runtime_1.jsx)("br", {}), state.address_line2] })), (0, jsx_runtime_1.jsxs)(material_1.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) && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: state.tax_code })), state.isBusiness && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [state.tax_id_data && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1" }, { children: ["VAT: ", state.tax_id_data.value] })), state.sdi && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1" }, { children: ["SDI: ", state.sdi] })), state.pec && (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: "body1" }, { children: ["PEC: ", state.pec] }))] }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.noInfo", defaultMessage: "ui.userBillingInfo.noInfo" }) }))), state.initialDataCompleted && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { mt: 1 }, variant: "contained", size: "small", disabled: Boolean(disableButtons), onClick: handleChangeViewMode }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "component.CheckoutForm.billingInfoChangeButton", defaultMessage: "component.CheckoutForm.billingInfoChangeButton" }) })))] })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "name", name: "name", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.name", defaultMessage: "ui.userBillingInfo.name" }), onChange: handleChange('name'), value: state.name, error: Boolean(state.nameError), helperText: state.nameError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_line1", name: "address_line1", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_line2", name: "address_line2", label: (0, jsx_runtime_1.jsx)(react_intl_1.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 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Autocomplete, { id: "country-select-demo", options: Country_1.countries, value: state.address_country, fullWidth: true, onChange: handleChange('address_country'), getOptionLabel: (option) => option.label, renderOption: (props, option) => {
452
449
  const { key } = props, rest = tslib_1.__rest(props, ["key"]);
453
450
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ component: "li", sx: { '& > img': { mr: 2, flexShrink: 0 } } }, rest, { children: [(0, jsx_runtime_1.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));
454
- }, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.country", defaultMessage: "ui.userBillingInfo.country" }), fullWidth: true, id: "address_country", name: "address_country", error: Boolean(state.addressCountryError), InputProps: Object.assign(Object.assign({}, params.InputProps), (state.address_country && {
455
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)("img", { loading: "lazy", width: "20", srcSet: `https://flagcdn.com/w40/${state.address_country.code.toLowerCase()}.png 2x`, src: `https://flagcdn.com/w20/${state.address_country.code.toLowerCase()}.png`, alt: "" }) })))
456
- })), inputProps: Object.assign(Object.assign({}, params.inputProps), { autoComplete: 'new-password' // disable autocomplete and autofill
457
- }) }))) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_state", name: "address_state", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.state", defaultMessage: "ui.userBillingInfo.state" }), onChange: handleChange('address_state'), value: state.address_state, error: Boolean(state.addressStateError), helperText: state.addressStateError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_postal_code", name: "address_postal_code", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.postalCode", defaultMessage: "ui.userBillingInfo.postalCode" }), onChange: handleChange('address_postal_code'), value: state.address_postal_code, error: Boolean(state.addressPostalCodeError), helperText: state.addressPostalCodeError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_city", name: "address_city", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.city", defaultMessage: "ui.userBillingInfo.city" }), onChange: handleChange('address_city'), value: state.address_city, error: Boolean(state.addressCityError), helperText: state.addressCityError, InputProps: {
458
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }) })))
459
- }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "phone", name: "phone", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.phone", defaultMessage: "ui.userBillingInfo.phone" }), onChange: handleChange('phone'), value: state.phone, error: Boolean(state.phoneError), helperText: state.phoneError, InputProps: {
460
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "person" }) })))
461
- }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "tax_code", name: "tax_code", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCode", defaultMessage: "ui.userBillingInfo.taxCode" }), onChange: handleChange('tax_code'), value: state.tax_code, error: Boolean(state.taxCodeError), helperText: state.taxCodeError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.FormGroup, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { disabled: Boolean(disableButtons), control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, Object.assign({ checked: state.isBusiness }, ((state.taxIdDataError || state.sdiError || state.pecError) && { color: 'secondary' }), { className: (0, classnames_1.default)({
451
+ }, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.country", defaultMessage: "ui.userBillingInfo.country" }), fullWidth: true, id: "address_country", name: "address_country", error: Boolean(state.addressCountryError), slotProps: {
452
+ input: Object.assign(Object.assign({}, params.InputProps), (state.address_country && {
453
+ startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)("img", { loading: "lazy", width: "20", srcSet: `https://flagcdn.com/w40/${state.address_country.code.toLowerCase()}.png 2x`, src: `https://flagcdn.com/w20/${state.address_country.code.toLowerCase()}.png`, alt: "" }) })))
454
+ })),
455
+ htmlInput: Object.assign(Object.assign({}, params.inputProps), { autoComplete: 'new-password' // disable autocomplete and autofill
456
+ })
457
+ } }))) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_state", name: "address_state", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.state", defaultMessage: "ui.userBillingInfo.state" }), onChange: handleChange('address_state'), value: state.address_state, error: Boolean(state.addressStateError), helperText: state.addressStateError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_postal_code", name: "address_postal_code", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.postalCode", defaultMessage: "ui.userBillingInfo.postalCode" }), onChange: handleChange('address_postal_code'), value: state.address_postal_code, error: Boolean(state.addressPostalCodeError), helperText: state.addressPostalCodeError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "address_city", name: "address_city", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.city", defaultMessage: "ui.userBillingInfo.city" }), onChange: handleChange('address_city'), value: state.address_city, error: Boolean(state.addressCityError), helperText: state.addressCityError, slotProps: {
458
+ input: {
459
+ startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }) })))
460
+ }
461
+ }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "phone", name: "phone", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.phone", defaultMessage: "ui.userBillingInfo.phone" }), onChange: handleChange('phone'), value: state.phone, error: Boolean(state.phoneError), helperText: state.phoneError, slotProps: {
462
+ input: {
463
+ startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "person" }) })))
464
+ }
465
+ }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "tax_code", name: "tax_code", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCode", defaultMessage: "ui.userBillingInfo.taxCode" }), onChange: handleChange('tax_code'), value: state.tax_code, error: Boolean(state.taxCodeError), helperText: state.taxCodeError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.FormGroup, { children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { disabled: Boolean(disableButtons), control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, Object.assign({ checked: state.isBusiness }, ((state.taxIdDataError || state.sdiError || state.pecError) && { color: 'secondary' }), { className: (0, classnames_1.default)({
462
466
  [classes.error]: state.taxIdDataError || state.sdiError || state.pecError
463
467
  }), onChange: handleSetBusiness })), label: (0, jsx_runtime_1.jsx)("span", Object.assign({ className: (0, classnames_1.default)({
464
468
  [classes.error]: state.taxIdDataError || state.sdiError || state.pecError
465
469
  }) }, { children: intl.formatMessage({
466
470
  id: 'component.billingInfo.accountBusiness',
467
471
  defaultMessage: 'component.billingInfo.accountBusiness'
468
- }) })) }) }) })), state.isBusiness && ((0, jsx_runtime_1.jsx)(Grow_1.default, Object.assign({ in: state.isBusiness }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "tax_id_data", name: "tax_id_data", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxId", defaultMessage: "ui.userBillingInfo.taxId" }), onChange: handleChange('tax_id_data'), value: state.tax_id_data ? state.tax_id_data.value : null, error: Boolean(state.taxIdDataError), helperText: `${state.taxIdDataError ? state.taxIdDataError : ''} ${state.address_country && state.address_country.code && Billing_1.VAT_EXAMPLE[state.address_country.code]
472
+ }) })) }) }) })), state.isBusiness && ((0, jsx_runtime_1.jsx)(Grow_1.default, Object.assign({ in: state.isBusiness }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "tax_id_data", name: "tax_id_data", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxId", defaultMessage: "ui.userBillingInfo.taxId" }), onChange: handleChange('tax_id_data'), value: state.tax_id_data ? state.tax_id_data.value : null, error: Boolean(state.taxIdDataError), helperText: `${state.taxIdDataError ? state.taxIdDataError : ''} ${state.address_country && state.address_country.code && Billing_1.VAT_EXAMPLE[state.address_country.code]
469
473
  ? intl.formatMessage({
470
474
  id: 'component.billingInfo.requiredFormat',
471
475
  defaultMessage: 'component.billingInfo.requiredFormat'
472
476
  }) + Billing_1.VAT_EXAMPLE[state.address_country.code]
473
477
  : ''}`, placeholder: state.address_country && state.address_country.code && Billing_1.VAT_EXAMPLE[state.address_country.code]
474
478
  ? Billing_1.VAT_EXAMPLE[state.address_country.code]
475
- : '', InputProps: {
476
- endAdornment: state.taxIdVerificationStatus !== null && ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: state.taxIdVerificationStatus === 'verified' ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "primary" }, { children: "done" }))) : state.taxIdVerificationStatus === 'pending' ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ id: "tooltip-warning", title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCheckPending", defaultMessage: "ui.userBillingInfo.taxCheckPending" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ id: "tooltip-warning", title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCheckWarning", defaultMessage: "ui.userBillingInfo.taxCheckWarning" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) })))
477
- }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "sdi", name: "sdi", label: `${intl.formatMessage({ id: 'component.billingInfo.sdi', defaultMessage: 'component.billingInfo.sdi' })} ${((_a = state.address_country) === null || _a === void 0 ? void 0 : _a.code) === Country_1.COUNTRY_CODES.IT
479
+ : '', slotProps: {
480
+ input: {
481
+ endAdornment: state.taxIdVerificationStatus !== null && ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: state.taxIdVerificationStatus === 'verified' ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "primary" }, { children: "done" }))) : state.taxIdVerificationStatus === 'pending' ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ id: "tooltip-warning", title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCheckPending", defaultMessage: "ui.userBillingInfo.taxCheckPending" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) : ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ id: "tooltip-warning", title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.taxCheckWarning", defaultMessage: "ui.userBillingInfo.taxCheckWarning" }), enterDelay: 300, leaveDelay: 300, placement: "top" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "warning" }, { children: "help" })) }))) })))
482
+ }
483
+ }, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "sdi", name: "sdi", label: `${intl.formatMessage({ id: 'component.billingInfo.sdi', defaultMessage: 'component.billingInfo.sdi' })} ${((_a = state.address_country) === null || _a === void 0 ? void 0 : _a.code) === Country_1.COUNTRY_CODES.IT
478
484
  ? intl.formatMessage({
479
485
  id: 'component.billingInfo.field.optional',
480
486
  defaultMessage: 'component.billingInfo.field.optional'
481
487
  })
482
- : ''}`, onChange: handleChange('sdi'), value: state.sdi, error: Boolean(state.sdiError), helperText: state.sdiError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: inlineDisplay ? 12 : 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "pec", name: "pec", label: `${intl.formatMessage({ id: 'component.billingInfo.pec', defaultMessage: 'component.billingInfo.pec' })} ${((_b = state.address_country) === null || _b === void 0 ? void 0 : _b.code) === Country_1.COUNTRY_CODES.IT
488
+ : ''}`, onChange: handleChange('sdi'), value: state.sdi, error: Boolean(state.sdiError), helperText: state.sdiError, fullWidth: true }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, sm: inlineDisplay ? 12 : 6 } }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { variant: "outlined", id: "pec", name: "pec", label: `${intl.formatMessage({ id: 'component.billingInfo.pec', defaultMessage: 'component.billingInfo.pec' })} ${((_b = state.address_country) === null || _b === void 0 ? void 0 : _b.code) === Country_1.COUNTRY_CODES.IT
483
489
  ? intl.formatMessage({
484
490
  id: 'component.billingInfo.field.optional',
485
491
  defaultMessage: 'component.billingInfo.field.optional'
486
492
  })
487
- : ''}`, onChange: handleChange('pec'), value: state.pec, error: Boolean(state.pecError), helperText: state.pecError, InputProps: {
488
- type: 'email',
489
- startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "email" }) })))
490
- }, fullWidth: true }) }))] })) })) }))), state.error && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ align: "left", color: "secondary" }, { children: state.error })) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ align: "left" }, { children: [(0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: "contained", size: "small", color: "primary", disabled: state.isProcessing || Boolean(disableButtons), loading: state.isProcessing, onClick: handleSubmit }, { children: buttonLabel })), onBack && state.initialDataCompleted && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handleBack, disabled: Boolean(disableButtons) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.back", defaultMessage: "ui.userBillingInfo.back" }) })))] })) }))] })) })) })) }) })));
493
+ : ''}`, onChange: handleChange('pec'), value: state.pec, error: Boolean(state.pecError), helperText: state.pecError, slotProps: {
494
+ input: {
495
+ type: 'email',
496
+ startAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "email" }) })))
497
+ }
498
+ }, fullWidth: true }) }))] })) })) }))), state.error && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ align: "left", color: "secondary" }, { children: state.error })) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: "grow" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ align: "left" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", color: "primary", disabled: state.isProcessing || Boolean(disableButtons), loading: state.isProcessing, onClick: handleSubmit }, { children: buttonLabel })), onBack && state.initialDataCompleted && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", size: "small", onClick: handleBack, disabled: Boolean(disableButtons) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userBillingInfo.back", defaultMessage: "ui.userBillingInfo.back" }) })))] })) }))] })) })) })) }) })));
491
499
  };
492
500
  exports.default = (0, react_1.forwardRef)(UserBillingInfo);
@@ -11,7 +11,6 @@ const system_1 = require("@mui/system");
11
11
  const constants_1 = require("./constants");
12
12
  const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
13
13
  const react_intl_1 = require("react-intl");
14
- const lab_1 = require("@mui/lab");
15
14
  const react_stripe_js_1 = require("@stripe/react-stripe-js");
16
15
  const stripe_js_1 = require("@stripe/stripe-js");
17
16
  const payment_1 = require("../../utils/payment");
@@ -77,7 +76,7 @@ function UserChangeAddressDialog(inProps) {
77
76
  if (!isPaymentsEnabled || !scUserContext.user) {
78
77
  return null;
79
78
  }
80
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.title", id: "component.userChangeAddressDialog.title" }), open: open, actions: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: 'outlined', onClick: handleClose }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnClose", id: "component.userChangeAddressDialog.btnClose" }) })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: loading, disabled: loading, variant: 'contained', onClick: handleSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnSave", id: "component.userChangeAddressDialog.btnSave" }) }))] }) }, rest, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.AddressElement, { onChange: handleChangeAddress, options: {
79
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.title", id: "component.userChangeAddressDialog.title" }), open: open, actions: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", onClick: handleClose }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnClose", id: "component.userChangeAddressDialog.btnClose" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ loading: loading, disabled: loading, variant: "contained", onClick: handleSave }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userChangeAddressDialog.btnSave", id: "component.userChangeAddressDialog.btnSave" }) }))] }) }, rest, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.AddressElement, { onChange: handleChangeAddress, options: {
81
80
  mode: 'billing',
82
81
  defaultValues: addressState
83
82
  } }) })) })));
@@ -18,7 +18,7 @@ const classes = {
18
18
  const Root = (0, material_1.styled)(material_1.Box, {
19
19
  name: PREFIX,
20
20
  slot: 'Root',
21
- overridesResolver: (props, styles) => styles.root
21
+ overridesResolver: (_props, styles) => styles.root
22
22
  })(() => ({}));
23
23
  /**
24
24
  * > API documentation for the Community-JS User Counters component. Learn about the available props and the CSS API.
@@ -93,24 +93,16 @@ function UserCounters(inProps) {
93
93
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (followEnabled || connectionEnabled) &&
94
94
  (followEnabled ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, variant: "text", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_FOLLOWINGS_ROUTE_NAME, scUser) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCounters.followings", defaultMessage: "ui.userCounters.followings", values: {
95
95
  count: scUser === null || scUser === void 0 ? void 0 : scUser.followings_counter,
96
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
97
- // @ts-ignore
98
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
96
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
99
97
  } }) })), (0, jsx_runtime_1.jsx)(Bullet_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, variant: "text", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_FOLLOWERS_ROUTE_NAME, scUser) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCounters.followers", defaultMessage: "ui.userCounters.followers", values: {
100
98
  count: scUser === null || scUser === void 0 ? void 0 : scUser.followers_counter,
101
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
102
- // @ts-ignore
103
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
99
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
104
100
  } }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, variant: "text", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_CONNECTIONS_ROUTE_NAME, scUser) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCounters.connections", defaultMessage: "ui.userCounters.connections", values: {
105
101
  count: scUser === null || scUser === void 0 ? void 0 : scUser.connections_counter,
106
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
107
- // @ts-ignore
108
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
102
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
109
103
  } }) })), (0, jsx_runtime_1.jsx)(Bullet_1.default, {})] }))) }), categoryFollowEnabled && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.button, variant: "text", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_CATEGORIES_ROUTE_NAME, scUser) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCounters.categories", defaultMessage: "ui.userCounters.categories", values: {
110
104
  count: scUser === null || scUser === void 0 ? void 0 : scUser.categories_counter,
111
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
112
- // @ts-ignore
113
- b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
105
+ b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks }, Math.random())
114
106
  } }) })))] })));
115
107
  }
116
108
  exports.default = UserCounters;
@@ -122,7 +122,7 @@ function UserInfo(inProps) {
122
122
  case types_1.SCUserProfileFields.DATE_OF_BIRTH:
123
123
  return `${intl.formatDate(user[field], { year: 'numeric', month: 'numeric', day: 'numeric' })}`;
124
124
  case types_1.SCUserProfileFields.TAGS:
125
- return ((0, jsx_runtime_1.jsx)(Tags_1.default, { tags: user.tags.filter((t) => t.visible), type: Tags_1.TagsComponentType.LIST, direction: 'row', TagChipProps: { clickable: false, disposable: false } }));
125
+ return ((0, jsx_runtime_1.jsx)(Tags_1.default, { tags: user.tags.filter((t) => t.visible), type: Tags_1.TagsComponentType.LIST, direction: "row", TagChipProps: { clickable: false, disposable: false } }));
126
126
  case types_1.SCUserProfileFields.WEBSITE:
127
127
  return ((0, jsx_runtime_1.jsx)("a", Object.assign({ href: user[field], target: '_blank' }, { children: user[field] })));
128
128
  default:
@@ -1,4 +1,4 @@
1
1
  import UserLiveStreamWidget, { UserLiveStreamWidgetProps } from './UserLiveStreamWidget';
2
2
  import UserLiveStreamWidgetSkeleton from './Skeleton';
3
3
  export default UserLiveStreamWidget;
4
- export { UserLiveStreamWidgetSkeleton, type UserLiveStreamWidgetProps };
4
+ export { UserLiveStreamWidgetSkeleton, UserLiveStreamWidgetProps };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsSkeletonProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -11,5 +11,26 @@ export interface UserPaymentMethodsSkeletonProps {
11
11
  showBillingAddress?: boolean;
12
12
  }
13
13
  export type UserPaymentMethodsSkeletonRef = {};
14
- declare const _default: React.ForwardRefExoticComponent<UserPaymentMethodsSkeletonProps & React.RefAttributes<UserPaymentMethodsSkeletonRef>>;
15
- export default _default;
14
+ /**
15
+ * > API documentation for the Community-JS User Payment Methods Skeleton component. Learn about the available props and the CSS API.
16
+
17
+ #### Import
18
+
19
+ ```jsx
20
+ import {UserPaymentMethodsSkeleton} from '@selfcommunity/react-ui';
21
+ ```
22
+
23
+ #### Component Name
24
+
25
+ The name `SCUserPaymentMethodsSkeleton-skeleton-root` can be used when providing style overrides in the theme.
26
+
27
+ #### CSS
28
+
29
+ |Rule Name|Global class|Description|
30
+ |---|---|---|
31
+ |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
32
+ *
33
+ * @param inProps
34
+ */
35
+ declare const UserPaymentMethodsSkeleton: ForwardRefRenderFunction<UserPaymentMethodsSkeletonRef, UserPaymentMethodsSkeletonProps>;
36
+ export default UserPaymentMethodsSkeleton;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
5
  const material_1 = require("@mui/material");
7
6
  const constants_1 = require("./constants");
8
7
  const system_1 = require("@mui/system");
@@ -35,9 +34,8 @@ const Root = (0, material_1.styled)(material_1.Box, {
35
34
  |root|.SCUserPaymentMethodsSkeleton-skeleton-root|Styles applied to the root element.|
36
35
  *
37
36
  * @param inProps
38
- * @param ref
39
37
  */
40
- const UserPaymentMethodsSkeleton = (inProps, ref) => {
38
+ const UserPaymentMethodsSkeleton = (inProps) => {
41
39
  // PROPS
42
40
  const props = (0, system_1.useThemeProps)({
43
41
  props: inProps,
@@ -46,4 +44,4 @@ const UserPaymentMethodsSkeleton = (inProps, ref) => {
46
44
  const { className = null, showBillingAddress = false } = props, rest = tslib_1.__rest(props, ["className", "showBillingAddress"]);
47
45
  return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 200 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 50 }) })), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", height: 40, width: 150 }) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 25, height: 25 }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ component: "th", scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", width: 105, height: 35 }) }))] }) })));
48
46
  };
49
- exports.default = (0, react_1.forwardRef)(UserPaymentMethodsSkeleton);
47
+ exports.default = UserPaymentMethodsSkeleton;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ForwardRefRenderFunction } from 'react';
2
2
  export interface UserPaymentMethodsProps {
3
3
  /**
4
4
  * Overrides or extends the styles applied to the component.
@@ -15,5 +15,27 @@ export interface UserPaymentMethodsProps {
15
15
  [p: string]: any;
16
16
  }
17
17
  export type UserPaymentMethodsRef = {};
18
- declare const _default: React.ForwardRefExoticComponent<Omit<UserPaymentMethodsProps, "ref"> & React.RefAttributes<UserPaymentMethodsRef>>;
19
- export default _default;
18
+ /**
19
+ * > API documentation for the Community-JS User Payment Methods. Learn about the available props and the CSS API.
20
+
21
+ #### Import
22
+
23
+ ```jsx
24
+ import {UserPaymentMethods} from '@selfcommunity/react-ui';
25
+ ```
26
+
27
+ #### Component Name
28
+
29
+ The name `SCUserPaymentMethods` can be used when providing style overrides in the theme.
30
+
31
+
32
+ #### CSS
33
+
34
+ |Rule Name|Global class|Description|
35
+ |---|---|---|
36
+ |root|.SCUserPaymentMethods-root|Styles applied to the root element.|
37
+
38
+ * @param inProps
39
+ */
40
+ declare const UserPaymentMethods: ForwardRefRenderFunction<UserPaymentMethodsRef, UserPaymentMethodsProps>;
41
+ export default UserPaymentMethods;
@@ -47,13 +47,13 @@ const Root = (0, material_1.styled)(material_1.Box, {
47
47
 
48
48
  * @param inProps
49
49
  */
50
- const UserPaymentMethods = (inProps, ref) => {
50
+ const UserPaymentMethods = (inProps) => {
51
51
  // PROPS
52
52
  const props = (0, system_1.useThemeProps)({
53
53
  props: inProps,
54
54
  name: constants_1.PREFIX
55
55
  });
56
- const { className = null, showBillingAddress = false } = props, rest = tslib_1.__rest(props, ["className", "showBillingAddress"]);
56
+ const { className = null, showBillingAddress = false } = props;
57
57
  // CONTEXT
58
58
  const scUserContext = (0, react_core_1.useSCUser)();
59
59
  // STATE
@@ -72,7 +72,6 @@ const UserPaymentMethods = (inProps, ref) => {
72
72
  const [addPaymentMethodDialogOpen, setAddPaymentMethodDialogOpen] = (0, react_1.useState)(false);
73
73
  // HOOKS
74
74
  const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
75
- const intl = (0, react_intl_1.useIntl)();
76
75
  const { inView } = (0, react_intersection_observer_1.useInView)({ triggerOnce: false });
77
76
  const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
78
77
  /**
@@ -81,8 +80,8 @@ const UserPaymentMethods = (inProps, ref) => {
81
80
  const loadMore = (0, react_1.useCallback)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
82
81
  // eslint-disable-next-line @typescript-eslint/require-await
83
82
  const loadItems = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
84
- const startingAfterId = paymentMethods.length ? paymentMethods[paymentMethods.length - 1].id : null;
85
- /* getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
83
+ /* const startingAfterId = paymentMethods.length ? paymentMethods[paymentMethods.length - 1].id : null;
84
+ getAccountCustomerPaymentMethod(startingAfterId).then((res) => {
86
85
  setHasMore(res.paymentMethods.has_more);
87
86
  setPaymentMethods(paymentMethods.concat(res.paymentMethods.data));
88
87
  setIsLoadingPage(false);
@@ -330,9 +329,9 @@ const UserPaymentMethods = (inProps, ref) => {
330
329
  if (!isPaymentsEnabled || !scUserContext.user) {
331
330
  return null;
332
331
  }
333
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'outlined', onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) })))] })), paymentMethods.length > 0 ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 }, component: material_1.Paper }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.typeMethod", defaultMessage: "ui.userPaymentMethods.typeMethod" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.brand", defaultMessage: "ui.userPaymentMethods.brand" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.expiration", defaultMessage: "ui.userPaymentMethods.expiration" }) }), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.billingDetails", defaultMessage: "ui.userPaymentMethods.billingDetails" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.default", defaultMessage: "ui.userPaymentMethods.default" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.actions", defaultMessage: "ui.userPaymentMethods.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [paymentMethods.map((method, index) => {
332
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, {})) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "baseline" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.headline }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.myPaymentMethods", defaultMessage: "ui.userPaymentMethods.myPaymentMethods" }) })), paymentMethods.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) })))] })), paymentMethods.length > 0 ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 }, component: material_1.Paper }, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, Object.assign({ sx: { minWidth: 650 }, "aria-label": "simple table", stickyHeader: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.typeMethod", defaultMessage: "ui.userPaymentMethods.typeMethod" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.brand", defaultMessage: "ui.userPaymentMethods.brand" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.expiration", defaultMessage: "ui.userPaymentMethods.expiration" }) }), showBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.billingDetails", defaultMessage: "ui.userPaymentMethods.billingDetails" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.default", defaultMessage: "ui.userPaymentMethods.default" }) }), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.actions", defaultMessage: "ui.userPaymentMethods.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [paymentMethods.map((method, index) => {
334
333
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
335
- return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_svg_credit_card_payment_icons_1.PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), (0, jsx_runtime_1.jsxs)(material_1.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 && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: method.billing_details.name })), (0, jsx_runtime_1.jsxs)(material_1.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, (0, jsx_runtime_1.jsx)("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), (0, jsx_runtime_1.jsxs)(material_1.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] }))] }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))] })) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [method.id === defaultPaymentMethodId, (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: 'contained', onClick: () => handleDelete(method.id) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
336
- }), hasMore && (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] })] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: 'contained', onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && ((0, jsx_runtime_1.jsx)(UserChangeAddressDialog_1.default, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && (0, jsx_runtime_1.jsx)(UserAddPaymentMethodDialog_1.default, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
334
+ return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type.toUpperCase() })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: method.type === 'card' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_svg_credit_card_payment_icons_1.PaymentIcon, { type: ((_a = method.card) === null || _a === void 0 ? void 0 : _a.brand) || 'Generic', format: "flatRounded", width: 50 }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.paymentNumber }, { children: ["**** **** **** ", (_b = method.card) === null || _b === void 0 ? void 0 : _b.last4] }))] })) })), (0, jsx_runtime_1.jsxs)(material_1.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 && ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "left", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: method.billing_details.name })), (0, jsx_runtime_1.jsxs)(material_1.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, (0, jsx_runtime_1.jsx)("br", {}), (_h = (_g = method.billing_details) === null || _g === void 0 ? void 0 : _g.address) === null || _h === void 0 ? void 0 : _h.line2] })), (0, jsx_runtime_1.jsxs)(material_1.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] }))] }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "edit", color: "primary", onClick: () => handleOpenEditAddressDialog(method) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))] })) }))), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: defaultPaymentMethodLoading === method.id ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20 })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [method.id === defaultPaymentMethodId, (0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: method.id === defaultPaymentMethodId, onClick: () => handleSetDefaultPaymentMethodId(method.id) })] })) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", onClick: () => handleDelete(method.id) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnRemove", defaultMessage: "ui.userPaymentMethods.btnRemove" }) })) }))] }, index));
335
+ }), hasMore && (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] })] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", mb: 2 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.noPaymentMethods", defaultMessage: "ui.userPaymentMethods.noPaymentMethods" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "contained", onClick: handleOpenAddPaymentMethodDialog }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.btnAdd", defaultMessage: "ui.userPaymentMethods.btnAdd" }) }))] })), openDeleteDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openDeleteDialog, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteTitle", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteTitle" }), btnConfirm: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userPaymentMethods.dialog.confirmDeleteDescription", defaultMessage: "ui.userPaymentMethods.dialog.confirmDeleteDescription" }), onConfirm: handleConfirmDelete, onClose: handleConfirmClose, isUpdating: isDeletingPaymentMethod })), editPaymentMethodDialogOpen && editPaymentMethod !== null && ((0, jsx_runtime_1.jsx)(UserChangeAddressDialog_1.default, { open: true, defaultAddress: editPaymentMethod, handleAddress: handleAddress })), addPaymentMethodDialogOpen && (0, jsx_runtime_1.jsx)(UserAddPaymentMethodDialog_1.default, { open: true, handlePaymentMethod: handlePaymentMethodSuccess })] })) })));
337
336
  };
338
- exports.default = (0, react_1.forwardRef)(UserPaymentMethods);
337
+ exports.default = UserPaymentMethods;
@@ -8,7 +8,6 @@ const react_intl_1 = require("react-intl");
8
8
  const react_core_1 = require("@selfcommunity/react-core");
9
9
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
10
10
  const system_1 = require("@mui/system");
11
- const lab_1 = require("@mui/lab");
12
11
  const notistack_1 = require("notistack");
13
12
  const Errors_1 = require("../../constants/Errors");
14
13
  const utils_1 = require("@selfcommunity/utils");
@@ -79,6 +78,6 @@ function UserProfileBlocked(inProps) {
79
78
  if (!scUser || !scUserContext.user || loadingBlockedBy) {
80
79
  return null;
81
80
  }
82
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, {}), !isMe && blockedBy && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ variant: "contained", className: classes.button, loading: scUserContext.managers.blockedUsers.loading, disabled: scUserContext.managers.blockedUsers.loading, onClick: handleBlock }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.unBlockUser", defaultMessage: "ui.userProfileBlocked.unBlockUser" }) }))] }))] })));
81
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, {}), !isMe && blockedBy && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUserBy", defaultMessage: "ui.userProfileBlocked.blockedUserBy" }) }))), !isMe && scUserContext.managers.blockedUsers.isBlocked(scUser) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.info }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.blockedUser", defaultMessage: "ui.userProfileBlocked.blockedUser" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", className: classes.button, loading: scUserContext.managers.blockedUsers.loading, disabled: scUserContext.managers.blockedUsers.loading, onClick: handleBlock }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileBlocked.unBlockUser", defaultMessage: "ui.userProfileBlocked.unBlockUser" }) }))] }))] })));
83
82
  }
84
83
  exports.default = UserProfileBlocked;
@@ -12,7 +12,6 @@ const utils_1 = require("@selfcommunity/utils");
12
12
  const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog"));
13
13
  const PasswordTextField_1 = tslib_1.__importDefault(require("../../../shared/PasswordTextField"));
14
14
  const EmailTextField_1 = tslib_1.__importDefault(require("../../../shared/EmailTextField"));
15
- const lab_1 = require("@mui/lab");
16
15
  const notistack_1 = require("notistack");
17
16
  const constants_1 = require("../constants");
18
17
  const messages = (0, react_intl_1.defineMessages)({
@@ -131,7 +130,7 @@ function AccountCredentials(props) {
131
130
  e.stopPropagation();
132
131
  setIsSubmitting(true);
133
132
  api_services_1.UserService.changeUserMail(user === null || user === void 0 ? void 0 : user.id, field.email, !skipEmailValidation, !skipEmailValidation)
134
- .then((res) => {
133
+ .then(() => {
135
134
  setIsEditing(false);
136
135
  setIsSubmitting(false);
137
136
  if (skipEmailValidation) {
@@ -156,16 +155,20 @@ function AccountCredentials(props) {
156
155
  if (!user) {
157
156
  return;
158
157
  }
159
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.email }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.email", defaultMessage: "ui.userProfileEditAccountCredentials.email" }) })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSubmitting ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(EmailTextField_1.default, { name: "email", disabled: !isEditing || isSubmitting, size: "small", value: field.email, onChange: handleChange, onBlur: handleEmailBlur, error: Boolean(error.email), helperText: error.email && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.email.error.${error.email}`, defaultMessage: `ui.userProfileEditAccountCredentials.email.error.${error.email}` })), InputProps: {
160
- endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: !isEditing ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => setIsEditing(true), edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))) : error.email ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "error" }, { children: "error" }))) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleSubmitEmail, edge: "end", color: "primary", disabled: !field.email || error.email }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) }))) })))
161
- } }) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.password }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.passwordLabel", defaultMessage: "ui.userProfileEditAccountCredentials.passwordLabel" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setOpenChangePasswordDialog(true), sx: { mb: 1 } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] }), openChangePasswordDialog && ((0, jsx_runtime_1.jsxs)(PasswordDialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.changePasswordTitle), open: openChangePasswordDialog, onClose: handleCloseDialog }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { className: classes.formField, name: "password", disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.password", defaultMessage: "ui.userProfileEditAccountCredentials.password" }), size: "medium", value: field.password, onChange: handleChange, error: Boolean(error.password), helperText: error.password && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.password.error.${error.password}`, defaultMessage: `ui.userProfileEditAccountCredentials.password.error.${error.password}` })) }), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "newPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword" }), size: "medium", value: field.newPassword, onChange: handleChange, error: Boolean(error.newPassword), helperText: error.newPassword && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}`, defaultMessage: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}` })), InputProps: {
162
- endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "info", onClick: handlePopoverOpen, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "info" }) })) })))
158
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.email }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.email", defaultMessage: "ui.userProfileEditAccountCredentials.email" }) })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isSubmitting ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(EmailTextField_1.default, { name: "email", disabled: !isEditing || isSubmitting, size: "small", value: field.email, onChange: handleChange, onBlur: handleEmailBlur, error: Boolean(error.email), helperText: error.email && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.email.error.${error.email}`, defaultMessage: `ui.userProfileEditAccountCredentials.email.error.${error.email}` })), slotProps: {
159
+ input: {
160
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: !isEditing ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => setIsEditing(true), edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "edit" }) }))) : error.email ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ color: "error" }, { children: "error" }))) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleSubmitEmail, edge: "end", color: "primary", disabled: !field.email || error.email }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "check" }) }))) })))
161
+ }
162
+ } }) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.password }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.passwordLabel", defaultMessage: "ui.userProfileEditAccountCredentials.passwordLabel" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", onClick: () => setOpenChangePasswordDialog(true), sx: { mb: 1 } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] }), openChangePasswordDialog && ((0, jsx_runtime_1.jsxs)(PasswordDialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.changePasswordTitle), open: openChangePasswordDialog, onClose: handleCloseDialog }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { className: classes.formField, name: "password", disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.password", defaultMessage: "ui.userProfileEditAccountCredentials.password" }), size: "medium", value: field.password, onChange: handleChange, error: Boolean(error.password), helperText: error.password && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.password.error.${error.password}`, defaultMessage: `ui.userProfileEditAccountCredentials.password.error.${error.password}` })) }), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "newPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword" }), size: "medium", value: field.newPassword, onChange: handleChange, error: Boolean(error.newPassword), helperText: error.newPassword && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}`, defaultMessage: `ui.userProfileEditAccountCredentials.newPassword.error.${error.newPassword}` })), slotProps: {
163
+ input: {
164
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ "aria-label": "info", onClick: handlePopoverOpen, edge: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "info" }) })) })))
165
+ }
163
166
  } }), (0, jsx_runtime_1.jsx)(material_1.Popover, Object.assign({ open: open, anchorEl: anchorEl, anchorOrigin: {
164
167
  vertical: 'center',
165
168
  horizontal: 'left'
166
169
  }, transformOrigin: {
167
170
  vertical: 'center',
168
171
  horizontal: 'right'
169
- }, onClose: handlePopoverClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: 'span', sx: { whiteSpace: 'pre-line' } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword.info", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword.info" }) })) })) })), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "confirmPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.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 })] })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ className: classes.confirmChangeButton, loading: isSubmittingPassword, disabled: !field.confirmPassword || Boolean(error.confirmPassword) || Boolean(error.password) || Boolean(error.newPassword), variant: "contained", onClick: handleSubmitPassword }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] })))] })));
172
+ }, onClose: handlePopoverClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { p: '10px' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", sx: { whiteSpace: 'pre-line' } }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.newPassword.info", defaultMessage: "ui.userProfileEditAccountCredentials.newPassword.info" }) })) })) })), (0, jsx_runtime_1.jsx)(PasswordTextField_1.default, { name: "confirmPassword", className: classes.formField, disabled: isSubmittingPassword, label: (0, jsx_runtime_1.jsx)(react_intl_1.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 })] })), (0, jsx_runtime_1.jsx)(material_1.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: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userProfileEditAccountCredentials.changePassword", defaultMessage: "ui.userProfileEditAccountCredentials.changePassword" }) }))] })))] })));
170
173
  }
171
174
  exports.default = AccountCredentials;
@@ -18,9 +18,8 @@ const types_1 = require("../../../types");
18
18
  const MetadataField_1 = tslib_1.__importDefault(require("../../../shared/MetadataField"));
19
19
  const Errors_1 = require("../../../constants/Errors");
20
20
  const date_fns_1 = require("date-fns");
21
- const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
22
- const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
23
- const lab_1 = require("@mui/lab");
21
+ const it_1 = require("date-fns/locale/it");
22
+ const en_US_1 = require("date-fns/locale/en-US");
24
23
  const notistack_1 = require("notistack");
25
24
  const constants_1 = require("../constants");
26
25
  const messages = (0, react_intl_1.defineMessages)({
@@ -70,9 +69,7 @@ function PublicInfo(props) {
70
69
  return null;
71
70
  }, [scPreferences.preferences]);
72
71
  // STATE
73
- const theme = (0, material_1.useTheme)();
74
- const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
75
- const [user, setUser] = (0, react_1.useState)();
72
+ const [user, setUser] = (0, react_1.useState)(null);
76
73
  const [error, setError] = (0, react_1.useState)({});
77
74
  const [editing, setEditing] = (0, react_1.useState)([]);
78
75
  const [saving, setSaving] = (0, react_1.useState)([]);
@@ -159,10 +156,10 @@ function PublicInfo(props) {
159
156
  case types_1.SCUserProfileFields.DATE_JOINED:
160
157
  return null;
161
158
  case types_1.SCUserProfileFields.DATE_OF_BIRTH:
162
- return ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.default : en_US_1.default }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { label: intl.formatMessage({
159
+ return ((0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns_1.AdapterDateFns, adapterLocale: scContext.settings.locale.default === 'it' ? it_1.it : en_US_1.enUS }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.DatePicker, { label: intl.formatMessage({
163
160
  id: `ui.userInfo.${(0, utils_1.camelCase)(field)}`,
164
161
  defaultMessage: `ui.userInfo.${field}`
165
- }), defaultValue: user[field] ? (0, date_fns_1.parseISO)(user[field]) : null, minDate: DATEPICKER_MINDATE, onChange: (newValue) => {
162
+ }), defaultValue: user[field] ? new Date(user[field]) : null, minDate: DATEPICKER_MINDATE, onChange: (newValue) => {
166
163
  const u = user;
167
164
  const field = types_1.SCUserProfileFields.DATE_OF_BIRTH;
168
165
  const camelField = (0, utils_1.camelCase)(field);
@@ -184,13 +181,8 @@ function PublicInfo(props) {
184
181
  }
185
182
  setUser(u);
186
183
  setEditing([...editing, field]);
187
- }, disableFuture: true, disabled: isSaving, slots: {
188
- inputAdornment: (params) => {
189
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
190
- // @ts-ignore
191
- const _a = params.children.props, { children } = _a, rest = tslib_1.__rest(_a, ["children"]);
192
- return ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: 'end' }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({}, rest, { children: children })), isSaving && (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 10 })] })));
193
- }
184
+ }, disableFuture: true, disabled: isSaving, enableAccessibleFieldDOMStructure: false, slots: {
185
+ openPickerButton: (params) => ((0, jsx_runtime_1.jsxs)(material_1.IconButton, Object.assign({}, params, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }), isSaving && (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 10 })] })))
194
186
  },
195
187
  // onAccept={isMobile ? handleSave(SCUserProfileFields.DATE_OF_BIRTH) : null}
196
188
  slotProps: {
@@ -198,10 +190,7 @@ function PublicInfo(props) {
198
190
  className: classes.field,
199
191
  fullWidth: true,
200
192
  variant: 'outlined',
201
- helperText: _error || null,
202
- InputProps: {
203
- endAdornment: isMobile && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ disabled: !isEditing }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) })), isSaving ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 10 }) : null] }))
204
- }
193
+ helperText: _error || null
205
194
  }
206
195
  } }) }), field));
207
196
  case types_1.SCUserProfileFields.BIO:
@@ -233,6 +222,6 @@ function PublicInfo(props) {
233
222
  }
234
223
  return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [startActions, _fields.map((field) => {
235
224
  return renderField(field);
236
- }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ className: classes.btnSave, fullWidth: true, variant: "contained", color: "secondary", onClick: handleSave, loading: saving.length > 0, disabled: saving.length > 0 || !editing.length || Object.keys(error).length > 0 }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.userInfo.button.save', defaultMessage: 'ui.userInfo.button.save' }) })), endActions] })));
225
+ }), (0, jsx_runtime_1.jsx)(material_1.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: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userInfo.button.save", defaultMessage: "ui.userInfo.button.save" }) })), endActions] })));
237
226
  }
238
227
  exports.default = PublicInfo;