@selfcommunity/react-ui 0.11.0-alpha.67 → 0.11.0-alpha.68

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 (627) hide show
  1. package/lib/cjs/assets/checkout/general.d.ts +2 -0
  2. package/lib/cjs/assets/checkout/general.js +3 -0
  3. package/lib/cjs/assets/checkout/success.d.ts +2 -0
  4. package/lib/cjs/assets/checkout/success.js +3 -0
  5. package/lib/cjs/assets/custom/formazione.d.ts +2 -0
  6. package/lib/cjs/assets/custom/formazione.js +3 -0
  7. package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +20 -2
  8. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.d.ts +61 -0
  9. package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +106 -0
  10. package/lib/cjs/components/AcceptRequestUserGroupButton/index.d.ts +3 -0
  11. package/lib/cjs/components/AcceptRequestUserGroupButton/index.js +5 -0
  12. package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  13. package/lib/cjs/components/BottomNavigation/BottomNavigation.js +2 -2
  14. package/lib/cjs/components/BuyButton/BuyButton.d.ts +73 -0
  15. package/lib/cjs/components/BuyButton/BuyButton.js +196 -0
  16. package/lib/cjs/components/BuyButton/index.d.ts +3 -0
  17. package/lib/cjs/components/BuyButton/index.js +5 -0
  18. package/lib/cjs/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +5 -3
  19. package/lib/cjs/components/Category/Category.d.ts +5 -0
  20. package/lib/cjs/components/Category/Category.js +5 -5
  21. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.d.ts +4 -0
  22. package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +32 -6
  23. package/lib/cjs/components/CategoryHeader/CategoryHeader.js +6 -1
  24. package/lib/cjs/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +9 -2
  25. package/lib/cjs/components/Checkout/Checkout.d.ts +14 -0
  26. package/lib/cjs/components/Checkout/Checkout.js +131 -0
  27. package/lib/cjs/components/Checkout/CheckoutHeaderInfoWidget.d.ts +8 -0
  28. package/lib/cjs/components/Checkout/CheckoutHeaderInfoWidget.js +34 -0
  29. package/lib/cjs/components/Checkout/Skeleton.d.ts +21 -0
  30. package/lib/cjs/components/Checkout/Skeleton.js +87 -0
  31. package/lib/cjs/components/Checkout/constants.d.ts +1 -0
  32. package/lib/cjs/components/Checkout/constants.js +4 -0
  33. package/lib/cjs/components/Checkout/index.d.ts +3 -0
  34. package/lib/cjs/components/Checkout/index.js +5 -0
  35. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.d.ts +10 -0
  36. package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +171 -0
  37. package/lib/cjs/components/CheckoutReturnDialog/index.d.ts +3 -0
  38. package/lib/cjs/components/CheckoutReturnDialog/index.js +5 -0
  39. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.d.ts +8 -0
  40. package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +69 -0
  41. package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +27 -0
  42. package/lib/cjs/components/CommunityPaywalls/Skeleton.js +53 -0
  43. package/lib/cjs/components/CommunityPaywalls/constants.d.ts +1 -0
  44. package/lib/cjs/components/CommunityPaywalls/constants.js +4 -0
  45. package/lib/cjs/components/CommunityPaywalls/index.d.ts +4 -0
  46. package/lib/cjs/components/CommunityPaywalls/index.js +8 -0
  47. package/lib/cjs/components/Composer/Composer.d.ts +1 -0
  48. package/lib/cjs/components/Composer/Composer.js +82 -18
  49. package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +2 -2
  50. package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +2 -2
  51. package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  52. package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +20 -13
  53. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.d.ts +9 -0
  54. package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +61 -0
  55. package/lib/cjs/components/Composer/Layer/ScheduledLayer/index.d.ts +3 -0
  56. package/lib/cjs/components/Composer/Layer/ScheduledLayer/index.js +5 -0
  57. package/lib/cjs/components/ComposerIconButton/ComposerIconButton.js +2 -1
  58. package/lib/cjs/components/ConnectionUserButton/ConnectionUserButton.js +6 -0
  59. package/lib/cjs/components/Course/Course.d.ts +5 -0
  60. package/lib/cjs/components/Course/Course.js +3 -3
  61. package/lib/cjs/components/CourseDashboard/Header.d.ts +2 -2
  62. package/lib/cjs/components/CourseDashboard/Header.js +8 -1
  63. package/lib/cjs/components/CourseDashboard/Student.d.ts +2 -2
  64. package/lib/cjs/components/CourseDashboard/Student.js +15 -4
  65. package/lib/cjs/components/CourseForm/CourseForm.d.ts +5 -0
  66. package/lib/cjs/components/CourseForm/CourseForm.js +36 -5
  67. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.d.ts +1 -6
  68. package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +9 -7
  69. package/lib/cjs/components/CreateCourseButton/CreateCourseButton.js +1 -1
  70. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.d.ts +10 -0
  71. package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +144 -0
  72. package/lib/cjs/components/CreatePaymentProductForm/constants.d.ts +1 -0
  73. package/lib/cjs/components/CreatePaymentProductForm/constants.js +4 -0
  74. package/lib/cjs/components/CreatePaymentProductForm/index.d.ts +3 -0
  75. package/lib/cjs/components/CreatePaymentProductForm/index.js +5 -0
  76. package/lib/cjs/components/EditEventButton/EditEventButton.js +1 -0
  77. package/lib/cjs/components/Editor/Editor.d.ts +1 -1
  78. package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
  79. package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
  80. package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
  81. package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
  82. package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
  83. package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
  84. package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  85. package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  86. package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
  87. package/lib/cjs/components/Event/Event.d.ts +5 -0
  88. package/lib/cjs/components/Event/Event.js +2 -2
  89. package/lib/cjs/components/EventForm/EventForm.js +47 -16
  90. package/lib/cjs/components/EventForm/types.d.ts +8 -5
  91. package/lib/cjs/components/EventFormDialog/EventFormDialog.js +7 -1
  92. package/lib/cjs/components/EventHeader/EventHeader.js +12 -3
  93. package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +27 -4
  94. package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  95. package/lib/cjs/components/EventMembersWidget/EventMembersWidget.js +11 -2
  96. package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +23 -13
  97. package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +18 -7
  98. package/lib/cjs/components/Feed/Feed.d.ts +2 -2
  99. package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
  100. package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -1
  101. package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +2 -1
  102. package/lib/cjs/components/FeedObject/FeedObject.js +16 -6
  103. package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -1
  104. package/lib/cjs/components/FeedObject/Poll/Poll.js +1 -1
  105. package/lib/cjs/components/Group/Group.d.ts +6 -1
  106. package/lib/cjs/components/Group/Group.js +3 -3
  107. package/lib/cjs/components/GroupForm/GroupForm.js +37 -7
  108. package/lib/cjs/components/GroupHeader/GroupHeader.js +10 -2
  109. package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +3 -1
  110. package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +7 -2
  111. package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +6 -4
  112. package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -2
  113. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +3 -8
  114. package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +30 -8
  115. package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.js +3 -2
  116. package/lib/cjs/components/LiveStreamForm/types.d.ts +3 -3
  117. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
  118. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
  119. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
  120. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
  121. package/lib/cjs/components/LiveStreamRoom/types.d.ts +1 -1
  122. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +1 -0
  123. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +42 -4
  124. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  125. package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  126. package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +6 -0
  127. package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +1 -1
  128. package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +28 -5
  129. package/lib/cjs/components/NavigationToolbar/NavigationToolbar.js +8 -3
  130. package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +1 -1
  131. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.d.ts +6 -0
  132. package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +40 -0
  133. package/lib/cjs/components/PaymentDetailDialog/index.d.ts +3 -0
  134. package/lib/cjs/components/PaymentDetailDialog/index.js +5 -0
  135. package/lib/cjs/components/PaymentOrder/PaymentOrder.d.ts +10 -0
  136. package/lib/cjs/components/PaymentOrder/PaymentOrder.js +80 -0
  137. package/lib/cjs/components/PaymentOrder/Skeleton.d.ts +30 -0
  138. package/lib/cjs/components/PaymentOrder/Skeleton.js +61 -0
  139. package/lib/cjs/components/PaymentOrder/constants.d.ts +1 -0
  140. package/lib/cjs/components/PaymentOrder/constants.js +4 -0
  141. package/lib/cjs/components/PaymentOrder/index.d.ts +3 -0
  142. package/lib/cjs/components/PaymentOrder/index.js +5 -0
  143. package/lib/cjs/components/PaymentOrderPdfButton/PaymentOrderPdfButton.d.ts +52 -0
  144. package/lib/cjs/components/PaymentOrderPdfButton/PaymentOrderPdfButton.js +74 -0
  145. package/lib/cjs/components/PaymentOrderPdfButton/index.d.ts +3 -0
  146. package/lib/cjs/components/PaymentOrderPdfButton/index.js +5 -0
  147. package/lib/cjs/components/PaymentOrders/PaymentOrders.d.ts +17 -0
  148. package/lib/cjs/components/PaymentOrders/PaymentOrders.js +264 -0
  149. package/lib/cjs/components/PaymentOrders/index.d.ts +3 -0
  150. package/lib/cjs/components/PaymentOrders/index.js +5 -0
  151. package/lib/cjs/components/PaymentProduct/PaymentProduct.d.ts +18 -0
  152. package/lib/cjs/components/PaymentProduct/PaymentProduct.js +48 -0
  153. package/lib/cjs/components/PaymentProduct/Skeleton.d.ts +25 -0
  154. package/lib/cjs/components/PaymentProduct/Skeleton.js +55 -0
  155. package/lib/cjs/components/PaymentProduct/constants.d.ts +1 -0
  156. package/lib/cjs/components/PaymentProduct/constants.js +4 -0
  157. package/lib/cjs/components/PaymentProduct/index.d.ts +3 -0
  158. package/lib/cjs/components/PaymentProduct/index.js +5 -0
  159. package/lib/cjs/components/PaymentProductPrice/PaymentProductPrice.d.ts +15 -0
  160. package/lib/cjs/components/PaymentProductPrice/PaymentProductPrice.js +61 -0
  161. package/lib/cjs/components/PaymentProductPrice/Skeleton.d.ts +21 -0
  162. package/lib/cjs/components/PaymentProductPrice/Skeleton.js +46 -0
  163. package/lib/cjs/components/PaymentProductPrice/constants.d.ts +1 -0
  164. package/lib/cjs/components/PaymentProductPrice/constants.js +4 -0
  165. package/lib/cjs/components/PaymentProductPrice/index.d.ts +3 -0
  166. package/lib/cjs/components/PaymentProductPrice/index.js +5 -0
  167. package/lib/cjs/components/PaymentProducts/PaymentProducts.d.ts +11 -0
  168. package/lib/cjs/components/PaymentProducts/PaymentProducts.js +76 -0
  169. package/lib/cjs/components/PaymentProducts/Skeleton.d.ts +21 -0
  170. package/lib/cjs/components/PaymentProducts/Skeleton.js +46 -0
  171. package/lib/cjs/components/PaymentProducts/constants.d.ts +1 -0
  172. package/lib/cjs/components/PaymentProducts/constants.js +4 -0
  173. package/lib/cjs/components/PaymentProducts/index.d.ts +3 -0
  174. package/lib/cjs/components/PaymentProducts/index.js +5 -0
  175. package/lib/cjs/components/Paywalls/Paywalls.d.ts +10 -0
  176. package/lib/cjs/components/Paywalls/Paywalls.js +94 -0
  177. package/lib/cjs/components/Paywalls/Skeleton.d.ts +21 -0
  178. package/lib/cjs/components/Paywalls/Skeleton.js +46 -0
  179. package/lib/cjs/components/Paywalls/constants.d.ts +1 -0
  180. package/lib/cjs/components/Paywalls/constants.js +4 -0
  181. package/lib/cjs/components/Paywalls/index.d.ts +3 -0
  182. package/lib/cjs/components/Paywalls/index.js +5 -0
  183. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.d.ts +13 -0
  184. package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +252 -0
  185. package/lib/cjs/components/PaywallsConfigurator/Skeleton.d.ts +21 -0
  186. package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +46 -0
  187. package/lib/cjs/components/PaywallsConfigurator/constants.d.ts +5 -0
  188. package/lib/cjs/components/PaywallsConfigurator/constants.js +9 -0
  189. package/lib/cjs/components/PaywallsConfigurator/index.d.ts +4 -0
  190. package/lib/cjs/components/PaywallsConfigurator/index.js +8 -0
  191. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.d.ts +8 -0
  192. package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +43 -0
  193. package/lib/cjs/components/PaywallsDialog/index.d.ts +3 -0
  194. package/lib/cjs/components/PaywallsDialog/index.js +5 -0
  195. package/lib/cjs/components/PdfPreview/PdfPreview.d.ts +8 -0
  196. package/lib/cjs/components/PdfPreview/PdfPreview.js +92 -0
  197. package/lib/cjs/components/PdfPreview/Skeleton.d.ts +5 -0
  198. package/lib/cjs/components/PdfPreview/Skeleton.js +38 -0
  199. package/lib/cjs/components/PdfPreview/index.d.ts +3 -0
  200. package/lib/cjs/components/PdfPreview/index.js +5 -0
  201. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.d.ts +11 -0
  202. package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +63 -0
  203. package/lib/cjs/components/PdfPreviewDialog/index.d.ts +3 -0
  204. package/lib/cjs/components/PdfPreviewDialog/index.js +5 -0
  205. package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -1
  206. package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  207. package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +4 -4
  208. package/lib/cjs/components/ToastNotifications/ToastNotifications.js +2 -10
  209. package/lib/cjs/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.d.ts +41 -0
  210. package/lib/cjs/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.js +94 -0
  211. package/lib/cjs/components/UserAddPaymentMethodDialog/constants.d.ts +1 -0
  212. package/lib/cjs/components/UserAddPaymentMethodDialog/constants.js +4 -0
  213. package/lib/cjs/components/UserAddPaymentMethodDialog/index.d.ts +3 -0
  214. package/lib/cjs/components/UserAddPaymentMethodDialog/index.js +5 -0
  215. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.d.ts +40 -0
  216. package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +143 -0
  217. package/lib/cjs/components/UserAddPaymentMethodForm/constants.d.ts +1 -0
  218. package/lib/cjs/components/UserAddPaymentMethodForm/constants.js +4 -0
  219. package/lib/cjs/components/UserAddPaymentMethodForm/index.d.ts +3 -0
  220. package/lib/cjs/components/UserAddPaymentMethodForm/index.js +5 -0
  221. package/lib/cjs/components/UserBillingInfo/Skeleton.d.ts +25 -0
  222. package/lib/cjs/components/UserBillingInfo/Skeleton.js +12 -0
  223. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.d.ts +35 -0
  224. package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +492 -0
  225. package/lib/cjs/components/UserBillingInfo/constants.d.ts +1 -0
  226. package/lib/cjs/components/UserBillingInfo/constants.js +4 -0
  227. package/lib/cjs/components/UserBillingInfo/index.d.ts +4 -0
  228. package/lib/cjs/components/UserBillingInfo/index.js +8 -0
  229. package/lib/cjs/components/UserBillingInfo/reducer.d.ts +77 -0
  230. package/lib/cjs/components/UserBillingInfo/reducer.js +96 -0
  231. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.d.ts +44 -0
  232. package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +85 -0
  233. package/lib/cjs/components/UserChangeAddressDialog/constants.d.ts +1 -0
  234. package/lib/cjs/components/UserChangeAddressDialog/constants.js +4 -0
  235. package/lib/cjs/components/UserChangeAddressDialog/index.d.ts +3 -0
  236. package/lib/cjs/components/UserChangeAddressDialog/index.js +5 -0
  237. package/lib/cjs/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +6 -6
  238. package/lib/cjs/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -5
  239. package/lib/cjs/components/UserConnectionsWidget/UserConnectionsWidget.js +8 -5
  240. package/lib/cjs/components/UserCounters/UserCounters.js +20 -17
  241. package/lib/cjs/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +9 -6
  242. package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +15 -0
  243. package/lib/cjs/components/UserPaymentMethods/Skeleton.js +49 -0
  244. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +19 -0
  245. package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +338 -0
  246. package/lib/cjs/components/UserPaymentMethods/constants.d.ts +1 -0
  247. package/lib/cjs/components/UserPaymentMethods/constants.js +4 -0
  248. package/lib/cjs/components/UserPaymentMethods/index.d.ts +4 -0
  249. package/lib/cjs/components/UserPaymentMethods/index.js +8 -0
  250. package/lib/cjs/components/UserPaymentMethodsPortal/Skeleton.d.ts +22 -0
  251. package/lib/cjs/components/UserPaymentMethodsPortal/Skeleton.js +37 -0
  252. package/lib/cjs/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.d.ts +44 -0
  253. package/lib/cjs/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.js +103 -0
  254. package/lib/cjs/components/UserPaymentMethodsPortal/constants.d.ts +1 -0
  255. package/lib/cjs/components/UserPaymentMethodsPortal/constants.js +4 -0
  256. package/lib/cjs/components/UserPaymentMethodsPortal/index.d.ts +4 -0
  257. package/lib/cjs/components/UserPaymentMethodsPortal/index.js +8 -0
  258. package/lib/cjs/components/UserSuggestionWidget/UserSuggestionWidget.js +7 -5
  259. package/lib/cjs/constants/Billing.d.ts +10 -0
  260. package/lib/cjs/constants/Billing.js +60 -0
  261. package/lib/cjs/constants/ContributionsActionsMenu.d.ts +1 -0
  262. package/lib/cjs/constants/ContributionsActionsMenu.js +2 -1
  263. package/lib/cjs/constants/Country.d.ts +5 -0
  264. package/lib/cjs/constants/Country.js +271 -0
  265. package/lib/cjs/constants/DefaultDrawerContent.d.ts +1 -0
  266. package/lib/cjs/constants/DefaultDrawerContent.js +4 -0
  267. package/lib/cjs/constants/Payments.d.ts +4 -0
  268. package/lib/cjs/constants/Payments.js +7 -0
  269. package/lib/cjs/index.d.ts +23 -1
  270. package/lib/cjs/index.js +54 -2
  271. package/lib/cjs/shared/AutoPlayer/index.d.ts +0 -5
  272. package/lib/cjs/shared/AutoPlayer/index.js +5 -4
  273. package/lib/cjs/shared/ContributionActionsMenu/index.d.ts +4 -0
  274. package/lib/cjs/shared/ContributionActionsMenu/index.js +56 -5
  275. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
  276. package/lib/cjs/shared/CourseUsersTable/SeeProgressButton.js +3 -1
  277. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.d.ts +44 -0
  278. package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +53 -0
  279. package/lib/cjs/shared/HiddenPurchasableContent/index.d.ts +3 -0
  280. package/lib/cjs/shared/HiddenPurchasableContent/index.js +5 -0
  281. package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
  282. package/lib/cjs/shared/Media/File/DisplayComponent.d.ts +2 -1
  283. package/lib/cjs/shared/Media/File/DisplayComponent.js +58 -32
  284. package/lib/cjs/shared/Media/File/DocComponent.d.ts +10 -0
  285. package/lib/cjs/shared/Media/File/DocComponent.js +34 -0
  286. package/lib/cjs/shared/Media/File/PreviewComponent.d.ts +2 -2
  287. package/lib/cjs/shared/Media/File/PreviewComponent.js +15 -17
  288. package/lib/cjs/shared/Media/File/TriggerButton.js +14 -1
  289. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  290. package/lib/cjs/shared/Media/File/filter.d.ts +2 -2
  291. package/lib/cjs/shared/Media/File/filter.js +5 -1
  292. package/lib/cjs/shared/Media/File/index.js +2 -2
  293. package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  294. package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
  295. package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
  296. package/lib/cjs/shared/Tags/index.js +7 -3
  297. package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
  298. package/lib/cjs/types/composer.d.ts +1 -1
  299. package/lib/cjs/types/index.d.ts +2 -1
  300. package/lib/cjs/types/index.js +5 -1
  301. package/lib/cjs/types/payment.d.ts +25 -0
  302. package/lib/cjs/types/payment.js +29 -0
  303. package/lib/cjs/utils/address.d.ts +10 -0
  304. package/lib/cjs/utils/address.js +24 -0
  305. package/lib/cjs/utils/checkout.d.ts +2 -0
  306. package/lib/cjs/utils/checkout.js +23 -0
  307. package/lib/cjs/utils/payment.d.ts +17 -0
  308. package/lib/cjs/utils/payment.js +69 -0
  309. package/lib/esm/assets/checkout/general.d.ts +2 -0
  310. package/lib/esm/assets/checkout/general.js +1 -0
  311. package/lib/esm/assets/checkout/success.d.ts +2 -0
  312. package/lib/esm/assets/checkout/success.js +1 -0
  313. package/lib/esm/assets/custom/formazione.d.ts +2 -0
  314. package/lib/esm/assets/custom/formazione.js +1 -0
  315. package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +20 -2
  316. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.d.ts +61 -0
  317. package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +103 -0
  318. package/lib/esm/components/AcceptRequestUserGroupButton/index.d.ts +3 -0
  319. package/lib/esm/components/AcceptRequestUserGroupButton/index.js +2 -0
  320. package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  321. package/lib/esm/components/BottomNavigation/BottomNavigation.js +2 -2
  322. package/lib/esm/components/BuyButton/BuyButton.d.ts +73 -0
  323. package/lib/esm/components/BuyButton/BuyButton.js +193 -0
  324. package/lib/esm/components/BuyButton/index.d.ts +3 -0
  325. package/lib/esm/components/BuyButton/index.js +2 -0
  326. package/lib/esm/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +6 -4
  327. package/lib/esm/components/Category/Category.d.ts +5 -0
  328. package/lib/esm/components/Category/Category.js +5 -5
  329. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.d.ts +4 -0
  330. package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +34 -8
  331. package/lib/esm/components/CategoryHeader/CategoryHeader.js +7 -2
  332. package/lib/esm/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +9 -2
  333. package/lib/esm/components/Checkout/Checkout.d.ts +14 -0
  334. package/lib/esm/components/Checkout/Checkout.js +128 -0
  335. package/lib/esm/components/Checkout/CheckoutHeaderInfoWidget.d.ts +8 -0
  336. package/lib/esm/components/Checkout/CheckoutHeaderInfoWidget.js +30 -0
  337. package/lib/esm/components/Checkout/Skeleton.d.ts +21 -0
  338. package/lib/esm/components/Checkout/Skeleton.js +84 -0
  339. package/lib/esm/components/Checkout/constants.d.ts +1 -0
  340. package/lib/esm/components/Checkout/constants.js +1 -0
  341. package/lib/esm/components/Checkout/index.d.ts +3 -0
  342. package/lib/esm/components/Checkout/index.js +2 -0
  343. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.d.ts +10 -0
  344. package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +168 -0
  345. package/lib/esm/components/CheckoutReturnDialog/index.d.ts +3 -0
  346. package/lib/esm/components/CheckoutReturnDialog/index.js +2 -0
  347. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.d.ts +8 -0
  348. package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +66 -0
  349. package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +27 -0
  350. package/lib/esm/components/CommunityPaywalls/Skeleton.js +50 -0
  351. package/lib/esm/components/CommunityPaywalls/constants.d.ts +1 -0
  352. package/lib/esm/components/CommunityPaywalls/constants.js +1 -0
  353. package/lib/esm/components/CommunityPaywalls/index.d.ts +4 -0
  354. package/lib/esm/components/CommunityPaywalls/index.js +4 -0
  355. package/lib/esm/components/Composer/Composer.d.ts +1 -0
  356. package/lib/esm/components/Composer/Composer.js +82 -18
  357. package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +2 -2
  358. package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +2 -2
  359. package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
  360. package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +20 -13
  361. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.d.ts +9 -0
  362. package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +59 -0
  363. package/lib/esm/components/Composer/Layer/ScheduledLayer/index.d.ts +3 -0
  364. package/lib/esm/components/Composer/Layer/ScheduledLayer/index.js +2 -0
  365. package/lib/esm/components/ComposerIconButton/ComposerIconButton.js +2 -1
  366. package/lib/esm/components/ConnectionUserButton/ConnectionUserButton.js +6 -0
  367. package/lib/esm/components/Course/Course.d.ts +5 -0
  368. package/lib/esm/components/Course/Course.js +3 -3
  369. package/lib/esm/components/CourseDashboard/Header.d.ts +2 -2
  370. package/lib/esm/components/CourseDashboard/Header.js +10 -3
  371. package/lib/esm/components/CourseDashboard/Student.d.ts +2 -2
  372. package/lib/esm/components/CourseDashboard/Student.js +19 -8
  373. package/lib/esm/components/CourseForm/CourseForm.d.ts +5 -0
  374. package/lib/esm/components/CourseForm/CourseForm.js +38 -7
  375. package/lib/esm/components/CourseJoinButton/CourseJoinButton.d.ts +1 -6
  376. package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +9 -7
  377. package/lib/esm/components/CreateCourseButton/CreateCourseButton.js +1 -1
  378. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.d.ts +10 -0
  379. package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +141 -0
  380. package/lib/esm/components/CreatePaymentProductForm/constants.d.ts +1 -0
  381. package/lib/esm/components/CreatePaymentProductForm/constants.js +1 -0
  382. package/lib/esm/components/CreatePaymentProductForm/index.d.ts +3 -0
  383. package/lib/esm/components/CreatePaymentProductForm/index.js +2 -0
  384. package/lib/esm/components/EditEventButton/EditEventButton.js +1 -0
  385. package/lib/esm/components/Editor/Editor.d.ts +1 -1
  386. package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
  387. package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
  388. package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
  389. package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
  390. package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
  391. package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
  392. package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  393. package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  394. package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
  395. package/lib/esm/components/Event/Event.d.ts +5 -0
  396. package/lib/esm/components/Event/Event.js +2 -2
  397. package/lib/esm/components/EventForm/EventForm.js +49 -18
  398. package/lib/esm/components/EventForm/types.d.ts +8 -5
  399. package/lib/esm/components/EventFormDialog/EventFormDialog.js +7 -1
  400. package/lib/esm/components/EventHeader/EventHeader.js +14 -5
  401. package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +28 -5
  402. package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  403. package/lib/esm/components/EventMembersWidget/EventMembersWidget.js +11 -2
  404. package/lib/esm/components/EventMembersWidget/TabContentComponent.js +14 -4
  405. package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +20 -9
  406. package/lib/esm/components/Feed/Feed.d.ts +2 -2
  407. package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
  408. package/lib/esm/components/FeedObject/Activities/Activities.js +1 -1
  409. package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +2 -1
  410. package/lib/esm/components/FeedObject/FeedObject.js +17 -7
  411. package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +1 -1
  412. package/lib/esm/components/FeedObject/Poll/Poll.js +1 -1
  413. package/lib/esm/components/Group/Group.d.ts +6 -1
  414. package/lib/esm/components/Group/Group.js +3 -3
  415. package/lib/esm/components/GroupForm/GroupForm.js +39 -9
  416. package/lib/esm/components/GroupHeader/GroupHeader.js +12 -4
  417. package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +3 -1
  418. package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +7 -2
  419. package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +6 -4
  420. package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +6 -4
  421. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +3 -8
  422. package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +32 -10
  423. package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.js +3 -2
  424. package/lib/esm/components/LiveStreamForm/types.d.ts +3 -3
  425. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
  426. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
  427. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
  428. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
  429. package/lib/esm/components/LiveStreamRoom/types.d.ts +1 -1
  430. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +1 -0
  431. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +44 -6
  432. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  433. package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  434. package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +6 -0
  435. package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +1 -1
  436. package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +29 -6
  437. package/lib/esm/components/NavigationToolbar/NavigationToolbar.js +8 -3
  438. package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +1 -1
  439. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.d.ts +6 -0
  440. package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +37 -0
  441. package/lib/esm/components/PaymentDetailDialog/index.d.ts +3 -0
  442. package/lib/esm/components/PaymentDetailDialog/index.js +2 -0
  443. package/lib/esm/components/PaymentOrder/PaymentOrder.d.ts +10 -0
  444. package/lib/esm/components/PaymentOrder/PaymentOrder.js +77 -0
  445. package/lib/esm/components/PaymentOrder/Skeleton.d.ts +30 -0
  446. package/lib/esm/components/PaymentOrder/Skeleton.js +58 -0
  447. package/lib/esm/components/PaymentOrder/constants.d.ts +1 -0
  448. package/lib/esm/components/PaymentOrder/constants.js +1 -0
  449. package/lib/esm/components/PaymentOrder/index.d.ts +3 -0
  450. package/lib/esm/components/PaymentOrder/index.js +2 -0
  451. package/lib/esm/components/PaymentOrderPdfButton/PaymentOrderPdfButton.d.ts +52 -0
  452. package/lib/esm/components/PaymentOrderPdfButton/PaymentOrderPdfButton.js +71 -0
  453. package/lib/esm/components/PaymentOrderPdfButton/index.d.ts +3 -0
  454. package/lib/esm/components/PaymentOrderPdfButton/index.js +2 -0
  455. package/lib/esm/components/PaymentOrders/PaymentOrders.d.ts +17 -0
  456. package/lib/esm/components/PaymentOrders/PaymentOrders.js +261 -0
  457. package/lib/esm/components/PaymentOrders/index.d.ts +3 -0
  458. package/lib/esm/components/PaymentOrders/index.js +2 -0
  459. package/lib/esm/components/PaymentProduct/PaymentProduct.d.ts +18 -0
  460. package/lib/esm/components/PaymentProduct/PaymentProduct.js +45 -0
  461. package/lib/esm/components/PaymentProduct/Skeleton.d.ts +25 -0
  462. package/lib/esm/components/PaymentProduct/Skeleton.js +52 -0
  463. package/lib/esm/components/PaymentProduct/constants.d.ts +1 -0
  464. package/lib/esm/components/PaymentProduct/constants.js +1 -0
  465. package/lib/esm/components/PaymentProduct/index.d.ts +3 -0
  466. package/lib/esm/components/PaymentProduct/index.js +2 -0
  467. package/lib/esm/components/PaymentProductPrice/PaymentProductPrice.d.ts +15 -0
  468. package/lib/esm/components/PaymentProductPrice/PaymentProductPrice.js +58 -0
  469. package/lib/esm/components/PaymentProductPrice/Skeleton.d.ts +21 -0
  470. package/lib/esm/components/PaymentProductPrice/Skeleton.js +42 -0
  471. package/lib/esm/components/PaymentProductPrice/constants.d.ts +1 -0
  472. package/lib/esm/components/PaymentProductPrice/constants.js +1 -0
  473. package/lib/esm/components/PaymentProductPrice/index.d.ts +3 -0
  474. package/lib/esm/components/PaymentProductPrice/index.js +2 -0
  475. package/lib/esm/components/PaymentProducts/PaymentProducts.d.ts +11 -0
  476. package/lib/esm/components/PaymentProducts/PaymentProducts.js +73 -0
  477. package/lib/esm/components/PaymentProducts/Skeleton.d.ts +21 -0
  478. package/lib/esm/components/PaymentProducts/Skeleton.js +43 -0
  479. package/lib/esm/components/PaymentProducts/constants.d.ts +1 -0
  480. package/lib/esm/components/PaymentProducts/constants.js +1 -0
  481. package/lib/esm/components/PaymentProducts/index.d.ts +3 -0
  482. package/lib/esm/components/PaymentProducts/index.js +2 -0
  483. package/lib/esm/components/Paywalls/Paywalls.d.ts +10 -0
  484. package/lib/esm/components/Paywalls/Paywalls.js +91 -0
  485. package/lib/esm/components/Paywalls/Skeleton.d.ts +21 -0
  486. package/lib/esm/components/Paywalls/Skeleton.js +43 -0
  487. package/lib/esm/components/Paywalls/constants.d.ts +1 -0
  488. package/lib/esm/components/Paywalls/constants.js +1 -0
  489. package/lib/esm/components/Paywalls/index.d.ts +3 -0
  490. package/lib/esm/components/Paywalls/index.js +2 -0
  491. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.d.ts +13 -0
  492. package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +249 -0
  493. package/lib/esm/components/PaywallsConfigurator/Skeleton.d.ts +21 -0
  494. package/lib/esm/components/PaywallsConfigurator/Skeleton.js +43 -0
  495. package/lib/esm/components/PaywallsConfigurator/constants.d.ts +5 -0
  496. package/lib/esm/components/PaywallsConfigurator/constants.js +6 -0
  497. package/lib/esm/components/PaywallsConfigurator/index.d.ts +4 -0
  498. package/lib/esm/components/PaywallsConfigurator/index.js +4 -0
  499. package/lib/esm/components/PaywallsDialog/PaywallsDialog.d.ts +8 -0
  500. package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +40 -0
  501. package/lib/esm/components/PaywallsDialog/index.d.ts +3 -0
  502. package/lib/esm/components/PaywallsDialog/index.js +2 -0
  503. package/lib/esm/components/PdfPreview/PdfPreview.d.ts +8 -0
  504. package/lib/esm/components/PdfPreview/PdfPreview.js +88 -0
  505. package/lib/esm/components/PdfPreview/Skeleton.d.ts +5 -0
  506. package/lib/esm/components/PdfPreview/Skeleton.js +35 -0
  507. package/lib/esm/components/PdfPreview/index.d.ts +3 -0
  508. package/lib/esm/components/PdfPreview/index.js +2 -0
  509. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.d.ts +11 -0
  510. package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +60 -0
  511. package/lib/esm/components/PdfPreviewDialog/index.d.ts +3 -0
  512. package/lib/esm/components/PdfPreviewDialog/index.js +2 -0
  513. package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +4 -3
  514. package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  515. package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +4 -4
  516. package/lib/esm/components/ToastNotifications/ToastNotifications.js +2 -10
  517. package/lib/esm/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.d.ts +41 -0
  518. package/lib/esm/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.js +91 -0
  519. package/lib/esm/components/UserAddPaymentMethodDialog/constants.d.ts +1 -0
  520. package/lib/esm/components/UserAddPaymentMethodDialog/constants.js +1 -0
  521. package/lib/esm/components/UserAddPaymentMethodDialog/index.d.ts +3 -0
  522. package/lib/esm/components/UserAddPaymentMethodDialog/index.js +2 -0
  523. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.d.ts +40 -0
  524. package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +140 -0
  525. package/lib/esm/components/UserAddPaymentMethodForm/constants.d.ts +1 -0
  526. package/lib/esm/components/UserAddPaymentMethodForm/constants.js +1 -0
  527. package/lib/esm/components/UserAddPaymentMethodForm/index.d.ts +3 -0
  528. package/lib/esm/components/UserAddPaymentMethodForm/index.js +2 -0
  529. package/lib/esm/components/UserBillingInfo/Skeleton.d.ts +25 -0
  530. package/lib/esm/components/UserBillingInfo/Skeleton.js +9 -0
  531. package/lib/esm/components/UserBillingInfo/UserBillingInfo.d.ts +35 -0
  532. package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +490 -0
  533. package/lib/esm/components/UserBillingInfo/constants.d.ts +1 -0
  534. package/lib/esm/components/UserBillingInfo/constants.js +1 -0
  535. package/lib/esm/components/UserBillingInfo/index.d.ts +4 -0
  536. package/lib/esm/components/UserBillingInfo/index.js +4 -0
  537. package/lib/esm/components/UserBillingInfo/reducer.d.ts +77 -0
  538. package/lib/esm/components/UserBillingInfo/reducer.js +91 -0
  539. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.d.ts +44 -0
  540. package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +82 -0
  541. package/lib/esm/components/UserChangeAddressDialog/constants.d.ts +1 -0
  542. package/lib/esm/components/UserChangeAddressDialog/constants.js +1 -0
  543. package/lib/esm/components/UserChangeAddressDialog/index.d.ts +3 -0
  544. package/lib/esm/components/UserChangeAddressDialog/index.js +2 -0
  545. package/lib/esm/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +6 -6
  546. package/lib/esm/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -5
  547. package/lib/esm/components/UserConnectionsWidget/UserConnectionsWidget.js +8 -5
  548. package/lib/esm/components/UserCounters/UserCounters.js +20 -17
  549. package/lib/esm/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +11 -8
  550. package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +15 -0
  551. package/lib/esm/components/UserPaymentMethods/Skeleton.js +47 -0
  552. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +19 -0
  553. package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +336 -0
  554. package/lib/esm/components/UserPaymentMethods/constants.d.ts +1 -0
  555. package/lib/esm/components/UserPaymentMethods/constants.js +1 -0
  556. package/lib/esm/components/UserPaymentMethods/index.d.ts +4 -0
  557. package/lib/esm/components/UserPaymentMethods/index.js +4 -0
  558. package/lib/esm/components/UserPaymentMethodsPortal/Skeleton.d.ts +22 -0
  559. package/lib/esm/components/UserPaymentMethodsPortal/Skeleton.js +35 -0
  560. package/lib/esm/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.d.ts +44 -0
  561. package/lib/esm/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.js +100 -0
  562. package/lib/esm/components/UserPaymentMethodsPortal/constants.d.ts +1 -0
  563. package/lib/esm/components/UserPaymentMethodsPortal/constants.js +1 -0
  564. package/lib/esm/components/UserPaymentMethodsPortal/index.d.ts +4 -0
  565. package/lib/esm/components/UserPaymentMethodsPortal/index.js +4 -0
  566. package/lib/esm/components/UserSuggestionWidget/UserSuggestionWidget.js +7 -5
  567. package/lib/esm/constants/Billing.d.ts +10 -0
  568. package/lib/esm/constants/Billing.js +57 -0
  569. package/lib/esm/constants/ContributionsActionsMenu.d.ts +1 -0
  570. package/lib/esm/constants/ContributionsActionsMenu.js +1 -0
  571. package/lib/esm/constants/Country.d.ts +5 -0
  572. package/lib/esm/constants/Country.js +268 -0
  573. package/lib/esm/constants/DefaultDrawerContent.d.ts +1 -0
  574. package/lib/esm/constants/DefaultDrawerContent.js +1 -0
  575. package/lib/esm/constants/Payments.d.ts +4 -0
  576. package/lib/esm/constants/Payments.js +4 -0
  577. package/lib/esm/index.d.ts +23 -1
  578. package/lib/esm/index.js +23 -1
  579. package/lib/esm/shared/AutoPlayer/index.d.ts +0 -5
  580. package/lib/esm/shared/AutoPlayer/index.js +5 -4
  581. package/lib/esm/shared/ContributionActionsMenu/index.d.ts +4 -0
  582. package/lib/esm/shared/ContributionActionsMenu/index.js +58 -7
  583. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
  584. package/lib/esm/shared/CourseUsersTable/SeeProgressButton.js +5 -3
  585. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.d.ts +44 -0
  586. package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +50 -0
  587. package/lib/esm/shared/HiddenPurchasableContent/index.d.ts +3 -0
  588. package/lib/esm/shared/HiddenPurchasableContent/index.js +2 -0
  589. package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
  590. package/lib/esm/shared/Media/File/DisplayComponent.d.ts +2 -1
  591. package/lib/esm/shared/Media/File/DisplayComponent.js +60 -33
  592. package/lib/esm/shared/Media/File/DocComponent.d.ts +10 -0
  593. package/lib/esm/shared/Media/File/DocComponent.js +31 -0
  594. package/lib/esm/shared/Media/File/PreviewComponent.d.ts +2 -2
  595. package/lib/esm/shared/Media/File/PreviewComponent.js +17 -19
  596. package/lib/esm/shared/Media/File/TriggerButton.js +14 -1
  597. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  598. package/lib/esm/shared/Media/File/filter.d.ts +2 -2
  599. package/lib/esm/shared/Media/File/filter.js +2 -1
  600. package/lib/esm/shared/Media/File/index.js +2 -2
  601. package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  602. package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
  603. package/lib/esm/shared/StickyBox/index.d.ts +4 -4
  604. package/lib/esm/shared/Tags/index.js +7 -3
  605. package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
  606. package/lib/esm/types/composer.d.ts +1 -1
  607. package/lib/esm/types/index.d.ts +2 -1
  608. package/lib/esm/types/index.js +2 -1
  609. package/lib/esm/types/payment.d.ts +25 -0
  610. package/lib/esm/types/payment.js +26 -0
  611. package/lib/esm/utils/address.d.ts +10 -0
  612. package/lib/esm/utils/address.js +19 -0
  613. package/lib/esm/utils/checkout.d.ts +2 -0
  614. package/lib/esm/utils/checkout.js +19 -0
  615. package/lib/esm/utils/payment.d.ts +17 -0
  616. package/lib/esm/utils/payment.js +62 -0
  617. package/lib/umd/{c473ce30406a3dad83e1.eot → 30b299174b4fa1fb9ce8.eot} +0 -0
  618. package/lib/umd/362.js +2 -0
  619. package/lib/umd/{ba74e493633796d551d1.ttf → 3b49304a98beb1239bc7.ttf} +0 -0
  620. package/lib/umd/ab247f43e550f5f6d0f8.woff2 +0 -0
  621. package/lib/umd/assets/icons.svg +75 -69
  622. package/lib/umd/{b6dbec3d5816ff8baef1.woff → ce10db0c87e7112cb315.woff} +0 -0
  623. package/lib/umd/react-ui.js +1 -1
  624. package/package.json +15 -8
  625. package/lib/umd/578.js +0 -2
  626. package/lib/umd/60a7fdeaadfe844bc015.woff2 +0 -0
  627. /package/lib/umd/{578.js.LICENSE.txt → 362.js.LICENSE.txt} +0 -0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const material_1 = require("@mui/material");
7
+ const system_1 = require("@mui/system");
8
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
+ const react_core_1 = require("@selfcommunity/react-core");
10
+ const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
11
+ const PdfPreview_1 = tslib_1.__importDefault(require("../PdfPreview"));
12
+ const api_services_1 = require("@selfcommunity/api-services");
13
+ const utils_1 = require("@selfcommunity/utils");
14
+ const Errors_1 = require("../../constants/Errors");
15
+ const PREFIX = 'SCPdfPreviewDialog';
16
+ const classes = {
17
+ root: `${PREFIX}-root`,
18
+ content: `${PREFIX}-content`
19
+ };
20
+ const Root = (0, material_1.styled)(BaseDialog_1.default, {
21
+ slot: 'Root',
22
+ name: PREFIX
23
+ })(({ theme }) => ({}));
24
+ const Transition = react_1.default.forwardRef(function Transition(props, ref) {
25
+ return (0, jsx_runtime_1.jsx)(material_1.Slide, Object.assign({ direction: "up", ref: ref }, props));
26
+ });
27
+ const NoTransition = react_1.default.forwardRef(function NoTransition(props, ref) {
28
+ return (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [" ", props.children, " "] });
29
+ });
30
+ function PdfPreviewDialog(inProps) {
31
+ // PROPS
32
+ const props = (0, system_1.useThemeProps)({
33
+ props: inProps,
34
+ name: PREFIX
35
+ });
36
+ const { className, title, pdfUrl, disableInitialTransition = false, onClose, PdfPreviewComponentProps = {} } = props, rest = tslib_1.__rest(props, ["className", "title", "pdfUrl", "disableInitialTransition", "onClose", "PdfPreviewComponentProps"]);
37
+ // HOOKS
38
+ const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
39
+ /**
40
+ * handle download pdf
41
+ */
42
+ const handleDownload = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
43
+ try {
44
+ const response = yield api_services_1.http.request({ url: pdfUrl, responseType: 'blob' });
45
+ const blob = new Blob([response.data], { type: 'application/pdf' });
46
+ const url = window.URL.createObjectURL(blob);
47
+ const link = document.createElement('a');
48
+ link.href = url;
49
+ link.download = 'order.pdf';
50
+ link.click();
51
+ // Cleanup
52
+ window.URL.revokeObjectURL(url);
53
+ }
54
+ catch (error) {
55
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
56
+ }
57
+ });
58
+ if (!isPaymentsEnabled) {
59
+ return null;
60
+ }
61
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ fullScreen: true, scroll: 'paper', open: true, maxWidth: 'md' }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: (0, classnames_1.default)(classes.root, className), TransitionComponent: Transition }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Toolbar, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.content }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, justifyContent: 'center', alignContent: 'center' }, { children: (0, jsx_runtime_1.jsx)(PdfPreview_1.default, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
62
+ }
63
+ exports.default = PdfPreviewDialog;
@@ -0,0 +1,3 @@
1
+ import PdfPreviewDialog, { PdfPreviewDialogProps } from './PdfPreviewDialog';
2
+ export default PdfPreviewDialog;
3
+ export { PdfPreviewDialogProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const PdfPreviewDialog_1 = tslib_1.__importDefault(require("./PdfPreviewDialog"));
5
+ exports.default = PdfPreviewDialog_1.default;
@@ -80,7 +80,8 @@ function PrivateMessageComponent(inProps) {
80
80
  return ((_a = item === null || item === void 0 ? void 0 : item.receiver) === null || _a === void 0 ? void 0 : _a.id) !== loggedUserId ? (_b = item === null || item === void 0 ? void 0 : item.receiver) === null || _b === void 0 ? void 0 : _b.id : (_c = item === null || item === void 0 ? void 0 : item.sender) === null || _c === void 0 ? void 0 : _c.id;
81
81
  };
82
82
  // MEMO
83
- const privateMessagingEnabled = (0, react_1.useMemo)(() => scPreferences.features.includes(types_1.SCFeatureName.PRIVATE_MESSAGING), [scPreferences.features]);
83
+ const privateMessagingEnabled = (0, react_1.useMemo)(() => react_core_1.SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED in scPreferences.preferences &&
84
+ scPreferences.preferences[react_core_1.SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED].value, [scPreferences.preferences]);
84
85
  const authUserId = (0, react_1.useMemo)(() => (scUserContext.user ? scUserContext.user.id : null), [scUserContext.user]);
85
86
  (0, react_1.useEffect)(() => {
86
87
  setObj(id !== null && id !== void 0 ? id : null);
@@ -6,7 +6,7 @@ interface PrivateMessageComponentSkeletonMap {
6
6
  */
7
7
  className?: string;
8
8
  }
9
- export type PrivateMessageComponentProps = React.PropsWithChildren<PrivateMessageComponentSkeletonMap>;
9
+ export declare type PrivateMessageComponentProps = React.PropsWithChildren<PrivateMessageComponentSkeletonMap>;
10
10
  /**
11
11
  * > API documentation for the Community-JS Private Messages Skeleton Template. Learn about the available props and the CSS API.
12
12
 
@@ -129,18 +129,18 @@ function PrivateMessageThreadItem(inProps) {
129
129
  let type = m.file.mimetype;
130
130
  switch (true) {
131
131
  case type.startsWith(types_1.SCMessageFileType.IMAGE):
132
- section = ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.img }, { children: (0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: 'img', onClick: () => setOpenDialog(true) }) })));
132
+ section = ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.img }, { children: (0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: "img", onClick: () => setOpenDialog(true) }) })));
133
133
  break;
134
134
  case type.startsWith(types_1.SCMessageFileType.VIDEO):
135
135
  if (!(0, thumbnailCoverter_1.isSupportedVideoFormat)(m.file.filename)) {
136
136
  section = defaultSection;
137
137
  }
138
138
  else {
139
- section = ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: (0, classnames_1.default)(classes.img, classes.video) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: 'img' }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => setOpenDialog(true) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "play_circle_outline" }) }))] })));
139
+ section = ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: (0, classnames_1.default)(classes.img, classes.video) }, { children: [(0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: "img" }), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => setOpenDialog(true) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "play_circle_outline" }) }))] })));
140
140
  }
141
141
  break;
142
142
  case type.startsWith(types_1.SCMessageFileType.DOCUMENT):
143
- section = ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: m.file.filename.endsWith('.pdf') ? classes.document : classes.other }, { children: [m.file.filename.endsWith('.pdf') && (0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: 'img' }), (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ onClick: () => handleDownload(m.file), startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: m.file.filename }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, sizeCoverter_1.bytesToSize)(m.file.filesize) })] }))] })));
143
+ section = ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: m.file.filename.endsWith('.pdf') ? classes.document : classes.other }, { children: [m.file.filename.endsWith('.pdf') && (0, jsx_runtime_1.jsx)("img", { src: m.file.thumbnail, loading: "lazy", alt: "img" }), (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ onClick: () => handleDownload(m.file), startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: m.file.filename }), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, sizeCoverter_1.bytesToSize)(m.file.filesize) })] }))] })));
144
144
  break;
145
145
  default:
146
146
  // section = <Icon>hide_image</Icon>;
@@ -161,6 +161,6 @@ function PrivateMessageThreadItem(inProps) {
161
161
  message.status !== types_1.SCPrivateMessageStatusType.HIDDEN && (0, jsx_runtime_1.jsx)(PrivateMessageSettingsIconButton_1.default, { onMenuItemDeleteClick: handleMenuItemClick }) }, { children: [message.group && ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.username) !== message.sender.username && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "secondary", variant: "h4", className: classes.username }, { children: message.sender.username }))), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasFile && message.status !== types_1.SCPrivateMessageStatusType.HIDDEN ? (renderMessageFile(message)) : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.text }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", dangerouslySetInnerHTML: { __html: message.message } }) }))), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.messageTime, color: "text.secondary" }, { children: `${intl.formatDate(message.created_at, {
162
162
  hour: 'numeric',
163
163
  minute: 'numeric'
164
- })}` }))] }), openDialog && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (message === null || message === void 0 ? void 0 : message.file.mimetype.startsWith(types_1.SCMessageFileType.VIDEO)) ? ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ open: openDialog, onClose: () => setOpenDialog(false), className: classes.dialogRoot }, { children: (0, jsx_runtime_1.jsx)(AutoPlayer_1.default, { url: message === null || message === void 0 ? void 0 : message.file.url, width: '100%', enableAutoplay: false }) }))) : ((0, jsx_runtime_1.jsx)(Lightbox_1.default, { images: [{ src: message === null || message === void 0 ? void 0 : message.file.url, key: message.file.uuid }], onClose: () => setOpenDialog(false), toolbarButtons: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleDownload(message === null || message === void 0 ? void 0 : message.file), className: classes.downloadButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }), 'download') })) }))] })));
164
+ })}` }))] }), openDialog && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (message === null || message === void 0 ? void 0 : message.file.mimetype.startsWith(types_1.SCMessageFileType.VIDEO)) ? ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ open: openDialog, onClose: () => setOpenDialog(false), className: classes.dialogRoot }, { children: (0, jsx_runtime_1.jsx)(AutoPlayer_1.default, { url: message === null || message === void 0 ? void 0 : message.file.url, width: "100%" }) }))) : ((0, jsx_runtime_1.jsx)(Lightbox_1.default, { images: [{ src: message === null || message === void 0 ? void 0 : message.file.url, key: message.file.uuid }], onClose: () => setOpenDialog(false), toolbarButtons: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => handleDownload(message === null || message === void 0 ? void 0 : message.file), className: classes.downloadButton }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }), "download") })) }))] })));
165
165
  }
166
166
  exports.default = PrivateMessageThreadItem;
@@ -168,17 +168,9 @@ function UserToastNotifications(inProps) {
168
168
  * - the enqueue message is persistent (it remains on the screen while the others replace each other) if type notification_banner
169
169
  */
170
170
  const messageKey = data.data.feed_serialization_id ? data.data.feed_serialization_id : data.data.id;
171
- enqueueSnackbar(getContent(data.data), {
172
- preventDuplicate: true,
173
- key: messageKey,
174
- variant: 'notification',
175
- persist: data.data.activity_type === types_1.SCNotificationTypologyType.NOTIFICATION_BANNER ? true : false,
176
- anchorOrigin: { horizontal: 'left', vertical: 'bottom' },
177
- action: null,
178
- SnackbarProps: {
171
+ enqueueSnackbar(getContent(data.data), Object.assign(Object.assign({ preventDuplicate: true, key: messageKey, variant: 'notification', persist: data.data.activity_type === types_1.SCNotificationTypologyType.NOTIFICATION_BANNER }, (data.data.activity_type !== types_1.SCNotificationTypologyType.NOTIFICATION_BANNER && { autoHideDuration: 10000 })), { anchorOrigin: { horizontal: 'left', vertical: 'bottom' }, action: null, SnackbarProps: {
179
172
  id: messageKey
180
- }
181
- });
173
+ } }));
182
174
  }
183
175
  };
184
176
  /**
@@ -0,0 +1,41 @@
1
+ import { BaseDialogProps } from '../../shared/BaseDialog';
2
+ import { PaymentMethod as StripePaymentMethod } from '@stripe/stripe-js';
3
+ export interface UserAddPaymentMethodDialogProps extends BaseDialogProps {
4
+ /**
5
+ * Overrides or extends the styles applied to the component.
6
+ * @default null
7
+ */
8
+ className?: string;
9
+ /**
10
+ * Callback handle address
11
+ * @param address
12
+ */
13
+ handlePaymentMethod?: (paymentMethod: StripePaymentMethod) => void;
14
+ /**
15
+ * Any other properties
16
+ */
17
+ [p: string]: any;
18
+ }
19
+ /**
20
+ * > API documentation for the Community-JS User Add Payment Method Dialog. Learn about the available props and the CSS API.
21
+
22
+ #### Import
23
+
24
+ ```jsx
25
+ import {UserAddPaymentMethodDialog} from '@selfcommunity/react-ui';
26
+ ```
27
+
28
+ #### Component Name
29
+
30
+ The name `SCUserAddPaymentMethodDialog` can be used when providing style overrides in the theme.
31
+
32
+
33
+ #### CSS
34
+
35
+ |Rule Name|Global class|Description|
36
+ |---|---|---|
37
+ |root|.SCUserAddPaymentMethodDialog-root|Styles applied to the root element.|
38
+
39
+ * @param inProps
40
+ */
41
+ export default function UserAddPaymentMethodDialog(inProps: UserAddPaymentMethodDialogProps): JSX.Element;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const styles_1 = require("@mui/material/styles");
7
+ const react_core_1 = require("@selfcommunity/react-core");
8
+ const system_1 = require("@mui/system");
9
+ const constants_1 = require("./constants");
10
+ const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
11
+ const react_intl_1 = require("react-intl");
12
+ const stripe_js_1 = require("@stripe/stripe-js");
13
+ const payment_1 = require("../../types/payment");
14
+ const material_1 = require("@mui/material");
15
+ const react_stripe_js_1 = require("@stripe/react-stripe-js");
16
+ const payment_2 = require("../../utils/payment");
17
+ const UserAddPaymentMethodForm_1 = tslib_1.__importDefault(require("../UserAddPaymentMethodForm"));
18
+ const classes = {
19
+ root: `${constants_1.PREFIX}-root`,
20
+ loading: `${constants_1.PREFIX}-loading`
21
+ };
22
+ const Root = (0, styles_1.styled)(BaseDialog_1.default, {
23
+ name: constants_1.PREFIX,
24
+ slot: 'Root'
25
+ })(() => ({
26
+ [`& .MuiDialogContent-root`]: {
27
+ overflowX: 'hidden'
28
+ },
29
+ [`& .${classes.loading}`]: {
30
+ marginTop: '200px'
31
+ }
32
+ }));
33
+ /**
34
+ * > API documentation for the Community-JS User Add Payment Method Dialog. Learn about the available props and the CSS API.
35
+
36
+ #### Import
37
+
38
+ ```jsx
39
+ import {UserAddPaymentMethodDialog} from '@selfcommunity/react-ui';
40
+ ```
41
+
42
+ #### Component Name
43
+
44
+ The name `SCUserAddPaymentMethodDialog` can be used when providing style overrides in the theme.
45
+
46
+
47
+ #### CSS
48
+
49
+ |Rule Name|Global class|Description|
50
+ |---|---|---|
51
+ |root|.SCUserAddPaymentMethodDialog-root|Styles applied to the root element.|
52
+
53
+ * @param inProps
54
+ */
55
+ function UserAddPaymentMethodDialog(inProps) {
56
+ // PROPS
57
+ const props = (0, system_1.useThemeProps)({
58
+ props: inProps,
59
+ name: constants_1.PREFIX
60
+ });
61
+ const { className = null, handlePaymentMethod, open = false } = props, rest = tslib_1.__rest(props, ["className", "handlePaymentMethod", "open"]);
62
+ // CONTEXT
63
+ const scUserContext = (0, react_core_1.useSCUser)();
64
+ // STATE
65
+ const [isLoadingInit, setIsLoadingInit] = react_1.default.useState(true);
66
+ const [customer, setCustomer] = (0, react_1.useState)(null);
67
+ // HOOKS
68
+ const { isPaymentsEnabled, stripePublicKey, stripeConnectedAccountId } = (0, react_core_1.useSCPaymentsEnabled)();
69
+ const intl = (0, react_intl_1.useIntl)();
70
+ const stripePromise = isPaymentsEnabled && stripePublicKey && stripeConnectedAccountId && stripe_js_1.loadStripe
71
+ ? (0, stripe_js_1.loadStripe)(stripePublicKey, { stripeAccount: stripeConnectedAccountId, locale: (0, payment_2.getDefaultLocale)(intl).locale })
72
+ : null;
73
+ const theme = (0, styles_1.useTheme)();
74
+ const elementsOptions = Object.assign(Object.assign({ mode: 'setup', currency: payment_1.StripeCurrency.EUR, paymentMethodCreation: 'manual', loader: 'always' }, (0, payment_2.getDefaultAppearanceStyle)(theme)), (0, payment_2.getDefaultLocale)(intl));
75
+ const handleClose = () => {
76
+ handlePaymentMethod === null || handlePaymentMethod === void 0 ? void 0 : handlePaymentMethod(null);
77
+ };
78
+ const handleSuccess = (paymentMethod) => {
79
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
80
+ // @ts-ignore
81
+ handlePaymentMethod === null || handlePaymentMethod === void 0 ? void 0 : handlePaymentMethod(paymentMethod);
82
+ };
83
+ (0, react_1.useEffect)(() => {
84
+ /* getAccountCustomer().then((customer) => {
85
+ setCustomer(customer);
86
+ setIsLoadingInit(false);
87
+ }); */
88
+ }, []);
89
+ if (!isPaymentsEnabled || !scUserContext.user) {
90
+ return null;
91
+ }
92
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.userAddPaymentMethodDialog.title", id: "ui.userAddPaymentMethodDialog.title" }), open: open }, { children: isLoadingInit ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.loading }, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}) }))) : ((0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: (0, jsx_runtime_1.jsx)(UserAddPaymentMethodForm_1.default, { customer: customer, handleSuccess: handleSuccess, handleClose: handleClose }) }))) })));
93
+ }
94
+ exports.default = UserAddPaymentMethodDialog;
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCUserAddPaymentMethodDialog";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREFIX = void 0;
4
+ exports.PREFIX = 'SCUserAddPaymentMethodDialog';
@@ -0,0 +1,3 @@
1
+ import UserAddPaymentMethodDialog, { UserAddPaymentMethodDialogProps } from './UserAddPaymentMethodDialog';
2
+ export default UserAddPaymentMethodDialog;
3
+ export { UserAddPaymentMethodDialogProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const UserAddPaymentMethodDialog_1 = tslib_1.__importDefault(require("./UserAddPaymentMethodDialog"));
5
+ exports.default = UserAddPaymentMethodDialog_1.default;
@@ -0,0 +1,40 @@
1
+ import { BaseDialogProps } from '../../shared/BaseDialog';
2
+ import { PaymentMethod as StripePaymentMethod } from '@stripe/stripe-js';
3
+ export interface UserAddPaymentMethodFormProps extends BaseDialogProps {
4
+ /**
5
+ * Overrides or extends the styles applied to the component.
6
+ * @default null
7
+ */
8
+ className?: string;
9
+ customer: any;
10
+ collectBillingAddress?: boolean;
11
+ handleSuccess?: (paymentMethod: StripePaymentMethod) => void;
12
+ handleClose?: () => void;
13
+ /**
14
+ * Any other properties
15
+ */
16
+ [p: string]: any;
17
+ }
18
+ /**
19
+ * > API documentation for the Community-JS User Add Payment Method Form. Learn about the available props and the CSS API.
20
+
21
+ #### Import
22
+
23
+ ```jsx
24
+ import {UserAddPaymentMethodForm} from '@selfcommunity/react-ui';
25
+ ```
26
+
27
+ #### Component Name
28
+
29
+ The name `SCUserAddPaymentMethodForm` can be used when providing style overrides in the theme.
30
+
31
+
32
+ #### CSS
33
+
34
+ |Rule Name|Global class|Description|
35
+ |---|---|---|
36
+ |root|.SCUserAddPaymentMethodForm-root|Styles applied to the root element.|
37
+
38
+ * @param inProps
39
+ */
40
+ export default function UserAddPaymentMethodForm(inProps: UserAddPaymentMethodFormProps): JSX.Element;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = tslib_1.__importStar(require("react"));
6
+ const styles_1 = require("@mui/material/styles");
7
+ const react_core_1 = require("@selfcommunity/react-core");
8
+ const system_1 = require("@mui/system");
9
+ const constants_1 = require("./constants");
10
+ const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
11
+ const react_intl_1 = require("react-intl");
12
+ const stripe_js_1 = require("@stripe/stripe-js");
13
+ const material_1 = require("@mui/material");
14
+ const react_stripe_js_1 = require("@stripe/react-stripe-js");
15
+ const payment_1 = require("../../utils/payment");
16
+ const lab_1 = require("@mui/lab");
17
+ const notistack_1 = require("notistack");
18
+ const classes = {
19
+ root: `${constants_1.PREFIX}-root`,
20
+ address: `${constants_1.PREFIX}-loading`
21
+ };
22
+ const Root = (0, styles_1.styled)(BaseDialog_1.default, {
23
+ name: constants_1.PREFIX,
24
+ slot: 'Root'
25
+ })(() => ({
26
+ [`& .${classes.address}`]: {
27
+ padding: 10,
28
+ borderRadius: 5,
29
+ margin: '20px 0px'
30
+ }
31
+ }));
32
+ /**
33
+ * > API documentation for the Community-JS User Add Payment Method Form. Learn about the available props and the CSS API.
34
+
35
+ #### Import
36
+
37
+ ```jsx
38
+ import {UserAddPaymentMethodForm} from '@selfcommunity/react-ui';
39
+ ```
40
+
41
+ #### Component Name
42
+
43
+ The name `SCUserAddPaymentMethodForm` can be used when providing style overrides in the theme.
44
+
45
+
46
+ #### CSS
47
+
48
+ |Rule Name|Global class|Description|
49
+ |---|---|---|
50
+ |root|.SCUserAddPaymentMethodForm-root|Styles applied to the root element.|
51
+
52
+ * @param inProps
53
+ */
54
+ function UserAddPaymentMethodForm(inProps) {
55
+ // PROPS
56
+ const props = (0, system_1.useThemeProps)({
57
+ props: inProps,
58
+ name: constants_1.PREFIX
59
+ });
60
+ const { className = null, customer, collectBillingAddress = false, handleSuccess, handleClose } = props, rest = tslib_1.__rest(props, ["className", "customer", "collectBillingAddress", "handleSuccess", "handleClose"]);
61
+ // CONTEXT
62
+ const scUserContext = (0, react_core_1.useSCUser)();
63
+ // STATE
64
+ const [errorMessage, setErrorMessage] = (0, react_1.useState)(null);
65
+ const [ready, setReady] = (0, react_1.useState)(false);
66
+ const [loading, setLoading] = (0, react_1.useState)(false);
67
+ const [addressState, setAddressState] = (0, react_1.useState)({ name: customer.name, address: customer.address });
68
+ const [isEditingBillingAddress, setIsEditingBillingAddress] = react_1.default.useState(false);
69
+ const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
70
+ // HOOKS
71
+ const { isPaymentsEnabled, stripePublicKey, stripeConnectedAccountId } = (0, react_core_1.useSCPaymentsEnabled)();
72
+ const intl = (0, react_intl_1.useIntl)();
73
+ const stripePromise = isPaymentsEnabled && stripePublicKey && stripeConnectedAccountId && stripe_js_1.loadStripe
74
+ ? (0, stripe_js_1.loadStripe)(stripePublicKey, { stripeAccount: stripeConnectedAccountId, locale: (0, payment_1.getDefaultLocale)(intl).locale })
75
+ : null;
76
+ const elements = (0, react_stripe_js_1.useElements)();
77
+ const handleError = (error) => {
78
+ setLoading(false);
79
+ enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.common.error", defaultMessage: "ui.common.error" }), {
80
+ variant: 'error',
81
+ autoHideDuration: 3000
82
+ });
83
+ };
84
+ const handleSubmit = (event) => tslib_1.__awaiter(this, void 0, void 0, function* () {
85
+ /*
86
+
87
+ // We don't want to let default form submission happen here,
88
+ // which would refresh the page.
89
+ event.preventDefault();
90
+
91
+ if (!stripePromise || !elements) {
92
+ // Stripe.js hasn't yet loaded.
93
+ // Make sure to disable form submission until Stripe.js has loaded.
94
+ return null;
95
+ }
96
+
97
+ setLoading(true);
98
+
99
+ // Trigger form validation and wallet collection
100
+ const {error: submitError} = await elements.submit();
101
+ if (submitError) {
102
+ handleError(submitError);
103
+ return;
104
+ }
105
+
106
+ // Create the PaymentMethod using the details collected by the Payment Element
107
+ const {error, paymentMethod} = await stripe.createPaymentMethod({
108
+ elements,
109
+ params: {billing_details: addressState}
110
+ });
111
+
112
+ if (error) {
113
+ // This point is only reached if there's an immediate error when
114
+ // creating the PaymentMethod. Show the error to your customer (for example, payment details incomplete)
115
+ handleError(error);
116
+ return;
117
+ }
118
+
119
+ const res = await attachPaymentMethodToCustomer(paymentMethod.id);
120
+ if (res.error) {
121
+ handleError(res.error);
122
+ return;
123
+ }
124
+
125
+ handleSuccess?.(paymentMethod as StripePaymentMethod); */
126
+ });
127
+ const onHandleClose = () => {
128
+ handleClose === null || handleClose === void 0 ? void 0 : handleClose();
129
+ };
130
+ const paymentElementOptions = {
131
+ defaultValues: Object.assign({}, (collectBillingAddress && { billingDetails: addressState }))
132
+ };
133
+ if (!isPaymentsEnabled || !scUserContext.user) {
134
+ return null;
135
+ }
136
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, { children: (0, jsx_runtime_1.jsxs)("form", Object.assign({ onSubmit: handleSubmit }, { children: [(0, jsx_runtime_1.jsx)(react_stripe_js_1.PaymentElement, { id: "payment-element", options: paymentElementOptions, onReady: () => setReady(true) }), collectBillingAddress && ((0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant: "outlined", className: classes.address }, { children: Object.keys(addressState).length && !isEditingBillingAddress ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: addressState.name })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [addressState.address.line1, (0, jsx_runtime_1.jsx)("br", {}), addressState.address.line2] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ variant: 'body1' }, { children: [addressState.address.postal_code, " - ", addressState.address.city, " - ", addressState.address.country] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: "Change" }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_stripe_js_1.AddressElement, { onChange: (event) => {
137
+ setAddressState(event.value);
138
+ }, options: {
139
+ mode: 'billing',
140
+ defaultValues: addressState
141
+ } }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ sx: { mt: 1 }, variant: 'contained', disabled: !elements || loading || !ready, onClick: () => setIsEditingBillingAddress(!isEditingBillingAddress) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'ui.userAddPaymentMethodForm.useDefaultMethod', defaultMessage: 'ui.userAddPaymentMethodForm.useDefaultMethod' }) }))] })) }))), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "flex-end", alignItems: "center", spacing: 2, mt: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: onHandleClose, variant: "outlined" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userAddPaymentMethodForm.cancelButton", defaultMessage: "ui.userAddPaymentMethodForm.cancelButton" }) })), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ disabled: !ready, loading: loading, type: "submit", variant: "contained" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userAddPaymentMethodForm.addButton", defaultMessage: "ui.userAddPaymentMethodForm.addButton" }) }))] })), errorMessage && (0, jsx_runtime_1.jsx)("div", { children: errorMessage })] })) })));
142
+ }
143
+ exports.default = UserAddPaymentMethodForm;
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCUserAddPaymentMethodForm";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREFIX = void 0;
4
+ exports.PREFIX = 'SCUserAddPaymentMethodForm';
@@ -0,0 +1,3 @@
1
+ import UserAddPaymentMethodForm, { UserAddPaymentMethodFormProps } from './UserAddPaymentMethodForm';
2
+ export default UserAddPaymentMethodForm;
3
+ export { UserAddPaymentMethodFormProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const UserAddPaymentMethodForm_1 = tslib_1.__importDefault(require("./UserAddPaymentMethodForm"));
5
+ exports.default = UserAddPaymentMethodForm_1.default;
@@ -0,0 +1,25 @@
1
+ import { UserBillingInfoMode } from '../../constants/Billing';
2
+ /**
3
+ * > API documentation for the Community-JS User Billing Info Skeleton component. Learn about the available props and the CSS API.
4
+
5
+ #### Import
6
+
7
+ ```jsx
8
+ import {UserBillingInfoSkeleton} from '@selfcommunity/react-ui';
9
+ ```
10
+
11
+ #### Component Name
12
+
13
+ The name `SCUserBillingInfoSkeleton-skeleton-root` can be used when providing style overrides in the theme.
14
+
15
+ #### CSS
16
+
17
+ |Rule Name|Global class|Description|
18
+ |---|---|---|
19
+ |root|.SCUserBillingInfoSkeleton-skeleton-root|Styles applied to the root element.|
20
+ *
21
+ */
22
+ export interface UserSkeletonBillingInfoProps {
23
+ mode?: UserBillingInfoMode;
24
+ }
25
+ export default function UserBillingInfoSkeleton(props: UserSkeletonBillingInfoProps): JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const material_1 = require("@mui/material");
5
+ const Billing_1 = require("../../constants/Billing");
6
+ function UserBillingInfoSkeleton(props) {
7
+ if (props.mode === Billing_1.UserBillingInfoMode.READ) {
8
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 15, width: 200, sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 15, width: 250, sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 15, width: 220, sx: { mb: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 15, width: 190, sx: { mb: 2 } })] }));
9
+ }
10
+ return ((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: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", height: 50 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 6, justifyContent: 'center' }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 30, width: 100 }) }))] })));
11
+ }
12
+ exports.default = UserBillingInfoSkeleton;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { UserBillingInfoMode } from '../../constants/Billing';
3
+ import { SCCustomerBillingInfo } from '@selfcommunity/types/src/types';
4
+ export interface UserBillingInfoProps {
5
+ /**
6
+ * Overrides or extends the styles applied to the component.
7
+ * @default null
8
+ */
9
+ className?: string;
10
+ id?: string;
11
+ inlineDisplay?: boolean;
12
+ buttonLabel?: JSX.Element;
13
+ mode?: UserBillingInfoMode;
14
+ onLoad?: (account: SCCustomerBillingInfo, isCustomerCompleted: boolean) => void;
15
+ onChange?: (account: SCCustomerBillingInfo) => void;
16
+ onSave?: (account: SCCustomerBillingInfo) => void;
17
+ onError?: (error: any) => void;
18
+ onBack?: () => void;
19
+ onChangeViewMode?: (mode: UserBillingInfoMode) => void;
20
+ disableButtons?: boolean;
21
+ /**
22
+ * Any other properties
23
+ */
24
+ [p: string]: any;
25
+ }
26
+ /**
27
+ * BillingInfo component interface reference
28
+ */
29
+ export declare type UserBillingInfoRef = {
30
+ isBillingInfoCompleted: () => boolean;
31
+ showError: (e: string) => void;
32
+ billingMode: () => UserBillingInfoMode;
33
+ };
34
+ declare const _default: React.ForwardRefExoticComponent<Pick<UserBillingInfoProps, keyof UserBillingInfoProps> & React.RefAttributes<UserBillingInfoRef>>;
35
+ export default _default;