@plone/volto 18.0.0-alpha.13 → 18.0.0-alpha.15
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/CHANGELOG.md +33 -0
- package/jest-setup-afterenv.js +2 -0
- package/locales/ca/LC_MESSAGES/volto.po +6 -0
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +6 -0
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +6 -0
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +6 -0
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +6 -0
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +6 -0
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +6 -0
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +6 -0
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +6 -0
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +6 -0
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +6 -0
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +6 -0
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +6 -0
- package/locales/ro.json +1 -1
- package/locales/volto.pot +7 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +6 -0
- package/locales/zh_CN.json +1 -1
- package/package.json +28 -23
- package/src/components/manage/Add/Add.jsx +9 -11
- package/src/components/manage/Add/Add.test.jsx +11 -13
- package/src/components/manage/Aliases/Aliases.jsx +6 -6
- package/src/components/manage/Aliases/Aliases.test.jsx +7 -7
- package/src/components/manage/BlockChooser/BlockChooser.test.jsx +0 -1
- package/src/components/manage/BlockChooser/BlockChooserButton.jsx +6 -6
- package/src/components/manage/BlockChooser/BlockChooserSearch.test.jsx +0 -1
- package/src/components/manage/Blocks/Block/Settings.test.jsx +0 -1
- package/src/components/manage/Blocks/Container/NewBlockAddButton.jsx +20 -19
- package/src/components/manage/Blocks/Image/View.test.jsx +0 -1
- package/src/components/manage/Blocks/Table/Edit.jsx +7 -6
- package/src/components/manage/Contents/Contents.jsx +6 -6
- package/src/components/manage/Contents/Contents.test.jsx +7 -7
- package/src/components/manage/Contents/ContentsPropertiesModal.test.jsx +4 -4
- package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +6 -6
- package/src/components/manage/Controlpanels/AddonsControlpanel.test.jsx +6 -7
- package/src/components/manage/Controlpanels/Aliases.jsx +6 -6
- package/src/components/manage/Controlpanels/Aliases.test.jsx +6 -7
- package/src/components/manage/Controlpanels/ContentType.jsx +6 -6
- package/src/components/manage/Controlpanels/ContentType.test.jsx +7 -7
- package/src/components/manage/Controlpanels/ContentTypeLayout.jsx +93 -85
- package/src/components/manage/Controlpanels/ContentTypeLayout.test.jsx +7 -7
- package/src/components/manage/Controlpanels/ContentTypeSchema.jsx +6 -6
- package/src/components/manage/Controlpanels/ContentTypes.jsx +6 -6
- package/src/components/manage/Controlpanels/ContentTypes.test.jsx +7 -7
- package/src/components/manage/Controlpanels/Controlpanel.jsx +6 -6
- package/src/components/manage/Controlpanels/Controlpanel.test.jsx +7 -7
- package/src/components/manage/Controlpanels/Controlpanels.jsx +6 -6
- package/src/components/manage/Controlpanels/Controlpanels.test.jsx +10 -10
- package/src/components/manage/Controlpanels/DatabaseInformation.jsx +6 -6
- package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +6 -6
- package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.test.jsx +7 -7
- package/src/components/manage/Controlpanels/ModerateComments.jsx +6 -6
- package/src/components/manage/Controlpanels/ModerateComments.test.jsx +7 -7
- package/src/components/manage/Controlpanels/Relations/Relations.jsx +13 -7
- package/src/components/manage/Controlpanels/Rules/AddRule.jsx +6 -6
- package/src/components/manage/Controlpanels/Rules/AddRule.test.jsx +6 -7
- package/src/components/manage/Controlpanels/Rules/ConfigureRule.jsx +6 -6
- package/src/components/manage/Controlpanels/Rules/ConfigureRule.test.jsx +6 -7
- package/src/components/manage/Controlpanels/Rules/EditRule.jsx +6 -6
- package/src/components/manage/Controlpanels/Rules/EditRule.test.jsx +6 -7
- package/src/components/manage/Controlpanels/Rules/Rules.jsx +6 -6
- package/src/components/manage/Controlpanels/Rules/Rules.test.jsx +6 -7
- package/src/components/manage/Controlpanels/Rules/components/{VariableModal.test.jsx → VariableModal.test.jsx.removed} +6 -7
- package/src/components/manage/Controlpanels/UndoControlpanel.jsx +6 -6
- package/src/components/manage/Controlpanels/UndoControlpanel.test.jsx +7 -7
- package/src/components/manage/Controlpanels/UpgradeControlPanel.jsx +6 -6
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +14 -8
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.test.jsx +7 -7
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +6 -6
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.test.jsx +7 -7
- package/src/components/manage/Delete/Delete.jsx +6 -6
- package/src/components/manage/Delete/Delete.test.jsx +10 -10
- package/src/components/manage/Diff/Diff.jsx +6 -6
- package/src/components/manage/Diff/Diff.test.jsx +2 -3
- package/src/components/manage/Edit/Edit.jsx +10 -11
- package/src/components/manage/Edit/Edit.test.jsx +14 -10
- package/src/components/manage/Form/BlockDataForm.test.jsx +0 -1
- package/src/components/manage/Form/Form.jsx +148 -122
- package/src/components/manage/Form/Form.test.jsx +7 -0
- package/src/components/manage/Form/ModalForm.test.jsx +0 -1
- package/src/components/manage/History/History.jsx +6 -6
- package/src/components/manage/History/History.test.jsx +14 -13
- package/src/components/manage/LinksToItem/LinksToItem.jsx +78 -49
- package/src/components/manage/LinksToItem/LinksToItem.test.jsx +7 -7
- package/src/components/manage/Multilingual/ManageTranslations.jsx +13 -7
- package/src/components/manage/Multilingual/ManageTranslations.test.jsx +6 -7
- package/src/components/manage/Preferences/ChangePassword.jsx +6 -6
- package/src/components/manage/Preferences/ChangePassword.test.jsx +13 -7
- package/src/components/manage/Preferences/PersonalInformation.test.jsx +15 -3
- package/src/components/manage/Preferences/PersonalPreferences.test.jsx +8 -3
- package/src/components/manage/Rules/Rules.jsx +6 -6
- package/src/components/manage/Rules/Rules.test.jsx +7 -7
- package/src/components/manage/Sharing/Sharing.jsx +6 -6
- package/src/components/manage/Sharing/Sharing.test.jsx +7 -7
- package/src/components/manage/Sidebar/ObjectBrowser.jsx +1 -1
- package/src/components/manage/Sidebar/Sidebar.jsx +2 -0
- package/src/components/manage/Sidebar/SidebarPopup.jsx +28 -21
- package/src/components/manage/Sidebar/SidebarPortal.jsx +7 -6
- package/src/components/manage/Toolbar/Toolbar.jsx +35 -2
- package/src/components/manage/Widgets/ArrayWidget.jsx +3 -1
- package/src/components/manage/Widgets/FileWidget.jsx +1 -1
- package/src/components/manage/Widgets/ObjectBrowserWidget.test.jsx +4 -4
- package/src/components/manage/Widgets/ObjectListWidget.test.js +0 -1
- package/src/components/manage/Widgets/ObjectWidget.test.jsx +0 -1
- package/src/components/manage/Widgets/SchemaWidget.test.jsx +4 -4
- package/src/components/manage/Widgets/SchemaWidgetFieldset.test.jsx +5 -5
- package/src/components/manage/Widgets/UrlWidget.test.jsx +4 -4
- package/src/components/manage/Widgets/VocabularyTermsWidget.test.jsx +4 -4
- package/src/components/theme/Comments/Comments.jsx +7 -8
- package/src/components/theme/Comments/Comments.test.jsx +7 -0
- package/src/components/theme/Component/Component.test.jsx +0 -1
- package/src/components/theme/ContactForm/ContactForm.jsx +6 -6
- package/src/components/theme/ContactForm/ContactForm.test.jsx +12 -10
- package/src/components/theme/Footer/Footer.test.jsx +0 -1
- package/src/components/theme/Logo/Logo.Multilingual.test.jsx +3 -1
- package/src/components/theme/Logo/Logo.jsx +18 -12
- package/src/components/theme/Logo/Logo.test.jsx +4 -1
- package/src/components/theme/Logout/Logout.test.jsx +8 -5
- package/src/components/theme/PasswordReset/PasswordReset.test.jsx +7 -0
- package/src/components/theme/PasswordReset/RequestPasswordReset.test.jsx +7 -0
- package/src/components/theme/Register/Register.test.jsx +7 -0
- package/src/components/theme/Search/Search.jsx +6 -6
- package/src/components/theme/Search/Search.test.jsx +13 -10
- package/src/components/theme/SlotRenderer/SlotRenderer.test.jsx +55 -0
- package/src/components/theme/SlotRenderer/SlotRenderer.tsx +54 -0
- package/src/components/theme/View/View.jsx +9 -6
- package/src/components/theme/View/View.test.jsx +28 -18
- package/src/config/index.js +3 -1
- package/src/helpers/AsyncConnect/AsyncConnect.test.js +0 -2
- package/src/helpers/Blocks/Blocks.js +5 -2
- package/src/helpers/Slots/index.tsx +12 -0
- package/src/helpers/Utils/UseDetectClickOutside.stories.jsx +8 -8
- package/src/helpers/index.js +1 -0
- package/src/start-client.jsx +3 -3
- package/test-setup-config.js +1 -0
- package/theme/themes/pastanaga/extras/toolbar.less +4 -4
- package/tsconfig.declarations.json +1 -0
- package/types/components/manage/Actions/Actions.d.ts +1 -1
- package/types/components/manage/Add/Add.d.ts +1 -4
- package/types/components/manage/Aliases/Aliases.d.ts +1 -4
- package/types/components/manage/AnchorPlugin/components/Link/index.d.ts +1 -1
- package/types/components/manage/BlockChooser/BlockChooserButton.d.ts +2 -2
- package/types/components/manage/BlockChooser/BlockChooserSearch.d.ts +1 -1
- package/types/components/manage/Blocks/Block/BlocksForm.d.ts +1 -1
- package/types/components/manage/Blocks/Block/DefaultEdit.d.ts +1 -1
- package/types/components/manage/Blocks/Block/DefaultView.d.ts +1 -1
- package/types/components/manage/Blocks/Block/Edit.d.ts +1 -3
- package/types/components/manage/Blocks/Block/Style.d.ts +1 -1
- package/types/components/manage/Blocks/Container/Data.d.ts +1 -1
- package/types/components/manage/Blocks/Container/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Container/EditBlockWrapper.d.ts +1 -1
- package/types/components/manage/Blocks/Container/NewBlockAddButton.d.ts +1 -1
- package/types/components/manage/Blocks/Container/SimpleContainerToolbar.d.ts +1 -1
- package/types/components/manage/Blocks/Description/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Description/View.d.ts +1 -1
- package/types/components/manage/Blocks/Grid/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Grid/View.d.ts +1 -1
- package/types/components/manage/Blocks/HTML/View.d.ts +1 -1
- package/types/components/manage/Blocks/HeroImageLeft/Data.d.ts +1 -1
- package/types/components/manage/Blocks/HeroImageLeft/Edit.d.ts +1 -4
- package/types/components/manage/Blocks/HeroImageLeft/View.d.ts +1 -1
- package/types/components/manage/Blocks/Image/Edit.d.ts +1 -4
- package/types/components/manage/Blocks/Image/ImageSidebar.d.ts +1 -1
- package/types/components/manage/Blocks/Image/View.d.ts +2 -2
- package/types/components/manage/Blocks/Image/schema.d.ts +1 -1
- package/types/components/manage/Blocks/LeadImage/View.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/DefaultNoResultsComponent.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/DefaultTemplate.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/GalleryNoResultsComponent.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/ImageGallery.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/ListingData.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/SummaryTemplate.d.ts +1 -1
- package/types/components/manage/Blocks/Listing/View.d.ts +1 -1
- package/types/components/manage/Blocks/Maps/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Maps/MapsSidebar.d.ts +1 -1
- package/types/components/manage/Blocks/Search/SearchBlockEdit.d.ts +1 -1
- package/types/components/manage/Blocks/Search/SearchBlockView.d.ts +2 -2
- package/types/components/manage/Blocks/Search/components/CheckboxFacet.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/DateRangeFacetFilterListEntry.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/Facets.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/FilterList.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/SearchDetails.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/SearchInput.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/SelectFacetFilterListEntry.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/ToggleFacet.d.ts +1 -1
- package/types/components/manage/Blocks/Search/components/ToggleFacetFilterListEntry.d.ts +1 -1
- package/types/components/manage/Blocks/Search/hocs/withQueryString.d.ts +1 -1
- package/types/components/manage/Blocks/Search/hocs/withSearch.d.ts +1 -1
- package/types/components/manage/Blocks/Search/layout/LeftColumnFacets.d.ts +1 -1
- package/types/components/manage/Blocks/Search/layout/RightColumnFacets.d.ts +1 -1
- package/types/components/manage/Blocks/Search/layout/TopSideFacets.d.ts +1 -1
- package/types/components/manage/Blocks/Search/utils.d.ts +2 -2
- package/types/components/manage/Blocks/Search/widgets/SelectMetadataField.d.ts +1 -1
- package/types/components/manage/Blocks/Table/Cell.d.ts +1 -1
- package/types/components/manage/Blocks/Table/View.d.ts +1 -1
- package/types/components/manage/Blocks/Teaser/Body.d.ts +1 -1
- package/types/components/manage/Blocks/Teaser/Data.d.ts +1 -1
- package/types/components/manage/Blocks/Teaser/DefaultBody.d.ts +1 -1
- package/types/components/manage/Blocks/Teaser/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Teaser/View.d.ts +1 -1
- package/types/components/manage/Blocks/Text/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Title/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Title/View.d.ts +1 -1
- package/types/components/manage/Blocks/ToC/Edit.d.ts +1 -1
- package/types/components/manage/Blocks/Video/Body.d.ts +1 -1
- package/types/components/manage/Blocks/Video/VideoSidebar.d.ts +1 -1
- package/types/components/manage/Blocks/Video/View.d.ts +1 -1
- package/types/components/manage/Contents/Contents.d.ts +2 -7
- package/types/components/manage/Contents/ContentsBreadcrumbs.d.ts +1 -1
- package/types/components/manage/Contents/ContentsBreadcrumbsHomeItem.d.ts +1 -1
- package/types/components/manage/Contents/ContentsBreadcrumbsRootItem.d.ts +1 -1
- package/types/components/manage/Contents/ContentsPropertiesModal.d.ts +1 -1
- package/types/components/manage/Contents/ContentsRenameModal.d.ts +1 -1
- package/types/components/manage/Contents/ContentsRenameModal.stories.d.ts +1 -1
- package/types/components/manage/Contents/ContentsTagsModal.d.ts +1 -1
- package/types/components/manage/Contents/ContentsTagsModal.stories.d.ts +1 -1
- package/types/components/manage/Contents/ContentsUploadModal.d.ts +1 -4
- package/types/components/manage/Contents/ContentsWorkflowModal.d.ts +1 -1
- package/types/components/manage/Contents/circle.d.ts +1 -1
- package/types/components/manage/Controlpanels/AddonsControlpanel.d.ts +1 -4
- package/types/components/manage/Controlpanels/Aliases.d.ts +1 -4
- package/types/components/manage/Controlpanels/ContentType.d.ts +1 -4
- package/types/components/manage/Controlpanels/ContentTypeLayout.d.ts +1 -4
- package/types/components/manage/Controlpanels/ContentTypeSchema.d.ts +1 -4
- package/types/components/manage/Controlpanels/ContentTypes.d.ts +1 -4
- package/types/components/manage/Controlpanels/DatabaseInformation.d.ts +1 -4
- package/types/components/manage/Controlpanels/Groups/GroupsControlpanel.d.ts +1 -4
- package/types/components/manage/Controlpanels/ModerateComments.d.ts +1 -4
- package/types/components/manage/Controlpanels/Relations/BrokenRelations.d.ts +1 -1
- package/types/components/manage/Controlpanels/Relations/Relations.d.ts +1 -1
- package/types/components/manage/Controlpanels/Relations/RelationsListing.d.ts +1 -1
- package/types/components/manage/Controlpanels/Relations/RelationsMatrix.d.ts +3 -5
- package/types/components/manage/Controlpanels/Rules/AddRule.d.ts +1 -4
- package/types/components/manage/Controlpanels/Rules/ConfigureRule.d.ts +1 -4
- package/types/components/manage/Controlpanels/Rules/EditRule.d.ts +1 -4
- package/types/components/manage/Controlpanels/Rules/Rules.d.ts +1 -4
- package/types/components/manage/Controlpanels/Rules/components/VariableModal.d.ts +1 -4
- package/types/components/manage/Controlpanels/UndoControlpanel.d.ts +1 -4
- package/types/components/manage/Controlpanels/UpgradeControlPanel.d.ts +1 -4
- package/types/components/manage/Controlpanels/Users/RenderUsers.d.ts +1 -4
- package/types/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.d.ts +1 -1
- package/types/components/manage/Controlpanels/Users/UserGroupMembershipListing.d.ts +1 -1
- package/types/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.d.ts +1 -1
- package/types/components/manage/Controlpanels/Users/UsersControlpanel.d.ts +1 -4
- package/types/components/manage/Controlpanels/VersionOverview.d.ts +1 -1
- package/types/components/manage/Delete/Delete.d.ts +1 -1
- package/types/components/manage/Display/Display.d.ts +1 -4
- package/types/components/manage/Edit/Edit.d.ts +2 -7
- package/types/components/manage/Form/BlockDataForm.d.ts +1 -1
- package/types/components/manage/Form/BlocksToolbar.d.ts +2 -4
- package/types/components/manage/Form/UndoToolbar.d.ts +1 -1
- package/types/components/manage/History/History.d.ts +1 -4
- package/types/components/manage/LinkDetectionPlugin/link-detection-plugin.d.ts +1 -1
- package/types/components/manage/LinkMore/LinkMore.d.ts +1 -1
- package/types/components/manage/LinksToItem/LinksToItem.d.ts +1 -1
- package/types/components/manage/Messages/Messages.d.ts +1 -1
- package/types/components/manage/Multilingual/CreateTranslation.d.ts +1 -1
- package/types/components/manage/Multilingual/ManageTranslations.d.ts +3 -5
- package/types/components/manage/Multilingual/TranslationObject.d.ts +1 -1
- package/types/components/manage/Pluggable/Pluggable.stories.d.ts +4 -4
- package/types/components/manage/Pluggable/index.d.ts +21 -3
- package/types/components/manage/Preferences/PersonalPreferences.d.ts +1 -4
- package/types/components/manage/Rules/Rules.d.ts +1 -4
- package/types/components/manage/Sidebar/AlignBlock.d.ts +1 -1
- package/types/components/manage/Sidebar/ObjectBrowser.d.ts +3 -5
- package/types/components/manage/Sidebar/ObjectBrowserBody.d.ts +1 -4
- package/types/components/manage/Sidebar/ObjectBrowserNav.d.ts +1 -1
- package/types/components/manage/Sidebar/SidebarPopup.d.ts +1 -1
- package/types/components/manage/Sidebar/SidebarPortal.d.ts +2 -1
- package/types/components/manage/TemplateChooser/TemplateChooser.d.ts +1 -1
- package/types/components/manage/TextLineEdit/TextLineEdit.d.ts +1 -1
- package/types/components/manage/TextLineEdit/TextLineEdit.stories.d.ts +1 -1
- package/types/components/manage/Toast/Toast.d.ts +1 -1
- package/types/components/manage/Toolbar/PersonalTools.d.ts +1 -1
- package/types/components/manage/Toolbar/StandardWrapper.d.ts +1 -1
- package/types/components/manage/Toolbar/Stats.d.ts +1 -1
- package/types/components/manage/Toolbar/Toolbar.d.ts +1 -4
- package/types/components/manage/UniversalLink/UniversalLink.d.ts +1 -1
- package/types/components/manage/Widgets/AlignWidget.d.ts +1 -1
- package/types/components/manage/Widgets/AlignWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/ArrayWidget.d.ts +1 -3
- package/types/components/manage/Widgets/ArrayWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/ButtonsWidget.d.ts +1 -1
- package/types/components/manage/Widgets/ButtonsWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/CheckboxWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/ColorPickerWidget.d.ts +1 -2
- package/types/components/manage/Widgets/DatetimeWidget.d.ts +1 -1
- package/types/components/manage/Widgets/DatetimeWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/EmailWidget.d.ts +1 -1
- package/types/components/manage/Widgets/EmailWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/FileWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/FormFieldWrapper.stories.d.ts +1 -1
- package/types/components/manage/Widgets/IdWidget.d.ts +1 -4
- package/types/components/manage/Widgets/IdWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/ImageSizeWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/InternalUrlWidget.d.ts +4 -6
- package/types/components/manage/Widgets/InternalUrlWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/NumberWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/ObjectBrowserWidget.d.ts +1 -1
- package/types/components/manage/Widgets/ObjectBrowserWidget.stories.d.ts +7 -7
- package/types/components/manage/Widgets/ObjectListWidget.d.ts +1 -1
- package/types/components/manage/Widgets/ObjectListWidget.stories.d.ts +2 -2
- package/types/components/manage/Widgets/ObjectWidget.d.ts +1 -1
- package/types/components/manage/Widgets/ObjectWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/PasswordWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/QueryWidget.d.ts +1 -3
- package/types/components/manage/Widgets/QueryWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/QuerystringWidget.d.ts +1 -1
- package/types/components/manage/Widgets/RecurrenceWidget/ByMonthDayField.d.ts +16 -2
- package/types/components/manage/Widgets/RecurrenceWidget/ByMonthField.d.ts +20 -2
- package/types/components/manage/Widgets/RecurrenceWidget/ByYearField.d.ts +22 -2
- package/types/components/manage/Widgets/RecurrenceWidget/EndField.d.ts +16 -2
- package/types/components/manage/Widgets/ReferenceWidget.d.ts +1 -4
- package/types/components/manage/Widgets/SchemaWidget.d.ts +1 -4
- package/types/components/manage/Widgets/SelectAutoComplete.d.ts +1 -3
- package/types/components/manage/Widgets/SelectAutocompleteWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/SelectStyling.d.ts +1 -1
- package/types/components/manage/Widgets/SelectWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/TextWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/TextareaWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/TokenWidget.d.ts +1 -4
- package/types/components/manage/Widgets/TokenWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/UrlWidget.d.ts +4 -6
- package/types/components/manage/Widgets/UrlWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/VocabularyTermsWidget.d.ts +1 -1
- package/types/components/manage/Widgets/VocabularyTermsWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/WysiwygWidget.d.ts +2 -5
- package/types/components/manage/Widgets/WysiwygWidget.stories.d.ts +1 -1
- package/types/components/manage/Widgets/story.d.ts +1 -1
- package/types/components/theme/Anontools/Anontools.d.ts +1 -1
- package/types/components/theme/AppExtras/AppExtras.d.ts +1 -1
- package/types/components/theme/Avatar/Avatar.d.ts +1 -1
- package/types/components/theme/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/types/components/theme/Comments/Comment.stories.d.ts +1 -1
- package/types/components/theme/Comments/CommentEditModal.d.ts +1 -1
- package/types/components/theme/Comments/CommentEditModal.stories.d.ts +1 -1
- package/types/components/theme/Component/Component.d.ts +1 -1
- package/types/components/theme/ConnectionRefused/ConnectionRefused.d.ts +1 -1
- package/types/components/theme/ContactForm/ContactForm.d.ts +1 -1
- package/types/components/theme/ContactForm/ContactForm.stories.d.ts +1 -1
- package/types/components/theme/ContentMetadataTags/ContentMetadataTags.d.ts +1 -1
- package/types/components/theme/Error/ErrorBoundary.d.ts +1 -0
- package/types/components/theme/Error/ServerError.d.ts +1 -1
- package/types/components/theme/EventDetails/EventDetails.d.ts +1 -1
- package/types/components/theme/EventDetails/EventDetails.stories.d.ts +1 -1
- package/types/components/theme/Forbidden/Forbidden.d.ts +1 -1
- package/types/components/theme/FormattedDate/FormattedDate.d.ts +1 -1
- package/types/components/theme/FormattedDate/FormattedDate.stories.d.ts +1 -1
- package/types/components/theme/FormattedDate/FormattedRelativeDate.d.ts +1 -1
- package/types/components/theme/FormattedDate/FormattedRelativeDate.stories.d.ts +1 -1
- package/types/components/theme/Header/Header.d.ts +1 -1
- package/types/components/theme/Header/Header.stories.d.ts +1 -1
- package/types/components/theme/Image/Image.d.ts +1 -1
- package/types/components/theme/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/types/components/theme/Login/Login.d.ts +1 -1
- package/types/components/theme/Login/Login.stories.d.ts +1 -1
- package/types/components/theme/Logo/Logo.stories.d.ts +1 -1
- package/types/components/theme/Logout/Logout.d.ts +1 -1
- package/types/components/theme/MultilingualRedirector/MultilingualRedirector.d.ts +1 -1
- package/types/components/theme/Navigation/ContextNavigation.d.ts +1 -1
- package/types/components/theme/Navigation/ContextNavigation.stories.d.ts +2 -2
- package/types/components/theme/Navigation/NavItem.d.ts +1 -1
- package/types/components/theme/Navigation/NavItems.d.ts +1 -1
- package/types/components/theme/Navigation/Navigation.d.ts +1 -1
- package/types/components/theme/Navigation/withContentNavigation.d.ts +1 -1
- package/types/components/theme/NotFound/NotFound.d.ts +1 -1
- package/types/components/theme/OutdatedBrowser/OutdatedBrowser.d.ts +1 -1
- package/types/components/theme/PasswordReset/RequestPasswordReset.d.ts +1 -1
- package/types/components/theme/Popup/Popup.d.ts +1 -1
- package/types/components/theme/PreviewImage/PreviewImage.d.ts +1 -1
- package/types/components/theme/Search/Search.d.ts +2 -7
- package/types/components/theme/Search/SearchTags.d.ts +1 -1
- package/types/components/theme/SearchWidget/SearchWidget.d.ts +1 -1
- package/types/components/theme/SearchWidget/SearchWidget.stories.d.ts +1 -1
- package/types/components/theme/Sitemap/Sitemap.d.ts +2 -6
- package/types/components/theme/SkipLinks/SkipLinks.d.ts +1 -1
- package/types/components/theme/SlotRenderer/SlotRenderer.d.ts +7 -0
- package/types/components/theme/SlotRenderer/SlotRenderer.test.d.ts +1 -0
- package/types/components/theme/TsTest/TsTest.d.ts +1 -2
- package/types/components/theme/Unauthorized/Unauthorized.d.ts +1 -1
- package/types/components/theme/View/AlbumView.d.ts +1 -1
- package/types/components/theme/View/EventDatesInfo.d.ts +1 -1
- package/types/components/theme/View/LinkView.d.ts +1 -1
- package/types/components/theme/View/RenderBlocks.d.ts +1 -1
- package/types/components/theme/View/View.d.ts +1 -4
- package/types/components/theme/Widgets/ArrayWidget.d.ts +1 -1
- package/types/components/theme/Widgets/BooleanWidget.d.ts +14 -2
- package/types/components/theme/Widgets/DateWidget.d.ts +1 -1
- package/types/components/theme/Widgets/DatetimeWidget.d.ts +1 -1
- package/types/components/theme/Widgets/DescriptionWidget.d.ts +1 -1
- package/types/components/theme/Widgets/EmailWidget.d.ts +1 -1
- package/types/components/theme/Widgets/FileWidget.d.ts +1 -1
- package/types/components/theme/Widgets/ImageWidget.d.ts +1 -1
- package/types/components/theme/Widgets/PasswordWidget.d.ts +1 -1
- package/types/components/theme/Widgets/RelationWidget.d.ts +1 -1
- package/types/components/theme/Widgets/RelationsWidget.d.ts +1 -1
- package/types/components/theme/Widgets/RichTextWidget.d.ts +1 -1
- package/types/components/theme/Widgets/SelectWidget.d.ts +1 -1
- package/types/components/theme/Widgets/TextWidget.d.ts +1 -1
- package/types/components/theme/Widgets/TitleWidget.d.ts +1 -1
- package/types/components/theme/Widgets/TokenWidget.d.ts +1 -1
- package/types/components/theme/Widgets/UrlWidget.d.ts +1 -1
- package/types/config/Blocks.d.ts +1 -1
- package/types/config/RichTextEditor/ToHTML.d.ts +10 -10
- package/types/config/Views.d.ts +5 -5
- package/types/config/Widgets.d.ts +1 -3
- package/types/helpers/AsyncConnect/AsyncConnect.d.ts +2 -2
- package/types/helpers/Extensions/withBlockExtensions.d.ts +1 -1
- package/types/helpers/Extensions/withBlockSchemaEnhancer.d.ts +3 -3
- package/types/helpers/Helmet/Helmet.d.ts +6 -10
- package/types/helpers/LanguageMap/LanguageMap.d.ts +878 -1
- package/types/helpers/Slots/index.d.ts +7 -0
- package/types/helpers/Utils/Date.d.ts +2 -2
- package/types/helpers/Utils/UseDetectClickOutside.stories.d.ts +2 -2
- package/types/helpers/Utils/Utils.d.ts +1 -1
- package/types/helpers/index.d.ts +1 -0
- package/types/reducers/blocksClipboard/blocksClipboard.d.ts +1 -1
- package/types/routes.d.ts +3 -3
- package/types/storybook.d.ts +3 -3
- package/src/components/manage/Multilingual/CreateTranslation.test.jsx +0 -46
- package/src/helpers/Utils/usePagination.test.js +0 -115
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
|
|
@@ -7,9 +7,8 @@ import ModerateComments from './ModerateComments';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
jest.mock('
|
|
11
|
-
|
|
12
|
-
}));
|
|
10
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
11
|
+
|
|
13
12
|
jest.mock('../../theme/Comments/CommentEditModal', () =>
|
|
14
13
|
jest.fn(() => <div id="modal" />),
|
|
15
14
|
);
|
|
@@ -31,12 +30,13 @@ describe('ModerateComments', () => {
|
|
|
31
30
|
messages: {},
|
|
32
31
|
},
|
|
33
32
|
});
|
|
34
|
-
const
|
|
33
|
+
const { container } = render(
|
|
35
34
|
<Provider store={store}>
|
|
36
35
|
<ModerateComments location={{ pathname: '/blog' }} />
|
|
36
|
+
<div id="toolbar"></div>
|
|
37
37
|
</Provider>,
|
|
38
38
|
);
|
|
39
|
-
|
|
40
|
-
expect(
|
|
39
|
+
|
|
40
|
+
expect(container).toMatchSnapshot();
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Relations Control Panel
|
|
3
3
|
*/
|
|
4
|
-
import React, { useEffect } from 'react';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
5
|
import { find } from 'lodash';
|
|
6
6
|
import { useSelector } from 'react-redux';
|
|
7
|
-
import {
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
8
|
import { useHistory } from 'react-router';
|
|
9
9
|
import { Link, useLocation } from 'react-router-dom';
|
|
10
10
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
@@ -23,6 +23,12 @@ const RelationsControlPanel = () => {
|
|
|
23
23
|
const location = useLocation();
|
|
24
24
|
const dispatch = useDispatch();
|
|
25
25
|
|
|
26
|
+
const [isClient, setIsClient] = useState(false);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
setIsClient(true);
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
26
32
|
const brokenRelations = useSelector(
|
|
27
33
|
(state) => state.relations?.stats?.data?.broken,
|
|
28
34
|
);
|
|
@@ -88,8 +94,8 @@ const RelationsControlPanel = () => {
|
|
|
88
94
|
)}
|
|
89
95
|
</div>
|
|
90
96
|
|
|
91
|
-
{
|
|
92
|
-
|
|
97
|
+
{isClient &&
|
|
98
|
+
createPortal(
|
|
93
99
|
<Toolbar
|
|
94
100
|
pathname={location.pathname}
|
|
95
101
|
hideDefaultViewButtons
|
|
@@ -104,9 +110,9 @@ const RelationsControlPanel = () => {
|
|
|
104
110
|
<Icon name={backSVG} className="contents circled" size="30px" />
|
|
105
111
|
</Link>
|
|
106
112
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
/>,
|
|
114
|
+
document.getElementById('toolbar'),
|
|
115
|
+
)}
|
|
110
116
|
</>
|
|
111
117
|
);
|
|
112
118
|
};
|
|
@@ -9,7 +9,7 @@ import { connect } from 'react-redux';
|
|
|
9
9
|
import { compose } from 'redux';
|
|
10
10
|
import { Link } from 'react-router-dom';
|
|
11
11
|
import { getBaseUrl, getParentUrl, Helmet } from '@plone/volto/helpers';
|
|
12
|
-
import {
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
Checkbox,
|
|
@@ -331,8 +331,8 @@ class AddRule extends Component {
|
|
|
331
331
|
</Segment.Group>
|
|
332
332
|
</article>
|
|
333
333
|
</Container>
|
|
334
|
-
{this.state.isClient &&
|
|
335
|
-
|
|
334
|
+
{this.state.isClient &&
|
|
335
|
+
createPortal(
|
|
336
336
|
<Toolbar
|
|
337
337
|
pathname={this.props.pathname}
|
|
338
338
|
hideDefaultViewButtons
|
|
@@ -346,9 +346,9 @@ class AddRule extends Component {
|
|
|
346
346
|
/>
|
|
347
347
|
</Link>
|
|
348
348
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
349
|
+
/>,
|
|
350
|
+
document.getElementById('toolbar'),
|
|
351
|
+
)}
|
|
352
352
|
</div>
|
|
353
353
|
);
|
|
354
354
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import configureMockStore from 'redux-mock-store';
|
|
5
5
|
import thunk from 'redux-thunk';
|
|
@@ -9,9 +9,7 @@ import AddRule from './AddRule';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
14
|
-
}));
|
|
12
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Toolbar" />));
|
|
15
13
|
|
|
16
14
|
describe('AddRule', () => {
|
|
17
15
|
it('renders rules add interface', () => {
|
|
@@ -21,12 +19,13 @@ describe('AddRule', () => {
|
|
|
21
19
|
messages: {},
|
|
22
20
|
},
|
|
23
21
|
});
|
|
24
|
-
const
|
|
22
|
+
const { container } = render(
|
|
25
23
|
<Provider store={store}>
|
|
26
24
|
<AddRule location={{ pathname: '/controlpanel/rules/add' }} />
|
|
25
|
+
<div id="toolbar"></div>
|
|
27
26
|
</Provider>,
|
|
28
27
|
);
|
|
29
|
-
|
|
30
|
-
expect(
|
|
28
|
+
|
|
29
|
+
expect(container).toMatchSnapshot();
|
|
31
30
|
});
|
|
32
31
|
});
|
|
@@ -9,7 +9,7 @@ import { connect } from 'react-redux';
|
|
|
9
9
|
import { compose } from 'redux';
|
|
10
10
|
import { Link } from 'react-router-dom';
|
|
11
11
|
import { getBaseUrl, getParentUrl, Helmet } from '@plone/volto/helpers';
|
|
12
|
-
import {
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
Card,
|
|
@@ -847,8 +847,8 @@ class ConfigureRule extends Component {
|
|
|
847
847
|
action="edit"
|
|
848
848
|
/>
|
|
849
849
|
)}
|
|
850
|
-
{this.state.isClient &&
|
|
851
|
-
|
|
850
|
+
{this.state.isClient &&
|
|
851
|
+
createPortal(
|
|
852
852
|
<Toolbar
|
|
853
853
|
pathname={this.props.pathname}
|
|
854
854
|
hideDefaultViewButtons
|
|
@@ -862,9 +862,9 @@ class ConfigureRule extends Component {
|
|
|
862
862
|
/>
|
|
863
863
|
</Link>
|
|
864
864
|
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
865
|
+
/>,
|
|
866
|
+
document.getElementById('toolbar'),
|
|
867
|
+
)}
|
|
868
868
|
</div>
|
|
869
869
|
);
|
|
870
870
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import configureMockStore from 'redux-mock-store';
|
|
5
5
|
import thunk from 'redux-thunk';
|
|
@@ -9,9 +9,7 @@ import ConfigureRule from './ConfigureRule';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
14
|
-
}));
|
|
12
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
15
13
|
|
|
16
14
|
describe('ConfigureRule', () => {
|
|
17
15
|
it('renders rules configure interface', () => {
|
|
@@ -21,14 +19,15 @@ describe('ConfigureRule', () => {
|
|
|
21
19
|
messages: {},
|
|
22
20
|
},
|
|
23
21
|
});
|
|
24
|
-
const
|
|
22
|
+
const { container } = render(
|
|
25
23
|
<Provider store={store}>
|
|
26
24
|
<ConfigureRule
|
|
27
25
|
location={{ pathname: '/controlpanel/rules/:id/configure' }}
|
|
28
26
|
/>
|
|
27
|
+
<div id="toolbar"></div>
|
|
29
28
|
</Provider>,
|
|
30
29
|
);
|
|
31
|
-
|
|
32
|
-
expect(
|
|
30
|
+
|
|
31
|
+
expect(container).toMatchSnapshot();
|
|
33
32
|
});
|
|
34
33
|
});
|
|
@@ -9,7 +9,7 @@ import { connect } from 'react-redux';
|
|
|
9
9
|
import { compose } from 'redux';
|
|
10
10
|
import { Link } from 'react-router-dom';
|
|
11
11
|
import { getParentUrl, Helmet, getBaseUrl } from '@plone/volto/helpers';
|
|
12
|
-
import {
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
Checkbox,
|
|
@@ -367,8 +367,8 @@ class EditRule extends Component {
|
|
|
367
367
|
</Segment.Group>
|
|
368
368
|
</article>
|
|
369
369
|
</Container>
|
|
370
|
-
{this.state.isClient &&
|
|
371
|
-
|
|
370
|
+
{this.state.isClient &&
|
|
371
|
+
createPortal(
|
|
372
372
|
<Toolbar
|
|
373
373
|
pathname={this.props.pathname}
|
|
374
374
|
hideDefaultViewButtons
|
|
@@ -382,9 +382,9 @@ class EditRule extends Component {
|
|
|
382
382
|
/>
|
|
383
383
|
</Link>
|
|
384
384
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
/>,
|
|
386
|
+
document.getElementById('toolbar'),
|
|
387
|
+
)}
|
|
388
388
|
</div>
|
|
389
389
|
);
|
|
390
390
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import configureMockStore from 'redux-mock-store';
|
|
5
5
|
import thunk from 'redux-thunk';
|
|
@@ -9,9 +9,7 @@ import EditRule from './EditRule';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
14
|
-
}));
|
|
12
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
15
13
|
|
|
16
14
|
describe('EditRule', () => {
|
|
17
15
|
it('renders rules edit interface', () => {
|
|
@@ -21,12 +19,13 @@ describe('EditRule', () => {
|
|
|
21
19
|
messages: {},
|
|
22
20
|
},
|
|
23
21
|
});
|
|
24
|
-
const
|
|
22
|
+
const { container } = render(
|
|
25
23
|
<Provider store={store}>
|
|
26
24
|
<EditRule location={{ pathname: '/controlpanel/rules/:id/edit' }} />
|
|
25
|
+
<div id="toolbar"></div>
|
|
27
26
|
</Provider>,
|
|
28
27
|
);
|
|
29
|
-
|
|
30
|
-
expect(
|
|
28
|
+
|
|
29
|
+
expect(container).toMatchSnapshot();
|
|
31
30
|
});
|
|
32
31
|
});
|
|
@@ -9,7 +9,7 @@ import { connect } from 'react-redux';
|
|
|
9
9
|
import { compose } from 'redux';
|
|
10
10
|
import { Link } from 'react-router-dom';
|
|
11
11
|
import { getBaseUrl, getParentUrl, Helmet } from '@plone/volto/helpers';
|
|
12
|
-
import {
|
|
12
|
+
import { createPortal } from 'react-dom';
|
|
13
13
|
import {
|
|
14
14
|
Button,
|
|
15
15
|
Checkbox,
|
|
@@ -420,8 +420,8 @@ class Rules extends Component {
|
|
|
420
420
|
</Segment.Group>
|
|
421
421
|
</article>
|
|
422
422
|
</Container>
|
|
423
|
-
{this.state.isClient &&
|
|
424
|
-
|
|
423
|
+
{this.state.isClient &&
|
|
424
|
+
createPortal(
|
|
425
425
|
<Toolbar
|
|
426
426
|
pathname={this.props.pathname}
|
|
427
427
|
hideDefaultViewButtons
|
|
@@ -435,9 +435,9 @@ class Rules extends Component {
|
|
|
435
435
|
/>
|
|
436
436
|
</Link>
|
|
437
437
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
438
|
+
/>,
|
|
439
|
+
document.getElementById('toolbar'),
|
|
440
|
+
)}
|
|
441
441
|
</div>
|
|
442
442
|
);
|
|
443
443
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import configureMockStore from 'redux-mock-store';
|
|
5
5
|
import thunk from 'redux-thunk';
|
|
@@ -9,9 +9,7 @@ import Rules from './Rules';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
14
|
-
}));
|
|
12
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
15
13
|
|
|
16
14
|
describe('Rules', () => {
|
|
17
15
|
it('renders rules control panel control', () => {
|
|
@@ -64,12 +62,13 @@ describe('Rules', () => {
|
|
|
64
62
|
messages: {},
|
|
65
63
|
},
|
|
66
64
|
});
|
|
67
|
-
const
|
|
65
|
+
const { container } = render(
|
|
68
66
|
<Provider store={store}>
|
|
69
67
|
<Rules location={{ pathname: '/controlpanel/rules' }} />
|
|
68
|
+
<div id="toolbar"></div>
|
|
70
69
|
</Provider>,
|
|
71
70
|
);
|
|
72
|
-
|
|
73
|
-
expect(
|
|
71
|
+
|
|
72
|
+
expect(container).toMatchSnapshot();
|
|
74
73
|
});
|
|
75
74
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import { Provider } from 'react-intl-redux';
|
|
4
4
|
import configureMockStore from 'redux-mock-store';
|
|
5
5
|
import thunk from 'redux-thunk';
|
|
@@ -9,9 +9,8 @@ import VariableModal from './VariableModal';
|
|
|
9
9
|
const middlewares = [thunk];
|
|
10
10
|
const mockStore = configureMockStore(middlewares);
|
|
11
11
|
|
|
12
|
-
jest.mock('
|
|
13
|
-
|
|
14
|
-
}));
|
|
12
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
13
|
+
|
|
15
14
|
|
|
16
15
|
describe('VariableModal', () => {
|
|
17
16
|
it('renders rules add interface', () => {
|
|
@@ -21,12 +20,12 @@ describe('VariableModal', () => {
|
|
|
21
20
|
messages: {},
|
|
22
21
|
},
|
|
23
22
|
});
|
|
24
|
-
const
|
|
23
|
+
const { container } = render(
|
|
25
24
|
<Provider store={store}>
|
|
26
25
|
<VariableModal location={{ pathname: '/controlpanel/rules' }} />
|
|
27
26
|
</Provider>,
|
|
28
27
|
);
|
|
29
|
-
|
|
30
|
-
expect(
|
|
28
|
+
|
|
29
|
+
expect(container).toMatchSnapshot();
|
|
31
30
|
});
|
|
32
31
|
});
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { connect } from 'react-redux';
|
|
8
8
|
import { compose } from 'redux';
|
|
9
9
|
import { Link } from 'react-router-dom';
|
|
10
|
-
import {
|
|
10
|
+
import { createPortal } from 'react-dom';
|
|
11
11
|
import { Container, Segment, Table, Menu, Input } from 'semantic-ui-react';
|
|
12
12
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
13
13
|
import { Icon, Toolbar, Form, Toast } from '@plone/volto/components';
|
|
@@ -702,8 +702,8 @@ class UndoControlpanel extends Component {
|
|
|
702
702
|
)}
|
|
703
703
|
</Segment.Group>
|
|
704
704
|
</Segment.Group>
|
|
705
|
-
{this.state.isClient &&
|
|
706
|
-
|
|
705
|
+
{this.state.isClient &&
|
|
706
|
+
createPortal(
|
|
707
707
|
<Toolbar
|
|
708
708
|
pathname={this.props.pathname}
|
|
709
709
|
hideDefaultViewButtons
|
|
@@ -720,9 +720,9 @@ class UndoControlpanel extends Component {
|
|
|
720
720
|
</Link>
|
|
721
721
|
</>
|
|
722
722
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
723
|
+
/>,
|
|
724
|
+
document.getElementById('toolbar'),
|
|
725
|
+
)}
|
|
726
726
|
</Container>
|
|
727
727
|
);
|
|
728
728
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
|
|
@@ -7,9 +7,8 @@ import UndoControlpanel from './UndoControlpanel';
|
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
9
|
|
|
10
|
-
jest.mock('
|
|
11
|
-
|
|
12
|
-
}));
|
|
10
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
11
|
+
|
|
13
12
|
jest.mock('../Form/Form', () => jest.fn(() => <div id="form" />));
|
|
14
13
|
|
|
15
14
|
describe('UndoControlpanel', () => {
|
|
@@ -84,12 +83,13 @@ describe('UndoControlpanel', () => {
|
|
|
84
83
|
messages: {},
|
|
85
84
|
},
|
|
86
85
|
});
|
|
87
|
-
const
|
|
86
|
+
const { container } = render(
|
|
88
87
|
<Provider store={store}>
|
|
89
88
|
<UndoControlpanel location={{ pathname: '/blog' }} />
|
|
89
|
+
<div id="toolbar"></div>
|
|
90
90
|
</Provider>,
|
|
91
91
|
);
|
|
92
|
-
|
|
93
|
-
expect(
|
|
92
|
+
|
|
93
|
+
expect(container).toMatchSnapshot();
|
|
94
94
|
});
|
|
95
95
|
});
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { connect } from 'react-redux';
|
|
8
8
|
import { compose } from 'redux';
|
|
9
9
|
import { Link } from 'react-router-dom';
|
|
10
|
-
import {
|
|
10
|
+
import { createPortal } from 'react-dom';
|
|
11
11
|
import {
|
|
12
12
|
Button,
|
|
13
13
|
Container,
|
|
@@ -311,8 +311,8 @@ class UpgradeControlPanel extends Component {
|
|
|
311
311
|
) : null}
|
|
312
312
|
</Segment>
|
|
313
313
|
</Segment.Group>
|
|
314
|
-
{this.state.isClient &&
|
|
315
|
-
|
|
314
|
+
{this.state.isClient &&
|
|
315
|
+
createPortal(
|
|
316
316
|
<Toolbar
|
|
317
317
|
pathname={this.props.pathname}
|
|
318
318
|
hideDefaultViewButtons
|
|
@@ -329,9 +329,9 @@ class UpgradeControlPanel extends Component {
|
|
|
329
329
|
</Link>
|
|
330
330
|
</>
|
|
331
331
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
/>,
|
|
333
|
+
document.getElementById('toolbar'),
|
|
334
|
+
)}
|
|
335
335
|
</Container>
|
|
336
336
|
) : null;
|
|
337
337
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* User Control Panel [user group membership management]
|
|
3
3
|
* TODO Enrich with features of user control panel. Then replace user control panel.
|
|
4
4
|
*/
|
|
5
|
-
import React, { useEffect } from 'react';
|
|
5
|
+
import React, { useEffect, useState } from 'react';
|
|
6
6
|
import { find } from 'lodash';
|
|
7
|
-
import {
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
8
|
import { useHistory } from 'react-router';
|
|
9
9
|
import { Link, useLocation } from 'react-router-dom';
|
|
10
10
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
@@ -45,6 +45,12 @@ const UserGroupMembershipPanel = () => {
|
|
|
45
45
|
id: 'plone_setup',
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
const [isClient, setIsClient] = useState(false);
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
setIsClient(true);
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
48
54
|
useEffect(() => {
|
|
49
55
|
dispatch(listActions('/'));
|
|
50
56
|
}, [dispatch]);
|
|
@@ -57,7 +63,7 @@ const UserGroupMembershipPanel = () => {
|
|
|
57
63
|
dispatch(getSystemInformation());
|
|
58
64
|
}, [dispatch]);
|
|
59
65
|
|
|
60
|
-
if (
|
|
66
|
+
if (isClient && !ploneSetupAction) {
|
|
61
67
|
return <Unauthorized />;
|
|
62
68
|
}
|
|
63
69
|
|
|
@@ -108,8 +114,8 @@ const UserGroupMembershipPanel = () => {
|
|
|
108
114
|
</Segment.Group>
|
|
109
115
|
</div>
|
|
110
116
|
|
|
111
|
-
{
|
|
112
|
-
|
|
117
|
+
{isClient &&
|
|
118
|
+
createPortal(
|
|
113
119
|
<Toolbar
|
|
114
120
|
pathname={pathname}
|
|
115
121
|
hideDefaultViewButtons
|
|
@@ -139,9 +145,9 @@ const UserGroupMembershipPanel = () => {
|
|
|
139
145
|
</Link>
|
|
140
146
|
</>
|
|
141
147
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
/>,
|
|
149
|
+
document.getElementById('toolbar'),
|
|
150
|
+
)}
|
|
145
151
|
</>
|
|
146
152
|
);
|
|
147
153
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
import { MemoryRouter } from 'react-router-dom';
|
|
@@ -7,9 +7,8 @@ import { MemoryRouter } from 'react-router-dom';
|
|
|
7
7
|
import UserGroupMembershipControlPanel from './UserGroupMembershipControlPanel';
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
|
-
jest.mock('
|
|
11
|
-
|
|
12
|
-
}));
|
|
10
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
11
|
+
|
|
13
12
|
describe('UserGroupMembershipControlPanel', () => {
|
|
14
13
|
it('renders a user group membership control component', () => {
|
|
15
14
|
const store = mockStore({
|
|
@@ -49,14 +48,15 @@ describe('UserGroupMembershipControlPanel', () => {
|
|
|
49
48
|
messages: {},
|
|
50
49
|
},
|
|
51
50
|
});
|
|
52
|
-
const
|
|
51
|
+
const { container } = render(
|
|
53
52
|
<Provider store={store}>
|
|
54
53
|
<MemoryRouter>
|
|
55
54
|
<UserGroupMembershipControlPanel />
|
|
55
|
+
<div id="toolbar"></div>
|
|
56
56
|
</MemoryRouter>
|
|
57
57
|
</Provider>,
|
|
58
58
|
);
|
|
59
|
-
|
|
60
|
-
expect(
|
|
59
|
+
|
|
60
|
+
expect(container).toMatchSnapshot();
|
|
61
61
|
});
|
|
62
62
|
});
|
|
@@ -32,7 +32,7 @@ import { find, map, pull, difference } from 'lodash';
|
|
|
32
32
|
import PropTypes from 'prop-types';
|
|
33
33
|
import React, { Component } from 'react';
|
|
34
34
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
35
|
-
import {
|
|
35
|
+
import { createPortal } from 'react-dom';
|
|
36
36
|
import { connect } from 'react-redux';
|
|
37
37
|
import { toast } from 'react-toastify';
|
|
38
38
|
import { bindActionCreators, compose } from 'redux';
|
|
@@ -619,8 +619,8 @@ class UsersControlpanel extends Component {
|
|
|
619
619
|
</div>
|
|
620
620
|
</Form>
|
|
621
621
|
</Segment.Group>
|
|
622
|
-
{this.state.isClient &&
|
|
623
|
-
|
|
622
|
+
{this.state.isClient &&
|
|
623
|
+
createPortal(
|
|
624
624
|
<Toolbar
|
|
625
625
|
pathname={this.props.pathname}
|
|
626
626
|
hideDefaultViewButtons
|
|
@@ -672,9 +672,9 @@ class UsersControlpanel extends Component {
|
|
|
672
672
|
</Button>
|
|
673
673
|
</>
|
|
674
674
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
/>,
|
|
676
|
+
document.getElementById('toolbar'),
|
|
677
|
+
)}
|
|
678
678
|
</Container>
|
|
679
679
|
);
|
|
680
680
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
|
|
6
6
|
import UsersControlpanel from './UsersControlpanel';
|
|
7
7
|
|
|
8
8
|
const mockStore = configureStore();
|
|
9
|
-
jest.mock('
|
|
10
|
-
|
|
11
|
-
}));
|
|
9
|
+
jest.mock('../../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
10
|
+
|
|
12
11
|
describe('UsersControlpanel', () => {
|
|
13
12
|
it('renders a user control component', () => {
|
|
14
13
|
const store = mockStore({
|
|
@@ -29,12 +28,13 @@ describe('UsersControlpanel', () => {
|
|
|
29
28
|
messages: {},
|
|
30
29
|
},
|
|
31
30
|
});
|
|
32
|
-
const
|
|
31
|
+
const { container } = render(
|
|
33
32
|
<Provider store={store}>
|
|
34
33
|
<UsersControlpanel location={{ pathname: '/blog' }} />
|
|
34
|
+
<div id="toolbar"></div>
|
|
35
35
|
</Provider>,
|
|
36
36
|
);
|
|
37
|
-
|
|
38
|
-
expect(
|
|
37
|
+
|
|
38
|
+
expect(container).toMatchSnapshot();
|
|
39
39
|
});
|
|
40
40
|
});
|