@eeacms/volto-group-block 7.0.1 → 7.1.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 +12 -0
- package/locales/de/LC_MESSAGES/volto.po +63 -3
- package/locales/en/LC_MESSAGES/volto.po +62 -2
- package/locales/it/LC_MESSAGES/volto.po +62 -2
- package/locales/ro/LC_MESSAGES/volto.po +62 -2
- package/locales/volto.pot +64 -4
- package/package.json +3 -3
- package/src/components/manage/Blocks/Group/Edit.jsx +17 -4
- package/src/components/manage/Blocks/Group/EditBlockWrapper.jsx +13 -5
- package/src/components/manage/Blocks/Group/EditSchema.jsx +46 -9
- package/src/index.js +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ 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.1.1](https://github.com/eea/volto-group-block/compare/7.1.0...7.1.1) - 30 January 2025
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- chore: package.json [Alin Voinea - [`fee5337`](https://github.com/eea/volto-group-block/commit/fee5337586cc6c7fe5b9aa11eaeaa860aadcea00)]
|
|
12
|
+
|
|
13
|
+
### [7.1.0](https://github.com/eea/volto-group-block/compare/7.0.1...7.1.0) - 20 August 2024
|
|
14
|
+
|
|
15
|
+
#### :rocket: New Features
|
|
16
|
+
|
|
17
|
+
- feat(section): restrict group block option - ref #273963 [Miu Razvan - [`061b348`](https://github.com/eea/volto-group-block/commit/061b348880b54daa9b27232a914422622afe3677)]
|
|
18
|
+
|
|
7
19
|
### [7.0.1](https://github.com/eea/volto-group-block/compare/7.0.0...7.0.1) - 6 August 2024
|
|
8
20
|
|
|
9
21
|
#### :bug: Bug Fixes
|
|
@@ -11,12 +11,72 @@ 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: "Restricted block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "restrictedBlockTitle"
|
|
62
|
+
msgstr "Eingeschränkter Block"
|
|
63
|
+
|
|
64
|
+
#. Default: "Section block"
|
|
65
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
66
|
+
msgid "sectionBlock"
|
|
67
|
+
msgstr "Abschnittsblock"
|
|
68
|
+
|
|
69
|
+
#. Default: "Section"
|
|
70
|
+
#: components/manage/Blocks/Group/Edit
|
|
71
|
+
msgid "sectionTitle"
|
|
72
|
+
msgstr "Abschnitt"
|
|
73
|
+
|
|
74
|
+
#. Default: "Section friendly name"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyDescription"
|
|
77
|
+
msgstr "Kurzname für den Abschnitt"
|
|
78
|
+
|
|
79
|
+
#. Default: "Title"
|
|
80
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
81
|
+
msgid "titlePropertyTitle"
|
|
82
|
+
msgstr "Titel"
|
|
@@ -11,12 +11,72 @@ 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: "Restricted block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "restrictedBlockTitle"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section block"
|
|
65
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
66
|
+
msgid "sectionBlock"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section"
|
|
70
|
+
#: components/manage/Blocks/Group/Edit
|
|
71
|
+
msgid "sectionTitle"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Section friendly name"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyDescription"
|
|
77
|
+
msgstr ""
|
|
78
|
+
|
|
79
|
+
#. Default: "Title"
|
|
80
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
81
|
+
msgid "titlePropertyTitle"
|
|
82
|
+
msgstr ""
|
|
@@ -11,12 +11,72 @@ 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: "Restricted block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "restrictedBlockTitle"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section block"
|
|
65
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
66
|
+
msgid "sectionBlock"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section"
|
|
70
|
+
#: components/manage/Blocks/Group/Edit
|
|
71
|
+
msgid "sectionTitle"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Section friendly name"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyDescription"
|
|
77
|
+
msgstr ""
|
|
78
|
+
|
|
79
|
+
#. Default: "Title"
|
|
80
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
81
|
+
msgid "titlePropertyTitle"
|
|
82
|
+
msgstr ""
|
|
@@ -11,12 +11,72 @@ 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: "Restricted block"
|
|
60
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
61
|
+
msgid "restrictedBlockTitle"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Section block"
|
|
65
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
66
|
+
msgid "sectionBlock"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Section"
|
|
70
|
+
#: components/manage/Blocks/Group/Edit
|
|
71
|
+
msgid "sectionTitle"
|
|
72
|
+
msgstr ""
|
|
73
|
+
|
|
74
|
+
#. Default: "Section friendly name"
|
|
75
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
76
|
+
msgid "titlePropertyDescription"
|
|
77
|
+
msgstr ""
|
|
78
|
+
|
|
79
|
+
#. Default: "Title"
|
|
80
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
81
|
+
msgid "titlePropertyTitle"
|
|
82
|
+
msgstr ""
|
package/locales/volto.pot
CHANGED
|
@@ -1,24 +1,84 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2025-01-14T10:28:22.719Z\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: "Restricted block"
|
|
62
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
63
|
+
msgid "restrictedBlockTitle"
|
|
64
|
+
msgstr ""
|
|
65
|
+
|
|
66
|
+
#. Default: "Section block"
|
|
67
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
68
|
+
msgid "sectionBlock"
|
|
69
|
+
msgstr ""
|
|
70
|
+
|
|
71
|
+
#. Default: "Section"
|
|
72
|
+
#: components/manage/Blocks/Group/Edit
|
|
73
|
+
msgid "sectionTitle"
|
|
74
|
+
msgstr ""
|
|
75
|
+
|
|
76
|
+
#. Default: "Section friendly name"
|
|
77
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
78
|
+
msgid "titlePropertyDescription"
|
|
79
|
+
msgstr ""
|
|
80
|
+
|
|
81
|
+
#. Default: "Title"
|
|
82
|
+
#: components/manage/Blocks/Group/EditSchema
|
|
83
|
+
msgid "titlePropertyTitle"
|
|
84
|
+
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-group-block",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
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,11 +139,11 @@ 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
|
-
this.setState({
|
|
137
|
-
addNewBlockOpened: !
|
|
138
|
-
});
|
|
144
|
+
this.setState((prevState) => ({
|
|
145
|
+
addNewBlockOpened: !prevState.addNewBlockOpened,
|
|
146
|
+
}));
|
|
139
147
|
}}
|
|
140
148
|
className="group-block-add-button"
|
|
141
149
|
>
|
|
@@ -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,54 @@
|
|
|
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
|
+
restrictedBlockTitle: {
|
|
29
|
+
id: 'restrictedBlockTitle',
|
|
30
|
+
defaultMessage: 'Restricted block',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const Schema = (intl) => ({
|
|
35
|
+
title: intl.formatMessage(messages.sectionBlock),
|
|
3
36
|
fieldsets: [
|
|
4
37
|
{
|
|
5
38
|
id: 'default',
|
|
6
|
-
title:
|
|
7
|
-
fields: ['title', 'as'],
|
|
39
|
+
title: intl.formatMessage(messages.fieldsetDefaultTitle),
|
|
40
|
+
fields: ['title', 'as', 'restrictedBlock'],
|
|
8
41
|
},
|
|
9
42
|
],
|
|
10
43
|
properties: {
|
|
11
44
|
title: {
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
45
|
+
title: intl.formatMessage(messages.titlePropertyTitle),
|
|
46
|
+
description: intl.formatMessage(messages.titlePropertyDescription),
|
|
14
47
|
type: 'string',
|
|
15
48
|
},
|
|
16
49
|
as: {
|
|
17
|
-
title:
|
|
18
|
-
description:
|
|
50
|
+
title: intl.formatMessage(messages.asPropertyTitle),
|
|
51
|
+
description: intl.formatMessage(messages.asPropertyDescription),
|
|
19
52
|
type: 'string',
|
|
20
53
|
factory: 'Choice',
|
|
21
54
|
default: 'div',
|
|
@@ -27,8 +60,12 @@ const Schema = {
|
|
|
27
60
|
['details', 'details'],
|
|
28
61
|
],
|
|
29
62
|
},
|
|
63
|
+
restrictedBlock: {
|
|
64
|
+
title: intl.formatMessage(messages.restrictedBlockTitle),
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
},
|
|
30
67
|
},
|
|
31
68
|
required: [],
|
|
32
|
-
};
|
|
69
|
+
});
|
|
33
70
|
|
|
34
71
|
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)
|
|
@@ -33,6 +41,19 @@ const applyConfig = (config) => {
|
|
|
33
41
|
},
|
|
34
42
|
},
|
|
35
43
|
};
|
|
44
|
+
|
|
45
|
+
if (!config.blocks.blocksConfig.empty) {
|
|
46
|
+
config.blocks.blocksConfig.empty = {
|
|
47
|
+
id: 'empty',
|
|
48
|
+
edit: () => {
|
|
49
|
+
return null;
|
|
50
|
+
},
|
|
51
|
+
view: () => {
|
|
52
|
+
return null;
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
36
57
|
config.blocks.blocksConfig.group = {
|
|
37
58
|
id: 'group',
|
|
38
59
|
title: 'Section (Group)',
|