@eeacms/volto-cca-policy 0.3.73 → 0.3.75

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 (66) hide show
  1. package/.eslintrc.js +8 -4
  2. package/CHANGELOG.md +68 -2
  3. package/package.json +11 -10
  4. package/src/components/manage/Blocks/ASTNavigation/schema.js +3 -1
  5. package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/schema.js +3 -1
  6. package/src/components/manage/Blocks/C3SIndicatorsListingBlock/schema.js +3 -1
  7. package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +3 -1
  8. package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +6 -1
  9. package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +1 -1
  10. package/src/components/manage/Blocks/CollectionStatistics/styles.less +1 -1
  11. package/src/components/manage/Blocks/ContentLinks/schema.js +3 -1
  12. package/src/components/manage/Blocks/CountryMapHeatIndex/euro-countries-simplified.js +46197 -0
  13. package/src/components/manage/Blocks/CountryMapHeatIndex/styles.less +1 -1
  14. package/src/components/manage/Blocks/CountryMapObservatory/mapstyle.js +28 -26
  15. package/src/components/manage/Blocks/CountryMapObservatory/styles.less +1 -1
  16. package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -5
  17. package/src/components/manage/Blocks/CountryMapProfile/euro-countries-simplified.js +46197 -0
  18. package/src/components/manage/Blocks/CountryMapProfile/styles.less +1 -1
  19. package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +1 -2
  20. package/src/components/manage/Blocks/FlourishEmbedBlock/schema.js +3 -1
  21. package/src/components/manage/Blocks/RASTBlock/schema.js +3 -1
  22. package/src/components/manage/Blocks/ReadMore/schema.js +3 -1
  23. package/src/components/manage/Blocks/RelevantAceContent/schema.js +3 -1
  24. package/src/components/manage/Blocks/SearchAceContent/schema.js +3 -1
  25. package/src/components/manage/Blocks/TransRegionSelect/schema.js +3 -1
  26. package/src/components/manage/Blocks/index.js +0 -1
  27. package/src/components/theme/ASTNavigation/ASTNavigation.jsx +2 -3
  28. package/src/components/theme/BannerTitle/BannerTitle.jsx +2 -0
  29. package/src/components/theme/Header/Header.jsx +32 -22
  30. package/src/components/theme/Header/LanguageSwitch.jsx +2 -2
  31. package/src/components/theme/Views/BrokenLinks.jsx +0 -2
  32. package/src/components/theme/Views/CcaEventView.jsx +2 -4
  33. package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -2
  34. package/src/components/theme/Widgets/GeolocationWidget.jsx +0 -2
  35. package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -5
  36. package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +30 -9
  37. package/src/customizations/@plone/volto-slate/widgets/README.md +15 -1
  38. package/src/customizations/volto/components/manage/Blocks/Grid/grid-1.svg +6 -0
  39. package/src/customizations/volto/components/manage/Blocks/Grid/grid-2.svg +9 -0
  40. package/src/customizations/volto/components/manage/Blocks/Grid/grid-3.svg +10 -0
  41. package/src/customizations/volto/components/manage/Blocks/Grid/grid-4.svg +11 -0
  42. package/src/customizations/volto/components/manage/Blocks/Grid/grid-5.svg +13 -0
  43. package/src/customizations/volto/components/manage/Blocks/Grid/grid-6.svg +14 -0
  44. package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +61 -0
  45. package/src/customizations/volto/components/theme/App/App.jsx +3 -1
  46. package/src/customizations/volto/helpers/Html/Html.jsx +2 -9
  47. package/src/customizations/volto/middleware/api.js +190 -186
  48. package/src/customizations/volto/server.jsx +1 -1
  49. package/src/express-middleware.js +4 -2
  50. package/src/helpers/Utils.jsx +15 -2
  51. package/src/helpers/country_map/euro-countries-simplified.js +3 -1
  52. package/src/index.js +2 -8
  53. package/src/search/cca/views.js +3 -1
  54. package/src/search/health_observatory/views-health.js +3 -1
  55. package/src/store/middleware.js +38 -37
  56. package/theme/globals/blocks.less +4 -0
  57. package/theme/globals/mission.less +2 -9
  58. package/theme/globals/observatory.less +2 -2
  59. package/theme/globals/views.less +25 -0
  60. package/src/components/theme/Views/brokenlinks.less +0 -21
  61. package/src/components/theme/Widgets/geolocation.css +0 -3
  62. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.test.jsx +0 -229
  63. package/src/customizations/volto/components/manage/Widgets/ArrayWidget.jsx +0 -428
  64. package/src/customizations/volto/components/manage/Widgets/Readme.md +0 -5
  65. package/src/customizations/volto/components/theme/Footer/Footer.jsx +0 -96
  66. package/src/policy.js +0 -135
@@ -1,5 +0,0 @@
1
- Original: https://github.com/plone/volto/blob/16.x.x/src/components/manage/Widgets/ArrayWidget.jsx
2
-
3
- The issue can be reproduce in the metadata section block. The Select widget from the edit sidebar steals the focus when you try to edit a slate text after you edit the Select widget in the metadata section block.
4
- The quick solution was to comment the "autoFocus" prop in the Select component (see the customization part in ArrayWidget.jsx, line 321).
5
- This is a temporary fix until it is properly tested and fixed the issue in this ticket: https://taskman.eionet.europa.eu/issues/268852
@@ -1,96 +0,0 @@
1
- /**
2
- * Footer component.
3
- * @module components/theme/Footer/Footer
4
- */
5
-
6
- import React from 'react';
7
- import { useSelector, shallowEqual } from 'react-redux';
8
- import { flattenToAppURL } from '@plone/volto/helpers';
9
- import EEAFooter from '@eeacms/volto-eea-design-system/ui/Footer/Footer';
10
- import config from '@plone/volto/registry';
11
- import isArray from 'lodash/isArray';
12
-
13
- const Footer = () => {
14
- const { eea } = config.settings;
15
- const {
16
- footerActions,
17
- copyrightActions,
18
- socialActions,
19
- contactActions,
20
- contactExtraActions,
21
- } = useSelector(
22
- (state) => ({
23
- footerActions: state.actions?.actions?.footer_actions,
24
- copyrightActions: state.actions?.actions?.copyright_actions,
25
- socialActions: state.actions?.actions?.social_actions,
26
- contactActions: state.actions?.actions?.contact_actions,
27
- contactExtraActions: state.actions?.actions?.contact_extra_actions,
28
- }),
29
- shallowEqual,
30
- );
31
- // ZMI > portal_actions > footer_actions
32
- const actions = isArray(footerActions)
33
- ? footerActions.map((action) => ({
34
- title: action.title,
35
- url: flattenToAppURL(action.url),
36
- }))
37
- : eea.footerOpts.actions;
38
-
39
- // ZMI > portal_actions > copyright_actions
40
- const copyright = isArray(copyrightActions)
41
- ? copyrightActions.map((action) => ({
42
- title: action.title,
43
- site: action.title,
44
- url: flattenToAppURL(action.url),
45
- }))
46
- : eea.footerOpts.copyright;
47
-
48
- // ZMI > portal_actions > social_actions
49
- const social = isArray(socialActions)
50
- ? socialActions.map((action) => ({
51
- name: action.id,
52
- icon: action.icon,
53
- url: action.url,
54
- }))
55
- : eea.footerOpts.social;
56
-
57
- // ZMI > portal_actions > contact_actions
58
- const contacts = isArray(contactActions)
59
- ? contactActions.map((action, idx) => ({
60
- text: action.title,
61
- icon: action.icon,
62
- url: flattenToAppURL(action.url),
63
- children:
64
- idx === 0
65
- ? (contactExtraActions || []).map((child) => ({
66
- text: child.title,
67
- icon: child.icon,
68
- url: flattenToAppURL(child.url),
69
- }))
70
- : [],
71
- }))
72
- : eea.footerOpts.contacts;
73
-
74
- // Update options with actions from backend
75
- const options = {
76
- ...eea.footerOpts,
77
- social,
78
- contacts,
79
- };
80
-
81
- return (
82
- <EEAFooter>
83
- <EEAFooter.Header>{eea.footerOpts.logosHeader}</EEAFooter.Header>
84
- <EEAFooter.SubFooter {...options} />
85
- <EEAFooter.Header>{eea.footerOpts.header}</EEAFooter.Header>
86
- <EEAFooter.SitesButton
87
- buttonName={eea.footerOpts.buttonName}
88
- hrefButton={eea.footerOpts.hrefButton}
89
- />
90
- <EEAFooter.Social {...options} />
91
- <EEAFooter.Actions actions={actions} copyright={copyright} />
92
- </EEAFooter>
93
- );
94
- };
95
-
96
- export default Footer;
package/src/policy.js DELETED
@@ -1,135 +0,0 @@
1
- import installCallout from '@plone/volto-slate/editor/plugins/Callout';
2
-
3
- // import { runtimeConfig } from '@plone/volto/runtime_config';
4
- // import installContextNavigationBlock from './components/manage/Blocks/ContextNavigation';
5
- // import installLayoutSettingsBlock from './components/manage/Blocks/LayoutSettings';
6
-
7
- const applyConfig = (config) => {
8
- // if (process.env.NODE_ENV === 'production') {
9
- // // Restrict block-style to Layout only
10
- // config.settings.layoutOnlyBlockStyles = true;
11
- // // Restrict slate metadata mentions to Layout only
12
- // config.settings.layoutOnlySlateMetadataMentions = true;
13
- // }
14
- // Callout slate button
15
- config = installCallout(config);
16
-
17
- // Remove blockquote slate button
18
- config.settings.slate.toolbarButtons = config.settings.slate.toolbarButtons.filter(
19
- (item) => item !== 'blockquote',
20
- );
21
-
22
- // Disable tags on View
23
- config.settings.showTags = false;
24
-
25
- // Enable Title block
26
- config.blocks.blocksConfig.title.restricted = false;
27
-
28
- // Enable description block (also for cypress)
29
- config.blocks.blocksConfig.description.restricted = false;
30
- config.blocks.requiredBlocks = [];
31
-
32
- // Date format for EU
33
- config.settings.dateLocale = 'en-gb';
34
-
35
- // #137187 Keycloak integration
36
- // if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {
37
- // config.settings.externalRoutes = [
38
- // ...(config.settings.externalRoutes || []),
39
- // {
40
- // match: {
41
- // path: '/en/mission/login',
42
- // exact: true,
43
- // strict: false,
44
- // },
45
- // },
46
- // {
47
- // match: {
48
- // path: '/logout',
49
- // exact: true,
50
- // strict: false,
51
- // },
52
- // },
53
- // ];
54
- // }
55
-
56
- // Working-copy
57
- config.settings.hasWorkingCopySupport = true;
58
-
59
- // Multi-lingual
60
- config.settings.isMultilingual = true;
61
- config.settings.defaultLanguage =
62
- config.settings.eea?.defaultLanguage || 'en';
63
- // config.settings.supportedLanguages = config.settings.eea?.languages?.map(
64
- // (item) => item.code,
65
- // ) || ['en'];
66
- config.settings.supportedLanguages = ['en', 'de', 'fr', 'es', 'it'];
67
-
68
- // Block chooser
69
- config.blocks.blocksConfig.image.mostUsed = false;
70
- config.blocks.blocksConfig.video.mostUsed = false;
71
-
72
- // Grid/Teaser block (kitconcept)
73
- if (config.blocks.blocksConfig.__grid) {
74
- config.blocks.blocksConfig.__grid.restricted = true;
75
- }
76
- if (config.blocks.blocksConfig.imagesGrid) {
77
- config.blocks.blocksConfig.imagesGrid.restricted = true;
78
- }
79
- if (config.blocks.blocksConfig.teaser) {
80
- config.blocks.blocksConfig.teaser.restricted = true;
81
- }
82
-
83
- // Divider
84
- if (config.blocks.blocksConfig.dividerBlock) {
85
- config.blocks.blocksConfig.dividerBlock.mostUsed = true;
86
- }
87
-
88
- // Enable volto-embed
89
- if (config.blocks.blocksConfig.maps) {
90
- config.blocks.blocksConfig.maps.restricted = false;
91
- }
92
-
93
- // Call to Action
94
- if (config.blocks.blocksConfig.callToActionBlock) {
95
- config.blocks.blocksConfig.callToActionBlock.mostUsed = true;
96
- }
97
-
98
- // Columns
99
- if (config.blocks.blocksConfig.columnsBlock) {
100
- config.blocks.blocksConfig.columnsBlock.mostUsed = true;
101
- }
102
-
103
- // Accordion
104
- if (config.blocks.blocksConfig.accordion) {
105
- config.blocks.blocksConfig.accordion.mostUsed = true;
106
- }
107
-
108
- // Listing
109
- if (config.blocks.blocksConfig.listing) {
110
- config.blocks.blocksConfig.listing.title = 'Listing (Content)';
111
- }
112
-
113
- // Custom blocks
114
- // context navigation
115
- // config = [installContextNavigationBlock].reduce(
116
- // (acc, apply) => apply(acc),
117
- // config,
118
- // );
119
-
120
- // // layout settings
121
- // config = [installLayoutSettingsBlock].reduce(
122
- // (acc, apply) => apply(acc),
123
- // config,
124
- // );
125
-
126
- // Disable some blocks
127
- if (config.blocks.blocksConfig.imagecards) {
128
- config.blocks.blocksConfig.imagecards.restricted = true;
129
- }
130
-
131
- // Done
132
- return config;
133
- };
134
-
135
- export default applyConfig;