@eeacms/volto-hero-block 8.0.0 → 9.0.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/.eslintrc.js +6 -6
- package/CHANGELOG.md +54 -1
- package/DEVELOP.md +19 -17
- package/README.md +42 -19
- package/docker-compose.yml +1 -1
- package/jest-addon.config.js +23 -4
- package/jest.setup.js +23 -12
- package/locales/de/LC_MESSAGES/volto.po +118 -0
- package/locales/en/LC_MESSAGES/volto.po +118 -0
- package/locales/it/LC_MESSAGES/volto.po +118 -0
- package/locales/ro/LC_MESSAGES/volto.po +118 -0
- package/locales/volto.pot +120 -2
- package/package.json +1 -1
- package/src/components/Blocks/Hero/Copyright.test.jsx +1 -1
- package/src/components/Blocks/Hero/Edit.jsx +7 -20
- package/src/components/Blocks/Hero/Edit.test.jsx +18 -25
- package/src/components/Blocks/Hero/Hero.test.jsx +1 -1
- package/src/components/Blocks/Hero/View.jsx +3 -2
- package/src/components/Blocks/Hero/{schema.js → schema.jsx} +1 -1
- package/src/components/Blocks/Hero/schema.test.js +1 -1
- package/src/helpers.test.js +1 -1
- package/test-mocks/voltoFormValidationValidators.js +20 -0
- package/tsconfig.json +10 -0
- package/volto-form-validation-validators.d.ts +34 -0
- /package/src/{hooks.test.js → hooks.test.jsx} +0 -0
package/.eslintrc.js
CHANGED
|
@@ -16,16 +16,16 @@ if (configFile) {
|
|
|
16
16
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const { AddonRegistry } = require('@plone/registry/addon-registry');
|
|
20
|
+
const { registry } = AddonRegistry.init(projectRootPath);
|
|
21
21
|
|
|
22
22
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(
|
|
23
|
+
const addonAliases = Object.keys(registry.packages).map((o) => [
|
|
24
24
|
o,
|
|
25
|
-
|
|
25
|
+
registry.packages[o].modulePath,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
|
-
const addonExtenders =
|
|
28
|
+
const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
|
|
29
29
|
|
|
30
30
|
const defaultConfig = {
|
|
31
31
|
extends: `${voltoPath}/.eslintrc`,
|
|
@@ -34,7 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
alias: {
|
|
35
35
|
map: [
|
|
36
36
|
['@plone/volto', '@plone/volto/src'],
|
|
37
|
-
['@plone/volto-slate', '@plone/volto
|
|
37
|
+
['@plone/volto-slate', '@plone/volto-slate/src'],
|
|
38
38
|
...addonAliases,
|
|
39
39
|
['@package', `${__dirname}/src`],
|
|
40
40
|
['@root', `${__dirname}/src`],
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,28 @@ 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
|
+
### [9.0.1](https://github.com/eea/volto-hero-block/compare/9.0.0...9.0.1) - 8 April 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: make test [Alin V. (Claudiu) - [`839060d`](https://github.com/eea/volto-hero-block/commit/839060d74771fc646ecfed16a536c0eebecba46a)]
|
|
12
|
+
|
|
13
|
+
## [9.0.0](https://github.com/eea/volto-hero-block/compare/8.0.0...9.0.0) - 27 March 2026
|
|
14
|
+
|
|
15
|
+
#### :rocket: New Features
|
|
16
|
+
|
|
17
|
+
- feat: Volto 18 support - refs #287700 [Alin Voinea - [`7ab8b04`](https://github.com/eea/volto-hero-block/commit/7ab8b04936147abf80d2ebbfce08137f9c66d00b)]
|
|
18
|
+
|
|
19
|
+
#### :house: Internal changes
|
|
20
|
+
|
|
21
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`5581aa4`](https://github.com/eea/volto-hero-block/commit/5581aa40d4aa1890ff3486170b0007f00a47b505)]
|
|
22
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`18798f8`](https://github.com/eea/volto-hero-block/commit/18798f8a62abd11e4e01d366463c577578629412)]
|
|
23
|
+
|
|
24
|
+
#### :hammer_and_wrench: Others
|
|
25
|
+
|
|
26
|
+
- Release 9.0.0: Volto 18 support [Alin Voinea - [`3d3af30`](https://github.com/eea/volto-hero-block/commit/3d3af3008f021e800e221c0b22cd9939e26f18f1)]
|
|
27
|
+
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`b6ebf27`](https://github.com/eea/volto-hero-block/commit/b6ebf2720a72ef3ac1a5194d0c69d48c19e03630)]
|
|
28
|
+
## [8.0.0](https://github.com/eea/volto-hero-block/compare/7.1.0...8.0.0) - 28 July 2025
|
|
8
29
|
|
|
9
30
|
#### :house: Internal changes
|
|
10
31
|
|
|
@@ -17,6 +38,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
17
38
|
#### :hammer_and_wrench: Others
|
|
18
39
|
|
|
19
40
|
- rafactor: do not preload the image as the LCP improvement is negligible [nileshgulia1 - [`dd49a13`](https://github.com/eea/volto-hero-block/commit/dd49a13ddb538d18278631eb46134926e384963d)]
|
|
41
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`20e15a7`](https://github.com/eea/volto-hero-block/commit/20e15a70a00c846260470f75171ea74d24beaf7e)]
|
|
42
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9ed437b`](https://github.com/eea/volto-hero-block/commit/9ed437bf5180812b9116c4bfbaad80c4fb65fc6c)]
|
|
43
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33f3f8c`](https://github.com/eea/volto-hero-block/commit/33f3f8c5a740b80bc50b27926533b758682fe5fd)]
|
|
20
44
|
- revert to background image with image preload [vladcalin-edw - [`34a9533`](https://github.com/eea/volto-hero-block/commit/34a953327e9778c4a34c8c1b587cfe179b0f05ff)]
|
|
21
45
|
- passing tests [vladcalin-edw - [`840ad7b`](https://github.com/eea/volto-hero-block/commit/840ad7b05395c913d712bb90eb64cc3e129f8646)]
|
|
22
46
|
- removed console [vladcalin-edw - [`b47d199`](https://github.com/eea/volto-hero-block/commit/b47d1994fce50a5715580c117775e365ac9ab16c)]
|
|
@@ -31,6 +55,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
31
55
|
- small fixes [vladcalin-edw - [`e45156f`](https://github.com/eea/volto-hero-block/commit/e45156f7592690b9f06113b799c87cd6d49f6316)]
|
|
32
56
|
- switched to img [vladcalin-edw - [`51e9362`](https://github.com/eea/volto-hero-block/commit/51e9362d8cb04894be032fd602df270dcc2c441f)]
|
|
33
57
|
- background image preload [vladcalin-edw - [`f5b2e20`](https://github.com/eea/volto-hero-block/commit/f5b2e205ae93d4d51b73fd2c6a05659184150f39)]
|
|
58
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`eb87dd8`](https://github.com/eea/volto-hero-block/commit/eb87dd8ba3160a82fa1b8f8e1bd3a1a7d4c0e306)]
|
|
59
|
+
- Add Sonarqube tag using ied-frontend addons list [EEA Jenkins - [`c91a9e5`](https://github.com/eea/volto-hero-block/commit/c91a9e587c515061adcf3979bdc59e9ce63b27c3)]
|
|
34
60
|
### [7.1.0](https://github.com/eea/volto-hero-block/compare/7.0.1...7.1.0) - 28 June 2024
|
|
35
61
|
|
|
36
62
|
#### :bug: Bug Fixes
|
|
@@ -66,6 +92,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
66
92
|
|
|
67
93
|
#### :hammer_and_wrench: Others
|
|
68
94
|
|
|
95
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`462fff7`](https://github.com/eea/volto-hero-block/commit/462fff7cc0d1898d17a73e4e4e38057642042524)]
|
|
69
96
|
### [6.0.1](https://github.com/eea/volto-hero-block/compare/6.0.0...6.0.1) - 5 April 2024
|
|
70
97
|
|
|
71
98
|
#### :house: Internal changes
|
|
@@ -122,6 +149,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
122
149
|
- Allow multiline editing of hero block [Tiberiu Ichim - [`373d1a0`](https://github.com/eea/volto-hero-block/commit/373d1a0d243b8e0b3df31f2a51a3c5df62f48214)]
|
|
123
150
|
- Allow multiline editing of hero block [Tiberiu Ichim - [`b674ca5`](https://github.com/eea/volto-hero-block/commit/b674ca589502a81aaf6abed75dbf8b83ac1731fb)]
|
|
124
151
|
- fix ESlint [Teodor - [`1439495`](https://github.com/eea/volto-hero-block/commit/14394952ef587f71be8b2c762c7e19698d8a55e4)]
|
|
152
|
+
- Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`f133e20`](https://github.com/eea/volto-hero-block/commit/f133e2017ff9c3f13e6c44ce3e6b7757a25b129f)]
|
|
125
153
|
- test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`de6a206`](https://github.com/eea/volto-hero-block/commit/de6a206bed9afd53d97f5e6d70e2391ccc01f0f1)]
|
|
126
154
|
### [5.4.6](https://github.com/eea/volto-hero-block/compare/5.4.5...5.4.6) - 27 November 2023
|
|
127
155
|
|
|
@@ -135,9 +163,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
135
163
|
|
|
136
164
|
#### :house: Internal changes
|
|
137
165
|
|
|
166
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`df8242c`](https://github.com/eea/volto-hero-block/commit/df8242c62eb8c706c3854f6bb4a6984932463571)]
|
|
138
167
|
|
|
139
168
|
#### :hammer_and_wrench: Others
|
|
140
169
|
|
|
170
|
+
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`4ea90f6`](https://github.com/eea/volto-hero-block/commit/4ea90f6a23c92fe631ee6025dbe5ee27ec030665)]
|
|
171
|
+
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`6e9d7f5`](https://github.com/eea/volto-hero-block/commit/6e9d7f593363e08f519ab8296aef229ed2682113)]
|
|
172
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`067fa27`](https://github.com/eea/volto-hero-block/commit/067fa27ee26d1d348d5ce1b089ea9931d9f32589)]
|
|
173
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`0f6a259`](https://github.com/eea/volto-hero-block/commit/0f6a259fc73db97a7a8af69a808421191b146629)]
|
|
174
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`c1c72f4`](https://github.com/eea/volto-hero-block/commit/c1c72f4b54a84521f200682b230bba60e6920a70)]
|
|
175
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`65744c9`](https://github.com/eea/volto-hero-block/commit/65744c9b2b0944d2aff90fc56485f10390810d1c)]
|
|
141
176
|
### [5.4.5](https://github.com/eea/volto-hero-block/compare/5.4.4...5.4.5) - 19 October 2023
|
|
142
177
|
|
|
143
178
|
### [5.4.4](https://github.com/eea/volto-hero-block/compare/5.4.3...5.4.4) - 19 October 2023
|
|
@@ -177,12 +212,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
177
212
|
- test: add unit tests for Hero, Edit, helpers, hooks - refs #254313 [ana-oprea - [`89b39af`](https://github.com/eea/volto-hero-block/commit/89b39afe7ad5ce94d341482be91ab55e2c1a31ed)]
|
|
178
213
|
- i18n: Add en [Alin Voinea - [`9cdb7f1`](https://github.com/eea/volto-hero-block/commit/9cdb7f1ff9d81dade3d91551b53cf7200f08937e)]
|
|
179
214
|
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`0fe0d91`](https://github.com/eea/volto-hero-block/commit/0fe0d91fe9c43d10574990e9b163ffc49fe5bee7)]
|
|
215
|
+
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`b1d1446`](https://github.com/eea/volto-hero-block/commit/b1d14467bcde28023b2831235928db1f328d6b0a)]
|
|
180
216
|
### [5.4.1](https://github.com/eea/volto-hero-block/compare/5.4.0...5.4.1) - 24 July 2023
|
|
181
217
|
|
|
182
218
|
### [5.4.0](https://github.com/eea/volto-hero-block/compare/5.3.1...5.4.0) - 12 June 2023
|
|
183
219
|
|
|
184
220
|
#### :house: Internal changes
|
|
185
221
|
|
|
222
|
+
- chore: [JENKINS] Deprecate circularity website [valentinab25 - [`395db48`](https://github.com/eea/volto-hero-block/commit/395db484f73c2dd2c56233c120a9620340f17d0b)]
|
|
186
223
|
|
|
187
224
|
#### :hammer_and_wrench: Others
|
|
188
225
|
|
|
@@ -203,6 +240,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
203
240
|
- put return statement [Dobricean Ioan Dorian - [`8eff5fd`](https://github.com/eea/volto-hero-block/commit/8eff5fdf977fcbb8cc952d3f45b577b02ca59cb9)]
|
|
204
241
|
- change name and refactor to be more efficent [Dobricean Ioan Dorian - [`ff24145`](https://github.com/eea/volto-hero-block/commit/ff2414542833998ef282376de3fbda8698287849)]
|
|
205
242
|
- stop-image-disappear over and over [Dobricean Ioan Dorian - [`c5b6f54`](https://github.com/eea/volto-hero-block/commit/c5b6f545ac422d95b8d802349aa4cf27af820829)]
|
|
243
|
+
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3d38dd0`](https://github.com/eea/volto-hero-block/commit/3d38dd09a36525bda448f67a6d218bc7690a4cc3)]
|
|
206
244
|
### [5.3.0](https://github.com/eea/volto-hero-block/compare/5.2.0...5.3.0) - 27 March 2023
|
|
207
245
|
|
|
208
246
|
#### :rocket: New Features
|
|
@@ -241,9 +279,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
241
279
|
- fix onScreen hook error #16 from eea/fix-onscreen-hook [ichim-david - [`9123541`](https://github.com/eea/volto-hero-block/commit/91235413f423d7e6c4788d70b687b3ed5d4884b4)]
|
|
242
280
|
- no need for comments [andreiggr - [`a14f9c3`](https://github.com/eea/volto-hero-block/commit/a14f9c3bdddfa22e6b4bbc8318f0ca5bdc9c2d38)]
|
|
243
281
|
- fix hook [andreiggr - [`f7fae73`](https://github.com/eea/volto-hero-block/commit/f7fae73007f79af2f06da1d9b72a53ad86fef4ac)]
|
|
282
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6b78fc0`](https://github.com/eea/volto-hero-block/commit/6b78fc044a933ab9b4b4694901aa26628ef0a836)]
|
|
244
283
|
- eslint [andreiggr - [`68451b7`](https://github.com/eea/volto-hero-block/commit/68451b725420015fbd5b695e97b8742988d49913)]
|
|
245
284
|
- lazy load huge img on first 10px [andreiggr - [`67dc7d3`](https://github.com/eea/volto-hero-block/commit/67dc7d3475188d692e053032c2639dd1a585c029)]
|
|
246
285
|
- lazy load huge bgimage wip [andreiggr - [`86e45ec`](https://github.com/eea/volto-hero-block/commit/86e45ece842f1cd7452920dffa3a9b4aea945f56)]
|
|
286
|
+
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`87cbb38`](https://github.com/eea/volto-hero-block/commit/87cbb383290a168f85703573670e17f4e1ed7747)]
|
|
247
287
|
## [4.0.0](https://github.com/eea/volto-hero-block/compare/3.0.1...4.0.0) - 7 February 2023
|
|
248
288
|
|
|
249
289
|
#### :nail_care: Enhancements
|
|
@@ -269,6 +309,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
269
309
|
|
|
270
310
|
#### :hammer_and_wrench: Others
|
|
271
311
|
|
|
312
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`ab85c7b`](https://github.com/eea/volto-hero-block/commit/ab85c7bd5bd1e3aec95e02f9b4d026b1203d5739)]
|
|
272
313
|
## [3.0.0](https://github.com/eea/volto-hero-block/compare/2.1.0...3.0.0) - 22 December 2022
|
|
273
314
|
|
|
274
315
|
#### :rocket: New Features
|
|
@@ -277,8 +318,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
277
318
|
|
|
278
319
|
#### :hammer_and_wrench: Others
|
|
279
320
|
|
|
321
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f06f58c`](https://github.com/eea/volto-hero-block/commit/f06f58c7cd4cfc15a03208e9c7a4e31fe2eba2f6)]
|
|
322
|
+
- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`20e5bcb`](https://github.com/eea/volto-hero-block/commit/20e5bcb3c4dd538595741928319c3204c5d18f8c)]
|
|
280
323
|
- Cosmetics [Alin Voinea - [`9dac70c`](https://github.com/eea/volto-hero-block/commit/9dac70c0a3bea8e188ede9123f4f99de8e0f6987)]
|
|
281
324
|
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`2d4005f`](https://github.com/eea/volto-hero-block/commit/2d4005f0f31b121e1b7d2e94414f3dff92ec1a16)]
|
|
325
|
+
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`2931fcc`](https://github.com/eea/volto-hero-block/commit/2931fccbee5f8e117e5ae9095ba57e63e465ddb3)]
|
|
282
326
|
### [2.1.0](https://github.com/eea/volto-hero-block/compare/2.0.0...2.1.0) - 12 December 2022
|
|
283
327
|
|
|
284
328
|
#### :bug: Bug Fixes
|
|
@@ -287,6 +331,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
287
331
|
|
|
288
332
|
#### :hammer_and_wrench: Others
|
|
289
333
|
|
|
334
|
+
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`93be4f9`](https://github.com/eea/volto-hero-block/commit/93be4f96fb72cacfc25f9b058cb379d80060ee13)]
|
|
335
|
+
- yarn 3 [Alin Voinea - [`8e2dccd`](https://github.com/eea/volto-hero-block/commit/8e2dccd47cbef3c0871407baa376ce61c540c754)]
|
|
336
|
+
- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`6bc3af3`](https://github.com/eea/volto-hero-block/commit/6bc3af35b4edf07971d1b0ce1648965e8d6e3bc0)]
|
|
337
|
+
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`d7dbbd2`](https://github.com/eea/volto-hero-block/commit/d7dbbd21277dd76bf59d91a4dc8e022b2a6ff99c)]
|
|
338
|
+
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`3c1f0d6`](https://github.com/eea/volto-hero-block/commit/3c1f0d6e7f8e5318aee3413ec3687d8492376f9d)]
|
|
339
|
+
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`843017a`](https://github.com/eea/volto-hero-block/commit/843017aa7dbea71cc7888663496e352d287440b4)]
|
|
290
340
|
## [2.0.0](https://github.com/eea/volto-hero-block/compare/1.0.0...2.0.0) - 16 November 2022
|
|
291
341
|
|
|
292
342
|
#### :nail_care: Enhancements
|
|
@@ -296,6 +346,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
296
346
|
#### :hammer_and_wrench: Others
|
|
297
347
|
|
|
298
348
|
- test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`b8f0971`](https://github.com/eea/volto-hero-block/commit/b8f0971b21a5334d40c1b8f5103cea61d9ffe6f1)]
|
|
349
|
+
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`581dedf`](https://github.com/eea/volto-hero-block/commit/581dedf07410ef2ca09e6ddaa05fbf176400adbb)]
|
|
299
350
|
## [1.0.0](https://github.com/eea/volto-hero-block/compare/0.2.0...1.0.0) - 28 October 2022
|
|
300
351
|
|
|
301
352
|
#### :nail_care: Enhancements
|
|
@@ -307,6 +358,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
307
358
|
- Remove cypress.json [Alin Voinea - [`593bdf2`](https://github.com/eea/volto-hero-block/commit/593bdf207ca4fd3f2393117b6f64a44727881ad0)]
|
|
308
359
|
- test(cypress): Upgrade to Cypress 10 / Razzle 4 [Alin Voinea - [`edd48a5`](https://github.com/eea/volto-hero-block/commit/edd48a5c13824bce5e03e46790f1890656b340d8)]
|
|
309
360
|
- Cleanup [Alin Voinea - [`9d72ee7`](https://github.com/eea/volto-hero-block/commit/9d72ee7a06d1c6fed46586d30bb85eae39e670bf)]
|
|
361
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`95986d0`](https://github.com/eea/volto-hero-block/commit/95986d0b8fd5c3cbb9e6da9059f71e066a8e171b)]
|
|
310
362
|
### [0.2.0](https://github.com/eea/volto-hero-block/compare/0.1.4...0.2.0) - 6 July 2022
|
|
311
363
|
|
|
312
364
|
#### :bug: Bug Fixes
|
|
@@ -345,6 +397,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
345
397
|
- Update slate footnote support [Miu Razvan - [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)]
|
|
346
398
|
- Use justify content for text and button as well [Miu Razvan - [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)]
|
|
347
399
|
- Add dependencies [Miu Razvan - [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)]
|
|
400
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b415422`](https://github.com/eea/volto-hero-block/commit/b41542285edd29440a324b101a4dbae9334830bf)]
|
|
348
401
|
### 0.1.0 - 10 June 2022
|
|
349
402
|
|
|
350
403
|
#### :hammer_and_wrench: Others
|
package/DEVELOP.md
CHANGED
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
|
|
27
27
|
### Or add @eeacms/volto-hero-block to your Volto project
|
|
28
28
|
|
|
29
|
-
Before starting make sure your development environment is properly set. See [Volto
|
|
29
|
+
Before starting make sure your development environment is properly set. See the official Plone documentation for [creating a project with Cookieplone](https://6.docs.plone.org/install/create-project-cookieplone.html) and [installing an add-on in development mode in Volto 18 and 19](https://6.docs.plone.org/volto/development/add-ons/install-an-add-on-dev-18.html).
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1. Create a new Volto project with Cookieplone
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-hero-block --skip-install
|
|
38
|
-
cd my-volto-project
|
|
35
|
+
uvx cookieplone project
|
|
36
|
+
cd project-title
|
|
39
37
|
|
|
40
38
|
1. Add the following to `mrs.developer.json`:
|
|
41
39
|
|
|
42
40
|
{
|
|
43
41
|
"volto-hero-block": {
|
|
42
|
+
"output": "packages",
|
|
44
43
|
"url": "https://github.com/eea/volto-hero-block.git",
|
|
45
44
|
"package": "@eeacms/volto-hero-block",
|
|
46
45
|
"branch": "develop",
|
|
@@ -48,28 +47,31 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
1.
|
|
50
|
+
1. Add `@eeacms/volto-hero-block` to the `addons` key in your project `volto.config.js`
|
|
51
|
+
|
|
52
|
+
1. Install or refresh the project setup
|
|
52
53
|
|
|
53
|
-
make
|
|
54
|
-
yarn
|
|
54
|
+
make install
|
|
55
55
|
|
|
56
|
-
1. Start backend
|
|
56
|
+
1. Start backend in one terminal
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
make backend-start
|
|
59
59
|
|
|
60
|
-
...wait for backend to setup and start
|
|
60
|
+
...wait for backend to setup and start, ending with `Ready to handle requests`
|
|
61
61
|
|
|
62
62
|
...you can also check http://localhost:8080/Plone
|
|
63
63
|
|
|
64
|
-
1. Start frontend
|
|
64
|
+
1. Start frontend in a second terminal
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
make frontend-start
|
|
67
67
|
|
|
68
68
|
1. Go to http://localhost:3000
|
|
69
69
|
|
|
70
70
|
1. Happy hacking!
|
|
71
71
|
|
|
72
|
-
cd
|
|
72
|
+
cd packages/volto-hero-block
|
|
73
|
+
|
|
74
|
+
For legacy Volto 17 projects, keep using the yarn-based workflow from the Volto 17 documentation.
|
|
73
75
|
|
|
74
76
|
## Cypress
|
|
75
77
|
|
|
@@ -81,7 +83,7 @@ project where you added `volto-hero-block` to `mrs.developer.json`
|
|
|
81
83
|
Go to:
|
|
82
84
|
|
|
83
85
|
```BASH
|
|
84
|
-
cd
|
|
86
|
+
cd packages/volto-hero-block/
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
Start:
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-hero-block/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-hero-block/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-hero-block
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-hero-block/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-hero-block
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-hero-block&branch=develop)
|
|
16
16
|
|
|
17
17
|
Enhanced Hero Block [Volto](https://github.com/plone/volto) add-on
|
|
18
18
|
|
|
@@ -22,6 +22,15 @@ Enhanced Hero Block [Volto](https://github.com/plone/volto) add-on
|
|
|
22
22
|
|
|
23
23
|
## Upgrade
|
|
24
24
|
|
|
25
|
+
### Upgrading to 9.x
|
|
26
|
+
|
|
27
|
+
> This version requires `Volto >= 17.18` or `Volto 18+`. It removes the custom `EditBlockWrapper` usage in favor of Volto's built-in block chrome provided by `BlocksForm`.
|
|
28
|
+
|
|
29
|
+
#### Breaking changes
|
|
30
|
+
|
|
31
|
+
- **Removed `EditBlockWrapper` render prop from `BlocksForm`.** The `BlocksForm` children render prop that wrapped each inner block in `<EditBlockWrapper>` has been removed. `BlocksForm` now handles block chrome internally via Volto core's `EditBlockWrapper`. Any code that relied on the children render prop pattern in the hero block's `Edit` component will need to be updated.
|
|
32
|
+
- **`disableInnerButtons`** continues to work via the existing CSS rules in `edit.css` rather than the previously used `disabled` prop on `EditBlockWrapper`.
|
|
33
|
+
|
|
25
34
|
### Upgrading to 2.x
|
|
26
35
|
|
|
27
36
|
This version requires: `@plone/volto >= 16.0.0.alpha.46` (schemaEnhancer / addStyling).
|
|
@@ -47,6 +56,11 @@ This is useful in case you have to add some sub titles or extra paragraphs insid
|
|
|
47
56
|
|
|
48
57
|
Go to http://localhost:3000
|
|
49
58
|
|
|
59
|
+
`make start` now defaults to Volto 18. To run the same setup against Volto 17, use:
|
|
60
|
+
|
|
61
|
+
VOLTO_VERSION=17 make
|
|
62
|
+
VOLTO_VERSION=17 make start
|
|
63
|
+
|
|
50
64
|
### Add volto-hero-block to your Volto project
|
|
51
65
|
|
|
52
66
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
@@ -60,30 +74,39 @@ Go to http://localhost:3000
|
|
|
60
74
|
- If you already have a volto project, just update `package.json`:
|
|
61
75
|
|
|
62
76
|
```JSON
|
|
63
|
-
"addons": [
|
|
64
|
-
"@eeacms/volto-hero-block"
|
|
65
|
-
],
|
|
66
|
-
|
|
67
77
|
"dependencies": {
|
|
68
78
|
"@eeacms/volto-hero-block": "*"
|
|
69
79
|
}
|
|
70
80
|
```
|
|
71
81
|
|
|
72
|
-
|
|
82
|
+
and `volto.config.js`:
|
|
73
83
|
|
|
84
|
+
```JavaScript
|
|
85
|
+
const addons = ['@eeacms/volto-hero-block'];
|
|
74
86
|
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
87
|
+
|
|
88
|
+
- If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
uvx cookieplone project
|
|
92
|
+
cd project-title
|
|
78
93
|
```
|
|
79
94
|
|
|
80
|
-
1. Install
|
|
95
|
+
1. Install or update dependencies, then start the project:
|
|
81
96
|
|
|
82
97
|
```
|
|
83
|
-
|
|
84
|
-
yarn start
|
|
98
|
+
make install
|
|
85
99
|
```
|
|
86
100
|
|
|
101
|
+
For a Cookieplone project, start the backend and frontend in separate terminals:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
make backend-start
|
|
105
|
+
make frontend-start
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
For a legacy Volto 17 project, install the package with `yarn` and restart the frontend as usual.
|
|
109
|
+
|
|
87
110
|
1. Go to http://localhost:3000
|
|
88
111
|
|
|
89
112
|
1. Happy editing!
|
package/docker-compose.yml
CHANGED
package/jest-addon.config.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
require('dotenv').config({ path: __dirname + '/.env' });
|
|
2
2
|
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
// Volto 18 exposes @plone/volto-slate as a top-level package.
|
|
7
|
+
const voltoSlatePath = fs.existsSync(
|
|
8
|
+
path.join(
|
|
9
|
+
__dirname,
|
|
10
|
+
'..',
|
|
11
|
+
'..',
|
|
12
|
+
'..',
|
|
13
|
+
'node_modules',
|
|
14
|
+
'@plone',
|
|
15
|
+
'volto-slate',
|
|
16
|
+
'src',
|
|
17
|
+
),
|
|
18
|
+
)
|
|
19
|
+
? '<rootDir>/node_modules/@plone/volto-slate/src'
|
|
20
|
+
: '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src';
|
|
21
|
+
|
|
3
22
|
module.exports = {
|
|
4
23
|
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
5
24
|
collectCoverageFrom: [
|
|
@@ -10,6 +29,8 @@ module.exports = {
|
|
|
10
29
|
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
11
30
|
'@plone/volto/cypress': '<rootDir>/node_modules/@plone/volto/cypress',
|
|
12
31
|
'@plone/volto/babel': '<rootDir>/node_modules/@plone/volto/babel',
|
|
32
|
+
'@plone/volto/helpers/FormValidation/validators':
|
|
33
|
+
'<rootDir>/src/addons/volto-hero-block/test-mocks/voltoFormValidationValidators.js',
|
|
13
34
|
'@plone/volto/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
14
35
|
'@package/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
15
36
|
'@root/(.*)$': '<rootDir>/node_modules/@plone/volto/src/$1',
|
|
@@ -17,10 +38,8 @@ module.exports = {
|
|
|
17
38
|
'@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
|
|
18
39
|
'@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
|
|
19
40
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
20
|
-
'@plone/volto-slate$':
|
|
21
|
-
|
|
22
|
-
'@plone/volto-slate/(.*)$':
|
|
23
|
-
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
|
|
41
|
+
'@plone/volto-slate$': voltoSlatePath,
|
|
42
|
+
'@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
|
|
24
43
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
25
44
|
'load-volto-addons':
|
|
26
45
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
package/jest.setup.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jest } from '@jest/globals';
|
|
2
2
|
import configureStore from 'redux-mock-store';
|
|
3
3
|
import thunk from 'redux-thunk';
|
|
4
|
-
import { blocksConfig } from '@plone/volto/config/Blocks';
|
|
5
|
-
import installSlate from '@plone/volto-slate/index';
|
|
6
4
|
|
|
7
5
|
var mockSemanticComponents = jest.requireActual('semantic-ui-react');
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
var config = {
|
|
7
|
+
blocks: {
|
|
8
|
+
blocksConfig: {},
|
|
9
|
+
},
|
|
10
|
+
settings: {
|
|
11
|
+
apiPath: 'http://localhost:3000',
|
|
12
|
+
slate: {
|
|
13
|
+
textblockExtensions: [],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
jest.doMock('semantic-ui-react', () => ({
|
|
@@ -29,14 +31,23 @@ jest.doMock('semantic-ui-react', () => ({
|
|
|
29
31
|
jest.doMock('@plone/volto/components', () => {
|
|
30
32
|
return {
|
|
31
33
|
__esModule: true,
|
|
32
|
-
...mockComponents,
|
|
33
34
|
SidebarPortal: ({ children }) => <div id="sidebar">{children}</div>,
|
|
35
|
+
UniversalLink: ({ children, href = '', ...props }) => (
|
|
36
|
+
<a href={href} {...props}>
|
|
37
|
+
{children}
|
|
38
|
+
</a>
|
|
39
|
+
),
|
|
40
|
+
RenderBlocks: () => <div />,
|
|
41
|
+
BlocksForm: ({ children }) =>
|
|
42
|
+
typeof children === 'function' ? children({}, <div />, {}) : children,
|
|
43
|
+
BlockDataForm: () => <div />,
|
|
34
44
|
};
|
|
35
45
|
});
|
|
36
46
|
|
|
37
|
-
jest.doMock('@plone/volto/registry', () =>
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
jest.doMock('@plone/volto/registry', () => ({
|
|
48
|
+
__esModule: true,
|
|
49
|
+
default: config,
|
|
50
|
+
}));
|
|
40
51
|
|
|
41
52
|
const mockStore = configureStore([thunk]);
|
|
42
53
|
|
|
@@ -11,4 +11,122 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "A short hint that describes the expected value within this block"
|
|
15
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
16
|
+
msgid "A short hint that describes the expected value within this block"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
19
|
+
#. Default: "Allow only the following blocks types"
|
|
20
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
21
|
+
msgid "Allow only the following blocks types"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#. Default: "Default"
|
|
25
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
26
|
+
msgid "Default"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#. Default: "Detailed expected value within this block"
|
|
30
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
31
|
+
msgid "Detailed expected value within this block"
|
|
32
|
+
msgstr ""
|
|
33
|
+
|
|
34
|
+
#. Default: "Disable creation of new blocks after this block"
|
|
35
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
36
|
+
msgid "Disable creation of new blocks after this block"
|
|
37
|
+
msgstr ""
|
|
38
|
+
|
|
39
|
+
#. Default: "Disable drag & drop on this block"
|
|
40
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
41
|
+
msgid "Disable drag & drop on this block"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#. Default: "Disable editing on hero block settings"
|
|
45
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
46
|
+
msgid "Disable editing on hero block settings"
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#. Default: "Disable editing on hero titles"
|
|
50
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
51
|
+
msgid "Disable editing on hero titles"
|
|
52
|
+
msgstr ""
|
|
53
|
+
|
|
54
|
+
#. Default: "Disable editing on this block"
|
|
55
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
56
|
+
msgid "Disable editing on this block"
|
|
57
|
+
msgstr ""
|
|
58
|
+
|
|
59
|
+
#. Default: "Disable inner buttons"
|
|
60
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
61
|
+
msgid "Disable inner buttons"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. Default: "Disable new blocks"
|
|
65
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
66
|
+
msgid "Disable new blocks"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. Default: "Don't allow deletion of this block"
|
|
70
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
71
|
+
msgid "Don't allow deletion of this block"
|
|
72
|
+
msgstr ""
|
|
14
73
|
|
|
74
|
+
#. Default: "Fixed layout"
|
|
75
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
76
|
+
msgid "Fixed layout"
|
|
77
|
+
msgstr ""
|
|
78
|
+
|
|
79
|
+
#. Default: "Fixed layout, New panes (tabs) created by Editor within this block will be ignored"
|
|
80
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
81
|
+
msgid "Fixed layout, New panes (tabs) created by Editor within this block will be ignored"
|
|
82
|
+
msgstr ""
|
|
83
|
+
|
|
84
|
+
#. Default: "Fixed position"
|
|
85
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
86
|
+
msgid "Fixed position"
|
|
87
|
+
msgstr ""
|
|
88
|
+
|
|
89
|
+
#. Default: "Helper text"
|
|
90
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
91
|
+
msgid "Helper text"
|
|
92
|
+
msgstr ""
|
|
93
|
+
|
|
94
|
+
#. Default: "Hero"
|
|
95
|
+
#: components/Blocks/Hero/index
|
|
96
|
+
msgid "Hero"
|
|
97
|
+
msgstr ""
|
|
98
|
+
|
|
99
|
+
#. Default: "Hero block settings"
|
|
100
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
101
|
+
msgid "Hero block settings"
|
|
102
|
+
msgstr ""
|
|
103
|
+
|
|
104
|
+
#. Default: "Hide all block related buttons within this block"
|
|
105
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
106
|
+
msgid "Hide all block related buttons within this block"
|
|
107
|
+
msgstr ""
|
|
108
|
+
|
|
109
|
+
#. Default: "Instructions"
|
|
110
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
111
|
+
msgid "Instructions"
|
|
112
|
+
msgstr ""
|
|
113
|
+
|
|
114
|
+
#. Default: "Read-only"
|
|
115
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
116
|
+
msgid "Read-only"
|
|
117
|
+
msgstr ""
|
|
118
|
+
|
|
119
|
+
#. Default: "Read-only settings"
|
|
120
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
121
|
+
msgid "Read-only settings"
|
|
122
|
+
msgstr ""
|
|
123
|
+
|
|
124
|
+
#. Default: "Read-only titles"
|
|
125
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
126
|
+
msgid "Read-only titles"
|
|
127
|
+
msgstr ""
|
|
128
|
+
|
|
129
|
+
#. Default: "Required"
|
|
130
|
+
#: components/Blocks/Hero/LayoutSchema
|
|
131
|
+
msgid "Required"
|
|
132
|
+
msgstr ""
|