@eeacms/volto-eea-website-policy 1.6.3 → 1.7.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/CHANGELOG.md +16 -5
- package/package.json +1 -1
- package/src/helpers.js +18 -0
- package/src/index.js +33 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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
|
+
### [1.7.0](https://github.com/eea/volto-eea-website-policy/compare/1.6.3...1.7.0) - 16 June 2023
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: move tableau and eea-map to data visualization group [Miu Razvan - [`6e4d954`](https://github.com/eea/volto-eea-website-policy/commit/6e4d954cee33d41d34283427c17470c6cc1acfc4)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
- chore: Move IMS dataFigure to data_visualizations group - refs #253827 [Alin Voinea - [`0d782f9`](https://github.com/eea/volto-eea-website-policy/commit/0d782f90c72080f48f14f5f28a6ef63fba12cc7c)]
|
|
16
|
+
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
|
+
|
|
19
|
+
- Release 1.7.0 [Alin Voinea - [`93c05fa`](https://github.com/eea/volto-eea-website-policy/commit/93c05fae93b075223ef3f232963b7b4c9c682f42)]
|
|
20
|
+
- fix overrideBlocks [Miu Razvan - [`6e1a27e`](https://github.com/eea/volto-eea-website-policy/commit/6e1a27e15d1576643be6b88d2b8e888a538fc6e5)]
|
|
21
|
+
- call appendGroup with all parameters [Miu Razvan - [`09a914e`](https://github.com/eea/volto-eea-website-policy/commit/09a914e695c0f05a3076c2e7ae5c708dac2a7787)]
|
|
22
|
+
- changed gropup of plotly to data_visualizations [Miu Razvan - [`6974dc4`](https://github.com/eea/volto-eea-website-policy/commit/6974dc4126d876510bb8ec63732bf350cf79d1ab)]
|
|
7
23
|
### [1.6.3](https://github.com/eea/volto-eea-website-policy/compare/1.6.2...1.6.3) - 13 June 2023
|
|
8
24
|
|
|
9
25
|
#### :bug: Bug Fixes
|
|
@@ -46,7 +62,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
46
62
|
|
|
47
63
|
- Release 1.5.0 [Alin Voinea - [`a3dea8e`](https://github.com/eea/volto-eea-website-policy/commit/a3dea8ea15cb8d2a876dc10da926ece3a5707ea9)]
|
|
48
64
|
- test(Jenkinsfile): Use latest stable volto for testing [Alin Voinea - [`a8f7123`](https://github.com/eea/volto-eea-website-policy/commit/a8f712364187f9638886667c249fa102cb49b5c0)]
|
|
49
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`124a8f8`](https://github.com/eea/volto-eea-website-policy/commit/124a8f8ad4ced507aeec27012d725f2e2b977e08)]
|
|
50
65
|
### [1.4.0](https://github.com/eea/volto-eea-website-policy/compare/1.3.4...1.4.0) - 21 February 2023
|
|
51
66
|
|
|
52
67
|
#### :rocket: New Features
|
|
@@ -126,7 +141,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
126
141
|
#### :hammer_and_wrench: Others
|
|
127
142
|
|
|
128
143
|
- Release 1.1.0 [Alin Voinea - [`0291b3b`](https://github.com/eea/volto-eea-website-policy/commit/0291b3bb7b4c6ab09ca98728885cea4051eac8e3)]
|
|
129
|
-
- yarn 3 [Alin Voinea - [`593aa58`](https://github.com/eea/volto-eea-website-policy/commit/593aa58eaa4d28aced0603b7f7dd125c857a6f54)]
|
|
130
144
|
### [1.0.4](https://github.com/eea/volto-eea-website-policy/compare/1.0.3...1.0.4) - 22 November 2022
|
|
131
145
|
|
|
132
146
|
#### :nail_care: Enhancements
|
|
@@ -172,7 +186,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
172
186
|
|
|
173
187
|
#### :hammer_and_wrench: Others
|
|
174
188
|
|
|
175
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`d153f54`](https://github.com/eea/volto-eea-website-policy/commit/d153f54e55e918fa4746e05488c734624eaf14a9)]
|
|
176
189
|
### [0.4.0](https://github.com/eea/volto-eea-website-policy/compare/0.3.3...0.4.0) - 19 September 2022
|
|
177
190
|
|
|
178
191
|
#### :hammer_and_wrench: Others
|
|
@@ -248,7 +261,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
248
261
|
- format index.js [Andrei Grigore - [`db4481a`](https://github.com/eea/volto-eea-website-policy/commit/db4481aeeba59a769272659f33278c902fc69bec)]
|
|
249
262
|
- Update index.js [Alexandru Ghica - [`dc09886`](https://github.com/eea/volto-eea-website-policy/commit/dc0988640a76a9914381b120f58bb61a9ab1eb39)]
|
|
250
263
|
- Added externalRoutes [Alexandru Ghica - [`b68135b`](https://github.com/eea/volto-eea-website-policy/commit/b68135b013fafa93a41ea602ea2fad30879abe0f)]
|
|
251
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`575cca6`](https://github.com/eea/volto-eea-website-policy/commit/575cca674602ca2e1c2a41300c47ba594ff49aa0)]
|
|
252
264
|
### [0.1.1](https://github.com/eea/volto-eea-website-policy/compare/0.1.0...0.1.1) - 4 March 2022
|
|
253
265
|
|
|
254
266
|
#### :hammer_and_wrench: Others
|
|
@@ -261,5 +273,4 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
261
273
|
|
|
262
274
|
#### :hammer_and_wrench: Others
|
|
263
275
|
|
|
264
|
-
- yarn bootstrap [Alin Voinea - [`9b4d197`](https://github.com/eea/volto-eea-website-policy/commit/9b4d197cbc7992566cb36524d190078d5ad21a44)]
|
|
265
276
|
- Initial commit [Alin Voinea - [`3800692`](https://github.com/eea/volto-eea-website-policy/commit/3800692f7a4de6460815bd6061facacb986cbef0)]
|
package/package.json
CHANGED
package/src/helpers.js
CHANGED
|
@@ -9,3 +9,21 @@ export const createSlateParagraph = (text) => {
|
|
|
9
9
|
export const serializeText = (text) => {
|
|
10
10
|
return isArray(text) ? serializeNodes(text) : text;
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
export const appendGroup = (config, id, title) => {
|
|
14
|
+
const groupExists =
|
|
15
|
+
config.blocks.groupBlocksOrder.filter((group) => group.id === id).length >
|
|
16
|
+
0;
|
|
17
|
+
|
|
18
|
+
if (!groupExists) {
|
|
19
|
+
config.blocks.groupBlocksOrder = [
|
|
20
|
+
...config.blocks.groupBlocksOrder,
|
|
21
|
+
{
|
|
22
|
+
id,
|
|
23
|
+
title,
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return config.blocks.groupBlocksOrder;
|
|
29
|
+
};
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { runtimeConfig } from '@plone/volto/runtime_config';
|
|
2
2
|
import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';
|
|
3
|
+
import { appendGroup } from './helpers';
|
|
3
4
|
|
|
4
5
|
const restrictedBlocks = [
|
|
5
6
|
'imagecards',
|
|
6
|
-
'embed_eea_tableau_block',
|
|
7
|
-
'embed_eea_map_block',
|
|
8
7
|
// TODO: use what is needed from volto-datablocks after clean-up
|
|
9
8
|
'conditionalDataBlock',
|
|
10
9
|
'countryFlag',
|
|
@@ -15,6 +14,21 @@ const restrictedBlocks = [
|
|
|
15
14
|
'simpleDataConnectedTable',
|
|
16
15
|
];
|
|
17
16
|
|
|
17
|
+
const overrideBlocks = {
|
|
18
|
+
embed_tableau_visualization: {
|
|
19
|
+
group: 'data_visualizations',
|
|
20
|
+
},
|
|
21
|
+
tableau_block: {
|
|
22
|
+
group: 'data_visualizations',
|
|
23
|
+
},
|
|
24
|
+
embed_eea_map_block: {
|
|
25
|
+
group: 'data_visualizations',
|
|
26
|
+
},
|
|
27
|
+
dataFigure: {
|
|
28
|
+
group: 'data_visualizations',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
18
32
|
const applyConfig = (config) => {
|
|
19
33
|
// #158717#note-25 any path that isn't static, en or controlpanel is treated as external
|
|
20
34
|
const notInEN = /^(?!(#|\/en|\/static|\/controlpanel|\/cypress|\/login|\/logout|\/contact-form)).*$/;
|
|
@@ -78,6 +92,13 @@ const applyConfig = (config) => {
|
|
|
78
92
|
config,
|
|
79
93
|
);
|
|
80
94
|
|
|
95
|
+
// Add groups
|
|
96
|
+
config.blocks.groupBlocksOrder = appendGroup(
|
|
97
|
+
config,
|
|
98
|
+
'data_visualizations',
|
|
99
|
+
'Data Visualizations (Beta)',
|
|
100
|
+
);
|
|
101
|
+
|
|
81
102
|
// Disable some blocks
|
|
82
103
|
restrictedBlocks.forEach((block) => {
|
|
83
104
|
if (config.blocks.blocksConfig[block]) {
|
|
@@ -85,6 +106,16 @@ const applyConfig = (config) => {
|
|
|
85
106
|
}
|
|
86
107
|
});
|
|
87
108
|
|
|
109
|
+
// Override blocks config
|
|
110
|
+
Object.keys(overrideBlocks).forEach((block) => {
|
|
111
|
+
if (config.blocks.blocksConfig[block]) {
|
|
112
|
+
config.blocks.blocksConfig[block] = {
|
|
113
|
+
...config.blocks.blocksConfig[block],
|
|
114
|
+
...overrideBlocks[block],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
88
119
|
config.settings.apiExpanders = [
|
|
89
120
|
...config.settings.apiExpanders,
|
|
90
121
|
{
|