@plone/volto 18.1.2 → 18.2.0
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/.eslintignore +1 -1
- package/.eslintrc +8 -1
- package/.eslintrc.core.js +42 -0
- package/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/actions/content/content.js +1 -1
- package/src/actions/language/language.js +2 -2
- package/src/actions/search/search.js +7 -1
- package/src/actions/workflow/workflow.js +1 -1
- package/src/components/manage/Actions/Actions.jsx +8 -3
- package/src/components/manage/Add/Add.jsx +26 -26
- package/src/components/manage/Aliases/Aliases.jsx +9 -7
- package/src/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +5 -7
- package/src/components/manage/AnchorPlugin/useLinkEditor.jsx +1 -1
- package/src/components/manage/BlockChooser/BlockChooser.jsx +6 -3
- package/src/components/manage/BlockChooser/BlockChooserButton.jsx +4 -3
- package/src/components/manage/BlockChooser/BlockChooserSearch.jsx +1 -1
- package/src/components/manage/Blocks/Block/BlocksForm.jsx +8 -7
- package/src/components/manage/Blocks/Block/DefaultEdit.jsx +1 -1
- package/src/components/manage/Blocks/Block/DefaultView.jsx +1 -1
- package/src/components/manage/Blocks/Block/Edit.jsx +7 -8
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +3 -3
- package/src/components/manage/Blocks/Block/Order/Item.jsx +3 -3
- package/src/components/manage/Blocks/Block/Order/Order.jsx +2 -1
- package/src/components/manage/Blocks/Block/Order/utilities.js +2 -2
- package/src/components/manage/Blocks/Block/StyleWrapper.jsx +1 -1
- package/src/components/manage/Blocks/Container/Edit.jsx +3 -3
- package/src/components/manage/Blocks/Container/EditBlockWrapper.jsx +2 -2
- package/src/components/manage/Blocks/Container/NewBlockAddButton.jsx +3 -2
- package/src/components/manage/Blocks/Container/SimpleContainerToolbar.jsx +1 -1
- package/src/components/manage/Blocks/Grid/Edit.jsx +1 -1
- package/src/components/manage/Blocks/Grid/View.jsx +2 -2
- package/src/components/manage/Blocks/Grid/templates.js +1 -1
- package/src/components/manage/Blocks/HTML/Edit.jsx +2 -2
- package/src/components/manage/Blocks/Image/Edit.jsx +4 -6
- package/src/components/manage/Blocks/Image/ImageSidebar.jsx +3 -2
- package/src/components/manage/Blocks/Image/View.jsx +3 -6
- package/src/components/manage/Blocks/LeadImage/Edit.jsx +2 -1
- package/src/components/manage/Blocks/LeadImage/LeadImageSidebar.jsx +3 -2
- package/src/components/manage/Blocks/LeadImage/View.jsx +1 -1
- package/src/components/manage/Blocks/Listing/DefaultTemplate.jsx +3 -3
- package/src/components/manage/Blocks/Listing/Edit.jsx +5 -7
- package/src/components/manage/Blocks/Listing/ImageGallery.jsx +2 -2
- package/src/components/manage/Blocks/Listing/ListingBody.jsx +2 -2
- package/src/components/manage/Blocks/Listing/SummaryTemplate.jsx +3 -3
- package/src/components/manage/Blocks/Listing/View.jsx +2 -2
- package/src/components/manage/Blocks/Listing/getAsyncData.js +2 -2
- package/src/components/manage/Blocks/Listing/withQuerystringResults.jsx +4 -2
- package/src/components/manage/Blocks/Maps/Edit.jsx +4 -2
- package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +1 -1
- package/src/components/manage/Blocks/Maps/View.jsx +1 -1
- package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +3 -3
- package/src/components/manage/Blocks/Search/SearchBlockView.jsx +3 -2
- package/src/components/manage/Blocks/Search/components/DateRangeFacet.jsx +1 -1
- package/src/components/manage/Blocks/Search/components/FilterList.jsx +3 -3
- package/src/components/manage/Blocks/Search/components/SearchInput.jsx +1 -1
- package/src/components/manage/Blocks/Search/components/SortOn.jsx +1 -1
- package/src/components/manage/Blocks/Search/components/base.js +1 -1
- package/src/components/manage/Blocks/Search/hocs/withQueryString.jsx +1 -1
- package/src/components/manage/Blocks/Search/hocs/withSearch.jsx +2 -2
- package/src/components/manage/Blocks/Search/schema.js +1 -1
- package/src/components/manage/Blocks/Search/widgets/SelectMetadataField.jsx +4 -1
- package/src/components/manage/Blocks/Teaser/Data.jsx +6 -7
- package/src/components/manage/Blocks/Teaser/DefaultBody.jsx +3 -3
- package/src/components/manage/Blocks/Teaser/Edit.jsx +2 -2
- package/src/components/manage/Blocks/Teaser/View.jsx +1 -1
- package/src/components/manage/Blocks/Teaser/adapter.js +1 -1
- package/src/components/manage/Blocks/ToC/Edit.jsx +1 -1
- package/src/components/manage/Blocks/ToC/View.jsx +2 -2
- package/src/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +3 -3
- package/src/components/manage/Blocks/ToC/variations/HorizontalMenu.jsx +2 -2
- package/src/components/manage/Blocks/Video/Body.jsx +1 -1
- package/src/components/manage/Blocks/Video/Edit.jsx +4 -2
- package/src/components/manage/Blocks/Video/VideoSidebar.jsx +1 -1
- package/src/components/manage/Blocks/Video/View.jsx +1 -1
- package/src/components/manage/ConditionalLink/ConditionalLink.jsx +1 -1
- package/src/components/manage/Contents/Contents.jsx +26 -28
- package/src/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
- package/src/components/manage/Contents/ContentsItem.jsx +6 -3
- package/src/components/manage/Contents/ContentsPropertiesModal.jsx +4 -3
- package/src/components/manage/Contents/ContentsRenameModal.jsx +5 -3
- package/src/components/manage/Contents/ContentsTagsModal.jsx +3 -3
- package/src/components/manage/Contents/ContentsUploadModal.jsx +7 -4
- package/src/components/manage/Contents/ContentsWorkflowModal.jsx +10 -3
- package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +6 -4
- package/src/components/manage/Controlpanels/Aliases.jsx +7 -5
- package/src/components/manage/Controlpanels/ContentType.jsx +12 -4
- package/src/components/manage/Controlpanels/ContentTypeLayout.jsx +11 -7
- package/src/components/manage/Controlpanels/ContentTypeSchema.jsx +7 -4
- package/src/components/manage/Controlpanels/ContentTypes.jsx +7 -5
- package/src/components/manage/Controlpanels/ContentTypesActions.jsx +1 -1
- package/src/components/manage/Controlpanels/Controlpanel.jsx +9 -4
- package/src/components/manage/Controlpanels/Controlpanels.jsx +11 -3
- package/src/components/manage/Controlpanels/DatabaseInformation.jsx +5 -4
- package/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +16 -19
- package/src/components/manage/Controlpanels/Groups/RenderGroups.jsx +2 -2
- package/src/components/manage/Controlpanels/ModerateComments.jsx +7 -3
- package/src/components/manage/Controlpanels/Relations/BrokenRelations.jsx +4 -4
- package/src/components/manage/Controlpanels/Relations/Relations.jsx +7 -5
- package/src/components/manage/Controlpanels/Relations/RelationsListing.jsx +7 -4
- package/src/components/manage/Controlpanels/Relations/RelationsMatrix.jsx +7 -5
- package/src/components/manage/Controlpanels/Rules/AddRule.jsx +9 -3
- package/src/components/manage/Controlpanels/Rules/ConfigureRule.jsx +7 -4
- package/src/components/manage/Controlpanels/Rules/EditRule.jsx +6 -3
- package/src/components/manage/Controlpanels/Rules/Rules.jsx +6 -4
- package/src/components/manage/Controlpanels/Rules/components/VariableModal.jsx +1 -1
- package/src/components/manage/Controlpanels/UndoControlpanel.jsx +9 -4
- package/src/components/manage/Controlpanels/UpgradeControlPanel.jsx +7 -5
- package/src/components/manage/Controlpanels/Users/RenderUsers.jsx +5 -3
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +9 -6
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipListing.jsx +9 -5
- package/src/components/manage/Controlpanels/Users/UserGroupMembershipMatrix.jsx +4 -3
- package/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx +17 -20
- package/src/components/manage/Controlpanels/VersionOverview.jsx +1 -1
- package/src/components/manage/Controlpanels/index.tsx +5 -2
- package/src/components/manage/Delete/Delete.jsx +7 -3
- package/src/components/manage/Diff/Diff.jsx +13 -11
- package/src/components/manage/Diff/DiffField.jsx +4 -3
- package/src/components/manage/Display/Display.jsx +9 -4
- package/src/components/manage/DragDropList/DragDropList.jsx +1 -1
- package/src/components/manage/Edit/Edit.jsx +20 -23
- package/src/components/manage/Form/BlockDataForm.jsx +1 -1
- package/src/components/manage/Form/BlocksToolbar.jsx +10 -5
- package/src/components/manage/Form/Form.jsx +18 -20
- package/src/components/manage/Form/InlineForm.jsx +5 -3
- package/src/components/manage/Form/InlineFormState.js +1 -1
- package/src/components/manage/Form/ModalForm.jsx +4 -3
- package/src/components/manage/Form/UndoToolbar.jsx +2 -2
- package/src/components/manage/History/History.jsx +16 -11
- package/src/components/manage/LinkMore/LinkMore.jsx +3 -3
- package/src/components/manage/LinksToItem/LinksToItem.jsx +11 -11
- package/src/components/manage/LockingToastsFactory/LockingToastsFactory.jsx +2 -1
- package/src/components/manage/Messages/Messages.jsx +2 -2
- package/src/components/manage/Multilingual/CompareLanguages.jsx +3 -2
- package/src/components/manage/Multilingual/CreateTranslation.jsx +5 -6
- package/src/components/manage/Multilingual/ManageTranslations.jsx +9 -6
- package/src/components/manage/Multilingual/TranslationObject.jsx +5 -5
- package/src/components/manage/Pluggable/index.js +1 -1
- package/src/components/manage/Preferences/ChangePassword.jsx +8 -5
- package/src/components/manage/Preferences/PersonalInformation.jsx +4 -3
- package/src/components/manage/Preferences/PersonalPreferences.jsx +5 -4
- package/src/components/manage/Rules/Rules.jsx +6 -5
- package/src/components/manage/Sharing/Sharing.jsx +12 -5
- package/src/components/manage/Sidebar/AlignBlock.jsx +1 -1
- package/src/components/manage/Sidebar/ObjectBrowser.jsx +1 -1
- package/src/components/manage/Sidebar/ObjectBrowserBody.jsx +1 -1
- package/src/components/manage/Sidebar/ObjectBrowserNav.jsx +2 -1
- package/src/components/manage/Sidebar/Sidebar.jsx +4 -3
- package/src/components/manage/Sidebar/SidebarPopup.jsx +1 -1
- package/src/components/manage/TextLineEdit/TextLineEdit.jsx +1 -1
- package/src/components/manage/Toolbar/More.jsx +9 -10
- package/src/components/manage/Toolbar/PersonalTools.jsx +3 -3
- package/src/components/manage/Toolbar/StandardWrapper.jsx +1 -1
- package/src/components/manage/Toolbar/Toolbar.jsx +12 -15
- package/src/components/manage/Toolbar/Types.jsx +7 -2
- package/src/components/manage/Widgets/ArrayWidget.jsx +4 -3
- package/src/components/manage/Widgets/ButtonsWidget.jsx +1 -1
- package/src/components/manage/Widgets/ColorPickerWidget.tsx +2 -1
- package/src/components/manage/Widgets/DatetimeWidget.jsx +2 -2
- package/src/components/manage/Widgets/FileWidget.jsx +4 -2
- package/src/components/manage/Widgets/FormFieldWrapper.jsx +2 -2
- package/src/components/manage/Widgets/IdWidget.jsx +7 -3
- package/src/components/manage/Widgets/ImageWidget.jsx +6 -5
- package/src/components/manage/Widgets/InternalUrlWidget.jsx +6 -2
- package/src/components/manage/Widgets/ObjectBrowserWidget.jsx +5 -1
- package/src/components/manage/Widgets/ObjectListWidget.jsx +4 -2
- package/src/components/manage/Widgets/ObjectListWidget.stories.js +1 -1
- package/src/components/manage/Widgets/ObjectWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/QuerySortOnWidget.jsx +3 -1
- package/src/components/manage/Widgets/QueryWidget.jsx +8 -3
- package/src/components/manage/Widgets/RecurrenceWidget/ByDayField.jsx +1 -1
- package/src/components/manage/Widgets/RecurrenceWidget/MonthOfTheYearField.jsx +2 -2
- package/src/components/manage/Widgets/RecurrenceWidget/Occurences.jsx +2 -2
- package/src/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +7 -3
- package/src/components/manage/Widgets/RecurrenceWidget/SelectInput.jsx +1 -1
- package/src/components/manage/Widgets/RecurrenceWidget/WeekdayOfTheMonthField.jsx +2 -2
- package/src/components/manage/Widgets/RecurrenceWidget/WeekdayOfTheMonthIndexField.jsx +1 -1
- package/src/components/manage/Widgets/ReferenceWidget.jsx +11 -3
- package/src/components/manage/Widgets/RegistryImageWidget.jsx +3 -2
- package/src/components/manage/Widgets/SchemaWidget.jsx +7 -1
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +5 -2
- package/src/components/manage/Widgets/SelectStyling.jsx +1 -1
- package/src/components/manage/Widgets/SelectUtils.js +4 -2
- package/src/components/manage/Widgets/SelectWidget.jsx +6 -3
- package/src/components/manage/Widgets/SelectWidget.stories.jsx +1 -1
- package/src/components/manage/Widgets/TextWidget.jsx +1 -1
- package/src/components/manage/Widgets/TokenWidget.jsx +2 -2
- package/src/components/manage/Widgets/UrlWidget.jsx +2 -2
- package/src/components/manage/Widgets/VocabularyTermsWidget.jsx +6 -3
- package/src/components/manage/Workflow/Workflow.jsx +7 -6
- package/src/components/manage/WorkingCopyToastsFactory/WorkingCopyToastsFactory.jsx +3 -3
- package/src/components/theme/Anontools/Anontools.jsx +1 -1
- package/src/components/theme/App/App.jsx +17 -24
- package/src/components/theme/Avatar/Avatar.jsx +1 -1
- package/src/components/theme/Breadcrumbs/Breadcrumbs.jsx +4 -3
- package/src/components/theme/Comments/CommentEditModal.jsx +2 -2
- package/src/components/theme/Comments/Comments.jsx +5 -8
- package/src/components/theme/ContactForm/ContactForm.jsx +7 -4
- package/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +4 -7
- package/src/components/theme/EventDetails/EventDetails.jsx +2 -2
- package/src/components/theme/Footer/Footer.jsx +3 -3
- package/src/components/theme/Header/Header.jsx +5 -7
- package/src/components/theme/Icon/Icon.stories.jsx +1 -1
- package/src/components/theme/Image/Image.jsx +1 -1
- package/src/components/theme/LanguageSelector/LanguageSelector.jsx +6 -7
- package/src/components/theme/Login/Login.jsx +6 -5
- package/src/components/theme/Logo/Logo.jsx +3 -6
- package/src/components/theme/Logout/Logout.jsx +3 -2
- package/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx +2 -2
- package/src/components/theme/Navigation/ContextNavigation.jsx +3 -2
- package/src/components/theme/Navigation/NavItem.jsx +2 -1
- package/src/components/theme/Navigation/Navigation.jsx +4 -2
- package/src/components/theme/Navigation/withContentNavigation.js +2 -2
- package/src/components/theme/NotFound/NotFound.jsx +6 -3
- package/src/components/theme/Pagination/Pagination.jsx +2 -2
- package/src/components/theme/PasswordReset/PasswordReset.jsx +2 -2
- package/src/components/theme/PasswordReset/RequestPasswordReset.jsx +3 -2
- package/src/components/theme/Register/Register.jsx +4 -3
- package/src/components/theme/Search/Search.jsx +7 -5
- package/src/components/theme/Search/SearchTags.jsx +1 -1
- package/src/components/theme/SearchWidget/SearchWidget.jsx +4 -3
- package/src/components/theme/Sitemap/Sitemap.jsx +4 -3
- package/src/components/theme/Unauthorized/Unauthorized.jsx +1 -1
- package/src/components/theme/View/AlbumView.jsx +2 -1
- package/src/components/theme/View/DefaultView.jsx +4 -3
- package/src/components/theme/View/EventDatesInfo.jsx +1 -1
- package/src/components/theme/View/EventView.jsx +3 -2
- package/src/components/theme/View/FileView.jsx +1 -1
- package/src/components/theme/View/ImageView.jsx +1 -1
- package/src/components/theme/View/LinkView.jsx +2 -2
- package/src/components/theme/View/ListingView.jsx +1 -1
- package/src/components/theme/View/NewsItemView.jsx +2 -1
- package/src/components/theme/View/RenderBlocks.jsx +6 -5
- package/src/components/theme/View/SummaryView.jsx +1 -1
- package/src/components/theme/View/TabularView.jsx +1 -1
- package/src/components/theme/View/View.jsx +9 -13
- package/src/components/theme/Widgets/BooleanWidget.jsx +1 -1
- package/src/components/theme/Widgets/DateWidget.jsx +1 -1
- package/src/components/theme/Widgets/DatetimeWidget.jsx +1 -1
- package/src/components/theme/Widgets/EmailWidget.jsx +1 -1
- package/src/components/theme/Widgets/FileWidget.jsx +2 -2
- package/src/components/theme/Widgets/ImageWidget.jsx +1 -1
- package/src/components/theme/Widgets/RelationWidget.jsx +4 -4
- package/src/components/theme/Widgets/TokenWidget.jsx +1 -1
- package/src/components/theme/Widgets/UrlWidget.jsx +1 -1
- package/src/config/Blocks.jsx +1 -1
- package/src/config/Components.jsx +3 -1
- package/src/config/index.js +1 -1
- package/src/config/slots.js +1 -1
- package/src/express-middleware/files.js +1 -1
- package/src/express-middleware/images.js +1 -1
- package/src/express-middleware/robotstxt.js +1 -1
- package/src/helpers/Api/Api.js +1 -1
- package/src/helpers/AsyncConnect/AsyncConnect.test.js +4 -1
- package/src/helpers/AuthToken/AuthToken.js +2 -2
- package/src/helpers/Blocks/Blocks.js +9 -3
- package/src/helpers/Blocks/cloneBlocks.test.js +1 -1
- package/src/helpers/Content/Content.js +7 -1
- package/src/helpers/Extensions/withBlockSchemaEnhancer.jsx +2 -1
- package/src/helpers/FormValidation/FormValidation.jsx +4 -1
- package/src/helpers/Html/Html.jsx +1 -1
- package/src/helpers/Loadable/Loadable.jsx +2 -2
- package/src/helpers/Site/index.js +1 -1
- package/src/helpers/Sitemap/Sitemap.js +2 -2
- package/src/helpers/Url/Url.js +5 -1
- package/src/helpers/User/User.js +1 -1
- package/src/helpers/Utils/UseDetectClickOutside.stories.jsx +1 -1
- package/src/helpers/Utils/Utils.jsx +5 -1
- package/src/helpers/Utils/useDetectClickOutside.js +1 -1
- package/src/helpers/Utils/usePagination.js +2 -1
- package/src/helpers/Workflows/Workflows.js +2 -1
- package/src/hooks/user/useUser.js +1 -1
- package/src/middleware/api.js +7 -4
- package/src/middleware/storeProtectLoadUtils.js +1 -1
- package/src/reducers/actions/actions.js +2 -5
- package/src/reducers/breadcrumbs/breadcrumbs.js +3 -6
- package/src/reducers/content/content.js +4 -2
- package/src/reducers/controlpanels/controlpanels.js +1 -1
- package/src/reducers/messages/messages.js +3 -1
- package/src/reducers/navigation/navigation.js +3 -6
- package/src/reducers/navroot/navroot.js +2 -5
- package/src/reducers/querystringsearch/querystringsearch.js +3 -2
- package/src/reducers/schema/schema.js +7 -1
- package/src/reducers/search/search.js +3 -2
- package/src/reducers/sidebar/sidebar.js +1 -1
- package/src/reducers/types/types.js +2 -5
- package/src/reducers/users/users.js +1 -1
- package/src/reducers/workingcopy/workingcopy.js +1 -1
- package/src/routes.js +24 -26
- package/src/server.jsx +7 -7
- package/src/start-client.jsx +3 -1
- package/src/storybook.jsx +1 -1
- package/types/config/Components.d.ts +3 -3
|
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl';
|
|
10
10
|
import prettybytes from 'pretty-bytes';
|
|
11
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
11
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
12
12
|
import config from '@plone/volto/registry';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useHistory } from 'react-router-dom';
|
|
4
|
-
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
+
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
5
5
|
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
6
|
-
import
|
|
6
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
7
7
|
import { Redirect } from 'react-router-dom';
|
|
8
8
|
import { FormattedMessage } from 'react-intl';
|
|
9
9
|
import config from '@plone/volto/registry';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { Segment, Container as SemanticContainer } from 'semantic-ui-react';
|
|
9
|
-
import
|
|
9
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
10
10
|
import config from '@plone/volto/registry';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
9
|
-
import { hasBlocksData
|
|
9
|
+
import { hasBlocksData } from '@plone/volto/helpers/Blocks/Blocks';
|
|
10
|
+
import { flattenHTMLToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
10
11
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
11
12
|
import config from '@plone/volto/registry';
|
|
12
13
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getBaseUrl
|
|
2
|
+
import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
3
3
|
import { defineMessages, useIntl } from 'react-intl';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import map from 'lodash/map';
|
|
5
|
+
import MaybeWrap from '@plone/volto/components/manage/MaybeWrap/MaybeWrap';
|
|
6
6
|
import {
|
|
7
|
+
applyBlockDefaults,
|
|
7
8
|
getBlocksFieldname,
|
|
8
9
|
getBlocksLayoutFieldname,
|
|
9
10
|
hasBlocksData,
|
|
10
|
-
} from '@plone/volto/helpers';
|
|
11
|
+
} from '@plone/volto/helpers/Blocks/Blocks';
|
|
11
12
|
import StyleWrapper from '@plone/volto/components/manage/Blocks/Block/StyleWrapper';
|
|
12
13
|
import config from '@plone/volto/registry';
|
|
13
|
-
import
|
|
14
|
+
import ViewDefaultBlock from '@plone/volto/components/manage/Blocks/Block/DefaultView';
|
|
14
15
|
import RenderEmptyBlock from './RenderEmptyBlock';
|
|
15
16
|
|
|
16
17
|
const messages = defineMessages({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import
|
|
8
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
9
9
|
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl';
|
|
11
11
|
import config from '@plone/volto/registry';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import
|
|
8
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
9
9
|
import { Container as SemanticContainer, Table } from 'semantic-ui-react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl';
|
|
11
11
|
import config from '@plone/volto/registry';
|
|
@@ -12,19 +12,15 @@ import { createPortal } from 'react-dom';
|
|
|
12
12
|
import { injectIntl } from 'react-intl';
|
|
13
13
|
import qs from 'query-string';
|
|
14
14
|
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from '@plone/volto/
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
flattenToAppURL,
|
|
25
|
-
getLayoutFieldname,
|
|
26
|
-
hasApiExpander,
|
|
27
|
-
} from '@plone/volto/helpers';
|
|
15
|
+
import ContentMetadataTags from '@plone/volto/components/theme/ContentMetadataTags/ContentMetadataTags';
|
|
16
|
+
import Comments from '@plone/volto/components/theme/Comments/Comments';
|
|
17
|
+
import Toolbar from '@plone/volto/components/manage/Toolbar/Toolbar';
|
|
18
|
+
import { listActions } from '@plone/volto/actions/actions/actions';
|
|
19
|
+
import { getContent } from '@plone/volto/actions/content/content';
|
|
20
|
+
import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
|
|
21
|
+
import { getBaseUrl, flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
22
|
+
import { getLayoutFieldname } from '@plone/volto/helpers/Content/Content';
|
|
23
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
28
24
|
|
|
29
25
|
import config from '@plone/volto/registry';
|
|
30
26
|
import SlotRenderer from '../SlotRenderer/SlotRenderer';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import { useSelector } from 'react-redux';
|
|
5
|
-
import { toBackendLang } from '@plone/volto/helpers';
|
|
5
|
+
import { toBackendLang } from '@plone/volto/helpers/Utils/Utils';
|
|
6
6
|
|
|
7
7
|
const DateWidget = ({ value, children, className, format = 'll' }) => {
|
|
8
8
|
const lang = useSelector((state) => state.intl.locale);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import { useSelector } from 'react-redux';
|
|
5
|
-
import { toBackendLang } from '@plone/volto/helpers';
|
|
5
|
+
import { toBackendLang } from '@plone/volto/helpers/Utils/Utils';
|
|
6
6
|
|
|
7
7
|
const DatetimeWidget = ({ value, children, className, format = 'lll' }) => {
|
|
8
8
|
const lang = useSelector((state) => state.intl.locale);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
4
4
|
|
|
5
5
|
const EmailWidget = ({ value, children, className }) =>
|
|
6
6
|
value ? (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
-
import
|
|
3
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
4
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
5
5
|
|
|
6
6
|
const niceBytes = (bytes) => {
|
|
7
7
|
bytes = Number(bytes);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
-
import { getContentIcon } from '@plone/volto/helpers';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
4
|
+
import { getContentIcon } from '@plone/volto/helpers/Content/Content';
|
|
5
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
6
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
7
7
|
|
|
8
8
|
const RelationWidget = ({ value, children, className }) => {
|
|
9
9
|
if (!value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
4
4
|
|
|
5
5
|
const TokenWidget = ({ value, children, className }) =>
|
|
6
6
|
value ? (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
4
4
|
|
|
5
5
|
const UrlWidget = ({ value, children, className }) =>
|
|
6
6
|
value ? (
|
package/src/config/Blocks.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl';
|
|
2
|
-
import
|
|
2
|
+
import cloneDeep from 'lodash/cloneDeep';
|
|
3
3
|
|
|
4
4
|
import ViewTitleBlock from '@plone/volto/components/manage/Blocks/Title/View';
|
|
5
5
|
import ViewDescriptionBlock from '@plone/volto/components/manage/Blocks/Description/View';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import App from '@plone/volto/components/theme/App/App';
|
|
2
|
+
import PreviewImage from '@plone/volto/components/theme/PreviewImage/PreviewImage';
|
|
3
|
+
import Image from '@plone/volto/components/theme/Image/Image';
|
|
2
4
|
|
|
3
5
|
// Register components.
|
|
4
6
|
export const components = {
|
package/src/config/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import applyAddonConfiguration, { addonsInfo } from 'load-volto-addons';
|
|
|
34
34
|
|
|
35
35
|
import ConfigRegistry from '@plone/volto/registry';
|
|
36
36
|
|
|
37
|
-
import { getSiteAsyncPropExtender } from '@plone/volto/helpers';
|
|
37
|
+
import { getSiteAsyncPropExtender } from '@plone/volto/helpers/Site';
|
|
38
38
|
import { registerValidators } from './validation';
|
|
39
39
|
|
|
40
40
|
const host = process.env.HOST || 'localhost';
|
package/src/config/slots.js
CHANGED
package/src/helpers/Api/Api.js
CHANGED
|
@@ -7,7 +7,7 @@ import superagent from 'superagent';
|
|
|
7
7
|
import Cookies from 'universal-cookie';
|
|
8
8
|
import config from '@plone/volto/registry';
|
|
9
9
|
import { addHeadersFactory } from '@plone/volto/helpers/Proxy/Proxy';
|
|
10
|
-
import { stripQuerystring } from '@plone/volto/helpers';
|
|
10
|
+
import { stripQuerystring } from '@plone/volto/helpers/Url/Url';
|
|
11
11
|
|
|
12
12
|
const methods = ['get', 'post', 'put', 'patch', 'del'];
|
|
13
13
|
|
|
@@ -5,7 +5,10 @@ import { renderRoutes } from 'react-router-config';
|
|
|
5
5
|
import { createStore, combineReducers } from 'redux';
|
|
6
6
|
import { render } from '@testing-library/react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
endGlobalLoad,
|
|
10
|
+
beginGlobalLoad,
|
|
11
|
+
} from '@plone/volto/actions/asyncConnect/asyncConnect';
|
|
9
12
|
import reduxAsyncConnect from '@plone/volto/reducers/asyncConnect/asyncConnect';
|
|
10
13
|
|
|
11
14
|
import { AsyncConnectWithContext, AsyncConnect } from './AsyncConnect'; // , AsyncConnect
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import Cookies from 'universal-cookie';
|
|
7
7
|
import jwtDecode from 'jwt-decode';
|
|
8
8
|
|
|
9
|
-
import { loginRenew } from '@plone/volto/actions';
|
|
10
|
-
import { getCookieOptions } from '@plone/volto/helpers';
|
|
9
|
+
import { loginRenew } from '@plone/volto/actions/userSession/userSession';
|
|
10
|
+
import { getCookieOptions } from '@plone/volto/helpers/Cookies/cookies';
|
|
11
11
|
import { push } from 'connected-react-router';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -3,15 +3,21 @@
|
|
|
3
3
|
* @module helpers/Blocks
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import omit from 'lodash/omit';
|
|
7
|
+
import without from 'lodash/without';
|
|
8
|
+
import endsWith from 'lodash/endsWith';
|
|
9
|
+
import find from 'lodash/find';
|
|
10
|
+
import isObject from 'lodash/isObject';
|
|
11
|
+
import keys from 'lodash/keys';
|
|
12
|
+
import merge from 'lodash/merge';
|
|
7
13
|
import move from 'lodash-move';
|
|
8
14
|
import { v4 as uuid } from 'uuid';
|
|
9
15
|
import config from '@plone/volto/registry';
|
|
16
|
+
import { applySchemaEnhancer } from '@plone/volto/helpers/Extensions';
|
|
10
17
|
import {
|
|
11
|
-
applySchemaEnhancer,
|
|
12
18
|
insertInArray,
|
|
13
19
|
removeFromArray,
|
|
14
|
-
} from '@plone/volto/helpers';
|
|
20
|
+
} from '@plone/volto/helpers/Utils/Utils';
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
23
|
* Get blocks field.
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
* @module helpers/Content
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import omitBy from 'lodash/omitBy';
|
|
7
|
+
import mapKeys from 'lodash/mapKeys';
|
|
8
|
+
import pickBy from 'lodash/pickBy';
|
|
9
|
+
import map from 'lodash/map';
|
|
10
|
+
import keys from 'lodash/keys';
|
|
11
|
+
import endsWith from 'lodash/endsWith';
|
|
12
|
+
import find from 'lodash/find';
|
|
7
13
|
import config from '@plone/volto/registry';
|
|
8
14
|
|
|
9
15
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages } from 'react-intl';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import
|
|
4
|
+
import find from 'lodash/find';
|
|
5
|
+
import isEmpty from 'lodash/isEmpty';
|
|
5
6
|
import config from '@plone/volto/registry';
|
|
6
7
|
import { cloneDeepSchema } from '@plone/volto/helpers/Utils/Utils';
|
|
7
8
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import map from 'lodash/map';
|
|
2
|
+
import keys from 'lodash/keys';
|
|
3
|
+
import intersection from 'lodash/intersection';
|
|
4
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
5
|
import { messages } from '@plone/volto/helpers/MessageLabels/MessageLabels';
|
|
3
6
|
import config from '@plone/volto/registry';
|
|
4
7
|
import { toast } from 'react-toastify';
|
|
@@ -7,7 +7,7 @@ import React, { Component } from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import Helmet from '@plone/volto/helpers/Helmet/Helmet';
|
|
9
9
|
import serialize from 'serialize-javascript';
|
|
10
|
-
import
|
|
10
|
+
import join from 'lodash/join';
|
|
11
11
|
import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
|
|
12
12
|
import { runtimeConfig } from '@plone/volto/runtime_config';
|
|
13
13
|
import config from '@plone/volto/registry';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
3
3
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
4
|
-
import
|
|
4
|
+
import omit from 'lodash/omit';
|
|
5
5
|
|
|
6
|
-
import { loadLazyLibrary } from '@plone/volto/actions';
|
|
6
|
+
import { loadLazyLibrary } from '@plone/volto/actions/lazyLibraries/lazyLibraries';
|
|
7
7
|
import config from '@plone/volto/registry';
|
|
8
8
|
|
|
9
9
|
const validateLibs = (maybeLibs) => {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import superagent from 'superagent';
|
|
7
|
-
import
|
|
7
|
+
import map from 'lodash/map';
|
|
8
8
|
import zlib from 'zlib';
|
|
9
|
-
import { toPublicURL } from '@plone/volto/helpers';
|
|
9
|
+
import { toPublicURL } from '@plone/volto/helpers/Url/Url';
|
|
10
10
|
import { addHeadersFactory } from '@plone/volto/helpers/Proxy/Proxy';
|
|
11
11
|
|
|
12
12
|
import config from '@plone/volto/registry';
|
package/src/helpers/Url/Url.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* @module helpers/Url
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import last from 'lodash/last';
|
|
7
|
+
import memoize from 'lodash/memoize';
|
|
8
|
+
import isArray from 'lodash/isArray';
|
|
9
|
+
import isObject from 'lodash/isObject';
|
|
10
|
+
import isString from 'lodash/isString';
|
|
7
11
|
import { urlRegex, telRegex, mailRegex } from './urlRegex';
|
|
8
12
|
import prependHttp from 'prepend-http';
|
|
9
13
|
import config from '@plone/volto/registry';
|
package/src/helpers/User/User.js
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useDetectClickOutside } from './useDetectClickOutside';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import { usePopper } from 'react-popper';
|
|
5
|
-
import
|
|
5
|
+
import BlockChooser from '@plone/volto/components/manage/BlockChooser/BlockChooser';
|
|
6
6
|
|
|
7
7
|
function OpenedChooser(props) {
|
|
8
8
|
const blockChooserRef = useDetectClickOutside({
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import cloneDeepWith from 'lodash/cloneDeepWith';
|
|
2
|
+
import flatten from 'lodash/flatten';
|
|
3
|
+
import isEqual from 'lodash/isEqual';
|
|
4
|
+
import isObject from 'lodash/isObject';
|
|
5
|
+
import transform from 'lodash/transform';
|
|
2
6
|
import React from 'react';
|
|
3
7
|
import { matchPath } from 'react-router';
|
|
4
8
|
import config from '@plone/volto/registry';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import doesNodeContainClick from 'semantic-ui-react/dist/commonjs/lib/doesNodeContainClick';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Hook used to detect clicks outside a component (or an escape key press).
|
|
@@ -2,7 +2,8 @@ import React, { useRef, useEffect } from 'react';
|
|
|
2
2
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
3
3
|
import qs from 'query-string';
|
|
4
4
|
import { useSelector } from 'react-redux';
|
|
5
|
-
import { findBlocks
|
|
5
|
+
import { findBlocks } from '@plone/volto/helpers/Blocks/Blocks';
|
|
6
|
+
import { slugify } from '@plone/volto/helpers/Utils/Utils';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @function useCreatePageQueryStringKey
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
3
|
import jwtDecode from 'jwt-decode';
|
|
4
|
-
import { getUser } from '@plone/volto/actions';
|
|
4
|
+
import { getUser } from '@plone/volto/actions/users/users';
|
|
5
5
|
|
|
6
6
|
const useUser = () => {
|
|
7
7
|
const users = useSelector((state) => state.users);
|
package/src/middleware/api.js
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import Cookies from 'universal-cookie';
|
|
7
7
|
import jwtDecode from 'jwt-decode';
|
|
8
|
-
import
|
|
8
|
+
import compact from 'lodash/compact';
|
|
9
|
+
import flatten from 'lodash/flatten';
|
|
10
|
+
import union from 'lodash/union';
|
|
9
11
|
import { matchPath } from 'react-router';
|
|
10
12
|
import qs from 'query-string';
|
|
11
13
|
|
|
@@ -17,12 +19,13 @@ import {
|
|
|
17
19
|
RESET_APIERROR,
|
|
18
20
|
SET_APIERROR,
|
|
19
21
|
} from '@plone/volto/constants/ActionTypes';
|
|
20
|
-
import { changeLanguage
|
|
22
|
+
import { changeLanguage } from '@plone/volto/actions/language/language';
|
|
23
|
+
import { updateUploadedFiles } from '@plone/volto/actions/content/content';
|
|
21
24
|
import {
|
|
22
25
|
toGettextLang,
|
|
23
26
|
toReactIntlLang,
|
|
24
|
-
|
|
25
|
-
} from '@plone/volto/helpers';
|
|
27
|
+
} from '@plone/volto/helpers/Utils/Utils';
|
|
28
|
+
import { getCookieOptions } from '@plone/volto/helpers/Cookies/cookies';
|
|
26
29
|
let socket = null;
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { GET_CONTENT, LIST_ACTIONS } from '@plone/volto/constants/ActionTypes';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
getBaseUrl,
|
|
10
|
-
hasApiExpander,
|
|
11
|
-
} from '@plone/volto/helpers';
|
|
7
|
+
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
8
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
12
9
|
|
|
13
10
|
const initialState = {
|
|
14
11
|
error: null,
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* @module reducers/breadcrumbs/breadcrumbs
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
getBaseUrl,
|
|
10
|
-
hasApiExpander,
|
|
11
|
-
} from '@plone/volto/helpers';
|
|
6
|
+
import map from 'lodash/map';
|
|
7
|
+
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
8
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
12
9
|
|
|
13
10
|
import {
|
|
14
11
|
GET_BREADCRUMBS,
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* @module reducers/content/content
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import map from 'lodash/map';
|
|
7
|
+
import mapKeys from 'lodash/mapKeys';
|
|
8
|
+
import omit from 'lodash/omit';
|
|
7
9
|
|
|
8
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
10
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
9
11
|
|
|
10
12
|
import {
|
|
11
13
|
CREATE_CONTENT,
|