@eeacms/volto-group-block 7.1.0 → 8.0.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 +18 -0
- package/locales/de/LC_MESSAGES/volto.po +58 -3
- package/locales/en/LC_MESSAGES/volto.po +57 -2
- package/locales/it/LC_MESSAGES/volto.po +57 -2
- package/locales/ro/LC_MESSAGES/volto.po +57 -2
- package/locales/volto.pot +59 -4
- package/package.json +3 -3
- package/src/components/manage/Blocks/Group/Edit.jsx +17 -4
- package/src/components/manage/Blocks/Group/EditBlockWrapper.jsx +10 -2
- package/src/components/manage/Blocks/Group/EditSchema.jsx +38 -13
- package/src/index.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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
|
+
### [8.0.0](https://github.com/eea/volto-group-block/compare/7.1.1...8.0.0) - 3 December 2025
|
|
8
|
+
|
|
9
|
+
#### :boom: Breaking Change
|
|
10
|
+
|
|
11
|
+
- breaking: Remove restricted block option as it requires backend support. Moved to volto-eea-website-theme [dobri1408 - [`e951557`](https://github.com/eea/volto-group-block/commit/e9515578ec6dccbcdcf076b0e9727394967b5706)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
#### :hammer_and_wrench: Others
|
|
17
|
+
|
|
18
|
+
- Release 8.0.0 [Alin Voinea - [`75e44d3`](https://github.com/eea/volto-group-block/commit/75e44d345c84e45cb8f520b02a37d92de280de9e)]
|
|
19
|
+
### [7.1.1](https://github.com/eea/volto-group-block/compare/7.1.0...7.1.1) - 30 January 2025
|
|
20
|
+
|
|
21
|
+
#### :house: Internal changes
|
|
22
|
+
|
|
23
|
+
- chore: package.json [Alin Voinea - [`fee5337`](https://github.com/eea/volto-group-block/commit/fee5337586cc6c7fe5b9aa11eaeaa860aadcea00)]
|
|
24
|
+
|
|
7
25
|
### [7.1.0](https://github.com/eea/volto-group-block/compare/7.0.1...7.1.0) - 20 August 2024
|
|
8
26
|
|
|
9
27
|
#### :rocket: New Features
|
|
@@ -11,12 +11,67 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Section (Group)"
|
|
15
|
+
#: index
|
|
16
|
+
msgid "Section (Group)"
|
|
17
|
+
msgstr "Abschnitt (Gruppe)"
|
|
18
|
+
|
|
19
|
+
#. Default: "Section (Group) settings"
|
|
20
|
+
#: components/manage/Blocks/Group/Edit
|
|
21
|
+
msgid "SectionGroupSettings"
|
|
22
|
+
msgstr "Abschnitt (Gruppe) Einstellungen"
|
|
23
|
+
|
|
24
|
+
#. Default: "Unknown Block {block}"
|
|
14
25
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
15
|
-
# defaultMessage: Unknown Block {block}
|
|
16
26
|
msgid "Unknown Block"
|
|
27
|
+
msgstr "Unbekannter Block {block}"
|
|
28
|
+
|
|
29
|
+
#. Default: "Add block"
|
|
30
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
31
|
+
msgid "addBlock"
|
|
32
|
+
msgstr "Block hinzufügen"
|
|
33
|
+
|
|
34
|
+
#. Default: "Select HTML5 element to be used for this block"
|
|
35
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
36
|
+
msgid "asPropertyDescription"
|
|
37
|
+
msgstr "Wählen Sie das HTML5-Element, das für diesen Block verwendet werden soll"
|
|
38
|
+
|
|
39
|
+
#. Default: "HTML5 element"
|
|
40
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
41
|
+
msgid "asPropertyTitle"
|
|
17
42
|
msgstr ""
|
|
18
43
|
|
|
44
|
+
#. Default: "delete"
|
|
19
45
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
20
|
-
# defaultMessage: delete
|
|
21
46
|
msgid "delete"
|
|
22
|
-
msgstr ""
|
|
47
|
+
msgstr "Löschen"
|
|
48
|
+
|
|
49
|
+
#. Default: "Default"
|
|
50
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
51
|
+
msgid "fieldsetDefaultTitle"
|
|
52
|
+
msgstr "Standard"
|
|
53
|
+
|
|
54
|
+
#. Default: "Remove block"
|
|
55
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
56
|
+
msgid "removeBlock"
|
|
57
|
+
msgstr "Block entfernen"
|
|
58
|
+
|
|
59
|
+
#. Default: "Section block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "sectionBlock"
|
|
62
|
+
msgstr "Abschnittsblock"
|
|
63
|
+
|
|
64
|
+
#. Default: "Section"
|
|
65
|
+
#: components/manage/Blocks/Group/Edit
|
|
66
|
+
msgid "sectionTitle"
|
|
67
|
+
msgstr "Abschnitt"
|
|
68
|
+
|
|
69
|
+
#. Default: "Section friendly name"
|
|
70
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
71
|
+
msgid "titlePropertyDescription"
|
|
72
|
+
msgstr "Kurzname für den Abschnitt"
|
|
73
|
+
|
|
74
|
+
#. Default: "Title"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyTitle"
|
|
77
|
+
msgstr "Titel"
|
|
@@ -11,12 +11,67 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Section (Group)"
|
|
15
|
+
#: index
|
|
16
|
+
msgid "Section (Group)"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Section (Group) settings"
|
|
20
|
+
#: components/manage/Blocks/Group/Edit
|
|
21
|
+
msgid "SectionGroupSettings"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Unknown Block {block}"
|
|
14
25
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
15
|
-
# defaultMessage: Unknown Block {block}
|
|
16
26
|
msgid "Unknown Block"
|
|
17
27
|
msgstr ""
|
|
18
28
|
|
|
29
|
+
#. Default: "Add block"
|
|
30
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
31
|
+
msgid "addBlock"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Select HTML5 element to be used for this block"
|
|
35
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
36
|
+
msgid "asPropertyDescription"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "HTML5 element"
|
|
40
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
41
|
+
msgid "asPropertyTitle"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "delete"
|
|
19
45
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
20
|
-
# defaultMessage: delete
|
|
21
46
|
msgid "delete"
|
|
22
47
|
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Default"
|
|
50
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
51
|
+
msgid "fieldsetDefaultTitle"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Remove block"
|
|
55
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
56
|
+
msgid "removeBlock"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Section block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "sectionBlock"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section"
|
|
65
|
+
#: components/manage/Blocks/Group/Edit
|
|
66
|
+
msgid "sectionTitle"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section friendly name"
|
|
70
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
71
|
+
msgid "titlePropertyDescription"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Title"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyTitle"
|
|
77
|
+
msgstr ""
|
|
@@ -11,12 +11,67 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Section (Group)"
|
|
15
|
+
#: index
|
|
16
|
+
msgid "Section (Group)"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Section (Group) settings"
|
|
20
|
+
#: components/manage/Blocks/Group/Edit
|
|
21
|
+
msgid "SectionGroupSettings"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Unknown Block {block}"
|
|
14
25
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
15
|
-
# defaultMessage: Unknown Block {block}
|
|
16
26
|
msgid "Unknown Block"
|
|
17
27
|
msgstr ""
|
|
18
28
|
|
|
29
|
+
#. Default: "Add block"
|
|
30
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
31
|
+
msgid "addBlock"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Select HTML5 element to be used for this block"
|
|
35
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
36
|
+
msgid "asPropertyDescription"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "HTML5 element"
|
|
40
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
41
|
+
msgid "asPropertyTitle"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "delete"
|
|
19
45
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
20
|
-
# defaultMessage: delete
|
|
21
46
|
msgid "delete"
|
|
22
47
|
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Default"
|
|
50
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
51
|
+
msgid "fieldsetDefaultTitle"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Remove block"
|
|
55
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
56
|
+
msgid "removeBlock"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Section block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "sectionBlock"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section"
|
|
65
|
+
#: components/manage/Blocks/Group/Edit
|
|
66
|
+
msgid "sectionTitle"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section friendly name"
|
|
70
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
71
|
+
msgid "titlePropertyDescription"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Title"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyTitle"
|
|
77
|
+
msgstr ""
|
|
@@ -11,12 +11,67 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "Section (Group)"
|
|
15
|
+
#: index
|
|
16
|
+
msgid "Section (Group)"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Section (Group) settings"
|
|
20
|
+
#: components/manage/Blocks/Group/Edit
|
|
21
|
+
msgid "SectionGroupSettings"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Unknown Block {block}"
|
|
14
25
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
15
|
-
# defaultMessage: Unknown Block {block}
|
|
16
26
|
msgid "Unknown Block"
|
|
17
27
|
msgstr ""
|
|
18
28
|
|
|
29
|
+
#. Default: "Add block"
|
|
30
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
31
|
+
msgid "addBlock"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Select HTML5 element to be used for this block"
|
|
35
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
36
|
+
msgid "asPropertyDescription"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "HTML5 element"
|
|
40
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
41
|
+
msgid "asPropertyTitle"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "delete"
|
|
19
45
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
20
|
-
# defaultMessage: delete
|
|
21
46
|
msgid "delete"
|
|
22
47
|
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Default"
|
|
50
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
51
|
+
msgid "fieldsetDefaultTitle"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Remove block"
|
|
55
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
56
|
+
msgid "removeBlock"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Section block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "sectionBlock"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section"
|
|
65
|
+
#: components/manage/Blocks/Group/Edit
|
|
66
|
+
msgid "sectionTitle"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section friendly name"
|
|
70
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
71
|
+
msgid "titlePropertyDescription"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Title"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyTitle"
|
|
77
|
+
msgstr ""
|
package/locales/volto.pot
CHANGED
|
@@ -1,24 +1,79 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2025-06-01T18:33:19.620Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
|
-
"MIME-Version: 1.0\n"
|
|
8
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
9
8
|
"Content-Transfer-Encoding: 8bit\n"
|
|
10
9
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
10
|
+
"MIME-Version: 1.0\n"
|
|
11
11
|
"Language-Code: en\n"
|
|
12
12
|
"Language-Name: English\n"
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
+
#. Default: "Section (Group)"
|
|
17
|
+
#: index
|
|
18
|
+
msgid "Section (Group)"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#. Default: "Section (Group) settings"
|
|
22
|
+
#: components/manage/Blocks/Group/Edit
|
|
23
|
+
msgid "SectionGroupSettings"
|
|
24
|
+
msgstr ""
|
|
25
|
+
|
|
26
|
+
#. Default: "Unknown Block {block}"
|
|
16
27
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
17
|
-
# defaultMessage: Unknown Block {block}
|
|
18
28
|
msgid "Unknown Block"
|
|
19
29
|
msgstr ""
|
|
20
30
|
|
|
31
|
+
#. Default: "Add block"
|
|
32
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
33
|
+
msgid "addBlock"
|
|
34
|
+
msgstr ""
|
|
35
|
+
|
|
36
|
+
#. Default: "Select HTML5 element to be used for this block"
|
|
37
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
38
|
+
msgid "asPropertyDescription"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
|
+
#. Default: "HTML5 element"
|
|
42
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
43
|
+
msgid "asPropertyTitle"
|
|
44
|
+
msgstr ""
|
|
45
|
+
|
|
46
|
+
#. Default: "delete"
|
|
21
47
|
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
22
|
-
# defaultMessage: delete
|
|
23
48
|
msgid "delete"
|
|
24
49
|
msgstr ""
|
|
50
|
+
|
|
51
|
+
#. Default: "Default"
|
|
52
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
53
|
+
msgid "fieldsetDefaultTitle"
|
|
54
|
+
msgstr ""
|
|
55
|
+
|
|
56
|
+
#. Default: "Remove block"
|
|
57
|
+
#: components/manage/Blocks/Group/EditBlockWrapper
|
|
58
|
+
msgid "removeBlock"
|
|
59
|
+
msgstr ""
|
|
60
|
+
|
|
61
|
+
#. Default: "Section block"
|
|
62
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
63
|
+
msgid "sectionBlock"
|
|
64
|
+
msgstr ""
|
|
65
|
+
|
|
66
|
+
#. Default: "Section"
|
|
67
|
+
#: components/manage/Blocks/Group/Edit
|
|
68
|
+
msgid "sectionTitle"
|
|
69
|
+
msgstr ""
|
|
70
|
+
|
|
71
|
+
#. Default: "Section friendly name"
|
|
72
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
73
|
+
msgid "titlePropertyDescription"
|
|
74
|
+
msgstr ""
|
|
75
|
+
|
|
76
|
+
#. Default: "Title"
|
|
77
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
78
|
+
msgid "titlePropertyTitle"
|
|
79
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-group-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.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",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@cypress/code-coverage": "^3.10.0",
|
|
23
23
|
"@plone/scripts": "*",
|
|
24
24
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
25
|
+
"cypress": "13.1.0",
|
|
25
26
|
"dotenv": "^16.3.2",
|
|
26
27
|
"husky": "^8.0.3",
|
|
27
28
|
"lint-staged": "^14.0.1",
|
|
28
|
-
"md5": "^2.3.0"
|
|
29
|
-
"cypress": "13.1.0"
|
|
29
|
+
"md5": "^2.3.0"
|
|
30
30
|
},
|
|
31
31
|
"lint-staged": {
|
|
32
32
|
"src/**/*.{js,jsx,ts,tsx,json}": [
|
|
@@ -20,6 +20,19 @@ import EditSchema from './EditSchema';
|
|
|
20
20
|
|
|
21
21
|
import CounterComponent from './CounterComponent';
|
|
22
22
|
import './editor.less';
|
|
23
|
+
import { defineMessages, injectIntl } from 'react-intl';
|
|
24
|
+
import { compose } from 'redux';
|
|
25
|
+
|
|
26
|
+
const messages = defineMessages({
|
|
27
|
+
sectionGroupSettings: {
|
|
28
|
+
id: 'SectionGroupSettings',
|
|
29
|
+
defaultMessage: 'Section (Group) settings',
|
|
30
|
+
},
|
|
31
|
+
section: {
|
|
32
|
+
id: 'sectionTitle',
|
|
33
|
+
defaultMessage: 'Section',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
23
36
|
|
|
24
37
|
const Edit = (props) => {
|
|
25
38
|
const { block, data, onChangeBlock, selected, formDescription } = props;
|
|
@@ -156,7 +169,7 @@ const Edit = (props) => {
|
|
|
156
169
|
}}
|
|
157
170
|
aria-hidden="true"
|
|
158
171
|
>
|
|
159
|
-
{data.title ||
|
|
172
|
+
{data.title || props.intl.formatMessage(messages.section)}
|
|
160
173
|
</legend>
|
|
161
174
|
<BodyComponent
|
|
162
175
|
{...props}
|
|
@@ -201,8 +214,8 @@ const Edit = (props) => {
|
|
|
201
214
|
)}
|
|
202
215
|
{!data?.readOnlySettings && (
|
|
203
216
|
<BlockDataForm
|
|
204
|
-
schema={EditSchema}
|
|
205
|
-
title=
|
|
217
|
+
schema={EditSchema(props.intl)}
|
|
218
|
+
title={props.intl.formatMessage(messages.sectionGroupSettings)}
|
|
206
219
|
formData={data}
|
|
207
220
|
onChangeField={(id, value) => {
|
|
208
221
|
props.onChangeBlock(props.block, {
|
|
@@ -226,4 +239,4 @@ Edit.propTypes = {
|
|
|
226
239
|
manage: PropTypes.bool.isRequired,
|
|
227
240
|
};
|
|
228
241
|
|
|
229
|
-
export default withBlockExtensions(Edit);
|
|
242
|
+
export default compose(injectIntl, withBlockExtensions)(Edit);
|
|
@@ -25,6 +25,14 @@ const messages = defineMessages({
|
|
|
25
25
|
id: 'delete',
|
|
26
26
|
defaultMessage: 'delete',
|
|
27
27
|
},
|
|
28
|
+
addBlock: {
|
|
29
|
+
id: 'addBlock',
|
|
30
|
+
defaultMessage: 'Add block',
|
|
31
|
+
},
|
|
32
|
+
removeBlock: {
|
|
33
|
+
id: 'removeBlock',
|
|
34
|
+
defaultMessage: 'Remove block',
|
|
35
|
+
},
|
|
28
36
|
});
|
|
29
37
|
|
|
30
38
|
class EditBlockWrapper extends React.Component {
|
|
@@ -131,7 +139,7 @@ class EditBlockWrapper extends React.Component {
|
|
|
131
139
|
<Button
|
|
132
140
|
icon
|
|
133
141
|
basic
|
|
134
|
-
title=
|
|
142
|
+
title={intl.formatMessage(messages.addBlock)}
|
|
135
143
|
onClick={() => {
|
|
136
144
|
this.setState((prevState) => ({
|
|
137
145
|
addNewBlockOpened: !prevState.addNewBlockOpened,
|
|
@@ -146,7 +154,7 @@ class EditBlockWrapper extends React.Component {
|
|
|
146
154
|
<Button
|
|
147
155
|
icon
|
|
148
156
|
basic
|
|
149
|
-
title=
|
|
157
|
+
title={intl.formatMessage(messages.removeBlock)}
|
|
150
158
|
onClick={() => onDeleteBlock(block)}
|
|
151
159
|
className="delete-button-group-block"
|
|
152
160
|
aria-label={intl.formatMessage(messages.delete)}
|
|
@@ -1,21 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
const messages = defineMessages({
|
|
4
|
+
sectionBlock: {
|
|
5
|
+
id: 'sectionBlock',
|
|
6
|
+
defaultMessage: 'Section block',
|
|
7
|
+
},
|
|
8
|
+
fieldsetDefaultTitle: {
|
|
9
|
+
id: 'fieldsetDefaultTitle',
|
|
10
|
+
defaultMessage: 'Default',
|
|
11
|
+
},
|
|
12
|
+
titlePropertyTitle: {
|
|
13
|
+
id: 'titlePropertyTitle',
|
|
14
|
+
defaultMessage: 'Title',
|
|
15
|
+
},
|
|
16
|
+
titlePropertyDescription: {
|
|
17
|
+
id: 'titlePropertyDescription',
|
|
18
|
+
defaultMessage: 'Section friendly name',
|
|
19
|
+
},
|
|
20
|
+
asPropertyTitle: {
|
|
21
|
+
id: 'asPropertyTitle',
|
|
22
|
+
defaultMessage: 'HTML5 element',
|
|
23
|
+
},
|
|
24
|
+
asPropertyDescription: {
|
|
25
|
+
id: 'asPropertyDescription',
|
|
26
|
+
defaultMessage: 'Select HTML5 element to be used for this block',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const Schema = (intl) => ({
|
|
31
|
+
title: intl.formatMessage(messages.sectionBlock),
|
|
3
32
|
fieldsets: [
|
|
4
33
|
{
|
|
5
34
|
id: 'default',
|
|
6
|
-
title:
|
|
7
|
-
fields: ['title', 'as'
|
|
35
|
+
title: intl.formatMessage(messages.fieldsetDefaultTitle),
|
|
36
|
+
fields: ['title', 'as'],
|
|
8
37
|
},
|
|
9
38
|
],
|
|
10
39
|
properties: {
|
|
11
40
|
title: {
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
41
|
+
title: intl.formatMessage(messages.titlePropertyTitle),
|
|
42
|
+
description: intl.formatMessage(messages.titlePropertyDescription),
|
|
14
43
|
type: 'string',
|
|
15
44
|
},
|
|
16
45
|
as: {
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
46
|
+
title: intl.formatMessage(messages.asPropertyTitle),
|
|
47
|
+
description: intl.formatMessage(messages.asPropertyDescription),
|
|
19
48
|
type: 'string',
|
|
20
49
|
factory: 'Choice',
|
|
21
50
|
default: 'div',
|
|
@@ -27,12 +56,8 @@ const Schema = {
|
|
|
27
56
|
['details', 'details'],
|
|
28
57
|
],
|
|
29
58
|
},
|
|
30
|
-
restrictedBlock: {
|
|
31
|
-
title: 'Restricted block',
|
|
32
|
-
type: 'boolean',
|
|
33
|
-
},
|
|
34
59
|
},
|
|
35
60
|
required: [],
|
|
36
|
-
};
|
|
61
|
+
});
|
|
37
62
|
|
|
38
63
|
export default Schema;
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,14 @@ import {
|
|
|
6
6
|
GroupBlockDefaultBody,
|
|
7
7
|
} from './components';
|
|
8
8
|
import codeSVG from '@plone/volto/icons/row.svg';
|
|
9
|
+
import { defineMessages } from 'react-intl';
|
|
10
|
+
|
|
11
|
+
defineMessages({
|
|
12
|
+
sectionGroup: {
|
|
13
|
+
id: 'Section (Group)',
|
|
14
|
+
defaultMessage: 'Section (Group)',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
9
17
|
|
|
10
18
|
const applyConfig = (config) => {
|
|
11
19
|
const choices = Object.keys(config.blocks.blocksConfig)
|