@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.
Files changed (181) hide show
  1. package/.eslintrc.js +7 -7
  2. package/CHANGELOG.md +9 -14
  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/CountryProfileDetail/{CountryTabPane.js → CountryTabPane.jsx} +11 -4
  42. package/src/components/manage/Blocks/CountryProfileDetail/CountryTabPane.test.jsx +1 -1
  43. package/src/components/manage/Blocks/CountryProfileDetail/{View.js → View.jsx} +20 -15
  44. package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +134 -20
  45. package/src/components/manage/Blocks/CountryProfileDetail/index.js +0 -1
  46. package/src/components/manage/Blocks/DataConnectedEmbedBlock/index.js +0 -2
  47. package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +1 -1
  48. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentEdit.jsx +3 -3
  49. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.jsx +2 -2
  50. package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.test.jsx +1 -1
  51. package/src/components/manage/Blocks/FlourishEmbedBlock/FlourishEmbedBlockEdit.jsx +1 -1
  52. package/src/components/manage/Blocks/Listing/DropdownListingView.jsx +1 -1
  53. package/src/components/manage/Blocks/Listing/EventAccordionListingView.jsx +1 -1
  54. package/src/components/manage/Blocks/Listing/EventAccordionListingView.test.jsx +5 -3
  55. package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +2 -1
  56. package/src/components/manage/Blocks/Listing/EventCardsListingView.test.jsx +10 -4
  57. package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -2
  58. package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -1
  59. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.jsx +1 -1
  60. package/src/components/manage/Blocks/Listing/SimpleCardsListingView.test.jsx +5 -3
  61. package/src/components/manage/Blocks/Listing/SimpleItemListingView.jsx +2 -2
  62. package/src/components/manage/Blocks/Listing/SimpleItemListingView.test.jsx +6 -4
  63. package/src/components/manage/Blocks/RASTBlock/ContextNavigation.jsx +0 -1
  64. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -1
  65. package/src/components/manage/Blocks/RASTBlock/RASTAccordion.test.jsx +1 -1
  66. package/src/components/manage/Blocks/RASTBlock/RASTAccordionContent.jsx +2 -2
  67. package/src/components/manage/Blocks/RASTBlock/RASTEdit.jsx +1 -1
  68. package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +1 -1
  69. package/src/components/manage/Blocks/RASTBlock/RASTMap.test.jsx +1 -1
  70. package/src/components/manage/Blocks/RASTBlock/RASTView.jsx +1 -1
  71. package/src/components/manage/Blocks/ReadMore/ReadMoreEdit.jsx +1 -1
  72. package/src/components/manage/Blocks/ReadMore/ReadMoreView.jsx +1 -1
  73. package/src/components/manage/Blocks/ReadMore/ReadMoreView.test.jsx +1 -1
  74. package/src/components/manage/Blocks/RedirectBlock/{RedirectBlock.test.js → RedirectBlock.test.jsx} +1 -1
  75. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
  76. package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +2 -2
  77. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentEdit.jsx +1 -1
  78. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.jsx +1 -1
  79. package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.test.jsx +1 -1
  80. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentEdit.jsx +1 -1
  81. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.jsx +1 -1
  82. package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.test.jsx +1 -1
  83. package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -2
  84. package/src/components/manage/Blocks/TabsBlock/Spotlight.test.jsx +7 -1
  85. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectEdit.jsx +1 -1
  86. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.jsx +1 -1
  87. package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.test.jsx +1 -1
  88. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.jsx +5 -2
  89. package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.test.jsx +3 -6
  90. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx +1 -1
  91. package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx +1 -1
  92. package/src/components/theme/ASTNavigation/ASTAccordion.test.jsx +1 -1
  93. package/src/components/theme/ASTNavigation/ASTLogoMap.jsx +1 -1
  94. package/src/components/theme/ASTNavigation/ASTLogoMap.test.jsx +1 -1
  95. package/src/components/theme/ASTNavigation/ASTNavigation.jsx +9 -5
  96. package/src/components/theme/ASTNavigation/ASTNavigation.test.jsx +323 -0
  97. package/src/components/theme/ASTNavigation/{utils.js → LinkWrap.jsx} +4 -9
  98. package/src/components/theme/ASTNavigation/UASTLogoMap.jsx +1 -1
  99. package/src/components/theme/ASTNavigation/UASTLogoMap.test.jsx +1 -1
  100. package/src/components/theme/Header/Header.jsx +5 -5
  101. package/src/components/theme/Header/LanguageSwitch.jsx +5 -5
  102. package/src/components/theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx +1 -1
  103. package/src/components/theme/TranslationDisclaimer/TranslationDisclaimer.jsx +1 -1
  104. package/src/components/theme/TranslationDisclaimer/TranslationInfo.jsx +1 -1
  105. package/src/components/theme/Views/AdaptationOptionView.jsx +1 -1
  106. package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -3
  107. package/src/components/theme/Views/ArchivedVersionListing.jsx +1 -1
  108. package/src/components/theme/Views/ArchivedVersionListing.test.jsx +2 -2
  109. package/src/components/theme/Views/ArchivedVersionNotice.jsx +1 -1
  110. package/src/components/theme/Views/ArchivedVersionNotice.test.jsx +1 -1
  111. package/src/components/theme/Views/BrokenLinks.jsx +1 -1
  112. package/src/components/theme/Views/BrokenLinks.test.jsx +1 -1
  113. package/src/components/theme/Views/CaseStudyView.test.jsx +1 -1
  114. package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -1
  115. package/src/components/theme/Views/NewsItemView.jsx +1 -1
  116. package/src/components/theme/Views/ProjectView.test.jsx +1 -1
  117. package/src/components/theme/Views/VersionsGroup.jsx +1 -1
  118. package/src/components/theme/Views/VersionsGroup.test.jsx +1 -1
  119. package/src/components/theme/Widgets/GeocharsWidget.jsx +1 -1
  120. package/src/components/theme/Widgets/GeolocationWidget.jsx +1 -1
  121. package/src/components/theme/Widgets/GeolocationWidget.test.jsx +1 -1
  122. package/src/components/theme/Widgets/ImageWidget.jsx +7 -8
  123. package/src/components/theme/Widgets/ImageWidget.test.jsx +1 -1
  124. package/src/components/theme/Widgets/PromotionalImageWidget.jsx +6 -4
  125. package/src/components/theme/Widgets/utils.js +1 -1
  126. package/src/constants.js +538 -2
  127. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/Header.jsx +1 -1
  128. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +52 -24
  129. package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +1 -0
  130. package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground.jsx +2 -1
  131. package/src/customizations/@eeacms/volto-listing-block/blocks/Listing/item-templates/SimpleItemTemplates.jsx +2 -2
  132. package/src/customizations/@eeacms/volto-listing-block/components/UniversalCard/fragments/CardTitle.jsx +1 -1
  133. package/src/customizations/@plone/volto-slate/blocks/Table/TableBlockView.jsx +3 -3
  134. package/src/customizations/@plone/volto-slate/blocks/Text/{index.js → index.jsx} +2 -21
  135. package/src/customizations/@plone/volto-slate/editor/extensions/normalizeNode.js +1 -1
  136. package/src/customizations/@plone/volto-slate/utils/blocks.js +11 -8
  137. package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -2
  138. package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -2
  139. package/src/customizations/@plone-collective/volto-authomatic/components/Login/Login.jsx +7 -4
  140. package/src/customizations/@plone-collective/volto-rss-provider/components/RSSFeedView.jsx +5 -8
  141. package/src/customizations/@plone-collective/volto-rss-provider/express-middleware.js +2 -1
  142. package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +3 -3
  143. package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +1 -1
  144. package/src/customizations/volto/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
  145. package/src/customizations/volto/components/manage/Controlpanels/ContentTypeLayout.jsx +12 -14
  146. package/src/customizations/volto/components/manage/Display/Display.jsx +10 -5
  147. package/src/customizations/volto/components/manage/Multilingual/TranslationObject.jsx +7 -6
  148. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +4 -1
  149. package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +12 -8
  150. package/src/customizations/volto/components/theme/App/App.jsx +16 -23
  151. package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +3 -2
  152. package/src/customizations/volto/components/theme/View/DefaultView.jsx +5 -4
  153. package/src/customizations/volto/components/theme/View/LinkView.jsx +2 -2
  154. package/src/customizations/volto/components/theme/View/View.jsx +10 -11
  155. package/src/customizations/volto/helpers/Url/Url-old.js +2 -1
  156. package/src/customizations/volto/middleware/api.js +6 -4
  157. package/src/customizations/volto/reducers/actions/actions.js +2 -5
  158. package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +3 -6
  159. package/src/customizations/volto/reducers/navigation/navigation.js +3 -6
  160. package/src/customizations/volto/server.jsx +9 -8
  161. package/src/express-middleware.js +1 -1
  162. package/src/helpers/ContentMetadata.jsx +4 -4
  163. package/src/helpers/Utils.jsx +5 -5
  164. package/src/helpers/index.js +1 -8
  165. package/src/hocs/index.js +2 -0
  166. package/src/index.js +9 -7
  167. package/src/search/common.js +4 -41
  168. package/src/search/utils.test.js +1 -1
  169. package/src/search/vocabulary.js +2 -2
  170. package/src/store/reducers/physical-breadcrumbs.js +2 -2
  171. package/src/utils.js +1 -1
  172. package/src/helpers/Constants.jsx +0 -535
  173. package/theme/assets/images/administrative_support_service.png +0 -0
  174. /package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerEdit.js → CaseStudyExplorerEdit.jsx} +0 -0
  175. /package/src/components/manage/Blocks/CountryMapHeatIndex/{Edit.js → Edit.jsx} +0 -0
  176. /package/src/components/manage/Blocks/CountryMapProfile/{Edit.js → Edit.jsx} +0 -0
  177. /package/src/components/manage/Blocks/CountryProfileDetail/{Edit.js → Edit.jsx} +0 -0
  178. /package/src/components/manage/Blocks/ReadMore/{schema.js → schema.jsx} +0 -0
  179. /package/src/helpers/{clientOnly.js → clientOnly.jsx} +0 -0
  180. /package/src/{components/manage/Blocks/withResponsiveContainer.js → hocs/withResponsiveContainer.jsx} +0 -0
  181. /package/src/{components/manage/Blocks → hocs}/withVisibilitySensor.jsx +0 -0
@@ -7,13 +7,14 @@ import React, { Component } from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { compose } from 'redux';
9
9
  import { connect } from 'react-redux';
10
- import { asyncConnect, Helmet } from '@plone/volto/helpers';
10
+ import { asyncConnect } from '@plone/volto/helpers/AsyncConnect';
11
+ import Helmet from '@plone/volto/helpers/Helmet/Helmet';
11
12
  import { defineMessages, injectIntl } from 'react-intl';
12
13
  import { Container } from 'semantic-ui-react';
13
14
  import { Link } from 'react-router-dom';
14
15
  import config from '@plone/volto/registry';
15
16
  import { BannerTitle } from '@eeacms/volto-cca-policy/components';
16
- import { getNavigation } from '@plone/volto/actions';
17
+ import { getNavigation } from '@plone/volto/actions/navigation/navigation';
17
18
 
18
19
  const messages = defineMessages({
19
20
  Sitemap: {
@@ -14,12 +14,13 @@ import {
14
14
  Label,
15
15
  } from 'semantic-ui-react';
16
16
  import config from '@plone/volto/registry';
17
- import { getSchema } from '@plone/volto/actions';
17
+ import { getSchema } from '@plone/volto/actions/schema/schema';
18
18
  import { getWidget } from '@plone/volto/helpers/Widget/utils';
19
19
 
20
- import { hasBlocksData, getBaseUrl } from '@plone/volto/helpers';
20
+ import { hasBlocksData } from '@plone/volto/helpers/Blocks/Blocks';
21
+ import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
21
22
  import { useDispatch, useSelector } from 'react-redux';
22
- import { RenderBlocks } from '@plone/volto/components';
23
+ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
23
24
  import ContextNavigation from '@plone/volto/components/theme/Navigation/ContextNavigation';
24
25
  import {
25
26
  BannerTitle,
@@ -27,7 +28,7 @@ import {
27
28
  PortalMessage,
28
29
  } from '@eeacms/volto-cca-policy/components';
29
30
 
30
- import { isEqual } from 'lodash';
31
+ import isEqual from 'lodash/isEqual';
31
32
 
32
33
  /**
33
34
  * Component to display the default view.
@@ -5,9 +5,9 @@
5
5
 
6
6
  import React, { Component } from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
8
+ import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers/Url/Url';
9
9
  import { Container as SemanticContainer } from 'semantic-ui-react';
10
- import { UniversalLink } from '@plone/volto/components';
10
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
11
11
  import { Redirect } from 'react-router-dom';
12
12
  import { FormattedMessage } from 'react-intl';
13
13
  import config from '@plone/volto/registry';
@@ -12,22 +12,21 @@ import { Portal } from 'react-portal';
12
12
  import { injectIntl } from 'react-intl';
13
13
  import qs from 'query-string';
14
14
 
15
- import {
16
- ContentMetadataTags,
17
- Comments,
18
- Tags,
19
- Toolbar,
20
- } from '@plone/volto/components';
15
+ import ContentMetadataTags from '@plone/volto/components/theme/ContentMetadataTags/ContentMetadataTags';
16
+ import Comments from '@plone/volto/components/theme/Comments/Comments';
17
+ import Tags from '@plone/volto/components/theme/Tags/Tags';
18
+ import Toolbar from '@plone/volto/components/manage/Toolbar/Toolbar';
21
19
  import { AlternateHrefLangs } from '@plone/volto/components/theme/AlternateHrefLangs/AlternateHrefLangs';
22
- import { listActions, getContent } from '@plone/volto/actions';
20
+ import { listActions } from '@plone/volto/actions/actions/actions';
21
+ import { getContent } from '@plone/volto/actions/content/content';
22
+ import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
23
23
  import {
24
- BodyClass,
25
24
  getBaseUrl,
26
25
  flattenToAppURL,
27
- getLayoutFieldname,
28
- hasApiExpander,
29
26
  isInternalURL,
30
- } from '@plone/volto/helpers';
27
+ } from '@plone/volto/helpers/Url/Url';
28
+ import { getLayoutFieldname } from '@plone/volto/helpers/Content/Content';
29
+ import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
31
30
 
32
31
  import config from '@plone/volto/registry';
33
32
 
@@ -3,7 +3,8 @@
3
3
  * @module helpers/Url
4
4
  */
5
5
 
6
- import { last, memoize } from 'lodash';
6
+ import last from 'lodash/last';
7
+ import memoize from 'lodash/memoize';
7
8
  import {
8
9
  urlRegex,
9
10
  telRegex,
@@ -5,7 +5,9 @@
5
5
 
6
6
  import Cookies from 'universal-cookie';
7
7
  import jwtDecode from 'jwt-decode';
8
- import { compact, flatten, union } from 'lodash';
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,12 @@ import {
17
19
  RESET_APIERROR,
18
20
  SET_APIERROR,
19
21
  } from '@plone/volto/constants/ActionTypes';
20
- import { changeLanguage } from '@plone/volto/actions';
22
+ import { changeLanguage } from '@plone/volto/actions/language/language';
21
23
  import {
22
24
  toGettextLang,
23
25
  toReactIntlLang,
24
- getCookieOptions,
25
- } from '@plone/volto/helpers';
26
+ } from '@plone/volto/helpers/Utils/Utils';
27
+ import { getCookieOptions } from '@plone/volto/helpers/Cookies/cookies';
26
28
  let socket = null;
27
29
 
28
30
  /**
@@ -4,11 +4,8 @@
4
4
  */
5
5
 
6
6
  import { GET_CONTENT, LIST_ACTIONS } from '@plone/volto/constants/ActionTypes';
7
- import {
8
- flattenToAppURL,
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 { map } from 'lodash';
7
- import {
8
- flattenToAppURL,
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,12 +3,9 @@
3
3
  * @module reducers/navigation/navigation
4
4
  */
5
5
 
6
- import { map } from 'lodash';
7
- import {
8
- flattenToAppURL,
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_CONTENT,
@@ -8,7 +8,7 @@ import express from 'express';
8
8
  import { renderToString } from 'react-dom/server';
9
9
  import { createMemoryHistory } from 'history';
10
10
  import { parse as parseUrl } from 'url';
11
- import { keys } from 'lodash';
11
+ import keys from 'lodash/keys';
12
12
  import locale from 'locale';
13
13
  import { detect } from 'detect-browser';
14
14
  import path from 'path';
@@ -22,22 +22,23 @@ import crypto from 'crypto';
22
22
  import routes from '@plone/volto/routes';
23
23
  import config from '@plone/volto/registry';
24
24
 
25
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
26
+ import Html from '@plone/volto/helpers/Html/Html';
27
+ import Api from '@plone/volto/helpers/Api/Api';
28
+ import { persistAuthToken } from '@plone/volto/helpers/AuthToken/AuthToken';
25
29
  import {
26
- flattenToAppURL,
27
- Html,
28
- Api,
29
- persistAuthToken,
30
30
  toBackendLang,
31
31
  toGettextLang,
32
32
  toReactIntlLang,
33
- } from '@plone/volto/helpers';
34
- import { changeLanguage } from '@plone/volto/actions';
33
+ } from '@plone/volto/helpers/Utils/Utils';
34
+ import { changeLanguage } from '@plone/volto/actions/language/language';
35
35
 
36
36
  import userSession from '@plone/volto/reducers/userSession/userSession';
37
37
 
38
38
  import ErrorPage from '@plone/volto/error';
39
39
 
40
- import languages from '@plone/volto/constants/Languages';
40
+ // import languages from '@plone/volto/constants/Languages';
41
+ import languages from '@plone/volto/constants/Languages.cjs';
41
42
 
42
43
  import configureStore from '@plone/volto/store';
43
44
  import {
@@ -1,5 +1,5 @@
1
1
  import express from 'express';
2
- import { getAPIResourceWithAuth } from '@plone/volto/helpers';
2
+ import { getAPIResourceWithAuth } from '@plone/volto/helpers/Api/APIResourceWithAuth';
3
3
 
4
4
  const HEADERS = [
5
5
  'Accept-Ranges',
@@ -2,9 +2,6 @@ import { Fragment } from 'react';
2
2
  import { Popup, Segment } from 'semantic-ui-react';
3
3
  import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
4
4
  import {
5
- ACE_COUNTRIES,
6
- BIOREGIONS,
7
- SUBNATIONAL_REGIONS,
8
5
  MetadataItemList,
9
6
  LinkedMetadataItemList,
10
7
  } from '@eeacms/volto-cca-policy/helpers';
@@ -14,9 +11,12 @@ import {
14
11
  INDICATOR,
15
12
  PUBLICATION_REPORT,
16
13
  ADAPTATION_OPTION,
14
+ ACE_COUNTRIES,
15
+ BIOREGIONS,
16
+ SUBNATIONAL_REGIONS,
17
17
  // CONTENT_TYPE_LABELS,
18
18
  } from '@eeacms/volto-cca-policy/constants';
19
- import { UniversalLink } from '@plone/volto/components';
19
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
20
20
 
21
21
  const messages = defineMessages({
22
22
  default_info_tooltip: {
@@ -1,5 +1,5 @@
1
1
  import React, { Fragment } from 'react';
2
- import { expandToBackendURL } from '@plone/volto/helpers';
2
+ import { expandToBackendURL } from '@plone/volto/helpers/Url/Url';
3
3
  import { Link } from 'react-router-dom';
4
4
  import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
5
5
  import {
@@ -11,7 +11,7 @@ import {
11
11
  Label,
12
12
  Button,
13
13
  } from 'semantic-ui-react';
14
- import { UniversalLink } from '@plone/volto/components';
14
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
15
15
  import config from '@plone/volto/registry';
16
16
  import {
17
17
  CASE_STUDY,
@@ -181,11 +181,11 @@ export const ReferenceInfo = (props) => {
181
181
  <FormattedMessage id="Contributor:" defaultMessage="Contributor:" />
182
182
  </h5>
183
183
  {contributor_list
184
- .map((item) => (
185
- <>
184
+ .map((item, contributorIndex) => (
185
+ <React.Fragment key={item.title}>
186
186
  {item.title}
187
187
  <br />
188
- </>
188
+ </React.Fragment>
189
189
  ))
190
190
  .sort()}
191
191
  {other_contributor}
@@ -1,4 +1,4 @@
1
- import { OBSERVATORY_PARTNERS } from './Constants';
1
+ import { OBSERVATORY_PARTNERS } from '@eeacms/volto-cca-policy/constants';
2
2
  export {
3
3
  HTMLField,
4
4
  ExternalLink,
@@ -16,13 +16,6 @@ export {
16
16
  LinkedMetadataItemList,
17
17
  } from './Utils';
18
18
  export { default as ContentMetadata } from './ContentMetadata';
19
- export {
20
- ACE_COUNTRIES,
21
- BIOREGIONS,
22
- OTHER_REGIONS,
23
- SUBNATIONAL_REGIONS,
24
- EU_COUNTRIES,
25
- } from './Constants';
26
19
  export { default as clientOnly } from './clientOnly';
27
20
 
28
21
  export const capitalizeFirstLetter = (str) =>
@@ -0,0 +1,2 @@
1
+ export { default as withResponsiveContainer } from './withResponsiveContainer';
2
+ export { default as withVisibilitySensor } from './withVisibilitySensor';
package/src/index.js CHANGED
@@ -1,7 +1,9 @@
1
+ /* eslint-disable react/jsx-filename-extension */
2
+
1
3
  import { defineMessages, FormattedMessage } from 'react-intl';
2
4
  import loadable from '@loadable/component';
3
5
  import { compose } from 'redux';
4
- import { Sitemap } from '@plone/volto/components';
6
+ import Sitemap from '@plone/volto/components/theme/Sitemap/Sitemap';
5
7
  import DefaultView from '@plone/volto/components/theme/View/DefaultView';
6
8
  import SelectAutoCompleteWidget from '@plone/volto/components/manage/Widgets/SelectAutoComplete';
7
9
  import {
@@ -37,8 +39,8 @@ import {
37
39
  MISSION_SIGNATORY_PROFILE,
38
40
  NEWS_ITEM,
39
41
  EVENT,
40
- eea_languages,
41
- non_eu_langs,
42
+ EEA_LANGUAGES,
43
+ NON_EU_LANGS,
42
44
  } from '@eeacms/volto-cca-policy/constants';
43
45
 
44
46
  import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
@@ -119,8 +121,8 @@ const applyConfig = (config) => {
119
121
  ];
120
122
 
121
123
  if (!config.settings.loadables.reactTable)
122
- config.settings.loadables.reactTable = loadable.lib(() =>
123
- import('@tanstack/react-table'),
124
+ config.settings.loadables.reactTable = loadable.lib(
125
+ () => import('@tanstack/react-table'),
124
126
  );
125
127
 
126
128
  config.settings.dateLocale = 'en-gb';
@@ -162,8 +164,8 @@ const applyConfig = (config) => {
162
164
  // EEA customizations
163
165
  config.settings.eea = {
164
166
  ...(config.settings.eea || {}),
165
- languages: eea_languages,
166
- non_eu_langs,
167
+ languages: EEA_LANGUAGES,
168
+ NON_EU_LANGS,
167
169
  headerOpts: {
168
170
  ...(config.settings.eea?.headerOpts || {}),
169
171
  logo: ccaLogo,
@@ -1,4 +1,6 @@
1
- import { eea_languages } from '@eeacms/volto-cca-policy/constants';
1
+ /* eslint-disable react/jsx-filename-extension */
2
+
3
+ import { EEA_LANGUAGES } from '@eeacms/volto-cca-policy/constants';
2
4
  import { booleanFacet } from '@eeacms/search';
3
5
  import { getTodayWithTime } from './utils';
4
6
 
@@ -186,51 +188,12 @@ export const language = {
186
188
  isMulti: true,
187
189
  default: (options) => {
188
190
  const { language } = options || {};
189
- // console.log('options', options);
190
-
191
191
  return {
192
192
  values: [language || 'en'],
193
193
  type: 'any',
194
194
  };
195
195
  },
196
- facetValues: eea_languages.map(({ code }) => code),
196
+ facetValues: EEA_LANGUAGES.map(({ code }) => code),
197
197
  sortOn: 'custom',
198
198
  sortOnCustomLabel: 'Alphabetical',
199
199
  };
200
-
201
- // [
202
- // 'de',
203
- // 'en',
204
- // 'es',
205
- // 'fr',
206
- // 'it',
207
- // 'pl',
208
- // // 'ar',
209
- // // 'bg',
210
- // // 'bs',
211
- // // 'cs',
212
- // // 'da',
213
- // // 'el',
214
- // // 'et',
215
- // // 'fi',
216
- // // 'ga',
217
- // // 'hr',
218
- // // 'hu',
219
- // // 'is',
220
- // // 'lt',
221
- // // 'lv',
222
- // // 'mk',
223
- // // 'mt',
224
- // // 'nl',
225
- // // 'no',
226
- // // 'pt',
227
- // // 'ro',
228
- // // 'ru',
229
- // // 'sh',
230
- // // 'sk',
231
- // // 'sl',
232
- // // 'sq',
233
- // // 'sr',
234
- // // 'sv',
235
- // // 'tr',
236
- // ]
@@ -1,5 +1,5 @@
1
1
  import { getTodayWithTime } from './utils';
2
- import '@testing-library/jest-dom/extend-expect';
2
+ import '@testing-library/jest-dom';
3
3
 
4
4
  describe('getTodayWithTime', () => {
5
5
  it('should return the current date in UTC format', () => {
@@ -1,4 +1,4 @@
1
- import { eea_languages } from '@eeacms/volto-cca-policy/constants';
1
+ import { EEA_LANGUAGES } from '@eeacms/volto-cca-policy/constants';
2
2
  import { defineMessages } from 'react-intl';
3
3
 
4
4
  defineMessages({
@@ -35,6 +35,6 @@ export const vocab = {
35
35
  },
36
36
  language: Object.assign(
37
37
  {},
38
- ...eea_languages.map(({ name, code }) => ({ [code]: name })),
38
+ ...EEA_LANGUAGES.map(({ name, code }) => ({ [code]: name })),
39
39
  ),
40
40
  };
@@ -1,5 +1,5 @@
1
- import { map } from 'lodash';
2
- import { flattenToAppURL } from '@plone/volto/helpers';
1
+ import map from 'lodash/map';
2
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
3
3
 
4
4
  import { GET_PHYSICAL_BREADCRUMBS } from '../constants';
5
5
 
package/src/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { flattenToAppURL } from '@plone/volto/helpers';
1
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
2
2
 
3
3
  export const blockAvailableInMission = (properties, block) => {
4
4
  const missionBlocks = ['mkh_map', 'rastBlock'];