@selfcommunity/react-ui 0.11.0-alpha.67 → 0.11.0-alpha.69
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 +36 -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 +94 -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 +37 -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 +90 -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
|
@@ -28,6 +28,7 @@ import ComposerSkeleton from './Skeleton';
|
|
|
28
28
|
import CloseLayer from './Layer/CloseLayer';
|
|
29
29
|
import BackdropScrollDisabled from '../../shared/BackdropScrollDisabled';
|
|
30
30
|
import { clearAllBodyScrollLocks } from 'body-scroll-lock';
|
|
31
|
+
import ScheduledLayer from './Layer/ScheduledLayer';
|
|
31
32
|
const DialogTransition = forwardRef(function Transition(props, ref) {
|
|
32
33
|
return _jsx(Fade, Object.assign({ ref: ref }, props));
|
|
33
34
|
});
|
|
@@ -58,15 +59,16 @@ const COMPOSER_INITIAL_STATE = {
|
|
|
58
59
|
html: '',
|
|
59
60
|
htmlError: null,
|
|
60
61
|
categories: [],
|
|
62
|
+
categoriesError: null,
|
|
61
63
|
group: null,
|
|
62
64
|
event: null,
|
|
63
|
-
categoriesError: null,
|
|
64
65
|
groupsError: null,
|
|
65
66
|
addressing: null,
|
|
66
67
|
addressingError: null,
|
|
67
68
|
medias: [],
|
|
68
69
|
poll: null,
|
|
69
70
|
location: null,
|
|
71
|
+
scheduled_at: null,
|
|
70
72
|
error: null
|
|
71
73
|
};
|
|
72
74
|
const reducer = (state, action) => {
|
|
@@ -141,7 +143,17 @@ export default function Composer(inProps) {
|
|
|
141
143
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
142
144
|
const [layer, setLayer] = useState();
|
|
143
145
|
const [state, dispatch] = useReducer(reducer, Object.assign(Object.assign(Object.assign({}, COMPOSER_INITIAL_STATE), defaultValue), { key: random() }));
|
|
144
|
-
const { key, id, type, title, titleError, html, categories, event, group, addressing, audience, medias, poll, pollError, location, error } = state;
|
|
146
|
+
const { key, id, type, title, titleError, html, categories, categoriesError, event, group, addressing, addressingError, audience, medias, poll, pollError, location, scheduled_at, error } = state;
|
|
147
|
+
//MEMO
|
|
148
|
+
const scheduledPostsEnabled = useMemo(() => preferences &&
|
|
149
|
+
SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED in preferences &&
|
|
150
|
+
preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED].value, [preferences]);
|
|
151
|
+
const addressingRequiredEnabled = useMemo(() => preferences &&
|
|
152
|
+
SCPreferences.CONFIGURATIONS_POST_ADDRESSING_REQUIRED_ENABLED in preferences &&
|
|
153
|
+
preferences[SCPreferences.CONFIGURATIONS_POST_ADDRESSING_REQUIRED_ENABLED].value, [preferences]);
|
|
154
|
+
const categoryRequiredEnabled = useMemo(() => preferences &&
|
|
155
|
+
SCPreferences.CONFIGURATIONS_POST_CATEGORY_REQUIRED_ENABLED in preferences &&
|
|
156
|
+
preferences[SCPreferences.CONFIGURATIONS_POST_CATEGORY_REQUIRED_ENABLED].value, [preferences]);
|
|
145
157
|
const destructureFeedObject = (_feedObject) => {
|
|
146
158
|
if (_feedObject.type === SCContributionType.POST) {
|
|
147
159
|
_feedObject = _feedObject;
|
|
@@ -166,7 +178,8 @@ export default function Composer(inProps) {
|
|
|
166
178
|
addressing: _feedObject.addressing,
|
|
167
179
|
medias: _feedObject.medias,
|
|
168
180
|
poll: _feedObject.poll,
|
|
169
|
-
location: _feedObject.location
|
|
181
|
+
location: _feedObject.location,
|
|
182
|
+
scheduled_at: _feedObject.scheduled_at
|
|
170
183
|
}
|
|
171
184
|
});
|
|
172
185
|
setIsLoading(false);
|
|
@@ -194,8 +207,10 @@ export default function Composer(inProps) {
|
|
|
194
207
|
return (!isLoading &&
|
|
195
208
|
((type === SCContributionType.DISCUSSION && title.length > 0 && title.length < COMPOSER_TITLE_MAX_LENGTH) ||
|
|
196
209
|
(type === SCContributionType.POST && (stripHtml(html).length > 0 || medias.length > 0 || hasPoll)) ||
|
|
197
|
-
(type === COMPOSER_TYPE_POLL && hasPoll))
|
|
198
|
-
|
|
210
|
+
(type === COMPOSER_TYPE_POLL && hasPoll)) &&
|
|
211
|
+
(!addressingRequiredEnabled || (addressing && addressing.length > 0)) &&
|
|
212
|
+
(!categoryRequiredEnabled || (categories && categories.length > 0)));
|
|
213
|
+
}, [isLoading, type, title, html, medias, hasPoll, addressing, addressingRequiredEnabled, categories, categoryRequiredEnabled]);
|
|
199
214
|
const isIOS = useMemo(() => iOS(), []);
|
|
200
215
|
// Load feed object
|
|
201
216
|
useEffect(() => {
|
|
@@ -303,23 +318,29 @@ export default function Composer(inProps) {
|
|
|
303
318
|
type: 'multiple',
|
|
304
319
|
value: Object.assign(Object.assign({}, content), { pollError: content.poll.title.length > COMPOSER_TITLE_MAX_LENGTH
|
|
305
320
|
? { titleError: _jsx(FormattedMessage, { id: "ui.composer.title.error.maxlength", defaultMessage: "ui.composer.title.error.maxlength" }) }
|
|
306
|
-
: null })
|
|
321
|
+
: null, addressingError: addressingRequiredEnabled && (!content.addressing || content.addressing.length === 0) ? (_jsx(FormattedMessage, { id: "ui.composer.addressing.error.missing", defaultMessage: "ui.composer.addressing.error.missing" })) : null })
|
|
307
322
|
});
|
|
308
323
|
}, []);
|
|
309
324
|
const handleChangeDiscussion = useCallback((content) => {
|
|
310
325
|
dispatch({
|
|
311
326
|
type: 'multiple',
|
|
312
|
-
value: Object.assign(Object.assign({}, content), { titleError: content.title.length > COMPOSER_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.composer.title.error.maxlength", defaultMessage: "ui.composer.title.error.maxlength" })) : null })
|
|
327
|
+
value: Object.assign(Object.assign({}, content), { titleError: content.title.length > COMPOSER_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.composer.title.error.maxlength", defaultMessage: "ui.composer.title.error.maxlength" })) : null, addressingError: addressingRequiredEnabled && (!content.addressing || content.addressing.length === 0) ? (_jsx(FormattedMessage, { id: "ui.composer.addressing.error.missing", defaultMessage: "ui.composer.addressing.error.missing" })) : null, categoriesError: categoryRequiredEnabled && content.categories.length === 0 ? (_jsx(FormattedMessage, { id: "ui.composer.categories.error.missing", defaultMessage: "ui.composer.categories.error.missing" })) : null })
|
|
313
328
|
});
|
|
314
329
|
}, []);
|
|
315
330
|
const handleChangePost = useCallback((content) => {
|
|
316
331
|
dispatch({
|
|
317
332
|
type: 'multiple',
|
|
318
|
-
value: Object.assign({}, content)
|
|
333
|
+
value: Object.assign(Object.assign({}, content), { addressingError: addressingRequiredEnabled && (!content.addressing || content.addressing.length === 0) ? (_jsx(FormattedMessage, { id: "ui.composer.addressing.error.missing", defaultMessage: "ui.composer.addressing.error.missing" })) : null, categoriesError: categoryRequiredEnabled && content.categories.length === 0 ? (_jsx(FormattedMessage, { id: "ui.composer.categories.error.missing", defaultMessage: "ui.composer.categories.error.missing" })) : null })
|
|
319
334
|
});
|
|
320
335
|
}, []);
|
|
321
336
|
const handleChangeCategories = useCallback((value) => {
|
|
322
|
-
dispatch({
|
|
337
|
+
dispatch({
|
|
338
|
+
type: 'multiple',
|
|
339
|
+
value: {
|
|
340
|
+
categories: value,
|
|
341
|
+
categoriesError: categoryRequiredEnabled && (!value || value.length === 0) ? (_jsx(FormattedMessage, { id: "ui.composer.categories.error.missing", defaultMessage: "ui.composer.categories.error.missing" })) : null
|
|
342
|
+
}
|
|
343
|
+
});
|
|
323
344
|
setLayer(null);
|
|
324
345
|
}, []);
|
|
325
346
|
const handleAddCategoryLayer = useCallback(() => handleAddLayer({
|
|
@@ -339,7 +360,13 @@ export default function Composer(inProps) {
|
|
|
339
360
|
dispatch({ type: 'event', value });
|
|
340
361
|
}
|
|
341
362
|
else {
|
|
342
|
-
dispatch({
|
|
363
|
+
dispatch({
|
|
364
|
+
type: 'multiple',
|
|
365
|
+
value: {
|
|
366
|
+
addressing: value,
|
|
367
|
+
addressingError: addressingRequiredEnabled && !value ? (_jsx(FormattedMessage, { id: "ui.composer.addressing.error.missing", defaultMessage: "ui.composer.addressing.error.missing" })) : null
|
|
368
|
+
}
|
|
369
|
+
});
|
|
343
370
|
}
|
|
344
371
|
setLayer(null);
|
|
345
372
|
}, [group]);
|
|
@@ -369,6 +396,19 @@ export default function Composer(inProps) {
|
|
|
369
396
|
defaultValue: location
|
|
370
397
|
}
|
|
371
398
|
}), [handleAddLayer, handleRemoveLayer, handleChangeLocation, location]);
|
|
399
|
+
const handleChangeScheduled = useCallback((value) => {
|
|
400
|
+
dispatch({ type: 'scheduled_at', value });
|
|
401
|
+
setLayer(null);
|
|
402
|
+
}, []);
|
|
403
|
+
const handleAddScheduledLayer = useCallback(() => handleAddLayer({
|
|
404
|
+
name: 'scheduled_at',
|
|
405
|
+
Component: ScheduledLayer,
|
|
406
|
+
ComponentProps: {
|
|
407
|
+
onClose: handleRemoveLayer,
|
|
408
|
+
onSave: handleChangeScheduled,
|
|
409
|
+
defaultValue: scheduled_at
|
|
410
|
+
}
|
|
411
|
+
}), [handleAddLayer, handleRemoveLayer, handleChangeScheduled, scheduled_at]);
|
|
372
412
|
const handleChangeMedias = useCallback((value) => {
|
|
373
413
|
const _medias = [...value];
|
|
374
414
|
dispatch({
|
|
@@ -402,7 +442,7 @@ export default function Composer(inProps) {
|
|
|
402
442
|
const handleChangeAttributes = useCallback((content) => {
|
|
403
443
|
dispatch({
|
|
404
444
|
type: 'multiple',
|
|
405
|
-
value: Object.assign({}, content)
|
|
445
|
+
value: Object.assign(Object.assign({}, content), { addressingError: addressingRequiredEnabled && (!content.addressing || content.addressing.length === 0) ? (_jsx(FormattedMessage, { id: "ui.composer.addressing.error.missing", defaultMessage: "ui.composer.addressing.error.missing" })) : null, categoriesError: categoryRequiredEnabled && content.categories.length === 0 ? (_jsx(FormattedMessage, { id: "ui.composer.categories.error.missing", defaultMessage: "ui.composer.categories.error.missing" })) : null })
|
|
406
446
|
});
|
|
407
447
|
}, []);
|
|
408
448
|
const handleClickAttributes = useCallback((attr) => {
|
|
@@ -416,8 +456,11 @@ export default function Composer(inProps) {
|
|
|
416
456
|
case 'location':
|
|
417
457
|
handleAddLocationLayer();
|
|
418
458
|
break;
|
|
459
|
+
case 'scheduled_at':
|
|
460
|
+
handleAddScheduledLayer();
|
|
461
|
+
break;
|
|
419
462
|
}
|
|
420
|
-
}, [handleAddCategoryLayer, handleAddAudienceLayer, handleAddLocationLayer]);
|
|
463
|
+
}, [handleAddCategoryLayer, handleAddAudienceLayer, handleAddLocationLayer, handleAddScheduledLayer]);
|
|
421
464
|
const handleSubmit = useCallback((e) => {
|
|
422
465
|
e.preventDefault();
|
|
423
466
|
e.stopPropagation();
|
|
@@ -443,6 +486,9 @@ export default function Composer(inProps) {
|
|
|
443
486
|
if (preferences[SCPreferences.ADDONS_POST_GEOLOCATION_ENABLED].value && location) {
|
|
444
487
|
data.location = location;
|
|
445
488
|
}
|
|
489
|
+
if (preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED].value && scheduled_at) {
|
|
490
|
+
data.scheduled_at = scheduled_at;
|
|
491
|
+
}
|
|
446
492
|
if (features.includes(SCFeatureName.TAGGING) && addressing !== null) {
|
|
447
493
|
data.addressing = addressing.map((t) => t.id);
|
|
448
494
|
}
|
|
@@ -491,7 +537,24 @@ export default function Composer(inProps) {
|
|
|
491
537
|
dispatch({ type: 'multiple', value: formatHttpErrorCode(error) });
|
|
492
538
|
})
|
|
493
539
|
.then(() => setIsSubmitting(false));
|
|
494
|
-
}, [
|
|
540
|
+
}, [
|
|
541
|
+
scUserContext.user,
|
|
542
|
+
feedObjectType,
|
|
543
|
+
id,
|
|
544
|
+
type,
|
|
545
|
+
title,
|
|
546
|
+
html,
|
|
547
|
+
categories,
|
|
548
|
+
event,
|
|
549
|
+
group,
|
|
550
|
+
addressing,
|
|
551
|
+
audience,
|
|
552
|
+
medias,
|
|
553
|
+
poll,
|
|
554
|
+
location,
|
|
555
|
+
scheduled_at,
|
|
556
|
+
hasPoll
|
|
557
|
+
]);
|
|
495
558
|
//edited here
|
|
496
559
|
const handleClose = useCallback((e, reason) => {
|
|
497
560
|
if (unloadRef.current) {
|
|
@@ -556,11 +619,11 @@ export default function Composer(inProps) {
|
|
|
556
619
|
}
|
|
557
620
|
switch (type) {
|
|
558
621
|
case COMPOSER_TYPE_POLL:
|
|
559
|
-
return (_jsx(ContentPoll, { onChange: handleChangePoll, value: { html, event, group, addressing, medias, poll, location }, error: pollError, disabled: isSubmitting }, key));
|
|
622
|
+
return (_jsx(ContentPoll, { onChange: handleChangePoll, value: { html, event, group, addressing, medias, poll, location, scheduled_at }, error: { pollError, categoriesError, addressingError }, disabled: isSubmitting }, key));
|
|
560
623
|
case SCContributionType.DISCUSSION:
|
|
561
|
-
return (_jsx(ContentDiscussion, { value: { title, html, categories, event, group, addressing, medias, poll, location }, error: { titleError, error }, onChange: handleChangeDiscussion, disabled: isSubmitting, isContentSwitchButtonVisible: !canSubmit && !editMode, EditorProps: Object.assign({ toolbar: true, uploadImage: true }, EditorProps) }, key));
|
|
624
|
+
return (_jsx(ContentDiscussion, { value: { title, html, categories, event, group, addressing, medias, poll, location, scheduled_at }, error: { titleError, categoriesError, addressingError, error }, onChange: handleChangeDiscussion, disabled: isSubmitting, isContentSwitchButtonVisible: !canSubmit && !editMode, EditorProps: Object.assign({ toolbar: true, uploadImage: true }, EditorProps) }, key));
|
|
562
625
|
default:
|
|
563
|
-
return (_jsx(ContentPost, { value: { html, categories, event, group, addressing, medias, poll, location }, error: { error }, onChange: handleChangePost, disabled: isSubmitting, EditorProps: Object.assign({ toolbar: false, uploadImage: false }, EditorProps) }, key));
|
|
626
|
+
return (_jsx(ContentPost, { value: { html, categories, event, group, addressing, medias, poll, location, scheduled_at }, error: { error, categoriesError, addressingError }, onChange: handleChangePost, disabled: isSubmitting, EditorProps: Object.assign({ toolbar: false, uploadImage: false }, EditorProps) }, key));
|
|
564
627
|
}
|
|
565
628
|
}, [
|
|
566
629
|
key,
|
|
@@ -575,6 +638,7 @@ export default function Composer(inProps) {
|
|
|
575
638
|
poll,
|
|
576
639
|
pollError,
|
|
577
640
|
location,
|
|
641
|
+
scheduled_at,
|
|
578
642
|
error,
|
|
579
643
|
handleChangePoll,
|
|
580
644
|
handleChangePost,
|
|
@@ -585,7 +649,7 @@ export default function Composer(inProps) {
|
|
|
585
649
|
if (!scUserContext.user && !(scUserContext.loading && open)) {
|
|
586
650
|
return null;
|
|
587
651
|
}
|
|
588
|
-
return (_jsxs(Root, Object.assign({ ref: dialogRef, TransitionComponent: DialogTransition, slots: { backdrop: BackdropScrollDisabled }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: classNames(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [_jsxs("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: handleClosePrompt }, { children: _jsx(Icon, { children: "close" }) })), _jsx(LoadingButton, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: _jsx(FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Attributes, { value: { categories, event, group, addressing, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && (_jsx(Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
|
|
652
|
+
return (_jsxs(Root, Object.assign({ ref: dialogRef, TransitionComponent: DialogTransition, slots: { backdrop: BackdropScrollDisabled }, onClose: handleClose }, rest, { disableEscapeKeyDown: true, className: classNames(classes.root, { [classes.ios]: isIOS }), scroll: "body", fullScreen: fullScreen, tabIndex: -1 }, { children: [_jsxs("form", Object.assign({ onSubmit: handleSubmit, method: "post" }, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: handleClosePrompt }, { children: _jsx(Icon, { children: "close" }) })), _jsx(LoadingButton, Object.assign({ size: "small", type: "submit", color: "secondary", variant: "contained", disabled: !canSubmit, loading: isSubmitting }, { children: scheduledPostsEnabled && !scheduled_at ? (_jsx(FormattedMessage, { id: "ui.composer.submit.now", defaultMessage: "ui.composer.submit.now" })) : (_jsx(FormattedMessage, { id: "ui.composer.submit", defaultMessage: "ui.composer.submit" })) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Attributes, { value: { categories, event, group, addressing, location }, className: classes.attributes, onChange: handleChangeAttributes, onClick: handleClickAttributes }), content, medias && medias.length > 0 && (_jsx(Box, Object.assign({ className: classes.medias }, { children: mediaObjectTypes.map((mediaObjectType) => {
|
|
589
653
|
if (mediaObjectType.previewComponent) {
|
|
590
654
|
return _jsx(mediaObjectType.previewComponent, { value: medias, onChange: handleChangeMedias }, mediaObjectType.name);
|
|
591
655
|
}
|
|
@@ -597,5 +661,5 @@ export default function Composer(inProps) {
|
|
|
597
661
|
.map((mediaObjectType) => {
|
|
598
662
|
const props = mediaObjectType.layerComponent ? { onClick: handleMediaTriggerClick(mediaObjectType) } : { onAdd: handleAddMedia };
|
|
599
663
|
return (_jsx(mediaObjectType.triggerButton, Object.assign({ disabled: isSubmitting || hasMediaShare, color: medias.filter(mediaObjectType.filter).length > 0 ? 'primary' : 'default' }, props), mediaObjectType.name));
|
|
600
|
-
}), _jsx(IconButton, Object.assign({ disabled: isSubmitting, onClick: handleAddCategoryLayer }, { children: _jsx(Icon, { children: "category" }) })), _jsx(IconButton, Object.assign({ disabled: isSubmitting || !features.includes(SCFeatureName.TAGGING) || Boolean(feedObject === null || feedObject === void 0 ? void 0 : feedObject.group) || Boolean(feedObject === null || feedObject === void 0 ? void 0 : feedObject.event), onClick: handleAddAudienceLayer }, { children:
|
|
664
|
+
}), _jsx(IconButton, Object.assign({ disabled: isSubmitting, onClick: handleAddCategoryLayer }, { children: _jsx(Icon, { children: "category" }) })), _jsx(IconButton, Object.assign({ disabled: isSubmitting || !features.includes(SCFeatureName.TAGGING) || Boolean(feedObject === null || feedObject === void 0 ? void 0 : feedObject.group) || Boolean(feedObject === null || feedObject === void 0 ? void 0 : feedObject.event), onClick: handleAddAudienceLayer }, { children: addressing === null || (addressing === null || addressing === void 0 ? void 0 : addressing.length) === 0 ? (addressingRequiredEnabled ? (_jsx(Icon, { children: "label" })) : (_jsx(Icon, { children: "public" }))) : group ? (_jsx(Icon, { children: "groups" })) : event ? (_jsx(Icon, { children: "CalendarIcon" })) : (_jsx(Icon, { children: "label" })) })), preferences[SCPreferences.ADDONS_POST_GEOLOCATION_ENABLED].value && (_jsx(IconButton, Object.assign({ disabled: isSubmitting, onClick: handleAddLocationLayer, color: location !== null ? 'primary' : 'default' }, { children: _jsx(Icon, { children: "add_location_alt" }) }))), preferences[SCPreferences.CONFIGURATIONS_SCHEDULED_POSTS_ENABLED].value && (_jsx(IconButton, Object.assign({ disabled: isSubmitting || (Boolean(feedObject === null || feedObject === void 0 ? void 0 : feedObject.scheduled_at) && Boolean(!(feedObject === null || feedObject === void 0 ? void 0 : feedObject.draft))), onClick: handleAddScheduledLayer, color: scheduled_at !== null ? 'primary' : 'default' }, { children: _jsx(Icon, { children: "access_time" }) })))] }))] })), layer && (_jsx(LayerTransitionRoot, Object.assign({ className: classes.layerTransitionRoot, in: true, container: dialogRef.current, direction: "left" }, { children: _jsx(layer.Component, Object.assign({}, layer.ComponentProps)) })))] })));
|
|
601
665
|
}
|
|
@@ -34,7 +34,7 @@ const DEFAULT_DISCUSSION = {
|
|
|
34
34
|
export default (props) => {
|
|
35
35
|
// PROPS
|
|
36
36
|
const { className = null, value = Object.assign({}, DEFAULT_DISCUSSION), defaultInitialMaxHeightContentEditor = DEFAULT_INITIAL_MAX_HEIGHT_CONTENT_EDITOR, defaultExtraSpaceContentEditor = DEFAULT_EXTRA_SPACE_CONTENT_EDITOR, isContentSwitchButtonVisible = true, error = {}, disabled = false, onChange, EditorProps = {} } = props;
|
|
37
|
-
const { titleError = null, error: generalError = null } = Object.assign({}, error);
|
|
37
|
+
const { titleError = null, categoriesError = null, addressingError = null, error: generalError = null } = Object.assign({}, error);
|
|
38
38
|
const titleRef = useRef(null);
|
|
39
39
|
const [editorMaxHeight, setEditorMaxHeight] = useState(defaultInitialMaxHeightContentEditor + (isContentSwitchButtonVisible ? 0 : DEFAULT_HEIGHT_SWITCH_CONTENT_TYPE));
|
|
40
40
|
// HOOKS
|
|
@@ -80,5 +80,5 @@ export default (props) => {
|
|
|
80
80
|
defaultMessage: 'ui.composer.content.discussion.title.label'
|
|
81
81
|
}), autoFocus: true, fullWidth: true, variant: "outlined", value: value.title, onChange: handleChangeTitle, onKeyDown: handleKeyDownTitle, multiline: true, InputProps: {
|
|
82
82
|
endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_TITLE_MAX_LENGTH - value.title.length }))
|
|
83
|
-
}, error: Boolean(titleError), helperText: titleError, disabled: disabled }), _jsx(Box, Object.assign({ sx: { [`& .${SCEDITOR_PREFIX}-content`]: { maxHeight: `${editorMaxHeight} !important` } } }, { children: _jsx(Editor, Object.assign({}, EditorProps, { editable: !disabled, className: classes.editor, onChange: handleChangeHtml, defaultValue: value.html })) }))] })));
|
|
83
|
+
}, error: Boolean(titleError) || Boolean(categoriesError) || Boolean(addressingError), helperText: titleError || categoriesError || addressingError, disabled: disabled }), _jsx(Box, Object.assign({ sx: { [`& .${SCEDITOR_PREFIX}-content`]: { maxHeight: `${editorMaxHeight} !important` } } }, { children: _jsx(Editor, Object.assign({}, EditorProps, { editable: !disabled, className: classes.editor, onChange: handleChangeHtml, defaultValue: value.html })) }))] })));
|
|
84
84
|
};
|
|
@@ -56,7 +56,7 @@ export default (inProps) => {
|
|
|
56
56
|
name: PREFIX
|
|
57
57
|
});
|
|
58
58
|
const { className = null, value = { poll: Object.assign({}, DEFAULT_POLL) }, error = {}, disabled, onChange } = props;
|
|
59
|
-
const { titleError = null, error: generalError = null } = Object.assign({}, error);
|
|
59
|
+
const { titleError = null, addressingError = null, error: generalError = null } = Object.assign({}, error);
|
|
60
60
|
// MEMO
|
|
61
61
|
const poll = useMemo(() => (value.poll ? value.poll : Object.assign({}, DEFAULT_POLL)), [value, DEFAULT_POLL]);
|
|
62
62
|
// INTL
|
|
@@ -97,7 +97,7 @@ export default (inProps) => {
|
|
|
97
97
|
minDate.setDate(minDate.getDate() + COMPOSER_POLL_MIN_CLOSE_DATE_DELTA);
|
|
98
98
|
return minDate;
|
|
99
99
|
}, []);
|
|
100
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [generalError && (
|
|
100
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [(generalError || addressingError) && (_jsxs(Typography, Object.assign({ className: classes.generalError }, { children: [generalError && (_jsx(FormattedMessage, { id: `ui.composer.content.poll.error.${generalError}`, defaultMessage: `ui.composer.content.poll.error.${generalError}` })), addressingError && addressingError] }))), _jsx(Box, Object.assign({ className: classes.title }, { children: _jsx(TextField, { autoFocus: true, disabled: disabled, label: _jsx(FormattedMessage, { id: "ui.composer.content.poll.title", defaultMessage: "ui.composer.content.poll.title" }), variant: "outlined", value: poll.title, onChange: handleChangeTitle, fullWidth: true, error: Boolean(titleError), helperText: titleError && titleError, InputProps: {
|
|
101
101
|
endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: COMPOSER_POLL_TITLE_MAX_LENGTH - poll.title.length }))
|
|
102
102
|
} }) })), _jsx(Box, Object.assign({ className: classes.choices }, { children: _jsx(ReactSortable, Object.assign({ list: [...poll.choices], setList: handleSortChoices, tag: SortableComponent }, { children: poll.choices.map((choice, index) => (_jsx(TextField, { placeholder: intl.formatMessage(messages.choicePlaceholder), value: choice.choice, onChange: handleChangeChoice(index), variant: "outlined", disabled: disabled, InputProps: {
|
|
103
103
|
startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "drag" }) }))),
|
|
@@ -29,7 +29,7 @@ const DEFAULT_POST = {
|
|
|
29
29
|
export default (props) => {
|
|
30
30
|
// PROPS
|
|
31
31
|
const { className = null, value = Object.assign({}, DEFAULT_POST), error = {}, disabled = false, onChange, EditorProps = {} } = props;
|
|
32
|
-
const { error: generalError = null } = Object.assign({}, error);
|
|
32
|
+
const { categoriesError = null, addressingError = null, error: generalError = null } = Object.assign({}, error);
|
|
33
33
|
// REF
|
|
34
34
|
const editorRef = useRef();
|
|
35
35
|
// EFFECTS
|
|
@@ -41,5 +41,5 @@ export default (props) => {
|
|
|
41
41
|
onChange(Object.assign(Object.assign({}, value), { html }));
|
|
42
42
|
}, [value]);
|
|
43
43
|
// RENDER
|
|
44
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [generalError && (
|
|
44
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [(generalError || categoriesError || addressingError) && (_jsxs(Typography, Object.assign({ className: classes.generalError }, { children: [generalError && _jsx(FormattedMessage, { id: `ui.composer.error.${generalError}`, defaultMessage: `ui.composer.error.${generalError}` }), categoriesError && categoriesError, _jsx("br", {}), addressingError && addressingError] }))), _jsx(Editor, Object.assign({ ref: editorRef }, EditorProps, { editable: !disabled, className: classes.editor, onChange: handleChangeHtml, defaultValue: value.html }))] })));
|
|
45
45
|
};
|
|
@@ -38,16 +38,6 @@ const AudienceLayer = React.forwardRef((props, ref) => {
|
|
|
38
38
|
} } = props, rest = __rest(props, ["className", "onClose", "onSave", "defaultValue", "TextFieldProps"]);
|
|
39
39
|
// STATE
|
|
40
40
|
const [autocompleteOpen, setAutocompleteOpen] = useState(false);
|
|
41
|
-
const [audience, setAudience] = useState(
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
43
|
-
// @ts-ignore
|
|
44
|
-
defaultValue === null || defaultValue.length === 0
|
|
45
|
-
? AudienceTypes.AUDIENCE_ALL
|
|
46
|
-
: defaultValue && Object.prototype.hasOwnProperty.call(defaultValue, 'recurring')
|
|
47
|
-
? AudienceTypes.AUDIENCE_EVENT
|
|
48
|
-
: defaultValue && Object.prototype.hasOwnProperty.call(defaultValue, 'managed_by')
|
|
49
|
-
? AudienceTypes.AUDIENCE_GROUP
|
|
50
|
-
: AudienceTypes.AUDIENCE_TAG);
|
|
51
41
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
52
42
|
// @ts-ignore
|
|
53
43
|
const [value, setValue] = useState(defaultValue || undefined);
|
|
@@ -66,6 +56,23 @@ const AudienceLayer = React.forwardRef((props, ref) => {
|
|
|
66
56
|
features.includes(SCFeatureName.TAGGING) &&
|
|
67
57
|
SCPreferences.CONFIGURATIONS_EVENTS_ENABLED in preferences &&
|
|
68
58
|
preferences[SCPreferences.CONFIGURATIONS_EVENTS_ENABLED].value, [preferences, features]);
|
|
59
|
+
const taggingRequiredEnabled = useMemo(() => preferences &&
|
|
60
|
+
features &&
|
|
61
|
+
features.includes(SCFeatureName.TAGGING) &&
|
|
62
|
+
SCPreferences.CONFIGURATIONS_POST_ADDRESSING_REQUIRED_ENABLED in preferences &&
|
|
63
|
+
preferences[SCPreferences.CONFIGURATIONS_POST_ADDRESSING_REQUIRED_ENABLED].value, [preferences, features]);
|
|
64
|
+
const [audience, setAudience] = useState(
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
defaultValue === null || defaultValue.length === 0
|
|
68
|
+
? taggingRequiredEnabled
|
|
69
|
+
? AudienceTypes.AUDIENCE_TAG
|
|
70
|
+
: AudienceTypes.AUDIENCE_ALL
|
|
71
|
+
: Object.prototype.hasOwnProperty.call(defaultValue, 'recurring')
|
|
72
|
+
? AudienceTypes.AUDIENCE_EVENT
|
|
73
|
+
: Object.prototype.hasOwnProperty.call(defaultValue, 'managed_by')
|
|
74
|
+
? AudienceTypes.AUDIENCE_GROUP
|
|
75
|
+
: AudienceTypes.AUDIENCE_TAG);
|
|
69
76
|
// HANDLERS
|
|
70
77
|
const handleSave = useCallback(() => {
|
|
71
78
|
audience === AudienceTypes.AUDIENCE_GROUP || audience === AudienceTypes.AUDIENCE_EVENT
|
|
@@ -78,16 +85,16 @@ const AudienceLayer = React.forwardRef((props, ref) => {
|
|
|
78
85
|
const handleChangeAudience = useCallback((_event, data) => setAudience(data), []);
|
|
79
86
|
const handleAutocompleteOpen = useCallback(() => setAutocompleteOpen(true), []);
|
|
80
87
|
const handleAutocompleteClose = useCallback(() => setAutocompleteOpen(false), []);
|
|
81
|
-
return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.title", defaultMessage: "ui.composer.layer.audience.title" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSave }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.save", defaultMessage: "ui.composer.layer.save" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsxs(Tabs, Object.assign({ value: audience, onChange: handleChangeAudience, "aria-label": "audience type" }, { children: [_jsx(Tab, { value: AudienceTypes.AUDIENCE_ALL, icon: _jsx(Icon, { children: "public" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.all", defaultMessage: "ui.composer.layer.audience.all" }) }), eventsEnabled && (_jsx(Tab, { disabled: (Boolean(value === null || value === void 0 ? void 0 : value.length) && !Object.prototype.hasOwnProperty.call(value, 'recurring')) ||
|
|
88
|
+
return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.title", defaultMessage: "ui.composer.layer.audience.title" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: handleSave }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.save", defaultMessage: "ui.composer.layer.save" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsxs(Tabs, Object.assign({ value: audience, onChange: handleChangeAudience, "aria-label": "audience type" }, { children: [!taggingRequiredEnabled && (_jsx(Tab, { value: AudienceTypes.AUDIENCE_ALL, icon: _jsx(Icon, { children: "public" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.all", defaultMessage: "ui.composer.layer.audience.all" }) })), eventsEnabled && (_jsx(Tab, { disabled: (Boolean(value === null || value === void 0 ? void 0 : value.length) && !Object.prototype.hasOwnProperty.call(value, 'recurring')) ||
|
|
82
89
|
(value !== undefined && Boolean(!(value === null || value === void 0 ? void 0 : value.length)) && audience !== AudienceTypes.AUDIENCE_ALL) ||
|
|
83
90
|
(Boolean((value === null || value === void 0 ? void 0 : value.length) === 0) && audience === AudienceTypes.AUDIENCE_ALL && Boolean((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.length) !== 0)), value: AudienceTypes.AUDIENCE_EVENT, icon: _jsx(Icon, { children: "CalendarIcon" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.event", defaultMessage: "ui.composer.layer.audience.event" }) })), groupsEnabled && (_jsx(Tab, { disabled: (Boolean(value === null || value === void 0 ? void 0 : value.length) && !Object.prototype.hasOwnProperty.call(value, 'managed_by')) ||
|
|
84
91
|
(value !== undefined && Boolean(!(value === null || value === void 0 ? void 0 : value.length)) && audience !== AudienceTypes.AUDIENCE_ALL) ||
|
|
85
|
-
(Boolean((value === null || value === void 0 ? void 0 : value.length) === 0) && audience === AudienceTypes.AUDIENCE_ALL && Boolean((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.length) !== 0)), value: AudienceTypes.AUDIENCE_GROUP, icon: _jsx(Icon, { children: "groups" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.group", defaultMessage: "ui.composer.layer.audience.group" }) })), _jsx(Tab, { disabled: value && Object.prototype.hasOwnProperty.call(value, 'managed_by'), value: AudienceTypes.AUDIENCE_TAG, icon: _jsx(Icon, { children: "label" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag", defaultMessage: "ui.composer.layer.audience.tag" }) })] })), _jsxs(Typography, Object.assign({ className: classes.message }, { children: [audience === AudienceTypes.AUDIENCE_ALL && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.all.message", defaultMessage: "ui.composer.audience.layer.all.message" })), audience === AudienceTypes.AUDIENCE_EVENT && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.event.message", defaultMessage: "ui.composer.audience.layer.event.message" })), audience === AudienceTypes.AUDIENCE_GROUP && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.group.message", defaultMessage: "ui.composer.audience.layer.group.message" })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag.message", defaultMessage: "ui.composer.audience.layer.tag.message" }))] })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(Autocomplete, { className: classes.autocomplete, open: autocompleteOpen, onOpen: handleAutocompleteOpen, onClose: handleAutocompleteClose, multiple: true, options: scAddressingTags || [], getOptionLabel: (option) => option.name || '', value: value, selectOnFocus: true, clearOnBlur: true, handleHomeEndKeys: true, clearIcon: null, noOptionsText: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tags.empty", defaultMessage: "ui.composer.layer.audience.tags.empty" }), onChange: handleChange, isOptionEqualToValue: (option, value) => value.id === option.id, renderTags: (value, getTagProps) => {
|
|
92
|
+
(Boolean((value === null || value === void 0 ? void 0 : value.length) === 0) && audience === AudienceTypes.AUDIENCE_ALL && Boolean((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.length) !== 0)), value: AudienceTypes.AUDIENCE_GROUP, icon: _jsx(Icon, { children: "groups" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.group", defaultMessage: "ui.composer.layer.audience.group" }) })), _jsx(Tab, { disabled: value && Object.prototype.hasOwnProperty.call(value, 'managed_by'), value: AudienceTypes.AUDIENCE_TAG, icon: _jsx(Icon, { children: "label" }), label: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag", defaultMessage: "ui.composer.layer.audience.tag" }) })] })), _jsxs(Typography, Object.assign({ className: classes.message }, { children: [audience === AudienceTypes.AUDIENCE_ALL && !taggingRequiredEnabled && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.all.message", defaultMessage: "ui.composer.audience.layer.all.message" })), audience === AudienceTypes.AUDIENCE_EVENT && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.event.message", defaultMessage: "ui.composer.audience.layer.event.message" })), audience === AudienceTypes.AUDIENCE_GROUP && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.group.message", defaultMessage: "ui.composer.audience.layer.group.message" })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(FormattedMessage, { id: "ui.composer.layer.audience.tag.message", defaultMessage: "ui.composer.audience.layer.tag.message" }))] })), audience === AudienceTypes.AUDIENCE_TAG && (_jsx(Autocomplete, { className: classes.autocomplete, open: autocompleteOpen, onOpen: handleAutocompleteOpen, onClose: handleAutocompleteClose, multiple: true, options: scAddressingTags || [], getOptionLabel: (option) => option.name || '', value: value, selectOnFocus: true, clearOnBlur: true, handleHomeEndKeys: true, clearIcon: null, noOptionsText: _jsx(FormattedMessage, { id: "ui.composer.layer.audience.tags.empty", defaultMessage: "ui.composer.layer.audience.tags.empty" }), onChange: handleChange, isOptionEqualToValue: (option, value) => value.id === option.id, renderTags: (value, getTagProps) => {
|
|
86
93
|
return value.map((option, index) => _jsx(TagChip, Object.assign({ tag: option }, getTagProps({ index })), option.id));
|
|
87
94
|
}, renderOption: (props, option, { selected, inputValue }) => {
|
|
88
95
|
const matches = match(option.name, inputValue);
|
|
89
96
|
const parts = parse(option.name, matches);
|
|
90
|
-
return (_jsx("li", Object.assign({}, props, { children: _jsx(TagChip, { tag: option, label: _jsx(React.Fragment, { children: parts.map((part, index) => (_jsx("span", Object.assign({ style: { fontWeight: part.highlight ? 700 : 400 } }, { children: part.text }), index))) }) }, option.id) })));
|
|
97
|
+
return (_jsx("li", Object.assign({}, props, { children: _jsx(TagChip, { disposable: false, tag: option, label: _jsx(React.Fragment, { children: parts.map((part, index) => (_jsx("span", Object.assign({ style: { fontWeight: part.highlight ? 700 : 400 } }, { children: part.text }), index))) }) }, option.id) })));
|
|
91
98
|
}, renderInput: (params) => {
|
|
92
99
|
return (_jsx(TextField, Object.assign({}, params, TextFieldProps, { InputProps: Object.assign(Object.assign({}, params.InputProps), { autoComplete: 'addressing', endAdornment: _jsx(React.Fragment, { children: params.InputProps.endAdornment }) }) })));
|
|
93
100
|
} })), audience === AudienceTypes.AUDIENCE_GROUP && _jsx(GroupAutocomplete, { onChange: handleGroupChange, defaultValue: defaultValue }), audience === AudienceTypes.AUDIENCE_EVENT && _jsx(EventAutocomplete, { onChange: handleEventChange, defaultValue: defaultValue })] }))] })));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
3
|
+
export interface ScheduledLayerProps extends Omit<BoxProps, 'defaultValue'> {
|
|
4
|
+
defaultValue?: Date | null;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSave: (date: Date | null) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ScheduledLayer: React.ForwardRefExoticComponent<Pick<ScheduledLayerProps, "id" | "role" | "className" | "style" | "classes" | "p" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "component" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "onClose" | "onSave"> & React.RefAttributes<unknown>>;
|
|
9
|
+
export default ScheduledLayer;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React, { useCallback, useState } from 'react';
|
|
4
|
+
import { FormattedMessage } from 'react-intl';
|
|
5
|
+
import { Box, Button, DialogTitle, IconButton, Typography, DialogContent, Icon, styled } from '@mui/material';
|
|
6
|
+
import { LocalizationProvider, StaticDateTimePicker, DateTimePickerTabs } from '@mui/x-date-pickers';
|
|
7
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
8
|
+
import itLocale from 'date-fns/locale/it';
|
|
9
|
+
import enLocale from 'date-fns/locale/en-US';
|
|
10
|
+
import { useSCContext } from '@selfcommunity/react-core';
|
|
11
|
+
import classNames from 'classnames';
|
|
12
|
+
import { format, parseISO } from 'date-fns';
|
|
13
|
+
import { PREFIX } from '../../constants';
|
|
14
|
+
import { capitalize } from '@selfcommunity/utils';
|
|
15
|
+
const classes = {
|
|
16
|
+
root: `${PREFIX}-layer-scheduled-root`,
|
|
17
|
+
title: `${PREFIX}-layer-title`,
|
|
18
|
+
content: `${PREFIX}-layer-content`,
|
|
19
|
+
message: `${PREFIX}-layer-scheduled-message`,
|
|
20
|
+
picker: `${PREFIX}-layer-scheduled-picker`,
|
|
21
|
+
toolbar: `${PREFIX}-layer-scheduled-toolbar`
|
|
22
|
+
};
|
|
23
|
+
const Root = styled(Box, {
|
|
24
|
+
name: PREFIX,
|
|
25
|
+
slot: 'LayerScheduledRoot'
|
|
26
|
+
})(() => ({}));
|
|
27
|
+
const ScheduledLayer = React.forwardRef((props, ref) => {
|
|
28
|
+
//PROPS
|
|
29
|
+
const { className, onClose, onSave, defaultValue = null } = props, rest = __rest(props, ["className", "onClose", "onSave", "defaultValue"]);
|
|
30
|
+
//CONTEXT
|
|
31
|
+
const scContext = useSCContext();
|
|
32
|
+
const locale = scContext.settings.locale.default === 'it' ? itLocale : enLocale;
|
|
33
|
+
// STATE
|
|
34
|
+
const [scheduledAt, setScheduledAt] = useState(defaultValue ? (typeof defaultValue === 'string' ? parseISO(defaultValue) : defaultValue) : null);
|
|
35
|
+
const handleUpdate = useCallback((value) => {
|
|
36
|
+
if (value) {
|
|
37
|
+
setScheduledAt(value);
|
|
38
|
+
onSave(value);
|
|
39
|
+
}
|
|
40
|
+
}, [onSave]);
|
|
41
|
+
const CustomToolbar = (props) => {
|
|
42
|
+
const { value } = props;
|
|
43
|
+
if (!value)
|
|
44
|
+
return null;
|
|
45
|
+
const dayName = capitalize(format(value, 'EEEE', { locale }));
|
|
46
|
+
const restOfDate = format(value, 'd MMMM yyyy • HH:mm', { locale });
|
|
47
|
+
return _jsx(Typography, Object.assign({ variant: "h4" }, { children: `${dayName} ${restOfDate}` }));
|
|
48
|
+
};
|
|
49
|
+
return (_jsxs(Root, Object.assign({ ref: ref, className: classNames(className, classes.root) }, rest, { children: [_jsxs(DialogTitle, Object.assign({ className: classes.title }, { children: [_jsx(IconButton, Object.assign({ onClick: onClose }, { children: _jsx(Icon, { children: "arrow_back" }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.title", defaultMessage: "Programma la Pubblicazione" }) }), _jsx(Button, Object.assign({ size: "small", color: "secondary", variant: "contained", onClick: () => onSave(scheduledAt), disabled: !scheduledAt }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.submit", defaultMessage: "Attiva Programmazione" }) }))] })), _jsxs(DialogContent, Object.assign({ className: classes.content }, { children: [_jsx(Typography, Object.assign({ className: classes.message }, { children: _jsx(FormattedMessage, { id: "ui.composer.layer.scheduled.message", defaultMessage: "ui.composer.audience.scheduled.message" }) })), _jsx(LocalizationProvider, Object.assign({ dateAdapter: AdapterDateFns, adapterLocale: locale }, { children: _jsx(StaticDateTimePicker, { className: classes.picker, disablePast: true, value: scheduledAt, onChange: (value) => setScheduledAt(value), onAccept: handleUpdate, slots: {
|
|
50
|
+
toolbar: CustomToolbar,
|
|
51
|
+
tabs: (props) => _jsx(DateTimePickerTabs, Object.assign({}, props)),
|
|
52
|
+
actionBar: () => null
|
|
53
|
+
}, slotProps: {
|
|
54
|
+
tabs: {
|
|
55
|
+
hidden: false
|
|
56
|
+
}
|
|
57
|
+
} }) }))] }))] })));
|
|
58
|
+
});
|
|
59
|
+
export default ScheduledLayer;
|
|
@@ -208,7 +208,8 @@ export default React.forwardRef(function ComposerIconButton(inProps, ref) {
|
|
|
208
208
|
}, [setOpenCreateLiveStream]);
|
|
209
209
|
const handleSuccess = useCallback((feedObject) => {
|
|
210
210
|
setOpenComposer(false);
|
|
211
|
-
|
|
211
|
+
const messageId = feedObject.scheduled_at ? 'ui.composer.scheduled.success' : 'ui.composerIconButton.composer.success';
|
|
212
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: messageId, defaultMessage: messageId }), {
|
|
212
213
|
action: () => (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes[`${feedObject.type.toUpperCase()}_ROUTE_NAME`], getRouteData(feedObject)) }, { children: _jsx(FormattedMessage, { id: "ui.composerIconButton.composer.viewContribute", defaultMessage: "ui.composerIconButton.composer.viewContribute" }) }))),
|
|
213
214
|
variant: 'success',
|
|
214
215
|
autoHideDuration: 7000
|
|
@@ -6,6 +6,7 @@ import { Box, styled } from '@mui/material';
|
|
|
6
6
|
import FollowUserButton from '../FollowUserButton';
|
|
7
7
|
import FriendshipUserButton from '../FriendshipUserButton';
|
|
8
8
|
import { useThemeProps } from '@mui/system';
|
|
9
|
+
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
9
10
|
const PREFIX = 'SCConnectionUserButton';
|
|
10
11
|
const classes = {
|
|
11
12
|
root: `${PREFIX}-root`
|
|
@@ -46,5 +47,10 @@ export default function ConnectionUserButton(inProps) {
|
|
|
46
47
|
const scPreferencesContext = useContext(SCPreferencesContext);
|
|
47
48
|
const followEnabled = SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED in scPreferencesContext.preferences &&
|
|
48
49
|
scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_FOLLOW_ENABLED].value;
|
|
50
|
+
const connectionEnabled = SCPreferences.CONFIGURATIONS_CONNECTION_ENABLED in scPreferencesContext.preferences &&
|
|
51
|
+
scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_CONNECTION_ENABLED].value;
|
|
52
|
+
if (!followEnabled && !connectionEnabled) {
|
|
53
|
+
return _jsx(HiddenPlaceholder, {});
|
|
54
|
+
}
|
|
49
55
|
return (_jsx(React.Fragment, { children: followEnabled ? (_jsx(FollowUserButton, Object.assign({ user: user }, followConnectUserButtonProps, rest))) : (_jsx(FriendshipUserButton, Object.assign({ user: user }, followConnectUserButtonProps, rest))) }));
|
|
50
56
|
}
|
|
@@ -4,6 +4,7 @@ import { SCCourseTemplateType } from '../../types/course';
|
|
|
4
4
|
import { CourseParticipantsButtonProps } from '../CourseParticipantsButton';
|
|
5
5
|
import { WidgetProps } from '../Widget';
|
|
6
6
|
import { CourseSkeletonProps } from './Skeleton';
|
|
7
|
+
import { CacheStrategies } from '@selfcommunity/utils';
|
|
7
8
|
export interface CourseProps extends WidgetProps {
|
|
8
9
|
/**
|
|
9
10
|
* Course Object
|
|
@@ -39,6 +40,10 @@ export interface CourseProps extends WidgetProps {
|
|
|
39
40
|
* @default {}
|
|
40
41
|
*/
|
|
41
42
|
CourseSkeletonComponentProps?: CourseSkeletonProps;
|
|
43
|
+
/**
|
|
44
|
+
* Override default cache strategy on fetch element
|
|
45
|
+
*/
|
|
46
|
+
cacheStrategy?: CacheStrategies;
|
|
42
47
|
/**
|
|
43
48
|
* Any other properties
|
|
44
49
|
*/
|
|
@@ -104,9 +104,9 @@ export default function Course(inProps) {
|
|
|
104
104
|
props: inProps,
|
|
105
105
|
name: PREFIX
|
|
106
106
|
});
|
|
107
|
-
const { id = `course_object_${props.courseId ? props.courseId : props.course ? props.course.id : ''}`, courseId = null, course = null, className = null, template = SCCourseTemplateType.PREVIEW, actions, CourseParticipantsButtonComponentProps = {}, CourseSkeletonComponentProps = {}, userProfileSnippet } = props, rest = __rest(props, ["id", "courseId", "course", "className", "template", "actions", "CourseParticipantsButtonComponentProps", "CourseSkeletonComponentProps", "userProfileSnippet"]);
|
|
107
|
+
const { id = `course_object_${props.courseId ? props.courseId : props.course ? props.course.id : ''}`, courseId = null, course = null, className = null, template = SCCourseTemplateType.PREVIEW, actions, CourseParticipantsButtonComponentProps = {}, CourseSkeletonComponentProps = {}, cacheStrategy, userProfileSnippet } = props, rest = __rest(props, ["id", "courseId", "course", "className", "template", "actions", "CourseParticipantsButtonComponentProps", "CourseSkeletonComponentProps", "cacheStrategy", "userProfileSnippet"]);
|
|
108
108
|
// STATE
|
|
109
|
-
const { scCourse } = useSCFetchCourse({ id: courseId, course });
|
|
109
|
+
const { scCourse } = useSCFetchCourse(Object.assign({ id: courseId, course }, (cacheStrategy && { cacheStrategy })));
|
|
110
110
|
const theme = useTheme();
|
|
111
111
|
const isMobile = useMediaQuery(theme.breakpoints.between('xs', 'md'));
|
|
112
112
|
const MAX_VISIBLE_CATEGORIES = isMobile ? 3 : 1;
|
|
@@ -163,7 +163,7 @@ export default function Course(inProps) {
|
|
|
163
163
|
}), { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: (_e = scCourse.created_by) === null || _e === void 0 ? void 0 : _e.username })) })), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse), className: classes.previewNameWrapper }, { children: _jsx(Typography, Object.assign({ variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), _jsxs(Typography, Object.assign({ className: classes.previewInfo }, { children: [_jsx(FormattedMessage, { id: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft', defaultMessage: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft' }), ' - ', _jsx(FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` })] })), _jsxs(Box, Object.assign({ className: classes.previewCategory }, { children: [scCourse.categories.slice(0, MAX_VISIBLE_CATEGORIES).map((category) => (_jsx(Chip, { size: "small", label: category.name }, category.id))), scCourse.categories.length > MAX_VISIBLE_CATEGORIES && (_jsx(Tooltip, Object.assign({ title: _jsx(_Fragment, { children: scCourse.categories.slice(MAX_VISIBLE_CATEGORIES).map((cat) => (_jsx(Box, { children: cat.name }, cat.id))) }) }, { children: _jsx(Chip, { size: "small", label: `+${scCourse.categories.length - MAX_VISIBLE_CATEGORIES}`, sx: { cursor: 'pointer' } }) })))] })), _jsx(Box, Object.assign({ className: classes.previewProgress }, { children: renderProgress() }))] })), actions !== null && actions !== void 0 ? actions : (_jsx(CardActions, Object.assign({ className: classes.previewActions }, { children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
|
|
164
164
|
}
|
|
165
165
|
else {
|
|
166
|
-
contentObj = (_jsx(SnippetRoot, {
|
|
166
|
+
contentObj = (_jsx(SnippetRoot, { elevation: 0, className: classes.snippetRoot, image: _jsxs(Box, Object.assign({ className: classes.snippetImage }, { children: [_jsx(Avatar, { variant: "square", alt: scCourse.name, src: scCourse.image_medium, className: userProfileSnippet ? classes.snippetAvatarUserProfile : classes.snippetAvatar }), !userProfileSnippet &&
|
|
167
167
|
(isCourseAdmin || isCourseCompleted(scCourse) || isCourseNew(scCourse) || scCourse.join_status === SCCourseJoinStatusType.JOINED) && (_jsx(Chip, { size: "small", component: "div", color: isCourseCompleted(scCourse) || (isCourseAdmin && scCourse.privacy)
|
|
168
168
|
? 'primary'
|
|
169
169
|
: isCourseAdmin && !scCourse.privacy
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SCCourseType } from '@selfcommunity/types';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
interface HeaderCourseDashboardProps {
|
|
4
4
|
course: SCCourseType;
|
|
5
5
|
hasAction?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare function HeaderCourseDashboard(props: HeaderCourseDashboardProps): JSX.Element;
|
|
8
|
-
declare const _default:
|
|
8
|
+
declare const _default: React.MemoExoticComponent<typeof HeaderCourseDashboard>;
|
|
9
9
|
export default _default;
|