@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,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
3
3
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
4
|
-
import {
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
5
5
|
import { Button, Container, List, Segment } from 'semantic-ui-react';
|
|
6
6
|
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
|
7
7
|
import qs from 'query-string';
|
|
@@ -110,15 +110,15 @@ const Delete = () => {
|
|
|
110
110
|
</Segment>
|
|
111
111
|
</Segment.Group>
|
|
112
112
|
</Container>
|
|
113
|
-
{isClient &&
|
|
114
|
-
|
|
113
|
+
{isClient &&
|
|
114
|
+
createPortal(
|
|
115
115
|
<Toolbar
|
|
116
116
|
pathname={pathname}
|
|
117
117
|
hideDefaultViewButtons
|
|
118
118
|
inner={<span />}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
/>,
|
|
120
|
+
document.getElementById('toolbar'),
|
|
121
|
+
)}
|
|
122
122
|
</div>
|
|
123
123
|
);
|
|
124
124
|
}
|
|
@@ -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';
|
|
@@ -8,9 +8,7 @@ import Delete from './Delete';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
jest.mock('
|
|
12
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
13
|
-
}));
|
|
11
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
14
12
|
|
|
15
13
|
describe('Delete', () => {
|
|
16
14
|
it('renders an empty delete component', () => {
|
|
@@ -27,15 +25,16 @@ describe('Delete', () => {
|
|
|
27
25
|
messages: {},
|
|
28
26
|
},
|
|
29
27
|
});
|
|
30
|
-
const
|
|
28
|
+
const { container } = render(
|
|
31
29
|
<Provider store={store}>
|
|
32
30
|
<MemoryRouter>
|
|
33
31
|
<Delete location={{ pathname: '/blog', search: {} }} />
|
|
32
|
+
<div id="toolbar"></div>
|
|
34
33
|
</MemoryRouter>
|
|
35
34
|
</Provider>,
|
|
36
35
|
);
|
|
37
|
-
|
|
38
|
-
expect(
|
|
36
|
+
|
|
37
|
+
expect(container).toMatchSnapshot();
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
it('renders a delete component', () => {
|
|
@@ -54,14 +53,15 @@ describe('Delete', () => {
|
|
|
54
53
|
messages: {},
|
|
55
54
|
},
|
|
56
55
|
});
|
|
57
|
-
const
|
|
56
|
+
const { container } = render(
|
|
58
57
|
<Provider store={store}>
|
|
59
58
|
<MemoryRouter>
|
|
60
59
|
<Delete location={{ pathname: '/blog', search: {} }} />
|
|
60
|
+
<div id="toolbar"></div>
|
|
61
61
|
</MemoryRouter>
|
|
62
62
|
</Provider>,
|
|
63
63
|
);
|
|
64
|
-
|
|
65
|
-
expect(
|
|
64
|
+
|
|
65
|
+
expect(container).toMatchSnapshot();
|
|
66
66
|
});
|
|
67
67
|
});
|
|
@@ -11,7 +11,7 @@ import { compose } from 'redux';
|
|
|
11
11
|
import { filter, isEqual, map } from 'lodash';
|
|
12
12
|
import { Container, Button, Dropdown, Grid, Table } from 'semantic-ui-react';
|
|
13
13
|
import { Link, withRouter } from 'react-router-dom';
|
|
14
|
-
import {
|
|
14
|
+
import { createPortal } from 'react-dom';
|
|
15
15
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
16
16
|
import qs from 'query-string';
|
|
17
17
|
|
|
@@ -333,8 +333,8 @@ class Diff extends Component {
|
|
|
333
333
|
view={this.props.view}
|
|
334
334
|
/>
|
|
335
335
|
)}
|
|
336
|
-
{this.state.isClient &&
|
|
337
|
-
|
|
336
|
+
{this.state.isClient &&
|
|
337
|
+
createPortal(
|
|
338
338
|
<Toolbar
|
|
339
339
|
pathname={this.props.pathname}
|
|
340
340
|
hideDefaultViewButtons
|
|
@@ -351,9 +351,9 @@ class Diff extends Component {
|
|
|
351
351
|
/>
|
|
352
352
|
</Link>
|
|
353
353
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
/>,
|
|
355
|
+
document.getElementById('toolbar'),
|
|
356
|
+
)}
|
|
357
357
|
</Container>
|
|
358
358
|
);
|
|
359
359
|
}
|
|
@@ -8,9 +8,7 @@ import Diff from './Diff';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
jest.mock('
|
|
12
|
-
Portal: jest.fn(() => <div id="Portal" />),
|
|
13
|
-
}));
|
|
11
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
14
12
|
|
|
15
13
|
jest.mock('@plone/volto/helpers/Loadable/Loadable');
|
|
16
14
|
beforeAll(
|
|
@@ -75,6 +73,7 @@ describe('Diff', () => {
|
|
|
75
73
|
<Provider store={store}>
|
|
76
74
|
<MemoryRouter initialEntries={['/blog?one=0&two=1']}>
|
|
77
75
|
<Diff />
|
|
76
|
+
<div id="toolbar"></div>
|
|
78
77
|
</MemoryRouter>
|
|
79
78
|
</Provider>,
|
|
80
79
|
);
|
|
@@ -11,7 +11,7 @@ import { compose } from 'redux';
|
|
|
11
11
|
import { asyncConnect, hasApiExpander } from '@plone/volto/helpers';
|
|
12
12
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
13
13
|
import { Button, Grid, Menu } from 'semantic-ui-react';
|
|
14
|
-
import {
|
|
14
|
+
import { createPortal } from 'react-dom';
|
|
15
15
|
import qs from 'query-string';
|
|
16
16
|
import { find } from 'lodash';
|
|
17
17
|
import { toast } from 'react-toastify';
|
|
@@ -375,11 +375,10 @@ class Edit extends Component {
|
|
|
375
375
|
</>
|
|
376
376
|
)}
|
|
377
377
|
|
|
378
|
-
{editPermission &&
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
)}
|
|
378
|
+
{editPermission &&
|
|
379
|
+
this.state.visual &&
|
|
380
|
+
this.state.isClient &&
|
|
381
|
+
createPortal(<Sidebar />, document.getElementById('sidebar'))}
|
|
383
382
|
</>
|
|
384
383
|
)}
|
|
385
384
|
{!editPermission && (
|
|
@@ -397,8 +396,8 @@ class Edit extends Component {
|
|
|
397
396
|
)}
|
|
398
397
|
</>
|
|
399
398
|
)}
|
|
400
|
-
{this.state.isClient &&
|
|
401
|
-
|
|
399
|
+
{this.state.isClient &&
|
|
400
|
+
createPortal(
|
|
402
401
|
<Toolbar
|
|
403
402
|
pathname={this.props.pathname}
|
|
404
403
|
hideDefaultViewButtons
|
|
@@ -446,9 +445,9 @@ class Edit extends Component {
|
|
|
446
445
|
)}
|
|
447
446
|
</>
|
|
448
447
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
448
|
+
/>,
|
|
449
|
+
document.getElementById('toolbar'),
|
|
450
|
+
)}
|
|
452
451
|
</div>
|
|
453
452
|
);
|
|
454
453
|
}
|
|
@@ -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 jwt from 'jsonwebtoken';
|
|
@@ -8,9 +8,9 @@ import { __test__ as Edit } from './Edit';
|
|
|
8
8
|
|
|
9
9
|
const mockStore = configureStore();
|
|
10
10
|
|
|
11
|
-
jest.mock('
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
jest.mock('../Toolbar/Toolbar', () => jest.fn(() => <div id="Portal" />));
|
|
12
|
+
jest.mock('../Sidebar/Sidebar', () => jest.fn(() => <div id="Sidebar" />));
|
|
13
|
+
|
|
14
14
|
jest.mock('../Form/Form', () => jest.fn(() => <div className="Form" />));
|
|
15
15
|
|
|
16
16
|
describe('Edit', () => {
|
|
@@ -50,13 +50,15 @@ describe('Edit', () => {
|
|
|
50
50
|
messages: {},
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
|
-
const
|
|
53
|
+
const { container } = render(
|
|
54
54
|
<Provider store={store}>
|
|
55
|
+
<div id="toolbar"></div>
|
|
55
56
|
<Edit location={{ pathname: '/blog', search: {} }} />
|
|
57
|
+
<div id="sidebar"></div>
|
|
56
58
|
</Provider>,
|
|
57
59
|
);
|
|
58
|
-
|
|
59
|
-
expect(
|
|
60
|
+
|
|
61
|
+
expect(container).toMatchSnapshot();
|
|
60
62
|
});
|
|
61
63
|
|
|
62
64
|
it('renders an edit component', () => {
|
|
@@ -97,12 +99,14 @@ describe('Edit', () => {
|
|
|
97
99
|
messages: {},
|
|
98
100
|
},
|
|
99
101
|
});
|
|
100
|
-
const
|
|
102
|
+
const { container } = render(
|
|
101
103
|
<Provider store={store}>
|
|
104
|
+
<div id="toolbar"></div>
|
|
102
105
|
<Edit location={{ pathname: '/blog', search: {} }} />
|
|
106
|
+
<div id="sidebar"></div>
|
|
103
107
|
</Provider>,
|
|
104
108
|
);
|
|
105
|
-
|
|
106
|
-
expect(
|
|
109
|
+
|
|
110
|
+
expect(container).toMatchSnapshot();
|
|
107
111
|
});
|
|
108
112
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import BlockDataForm from './BlockDataForm';
|
|
3
3
|
import { render } from '@testing-library/react';
|
|
4
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
5
4
|
import configureStore from 'redux-mock-store';
|
|
6
5
|
import config from '@plone/volto/registry';
|
|
7
6
|
import { Provider } from 'react-intl-redux';
|
|
@@ -31,7 +31,7 @@ import isBoolean from 'lodash/isBoolean';
|
|
|
31
31
|
import PropTypes from 'prop-types';
|
|
32
32
|
import React, { Component } from 'react';
|
|
33
33
|
import { injectIntl } from 'react-intl';
|
|
34
|
-
import {
|
|
34
|
+
import { createPortal } from 'react-dom';
|
|
35
35
|
import { connect } from 'react-redux';
|
|
36
36
|
import {
|
|
37
37
|
Accordion,
|
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
} from '@plone/volto/actions';
|
|
54
54
|
import { compose } from 'redux';
|
|
55
55
|
import config from '@plone/volto/registry';
|
|
56
|
+
import SlotRenderer from '../../theme/SlotRenderer/SlotRenderer';
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Form container class.
|
|
@@ -237,6 +238,7 @@ class Form extends Component {
|
|
|
237
238
|
isClient: false,
|
|
238
239
|
// Ensure focus remain in field after change
|
|
239
240
|
inFocus: {},
|
|
241
|
+
sidebarMetadataIsAvailable: false,
|
|
240
242
|
};
|
|
241
243
|
this.onChangeField = this.onChangeField.bind(this);
|
|
242
244
|
this.onSelectBlock = this.onSelectBlock.bind(this);
|
|
@@ -312,6 +314,13 @@ class Form extends Component {
|
|
|
312
314
|
// Reset focus field
|
|
313
315
|
this.props.resetMetadataFocus();
|
|
314
316
|
}
|
|
317
|
+
|
|
318
|
+
if (
|
|
319
|
+
!this.state.sidebarMetadataIsAvailable &&
|
|
320
|
+
document.getElementById('sidebar-metadata')
|
|
321
|
+
) {
|
|
322
|
+
this.setState(() => ({ sidebarMetadataIsAvailable: true }));
|
|
323
|
+
}
|
|
315
324
|
}
|
|
316
325
|
|
|
317
326
|
/**
|
|
@@ -641,131 +650,147 @@ class Form extends Component {
|
|
|
641
650
|
// Removing this from SSR is important, since react-beautiful-dnd supports SSR,
|
|
642
651
|
// but draftJS don't like it much and the hydration gets messed up
|
|
643
652
|
this.state.isClient && (
|
|
644
|
-
|
|
645
|
-
<
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
selectedBlocks={this.state.multiSelected}
|
|
649
|
-
onChangeBlocks={(newBlockData) => {
|
|
650
|
-
const newFormData = {
|
|
651
|
-
...formData,
|
|
652
|
-
...newBlockData,
|
|
653
|
-
};
|
|
654
|
-
this.setState({
|
|
655
|
-
formData: newFormData,
|
|
656
|
-
});
|
|
657
|
-
if (this.props.global) {
|
|
658
|
-
this.props.setFormData(newFormData);
|
|
659
|
-
}
|
|
660
|
-
}}
|
|
661
|
-
onSetSelectedBlocks={(blockIds) =>
|
|
662
|
-
this.setState({ multiSelected: blockIds })
|
|
663
|
-
}
|
|
664
|
-
onSelectBlock={this.onSelectBlock}
|
|
665
|
-
/>
|
|
666
|
-
<UndoToolbar
|
|
667
|
-
state={{
|
|
668
|
-
formData,
|
|
669
|
-
selected: this.state.selected,
|
|
670
|
-
multiSelected: this.state.multiSelected,
|
|
671
|
-
}}
|
|
672
|
-
enableHotKeys
|
|
673
|
-
onUndoRedo={({ state }) => {
|
|
674
|
-
if (this.props.global) {
|
|
675
|
-
this.props.setFormData(state.formData);
|
|
676
|
-
}
|
|
677
|
-
return this.setState(state);
|
|
678
|
-
}}
|
|
679
|
-
/>
|
|
680
|
-
<BlocksForm
|
|
681
|
-
onChangeFormData={(newData) => {
|
|
682
|
-
const newFormData = {
|
|
683
|
-
...formData,
|
|
684
|
-
...newData,
|
|
685
|
-
};
|
|
686
|
-
this.setState({
|
|
687
|
-
formData: newFormData,
|
|
688
|
-
});
|
|
689
|
-
if (this.props.global) {
|
|
690
|
-
this.props.setFormData(newFormData);
|
|
691
|
-
}
|
|
692
|
-
}}
|
|
693
|
-
onChangeField={this.onChangeField}
|
|
694
|
-
onSelectBlock={this.onSelectBlock}
|
|
695
|
-
properties={formData}
|
|
653
|
+
<>
|
|
654
|
+
<SlotRenderer
|
|
655
|
+
name="aboveContent"
|
|
656
|
+
content={this.props.content}
|
|
696
657
|
navRoot={navRoot}
|
|
697
|
-
type={type}
|
|
698
|
-
pathname={this.props.pathname}
|
|
699
|
-
selectedBlock={this.state.selected}
|
|
700
|
-
multiSelected={this.state.multiSelected}
|
|
701
|
-
manage={this.props.isAdminForm}
|
|
702
|
-
allowedBlocks={this.props.allowedBlocks}
|
|
703
|
-
showRestricted={this.props.showRestricted}
|
|
704
|
-
editable={this.props.editable}
|
|
705
|
-
isMainForm={this.props.editable}
|
|
706
658
|
/>
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
659
|
+
|
|
660
|
+
<Container>
|
|
661
|
+
<BlocksToolbar
|
|
662
|
+
formData={formData}
|
|
663
|
+
selectedBlock={this.state.selected}
|
|
664
|
+
selectedBlocks={this.state.multiSelected}
|
|
665
|
+
onChangeBlocks={(newBlockData) => {
|
|
666
|
+
const newFormData = {
|
|
667
|
+
...formData,
|
|
668
|
+
...newBlockData,
|
|
669
|
+
};
|
|
670
|
+
this.setState({
|
|
671
|
+
formData: newFormData,
|
|
672
|
+
});
|
|
673
|
+
if (this.props.global) {
|
|
674
|
+
this.props.setFormData(newFormData);
|
|
675
|
+
}
|
|
676
|
+
}}
|
|
677
|
+
onSetSelectedBlocks={(blockIds) =>
|
|
678
|
+
this.setState({ multiSelected: blockIds })
|
|
679
|
+
}
|
|
680
|
+
onSelectBlock={this.onSelectBlock}
|
|
681
|
+
/>
|
|
682
|
+
<UndoToolbar
|
|
683
|
+
state={{
|
|
684
|
+
formData,
|
|
685
|
+
selected: this.state.selected,
|
|
686
|
+
multiSelected: this.state.multiSelected,
|
|
687
|
+
}}
|
|
688
|
+
enableHotKeys
|
|
689
|
+
onUndoRedo={({ state }) => {
|
|
690
|
+
if (this.props.global) {
|
|
691
|
+
this.props.setFormData(state.formData);
|
|
692
|
+
}
|
|
693
|
+
return this.setState(state);
|
|
694
|
+
}}
|
|
695
|
+
/>
|
|
696
|
+
<BlocksForm
|
|
697
|
+
onChangeFormData={(newData) => {
|
|
698
|
+
const newFormData = {
|
|
699
|
+
...formData,
|
|
700
|
+
...newData,
|
|
701
|
+
};
|
|
702
|
+
this.setState({
|
|
703
|
+
formData: newFormData,
|
|
704
|
+
});
|
|
705
|
+
if (this.props.global) {
|
|
706
|
+
this.props.setFormData(newFormData);
|
|
707
|
+
}
|
|
708
|
+
}}
|
|
709
|
+
onChangeField={this.onChangeField}
|
|
710
|
+
onSelectBlock={this.onSelectBlock}
|
|
711
|
+
properties={formData}
|
|
712
|
+
navRoot={navRoot}
|
|
713
|
+
type={type}
|
|
714
|
+
pathname={this.props.pathname}
|
|
715
|
+
selectedBlock={this.state.selected}
|
|
716
|
+
multiSelected={this.state.multiSelected}
|
|
717
|
+
manage={this.props.isAdminForm}
|
|
718
|
+
allowedBlocks={this.props.allowedBlocks}
|
|
719
|
+
showRestricted={this.props.showRestricted}
|
|
720
|
+
editable={this.props.editable}
|
|
721
|
+
isMainForm={this.props.editable}
|
|
722
|
+
/>
|
|
723
|
+
{this.state.isClient &&
|
|
724
|
+
this.state.sidebarMetadataIsAvailable &&
|
|
725
|
+
this.props.editable &&
|
|
726
|
+
createPortal(
|
|
727
|
+
<UiForm
|
|
728
|
+
method="post"
|
|
729
|
+
onSubmit={this.onSubmit}
|
|
730
|
+
error={keys(this.state.errors).length > 0}
|
|
731
|
+
>
|
|
732
|
+
{schema &&
|
|
733
|
+
map(schema.fieldsets, (fieldset) => (
|
|
734
|
+
<Accordion
|
|
735
|
+
fluid
|
|
736
|
+
styled
|
|
737
|
+
className="form"
|
|
738
|
+
key={fieldset.title}
|
|
727
739
|
>
|
|
728
|
-
<
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
onClick={this.onToggleMetadataFieldset}
|
|
732
|
-
>
|
|
733
|
-
{fieldset.title}
|
|
734
|
-
{metadataFieldsets.includes(fieldset.id) ? (
|
|
735
|
-
<Icon name={upSVG} size="20px" />
|
|
736
|
-
) : (
|
|
737
|
-
<Icon name={downSVG} size="20px" />
|
|
738
|
-
)}
|
|
739
|
-
</Accordion.Title>
|
|
740
|
-
<Accordion.Content
|
|
741
|
-
active={metadataFieldsets.includes(fieldset.id)}
|
|
740
|
+
<div
|
|
741
|
+
key={fieldset.id}
|
|
742
|
+
id={`metadataform-fieldset-${fieldset.id}`}
|
|
742
743
|
>
|
|
743
|
-
<
|
|
744
|
-
{
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
744
|
+
<Accordion.Title
|
|
745
|
+
active={metadataFieldsets.includes(fieldset.id)}
|
|
746
|
+
index={fieldset.id}
|
|
747
|
+
onClick={this.onToggleMetadataFieldset}
|
|
748
|
+
>
|
|
749
|
+
{fieldset.title}
|
|
750
|
+
{metadataFieldsets.includes(fieldset.id) ? (
|
|
751
|
+
<Icon name={upSVG} size="20px" />
|
|
752
|
+
) : (
|
|
753
|
+
<Icon name={downSVG} size="20px" />
|
|
754
|
+
)}
|
|
755
|
+
</Accordion.Title>
|
|
756
|
+
<Accordion.Content
|
|
757
|
+
active={metadataFieldsets.includes(fieldset.id)}
|
|
758
|
+
>
|
|
759
|
+
<Segment className="attached">
|
|
760
|
+
{map(fieldset.fields, (field, index) => (
|
|
761
|
+
<Field
|
|
762
|
+
{...schema.properties[field]}
|
|
763
|
+
id={field}
|
|
764
|
+
fieldSet={fieldset.title.toLowerCase()}
|
|
765
|
+
formData={formData}
|
|
766
|
+
focus={this.state.inFocus[field]}
|
|
767
|
+
value={formData?.[field]}
|
|
768
|
+
required={
|
|
769
|
+
schema.required.indexOf(field) !== -1
|
|
770
|
+
}
|
|
771
|
+
onChange={this.onChangeField}
|
|
772
|
+
onBlur={this.onBlurField}
|
|
773
|
+
onClick={this.onClickInput}
|
|
774
|
+
key={field}
|
|
775
|
+
error={this.state.errors[field]}
|
|
776
|
+
/>
|
|
777
|
+
))}
|
|
778
|
+
</Segment>
|
|
779
|
+
</Accordion.Content>
|
|
780
|
+
</div>
|
|
781
|
+
</Accordion>
|
|
782
|
+
))}
|
|
783
|
+
</UiForm>,
|
|
784
|
+
document.getElementById('sidebar-metadata'),
|
|
785
|
+
)}
|
|
786
|
+
|
|
787
|
+
<SlotRenderer
|
|
788
|
+
name="belowContent"
|
|
789
|
+
content={this.props.content}
|
|
790
|
+
navRoot={navRoot}
|
|
791
|
+
/>
|
|
792
|
+
</Container>
|
|
793
|
+
</>
|
|
769
794
|
)
|
|
770
795
|
) : (
|
|
771
796
|
<Container>
|
|
@@ -931,6 +956,7 @@ const FormIntl = injectIntl(Form, { forwardRef: true });
|
|
|
931
956
|
export default compose(
|
|
932
957
|
connect(
|
|
933
958
|
(state, props) => ({
|
|
959
|
+
content: state.content.data,
|
|
934
960
|
globalData: state.form?.global,
|
|
935
961
|
metadataFieldsets: state.sidebar?.metadataFieldsets,
|
|
936
962
|
metadataFieldFocus: state.sidebar?.metadataFieldFocus,
|
|
@@ -3,7 +3,6 @@ import renderer from 'react-test-renderer';
|
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { Provider } from 'react-intl-redux';
|
|
5
5
|
import { render } from '@testing-library/react';
|
|
6
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
7
6
|
|
|
8
7
|
import ModalForm from './ModalForm';
|
|
9
8
|
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
Table,
|
|
18
18
|
} from 'semantic-ui-react';
|
|
19
19
|
import { concat, map, reverse, find } from 'lodash';
|
|
20
|
-
import {
|
|
20
|
+
import { createPortal } from 'react-dom';
|
|
21
21
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
|
22
22
|
import { asyncConnect } from '@plone/volto/helpers';
|
|
23
23
|
|
|
@@ -314,8 +314,8 @@ class History extends Component {
|
|
|
314
314
|
</Table.Body>
|
|
315
315
|
</Table>
|
|
316
316
|
</Segment.Group>
|
|
317
|
-
{this.state.isClient &&
|
|
318
|
-
|
|
317
|
+
{this.state.isClient &&
|
|
318
|
+
createPortal(
|
|
319
319
|
<Toolbar
|
|
320
320
|
pathname={this.props.pathname}
|
|
321
321
|
hideDefaultViewButtons
|
|
@@ -332,9 +332,9 @@ class History extends Component {
|
|
|
332
332
|
/>
|
|
333
333
|
</Link>
|
|
334
334
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
335
|
+
/>,
|
|
336
|
+
document.getElementById('toolbar'),
|
|
337
|
+
)}
|
|
338
338
|
</Container>
|
|
339
339
|
);
|
|
340
340
|
}
|