@eeacms/volto-cca-policy 0.3.129 → 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.
Files changed (182) hide show
  1. package/.eslintrc.js +7 -7
  2. package/CHANGELOG.md +19 -13
  3. package/docker-compose.yml +16 -16
  4. package/jest-addon.config.js +25 -420
  5. package/package.json +1 -1
  6. package/src/components/MigrationButtons.jsx +5 -1
  7. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationEdit.jsx +2 -1
  8. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.jsx +10 -4
  9. package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.test.jsx +87 -35
  10. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockEdit.jsx +1 -1
  11. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.test.jsx +1 -1
  12. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockEdit.jsx +1 -1
  13. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.jsx +1 -1
  14. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.test.jsx +1 -1
  15. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/C3SIndicatorsOverviewBlockEdit.jsx +1 -1
  16. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +0 -20
  17. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerEdit.test.jsx +1 -1
  18. package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerView.js → CaseStudyExplorerView.jsx} +1 -1
  19. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.test.jsx +2 -2
  20. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.test.jsx +1 -1
  21. package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.test.jsx +1 -1
  22. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +2 -1
  23. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.test.jsx +1 -1
  24. package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +0 -4
  25. package/src/components/manage/Blocks/CaseStudyExplorer/utils.js +0 -30
  26. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
  27. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.jsx +3 -2
  28. package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.test.jsx +1 -1
  29. package/src/components/manage/Blocks/ContentLinks/ContentLinksEdit.jsx +1 -1
  30. package/src/components/manage/Blocks/ContentLinks/ContentLinksView.jsx +1 -1
  31. package/src/components/manage/Blocks/ContentLinks/ContentLinksView.test.jsx +1 -1
  32. package/src/components/manage/Blocks/ContentLinks/DropdownListView.jsx +1 -1
  33. package/src/components/manage/Blocks/ContentLinks/DropdownListView.test.jsx +1 -1
  34. package/src/components/manage/Blocks/CountryMapHeatIndex/Filter.test.jsx +1 -1
  35. package/src/components/manage/Blocks/CountryMapHeatIndex/{View.js → View.jsx} +14 -10
  36. package/src/components/manage/Blocks/CountryMapHeatIndex/mapstyle.js +1 -3
  37. package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryEdit.jsx +2 -1
  38. package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +4 -3
  39. package/src/components/manage/Blocks/CountryMapProfile/Filter.test.jsx +1 -1
  40. package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -12
  41. package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
  42. package/src/components/manage/Blocks/CountryProfileDetail/{CountryTabPane.js → CountryTabPane.jsx} +11 -4
  43. package/src/components/manage/Blocks/CountryProfileDetail/CountryTabPane.test.jsx +1 -1
  44. package/src/components/manage/Blocks/CountryProfileDetail/{View.js → View.jsx} +20 -15
  45. package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +134 -20
  46. package/src/components/manage/Blocks/CountryProfileDetail/index.js +0 -1
  47. package/src/components/manage/Blocks/DataConnectedEmbedBlock/index.js +0 -2
  48. package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +1 -1
  49. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentEdit.jsx +3 -3
  50. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.jsx +2 -2
  51. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.test.jsx +1 -1
  52. package/src/components/manage/Blocks/FlourishEmbedBlock/FlourishEmbedBlockEdit.jsx +1 -1
  53. package/src/components/manage/Blocks/Listing/DropdownListingView.jsx +1 -1
  54. package/src/components/manage/Blocks/Listing/EventAccordionListingView.jsx +1 -1
  55. package/src/components/manage/Blocks/Listing/EventAccordionListingView.test.jsx +5 -3
  56. package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +2 -1
  57. package/src/components/manage/Blocks/Listing/EventCardsListingView.test.jsx +10 -4
  58. package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -2
  59. package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -1
  60. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.jsx +1 -1
  61. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.test.jsx +5 -3
  62. package/src/components/manage/Blocks/Listing/SimpleItemListingView.jsx +2 -2
  63. package/src/components/manage/Blocks/Listing/SimpleItemListingView.test.jsx +6 -4
  64. package/src/components/manage/Blocks/RASTBlock/ContextNavigation.jsx +0 -1
  65. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -1
  66. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.test.jsx +1 -1
  67. package/src/components/manage/Blocks/RASTBlock/RASTAccordionContent.jsx +2 -2
  68. package/src/components/manage/Blocks/RASTBlock/RASTEdit.jsx +1 -1
  69. package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +1 -1
  70. package/src/components/manage/Blocks/RASTBlock/RASTMap.test.jsx +1 -1
  71. package/src/components/manage/Blocks/RASTBlock/RASTView.jsx +1 -1
  72. package/src/components/manage/Blocks/ReadMore/ReadMoreEdit.jsx +1 -1
  73. package/src/components/manage/Blocks/ReadMore/ReadMoreView.jsx +1 -1
  74. package/src/components/manage/Blocks/ReadMore/ReadMoreView.test.jsx +1 -1
  75. package/src/components/manage/Blocks/RedirectBlock/{RedirectBlock.test.js → RedirectBlock.test.jsx} +1 -1
  76. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
  77. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +2 -2
  78. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentEdit.jsx +1 -1
  79. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.jsx +1 -1
  80. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.test.jsx +1 -1
  81. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentEdit.jsx +1 -1
  82. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.jsx +1 -1
  83. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.test.jsx +1 -1
  84. package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -2
  85. package/src/components/manage/Blocks/TabsBlock/Spotlight.test.jsx +7 -1
  86. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectEdit.jsx +1 -1
  87. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.jsx +1 -1
  88. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.test.jsx +1 -1
  89. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.jsx +5 -2
  90. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.test.jsx +3 -6
  91. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx +1 -1
  92. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx +1 -1
  93. package/src/components/theme/ASTNavigation/ASTAccordion.test.jsx +1 -1
  94. package/src/components/theme/ASTNavigation/ASTLogoMap.jsx +1 -1
  95. package/src/components/theme/ASTNavigation/ASTLogoMap.test.jsx +1 -1
  96. package/src/components/theme/ASTNavigation/ASTNavigation.jsx +9 -5
  97. package/src/components/theme/ASTNavigation/ASTNavigation.test.jsx +323 -0
  98. package/src/components/theme/ASTNavigation/{utils.js → LinkWrap.jsx} +4 -9
  99. package/src/components/theme/ASTNavigation/UASTLogoMap.jsx +1 -1
  100. package/src/components/theme/ASTNavigation/UASTLogoMap.test.jsx +1 -1
  101. package/src/components/theme/Header/Header.jsx +5 -5
  102. package/src/components/theme/Header/LanguageSwitch.jsx +5 -5
  103. package/src/components/theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx +1 -1
  104. package/src/components/theme/TranslationDisclaimer/TranslationDisclaimer.jsx +1 -1
  105. package/src/components/theme/TranslationDisclaimer/TranslationInfo.jsx +1 -1
  106. package/src/components/theme/Views/AdaptationOptionView.jsx +1 -1
  107. package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -3
  108. package/src/components/theme/Views/ArchivedVersionListing.jsx +1 -1
  109. package/src/components/theme/Views/ArchivedVersionListing.test.jsx +2 -2
  110. package/src/components/theme/Views/ArchivedVersionNotice.jsx +1 -1
  111. package/src/components/theme/Views/ArchivedVersionNotice.test.jsx +1 -1
  112. package/src/components/theme/Views/BrokenLinks.jsx +1 -1
  113. package/src/components/theme/Views/BrokenLinks.test.jsx +1 -1
  114. package/src/components/theme/Views/CaseStudyView.test.jsx +1 -1
  115. package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -1
  116. package/src/components/theme/Views/NewsItemView.jsx +1 -1
  117. package/src/components/theme/Views/ProjectView.test.jsx +1 -1
  118. package/src/components/theme/Views/VersionsGroup.jsx +1 -1
  119. package/src/components/theme/Views/VersionsGroup.test.jsx +1 -1
  120. package/src/components/theme/Widgets/GeocharsWidget.jsx +1 -1
  121. package/src/components/theme/Widgets/GeolocationWidget.jsx +1 -1
  122. package/src/components/theme/Widgets/GeolocationWidget.test.jsx +1 -1
  123. package/src/components/theme/Widgets/ImageWidget.jsx +7 -8
  124. package/src/components/theme/Widgets/ImageWidget.test.jsx +1 -1
  125. package/src/components/theme/Widgets/PromotionalImageWidget.jsx +6 -4
  126. package/src/components/theme/Widgets/utils.js +1 -1
  127. package/src/constants.js +538 -2
  128. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/Header.jsx +1 -1
  129. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +52 -24
  130. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +1 -0
  131. package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground.jsx +2 -1
  132. package/src/customizations/@eeacms/volto-listing-block/blocks/Listing/item-templates/SimpleItemTemplates.jsx +2 -2
  133. package/src/customizations/@eeacms/volto-listing-block/components/UniversalCard/fragments/CardTitle.jsx +1 -1
  134. package/src/customizations/@plone/volto-slate/blocks/Table/TableBlockView.jsx +3 -3
  135. package/src/customizations/@plone/volto-slate/blocks/Text/{index.js → index.jsx} +2 -21
  136. package/src/customizations/@plone/volto-slate/editor/extensions/normalizeNode.js +1 -1
  137. package/src/customizations/@plone/volto-slate/utils/blocks.js +11 -8
  138. package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -2
  139. package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -2
  140. package/src/customizations/@plone-collective/volto-authomatic/components/Login/Login.jsx +7 -4
  141. package/src/customizations/@plone-collective/volto-rss-provider/components/RSSFeedView.jsx +5 -8
  142. package/src/customizations/@plone-collective/volto-rss-provider/express-middleware.js +2 -1
  143. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +3 -3
  144. package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +1 -1
  145. package/src/customizations/volto/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
  146. package/src/customizations/volto/components/manage/Controlpanels/ContentTypeLayout.jsx +12 -14
  147. package/src/customizations/volto/components/manage/Display/Display.jsx +10 -5
  148. package/src/customizations/volto/components/manage/Multilingual/TranslationObject.jsx +7 -6
  149. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +4 -1
  150. package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +12 -8
  151. package/src/customizations/volto/components/theme/App/App.jsx +16 -23
  152. package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +3 -2
  153. package/src/customizations/volto/components/theme/View/DefaultView.jsx +5 -4
  154. package/src/customizations/volto/components/theme/View/LinkView.jsx +2 -2
  155. package/src/customizations/volto/components/theme/View/View.jsx +10 -11
  156. package/src/customizations/volto/helpers/Url/Url-old.js +2 -1
  157. package/src/customizations/volto/middleware/api.js +6 -4
  158. package/src/customizations/volto/reducers/actions/actions.js +2 -5
  159. package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +3 -6
  160. package/src/customizations/volto/reducers/navigation/navigation.js +3 -6
  161. package/src/customizations/volto/server.jsx +9 -8
  162. package/src/express-middleware.js +1 -1
  163. package/src/helpers/ContentMetadata.jsx +4 -4
  164. package/src/helpers/Utils.jsx +5 -5
  165. package/src/helpers/index.js +1 -8
  166. package/src/hocs/index.js +2 -0
  167. package/src/index.js +9 -7
  168. package/src/search/common.js +4 -41
  169. package/src/search/utils.test.js +1 -1
  170. package/src/search/vocabulary.js +2 -2
  171. package/src/store/reducers/physical-breadcrumbs.js +2 -2
  172. package/src/utils.js +1 -1
  173. package/src/helpers/Constants.jsx +0 -535
  174. package/theme/assets/images/administrative_support_service.png +0 -0
  175. /package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerEdit.js → CaseStudyExplorerEdit.jsx} +0 -0
  176. /package/src/components/manage/Blocks/CountryMapHeatIndex/{Edit.js → Edit.jsx} +0 -0
  177. /package/src/components/manage/Blocks/CountryMapProfile/{Edit.js → Edit.jsx} +0 -0
  178. /package/src/components/manage/Blocks/CountryProfileDetail/{Edit.js → Edit.jsx} +0 -0
  179. /package/src/components/manage/Blocks/ReadMore/{schema.js → schema.jsx} +0 -0
  180. /package/src/helpers/{clientOnly.js → clientOnly.jsx} +0 -0
  181. /package/src/{components/manage/Blocks/withResponsiveContainer.js → hocs/withResponsiveContainer.jsx} +0 -0
  182. /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 { UniversalLink } from '@plone/volto/components';
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
- BodyClass,
18
- } from '@plone/volto/helpers';
19
- import { getNavigation } from '@plone/volto/actions';
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 { find } from 'lodash';
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.non_eu_langs.indexOf(item.code) === -1,
78
+ (item) => !eea.NON_EU_LANGS.includes(item.code),
79
79
  );
80
80
 
81
- const nonEuLanguages = eea.languages.filter(
82
- (item) => eea.non_eu_langs.indexOf(item.code) !== -1,
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 { UniversalLink } from '@plone/volto/components';
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 { UniversalLink } from '@plone/volto/components';
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('@plone/volto/components', () => ({
49
- UniversalLink: ({ href, children }) => <a href={href}>{children}</a>,
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/extend-expect';
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/extend-expect';
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,4 +1,4 @@
1
- import { expandToBackendURL } from '@plone/volto/helpers';
1
+ import { expandToBackendURL } from '@plone/volto/helpers/Url/Url';
2
2
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
3
3
  import React from 'react';
4
4
  import {
@@ -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/extend-expect';
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/extend-expect';
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/extend-expect';
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 { UniversalLink } from '@plone/volto/components';
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/extend-expect';
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/extend-expect';
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 { FormFieldWrapper } from '@plone/volto/components';
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 { FormFieldWrapper } from '@plone/volto/components';
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/extend-expect';
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
- flattenToAppURL,
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 { FormFieldWrapper, Icon } from '@plone/volto/components';
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
- <img className={props.className} src={previewSrc} alt="" />
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
- <img src={imageBlockSVG} alt="" className="placeholder" />
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/extend-expect';
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 { Icon, FormFieldWrapper } from '@plone/volto/components';
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, validateFileUploadSize } from '@plone/volto/helpers';
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
- ? `data:${value['content-type']};${value.encoding},${value.data}`
108
- : null;
109
+ ? `data:${value['content-type']};${value.encoding},${value.data}`
110
+ : null;
109
111
 
110
112
  /**
111
113
  * Drop handler
@@ -3,7 +3,7 @@ import {
3
3
  BIOREGIONS,
4
4
  SUBNATIONAL_REGIONS,
5
5
  EU_COUNTRIES,
6
- } from '@eeacms/volto-cca-policy/helpers';
6
+ } from '@eeacms/volto-cca-policy/constants';
7
7
 
8
8
  export const WIDGET_COUNTRIES = Object.entries(ACE_COUNTRIES)
9
9
  .map(([code, name]) => ({