@eeacms/volto-bise-policy 1.0.6 → 1.0.7
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 +6 -0
- package/package.json +1 -1
- package/src/index.js +13 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.0.7](https://github.com/eea/volto-bise-policy/compare/1.0.6...1.0.7) - 23 May 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- clean up [Miu Razvan - [`81951e8`](https://github.com/eea/volto-bise-policy/commit/81951e815b6db1b1a54d78f0b1769208e1bed586)]
|
|
12
|
+
- restrict some blocks [Miu Razvan - [`c61e7d0`](https://github.com/eea/volto-bise-policy/commit/c61e7d0c03e7e29f0b4f3150f0382e2201c8d620)]
|
|
7
13
|
### [1.0.6](https://github.com/eea/volto-bise-policy/compare/1.0.5...1.0.6) - 23 May 2023
|
|
8
14
|
|
|
9
15
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -8,6 +8,12 @@ import installStyles from './components/manage/Styles';
|
|
|
8
8
|
import biseLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo.svg';
|
|
9
9
|
import biseWhiteLogo from '@eeacms/volto-bise-policy/../theme//assets/images/Header/bise-logo-white.svg';
|
|
10
10
|
|
|
11
|
+
const restrictedBlocks = [
|
|
12
|
+
'imagecards',
|
|
13
|
+
'embed_eea_tableau_block',
|
|
14
|
+
'embed_eea_map_block',
|
|
15
|
+
];
|
|
16
|
+
|
|
11
17
|
const applyConfig = (config) => {
|
|
12
18
|
// Volto specific settings
|
|
13
19
|
config.settings = {
|
|
@@ -58,11 +64,6 @@ const applyConfig = (config) => {
|
|
|
58
64
|
multilingualSubsites: ['/natura2000'],
|
|
59
65
|
};
|
|
60
66
|
|
|
61
|
-
config.settings.apiExpanders.push({
|
|
62
|
-
match: '/',
|
|
63
|
-
GET_CONTENT: ['translations'],
|
|
64
|
-
});
|
|
65
|
-
|
|
66
67
|
config.blocks.requiredBlocks = [];
|
|
67
68
|
|
|
68
69
|
config.blocks.blocksConfig.html.restricted = false;
|
|
@@ -92,7 +93,6 @@ const applyConfig = (config) => {
|
|
|
92
93
|
) => {
|
|
93
94
|
// integration with volto-block-toc
|
|
94
95
|
const headlines = tocData.levels || ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
95
|
-
// const column_blocks = block?.data?.blocks || {};
|
|
96
96
|
let entries = [];
|
|
97
97
|
const sorted_column_blocks = getBlocks(block?.data || {});
|
|
98
98
|
sorted_column_blocks.forEach((column_block) => {
|
|
@@ -132,6 +132,13 @@ const applyConfig = (config) => {
|
|
|
132
132
|
},
|
|
133
133
|
];
|
|
134
134
|
|
|
135
|
+
// Disable some blocks
|
|
136
|
+
restrictedBlocks.forEach((block) => {
|
|
137
|
+
if (config.blocks.blocksConfig[block]) {
|
|
138
|
+
config.blocks.blocksConfig[block].restricted = true;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
135
142
|
return [installBlocks, installStyles].reduce(
|
|
136
143
|
(acc, apply) => apply(acc),
|
|
137
144
|
config,
|