@eeacms/volto-cca-policy 0.3.131 → 1.0.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/.eslintrc.js +7 -7
- package/CHANGELOG.md +9 -14
- package/docker-compose.yml +16 -16
- package/jest-addon.config.js +25 -420
- package/package.json +1 -1
- package/src/components/MigrationButtons.jsx +5 -1
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationEdit.jsx +2 -1
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.jsx +10 -4
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.test.jsx +87 -35
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.test.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.test.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/C3SIndicatorsOverviewBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +0 -20
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerEdit.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerView.js → CaseStudyExplorerView.jsx} +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.test.jsx +2 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +2 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +0 -4
- package/src/components/manage/Blocks/CaseStudyExplorer/utils.js +0 -30
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.jsx +3 -2
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.test.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksEdit.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksView.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksView.test.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/DropdownListView.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/DropdownListView.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/Filter.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/{View.js → View.jsx} +14 -10
- package/src/components/manage/Blocks/CountryMapHeatIndex/mapstyle.js +1 -3
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryEdit.jsx +2 -1
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +4 -3
- package/src/components/manage/Blocks/CountryMapProfile/Filter.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -12
- package/src/components/manage/Blocks/CountryProfileDetail/{CountryTabPane.js → CountryTabPane.jsx} +11 -4
- package/src/components/manage/Blocks/CountryProfileDetail/CountryTabPane.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryProfileDetail/{View.js → View.jsx} +20 -15
- package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +134 -20
- package/src/components/manage/Blocks/CountryProfileDetail/index.js +0 -1
- package/src/components/manage/Blocks/DataConnectedEmbedBlock/index.js +0 -2
- package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +1 -1
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentEdit.jsx +3 -3
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.jsx +2 -2
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/FlourishEmbedBlock/FlourishEmbedBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/Listing/DropdownListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/EventAccordionListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/EventAccordionListingView.test.jsx +5 -3
- package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +2 -1
- package/src/components/manage/Blocks/Listing/EventCardsListingView.test.jsx +10 -4
- package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -2
- package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -1
- package/src/components/manage/Blocks/Listing/SimpleCardsListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/SimpleCardsListingView.test.jsx +5 -3
- package/src/components/manage/Blocks/Listing/SimpleItemListingView.jsx +2 -2
- package/src/components/manage/Blocks/Listing/SimpleItemListingView.test.jsx +6 -4
- package/src/components/manage/Blocks/RASTBlock/ContextNavigation.jsx +0 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.test.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordionContent.jsx +2 -2
- package/src/components/manage/Blocks/RASTBlock/RASTEdit.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTMap.test.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTView.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreEdit.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreView.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreView.test.jsx +1 -1
- package/src/components/manage/Blocks/RedirectBlock/{RedirectBlock.test.js → RedirectBlock.test.jsx} +1 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +2 -2
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentEdit.jsx +1 -1
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.jsx +1 -1
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentEdit.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -2
- package/src/components/manage/Blocks/TabsBlock/Spotlight.test.jsx +7 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectEdit.jsx +1 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.jsx +1 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.test.jsx +1 -1
- package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.jsx +5 -2
- package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.test.jsx +3 -6
- package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx +1 -1
- package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTAccordion.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTLogoMap.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTLogoMap.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTNavigation.jsx +9 -5
- package/src/components/theme/ASTNavigation/ASTNavigation.test.jsx +323 -0
- package/src/components/theme/ASTNavigation/{utils.js → LinkWrap.jsx} +4 -9
- package/src/components/theme/ASTNavigation/UASTLogoMap.jsx +1 -1
- package/src/components/theme/ASTNavigation/UASTLogoMap.test.jsx +1 -1
- package/src/components/theme/Header/Header.jsx +5 -5
- package/src/components/theme/Header/LanguageSwitch.jsx +5 -5
- package/src/components/theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx +1 -1
- package/src/components/theme/TranslationDisclaimer/TranslationDisclaimer.jsx +1 -1
- package/src/components/theme/TranslationDisclaimer/TranslationInfo.jsx +1 -1
- package/src/components/theme/Views/AdaptationOptionView.jsx +1 -1
- package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -3
- package/src/components/theme/Views/ArchivedVersionListing.jsx +1 -1
- package/src/components/theme/Views/ArchivedVersionListing.test.jsx +2 -2
- package/src/components/theme/Views/ArchivedVersionNotice.jsx +1 -1
- package/src/components/theme/Views/ArchivedVersionNotice.test.jsx +1 -1
- package/src/components/theme/Views/BrokenLinks.jsx +1 -1
- package/src/components/theme/Views/BrokenLinks.test.jsx +1 -1
- package/src/components/theme/Views/CaseStudyView.test.jsx +1 -1
- package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -1
- package/src/components/theme/Views/NewsItemView.jsx +1 -1
- package/src/components/theme/Views/ProjectView.test.jsx +1 -1
- package/src/components/theme/Views/VersionsGroup.jsx +1 -1
- package/src/components/theme/Views/VersionsGroup.test.jsx +1 -1
- package/src/components/theme/Widgets/GeocharsWidget.jsx +1 -1
- package/src/components/theme/Widgets/GeolocationWidget.jsx +1 -1
- package/src/components/theme/Widgets/GeolocationWidget.test.jsx +1 -1
- package/src/components/theme/Widgets/ImageWidget.jsx +7 -8
- package/src/components/theme/Widgets/ImageWidget.test.jsx +1 -1
- package/src/components/theme/Widgets/PromotionalImageWidget.jsx +6 -4
- package/src/components/theme/Widgets/utils.js +1 -1
- package/src/constants.js +538 -2
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/Header.jsx +1 -1
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +52 -24
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +1 -0
- package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground.jsx +2 -1
- package/src/customizations/@eeacms/volto-listing-block/blocks/Listing/item-templates/SimpleItemTemplates.jsx +2 -2
- package/src/customizations/@eeacms/volto-listing-block/components/UniversalCard/fragments/CardTitle.jsx +1 -1
- package/src/customizations/@plone/volto-slate/blocks/Table/TableBlockView.jsx +3 -3
- package/src/customizations/@plone/volto-slate/blocks/Text/{index.js → index.jsx} +2 -21
- package/src/customizations/@plone/volto-slate/editor/extensions/normalizeNode.js +1 -1
- package/src/customizations/@plone/volto-slate/utils/blocks.js +11 -8
- package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -2
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -2
- package/src/customizations/@plone-collective/volto-authomatic/components/Login/Login.jsx +7 -4
- package/src/customizations/@plone-collective/volto-rss-provider/components/RSSFeedView.jsx +5 -8
- package/src/customizations/@plone-collective/volto-rss-provider/express-middleware.js +2 -1
- package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +3 -3
- package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +1 -1
- package/src/customizations/volto/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
- package/src/customizations/volto/components/manage/Controlpanels/ContentTypeLayout.jsx +12 -14
- package/src/customizations/volto/components/manage/Display/Display.jsx +10 -5
- package/src/customizations/volto/components/manage/Multilingual/TranslationObject.jsx +7 -6
- package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +4 -1
- package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +12 -8
- package/src/customizations/volto/components/theme/App/App.jsx +16 -23
- package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +3 -2
- package/src/customizations/volto/components/theme/View/DefaultView.jsx +5 -4
- package/src/customizations/volto/components/theme/View/LinkView.jsx +2 -2
- package/src/customizations/volto/components/theme/View/View.jsx +10 -11
- package/src/customizations/volto/helpers/Url/Url-old.js +2 -1
- package/src/customizations/volto/middleware/api.js +6 -4
- package/src/customizations/volto/reducers/actions/actions.js +2 -5
- package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +3 -6
- package/src/customizations/volto/reducers/navigation/navigation.js +3 -6
- package/src/customizations/volto/server.jsx +9 -8
- package/src/express-middleware.js +1 -1
- package/src/helpers/ContentMetadata.jsx +4 -4
- package/src/helpers/Utils.jsx +5 -5
- package/src/helpers/index.js +1 -8
- package/src/hocs/index.js +2 -0
- package/src/index.js +9 -7
- package/src/search/common.js +4 -41
- package/src/search/utils.test.js +1 -1
- package/src/search/vocabulary.js +2 -2
- package/src/store/reducers/physical-breadcrumbs.js +2 -2
- package/src/utils.js +1 -1
- package/src/helpers/Constants.jsx +0 -535
- package/theme/assets/images/administrative_support_service.png +0 -0
- /package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerEdit.js → CaseStudyExplorerEdit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryMapHeatIndex/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryMapProfile/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryProfileDetail/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/ReadMore/{schema.js → schema.jsx} +0 -0
- /package/src/helpers/{clientOnly.js → clientOnly.jsx} +0 -0
- /package/src/{components/manage/Blocks/withResponsiveContainer.js → hocs/withResponsiveContainer.jsx} +0 -0
- /package/src/{components/manage/Blocks → hocs}/withVisibilitySensor.jsx +0 -0
|
@@ -8,15 +8,15 @@ import { Dropdown, Image } from 'semantic-ui-react';
|
|
|
8
8
|
import { connect, useDispatch, useSelector } from 'react-redux';
|
|
9
9
|
|
|
10
10
|
import { withRouter } from 'react-router-dom';
|
|
11
|
-
import
|
|
11
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
12
12
|
import {
|
|
13
13
|
getBaseUrl,
|
|
14
|
-
hasApiExpander,
|
|
15
14
|
flattenToAppURL,
|
|
16
15
|
toPublicURL,
|
|
17
|
-
|
|
18
|
-
} from '@plone/volto/helpers';
|
|
19
|
-
import
|
|
16
|
+
} from '@plone/volto/helpers/Url/Url';
|
|
17
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
18
|
+
import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
|
|
19
|
+
import { getNavigation } from '@plone/volto/actions/navigation/navigation';
|
|
20
20
|
import { Header, Logo } from '@eeacms/volto-eea-design-system/ui';
|
|
21
21
|
import { usePrevious } from '@eeacms/volto-eea-design-system/helpers';
|
|
22
22
|
import eeaFlag from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/Header/eea.png';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import find from 'lodash/find';
|
|
3
3
|
import { useAtom } from 'jotai';
|
|
4
4
|
import { useSelector } from 'react-redux';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
6
|
import { Dropdown, Image } from 'semantic-ui-react';
|
|
7
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
7
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
8
8
|
import { Header } from '@eeacms/volto-eea-design-system/ui';
|
|
9
9
|
import config from '@plone/volto/registry';
|
|
10
10
|
import cx from 'classnames';
|
|
@@ -75,11 +75,11 @@ export default function LanguageSwitch({ history }) {
|
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
const euLanguages = eea.languages.filter(
|
|
78
|
-
(item) => eea.
|
|
78
|
+
(item) => !eea.NON_EU_LANGS.includes(item.code),
|
|
79
79
|
);
|
|
80
80
|
|
|
81
|
-
const nonEuLanguages = eea.languages.filter(
|
|
82
|
-
|
|
81
|
+
const nonEuLanguages = eea.languages.filter((item) =>
|
|
82
|
+
eea.NON_EU_LANGS.includes(item.code),
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
return (
|
|
@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
|
|
|
3
3
|
import { Tab, Container, Divider, Button, Icon } from 'semantic-ui-react';
|
|
4
4
|
import { formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
|
|
5
5
|
import { BannerTitle, HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
6
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
6
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
7
7
|
|
|
8
8
|
import GovernanceTab from './TabSections/GovernanceTab';
|
|
9
9
|
import AssessmentTab from './TabSections/AssessmentTab';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import { useLocation } from 'react-router-dom';
|
|
4
4
|
import { Container, Segment } from 'semantic-ui-react';
|
|
5
|
-
import { isCmsUi } from '@plone/volto/helpers';
|
|
5
|
+
import { isCmsUi } from '@plone/volto/helpers/Url/Url';
|
|
6
6
|
import config from '@plone/volto/registry';
|
|
7
7
|
|
|
8
8
|
import LanguagePreference from './LanguagePreference';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
2
|
import { Icon, Button } from 'semantic-ui-react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import
|
|
4
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
5
5
|
|
|
6
6
|
const TranslationInfo = (props) => {
|
|
7
7
|
const { defaultLanguage, currentLanguage } = props;
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
17
17
|
import { Container, Grid, Image, Icon } from 'semantic-ui-react';
|
|
18
18
|
import { getFilteredBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
19
|
-
import
|
|
19
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
20
20
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
21
21
|
|
|
22
22
|
const PhotoGallery = ({ content }) => {
|
|
@@ -45,9 +45,11 @@ jest.mock('@plone/volto/components/theme/View/RenderBlocks', () => () => (
|
|
|
45
45
|
<div data-testid="render-blocks" />
|
|
46
46
|
));
|
|
47
47
|
|
|
48
|
-
jest.mock(
|
|
49
|
-
UniversalLink
|
|
50
|
-
|
|
48
|
+
jest.mock(
|
|
49
|
+
'@plone/volto/components/manage/UniversalLink/UniversalLink',
|
|
50
|
+
() =>
|
|
51
|
+
({ href, children }) => <a href={href}>{children}</a>,
|
|
52
|
+
);
|
|
51
53
|
|
|
52
54
|
jest.mock('semantic-ui-react', () => ({
|
|
53
55
|
...jest.requireActual('semantic-ui-react'),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
5
5
|
import { AccordionList } from '@eeacms/volto-cca-policy/components';
|
|
6
6
|
|
|
7
7
|
function ArchivedVersionListing({ content }) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import { IntlProvider } from 'react-intl';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { render, screen } from '@testing-library/react';
|
|
6
6
|
import ArchivedVersionListing from './ArchivedVersionListing';
|
|
7
7
|
|
|
8
|
-
jest.mock('@plone/volto/helpers', () => ({
|
|
8
|
+
jest.mock('@plone/volto/helpers/Url/Url', () => ({
|
|
9
9
|
flattenToAppURL: (url) => url.replace('http://localhost:3000', ''),
|
|
10
10
|
}));
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { Message } from 'semantic-ui-react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
5
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
6
6
|
|
|
7
7
|
function ArchivedVersionNotice({ content }) {
|
|
8
8
|
if (content?.review_state !== 'archived') return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import { render } from '@testing-library/react';
|
|
7
7
|
import ArchivedVersionNotice from './ArchivedVersionNotice';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MemoryRouter } from 'react-router-dom';
|
|
2
2
|
import configureStore from 'redux-mock-store';
|
|
3
|
-
import '@testing-library/jest-dom
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
4
|
import { render, waitFor } from '@testing-library/react';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import { BrokenLinksComponent } from './BrokenLinks';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import CaseStudyView from './CaseStudyView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import DatabaseItemView from './DatabaseItemView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
@@ -4,7 +4,7 @@ import { filterBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
|
4
4
|
import { HTMLField, SubjectTags } from '@eeacms/volto-cca-policy/helpers';
|
|
5
5
|
import { PortalMessage } from '@eeacms/volto-cca-policy/components';
|
|
6
6
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
7
|
-
import
|
|
7
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
8
8
|
|
|
9
9
|
const DescriptionText = ({ content }) => {
|
|
10
10
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import ProjectView from './ProjectView';
|
|
7
7
|
import renderer from 'react-test-renderer';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
5
5
|
|
|
6
6
|
function VersionsGroup({ content }) {
|
|
7
7
|
const relatedItems = content?.relatedItems || [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import { render } from '@testing-library/react';
|
|
7
7
|
import VersionsGroup from './VersionsGroup';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from './utils';
|
|
10
10
|
|
|
11
11
|
import { injectIntl } from 'react-intl';
|
|
12
|
-
import
|
|
12
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
13
13
|
|
|
14
14
|
const SelectElement = (props) => {
|
|
15
15
|
const { element, handleSelect } = props;
|
|
@@ -4,7 +4,7 @@ import { Input, Label, Button } from 'semantic-ui-react';
|
|
|
4
4
|
import config from '@plone/volto/registry';
|
|
5
5
|
|
|
6
6
|
import { injectIntl } from 'react-intl';
|
|
7
|
-
import
|
|
7
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
8
8
|
import MapContainer from '@eeacms/volto-cca-policy/components/theme/Widgets/GeolocationWidgetMapContainer';
|
|
9
9
|
|
|
10
10
|
const defaultValue = {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import configureStore from 'redux-mock-store';
|
|
4
4
|
import { render } from '@testing-library/react';
|
|
5
|
-
import '@testing-library/jest-dom
|
|
5
|
+
import '@testing-library/jest-dom';
|
|
6
6
|
import { Provider } from 'react-intl-redux';
|
|
7
7
|
|
|
8
8
|
import GeolocationWidget from './GeolocationWidget';
|
|
@@ -7,13 +7,12 @@ import useLinkEditor from '@plone/volto/components/manage/AnchorPlugin/useLinkEd
|
|
|
7
7
|
import withObjectBrowser from '@plone/volto/components/manage/Sidebar/ObjectBrowser';
|
|
8
8
|
import NativeImageWidget from '@plone/volto/components/manage/Widgets/ImageWidget';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
isInternalURL,
|
|
13
|
-
validateFileUploadSize,
|
|
14
|
-
} from '@plone/volto/helpers';
|
|
10
|
+
import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers/Url/Url';
|
|
11
|
+
import { validateFileUploadSize } from '@plone/volto/helpers/FormValidation/FormValidation';
|
|
15
12
|
import { readAsDataURL } from 'promise-file-reader';
|
|
16
|
-
import
|
|
13
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
14
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
15
|
+
import Image from '@plone/volto/components/theme/Image/Image';
|
|
17
16
|
|
|
18
17
|
import imageBlockSVG from '@plone/volto/components/manage/Blocks/Image/block-image.svg';
|
|
19
18
|
import deleteSVG from '@plone/volto/icons/delete.svg';
|
|
@@ -431,7 +430,7 @@ const UnconnectedImageInput = (props) => {
|
|
|
431
430
|
)}
|
|
432
431
|
{error && <Message negative>{error}</Message>}
|
|
433
432
|
{previewSrc ? (
|
|
434
|
-
<
|
|
433
|
+
<Image className={props.className} src={previewSrc} alt="" />
|
|
435
434
|
) : (
|
|
436
435
|
<Message warning>
|
|
437
436
|
Existing value found, but no image preview could be resolved.
|
|
@@ -470,7 +469,7 @@ const UnconnectedImageInput = (props) => {
|
|
|
470
469
|
</Dimmer>
|
|
471
470
|
)}
|
|
472
471
|
{error && <Message negative>{error}</Message>}
|
|
473
|
-
<
|
|
472
|
+
<Image src={imageBlockSVG} alt="" className="placeholder" />
|
|
474
473
|
<p>{intl.formatMessage(messages.addImage)}</p>
|
|
475
474
|
{toolbar}
|
|
476
475
|
</Message>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router-dom';
|
|
3
3
|
import { render } from '@testing-library/react';
|
|
4
|
-
import '@testing-library/jest-dom
|
|
4
|
+
import '@testing-library/jest-dom';
|
|
5
5
|
import { Provider } from 'react-intl-redux';
|
|
6
6
|
import configureStore from 'redux-mock-store';
|
|
7
7
|
|
|
@@ -11,9 +11,11 @@ import { Button, Image, Dimmer } from 'semantic-ui-react';
|
|
|
11
11
|
import { readAsDataURL } from 'promise-file-reader';
|
|
12
12
|
import { injectIntl } from 'react-intl';
|
|
13
13
|
import deleteSVG from '@plone/volto/icons/delete.svg';
|
|
14
|
-
import
|
|
14
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
15
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
15
16
|
import loadable from '@loadable/component';
|
|
16
|
-
import { flattenToAppURL
|
|
17
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
18
|
+
import { validateFileUploadSize } from '@plone/volto/helpers/FormValidation/FormValidation';
|
|
17
19
|
import { defineMessages, useIntl } from 'react-intl';
|
|
18
20
|
|
|
19
21
|
const imageMimetypes = [
|
|
@@ -104,8 +106,8 @@ const FileWidget = (props) => {
|
|
|
104
106
|
const imgsrc = value?.download
|
|
105
107
|
? `${flattenToAppURL(value?.download)}?id=${Date.now()}`
|
|
106
108
|
: value?.data
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
? `data:${value['content-type']};${value.encoding},${value.data}`
|
|
110
|
+
: null;
|
|
109
111
|
|
|
110
112
|
/**
|
|
111
113
|
* Drop handler
|