@eeacms/volto-eea-website-theme 2.2.0 → 2.2.1
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/CHANGELOG.md
CHANGED
@@ -4,15 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
4
4
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
6
6
|
|
7
|
+
### [2.2.1](https://github.com/eea/volto-eea-website-theme/compare/2.2.0...2.2.1) - 28 August 2024
|
8
|
+
|
9
|
+
#### :bug: Bug Fixes
|
10
|
+
|
11
|
+
- fix: transform empty blocks to slate - refs #273976 [dobri1408 - [`0925e79`](https://github.com/eea/volto-eea-website-theme/commit/0925e79e2bb4a1e378a90299274777a3866fade7)]
|
12
|
+
- fix: Footer explore our env label - refs #265857 [Alin Voinea - [`a98304a`](https://github.com/eea/volto-eea-website-theme/commit/a98304a6904e0524611d5abdf768bdf5e584cb15)]
|
13
|
+
|
7
14
|
### [2.2.0](https://github.com/eea/volto-eea-website-theme/compare/2.1.6...2.2.0) - 26 August 2024
|
8
15
|
|
9
16
|
#### :nail_care: Enhancements
|
10
17
|
|
11
18
|
- refactor: Simplify footer according to the #265857 [dobri1408 - [`27d0393`](https://github.com/eea/volto-eea-website-theme/commit/27d0393fdf84230f8e77a3f851b09befc882dafa)]
|
12
19
|
|
13
|
-
#### :hammer_and_wrench: Others
|
14
|
-
|
15
|
-
- Release 2.2.0 [Alin Voinea - [`0cb60c6`](https://github.com/eea/volto-eea-website-theme/commit/0cb60c6dc7d3aa8e7652e1368cc1d0271a370d3b)]
|
16
20
|
### [2.1.6](https://github.com/eea/volto-eea-website-theme/compare/2.1.5...2.1.6) - 21 August 2024
|
17
21
|
|
18
22
|
### [2.1.5](https://github.com/eea/volto-eea-website-theme/compare/2.1.4...2.1.5) - 5 August 2024
|
package/package.json
CHANGED
package/src/config.js
CHANGED
@@ -15,7 +15,7 @@ import climateLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/ass
|
|
15
15
|
// TODO: to be consolidated with headerLinks
|
16
16
|
// Footer.jsx config options
|
17
17
|
export const footerOpts = {
|
18
|
-
buttonName: 'Explore our
|
18
|
+
buttonName: 'Explore our environmental information systems',
|
19
19
|
hrefButton: 'https://www.eea.europa.eu/en/information-systems',
|
20
20
|
logosHeader: '',
|
21
21
|
contactHeader: 'Contact Us',
|
@@ -4,7 +4,7 @@ import { RenderBlocks } from '@plone/volto/components';
|
|
4
4
|
import { withBlockExtensions } from '@plone/volto/helpers';
|
5
5
|
import config from '@plone/volto/registry';
|
6
6
|
|
7
|
-
const
|
7
|
+
const convertTeaserToGridIfNecessaryAndTransformEmptyBlocksToSlate = (data) => {
|
8
8
|
if (data?.['@type'] === 'teaserGrid')
|
9
9
|
return {
|
10
10
|
...data,
|
@@ -13,11 +13,24 @@ const convertTeaserToGridIfNecessary = (data) => {
|
|
13
13
|
blocks: data?.columns?.reduce((acc, current) => {
|
14
14
|
return {
|
15
15
|
...acc,
|
16
|
-
[current?.id]: current,
|
16
|
+
[current?.id]: { current, '@type': current['@type'] || 'slate' },
|
17
17
|
};
|
18
18
|
}, {}),
|
19
19
|
};
|
20
|
-
|
20
|
+
if (data.blocks)
|
21
|
+
return {
|
22
|
+
...data,
|
23
|
+
blocks: Object.keys(data.blocks).reduce((acc, current) => {
|
24
|
+
return {
|
25
|
+
...acc,
|
26
|
+
[current]: {
|
27
|
+
...data.blocks[current],
|
28
|
+
'@type': data.blocks[current]?.['@type'] || 'slate',
|
29
|
+
},
|
30
|
+
};
|
31
|
+
}, {}),
|
32
|
+
};
|
33
|
+
else return data;
|
21
34
|
};
|
22
35
|
|
23
36
|
const GridBlockView = (props) => {
|
@@ -48,7 +61,9 @@ const GridBlockView = (props) => {
|
|
48
61
|
{...props}
|
49
62
|
blockWrapperTag={Grid.Column}
|
50
63
|
metadata={metadata}
|
51
|
-
content={
|
64
|
+
content={convertTeaserToGridIfNecessaryAndTransformEmptyBlocksToSlate(
|
65
|
+
data,
|
66
|
+
)}
|
52
67
|
location={location}
|
53
68
|
blocksConfig={blocksConfig}
|
54
69
|
isContainer
|
@@ -1 +1,2 @@
|
|
1
1
|
These two customizations ensure backward compatibility with the legacy @kitconcept/volto-blocks-grid. For more details, refer to the ticket here: https://taskman.eionet.europa.eu/issues/265726.
|
2
|
+
Also, if there is an empty block, it will convert to slate, so the "Unkown block" message will not appear
|