@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
|
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo, useState } from 'react';
|
|
4
4
|
import { Divider, Icon, IconButton, List, ListItem, ListItemButton, ListItemIcon, Menu, MenuItem, SwipeableDrawer, useMediaQuery, useTheme, styled } from '@mui/material';
|
|
5
|
-
import { Link, SCPreferences, SCRoutes, UserUtils, useSCPreferences, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
5
|
+
import { Link, SCPreferences, SCRoutes, UserUtils, useSCPaymentsEnabled, useSCPreferences, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useThemeProps } from '@mui/system';
|
|
8
8
|
import { FormattedMessage } from 'react-intl';
|
|
@@ -39,7 +39,9 @@ const PREFERENCES = [
|
|
|
39
39
|
SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED,
|
|
40
40
|
SCPreferences.ADDONS_LOYALTY_POINTS_COLLECTION,
|
|
41
41
|
SCPreferences.CONFIGURATIONS_ONBOARDING_ENABLED,
|
|
42
|
-
SCPreferences.CONFIGURATIONS_ONBOARDING_HIDDEN
|
|
42
|
+
SCPreferences.CONFIGURATIONS_ONBOARDING_HIDDEN,
|
|
43
|
+
SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED,
|
|
44
|
+
SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED
|
|
43
45
|
];
|
|
44
46
|
/**
|
|
45
47
|
* > API documentation for the Community-JS Navigation Settings Icon Button component. Learn about the available props and the CSS API.
|
|
@@ -89,6 +91,9 @@ export default function NavigationSettingsIconButton(inProps) {
|
|
|
89
91
|
PREFERENCES.map((p) => (_preferences[p] = p in scPreferences.preferences ? scPreferences.preferences[p].value : null));
|
|
90
92
|
return _preferences;
|
|
91
93
|
}, [scPreferences.preferences]);
|
|
94
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
95
|
+
const connectionEnabled = SCPreferences.CONFIGURATIONS_CONNECTION_ENABLED in scPreferences.preferences &&
|
|
96
|
+
scPreferences.preferences[SCPreferences.CONFIGURATIONS_CONNECTION_ENABLED].value;
|
|
92
97
|
// HANDLERS
|
|
93
98
|
const handleOpen = (event) => {
|
|
94
99
|
setAnchorEl(event.currentTarget);
|
|
@@ -136,11 +141,13 @@ export default function NavigationSettingsIconButton(inProps) {
|
|
|
136
141
|
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.profile", defaultMessage: "ui.navigationSettingsIconButton.profile" }) })) }), "profile"),
|
|
137
142
|
preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWINGS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.followings", defaultMessage: "ui.navigationSettingsIconButton.followings" }) })) }), "followings")),
|
|
138
143
|
preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWERS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.followers", defaultMessage: "ui.navigationSettingsIconButton.followers" }) })) }), "followers")),
|
|
139
|
-
|
|
144
|
+
connectionEnabled && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_CONNECTIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.connections", defaultMessage: "ui.navigationSettingsIconButton.connections" }) })) }), "connections")),
|
|
140
145
|
preferences[SCPreferences.ADDONS_LOYALTY_POINTS_COLLECTION] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.LOYALTY_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.loyalty", defaultMessage: "ui.navigationSettingsIconButton.loyalty" }) })) }), "loyaltyProgram")),
|
|
146
|
+
preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED] && preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SCHEDULED_POSTS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.postsScheduled", defaultMessage: "ui.navigationSettingsIconButton.postsScheduled" }) })) }), "scheduledPosts")),
|
|
141
147
|
preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWED_POSTS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.postsFollowed", defaultMessage: "ui.navigationSettingsIconButton.postsFollowed" }) })) }), "followedPosts")),
|
|
148
|
+
preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED] && preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SCHEDULED_DISCUSSIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.discussionsScheduled", defaultMessage: "ui.navigationSettingsIconButton.discussionsScheduled" }) })) }), "scheduledDiscussions")),
|
|
142
149
|
preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWED_DISCUSSIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.discussionsFollowed", defaultMessage: "ui.navigationSettingsIconButton.discussionsFollowed" }) })) }), "followedDiscussions")),
|
|
143
|
-
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.privateMessages", defaultMessage: "ui.navigationSettingsIconButton.privateMessages" }) })) }), "privateMessages"),
|
|
150
|
+
preferences[SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED] && (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.privateMessages", defaultMessage: "ui.navigationSettingsIconButton.privateMessages" }) })) }), "privateMessages")),
|
|
144
151
|
...items.map((item, index) => (_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: item.href }, { children: item.label })) }), `custom_item_${index}`))),
|
|
145
152
|
...(isAdmin
|
|
146
153
|
? [
|
|
@@ -158,6 +165,13 @@ export default function NavigationSettingsIconButton(inProps) {
|
|
|
158
165
|
]
|
|
159
166
|
: []),
|
|
160
167
|
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SETTINGS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.settings", defaultMessage: "ui.navigationSettingsIconButton.settings" }) })) }), "settings"),
|
|
168
|
+
...(isPaymentsEnabled
|
|
169
|
+
? [
|
|
170
|
+
_jsx(Divider, {}, "payments_divider"),
|
|
171
|
+
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PAYMENTS_HISTORY_ORDERS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.historyOrders", defaultMessage: "ui.navigationSettingsIconButton.historyOrders" }) })) }), "paymentsHistoryOrder"),
|
|
172
|
+
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ component: Link, to: scRoutingContext.url(SCRoutes.USER_PAYMENT_METHODS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.myPaymentMethods", defaultMessage: "ui.navigationSettingsIconButton.myPaymentMethods" }) })) }), "myPaymentMethods")
|
|
173
|
+
]
|
|
174
|
+
: []),
|
|
161
175
|
_jsx(Divider, {}, "divider"),
|
|
162
176
|
_jsx(ListItem, Object.assign({ className: classes.item }, { children: _jsx(ListItemButton, Object.assign({ onClick: handleLogout }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.logout", defaultMessage: "ui.navigationSettingsIconButton.logout" }) })) }), "logout")
|
|
163
177
|
];
|
|
@@ -167,11 +181,13 @@ export default function NavigationSettingsIconButton(inProps) {
|
|
|
167
181
|
_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.profile", defaultMessage: "ui.navigationSettingsIconButton.profile" }) }), "profile"),
|
|
168
182
|
preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWINGS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.followings", defaultMessage: "ui.navigationSettingsIconButton.followings" }) }), "followings")),
|
|
169
183
|
preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWERS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.followers", defaultMessage: "ui.navigationSettingsIconButton.followers" }) }), "followers")),
|
|
170
|
-
|
|
184
|
+
connectionEnabled && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_CONNECTIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.connections", defaultMessage: "ui.navigationSettingsIconButton.connections" }) }), "connections")),
|
|
171
185
|
preferences[SCPreferences.ADDONS_LOYALTY_POINTS_COLLECTION] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.LOYALTY_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.loyalty", defaultMessage: "ui.navigationSettingsIconButton.loyalty" }) }), "loyaltyProgram")),
|
|
186
|
+
preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED] && preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SCHEDULED_POSTS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.postsScheduled", defaultMessage: "ui.navigationSettingsIconButton.postsScheduled" }) }), "scheduledPosts")),
|
|
172
187
|
preferences[SCPreferences.CONFIGURATIONS_POST_TYPE_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWED_POSTS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.postsFollowed", defaultMessage: "ui.navigationSettingsIconButton.postsFollowed" }) }), "followedPosts")),
|
|
188
|
+
preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED] && preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SCHEDULED_DISCUSSIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.discussionsScheduled", defaultMessage: "ui.navigationSettingsIconButton.discussionsScheduled" }) }), "scheduledDiscussions")),
|
|
173
189
|
preferences[SCPreferences.CONFIGURATIONS_DISCUSSION_TYPE_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_FOLLOWED_DISCUSSIONS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.discussionsFollowed", defaultMessage: "ui.navigationSettingsIconButton.discussionsFollowed" }) }), "followedDiscussions")),
|
|
174
|
-
_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.privateMessages", defaultMessage: "ui.navigationSettingsIconButton.privateMessages" }) }), "privateMessages"),
|
|
190
|
+
preferences[SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED] && (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.privateMessages", defaultMessage: "ui.navigationSettingsIconButton.privateMessages" }) }), "privateMessages")),
|
|
175
191
|
...items.map((item, index) => (_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: item.href }, { children: item.label }), `custom_item_${index}`))),
|
|
176
192
|
...(isAdmin
|
|
177
193
|
? [
|
|
@@ -189,6 +205,13 @@ export default function NavigationSettingsIconButton(inProps) {
|
|
|
189
205
|
]
|
|
190
206
|
: []),
|
|
191
207
|
_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PROFILE_SETTINGS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.settings", defaultMessage: "ui.navigationSettingsIconButton.settings" }) }), "settings"),
|
|
208
|
+
...(isPaymentsEnabled
|
|
209
|
+
? [
|
|
210
|
+
_jsx(Divider, {}, "payments_divider"),
|
|
211
|
+
_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PAYMENTS_HISTORY_ORDERS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.historyOrders", defaultMessage: "ui.navigationSettingsIconButton.historyOrders" }) }), "historyOrders"),
|
|
212
|
+
_jsx(MenuItem, Object.assign({ className: classes.item, component: Link, to: scRoutingContext.url(SCRoutes.USER_PAYMENT_METHODS_ROUTE_NAME, scUserContext.user) }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.myPaymentMethods", defaultMessage: "ui.navigationSettingsIconButton.myPaymentMethods" }) }), "myPaymentMethods")
|
|
213
|
+
]
|
|
214
|
+
: []),
|
|
192
215
|
_jsx(Divider, {}, "divider"),
|
|
193
216
|
_jsx(MenuItem, Object.assign({ className: classes.item, onClick: handleLogout }, { children: _jsx(FormattedMessage, { id: "ui.navigationSettingsIconButton.logout", defaultMessage: "ui.navigationSettingsIconButton.logout" }) }), "logout")
|
|
194
217
|
];
|
|
@@ -46,7 +46,8 @@ const PREFERENCES = [
|
|
|
46
46
|
SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_ENABLED,
|
|
47
47
|
SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL,
|
|
48
48
|
SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE,
|
|
49
|
-
SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT
|
|
49
|
+
SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT,
|
|
50
|
+
SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED
|
|
50
51
|
];
|
|
51
52
|
/**
|
|
52
53
|
* > API documentation for the Community-JS NavigationToolbar component. Learn about the available props and the CSS API.
|
|
@@ -107,7 +108,9 @@ export default function NavigationToolbar(inProps) {
|
|
|
107
108
|
PREFERENCES.map((p) => (_preferences[p] = p in scPreferences.preferences ? scPreferences.preferences[p].value : null));
|
|
108
109
|
return _preferences;
|
|
109
110
|
}, [scPreferences.preferences]);
|
|
110
|
-
const privateMessagingEnabled = useMemo(() => scPreferences.
|
|
111
|
+
const privateMessagingEnabled = useMemo(() => scPreferences.preferences &&
|
|
112
|
+
SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED in scPreferences.preferences &&
|
|
113
|
+
scPreferences.preferences[SCPreferences.ADDONS_PRIVATE_MESSAGES_ENABLED].value, [scPreferences.preferences]);
|
|
111
114
|
const groupsEnabled = useMemo(() => scPreferences.preferences &&
|
|
112
115
|
scPreferences.features &&
|
|
113
116
|
scPreferences.features.includes(SCFeatureName.TAGGING) &&
|
|
@@ -127,7 +130,9 @@ export default function NavigationToolbar(inProps) {
|
|
|
127
130
|
scPreferences.preferences[SCPreferences.CONFIGURATIONS_COURSES_ENABLED].value, [scPreferences.preferences, scPreferences.features]);
|
|
128
131
|
const showComposer = useMemo(() => {
|
|
129
132
|
return (!disableComposer &&
|
|
130
|
-
(!scPreferences.preferences[SCPreferences.CONFIGURATIONS_POST_ONLY_STAFF_ENABLED].value ||
|
|
133
|
+
(!scPreferences.preferences[SCPreferences.CONFIGURATIONS_POST_ONLY_STAFF_ENABLED].value ||
|
|
134
|
+
UserUtils.isStaff(scUserContext.user) ||
|
|
135
|
+
UserUtils.isPublisher(scUserContext.user)));
|
|
131
136
|
}, [preferences, disableComposer, scUserContext.user]);
|
|
132
137
|
// STATE
|
|
133
138
|
const [anchorNotification, setAnchorNotification] = React.useState(null);
|
|
@@ -106,7 +106,7 @@ export default function NavigationToolbarMobile(inProps) {
|
|
|
106
106
|
const _children = children || (_jsxs(_Fragment, { children: [_jsx(NavigationMenuIconButtonComponent, {}), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.HOME_ROUTE_NAME, {}), className: classNames(className, classes.logo, {
|
|
107
107
|
[classes.logoFlex]: preferences[SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL].value
|
|
108
108
|
}) }, { children: !preserveDesktopLogo ? (_jsx("img", { src: preferences[SCPreferences.LOGO_NAVBAR_LOGO_MOBILE].value, alt: "logo" })) : (_jsx("img", { src: preferences[SCPreferences.LOGO_NAVBAR_LOGO].value, alt: "logo" })) })), preferences[SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_ENABLED].value && (_jsx(Link, Object.assign({ target: "blank", to: preferences[SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL].value, className: classes.customItem }, { children: _jsx("img", { src: preferences[SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE].value, alt: "custom_item" }) })))] }));
|
|
109
|
-
return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: [_children, startActions, (contentAvailable || scUserContext.user) && !disableSearch && (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ className: classes.search, onClick: handleOpenSearch }, { children: _jsx(Icon, { children: "search" }) })), _jsx(SearchDialog, { className: classes.searchDialog, fullScreen: true, open: searchOpen, SearchAutocompleteComponentProps: Object.assign(Object.assign({}, SearchAutocompleteComponentProps), { onClear: handleCloseSearch }) })] })), endActions, (!postOnlyStaffEnabled ||
|
|
109
|
+
return (_jsxs(Root, Object.assign({ className: classNames(className, classes.root) }, rest, { children: [_children, startActions, (contentAvailable || scUserContext.user) && !disableSearch && (_jsxs(_Fragment, { children: [_jsx(IconButton, Object.assign({ className: classes.search, onClick: handleOpenSearch }, { children: _jsx(Icon, { children: "search" }) })), _jsx(SearchDialog, { className: classes.searchDialog, fullScreen: true, open: searchOpen, SearchAutocompleteComponentProps: Object.assign(Object.assign({}, SearchAutocompleteComponentProps), { onClear: handleCloseSearch }) })] })), endActions, (!postOnlyStaffEnabled || UserUtils.isStaff(scUserContext.user) || UserUtils.isPublisher(scUserContext.user)) &&
|
|
110
110
|
(scUserContext.user || contentAvailable) &&
|
|
111
111
|
exploreStreamEnabled && _jsx(ComposerIconButton, Object.assign({}, ComposerIconButtonProps)), scUserContext.user && (groupsEnabled || eventsEnabled) && (_jsx(IconButton, Object.assign({ className: classes.notifications, component: Link, to: scRoutingContext.url(SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: _jsx(Badge, Object.assign({ badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" }, { children: _jsx(Icon, { children: "notifications_active" }) })) }))), scUserContext.user ? (_jsx(NavigationSettingsIconButtonComponent, { className: classes.settings })) : (_jsx(Button, Object.assign({ className: classes.login, color: "inherit", component: Link, to: scRoutingContext.url(SCRoutes.SIGNIN_ROUTE_NAME, {}) }, { children: _jsx(FormattedMessage, { id: "ui.appBar.navigation.login", defaultMessage: "ui.appBar.navigation.login" }) })))] })));
|
|
112
112
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
2
|
+
export interface PaymentDetailDialogProps extends BaseDialogProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
disableInitialTransition?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function PaymentDetailDialog(inProps: PaymentDetailDialogProps): JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { useSCPaymentsEnabled } from '@selfcommunity/react-core';
|
|
8
|
+
import BaseDialog from '../../shared/BaseDialog';
|
|
9
|
+
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
const PREFIX = 'SCPaymentProductsDialog';
|
|
11
|
+
const classes = {
|
|
12
|
+
root: `${PREFIX}-root`
|
|
13
|
+
};
|
|
14
|
+
const Root = styled(BaseDialog, {
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
name: PREFIX
|
|
17
|
+
})(({ theme }) => ({}));
|
|
18
|
+
const Transition = React.forwardRef(function Transition(props, ref) {
|
|
19
|
+
return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
|
|
20
|
+
});
|
|
21
|
+
const NoTransition = React.forwardRef(function NoTransition(props, ref) {
|
|
22
|
+
return _jsxs(React.Fragment, { children: [" ", props.children, " "] });
|
|
23
|
+
});
|
|
24
|
+
export default function PaymentDetailDialog(inProps) {
|
|
25
|
+
// PROPS
|
|
26
|
+
const props = useThemeProps({
|
|
27
|
+
props: inProps,
|
|
28
|
+
name: PREFIX
|
|
29
|
+
});
|
|
30
|
+
const { className, disableInitialTransition = false } = props, rest = __rest(props, ["className", "disableInitialTransition"]);
|
|
31
|
+
// HOOKS
|
|
32
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
33
|
+
if (!isPaymentsEnabled) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return (_jsx(Root, Object.assign({ maxWidth: 'sm', fullWidth: true, title: _jsx(FormattedMessage, { id: "ui.paymentDetailDialog.title", defaultMessage: "ui.paymentDetailDialog.title" }), scroll: 'paper', open: true }, (disableInitialTransition ? { TransitionComponent: NoTransition } : { TransitionComponent: Transition }), { className: classNames(classes.root, className), TransitionComponent: Transition }, rest, { children: _jsx(FormattedMessage, { id: "ui.paymentDetailDialog.content", defaultMessage: "ui.paymentDetailDialog.content" }) })));
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SCPaymentOrder } from '@selfcommunity/types';
|
|
2
|
+
import { PaymentOrderPdfButtonProps } from '../PaymentOrderPdfButton';
|
|
3
|
+
export interface PaymentOrderProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
paymentOrderId?: number;
|
|
6
|
+
paymentOrder?: SCPaymentOrder;
|
|
7
|
+
hidePaymentOrderPdfButton?: boolean;
|
|
8
|
+
PaymentOrderPdfButtonComponentProps?: PaymentOrderPdfButtonProps;
|
|
9
|
+
}
|
|
10
|
+
export default function PaymentOrder(inProps: PaymentOrderProps): JSX.Element;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Chip, Stack, Typography, styled } from '@mui/material';
|
|
4
|
+
import { useThemeProps } from '@mui/system';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { useSCFetchPaymentOrder, useSCPaymentsEnabled } from '@selfcommunity/react-core';
|
|
7
|
+
import { SCContentType } from '@selfcommunity/types';
|
|
8
|
+
import { PREFIX } from './constants';
|
|
9
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
10
|
+
import Event from '../Event';
|
|
11
|
+
import { CacheStrategies } from '@selfcommunity/utils';
|
|
12
|
+
import Category from '../Category';
|
|
13
|
+
import Course from '../Course';
|
|
14
|
+
import Group from '../Group';
|
|
15
|
+
import PaymentProduct from '../PaymentProduct';
|
|
16
|
+
import PaymentOrderSkeleton from './Skeleton';
|
|
17
|
+
import PaymentOrderPdfButton from '../PaymentOrderPdfButton';
|
|
18
|
+
import { getConvertedAmount } from '../../utils/payment';
|
|
19
|
+
import { SCCourseTemplateType } from '../../types/course';
|
|
20
|
+
import { SCEventTemplateType } from '../../types/event';
|
|
21
|
+
const classes = {
|
|
22
|
+
root: `${PREFIX}-root`,
|
|
23
|
+
img: `${PREFIX}-img`,
|
|
24
|
+
contentObject: `${PREFIX}-content-object`,
|
|
25
|
+
object: `${PREFIX}-object`,
|
|
26
|
+
status: `${PREFIX}-status`,
|
|
27
|
+
details: `${PREFIX}-details`
|
|
28
|
+
};
|
|
29
|
+
const Root = styled(Box, {
|
|
30
|
+
slot: 'Root',
|
|
31
|
+
name: PREFIX
|
|
32
|
+
})(({ theme }) => ({}));
|
|
33
|
+
export default function PaymentOrder(inProps) {
|
|
34
|
+
// PROPS
|
|
35
|
+
const props = useThemeProps({
|
|
36
|
+
props: inProps,
|
|
37
|
+
name: PREFIX
|
|
38
|
+
});
|
|
39
|
+
const { className, paymentOrderId, paymentOrder, hidePaymentOrderPdfButton = false, PaymentOrderPdfButtonComponentProps = {} } = props, rest = __rest(props, ["className", "paymentOrderId", "paymentOrder", "hidePaymentOrderPdfButton", "PaymentOrderPdfButtonComponentProps"]);
|
|
40
|
+
// HOOKS
|
|
41
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
42
|
+
const { scPaymentOrder } = useSCFetchPaymentOrder({ id: paymentOrderId, paymentOrder });
|
|
43
|
+
const intl = useIntl();
|
|
44
|
+
if (!isPaymentsEnabled || !scPaymentOrder) {
|
|
45
|
+
return _jsx(PaymentOrderSkeleton, {});
|
|
46
|
+
}
|
|
47
|
+
const renderContent = () => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
let header;
|
|
50
|
+
const content = scPaymentOrder[scPaymentOrder.content_type];
|
|
51
|
+
if (scPaymentOrder.content_type === SCContentType.EVENT) {
|
|
52
|
+
header = (_jsx(Event, { event: content, cacheStrategy: CacheStrategies.NETWORK_ONLY, template: SCEventTemplateType.PREVIEW, actions: _jsx(_Fragment, {}), variant: "outlined", className: classes.object }));
|
|
53
|
+
}
|
|
54
|
+
else if (scPaymentOrder.content_type === SCContentType.CATEGORY) {
|
|
55
|
+
header = (_jsx(Category, { category: content, cacheStrategy: CacheStrategies.NETWORK_ONLY, actions: _jsx(_Fragment, {}), variant: "outlined", className: classes.object }));
|
|
56
|
+
}
|
|
57
|
+
else if (scPaymentOrder.content_type === SCContentType.COURSE) {
|
|
58
|
+
header = (_jsx(Course, { course: content, cacheStrategy: CacheStrategies.NETWORK_ONLY, template: SCCourseTemplateType.PREVIEW, actions: _jsx(_Fragment, {}), hideEventParticipants: true, hideEventPlanner: true, variant: "outlined", className: classes.object }));
|
|
59
|
+
}
|
|
60
|
+
else if (scPaymentOrder.content_type === SCContentType.GROUP) {
|
|
61
|
+
header = (_jsx(Group, { group: content, cacheStrategy: CacheStrategies.NETWORK_ONLY, hideActions: true, variant: "outlined", hideEventParticipants: true, hideEventPlanner: true, className: classes.object }));
|
|
62
|
+
}
|
|
63
|
+
else if (scPaymentOrder.content_type === SCContentType.COMMUNITY) {
|
|
64
|
+
header = (_jsx(_Fragment, { children: ((_a = scPaymentOrder.payment_price) === null || _a === void 0 ? void 0 : _a.payment_product) && (_jsx(PaymentProduct, { hidePaymentProductPrices: true, paymentProduct: (_b = scPaymentOrder.payment_price) === null || _b === void 0 ? void 0 : _b.payment_product })) }));
|
|
65
|
+
}
|
|
66
|
+
return (_jsx(Stack, Object.assign({ spacing: 2, justifyContent: "center", alignItems: "flex-start" }, { children: _jsx(Box, Object.assign({ className: classes.contentObject }, { children: header })) })));
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [renderContent(), _jsxs(Box, Object.assign({ className: classes.details }, { children: [_jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.date", defaultMessage: "ui.paymentOrder.date", values: {
|
|
69
|
+
date: intl.formatDate(new Date(scPaymentOrder.created_at), {
|
|
70
|
+
year: 'numeric',
|
|
71
|
+
month: 'numeric',
|
|
72
|
+
day: 'numeric',
|
|
73
|
+
hour: 'numeric',
|
|
74
|
+
minute: 'numeric'
|
|
75
|
+
})
|
|
76
|
+
} }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.price", defaultMessage: "ui.paymentOrder.price", values: { price: getConvertedAmount(scPaymentOrder.payment_price) } }) })), _jsx(Typography, Object.assign({ variant: "body2", color: "textSecondary", component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.paymentOrder.status", defaultMessage: "ui.paymentOrder.status" }) })), _jsx(Chip, { className: classes.status, variant: 'outlined', label: _jsx(FormattedMessage, { id: "ui.paymentOrder.status.paid", defaultMessage: "ui.paymentOrder.status.paid" }), color: "success", size: "small" }), _jsx("br", {}), scPaymentOrder && !hidePaymentOrderPdfButton && (_jsx(PaymentOrderPdfButton, Object.assign({ paymentOrder: scPaymentOrder, label: _jsx(FormattedMessage, { id: "ui.paymentOrder.ticket.view", defaultMessage: "ui.paymentOrder.ticket.view" }) }, PaymentOrderPdfButtonComponentProps)))] }))] })));
|
|
77
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
export interface PaymentOrderSkeletonProps extends BoxProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* > API documentation for the Community-JS PaymentOrder Skeleton component. Learn about the available props and the CSS API.
|
|
11
|
+
|
|
12
|
+
#### Import
|
|
13
|
+
|
|
14
|
+
```jsx
|
|
15
|
+
import {PaymentOrderSkeleton} from '@selfcommunity/react-ui';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Component Name
|
|
19
|
+
|
|
20
|
+
The name `SCPaymentOrder-skeleton-root` can be used when providing style overrides in the theme.
|
|
21
|
+
|
|
22
|
+
#### CSS
|
|
23
|
+
|
|
24
|
+
|Rule Name|Global class|Description|
|
|
25
|
+
|---|---|---|
|
|
26
|
+
|root|.SCPaymentOrder-skeleton-root|Styles applied to the root element.|
|
|
27
|
+
|image|.SCPaymentOrder-skeleton-image|Styles applied to the image element.|
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export default function PaymentOrderSkeleton(inProps: PaymentOrderSkeletonProps): JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AvatarGroup, Box, CardContent, Stack, useTheme, Skeleton, styled } from '@mui/material';
|
|
4
|
+
import { useThemeProps } from '@mui/system';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { PREFIX } from './constants';
|
|
7
|
+
import Widget from '../Widget';
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${PREFIX}-skeleton-root`,
|
|
10
|
+
skeletonPreviewRoot: `${PREFIX}-skeleton-preview-root`,
|
|
11
|
+
skeletonPreviewContent: `${PREFIX}-skeleton-preview-content`,
|
|
12
|
+
skeletonPreviewName: `${PREFIX}-skeleton-preview-name`,
|
|
13
|
+
skeletonPreviewActions: `${PREFIX}-skeleton-preview-actions`
|
|
14
|
+
};
|
|
15
|
+
const Root = styled(Box, {
|
|
16
|
+
name: PREFIX,
|
|
17
|
+
slot: 'SkeletonRoot'
|
|
18
|
+
})(() => ({}));
|
|
19
|
+
const SkeletonPreviewRoot = styled(Widget, {
|
|
20
|
+
name: PREFIX,
|
|
21
|
+
slot: 'SkeletonPreviewRoot'
|
|
22
|
+
})(() => ({}));
|
|
23
|
+
/**
|
|
24
|
+
* > API documentation for the Community-JS PaymentOrder Skeleton component. Learn about the available props and the CSS API.
|
|
25
|
+
|
|
26
|
+
#### Import
|
|
27
|
+
|
|
28
|
+
```jsx
|
|
29
|
+
import {PaymentOrderSkeleton} from '@selfcommunity/react-ui';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### Component Name
|
|
33
|
+
|
|
34
|
+
The name `SCPaymentOrder-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|.SCPaymentOrder-skeleton-root|Styles applied to the root element.|
|
|
41
|
+
|image|.SCPaymentOrder-skeleton-image|Styles applied to the image element.|
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export default function PaymentOrderSkeleton(inProps) {
|
|
45
|
+
// PROPS
|
|
46
|
+
const props = useThemeProps({
|
|
47
|
+
props: inProps,
|
|
48
|
+
name: PREFIX
|
|
49
|
+
});
|
|
50
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
51
|
+
const theme = useTheme();
|
|
52
|
+
/**
|
|
53
|
+
* Renders event object
|
|
54
|
+
*/
|
|
55
|
+
let contentObj;
|
|
56
|
+
contentObj = (_jsxs(SkeletonPreviewRoot, Object.assign({ className: classes.skeletonPreviewRoot }, { children: [_jsx(Box, Object.assign({ position: "relative" }, { children: _jsx(Skeleton, { variant: "rectangular", width: "100%", height: "80px" }) })), _jsxs(CardContent, Object.assign({ className: classes.skeletonPreviewContent }, { children: [_jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [_jsx(Skeleton, { variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { width: "50%", height: "20px" })] })), _jsx(Skeleton, { width: "67%", height: "25px", className: classes.skeletonPreviewName }), _jsx(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "2px" }, { children: _jsx(Skeleton, { width: "27%", height: "18px" }) })), _jsx(Stack, Object.assign({ direction: "row", gap: "8px", alignItems: "center" }, { children: _jsxs(AvatarGroup, { children: [_jsx(Skeleton, { variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` }), _jsx(Skeleton, { variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` }), _jsx(Skeleton, { variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` })] }) }))] }))] })));
|
|
57
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [contentObj, _jsxs(Stack, Object.assign({ direction: "column", alignItems: "flex-start", gap: "8px", marginTop: "8px" }, { children: [_jsx(Skeleton, { width: "50%", height: "18px" }), _jsx(Skeleton, { width: "35%", height: "18px" }), _jsx(Skeleton, { width: "20%", height: "18px" })] }))] })));
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCPaymentOrder";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCPaymentOrder';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCPaymentOrder } from '@selfcommunity/types';
|
|
3
|
+
export interface PaymentOrderPdfButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Overrides or extends the styles applied to the component.
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Content id
|
|
11
|
+
*/
|
|
12
|
+
paymentOrderId?: number | string;
|
|
13
|
+
/**
|
|
14
|
+
* Payment Order
|
|
15
|
+
*/
|
|
16
|
+
paymentOrder?: SCPaymentOrder;
|
|
17
|
+
/**
|
|
18
|
+
* Handle click
|
|
19
|
+
*/
|
|
20
|
+
handleClick?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Override button label
|
|
23
|
+
*/
|
|
24
|
+
label?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Others properties
|
|
27
|
+
*/
|
|
28
|
+
[p: string]: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* > API documentation for the Community-JS PaymentOrderPdfButton component. Learn about the available props and the CSS API.
|
|
32
|
+
|
|
33
|
+
#### Import
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
import {PaymentOrderPdfButton} from '@selfcommunity/react-ui';
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Component Name
|
|
40
|
+
|
|
41
|
+
The name `PaymentOrderPdfButton` can be used when providing style overrides in the theme.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
#### CSS
|
|
45
|
+
|
|
46
|
+
|Rule Name|Global class|Description|
|
|
47
|
+
|---|---|---|
|
|
48
|
+
|root|.SCPaymentOrderPdfButton-root|Styles applied to the root element.|
|
|
49
|
+
|
|
50
|
+
* @param inProps
|
|
51
|
+
*/
|
|
52
|
+
export default function PaymentOrderPdfButton(inProps: PaymentOrderPdfButtonProps): JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { Button, Icon, Tooltip, styled } from '@mui/material';
|
|
6
|
+
import { useThemeProps } from '@mui/system';
|
|
7
|
+
import { useSCContext, useSCFetchPaymentOrder, useSCPaymentsEnabled, useSCUser } from '@selfcommunity/react-core';
|
|
8
|
+
import { FormattedMessage } from 'react-intl';
|
|
9
|
+
import PdfPreviewDialog from '../PdfPreviewDialog';
|
|
10
|
+
import { Endpoints } from '@selfcommunity/api-services';
|
|
11
|
+
const PREFIX = 'SCPaymentOrderPdfButton';
|
|
12
|
+
const classes = {
|
|
13
|
+
root: `${PREFIX}-root`
|
|
14
|
+
};
|
|
15
|
+
const Root = styled(Button, {
|
|
16
|
+
name: PREFIX,
|
|
17
|
+
slot: 'root'
|
|
18
|
+
})(() => ({}));
|
|
19
|
+
/**
|
|
20
|
+
* > API documentation for the Community-JS PaymentOrderPdfButton component. Learn about the available props and the CSS API.
|
|
21
|
+
|
|
22
|
+
#### Import
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
import {PaymentOrderPdfButton} from '@selfcommunity/react-ui';
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### Component Name
|
|
29
|
+
|
|
30
|
+
The name `PaymentOrderPdfButton` can be used when providing style overrides in the theme.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
#### CSS
|
|
34
|
+
|
|
35
|
+
|Rule Name|Global class|Description|
|
|
36
|
+
|---|---|---|
|
|
37
|
+
|root|.SCPaymentOrderPdfButton-root|Styles applied to the root element.|
|
|
38
|
+
|
|
39
|
+
* @param inProps
|
|
40
|
+
*/
|
|
41
|
+
export default function PaymentOrderPdfButton(inProps) {
|
|
42
|
+
// PROPS
|
|
43
|
+
const props = useThemeProps({
|
|
44
|
+
props: inProps,
|
|
45
|
+
name: PREFIX
|
|
46
|
+
});
|
|
47
|
+
const { className, paymentOrderId, paymentOrder, handleClick, PdfPreviewDialogComponentProps = {}, label } = props, rest = __rest(props, ["className", "paymentOrderId", "paymentOrder", "handleClick", "PdfPreviewDialogComponentProps", "label"]);
|
|
48
|
+
// STATE
|
|
49
|
+
const [open, setOpen] = useState(false);
|
|
50
|
+
// CONTEXT
|
|
51
|
+
const scContext = useSCContext();
|
|
52
|
+
const scUserContext = useSCUser();
|
|
53
|
+
const { isPaymentsEnabled } = useSCPaymentsEnabled();
|
|
54
|
+
const { scPaymentOrder } = useSCFetchPaymentOrder({ id: paymentOrderId, paymentOrder });
|
|
55
|
+
// HANDLERS
|
|
56
|
+
const handleClose = useCallback(() => {
|
|
57
|
+
setOpen(false);
|
|
58
|
+
}, [open]);
|
|
59
|
+
const handlePaymentOrderPdf = useCallback((e) => {
|
|
60
|
+
if (handleClick) {
|
|
61
|
+
handleClick();
|
|
62
|
+
}
|
|
63
|
+
else if (!open) {
|
|
64
|
+
setOpen(true);
|
|
65
|
+
}
|
|
66
|
+
}, [open, handleClick]);
|
|
67
|
+
if (!scUserContext.user || !isPaymentsEnabled || !scPaymentOrder) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, Object.assign({ title: !scPaymentOrder ? (_jsx(FormattedMessage, { id: "ui.paymentOrderPdfButton.disabled", defaultMessage: "ui.paymentOrderPdfButton.disabled" })) : (_jsx(FormattedMessage, { id: "ui.paymentOrder.ticket.view", defaultMessage: "ui.paymentOrder.ticket.view" })) }, { children: _jsx(Root, Object.assign({ className: classNames(classes.root, className), variant: "contained", onClick: handlePaymentOrderPdf }, rest, { children: label ? label : _jsx(Icon, { children: "picture_as_pdf" }) })) })), open && (_jsx(PdfPreviewDialog, Object.assign({ open: true, onClose: handleClose }, PdfPreviewDialogComponentProps, { pdfUrl: `${new URL(scContext.settings.portal)}${Endpoints.GetPaymentOrderPdf.url({ id: scPaymentOrder.id })}` })))] }));
|
|
71
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SCContentType } from '@selfcommunity/types';
|
|
2
|
+
export interface PaymentOrdersProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The content name used to prefilter the results shown
|
|
10
|
+
*/
|
|
11
|
+
contentName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The content type used to prefilter the results shown
|
|
14
|
+
*/
|
|
15
|
+
contentType?: SCContentType;
|
|
16
|
+
}
|
|
17
|
+
export default function PaymentOrders(inProps: PaymentOrdersProps): JSX.Element;
|