@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.
- package/lib/cjs/assets/checkout/general.d.ts +2 -0
- package/lib/cjs/assets/checkout/general.js +3 -0
- package/lib/cjs/assets/checkout/success.d.ts +2 -0
- package/lib/cjs/assets/checkout/success.js +3 -0
- package/lib/cjs/assets/custom/formazione.d.ts +2 -0
- package/lib/cjs/assets/custom/formazione.js +3 -0
- package/lib/cjs/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +20 -2
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.d.ts +61 -0
- package/lib/cjs/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +106 -0
- package/lib/cjs/components/AcceptRequestUserGroupButton/index.d.ts +3 -0
- package/lib/cjs/components/AcceptRequestUserGroupButton/index.js +5 -0
- package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/cjs/components/BottomNavigation/BottomNavigation.js +2 -2
- package/lib/cjs/components/BuyButton/BuyButton.d.ts +73 -0
- package/lib/cjs/components/BuyButton/BuyButton.js +196 -0
- package/lib/cjs/components/BuyButton/index.d.ts +3 -0
- package/lib/cjs/components/BuyButton/index.js +5 -0
- package/lib/cjs/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +5 -3
- package/lib/cjs/components/Category/Category.d.ts +5 -0
- package/lib/cjs/components/Category/Category.js +5 -5
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.d.ts +4 -0
- package/lib/cjs/components/CategoryFollowButton/CategoryFollowButton.js +32 -6
- package/lib/cjs/components/CategoryHeader/CategoryHeader.js +6 -1
- package/lib/cjs/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +9 -2
- package/lib/cjs/components/Checkout/Checkout.d.ts +14 -0
- package/lib/cjs/components/Checkout/Checkout.js +131 -0
- package/lib/cjs/components/Checkout/CheckoutHeaderInfoWidget.d.ts +8 -0
- package/lib/cjs/components/Checkout/CheckoutHeaderInfoWidget.js +34 -0
- package/lib/cjs/components/Checkout/Skeleton.d.ts +21 -0
- package/lib/cjs/components/Checkout/Skeleton.js +87 -0
- package/lib/cjs/components/Checkout/constants.d.ts +1 -0
- package/lib/cjs/components/Checkout/constants.js +4 -0
- package/lib/cjs/components/Checkout/index.d.ts +3 -0
- package/lib/cjs/components/Checkout/index.js +5 -0
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.d.ts +10 -0
- package/lib/cjs/components/CheckoutReturnDialog/CheckoutReturnDialog.js +171 -0
- package/lib/cjs/components/CheckoutReturnDialog/index.d.ts +3 -0
- package/lib/cjs/components/CheckoutReturnDialog/index.js +5 -0
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.d.ts +8 -0
- package/lib/cjs/components/CommunityPaywalls/CommunityPaywalls.js +69 -0
- package/lib/cjs/components/CommunityPaywalls/Skeleton.d.ts +27 -0
- package/lib/cjs/components/CommunityPaywalls/Skeleton.js +53 -0
- package/lib/cjs/components/CommunityPaywalls/constants.d.ts +1 -0
- package/lib/cjs/components/CommunityPaywalls/constants.js +4 -0
- package/lib/cjs/components/CommunityPaywalls/index.d.ts +4 -0
- package/lib/cjs/components/CommunityPaywalls/index.js +8 -0
- package/lib/cjs/components/Composer/Composer.d.ts +1 -0
- package/lib/cjs/components/Composer/Composer.js +82 -18
- package/lib/cjs/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPoll/ContentPoll.js +2 -2
- package/lib/cjs/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +20 -13
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.d.ts +9 -0
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +61 -0
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/index.d.ts +3 -0
- package/lib/cjs/components/Composer/Layer/ScheduledLayer/index.js +5 -0
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.js +2 -1
- package/lib/cjs/components/ConnectionUserButton/ConnectionUserButton.js +6 -0
- package/lib/cjs/components/Course/Course.d.ts +5 -0
- package/lib/cjs/components/Course/Course.js +3 -3
- package/lib/cjs/components/CourseDashboard/Header.d.ts +2 -2
- package/lib/cjs/components/CourseDashboard/Header.js +8 -1
- package/lib/cjs/components/CourseDashboard/Student.d.ts +2 -2
- package/lib/cjs/components/CourseDashboard/Student.js +15 -4
- package/lib/cjs/components/CourseForm/CourseForm.d.ts +5 -0
- package/lib/cjs/components/CourseForm/CourseForm.js +36 -5
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.d.ts +1 -6
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +9 -7
- package/lib/cjs/components/CreateCourseButton/CreateCourseButton.js +1 -1
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.d.ts +10 -0
- package/lib/cjs/components/CreatePaymentProductForm/CreatePaymentProductForm.js +144 -0
- package/lib/cjs/components/CreatePaymentProductForm/constants.d.ts +1 -0
- package/lib/cjs/components/CreatePaymentProductForm/constants.js +4 -0
- package/lib/cjs/components/CreatePaymentProductForm/index.d.ts +3 -0
- package/lib/cjs/components/CreatePaymentProductForm/index.js +5 -0
- package/lib/cjs/components/EditEventButton/EditEventButton.js +1 -0
- package/lib/cjs/components/Editor/Editor.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/cjs/components/Event/Event.d.ts +5 -0
- package/lib/cjs/components/Event/Event.js +2 -2
- package/lib/cjs/components/EventForm/EventForm.js +47 -16
- package/lib/cjs/components/EventForm/types.d.ts +8 -5
- package/lib/cjs/components/EventFormDialog/EventFormDialog.js +7 -1
- package/lib/cjs/components/EventHeader/EventHeader.js +12 -3
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +27 -4
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/EventMembersWidget.js +11 -2
- package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +23 -13
- package/lib/cjs/components/EventSubscribeButton/EventSubscribeButton.js +18 -7
- package/lib/cjs/components/Feed/Feed.d.ts +2 -2
- package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
- package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -1
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +2 -1
- package/lib/cjs/components/FeedObject/FeedObject.js +16 -6
- package/lib/cjs/components/FeedObject/Poll/Choice/Choice.js +1 -1
- package/lib/cjs/components/FeedObject/Poll/Poll.js +1 -1
- package/lib/cjs/components/Group/Group.d.ts +6 -1
- package/lib/cjs/components/Group/Group.js +3 -3
- package/lib/cjs/components/GroupForm/GroupForm.js +37 -7
- package/lib/cjs/components/GroupHeader/GroupHeader.js +10 -2
- package/lib/cjs/components/GroupMembersWidget/GroupMembersWidget.js +3 -1
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +7 -2
- package/lib/cjs/components/GroupRequestsWidget/GroupRequestsWidget.js +6 -4
- package/lib/cjs/components/GroupSettingsIconButton/GroupSettingsIconButton.js +4 -2
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +3 -8
- package/lib/cjs/components/GroupSubscribeButton/GroupSubscribeButton.js +30 -8
- package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.js +3 -2
- package/lib/cjs/components/LiveStreamForm/types.d.ts +3 -3
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
- package/lib/cjs/components/LiveStreamRoom/types.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +1 -0
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +42 -4
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +6 -0
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +1 -1
- package/lib/cjs/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +28 -5
- package/lib/cjs/components/NavigationToolbar/NavigationToolbar.js +8 -3
- package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +1 -1
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.d.ts +6 -0
- package/lib/cjs/components/PaymentDetailDialog/PaymentDetailDialog.js +40 -0
- package/lib/cjs/components/PaymentDetailDialog/index.d.ts +3 -0
- package/lib/cjs/components/PaymentDetailDialog/index.js +5 -0
- package/lib/cjs/components/PaymentOrder/PaymentOrder.d.ts +10 -0
- package/lib/cjs/components/PaymentOrder/PaymentOrder.js +80 -0
- package/lib/cjs/components/PaymentOrder/Skeleton.d.ts +30 -0
- package/lib/cjs/components/PaymentOrder/Skeleton.js +61 -0
- package/lib/cjs/components/PaymentOrder/constants.d.ts +1 -0
- package/lib/cjs/components/PaymentOrder/constants.js +4 -0
- package/lib/cjs/components/PaymentOrder/index.d.ts +3 -0
- package/lib/cjs/components/PaymentOrder/index.js +5 -0
- package/lib/cjs/components/PaymentOrderPdfButton/PaymentOrderPdfButton.d.ts +52 -0
- package/lib/cjs/components/PaymentOrderPdfButton/PaymentOrderPdfButton.js +74 -0
- package/lib/cjs/components/PaymentOrderPdfButton/index.d.ts +3 -0
- package/lib/cjs/components/PaymentOrderPdfButton/index.js +5 -0
- package/lib/cjs/components/PaymentOrders/PaymentOrders.d.ts +17 -0
- package/lib/cjs/components/PaymentOrders/PaymentOrders.js +264 -0
- package/lib/cjs/components/PaymentOrders/index.d.ts +3 -0
- package/lib/cjs/components/PaymentOrders/index.js +5 -0
- package/lib/cjs/components/PaymentProduct/PaymentProduct.d.ts +18 -0
- package/lib/cjs/components/PaymentProduct/PaymentProduct.js +48 -0
- package/lib/cjs/components/PaymentProduct/Skeleton.d.ts +25 -0
- package/lib/cjs/components/PaymentProduct/Skeleton.js +55 -0
- package/lib/cjs/components/PaymentProduct/constants.d.ts +1 -0
- package/lib/cjs/components/PaymentProduct/constants.js +4 -0
- package/lib/cjs/components/PaymentProduct/index.d.ts +3 -0
- package/lib/cjs/components/PaymentProduct/index.js +5 -0
- package/lib/cjs/components/PaymentProductPrice/PaymentProductPrice.d.ts +15 -0
- package/lib/cjs/components/PaymentProductPrice/PaymentProductPrice.js +61 -0
- package/lib/cjs/components/PaymentProductPrice/Skeleton.d.ts +21 -0
- package/lib/cjs/components/PaymentProductPrice/Skeleton.js +46 -0
- package/lib/cjs/components/PaymentProductPrice/constants.d.ts +1 -0
- package/lib/cjs/components/PaymentProductPrice/constants.js +4 -0
- package/lib/cjs/components/PaymentProductPrice/index.d.ts +3 -0
- package/lib/cjs/components/PaymentProductPrice/index.js +5 -0
- package/lib/cjs/components/PaymentProducts/PaymentProducts.d.ts +11 -0
- package/lib/cjs/components/PaymentProducts/PaymentProducts.js +76 -0
- package/lib/cjs/components/PaymentProducts/Skeleton.d.ts +21 -0
- package/lib/cjs/components/PaymentProducts/Skeleton.js +46 -0
- package/lib/cjs/components/PaymentProducts/constants.d.ts +1 -0
- package/lib/cjs/components/PaymentProducts/constants.js +4 -0
- package/lib/cjs/components/PaymentProducts/index.d.ts +3 -0
- package/lib/cjs/components/PaymentProducts/index.js +5 -0
- package/lib/cjs/components/Paywalls/Paywalls.d.ts +10 -0
- package/lib/cjs/components/Paywalls/Paywalls.js +94 -0
- package/lib/cjs/components/Paywalls/Skeleton.d.ts +21 -0
- package/lib/cjs/components/Paywalls/Skeleton.js +46 -0
- package/lib/cjs/components/Paywalls/constants.d.ts +1 -0
- package/lib/cjs/components/Paywalls/constants.js +4 -0
- package/lib/cjs/components/Paywalls/index.d.ts +3 -0
- package/lib/cjs/components/Paywalls/index.js +5 -0
- package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.d.ts +13 -0
- package/lib/cjs/components/PaywallsConfigurator/PaywallsConfigurator.js +252 -0
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.d.ts +21 -0
- package/lib/cjs/components/PaywallsConfigurator/Skeleton.js +46 -0
- package/lib/cjs/components/PaywallsConfigurator/constants.d.ts +5 -0
- package/lib/cjs/components/PaywallsConfigurator/constants.js +9 -0
- package/lib/cjs/components/PaywallsConfigurator/index.d.ts +4 -0
- package/lib/cjs/components/PaywallsConfigurator/index.js +8 -0
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.d.ts +8 -0
- package/lib/cjs/components/PaywallsDialog/PaywallsDialog.js +43 -0
- package/lib/cjs/components/PaywallsDialog/index.d.ts +3 -0
- package/lib/cjs/components/PaywallsDialog/index.js +5 -0
- package/lib/cjs/components/PdfPreview/PdfPreview.d.ts +8 -0
- package/lib/cjs/components/PdfPreview/PdfPreview.js +92 -0
- package/lib/cjs/components/PdfPreview/Skeleton.d.ts +5 -0
- package/lib/cjs/components/PdfPreview/Skeleton.js +38 -0
- package/lib/cjs/components/PdfPreview/index.d.ts +3 -0
- package/lib/cjs/components/PdfPreview/index.js +5 -0
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.d.ts +11 -0
- package/lib/cjs/components/PdfPreviewDialog/PdfPreviewDialog.js +63 -0
- package/lib/cjs/components/PdfPreviewDialog/index.d.ts +3 -0
- package/lib/cjs/components/PdfPreviewDialog/index.js +5 -0
- package/lib/cjs/components/PrivateMessageComponent/PrivateMessageComponent.js +2 -1
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/cjs/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +4 -4
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +2 -10
- package/lib/cjs/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.d.ts +41 -0
- package/lib/cjs/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.js +94 -0
- package/lib/cjs/components/UserAddPaymentMethodDialog/constants.d.ts +1 -0
- package/lib/cjs/components/UserAddPaymentMethodDialog/constants.js +4 -0
- package/lib/cjs/components/UserAddPaymentMethodDialog/index.d.ts +3 -0
- package/lib/cjs/components/UserAddPaymentMethodDialog/index.js +5 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.d.ts +40 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +143 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/constants.d.ts +1 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/constants.js +4 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/index.d.ts +3 -0
- package/lib/cjs/components/UserAddPaymentMethodForm/index.js +5 -0
- package/lib/cjs/components/UserBillingInfo/Skeleton.d.ts +25 -0
- package/lib/cjs/components/UserBillingInfo/Skeleton.js +12 -0
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.d.ts +35 -0
- package/lib/cjs/components/UserBillingInfo/UserBillingInfo.js +492 -0
- package/lib/cjs/components/UserBillingInfo/constants.d.ts +1 -0
- package/lib/cjs/components/UserBillingInfo/constants.js +4 -0
- package/lib/cjs/components/UserBillingInfo/index.d.ts +4 -0
- package/lib/cjs/components/UserBillingInfo/index.js +8 -0
- package/lib/cjs/components/UserBillingInfo/reducer.d.ts +77 -0
- package/lib/cjs/components/UserBillingInfo/reducer.js +96 -0
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.d.ts +44 -0
- package/lib/cjs/components/UserChangeAddressDialog/UserChangeAddressDialog.js +85 -0
- package/lib/cjs/components/UserChangeAddressDialog/constants.d.ts +1 -0
- package/lib/cjs/components/UserChangeAddressDialog/constants.js +4 -0
- package/lib/cjs/components/UserChangeAddressDialog/index.d.ts +3 -0
- package/lib/cjs/components/UserChangeAddressDialog/index.js +5 -0
- package/lib/cjs/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +6 -6
- package/lib/cjs/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -5
- package/lib/cjs/components/UserConnectionsWidget/UserConnectionsWidget.js +8 -5
- package/lib/cjs/components/UserCounters/UserCounters.js +20 -17
- package/lib/cjs/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +9 -6
- package/lib/cjs/components/UserPaymentMethods/Skeleton.d.ts +15 -0
- package/lib/cjs/components/UserPaymentMethods/Skeleton.js +49 -0
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.d.ts +19 -0
- package/lib/cjs/components/UserPaymentMethods/UserPaymentMethods.js +338 -0
- package/lib/cjs/components/UserPaymentMethods/constants.d.ts +1 -0
- package/lib/cjs/components/UserPaymentMethods/constants.js +4 -0
- package/lib/cjs/components/UserPaymentMethods/index.d.ts +4 -0
- package/lib/cjs/components/UserPaymentMethods/index.js +8 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/Skeleton.d.ts +22 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/Skeleton.js +37 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.d.ts +44 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.js +103 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/constants.d.ts +1 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/constants.js +4 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/index.d.ts +4 -0
- package/lib/cjs/components/UserPaymentMethodsPortal/index.js +8 -0
- package/lib/cjs/components/UserSuggestionWidget/UserSuggestionWidget.js +7 -5
- package/lib/cjs/constants/Billing.d.ts +10 -0
- package/lib/cjs/constants/Billing.js +60 -0
- package/lib/cjs/constants/ContributionsActionsMenu.d.ts +1 -0
- package/lib/cjs/constants/ContributionsActionsMenu.js +2 -1
- package/lib/cjs/constants/Country.d.ts +5 -0
- package/lib/cjs/constants/Country.js +271 -0
- package/lib/cjs/constants/DefaultDrawerContent.d.ts +1 -0
- package/lib/cjs/constants/DefaultDrawerContent.js +4 -0
- package/lib/cjs/constants/Payments.d.ts +4 -0
- package/lib/cjs/constants/Payments.js +7 -0
- package/lib/cjs/index.d.ts +23 -1
- package/lib/cjs/index.js +54 -2
- package/lib/cjs/shared/AutoPlayer/index.d.ts +0 -5
- package/lib/cjs/shared/AutoPlayer/index.js +5 -4
- package/lib/cjs/shared/ContributionActionsMenu/index.d.ts +4 -0
- package/lib/cjs/shared/ContributionActionsMenu/index.js +56 -5
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
- package/lib/cjs/shared/CourseUsersTable/SeeProgressButton.js +3 -1
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.d.ts +44 -0
- package/lib/cjs/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +53 -0
- package/lib/cjs/shared/HiddenPurchasableContent/index.d.ts +3 -0
- package/lib/cjs/shared/HiddenPurchasableContent/index.js +5 -0
- package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.d.ts +2 -1
- package/lib/cjs/shared/Media/File/DisplayComponent.js +58 -32
- package/lib/cjs/shared/Media/File/DocComponent.d.ts +10 -0
- package/lib/cjs/shared/Media/File/DocComponent.js +34 -0
- package/lib/cjs/shared/Media/File/PreviewComponent.d.ts +2 -2
- package/lib/cjs/shared/Media/File/PreviewComponent.js +15 -17
- package/lib/cjs/shared/Media/File/TriggerButton.js +14 -1
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/File/filter.d.ts +2 -2
- package/lib/cjs/shared/Media/File/filter.js +5 -1
- package/lib/cjs/shared/Media/File/index.js +2 -2
- package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
- package/lib/cjs/shared/Tags/index.js +7 -3
- package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/cjs/types/composer.d.ts +1 -1
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/index.js +5 -1
- package/lib/cjs/types/payment.d.ts +25 -0
- package/lib/cjs/types/payment.js +29 -0
- package/lib/cjs/utils/address.d.ts +10 -0
- package/lib/cjs/utils/address.js +24 -0
- package/lib/cjs/utils/checkout.d.ts +2 -0
- package/lib/cjs/utils/checkout.js +23 -0
- package/lib/cjs/utils/payment.d.ts +17 -0
- package/lib/cjs/utils/payment.js +69 -0
- package/lib/esm/assets/checkout/general.d.ts +2 -0
- package/lib/esm/assets/checkout/general.js +1 -0
- package/lib/esm/assets/checkout/success.d.ts +2 -0
- package/lib/esm/assets/checkout/success.js +1 -0
- package/lib/esm/assets/custom/formazione.d.ts +2 -0
- package/lib/esm/assets/custom/formazione.js +1 -0
- package/lib/esm/components/AcceptRequestUserEventButton/AcceptRequestUserEventButton.js +20 -2
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.d.ts +61 -0
- package/lib/esm/components/AcceptRequestUserGroupButton/AcceptRequestUserGroupButton.js +103 -0
- package/lib/esm/components/AcceptRequestUserGroupButton/index.d.ts +3 -0
- package/lib/esm/components/AcceptRequestUserGroupButton/index.js +2 -0
- package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/esm/components/BottomNavigation/BottomNavigation.js +2 -2
- package/lib/esm/components/BuyButton/BuyButton.d.ts +73 -0
- package/lib/esm/components/BuyButton/BuyButton.js +193 -0
- package/lib/esm/components/BuyButton/index.d.ts +3 -0
- package/lib/esm/components/BuyButton/index.js +2 -0
- package/lib/esm/components/CategoriesSuggestionWidget/CategoriesSuggestionWidget.js +6 -4
- package/lib/esm/components/Category/Category.d.ts +5 -0
- package/lib/esm/components/Category/Category.js +5 -5
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.d.ts +4 -0
- package/lib/esm/components/CategoryFollowButton/CategoryFollowButton.js +34 -8
- package/lib/esm/components/CategoryHeader/CategoryHeader.js +7 -2
- package/lib/esm/components/CategoryTrendingUsersWidget/CategoryTrendingUsersWidget.js +9 -2
- package/lib/esm/components/Checkout/Checkout.d.ts +14 -0
- package/lib/esm/components/Checkout/Checkout.js +128 -0
- package/lib/esm/components/Checkout/CheckoutHeaderInfoWidget.d.ts +8 -0
- package/lib/esm/components/Checkout/CheckoutHeaderInfoWidget.js +30 -0
- package/lib/esm/components/Checkout/Skeleton.d.ts +21 -0
- package/lib/esm/components/Checkout/Skeleton.js +84 -0
- package/lib/esm/components/Checkout/constants.d.ts +1 -0
- package/lib/esm/components/Checkout/constants.js +1 -0
- package/lib/esm/components/Checkout/index.d.ts +3 -0
- package/lib/esm/components/Checkout/index.js +2 -0
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.d.ts +10 -0
- package/lib/esm/components/CheckoutReturnDialog/CheckoutReturnDialog.js +168 -0
- package/lib/esm/components/CheckoutReturnDialog/index.d.ts +3 -0
- package/lib/esm/components/CheckoutReturnDialog/index.js +2 -0
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.d.ts +8 -0
- package/lib/esm/components/CommunityPaywalls/CommunityPaywalls.js +66 -0
- package/lib/esm/components/CommunityPaywalls/Skeleton.d.ts +27 -0
- package/lib/esm/components/CommunityPaywalls/Skeleton.js +50 -0
- package/lib/esm/components/CommunityPaywalls/constants.d.ts +1 -0
- package/lib/esm/components/CommunityPaywalls/constants.js +1 -0
- package/lib/esm/components/CommunityPaywalls/index.d.ts +4 -0
- package/lib/esm/components/CommunityPaywalls/index.js +4 -0
- package/lib/esm/components/Composer/Composer.d.ts +1 -0
- package/lib/esm/components/Composer/Composer.js +82 -18
- package/lib/esm/components/Composer/Content/ContentDiscussion/ContentDiscussion.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPoll/ContentPoll.js +2 -2
- package/lib/esm/components/Composer/Content/ContentPost/ContentPost.js +2 -2
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +20 -13
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.d.ts +9 -0
- package/lib/esm/components/Composer/Layer/ScheduledLayer/ScheduledLayer.js +59 -0
- package/lib/esm/components/Composer/Layer/ScheduledLayer/index.d.ts +3 -0
- package/lib/esm/components/Composer/Layer/ScheduledLayer/index.js +2 -0
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.js +2 -1
- package/lib/esm/components/ConnectionUserButton/ConnectionUserButton.js +6 -0
- package/lib/esm/components/Course/Course.d.ts +5 -0
- package/lib/esm/components/Course/Course.js +3 -3
- package/lib/esm/components/CourseDashboard/Header.d.ts +2 -2
- package/lib/esm/components/CourseDashboard/Header.js +10 -3
- package/lib/esm/components/CourseDashboard/Student.d.ts +2 -2
- package/lib/esm/components/CourseDashboard/Student.js +19 -8
- package/lib/esm/components/CourseForm/CourseForm.d.ts +5 -0
- package/lib/esm/components/CourseForm/CourseForm.js +38 -7
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.d.ts +1 -6
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +9 -7
- package/lib/esm/components/CreateCourseButton/CreateCourseButton.js +1 -1
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.d.ts +10 -0
- package/lib/esm/components/CreatePaymentProductForm/CreatePaymentProductForm.js +141 -0
- package/lib/esm/components/CreatePaymentProductForm/constants.d.ts +1 -0
- package/lib/esm/components/CreatePaymentProductForm/constants.js +1 -0
- package/lib/esm/components/CreatePaymentProductForm/index.d.ts +3 -0
- package/lib/esm/components/CreatePaymentProductForm/index.js +2 -0
- package/lib/esm/components/EditEventButton/EditEventButton.js +1 -0
- package/lib/esm/components/Editor/Editor.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/esm/components/Event/Event.d.ts +5 -0
- package/lib/esm/components/Event/Event.js +2 -2
- package/lib/esm/components/EventForm/EventForm.js +49 -18
- package/lib/esm/components/EventForm/types.d.ts +8 -5
- package/lib/esm/components/EventFormDialog/EventFormDialog.js +7 -1
- package/lib/esm/components/EventHeader/EventHeader.js +14 -5
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +28 -5
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/EventMembersWidget.js +11 -2
- package/lib/esm/components/EventMembersWidget/TabContentComponent.js +14 -4
- package/lib/esm/components/EventSubscribeButton/EventSubscribeButton.js +20 -9
- package/lib/esm/components/Feed/Feed.d.ts +2 -2
- package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
- package/lib/esm/components/FeedObject/Activities/Activities.js +1 -1
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +2 -1
- package/lib/esm/components/FeedObject/FeedObject.js +17 -7
- package/lib/esm/components/FeedObject/Poll/Choice/Choice.js +1 -1
- package/lib/esm/components/FeedObject/Poll/Poll.js +1 -1
- package/lib/esm/components/Group/Group.d.ts +6 -1
- package/lib/esm/components/Group/Group.js +3 -3
- package/lib/esm/components/GroupForm/GroupForm.js +39 -9
- package/lib/esm/components/GroupHeader/GroupHeader.js +12 -4
- package/lib/esm/components/GroupMembersWidget/GroupMembersWidget.js +3 -1
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.d.ts +7 -2
- package/lib/esm/components/GroupRequestsWidget/GroupRequestsWidget.js +6 -4
- package/lib/esm/components/GroupSettingsIconButton/GroupSettingsIconButton.js +6 -4
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.d.ts +3 -8
- package/lib/esm/components/GroupSubscribeButton/GroupSubscribeButton.js +32 -10
- package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.js +3 -2
- package/lib/esm/components/LiveStreamForm/types.d.ts +3 -3
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
- package/lib/esm/components/LiveStreamRoom/types.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.d.ts +1 -0
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +44 -6
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +6 -0
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +1 -1
- package/lib/esm/components/NavigationSettingsIconButton/NavigationSettingsIconButton.js +29 -6
- package/lib/esm/components/NavigationToolbar/NavigationToolbar.js +8 -3
- package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +1 -1
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.d.ts +6 -0
- package/lib/esm/components/PaymentDetailDialog/PaymentDetailDialog.js +37 -0
- package/lib/esm/components/PaymentDetailDialog/index.d.ts +3 -0
- package/lib/esm/components/PaymentDetailDialog/index.js +2 -0
- package/lib/esm/components/PaymentOrder/PaymentOrder.d.ts +10 -0
- package/lib/esm/components/PaymentOrder/PaymentOrder.js +77 -0
- package/lib/esm/components/PaymentOrder/Skeleton.d.ts +30 -0
- package/lib/esm/components/PaymentOrder/Skeleton.js +58 -0
- package/lib/esm/components/PaymentOrder/constants.d.ts +1 -0
- package/lib/esm/components/PaymentOrder/constants.js +1 -0
- package/lib/esm/components/PaymentOrder/index.d.ts +3 -0
- package/lib/esm/components/PaymentOrder/index.js +2 -0
- package/lib/esm/components/PaymentOrderPdfButton/PaymentOrderPdfButton.d.ts +52 -0
- package/lib/esm/components/PaymentOrderPdfButton/PaymentOrderPdfButton.js +71 -0
- package/lib/esm/components/PaymentOrderPdfButton/index.d.ts +3 -0
- package/lib/esm/components/PaymentOrderPdfButton/index.js +2 -0
- package/lib/esm/components/PaymentOrders/PaymentOrders.d.ts +17 -0
- package/lib/esm/components/PaymentOrders/PaymentOrders.js +261 -0
- package/lib/esm/components/PaymentOrders/index.d.ts +3 -0
- package/lib/esm/components/PaymentOrders/index.js +2 -0
- package/lib/esm/components/PaymentProduct/PaymentProduct.d.ts +18 -0
- package/lib/esm/components/PaymentProduct/PaymentProduct.js +45 -0
- package/lib/esm/components/PaymentProduct/Skeleton.d.ts +25 -0
- package/lib/esm/components/PaymentProduct/Skeleton.js +52 -0
- package/lib/esm/components/PaymentProduct/constants.d.ts +1 -0
- package/lib/esm/components/PaymentProduct/constants.js +1 -0
- package/lib/esm/components/PaymentProduct/index.d.ts +3 -0
- package/lib/esm/components/PaymentProduct/index.js +2 -0
- package/lib/esm/components/PaymentProductPrice/PaymentProductPrice.d.ts +15 -0
- package/lib/esm/components/PaymentProductPrice/PaymentProductPrice.js +58 -0
- package/lib/esm/components/PaymentProductPrice/Skeleton.d.ts +21 -0
- package/lib/esm/components/PaymentProductPrice/Skeleton.js +42 -0
- package/lib/esm/components/PaymentProductPrice/constants.d.ts +1 -0
- package/lib/esm/components/PaymentProductPrice/constants.js +1 -0
- package/lib/esm/components/PaymentProductPrice/index.d.ts +3 -0
- package/lib/esm/components/PaymentProductPrice/index.js +2 -0
- package/lib/esm/components/PaymentProducts/PaymentProducts.d.ts +11 -0
- package/lib/esm/components/PaymentProducts/PaymentProducts.js +73 -0
- package/lib/esm/components/PaymentProducts/Skeleton.d.ts +21 -0
- package/lib/esm/components/PaymentProducts/Skeleton.js +43 -0
- package/lib/esm/components/PaymentProducts/constants.d.ts +1 -0
- package/lib/esm/components/PaymentProducts/constants.js +1 -0
- package/lib/esm/components/PaymentProducts/index.d.ts +3 -0
- package/lib/esm/components/PaymentProducts/index.js +2 -0
- package/lib/esm/components/Paywalls/Paywalls.d.ts +10 -0
- package/lib/esm/components/Paywalls/Paywalls.js +91 -0
- package/lib/esm/components/Paywalls/Skeleton.d.ts +21 -0
- package/lib/esm/components/Paywalls/Skeleton.js +43 -0
- package/lib/esm/components/Paywalls/constants.d.ts +1 -0
- package/lib/esm/components/Paywalls/constants.js +1 -0
- package/lib/esm/components/Paywalls/index.d.ts +3 -0
- package/lib/esm/components/Paywalls/index.js +2 -0
- package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.d.ts +13 -0
- package/lib/esm/components/PaywallsConfigurator/PaywallsConfigurator.js +249 -0
- package/lib/esm/components/PaywallsConfigurator/Skeleton.d.ts +21 -0
- package/lib/esm/components/PaywallsConfigurator/Skeleton.js +43 -0
- package/lib/esm/components/PaywallsConfigurator/constants.d.ts +5 -0
- package/lib/esm/components/PaywallsConfigurator/constants.js +6 -0
- package/lib/esm/components/PaywallsConfigurator/index.d.ts +4 -0
- package/lib/esm/components/PaywallsConfigurator/index.js +4 -0
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.d.ts +8 -0
- package/lib/esm/components/PaywallsDialog/PaywallsDialog.js +40 -0
- package/lib/esm/components/PaywallsDialog/index.d.ts +3 -0
- package/lib/esm/components/PaywallsDialog/index.js +2 -0
- package/lib/esm/components/PdfPreview/PdfPreview.d.ts +8 -0
- package/lib/esm/components/PdfPreview/PdfPreview.js +88 -0
- package/lib/esm/components/PdfPreview/Skeleton.d.ts +5 -0
- package/lib/esm/components/PdfPreview/Skeleton.js +35 -0
- package/lib/esm/components/PdfPreview/index.d.ts +3 -0
- package/lib/esm/components/PdfPreview/index.js +2 -0
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.d.ts +11 -0
- package/lib/esm/components/PdfPreviewDialog/PdfPreviewDialog.js +60 -0
- package/lib/esm/components/PdfPreviewDialog/index.d.ts +3 -0
- package/lib/esm/components/PdfPreviewDialog/index.js +2 -0
- package/lib/esm/components/PrivateMessageComponent/PrivateMessageComponent.js +4 -3
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/esm/components/PrivateMessageThreadItem/PrivateMessageThreadItem.js +4 -4
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +2 -10
- package/lib/esm/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.d.ts +41 -0
- package/lib/esm/components/UserAddPaymentMethodDialog/UserAddPaymentMethodDialog.js +91 -0
- package/lib/esm/components/UserAddPaymentMethodDialog/constants.d.ts +1 -0
- package/lib/esm/components/UserAddPaymentMethodDialog/constants.js +1 -0
- package/lib/esm/components/UserAddPaymentMethodDialog/index.d.ts +3 -0
- package/lib/esm/components/UserAddPaymentMethodDialog/index.js +2 -0
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.d.ts +40 -0
- package/lib/esm/components/UserAddPaymentMethodForm/UserAddPaymentMethodForm.js +140 -0
- package/lib/esm/components/UserAddPaymentMethodForm/constants.d.ts +1 -0
- package/lib/esm/components/UserAddPaymentMethodForm/constants.js +1 -0
- package/lib/esm/components/UserAddPaymentMethodForm/index.d.ts +3 -0
- package/lib/esm/components/UserAddPaymentMethodForm/index.js +2 -0
- package/lib/esm/components/UserBillingInfo/Skeleton.d.ts +25 -0
- package/lib/esm/components/UserBillingInfo/Skeleton.js +9 -0
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.d.ts +35 -0
- package/lib/esm/components/UserBillingInfo/UserBillingInfo.js +490 -0
- package/lib/esm/components/UserBillingInfo/constants.d.ts +1 -0
- package/lib/esm/components/UserBillingInfo/constants.js +1 -0
- package/lib/esm/components/UserBillingInfo/index.d.ts +4 -0
- package/lib/esm/components/UserBillingInfo/index.js +4 -0
- package/lib/esm/components/UserBillingInfo/reducer.d.ts +77 -0
- package/lib/esm/components/UserBillingInfo/reducer.js +91 -0
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.d.ts +44 -0
- package/lib/esm/components/UserChangeAddressDialog/UserChangeAddressDialog.js +82 -0
- package/lib/esm/components/UserChangeAddressDialog/constants.d.ts +1 -0
- package/lib/esm/components/UserChangeAddressDialog/constants.js +1 -0
- package/lib/esm/components/UserChangeAddressDialog/index.d.ts +3 -0
- package/lib/esm/components/UserChangeAddressDialog/index.js +2 -0
- package/lib/esm/components/UserConnectionsRequestsSentWidget/UserConnectionsRequestsSentWidget.js +6 -6
- package/lib/esm/components/UserConnectionsRequestsWidget/UserConnectionsRequestsWidget.js +5 -5
- package/lib/esm/components/UserConnectionsWidget/UserConnectionsWidget.js +8 -5
- package/lib/esm/components/UserCounters/UserCounters.js +20 -17
- package/lib/esm/components/UserFollowedCategoriesWidget/UserFollowedCategoriesWidget.js +11 -8
- package/lib/esm/components/UserPaymentMethods/Skeleton.d.ts +15 -0
- package/lib/esm/components/UserPaymentMethods/Skeleton.js +47 -0
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.d.ts +19 -0
- package/lib/esm/components/UserPaymentMethods/UserPaymentMethods.js +336 -0
- package/lib/esm/components/UserPaymentMethods/constants.d.ts +1 -0
- package/lib/esm/components/UserPaymentMethods/constants.js +1 -0
- package/lib/esm/components/UserPaymentMethods/index.d.ts +4 -0
- package/lib/esm/components/UserPaymentMethods/index.js +4 -0
- package/lib/esm/components/UserPaymentMethodsPortal/Skeleton.d.ts +22 -0
- package/lib/esm/components/UserPaymentMethodsPortal/Skeleton.js +35 -0
- package/lib/esm/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.d.ts +44 -0
- package/lib/esm/components/UserPaymentMethodsPortal/UserPaymentMethodsPortal.js +100 -0
- package/lib/esm/components/UserPaymentMethodsPortal/constants.d.ts +1 -0
- package/lib/esm/components/UserPaymentMethodsPortal/constants.js +1 -0
- package/lib/esm/components/UserPaymentMethodsPortal/index.d.ts +4 -0
- package/lib/esm/components/UserPaymentMethodsPortal/index.js +4 -0
- package/lib/esm/components/UserSuggestionWidget/UserSuggestionWidget.js +7 -5
- package/lib/esm/constants/Billing.d.ts +10 -0
- package/lib/esm/constants/Billing.js +57 -0
- package/lib/esm/constants/ContributionsActionsMenu.d.ts +1 -0
- package/lib/esm/constants/ContributionsActionsMenu.js +1 -0
- package/lib/esm/constants/Country.d.ts +5 -0
- package/lib/esm/constants/Country.js +268 -0
- package/lib/esm/constants/DefaultDrawerContent.d.ts +1 -0
- package/lib/esm/constants/DefaultDrawerContent.js +1 -0
- package/lib/esm/constants/Payments.d.ts +4 -0
- package/lib/esm/constants/Payments.js +4 -0
- package/lib/esm/index.d.ts +23 -1
- package/lib/esm/index.js +23 -1
- package/lib/esm/shared/AutoPlayer/index.d.ts +0 -5
- package/lib/esm/shared/AutoPlayer/index.js +5 -4
- package/lib/esm/shared/ContributionActionsMenu/index.d.ts +4 -0
- package/lib/esm/shared/ContributionActionsMenu/index.js +58 -7
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
- package/lib/esm/shared/CourseUsersTable/SeeProgressButton.js +5 -3
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.d.ts +44 -0
- package/lib/esm/shared/HiddenPurchasableContent/HiddenPurchasableContent.js +50 -0
- package/lib/esm/shared/HiddenPurchasableContent/index.d.ts +3 -0
- package/lib/esm/shared/HiddenPurchasableContent/index.js +2 -0
- package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/esm/shared/Media/File/DisplayComponent.d.ts +2 -1
- package/lib/esm/shared/Media/File/DisplayComponent.js +60 -33
- package/lib/esm/shared/Media/File/DocComponent.d.ts +10 -0
- package/lib/esm/shared/Media/File/DocComponent.js +31 -0
- package/lib/esm/shared/Media/File/PreviewComponent.d.ts +2 -2
- package/lib/esm/shared/Media/File/PreviewComponent.js +17 -19
- package/lib/esm/shared/Media/File/TriggerButton.js +14 -1
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/File/filter.d.ts +2 -2
- package/lib/esm/shared/Media/File/filter.js +2 -1
- package/lib/esm/shared/Media/File/index.js +2 -2
- package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/esm/shared/StickyBox/index.d.ts +4 -4
- package/lib/esm/shared/Tags/index.js +7 -3
- package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/esm/types/composer.d.ts +1 -1
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/index.js +2 -1
- package/lib/esm/types/payment.d.ts +25 -0
- package/lib/esm/types/payment.js +26 -0
- package/lib/esm/utils/address.d.ts +10 -0
- package/lib/esm/utils/address.js +19 -0
- package/lib/esm/utils/checkout.d.ts +2 -0
- package/lib/esm/utils/checkout.js +19 -0
- package/lib/esm/utils/payment.d.ts +17 -0
- package/lib/esm/utils/payment.js +62 -0
- package/lib/umd/{c473ce30406a3dad83e1.eot → 30b299174b4fa1fb9ce8.eot} +0 -0
- package/lib/umd/362.js +2 -0
- package/lib/umd/{ba74e493633796d551d1.ttf → 3b49304a98beb1239bc7.ttf} +0 -0
- package/lib/umd/ab247f43e550f5f6d0f8.woff2 +0 -0
- package/lib/umd/assets/icons.svg +75 -69
- package/lib/umd/{b6dbec3d5816ff8baef1.woff → ce10db0c87e7112cb315.woff} +0 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +15 -8
- package/lib/umd/578.js +0 -2
- package/lib/umd/60a7fdeaadfe844bc015.woff2 +0 -0
- /package/lib/umd/{578.js.LICENSE.txt → 362.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Grid, useMediaQuery, useTheme, styled } from '@mui/material';
|
|
4
|
+
import { PREFIX } from './constants';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import PaymentProductSkeleton from '../PaymentProduct/Skeleton';
|
|
7
|
+
const classes = {
|
|
8
|
+
root: `${PREFIX}-skeleton-root`,
|
|
9
|
+
products: `${PREFIX}-products`
|
|
10
|
+
};
|
|
11
|
+
const Root = styled(Box, {
|
|
12
|
+
name: PREFIX,
|
|
13
|
+
slot: 'SkeletonRoot'
|
|
14
|
+
})(() => ({
|
|
15
|
+
overflow: 'hidden'
|
|
16
|
+
}));
|
|
17
|
+
/**
|
|
18
|
+
* > API documentation for the Community-JS PaywallsConfiguratorSkeleton component. Learn about the available props and the CSS API.
|
|
19
|
+
|
|
20
|
+
#### Import
|
|
21
|
+
|
|
22
|
+
```jsx
|
|
23
|
+
import {PaywallsConfiguratorSkeleton} from '@selfcommunity/react-ui';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Component Name
|
|
27
|
+
|
|
28
|
+
The name `SCPaywallsConfiguratorSkeleton-skeleton-root` can be used when providing style overrides in the theme.
|
|
29
|
+
|
|
30
|
+
#### CSS
|
|
31
|
+
|
|
32
|
+
|Rule Name|Global class|Description|
|
|
33
|
+
|---|---|---|
|
|
34
|
+
|root|.SCPaywallsConfiguratorSkeleton-skeleton-root|Styles applied to the root element.|
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export default function PaywallsConfiguratorSkeleton(inProps) {
|
|
38
|
+
const { className, PaymentProductSkeletonProps = {} } = inProps, rest = __rest(inProps, ["className", "PaymentProductSkeletonProps"]);
|
|
39
|
+
// HOOKS
|
|
40
|
+
const theme = useTheme();
|
|
41
|
+
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
|
42
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.products }, { children: [...Array(isMobile ? 1 : 2)].map((product, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12 }, { children: _jsx(PaymentProductSkeleton, Object.assign({ elevation: 0, variant: 'outlined' }, PaymentProductSkeletonProps)) }), index))) })) })));
|
|
43
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
2
|
+
import { PaywallsProps } from '../Paywalls/Paywalls';
|
|
3
|
+
export interface PaywallsDialogProps extends BaseDialogProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
PaywallsComponentProps: PaywallsProps;
|
|
6
|
+
disableInitialTransition?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function PaywallsDialog(inProps: PaywallsDialogProps): JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Slide, styled } from '@mui/material';
|
|
5
|
+
import { useThemeProps } from '@mui/system';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import BaseDialog from '../../shared/BaseDialog';
|
|
8
|
+
import { FormattedMessage } from 'react-intl';
|
|
9
|
+
import { useSCPaymentsEnabled } from '@selfcommunity/react-core';
|
|
10
|
+
import Paywalls from '../Paywalls';
|
|
11
|
+
const PREFIX = 'SCPaywallsDialog';
|
|
12
|
+
const classes = {
|
|
13
|
+
root: `${PREFIX}-root`
|
|
14
|
+
};
|
|
15
|
+
const Root = styled(BaseDialog, {
|
|
16
|
+
slot: 'Root',
|
|
17
|
+
name: PREFIX
|
|
18
|
+
})(({ theme }) => ({}));
|
|
19
|
+
const Transition = React.forwardRef(function Transition(props, ref) {
|
|
20
|
+
return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
|
|
21
|
+
});
|
|
22
|
+
const NoTransition = React.forwardRef(function NoTransition(props, ref) {
|
|
23
|
+
return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
|
|
24
|
+
});
|
|
25
|
+
export default function PaywallsDialog(inProps) {
|
|
26
|
+
var _a;
|
|
27
|
+
// PROPS
|
|
28
|
+
const props = useThemeProps({
|
|
29
|
+
props: inProps,
|
|
30
|
+
name: PREFIX
|
|
31
|
+
});
|
|
32
|
+
const { className, PaywallsComponentProps, disableInitialTransition = false } = props, rest = __rest(props, ["className", "PaywallsComponentProps", "disableInitialTransition"]);
|
|
33
|
+
// HOOKS
|
|
34
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
35
|
+
if (!isPaymentsEnabled) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return (_jsx(Root, Object.assign({ maxWidth: 'sm', fullWidth: true, title: (PaywallsComponentProps && ((_a = PaywallsComponentProps.prefetchedPaymentContentStatus) === null || _a === void 0 ? void 0 : _a.payment_order)) ||
|
|
39
|
+
(PaywallsComponentProps.content && PaywallsComponentProps.content.payment_order) ? (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title.purchased", defaultMessage: "ui.paywallsDialog.title.purchased" })) : (_jsx(FormattedMessage, { id: "ui.paywallsDialog.title", defaultMessage: "ui.paywallsDialog.title" })), scroll: 'paper', open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), TransitionComponent: Transition, DialogContentProps: { dividers: false } }, rest, { children: _jsx(Paywalls, Object.assign({}, PaywallsComponentProps)) })));
|
|
40
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export declare const PdfMaxWidth = 1280;
|
|
3
|
+
export interface PdfPreviewProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
pdfUrl?: string;
|
|
6
|
+
maxWidth?: number;
|
|
7
|
+
}
|
|
8
|
+
export default function PdfPreview(inProps: PdfPreviewProps): ReactElement | null;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { __awaiter, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
import { Box, styled } from '@mui/material';
|
|
5
|
+
import { useThemeProps } from '@mui/system';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import { Document, Page, pdfjs } from 'react-pdf';
|
|
8
|
+
import { Logger } from '@selfcommunity/utils';
|
|
9
|
+
import Skeleton from './Skeleton';
|
|
10
|
+
import { http } from '@selfcommunity/api-services';
|
|
11
|
+
import { useResizeObserver, useSCUser } from '@selfcommunity/react-core';
|
|
12
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
pdfjs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.min.js', import.meta.url).toString();
|
|
16
|
+
const PREFIX = 'SCPdfPreview';
|
|
17
|
+
const classes = {
|
|
18
|
+
root: `${PREFIX}-root`,
|
|
19
|
+
documentPdfWrapper: `${PREFIX}-document-pdf-wrapper`,
|
|
20
|
+
documentPdfLink: `${PREFIX}-document-pdf-link`,
|
|
21
|
+
documentPdf: `${PREFIX}-document-pdf`,
|
|
22
|
+
documentPdfPage: `${PREFIX}-document-pdf-page`
|
|
23
|
+
};
|
|
24
|
+
const Root = styled(Box, {
|
|
25
|
+
name: PREFIX,
|
|
26
|
+
slot: 'Root',
|
|
27
|
+
overridesResolver: (props, styles) => styles.root
|
|
28
|
+
})(({ theme }) => ({}));
|
|
29
|
+
// Default options conf PDFViewer
|
|
30
|
+
const options = {
|
|
31
|
+
cMapUrl: '/cmaps/',
|
|
32
|
+
standardFontDataUrl: '/standard_fonts/',
|
|
33
|
+
externalLinkTarget: '_blank',
|
|
34
|
+
loading: _jsx(Skeleton, {})
|
|
35
|
+
};
|
|
36
|
+
export const PdfMaxWidth = 1280;
|
|
37
|
+
const resizeObserverOptions = {};
|
|
38
|
+
export default function PdfPreview(inProps) {
|
|
39
|
+
// PROPS
|
|
40
|
+
const props = useThemeProps({
|
|
41
|
+
props: inProps,
|
|
42
|
+
name: PREFIX
|
|
43
|
+
});
|
|
44
|
+
const { className, pdfUrl, maxWidth = PdfMaxWidth } = props, rest = __rest(props, ["className", "pdfUrl", "maxWidth"]);
|
|
45
|
+
// STATE
|
|
46
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
47
|
+
const [url, setUrl] = useState(null);
|
|
48
|
+
const [numPages, setNumPages] = useState();
|
|
49
|
+
const [containerRef, setContainerRef] = useState(null);
|
|
50
|
+
const [containerWidth, setContainerWidth] = useState(maxWidth);
|
|
51
|
+
// CONTEXT
|
|
52
|
+
const scUserContext = useSCUser();
|
|
53
|
+
const onResize = useCallback((entries) => {
|
|
54
|
+
const [entry] = entries;
|
|
55
|
+
if (entry) {
|
|
56
|
+
setContainerWidth(entry.contentRect.width);
|
|
57
|
+
}
|
|
58
|
+
}, []);
|
|
59
|
+
useResizeObserver(containerRef, resizeObserverOptions, onResize);
|
|
60
|
+
function onDocumentLoadSuccess({ numPages: nextNumPages }) {
|
|
61
|
+
setNumPages(nextNumPages);
|
|
62
|
+
setIsLoading(false);
|
|
63
|
+
}
|
|
64
|
+
const fetchBlob = useCallback((url) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield http.request({ url, responseType: 'blob' });
|
|
66
|
+
return response.data;
|
|
67
|
+
}), [scUserContext.user, scUserContext.session]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (pdfUrl) {
|
|
70
|
+
fetchBlob(pdfUrl)
|
|
71
|
+
.then((res) => {
|
|
72
|
+
const blob = new Blob([res], { type: 'application/pdf' });
|
|
73
|
+
const _url = URL.createObjectURL(blob);
|
|
74
|
+
setUrl(_url);
|
|
75
|
+
setIsLoading(false);
|
|
76
|
+
})
|
|
77
|
+
.catch((error) => {
|
|
78
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}, [scUserContext.user, scUserContext.session]);
|
|
82
|
+
function renderDocument() {
|
|
83
|
+
return (_jsx(Document, Object.assign({ onLoadSuccess: onDocumentLoadSuccess, loading: _jsx(Skeleton, {}), file: url, className: classes.documentPdf, options: options }, { children: Array.from({ length: numPages }, (el, index) => {
|
|
84
|
+
return (_jsx(Page, { className: classes.documentPdfPage, pageNumber: index + 1, width: containerWidth ? Math.min(containerWidth, maxWidth) : maxWidth, renderTextLayer: false }, `page_${index + 1}`));
|
|
85
|
+
}) })));
|
|
86
|
+
}
|
|
87
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Box, Object.assign({ className: classes.documentPdfWrapper, ref: setContainerRef }, { children: isLoading || !pdfUrl ? (_jsx(Box, Object.assign({ className: classes.documentPdfPage }, { children: _jsx(Skeleton, { maxWidth: maxWidth }) }))) : (_jsx(_Fragment, { children: renderDocument() })) })) })));
|
|
88
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box, CircularProgress, Skeleton, styled } from '@mui/material';
|
|
4
|
+
import { useThemeProps } from '@mui/system';
|
|
5
|
+
import { PdfMaxWidth } from './PdfPreview';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
const PREFIX = 'PdfPreviewSkeleton';
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${PREFIX}-root`,
|
|
10
|
+
circularProgress: `${PREFIX}-circular-progress`
|
|
11
|
+
};
|
|
12
|
+
const Root = styled(Box, {
|
|
13
|
+
name: PREFIX,
|
|
14
|
+
slot: 'Root',
|
|
15
|
+
overridesResolver: (props, styles) => styles.root
|
|
16
|
+
})(({ theme }) => ({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
width: '100%',
|
|
22
|
+
minHeight: 400,
|
|
23
|
+
[`& .${classes.circularProgress}`]: {
|
|
24
|
+
position: 'absolute'
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
export default function PdfPreviewSkeleton(inProps) {
|
|
28
|
+
// PROPS
|
|
29
|
+
const props = useThemeProps({
|
|
30
|
+
props: inProps,
|
|
31
|
+
name: PREFIX
|
|
32
|
+
});
|
|
33
|
+
const { className, maxWidth = PdfMaxWidth } = props, rest = __rest(props, ["className", "maxWidth"]);
|
|
34
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), sx: { width: maxWidth } }, rest, { children: [maxWidth < 1024 && _jsx(Skeleton, { variant: "rounded", sx: { height: (maxWidth * 3.508) / 2.48, width: maxWidth } }), _jsx(CircularProgress, { color: "primary", className: classes.circularProgress })] })));
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
3
|
+
import { PdfPreviewProps } from '../PdfPreview';
|
|
4
|
+
export interface PdfPreviewDialogProps extends BaseDialogProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
title: string | React.ReactElement;
|
|
7
|
+
PdfPreviewComponentProps: PdfPreviewProps;
|
|
8
|
+
pdfUrl: string;
|
|
9
|
+
disableInitialTransition?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export default function PdfPreviewDialog(inProps: PdfPreviewDialogProps): JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __awaiter, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { AppBar, Grid, IconButton, Slide, Icon, Toolbar, Typography, styled } from '@mui/material';
|
|
5
|
+
import { useThemeProps } from '@mui/system';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import { useSCPaymentsEnabled } from '@selfcommunity/react-core';
|
|
8
|
+
import BaseDialog from '../../shared/BaseDialog';
|
|
9
|
+
import PdfPreview from '../PdfPreview';
|
|
10
|
+
import { http } from '@selfcommunity/api-services';
|
|
11
|
+
import { Logger } from '@selfcommunity/utils';
|
|
12
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
13
|
+
const PREFIX = 'SCPdfPreviewDialog';
|
|
14
|
+
const classes = {
|
|
15
|
+
root: `${PREFIX}-root`,
|
|
16
|
+
content: `${PREFIX}-content`
|
|
17
|
+
};
|
|
18
|
+
const Root = styled(BaseDialog, {
|
|
19
|
+
slot: 'Root',
|
|
20
|
+
name: PREFIX
|
|
21
|
+
})(({ theme }) => ({}));
|
|
22
|
+
const Transition = React.forwardRef(function Transition(props, ref) {
|
|
23
|
+
return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
|
|
24
|
+
});
|
|
25
|
+
const NoTransition = React.forwardRef(function NoTransition(props, ref) {
|
|
26
|
+
return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
|
|
27
|
+
});
|
|
28
|
+
export default function PdfPreviewDialog(inProps) {
|
|
29
|
+
// PROPS
|
|
30
|
+
const props = useThemeProps({
|
|
31
|
+
props: inProps,
|
|
32
|
+
name: PREFIX
|
|
33
|
+
});
|
|
34
|
+
const { className, title, pdfUrl, disableInitialTransition = false, onClose, PdfPreviewComponentProps = {} } = props, rest = __rest(props, ["className", "title", "pdfUrl", "disableInitialTransition", "onClose", "PdfPreviewComponentProps"]);
|
|
35
|
+
// HOOKS
|
|
36
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
37
|
+
/**
|
|
38
|
+
* handle download pdf
|
|
39
|
+
*/
|
|
40
|
+
const handleDownload = () => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
try {
|
|
42
|
+
const response = yield http.request({ url: pdfUrl, responseType: 'blob' });
|
|
43
|
+
const blob = new Blob([response.data], { type: 'application/pdf' });
|
|
44
|
+
const url = window.URL.createObjectURL(blob);
|
|
45
|
+
const link = document.createElement('a');
|
|
46
|
+
link.href = url;
|
|
47
|
+
link.download = 'order.pdf';
|
|
48
|
+
link.click();
|
|
49
|
+
// Cleanup
|
|
50
|
+
window.URL.revokeObjectURL(url);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
if (!isPaymentsEnabled) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return (_jsxs(Root, Object.assign({ fullScreen: true, scroll: 'paper', open: true, maxWidth: 'md' }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), TransitionComponent: Transition }, rest, { children: [_jsx(AppBar, Object.assign({ sx: { position: 'fixed', top: 0 } }, { children: _jsxs(Toolbar, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "div", sx: { flexGrow: 1 } }, { children: title })), pdfUrl && (_jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: handleDownload, "aria-label": "close" }, { children: _jsx(Icon, { children: "download" }) }))), _jsx(IconButton, Object.assign({ edge: "end", color: "inherit", onClick: onClose, "aria-label": "close", sx: { ml: 2 } }, { children: _jsx(Icon, { children: "close" }) }))] }) })), _jsx(Grid, Object.assign({ container: true, className: classes.content }, { children: _jsx(Grid, Object.assign({ item: true, xs: 12, justifyContent: 'center', alignContent: 'center' }, { children: _jsx(PdfPreview, Object.assign({}, PdfPreviewComponentProps, { pdfUrl: pdfUrl })) })) }))] })));
|
|
60
|
+
}
|
|
@@ -2,10 +2,10 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { Grid, useMediaQuery, useTheme, styled } from '@mui/material';
|
|
5
|
-
import { useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
5
|
+
import { SCPreferences, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useThemeProps } from '@mui/system';
|
|
8
|
-
import {
|
|
8
|
+
import { SCPrivateMessageStatusType, SCPrivateMessageType } from '@selfcommunity/types';
|
|
9
9
|
import PrivateMessageThread from '../PrivateMessageThread';
|
|
10
10
|
import PrivateMessageSnippets from '../PrivateMessageSnippets';
|
|
11
11
|
import { PREFIX } from './constants';
|
|
@@ -78,7 +78,8 @@ export default function PrivateMessageComponent(inProps) {
|
|
|
78
78
|
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;
|
|
79
79
|
};
|
|
80
80
|
// MEMO
|
|
81
|
-
const privateMessagingEnabled = useMemo(() =>
|
|
81
|
+
const privateMessagingEnabled = useMemo(() => SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED in scPreferences.preferences &&
|
|
82
|
+
scPreferences.preferences[SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED].value, [scPreferences.preferences]);
|
|
82
83
|
const authUserId = useMemo(() => (scUserContext.user ? scUserContext.user.id : null), [scUserContext.user]);
|
|
83
84
|
useEffect(() => {
|
|
84
85
|
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
|
|
|
@@ -127,18 +127,18 @@ export default function PrivateMessageThreadItem(inProps) {
|
|
|
127
127
|
let type = m.file.mimetype;
|
|
128
128
|
switch (true) {
|
|
129
129
|
case type.startsWith(SCMessageFileType.IMAGE):
|
|
130
|
-
section = (_jsx(Box, Object.assign({ className: classes.img }, { children: _jsx("img", { src: m.file.thumbnail, loading: "lazy", alt:
|
|
130
|
+
section = (_jsx(Box, Object.assign({ className: classes.img }, { children: _jsx("img", { src: m.file.thumbnail, loading: "lazy", alt: "img", onClick: () => setOpenDialog(true) }) })));
|
|
131
131
|
break;
|
|
132
132
|
case type.startsWith(SCMessageFileType.VIDEO):
|
|
133
133
|
if (!isSupportedVideoFormat(m.file.filename)) {
|
|
134
134
|
section = defaultSection;
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
section = (_jsxs(Box, Object.assign({ className: classNames(classes.img, classes.video) }, { children: [_jsx("img", { src: m.file.thumbnail, loading: "lazy", alt:
|
|
137
|
+
section = (_jsxs(Box, Object.assign({ className: classNames(classes.img, classes.video) }, { children: [_jsx("img", { src: m.file.thumbnail, loading: "lazy", alt: "img" }), _jsx(IconButton, Object.assign({ onClick: () => setOpenDialog(true) }, { children: _jsx(Icon, { children: "play_circle_outline" }) }))] })));
|
|
138
138
|
}
|
|
139
139
|
break;
|
|
140
140
|
case type.startsWith(SCMessageFileType.DOCUMENT):
|
|
141
|
-
section = (_jsxs(Box, Object.assign({ className: m.file.filename.endsWith('.pdf') ? classes.document : classes.other }, { children: [m.file.filename.endsWith('.pdf') && _jsx("img", { src: m.file.thumbnail, loading: "lazy", alt:
|
|
141
|
+
section = (_jsxs(Box, Object.assign({ className: m.file.filename.endsWith('.pdf') ? classes.document : classes.other }, { children: [m.file.filename.endsWith('.pdf') && _jsx("img", { src: m.file.thumbnail, loading: "lazy", alt: "img" }), _jsxs(Button, Object.assign({ onClick: () => handleDownload(m.file), startIcon: _jsx(Icon, { children: "download" }) }, { children: [_jsx(Typography, { children: m.file.filename }), _jsx(Typography, { children: bytesToSize(m.file.filesize) })] }))] })));
|
|
142
142
|
break;
|
|
143
143
|
default:
|
|
144
144
|
// section = <Icon>hide_image</Icon>;
|
|
@@ -159,5 +159,5 @@ export default function PrivateMessageThreadItem(inProps) {
|
|
|
159
159
|
message.status !== SCPrivateMessageStatusType.HIDDEN && _jsx(PrivateMessageSettingsIconButton, { 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 && (_jsx(Typography, Object.assign({ color: "secondary", variant: "h4", className: classes.username }, { children: message.sender.username }))), _jsxs(_Fragment, { children: [hasFile && message.status !== SCPrivateMessageStatusType.HIDDEN ? (renderMessageFile(message)) : (_jsx(Box, Object.assign({ className: classes.text }, { children: _jsx(Typography, { component: "span", dangerouslySetInnerHTML: { __html: message.message } }) }))), _jsx(Typography, Object.assign({ className: classes.messageTime, color: "text.secondary" }, { children: `${intl.formatDate(message.created_at, {
|
|
160
160
|
hour: 'numeric',
|
|
161
161
|
minute: 'numeric'
|
|
162
|
-
})}` }))] }), openDialog && (_jsx(_Fragment, { children: (message === null || message === void 0 ? void 0 : message.file.mimetype.startsWith(SCMessageFileType.VIDEO)) ? (_jsx(DialogRoot, Object.assign({ open: openDialog, onClose: () => setOpenDialog(false), className: classes.dialogRoot }, { children: _jsx(AutoPlayer, { url: message === null || message === void 0 ? void 0 : message.file.url, width:
|
|
162
|
+
})}` }))] }), openDialog && (_jsx(_Fragment, { children: (message === null || message === void 0 ? void 0 : message.file.mimetype.startsWith(SCMessageFileType.VIDEO)) ? (_jsx(DialogRoot, Object.assign({ open: openDialog, onClose: () => setOpenDialog(false), className: classes.dialogRoot }, { children: _jsx(AutoPlayer, { url: message === null || message === void 0 ? void 0 : message.file.url, width: "100%" }) }))) : (_jsx(LightBox, { images: [{ src: message === null || message === void 0 ? void 0 : message.file.url, key: message.file.uuid }], onClose: () => setOpenDialog(false), toolbarButtons: _jsx(IconButton, Object.assign({ onClick: () => handleDownload(message === null || message === void 0 ? void 0 : message.file), className: classes.downloadButton }, { children: _jsx(Icon, { children: "download" }) }), "download") })) }))] })));
|
|
163
163
|
}
|
|
@@ -165,17 +165,9 @@ export default function UserToastNotifications(inProps) {
|
|
|
165
165
|
* - the enqueue message is persistent (it remains on the screen while the others replace each other) if type notification_banner
|
|
166
166
|
*/
|
|
167
167
|
const messageKey = data.data.feed_serialization_id ? data.data.feed_serialization_id : data.data.id;
|
|
168
|
-
enqueueSnackbar(getContent(data.data), {
|
|
169
|
-
preventDuplicate: true,
|
|
170
|
-
key: messageKey,
|
|
171
|
-
variant: 'notification',
|
|
172
|
-
persist: data.data.activity_type === SCNotificationTypologyType.NOTIFICATION_BANNER ? true : false,
|
|
173
|
-
anchorOrigin: { horizontal: 'left', vertical: 'bottom' },
|
|
174
|
-
action: null,
|
|
175
|
-
SnackbarProps: {
|
|
168
|
+
enqueueSnackbar(getContent(data.data), Object.assign(Object.assign({ preventDuplicate: true, key: messageKey, variant: 'notification', persist: data.data.activity_type === SCNotificationTypologyType.NOTIFICATION_BANNER }, (data.data.activity_type !== SCNotificationTypologyType.NOTIFICATION_BANNER && { autoHideDuration: 10000 })), { anchorOrigin: { horizontal: 'left', vertical: 'bottom' }, action: null, SnackbarProps: {
|
|
176
169
|
id: messageKey
|
|
177
|
-
}
|
|
178
|
-
});
|
|
170
|
+
} }));
|
|
179
171
|
}
|
|
180
172
|
};
|
|
181
173
|
/**
|
|
@@ -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,91 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
5
|
+
import { useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
|
|
6
|
+
import { useThemeProps } from '@mui/system';
|
|
7
|
+
import { PREFIX } from './constants';
|
|
8
|
+
import BaseDialog from '../../shared/BaseDialog';
|
|
9
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
10
|
+
import { loadStripe } from '@stripe/stripe-js';
|
|
11
|
+
import { StripeCurrency } from '../../types/payment';
|
|
12
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
13
|
+
import { Elements } from '@stripe/react-stripe-js';
|
|
14
|
+
import { getDefaultAppearanceStyle, getDefaultLocale } from '../../utils/payment';
|
|
15
|
+
import UserAddPaymentMethodForm from '../UserAddPaymentMethodForm';
|
|
16
|
+
const classes = {
|
|
17
|
+
root: `${PREFIX}-root`,
|
|
18
|
+
loading: `${PREFIX}-loading`
|
|
19
|
+
};
|
|
20
|
+
const Root = styled(BaseDialog, {
|
|
21
|
+
name: PREFIX,
|
|
22
|
+
slot: 'Root'
|
|
23
|
+
})(() => ({
|
|
24
|
+
[`& .MuiDialogContent-root`]: {
|
|
25
|
+
overflowX: 'hidden'
|
|
26
|
+
},
|
|
27
|
+
[`& .${classes.loading}`]: {
|
|
28
|
+
marginTop: '200px'
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
/**
|
|
32
|
+
* > API documentation for the Community-JS User Add Payment Method Dialog. Learn about the available props and the CSS API.
|
|
33
|
+
|
|
34
|
+
#### Import
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
import {UserAddPaymentMethodDialog} from '@selfcommunity/react-ui';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Component Name
|
|
41
|
+
|
|
42
|
+
The name `SCUserAddPaymentMethodDialog` can be used when providing style overrides in the theme.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#### CSS
|
|
46
|
+
|
|
47
|
+
|Rule Name|Global class|Description|
|
|
48
|
+
|---|---|---|
|
|
49
|
+
|root|.SCUserAddPaymentMethodDialog-root|Styles applied to the root element.|
|
|
50
|
+
|
|
51
|
+
* @param inProps
|
|
52
|
+
*/
|
|
53
|
+
export default function UserAddPaymentMethodDialog(inProps) {
|
|
54
|
+
// PROPS
|
|
55
|
+
const props = useThemeProps({
|
|
56
|
+
props: inProps,
|
|
57
|
+
name: PREFIX
|
|
58
|
+
});
|
|
59
|
+
const { className = null, handlePaymentMethod, open = false } = props, rest = __rest(props, ["className", "handlePaymentMethod", "open"]);
|
|
60
|
+
// CONTEXT
|
|
61
|
+
const scUserContext = useSCUser();
|
|
62
|
+
// STATE
|
|
63
|
+
const [isLoadingInit, setIsLoadingInit] = React.useState(true);
|
|
64
|
+
const [customer, setCustomer] = useState(null);
|
|
65
|
+
// HOOKS
|
|
66
|
+
const { isPaymentsEnabled, stripePublicKey, stripeConnectedAccountId } = useSCPaymentsEnabled();
|
|
67
|
+
const intl = useIntl();
|
|
68
|
+
const stripePromise = isPaymentsEnabled && stripePublicKey && stripeConnectedAccountId && loadStripe
|
|
69
|
+
? loadStripe(stripePublicKey, { stripeAccount: stripeConnectedAccountId, locale: getDefaultLocale(intl).locale })
|
|
70
|
+
: null;
|
|
71
|
+
const theme = useTheme();
|
|
72
|
+
const elementsOptions = Object.assign(Object.assign({ mode: 'setup', currency: StripeCurrency.EUR, paymentMethodCreation: 'manual', loader: 'always' }, getDefaultAppearanceStyle(theme)), getDefaultLocale(intl));
|
|
73
|
+
const handleClose = () => {
|
|
74
|
+
handlePaymentMethod === null || handlePaymentMethod === void 0 ? void 0 : handlePaymentMethod(null);
|
|
75
|
+
};
|
|
76
|
+
const handleSuccess = (paymentMethod) => {
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
handlePaymentMethod === null || handlePaymentMethod === void 0 ? void 0 : handlePaymentMethod(paymentMethod);
|
|
80
|
+
};
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
/* getAccountCustomer().then((customer) => {
|
|
83
|
+
setCustomer(customer);
|
|
84
|
+
setIsLoadingInit(false);
|
|
85
|
+
}); */
|
|
86
|
+
}, []);
|
|
87
|
+
if (!isPaymentsEnabled || !scUserContext.user) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
return (_jsx(Root, Object.assign({ title: _jsx(FormattedMessage, { defaultMessage: "ui.userAddPaymentMethodDialog.title", id: "ui.userAddPaymentMethodDialog.title" }), open: open }, { children: isLoadingInit ? (_jsx(Box, Object.assign({ className: classes.loading }, { children: _jsx(CircularProgress, {}) }))) : (_jsx(Elements, Object.assign({ stripe: stripePromise, options: elementsOptions }, { children: _jsx(UserAddPaymentMethodForm, { customer: customer, handleSuccess: handleSuccess, handleClose: handleClose }) }))) })));
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCUserAddPaymentMethodDialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCUserAddPaymentMethodDialog';
|