@eeacms/volto-group-block 7.0.0 → 7.1.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
CHANGED
|
@@ -4,7 +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
|
-
### [7.
|
|
7
|
+
### [7.1.0](https://github.com/eea/volto-group-block/compare/7.0.1...7.1.0) - 20 August 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(section): restrict group block option - ref #273963 [Miu Razvan - [`061b348`](https://github.com/eea/volto-group-block/commit/061b348880b54daa9b27232a914422622afe3677)]
|
|
12
|
+
|
|
13
|
+
### [7.0.1](https://github.com/eea/volto-group-block/compare/7.0.0...7.0.1) - 6 August 2024
|
|
14
|
+
|
|
15
|
+
#### :bug: Bug Fixes
|
|
16
|
+
|
|
17
|
+
- fix: Update DefaultBody.jsx to pass all props to BlocksForm - refs #269086 [dobri1408 - [`635d65b`](https://github.com/eea/volto-group-block/commit/635d65b8e593ec2804dcfea7f59fa0bc2432feee)]
|
|
18
|
+
|
|
19
|
+
## [7.0.0](https://github.com/eea/volto-group-block/compare/6.4.0...7.0.0) - 22 April 2024
|
|
8
20
|
|
|
9
21
|
#### :rocket: New Features
|
|
10
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-group-block",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "volto-group-block: Volto block to be used to group other blocks",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"dotenv": "^16.3.2",
|
|
26
26
|
"husky": "^8.0.3",
|
|
27
27
|
"lint-staged": "^14.0.1",
|
|
28
|
-
"md5": "^2.3.0"
|
|
28
|
+
"md5": "^2.3.0",
|
|
29
|
+
"cypress": "13.1.0"
|
|
29
30
|
},
|
|
30
31
|
"lint-staged": {
|
|
31
32
|
"src/**/*.{js,jsx,ts,tsx,json}": [
|
|
@@ -133,9 +133,9 @@ class EditBlockWrapper extends React.Component {
|
|
|
133
133
|
basic
|
|
134
134
|
title="Add block"
|
|
135
135
|
onClick={() => {
|
|
136
|
-
this.setState({
|
|
137
|
-
addNewBlockOpened: !
|
|
138
|
-
});
|
|
136
|
+
this.setState((prevState) => ({
|
|
137
|
+
addNewBlockOpened: !prevState.addNewBlockOpened,
|
|
138
|
+
}));
|
|
139
139
|
}}
|
|
140
140
|
className="group-block-add-button"
|
|
141
141
|
>
|
|
@@ -4,7 +4,7 @@ const Schema = {
|
|
|
4
4
|
{
|
|
5
5
|
id: 'default',
|
|
6
6
|
title: 'Default',
|
|
7
|
-
fields: ['title', 'as'],
|
|
7
|
+
fields: ['title', 'as', 'restrictedBlock'],
|
|
8
8
|
},
|
|
9
9
|
],
|
|
10
10
|
properties: {
|
|
@@ -27,6 +27,10 @@ const Schema = {
|
|
|
27
27
|
['details', 'details'],
|
|
28
28
|
],
|
|
29
29
|
},
|
|
30
|
+
restrictedBlock: {
|
|
31
|
+
title: 'Restricted block',
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
},
|
|
30
34
|
},
|
|
31
35
|
required: [],
|
|
32
36
|
};
|
package/src/index.js
CHANGED
|
@@ -33,6 +33,19 @@ const applyConfig = (config) => {
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
|
+
|
|
37
|
+
if (!config.blocks.blocksConfig.empty) {
|
|
38
|
+
config.blocks.blocksConfig.empty = {
|
|
39
|
+
id: 'empty',
|
|
40
|
+
edit: () => {
|
|
41
|
+
return null;
|
|
42
|
+
},
|
|
43
|
+
view: () => {
|
|
44
|
+
return null;
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
config.blocks.blocksConfig.group = {
|
|
37
50
|
id: 'group',
|
|
38
51
|
title: 'Section (Group)',
|