@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,264 @@
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 = require("react");
6
+ const material_1 = require("@mui/material");
7
+ const react_intl_1 = require("react-intl");
8
+ const LoadingButton_1 = tslib_1.__importDefault(require("@mui/lab/LoadingButton"));
9
+ const react_intersection_observer_1 = require("react-intersection-observer");
10
+ const api_services_1 = require("@selfcommunity/api-services");
11
+ const system_1 = require("@mui/system");
12
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
13
+ const react_core_1 = require("@selfcommunity/react-core");
14
+ const payment_1 = require("../../utils/payment");
15
+ const Event_1 = tslib_1.__importDefault(require("../Event"));
16
+ const types_1 = require("@selfcommunity/types");
17
+ const utils_1 = require("@selfcommunity/utils");
18
+ const types_2 = require("../../types");
19
+ const Course_1 = tslib_1.__importDefault(require("../Course"));
20
+ const Group_1 = tslib_1.__importDefault(require("../Group"));
21
+ const PaymentProduct_1 = tslib_1.__importDefault(require("../PaymentProduct"));
22
+ const PaymentOrderPdfButton_1 = tslib_1.__importDefault(require("../PaymentOrderPdfButton"));
23
+ const Errors_1 = require("../../constants/Errors");
24
+ const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
25
+ const x_date_pickers_1 = require("@mui/x-date-pickers");
26
+ const AdapterDateFns_1 = require("@mui/x-date-pickers/AdapterDateFns");
27
+ const it_1 = tslib_1.__importDefault(require("date-fns/locale/it"));
28
+ const en_US_1 = tslib_1.__importDefault(require("date-fns/locale/en-US"));
29
+ const Category_1 = tslib_1.__importDefault(require("../Category"));
30
+ const PREFIX = 'SCPaymentOrders';
31
+ const messages = (0, react_intl_1.defineMessages)({
32
+ dateFrom: {
33
+ id: 'ui.paymentOrders.dateFrom',
34
+ defaultMessage: 'ui.paymentOrders.dateFrom'
35
+ },
36
+ dateTo: {
37
+ id: 'ui.paymentOrders.dateTo',
38
+ defaultMessage: 'ui.paymentOrders.dateTo'
39
+ },
40
+ pickerCancelAction: {
41
+ id: 'ui.paymentOrders.picker.cancel',
42
+ defaultMessage: 'ui.paymentOrders.picker.cancel'
43
+ },
44
+ pickerClearAction: {
45
+ id: 'ui.paymentOrders.picker.clear',
46
+ defaultMessage: 'ui.paymentOrders.picker.clear'
47
+ }
48
+ });
49
+ const classes = {
50
+ root: `${PREFIX}-root`,
51
+ content: `${PREFIX}-content`,
52
+ filters: `${PREFIX}-filters`,
53
+ search: `${PREFIX}-search`,
54
+ picker: `${PREFIX}-picker`
55
+ };
56
+ const options = [
57
+ {
58
+ value: types_1.SCContentType.ALL,
59
+ label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType.all", defaultMessage: "ui.paymentOrders.contentType.all" })
60
+ },
61
+ {
62
+ value: types_1.SCContentType.COMMUNITY,
63
+ label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType.community", defaultMessage: "ui.paymentOrders.contentType.community" })
64
+ },
65
+ {
66
+ value: types_1.SCContentType.COURSE,
67
+ label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType.course", defaultMessage: "ui.paymentOrders.contentType.course" })
68
+ },
69
+ {
70
+ value: types_1.SCContentType.EVENT,
71
+ label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType.event", defaultMessage: "ui.paymentOrders.contentType.event" })
72
+ },
73
+ {
74
+ value: types_1.SCContentType.GROUP,
75
+ label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType.group", defaultMessage: "ui.paymentOrders.contentType.group" })
76
+ }
77
+ ];
78
+ const Root = (0, material_1.styled)(material_1.Paper, {
79
+ slot: 'Root',
80
+ name: PREFIX
81
+ })(() => ({}));
82
+ function PaymentOrders(inProps) {
83
+ // PROPS
84
+ const props = (0, system_1.useThemeProps)({
85
+ props: inProps,
86
+ name: PREFIX
87
+ });
88
+ const { className, contentName = '', contentType = types_1.SCContentType.ALL } = props, rest = tslib_1.__rest(props, ["className", "contentName", "contentType"]);
89
+ // STATE
90
+ const [isLoading, setIsLoading] = (0, react_1.useState)(true);
91
+ const [orders, setInvoices] = (0, react_1.useState)([]);
92
+ const [hasMore, setHasMore] = (0, react_1.useState)(true);
93
+ const [isLoadingPage, setIsLoadingPage] = (0, react_1.useState)(false);
94
+ const [query, setQuery] = (0, react_1.useState)(contentName);
95
+ const [contentTypeFilter, setContentTypeFilter] = (0, react_1.useState)(contentType);
96
+ const [startDate, setStartDate] = (0, react_1.useState)(null);
97
+ const [endDate, setEndDate] = (0, react_1.useState)(null);
98
+ // HOOKS
99
+ const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
100
+ const { ref, inView } = (0, react_intersection_observer_1.useInView)({ triggerOnce: false });
101
+ const intl = (0, react_intl_1.useIntl)();
102
+ const theme = (0, material_1.useTheme)();
103
+ const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
104
+ // CONTEXT
105
+ const scContext = (0, react_core_1.useSCContext)();
106
+ //HANDLERS
107
+ const formatDate = (date) => {
108
+ return date.toISOString().split('T')[0];
109
+ };
110
+ /**
111
+ * Handle change filter name
112
+ * @param event
113
+ */
114
+ const handleChange = (event) => {
115
+ setQuery(event.target.value);
116
+ };
117
+ /**
118
+ * Handle content type change
119
+ * @param event
120
+ */
121
+ const handleContentTypeChange = (event) => {
122
+ setContentTypeFilter(event.target.value);
123
+ };
124
+ /**
125
+ * Initial Invoices fetch
126
+ */
127
+ const fetchInvoices = (searchValue = query) => tslib_1.__awaiter(this, void 0, void 0, function* () {
128
+ setIsLoading(true);
129
+ setHasMore(true);
130
+ setInvoices([]);
131
+ try {
132
+ const res = yield api_services_1.PaymentService.getPaymentsOrder(Object.assign(Object.assign(Object.assign(Object.assign({ offset: 0, ordering: '-created_at' }, (searchValue && { search: searchValue })), (contentTypeFilter && contentTypeFilter !== types_1.SCContentType.ALL && { content_type: contentTypeFilter })), (startDate && { created_at__gte: formatDate(startDate) })), (endDate && { created_at__lt: formatDate(endDate) })));
133
+ if (res) {
134
+ setInvoices(res.results);
135
+ setHasMore(res.next !== null);
136
+ }
137
+ }
138
+ catch (error) {
139
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
140
+ }
141
+ finally {
142
+ setIsLoading(false);
143
+ }
144
+ });
145
+ /**
146
+ * Infinite load more orders
147
+ */
148
+ const loadMore = (0, react_1.useCallback)(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
149
+ if (!hasMore || isLoadingPage || isLoading)
150
+ return;
151
+ setIsLoadingPage(true);
152
+ try {
153
+ const res = yield api_services_1.PaymentService.getPaymentsOrder(Object.assign(Object.assign(Object.assign(Object.assign({ offset: orders.length, ordering: '-created_at' }, (query && { search: query })), (contentTypeFilter && contentTypeFilter !== types_1.SCContentType.ALL && { content_type: contentTypeFilter })), (startDate && { created_at__gte: formatDate(startDate) })), (endDate && { created_at__lt: formatDate(endDate) })));
154
+ if (res) {
155
+ setInvoices((prev) => prev.concat(res.results));
156
+ setHasMore(res.next !== null);
157
+ }
158
+ }
159
+ catch (error) {
160
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
161
+ }
162
+ finally {
163
+ setIsLoadingPage(false);
164
+ }
165
+ }), [orders.length, query, hasMore, isLoadingPage, isLoading, contentTypeFilter, startDate, endDate]);
166
+ const renderContent = (order) => {
167
+ var _a;
168
+ const contentType = order.content_type;
169
+ const content = order[order.content_type];
170
+ if (contentType === types_1.SCContentType.EVENT) {
171
+ return ((0, jsx_runtime_1.jsx)(Event_1.default, { event: content, cacheStrategy: utils_1.CacheStrategies.NETWORK_ONLY, template: types_2.SCEventTemplateType.SNIPPET, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), variant: "outlined" }));
172
+ }
173
+ else if (contentType === types_1.SCContentType.CATEGORY) {
174
+ return (0, jsx_runtime_1.jsx)(Category_1.default, { category: content, cacheStrategy: utils_1.CacheStrategies.NETWORK_ONLY, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), variant: "outlined" });
175
+ }
176
+ else if (contentType === types_1.SCContentType.COURSE) {
177
+ return ((0, jsx_runtime_1.jsx)(Course_1.default, { course: content, cacheStrategy: utils_1.CacheStrategies.NETWORK_ONLY, template: types_2.SCCourseTemplateType.SNIPPET, variant: "outlined", actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }));
178
+ }
179
+ else if (contentType === types_1.SCContentType.GROUP) {
180
+ return (0, jsx_runtime_1.jsx)(Group_1.default, { group: content, cacheStrategy: utils_1.CacheStrategies.NETWORK_ONLY, hideActions: true, variant: "outlined" });
181
+ }
182
+ else if (contentType === types_1.SCContentType.COMMUNITY) {
183
+ if ((_a = order === null || order === void 0 ? void 0 : order.payment_price) === null || _a === void 0 ? void 0 : _a.payment_product) {
184
+ return (0, jsx_runtime_1.jsx)(PaymentProduct_1.default, { hidePaymentProductPrices: true, paymentProduct: order.payment_price.payment_product });
185
+ }
186
+ return null;
187
+ }
188
+ };
189
+ /**
190
+ * Load more orders
191
+ */
192
+ (0, react_1.useEffect)(() => {
193
+ if (inView) {
194
+ loadMore();
195
+ }
196
+ }, [inView, loadMore]);
197
+ /**
198
+ * Initial load
199
+ */
200
+ (0, react_1.useEffect)(() => {
201
+ fetchInvoices();
202
+ }, [contentTypeFilter, endDate]);
203
+ if (!isPaymentsEnabled) {
204
+ return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
205
+ }
206
+ /**
207
+ * Render skeleton
208
+ */
209
+ const skeleton = () => {
210
+ return ((0, jsx_runtime_1.jsxs)(material_1.TableRow, Object.assign({ ref: ref }, { 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, width: 20 }) })), (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: 30 }) })), (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: 80, width: 250 }) })), (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: 65 }) })), (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: 65 }) })), (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: 65 }) })), (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: 65 }) })), (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: 65 }) }))] })));
211
+ };
212
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 3, lg: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.search", defaultMessage: "ui.paymentOrders.search" }), variant: "outlined", onChange: handleChange, disabled: isLoading, onKeyUp: (e) => {
213
+ e.preventDefault();
214
+ if (e.key === 'Enter') {
215
+ fetchInvoices();
216
+ }
217
+ }, InputProps: {
218
+ endAdornment: ((0, jsx_runtime_1.jsxs)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: [query.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: () => {
219
+ setQuery('');
220
+ fetchInvoices('');
221
+ }, disabled: isLoading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: () => fetchInvoices(), disabled: isLoading })) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchInvoices(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: isLoading }))] })))
222
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 3, lg: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({ select: true, fullWidth: true, disabled: isLoading, size: "small", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentTypeFilter", defaultMessage: "ui.paymentOrders.contentTypeFilter" }), value: contentTypeFilter, onChange: handleContentTypeChange }, { children: options.map((option) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: option.value }, { children: option.label }), option.value))) })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, sm: 8, md: 4 }, { children: (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, localeText: {
223
+ cancelButtonLabel: `${intl.formatMessage(messages.pickerCancelAction)}`,
224
+ clearButtonLabel: `${intl.formatMessage(messages.pickerClearAction)}`
225
+ } }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ container: true, spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateFrom", defaultMessage: "ui.paymentOrders.dateFrom" }), value: startDate, slots: {
226
+ textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { size: "small", InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.dateFrom)}`, endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) }) }))) }) })))
227
+ }, slotProps: {
228
+ actionBar: {
229
+ actions: ['cancel', 'clear', 'accept']
230
+ },
231
+ toolbar: {
232
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
233
+ // @ts-ignore
234
+ toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.picker.date", defaultMessage: "ui.paymentOrders.picker.date" })
235
+ }
236
+ }, onChange: (newValue) => setStartDate(newValue) }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 6 }, { children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.MobileDatePicker, { className: classes.picker, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.dateTo", defaultMessage: "ui.paymentOrders.dateTo" }), value: endDate, slots: {
237
+ textField: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { size: "small", InputProps: Object.assign(Object.assign({}, params.InputProps), { placeholder: `${intl.formatMessage(messages.dateTo)}`, endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "CalendarIcon" }) }) }))) }) })))
238
+ }, slotProps: {
239
+ actionBar: {
240
+ actions: ['cancel', 'clear', 'accept']
241
+ },
242
+ toolbar: {
243
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
244
+ // @ts-ignore
245
+ toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.picker.date", defaultMessage: "ui.paymentOrders.picker.date" })
246
+ }
247
+ }, onChange: (newValue) => setEndDate(newValue) }) }))] })) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.content }, { children: !isLoading ? ((0, jsx_runtime_1.jsx)(material_1.TableContainer, Object.assign({ style: { margin: 'auto', borderRadius: 0 } }, { 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, Object.assign({ width: "5%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.number", defaultMessage: "ui.paymentOrders.number" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "7%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.contentType", defaultMessage: "ui.paymentOrders.contentType" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "38%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.content", defaultMessage: "ui.paymentOrders.content" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.price", defaultMessage: "ui.paymentOrders.price" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "12%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.createdAt", defaultMessage: "ui.paymentOrders.createdAt" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "13%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.expired_at", defaultMessage: "ui.paymentOrders.expired_at" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "10%" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status", defaultMessage: "ui.paymentOrders.status" }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.actions", defaultMessage: "ui.paymentOrders.actions" }) })] }) }), (0, jsx_runtime_1.jsxs)(material_1.TableBody, { children: [orders.map((order, index) => ((0, jsx_runtime_1.jsxs)(material_1.TableRow, { children: [(0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)("b", { children: order.id }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.paymentOrders.contentType.${order.content_type}`, defaultMessage: `ui.paymentOrders.contentType.${order.content_type}` }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: renderContent(order) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, payment_1.getConvertedAmount)(order.payment_price) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: order.created_at &&
248
+ intl.formatDate(new Date(order.created_at), {
249
+ year: 'numeric',
250
+ month: 'numeric',
251
+ day: 'numeric',
252
+ hour: 'numeric',
253
+ minute: 'numeric'
254
+ }) })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: order.expired_at
255
+ ? intl.formatDate(new Date(order.expired_at), {
256
+ year: 'numeric',
257
+ month: 'numeric',
258
+ day: 'numeric',
259
+ hour: 'numeric',
260
+ minute: 'numeric'
261
+ })
262
+ : '-' })), (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ scope: "row" }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { variant: 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.status.paid", defaultMessage: "ui.paymentOrders.status.paid" }), color: "success", size: "small" }) })), (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: [order.content_type === types_1.SCContentType.EVENT && (0, jsx_runtime_1.jsx)(PaymentOrderPdfButton_1.default, { paymentOrder: order }), Boolean(!order.paid && order.billing_reason === 'subscription_create') && ((0, jsx_runtime_1.jsx)(LoadingButton_1.default, Object.assign({ size: "small", variant: "contained", disabled: true }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.pay", defaultMessage: "ui.paymentOrders.pay" }) })))] })) }))] }, index))), orders.length < 1 && ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: (0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ align: "left", colSpan: 6 }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.paymentOrders.noOrders", defaultMessage: "ui.paymentOrders.noOrders" }) })) })) })), hasMore && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: skeleton() })] })] })) }))) : ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) }))] })));
263
+ }
264
+ exports.default = PaymentOrders;
@@ -0,0 +1,3 @@
1
+ import PaymentOrders, { PaymentOrdersProps } from './PaymentOrders';
2
+ export default PaymentOrders;
3
+ export { PaymentOrdersProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const PaymentOrders_1 = tslib_1.__importDefault(require("./PaymentOrders"));
5
+ exports.default = PaymentOrders_1.default;
@@ -0,0 +1,18 @@
1
+ import { SCPaymentProduct, SCContentType, SCPurchasableContent, SCPaymentOrder, SCPaymentPrice, SCPaymentProductTemplateType } from '@selfcommunity/types';
2
+ import { PaymentProductPriceProps } from '../PaymentProductPrice';
3
+ import { WidgetProps } from '../Widget';
4
+ export interface PaymentProductProps extends WidgetProps {
5
+ className?: string;
6
+ paymentProductId?: number;
7
+ paymentProduct?: SCPaymentProduct;
8
+ contentType?: SCContentType;
9
+ contentId?: number | string;
10
+ content?: SCPurchasableContent;
11
+ paymentOrder?: SCPaymentOrder;
12
+ onUpdatePaymentOrder?: (price: SCPaymentPrice, contentType?: SCContentType, contentId?: string | number) => void;
13
+ template?: SCPaymentProductTemplateType;
14
+ hideDescription?: boolean;
15
+ hidePaymentProductPrices?: boolean;
16
+ PaymentProductPriceComponentProps?: PaymentProductPriceProps;
17
+ }
18
+ export default function PaymentProduct(inProps: PaymentProductProps): JSX.Element;
@@ -0,0 +1,48 @@
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 = 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 constants_1 = require("./constants");
11
+ const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
12
+ const PaymentProductPrice_1 = tslib_1.__importDefault(require("../PaymentProductPrice"));
13
+ const Widget_1 = tslib_1.__importDefault(require("../Widget"));
14
+ const classes = {
15
+ root: `${constants_1.PREFIX}-root`
16
+ };
17
+ const Root = (0, material_1.styled)(Widget_1.default, {
18
+ slot: 'Root',
19
+ name: constants_1.PREFIX
20
+ })(({ theme }) => ({}));
21
+ function PaymentProduct(inProps) {
22
+ // PROPS
23
+ const props = (0, system_1.useThemeProps)({
24
+ props: inProps,
25
+ name: constants_1.PREFIX
26
+ });
27
+ const { className, paymentProductId, paymentProduct, contentType, contentId, content, paymentOrder, onUpdatePaymentOrder, hideDescription = false, hidePaymentProductPrices = false, PaymentProductPriceComponentProps = {} } = props, rest = tslib_1.__rest(props, ["className", "paymentProductId", "paymentProduct", "contentType", "contentId", "content", "paymentOrder", "onUpdatePaymentOrder", "hideDescription", "hidePaymentProductPrices", "PaymentProductPriceComponentProps"]);
28
+ // HOOKS
29
+ const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
30
+ const { scPaymentProduct } = (0, react_core_1.useSCFetchPaymentProduct)({ id: paymentProductId, paymentProduct });
31
+ // CONST
32
+ const productPaymentPriceIds = (0, react_1.useMemo)(() => {
33
+ if (scPaymentProduct && scPaymentProduct.payment_prices) {
34
+ return scPaymentProduct.payment_prices.map((p) => p.id);
35
+ }
36
+ return [];
37
+ }, [scPaymentProduct]);
38
+ if (!isPaymentsEnabled) {
39
+ return null;
40
+ }
41
+ if (!scPaymentProduct) {
42
+ return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
43
+ }
44
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ disabled: !productPaymentPriceIds.length, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", component: "div" }, { children: (0, jsx_runtime_1.jsx)("b", { children: scPaymentProduct.name && scPaymentProduct.name }) })), scPaymentProduct.description && !hideDescription && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", component: "div" }, { children: scPaymentProduct.description }))), !hidePaymentProductPrices &&
45
+ scPaymentProduct.payment_prices &&
46
+ scPaymentProduct.payment_prices.map((price, index) => ((0, jsx_runtime_1.jsx)(PaymentProductPrice_1.default, Object.assign({ price: price }, PaymentProductPriceComponentProps, (contentType && { contentType }), (content ? { content } : { contentId }), (paymentOrder && { paymentOrder, onHandleActionBuy: onUpdatePaymentOrder })), index)))] }) })));
47
+ }
48
+ exports.default = PaymentProduct;
@@ -0,0 +1,25 @@
1
+ import { WidgetProps } from '../Widget';
2
+ export interface PaymentProductSkeletonProps extends WidgetProps {
3
+ className?: string;
4
+ }
5
+ /**
6
+ * > API documentation for the Community-JS PaymentProductSkeleton component. Learn about the available props and the CSS API.
7
+
8
+ #### Import
9
+
10
+ ```jsx
11
+ import {PaymentProductSkeleton} from '@selfcommunity/react-ui';
12
+ ```
13
+
14
+ #### Component Name
15
+
16
+ The name `SCPaymentProductSkeleton-skeleton-root` can be used when providing style overrides in the theme.
17
+
18
+ #### CSS
19
+
20
+ |Rule Name|Global class|Description|
21
+ |---|---|---|
22
+ |root|.SCPaymentProductSkeleton-skeleton-root|Styles applied to the root element.|
23
+ *
24
+ */
25
+ export default function PaymentProductSkeleton(inProps: PaymentProductSkeletonProps): JSX.Element;
@@ -0,0 +1,55 @@
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 material_1 = require("@mui/material");
6
+ const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
7
+ const constants_1 = require("./constants");
8
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
+ const Skeleton_1 = tslib_1.__importDefault(require("../PaymentProductPrice/Skeleton"));
10
+ const system_1 = require("@mui/system");
11
+ const Widget_1 = tslib_1.__importDefault(require("../Widget"));
12
+ const classes = {
13
+ root: `${constants_1.PREFIX}-skeleton-root`,
14
+ primary: `${constants_1.PREFIX}-primary`,
15
+ secondary: `${constants_1.PREFIX}-secondary`,
16
+ button: `${constants_1.PREFIX}-button`,
17
+ action: `${constants_1.PREFIX}-action`
18
+ };
19
+ const Root = (0, material_1.styled)(Widget_1.default, {
20
+ name: constants_1.PREFIX,
21
+ slot: 'SkeletonRoot'
22
+ })(() => ({}));
23
+ /**
24
+ * > API documentation for the Community-JS PaymentProductSkeleton component. Learn about the available props and the CSS API.
25
+
26
+ #### Import
27
+
28
+ ```jsx
29
+ import {PaymentProductSkeleton} from '@selfcommunity/react-ui';
30
+ ```
31
+
32
+ #### Component Name
33
+
34
+ The name `SCPaymentProductSkeleton-skeleton-root` can be used when providing style overrides in the theme.
35
+
36
+ #### CSS
37
+
38
+ |Rule Name|Global class|Description|
39
+ |---|---|---|
40
+ |root|.SCPaymentProductSkeleton-skeleton-root|Styles applied to the root element.|
41
+ *
42
+ */
43
+ function PaymentProductSkeleton(inProps) {
44
+ // PROPS
45
+ const props = (0, system_1.useThemeProps)({
46
+ props: inProps,
47
+ name: `${constants_1.PREFIX}Skeleton`
48
+ });
49
+ const { className } = props, rest = tslib_1.__rest(props, ["className"]);
50
+ // HOOKS
51
+ const theme = (0, material_1.useTheme)();
52
+ const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
53
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root) }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(BaseItem_1.default, { elevation: 0, primary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: isMobile ? 40 : 70, className: classes.primary }), secondary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: isMobile ? 70 : 120, className: classes.secondary }) }), (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}), (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}), (0, jsx_runtime_1.jsx)(Skeleton_1.default, {})] }) })));
54
+ }
55
+ exports.default = PaymentProductSkeleton;
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCPaymentProduct";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREFIX = void 0;
4
+ exports.PREFIX = 'SCPaymentProduct';
@@ -0,0 +1,3 @@
1
+ import PaymentProduct, { PaymentProductProps } from './PaymentProduct';
2
+ export default PaymentProduct;
3
+ export { PaymentProductProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const PaymentProduct_1 = tslib_1.__importDefault(require("./PaymentProduct"));
5
+ exports.default = PaymentProduct_1.default;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SCContentType, SCPaymentOrder, SCPaymentPrice, SCPurchasableContent } from '@selfcommunity/types';
3
+ export interface PaymentProductPriceProps {
4
+ className?: string;
5
+ id?: number | string;
6
+ price?: SCPaymentPrice;
7
+ contentType?: SCContentType;
8
+ contentId?: number | string;
9
+ content?: SCPurchasableContent;
10
+ actions?: React.ReactNode;
11
+ paymentOrder?: SCPaymentOrder;
12
+ onHandleActionBuy?: (price: SCPaymentPrice, contentType?: SCContentType, contentId?: string | number) => void;
13
+ returnUrlParams?: Record<string, string>;
14
+ }
15
+ export default function PaymentProductPrice(inProps: PaymentProductPriceProps): JSX.Element;
@@ -0,0 +1,61 @@
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 = require("react");
6
+ const material_1 = require("@mui/material");
7
+ const system_1 = require("@mui/system");
8
+ const constants_1 = require("./constants");
9
+ const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
10
+ const react_intl_1 = require("react-intl");
11
+ const react_core_1 = require("@selfcommunity/react-core");
12
+ const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
13
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
14
+ const payment_1 = require("../../utils/payment");
15
+ const classes = {
16
+ root: `${constants_1.PREFIX}-root`,
17
+ primary: `${constants_1.PREFIX}-primary`,
18
+ secondary: `${constants_1.PREFIX}-secondary`,
19
+ purchasedAt: `${constants_1.PREFIX}-purchased-at`,
20
+ button: `${constants_1.PREFIX}-button`,
21
+ buttonPurchased: `${constants_1.PREFIX}-button-purchased`,
22
+ action: `${constants_1.PREFIX}-action`
23
+ };
24
+ const Root = (0, material_1.styled)(BaseItem_1.default, {
25
+ slot: 'Root',
26
+ name: constants_1.PREFIX
27
+ })(({ theme }) => ({}));
28
+ function PaymentProductPrice(inProps) {
29
+ // PROPS
30
+ const props = (0, system_1.useThemeProps)({
31
+ props: inProps,
32
+ name: constants_1.PREFIX
33
+ });
34
+ const { className, id, price, contentType, contentId, content, actions, onHandleActionBuy, paymentOrder, returnUrlParams } = props, rest = tslib_1.__rest(props, ["className", "id", "price", "contentType", "contentId", "content", "actions", "onHandleActionBuy", "paymentOrder", "returnUrlParams"]);
35
+ // ROUTING
36
+ const scRoutingContext = (0, react_core_1.useSCRouting)();
37
+ // HOOKS
38
+ const theme = (0, material_1.useTheme)();
39
+ const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('sm'));
40
+ const intl = (0, react_intl_1.useIntl)();
41
+ const { isPaymentsEnabled } = (0, react_core_1.useSCPaymentsEnabled)();
42
+ const handleActionBuy = (0, react_1.useCallback)((e) => {
43
+ e.preventDefault();
44
+ e.stopPropagation();
45
+ onHandleActionBuy && onHandleActionBuy(price, contentType, contentId);
46
+ }, [onHandleActionBuy, price, contentType, contentId]);
47
+ if (!isPaymentsEnabled) {
48
+ return null;
49
+ }
50
+ if (!price) {
51
+ return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
52
+ }
53
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ disableTypography: true, className: classes.root, primary: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.primary }, { children: (0, jsx_runtime_1.jsx)("b", { children: (0, payment_1.getRecurringConvertedAmount)(price, intl) }) })), secondary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isMobile && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "p", variant: "body2", className: classes.secondary }, { children: price.description }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !isMobile && paymentOrder && paymentOrder.payment_price.id === price.id && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "p", variant: "body2", className: (0, classnames_1.default)(classes.secondary, classes.purchasedAt) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.paymentProduct.action.purchasedAt", id: "ui.paymentProduct.action.purchasedAt", values: {
54
+ purchasedAt: intl.formatDate(new Date(paymentOrder.created_at), { day: 'numeric', year: 'numeric', month: 'long' })
55
+ } }) }))) })] }), actions: actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.action }, { children: (0, jsx_runtime_1.jsx)(material_1.Zoom, Object.assign({ in: true, style: { transitionDelay: '200ms' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", color: paymentOrder && paymentOrder.payment_price.id === price.id ? 'secondary' : 'primary', className: (0, classnames_1.default)(classes.button, { [classes.buttonPurchased]: paymentOrder && paymentOrder.payment_price.id === price.id }) }, (paymentOrder && { disabled: true }), { variant: "contained", component: react_core_1.Link, startIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "dredit-card" }) }, (onHandleActionBuy && { onClick: handleActionBuy }), { to: `${scRoutingContext.url(react_core_1.SCRoutes.CHECKOUT_PAYMENT, {
56
+ content_type: contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase(),
57
+ content_id: content ? content.id : contentId,
58
+ price_id: price.id
59
+ })}?${returnUrlParams ? new URLSearchParams(returnUrlParams) : ''}` }, { children: paymentOrder && paymentOrder.payment_price.id === price.id ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: paymentOrder.payment_price.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.paymentProduct.action.subscribed", id: "ui.paymentProduct.action.subscribed" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.paymentProduct.action.purchased", id: "ui.paymentProduct.action.purchased" })) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: price.recurring_interval ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.paymentProduct.action.subscribe", id: "ui.paymentProduct.action.subscribe" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.paymentProduct.action.buy", id: "ui.paymentProduct.action.buy" })) })) })) })) }))) }, rest)));
60
+ }
61
+ exports.default = PaymentProductPrice;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * > API documentation for the Community-JS PaymentProductPriceSkeleton component. Learn about the available props and the CSS API.
3
+
4
+ #### Import
5
+
6
+ ```jsx
7
+ import {PaymentProductPriceSkeleton} from '@selfcommunity/react-ui';
8
+ ```
9
+
10
+ #### Component Name
11
+
12
+ The name `SCPaymentProductPriceSkeleton-skeleton-root` can be used when providing style overrides in the theme.
13
+
14
+ #### CSS
15
+
16
+ |Rule Name|Global class|Description|
17
+ |---|---|---|
18
+ |root|.SCPaymentProductPriceSkeleton-skeleton-root|Styles applied to the root element.|
19
+ *
20
+ */
21
+ export default function PaymentProductPriceSkeleton(props: any): JSX.Element;
@@ -0,0 +1,46 @@
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 material_1 = require("@mui/material");
6
+ const BaseItem_1 = tslib_1.__importDefault(require("../../shared/BaseItem"));
7
+ const constants_1 = require("./constants");
8
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
+ const classes = {
10
+ root: `${constants_1.PREFIX}-skeleton-root`,
11
+ primary: `${constants_1.PREFIX}-primary`,
12
+ secondary: `${constants_1.PREFIX}-secondary`,
13
+ button: `${constants_1.PREFIX}-button`,
14
+ action: `${constants_1.PREFIX}-action`
15
+ };
16
+ const Root = (0, material_1.styled)(BaseItem_1.default, {
17
+ name: constants_1.PREFIX,
18
+ slot: 'SkeletonRoot'
19
+ })(() => ({}));
20
+ /**
21
+ * > API documentation for the Community-JS PaymentProductPriceSkeleton component. Learn about the available props and the CSS API.
22
+
23
+ #### Import
24
+
25
+ ```jsx
26
+ import {PaymentProductPriceSkeleton} from '@selfcommunity/react-ui';
27
+ ```
28
+
29
+ #### Component Name
30
+
31
+ The name `SCPaymentProductPriceSkeleton-skeleton-root` can be used when providing style overrides in the theme.
32
+
33
+ #### CSS
34
+
35
+ |Rule Name|Global class|Description|
36
+ |---|---|---|
37
+ |root|.SCPaymentProductPriceSkeleton-skeleton-root|Styles applied to the root element.|
38
+ *
39
+ */
40
+ function PaymentProductPriceSkeleton(props) {
41
+ // HOOKS
42
+ const theme = (0, material_1.useTheme)();
43
+ const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
44
+ return ((0, jsx_runtime_1.jsx)(Root, { className: (0, classnames_1.default)(classes.root), primary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: isMobile ? 70 : 85, className: classes.primary }), actions: props.actions !== undefined ? (props.actions) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ size: "small", variant: "outlined", disabled: true, className: classes.button }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", height: 10, width: isMobile ? 30 : 40, className: classes.action }) }))) }));
45
+ }
46
+ exports.default = PaymentProductPriceSkeleton;
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCPaymentProductPrice";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREFIX = void 0;
4
+ exports.PREFIX = 'SCPaymentProductPrice';
@@ -0,0 +1,3 @@
1
+ import PaymentProductPrice, { PaymentProductPriceProps } from './PaymentProductPrice';
2
+ export default PaymentProductPrice;
3
+ export { PaymentProductPriceProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const PaymentProductPrice_1 = tslib_1.__importDefault(require("./PaymentProductPrice"));
5
+ exports.default = PaymentProductPrice_1.default;