@eeacms/volto-hero-block 9.0.0 → 9.0.2

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 CHANGED
@@ -16,16 +16,16 @@ if (configFile) {
16
16
  voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
17
17
  }
18
18
 
19
- const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
20
- const reg = new AddonConfigurationRegistry(projectRootPath);
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(reg.packages).map((o) => [
23
+ const addonAliases = Object.keys(registry.packages).map((o) => [
24
24
  o,
25
- reg.packages[o].modulePath,
25
+ registry.packages[o].modulePath,
26
26
  ]);
27
27
 
28
- const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
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/packages/volto-slate/src'],
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,15 @@ 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
- ### [9.0.0](https://github.com/eea/volto-hero-block/compare/8.0.0...9.0.0) - 27 March 2026
7
+ ### [9.0.2](https://github.com/eea/volto-hero-block/compare/9.0.1...9.0.2) - 9 April 2026
8
+
9
+ ### [9.0.1](https://github.com/eea/volto-hero-block/compare/9.0.0...9.0.1) - 9 April 2026
10
+
11
+ #### :bug: Bug Fixes
12
+
13
+ - fix: make test [Alin V. (Claudiu) - [`839060d`](https://github.com/eea/volto-hero-block/commit/839060d74771fc646ecfed16a536c0eebecba46a)]
14
+
15
+ ## [9.0.0](https://github.com/eea/volto-hero-block/compare/8.0.0...9.0.0) - 27 March 2026
8
16
 
9
17
  #### :rocket: New Features
10
18
 
@@ -12,9 +20,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
12
20
 
13
21
  #### :house: Internal changes
14
22
 
23
+ - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`5581aa4`](https://github.com/eea/volto-hero-block/commit/5581aa40d4aa1890ff3486170b0007f00a47b505)]
24
+ - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`18798f8`](https://github.com/eea/volto-hero-block/commit/18798f8a62abd11e4e01d366463c577578629412)]
15
25
 
16
26
  #### :hammer_and_wrench: Others
17
27
 
28
+ - Release 9.0.0: Volto 18 support [Alin Voinea - [`3d3af30`](https://github.com/eea/volto-hero-block/commit/3d3af3008f021e800e221c0b22cd9939e26f18f1)]
18
29
  - tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`b6ebf27`](https://github.com/eea/volto-hero-block/commit/b6ebf2720a72ef3ac1a5194d0c69d48c19e03630)]
19
30
  ## [8.0.0](https://github.com/eea/volto-hero-block/compare/7.1.0...8.0.0) - 28 July 2025
20
31
 
@@ -29,6 +40,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
29
40
  #### :hammer_and_wrench: Others
30
41
 
31
42
  - rafactor: do not preload the image as the LCP improvement is negligible [nileshgulia1 - [`dd49a13`](https://github.com/eea/volto-hero-block/commit/dd49a13ddb538d18278631eb46134926e384963d)]
43
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`20e15a7`](https://github.com/eea/volto-hero-block/commit/20e15a70a00c846260470f75171ea74d24beaf7e)]
44
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`9ed437b`](https://github.com/eea/volto-hero-block/commit/9ed437bf5180812b9116c4bfbaad80c4fb65fc6c)]
45
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`33f3f8c`](https://github.com/eea/volto-hero-block/commit/33f3f8c5a740b80bc50b27926533b758682fe5fd)]
32
46
  - revert to background image with image preload [vladcalin-edw - [`34a9533`](https://github.com/eea/volto-hero-block/commit/34a953327e9778c4a34c8c1b587cfe179b0f05ff)]
33
47
  - passing tests [vladcalin-edw - [`840ad7b`](https://github.com/eea/volto-hero-block/commit/840ad7b05395c913d712bb90eb64cc3e129f8646)]
34
48
  - removed console [vladcalin-edw - [`b47d199`](https://github.com/eea/volto-hero-block/commit/b47d1994fce50a5715580c117775e365ac9ab16c)]
@@ -43,6 +57,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
43
57
  - small fixes [vladcalin-edw - [`e45156f`](https://github.com/eea/volto-hero-block/commit/e45156f7592690b9f06113b799c87cd6d49f6316)]
44
58
  - switched to img [vladcalin-edw - [`51e9362`](https://github.com/eea/volto-hero-block/commit/51e9362d8cb04894be032fd602df270dcc2c441f)]
45
59
  - background image preload [vladcalin-edw - [`f5b2e20`](https://github.com/eea/volto-hero-block/commit/f5b2e205ae93d4d51b73fd2c6a05659184150f39)]
60
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`eb87dd8`](https://github.com/eea/volto-hero-block/commit/eb87dd8ba3160a82fa1b8f8e1bd3a1a7d4c0e306)]
61
+ - Add Sonarqube tag using ied-frontend addons list [EEA Jenkins - [`c91a9e5`](https://github.com/eea/volto-hero-block/commit/c91a9e587c515061adcf3979bdc59e9ce63b27c3)]
46
62
  ### [7.1.0](https://github.com/eea/volto-hero-block/compare/7.0.1...7.1.0) - 28 June 2024
47
63
 
48
64
  #### :bug: Bug Fixes
@@ -78,6 +94,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
78
94
 
79
95
  #### :hammer_and_wrench: Others
80
96
 
97
+ - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`462fff7`](https://github.com/eea/volto-hero-block/commit/462fff7cc0d1898d17a73e4e4e38057642042524)]
81
98
  ### [6.0.1](https://github.com/eea/volto-hero-block/compare/6.0.0...6.0.1) - 5 April 2024
82
99
 
83
100
  #### :house: Internal changes
@@ -134,6 +151,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
134
151
  - Allow multiline editing of hero block [Tiberiu Ichim - [`373d1a0`](https://github.com/eea/volto-hero-block/commit/373d1a0d243b8e0b3df31f2a51a3c5df62f48214)]
135
152
  - Allow multiline editing of hero block [Tiberiu Ichim - [`b674ca5`](https://github.com/eea/volto-hero-block/commit/b674ca589502a81aaf6abed75dbf8b83ac1731fb)]
136
153
  - fix ESlint [Teodor - [`1439495`](https://github.com/eea/volto-hero-block/commit/14394952ef587f71be8b2c762c7e19698d8a55e4)]
154
+ - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`f133e20`](https://github.com/eea/volto-hero-block/commit/f133e2017ff9c3f13e6c44ce3e6b7757a25b129f)]
137
155
  - test: Update jest,Jenkinsfile,lint to volto-addons-template PR30 [valentinab25 - [`de6a206`](https://github.com/eea/volto-hero-block/commit/de6a206bed9afd53d97f5e6d70e2391ccc01f0f1)]
138
156
  ### [5.4.6](https://github.com/eea/volto-hero-block/compare/5.4.5...5.4.6) - 27 November 2023
139
157
 
@@ -147,9 +165,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
147
165
 
148
166
  #### :house: Internal changes
149
167
 
168
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`df8242c`](https://github.com/eea/volto-hero-block/commit/df8242c62eb8c706c3854f6bb4a6984932463571)]
150
169
 
151
170
  #### :hammer_and_wrench: Others
152
171
 
172
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`4ea90f6`](https://github.com/eea/volto-hero-block/commit/4ea90f6a23c92fe631ee6025dbe5ee27ec030665)]
173
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`6e9d7f5`](https://github.com/eea/volto-hero-block/commit/6e9d7f593363e08f519ab8296aef229ed2682113)]
174
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`067fa27`](https://github.com/eea/volto-hero-block/commit/067fa27ee26d1d348d5ce1b089ea9931d9f32589)]
175
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`0f6a259`](https://github.com/eea/volto-hero-block/commit/0f6a259fc73db97a7a8af69a808421191b146629)]
176
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`c1c72f4`](https://github.com/eea/volto-hero-block/commit/c1c72f4b54a84521f200682b230bba60e6920a70)]
177
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`65744c9`](https://github.com/eea/volto-hero-block/commit/65744c9b2b0944d2aff90fc56485f10390810d1c)]
153
178
  ### [5.4.5](https://github.com/eea/volto-hero-block/compare/5.4.4...5.4.5) - 19 October 2023
154
179
 
155
180
  ### [5.4.4](https://github.com/eea/volto-hero-block/compare/5.4.3...5.4.4) - 19 October 2023
@@ -189,12 +214,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
189
214
  - test: add unit tests for Hero, Edit, helpers, hooks - refs #254313 [ana-oprea - [`89b39af`](https://github.com/eea/volto-hero-block/commit/89b39afe7ad5ce94d341482be91ab55e2c1a31ed)]
190
215
  - i18n: Add en [Alin Voinea - [`9cdb7f1`](https://github.com/eea/volto-hero-block/commit/9cdb7f1ff9d81dade3d91551b53cf7200f08937e)]
191
216
  - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`0fe0d91`](https://github.com/eea/volto-hero-block/commit/0fe0d91fe9c43d10574990e9b163ffc49fe5bee7)]
217
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`b1d1446`](https://github.com/eea/volto-hero-block/commit/b1d14467bcde28023b2831235928db1f328d6b0a)]
192
218
  ### [5.4.1](https://github.com/eea/volto-hero-block/compare/5.4.0...5.4.1) - 24 July 2023
193
219
 
194
220
  ### [5.4.0](https://github.com/eea/volto-hero-block/compare/5.3.1...5.4.0) - 12 June 2023
195
221
 
196
222
  #### :house: Internal changes
197
223
 
224
+ - chore: [JENKINS] Deprecate circularity website [valentinab25 - [`395db48`](https://github.com/eea/volto-hero-block/commit/395db484f73c2dd2c56233c120a9620340f17d0b)]
198
225
 
199
226
  #### :hammer_and_wrench: Others
200
227
 
@@ -215,6 +242,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
215
242
  - put return statement [Dobricean Ioan Dorian - [`8eff5fd`](https://github.com/eea/volto-hero-block/commit/8eff5fdf977fcbb8cc952d3f45b577b02ca59cb9)]
216
243
  - change name and refactor to be more efficent [Dobricean Ioan Dorian - [`ff24145`](https://github.com/eea/volto-hero-block/commit/ff2414542833998ef282376de3fbda8698287849)]
217
244
  - stop-image-disappear over and over [Dobricean Ioan Dorian - [`c5b6f54`](https://github.com/eea/volto-hero-block/commit/c5b6f545ac422d95b8d802349aa4cf27af820829)]
245
+ - Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`3d38dd0`](https://github.com/eea/volto-hero-block/commit/3d38dd09a36525bda448f67a6d218bc7690a4cc3)]
218
246
  ### [5.3.0](https://github.com/eea/volto-hero-block/compare/5.2.0...5.3.0) - 27 March 2023
219
247
 
220
248
  #### :rocket: New Features
@@ -253,9 +281,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
253
281
  - fix onScreen hook error #16 from eea/fix-onscreen-hook [ichim-david - [`9123541`](https://github.com/eea/volto-hero-block/commit/91235413f423d7e6c4788d70b687b3ed5d4884b4)]
254
282
  - no need for comments [andreiggr - [`a14f9c3`](https://github.com/eea/volto-hero-block/commit/a14f9c3bdddfa22e6b4bbc8318f0ca5bdc9c2d38)]
255
283
  - fix hook [andreiggr - [`f7fae73`](https://github.com/eea/volto-hero-block/commit/f7fae73007f79af2f06da1d9b72a53ad86fef4ac)]
284
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`6b78fc0`](https://github.com/eea/volto-hero-block/commit/6b78fc044a933ab9b4b4694901aa26628ef0a836)]
256
285
  - eslint [andreiggr - [`68451b7`](https://github.com/eea/volto-hero-block/commit/68451b725420015fbd5b695e97b8742988d49913)]
257
286
  - lazy load huge img on first 10px [andreiggr - [`67dc7d3`](https://github.com/eea/volto-hero-block/commit/67dc7d3475188d692e053032c2639dd1a585c029)]
258
287
  - lazy load huge bgimage wip [andreiggr - [`86e45ec`](https://github.com/eea/volto-hero-block/commit/86e45ece842f1cd7452920dffa3a9b4aea945f56)]
288
+ - Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`87cbb38`](https://github.com/eea/volto-hero-block/commit/87cbb383290a168f85703573670e17f4e1ed7747)]
259
289
  ## [4.0.0](https://github.com/eea/volto-hero-block/compare/3.0.1...4.0.0) - 7 February 2023
260
290
 
261
291
  #### :nail_care: Enhancements
@@ -281,6 +311,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
281
311
 
282
312
  #### :hammer_and_wrench: Others
283
313
 
314
+ - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`ab85c7b`](https://github.com/eea/volto-hero-block/commit/ab85c7bd5bd1e3aec95e02f9b4d026b1203d5739)]
284
315
  ## [3.0.0](https://github.com/eea/volto-hero-block/compare/2.1.0...3.0.0) - 22 December 2022
285
316
 
286
317
  #### :rocket: New Features
@@ -289,8 +320,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
289
320
 
290
321
  #### :hammer_and_wrench: Others
291
322
 
323
+ - Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`f06f58c`](https://github.com/eea/volto-hero-block/commit/f06f58c7cd4cfc15a03208e9c7a4e31fe2eba2f6)]
324
+ - Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`20e5bcb`](https://github.com/eea/volto-hero-block/commit/20e5bcb3c4dd538595741928319c3204c5d18f8c)]
292
325
  - Cosmetics [Alin Voinea - [`9dac70c`](https://github.com/eea/volto-hero-block/commit/9dac70c0a3bea8e188ede9123f4f99de8e0f6987)]
293
326
  - test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`2d4005f`](https://github.com/eea/volto-hero-block/commit/2d4005f0f31b121e1b7d2e94414f3dff92ec1a16)]
327
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`2931fcc`](https://github.com/eea/volto-hero-block/commit/2931fccbee5f8e117e5ae9095ba57e63e465ddb3)]
294
328
  ### [2.1.0](https://github.com/eea/volto-hero-block/compare/2.0.0...2.1.0) - 12 December 2022
295
329
 
296
330
  #### :bug: Bug Fixes
@@ -299,6 +333,12 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
299
333
 
300
334
  #### :hammer_and_wrench: Others
301
335
 
336
+ - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`93be4f9`](https://github.com/eea/volto-hero-block/commit/93be4f96fb72cacfc25f9b058cb379d80060ee13)]
337
+ - yarn 3 [Alin Voinea - [`8e2dccd`](https://github.com/eea/volto-hero-block/commit/8e2dccd47cbef3c0871407baa376ce61c540c754)]
338
+ - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`6bc3af3`](https://github.com/eea/volto-hero-block/commit/6bc3af35b4edf07971d1b0ce1648965e8d6e3bc0)]
339
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`d7dbbd2`](https://github.com/eea/volto-hero-block/commit/d7dbbd21277dd76bf59d91a4dc8e022b2a6ff99c)]
340
+ - Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`3c1f0d6`](https://github.com/eea/volto-hero-block/commit/3c1f0d6e7f8e5318aee3413ec3687d8492376f9d)]
341
+ - Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`843017a`](https://github.com/eea/volto-hero-block/commit/843017aa7dbea71cc7888663496e352d287440b4)]
302
342
  ## [2.0.0](https://github.com/eea/volto-hero-block/compare/1.0.0...2.0.0) - 16 November 2022
303
343
 
304
344
  #### :nail_care: Enhancements
@@ -308,6 +348,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
308
348
  #### :hammer_and_wrench: Others
309
349
 
310
350
  - test(estlint): Fix .project.eslintrc.js [Alin Voinea - [`b8f0971`](https://github.com/eea/volto-hero-block/commit/b8f0971b21a5334d40c1b8f5103cea61d9ffe6f1)]
351
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`581dedf`](https://github.com/eea/volto-hero-block/commit/581dedf07410ef2ca09e6ddaa05fbf176400adbb)]
311
352
  ## [1.0.0](https://github.com/eea/volto-hero-block/compare/0.2.0...1.0.0) - 28 October 2022
312
353
 
313
354
  #### :nail_care: Enhancements
@@ -319,6 +360,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
319
360
  - Remove cypress.json [Alin Voinea - [`593bdf2`](https://github.com/eea/volto-hero-block/commit/593bdf207ca4fd3f2393117b6f64a44727881ad0)]
320
361
  - test(cypress): Upgrade to Cypress 10 / Razzle 4 [Alin Voinea - [`edd48a5`](https://github.com/eea/volto-hero-block/commit/edd48a5c13824bce5e03e46790f1890656b340d8)]
321
362
  - Cleanup [Alin Voinea - [`9d72ee7`](https://github.com/eea/volto-hero-block/commit/9d72ee7a06d1c6fed46586d30bb85eae39e670bf)]
363
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`95986d0`](https://github.com/eea/volto-hero-block/commit/95986d0b8fd5c3cbb9e6da9059f71e066a8e171b)]
322
364
  ### [0.2.0](https://github.com/eea/volto-hero-block/compare/0.1.4...0.2.0) - 6 July 2022
323
365
 
324
366
  #### :bug: Bug Fixes
@@ -357,6 +399,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
357
399
  - Update slate footnote support [Miu Razvan - [`c1522b4`](https://github.com/eea/volto-hero-block/commit/c1522b4164dbe6de01771d211d7e0bf3009f44d4)]
358
400
  - Use justify content for text and button as well [Miu Razvan - [`08599cc`](https://github.com/eea/volto-hero-block/commit/08599cc45546d9b349128c4f8ce9c01318385811)]
359
401
  - Add dependencies [Miu Razvan - [`30e2881`](https://github.com/eea/volto-hero-block/commit/30e2881a2a97a899e7f4cc614a0405c300ac6fee)]
402
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b415422`](https://github.com/eea/volto-hero-block/commit/b41542285edd29440a324b101a4dbae9334830bf)]
360
403
  ### 0.1.0 - 10 June 2022
361
404
 
362
405
  #### :hammer_and_wrench: Others
@@ -49,7 +49,7 @@ module.exports = {
49
49
  ],
50
50
  transform: {
51
51
  '^.+\\.js(x)?$': 'babel-jest',
52
- '^.+\\.ts(x)?$': 'ts-jest',
52
+ '^.+\\.ts(x)?$': 'babel-jest',
53
53
  '^.+\\.(png)$': 'jest-file',
54
54
  '^.+\\.(jpg)$': 'jest-file',
55
55
  '^.+\\.(svg)$': './node_modules/@plone/volto/jest-svgsystem-transform.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-hero-block",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "@eeacms/volto-hero-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -31,8 +31,7 @@
31
31
  "dotenv": "^16.3.2",
32
32
  "husky": "^8.0.3",
33
33
  "lint-staged": "^14.0.1",
34
- "md5": "^2.3.0",
35
- "ts-jest": "^26.4.2"
34
+ "md5": "^2.3.0"
36
35
  },
37
36
  "lint-staged": {
38
37
  "src/**/*.{js,jsx,ts,tsx,json}": [
@@ -3,17 +3,15 @@ import cx from 'classnames';
3
3
  import isFunction from 'lodash/isFunction';
4
4
  import { Icon } from 'semantic-ui-react';
5
5
  import config from '@plone/volto/registry';
6
- import { BlocksForm } from '@plone/volto/components';
6
+ import BlocksForm from '@plone/volto/components/manage/Blocks/Block/BlocksForm';
7
7
  import { v4 as uuid } from 'uuid';
8
8
  import '@eeacms/volto-hero-block/components/Blocks/Hero/edit.css';
9
9
 
10
- import { isEmpty } from 'lodash';
11
- import {
12
- BlockDataForm,
13
- SidebarPortal,
14
- UniversalLink,
15
- } from '@plone/volto/components';
16
- import { BodyClass } from '@plone/volto/helpers';
10
+ import isEmpty from 'lodash/isEmpty';
11
+ import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
12
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
13
+ import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
14
+ import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
17
15
  import { getFieldURL } from '@plone/volto/helpers/Url/Url';
18
16
  import { HeroBlockSchema } from './schema';
19
17
  import Copyright from './Copyright';
@@ -16,20 +16,25 @@ const mockStore = configureStore([]);
16
16
  const observe = jest.fn();
17
17
  const unobserve = jest.fn();
18
18
  const disconnect = jest.fn();
19
- jest.mock('@plone/volto/components', () => {
20
- return {
21
- __esModule: true,
22
- BlocksForm: ({ placeholder }) => (
23
- <div id="test">
24
- <div>{placeholder}</div>
25
- </div>
26
- ),
27
- SidebarPortal: ({ children }) => <div>{children}</div>,
28
- BlockDataForm: () => <div></div>,
29
- UniversalLink: () => <div></div>,
30
- RenderBlocks: () => <div></div>,
31
- };
19
+ jest.mock('@plone/volto/components/manage/Blocks/Block/BlocksForm', () => {
20
+ return ({ placeholder }) => (
21
+ <div id="test">
22
+ <div>{placeholder}</div>
23
+ </div>
24
+ );
32
25
  });
26
+
27
+ jest.mock('@plone/volto/components/manage/Form/BlockDataForm', () => {
28
+ return () => <div></div>;
29
+ });
30
+ jest.mock('@plone/volto/components/manage/Sidebar/SidebarPortal', () => ({
31
+ __esModule: true,
32
+ default: ({ children }) => <div>{children}</div>,
33
+ }));
34
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => ({
35
+ __esModule: true,
36
+ default: () => <div></div>,
37
+ }));
33
38
  jest.mock('react-router-dom', () => ({
34
39
  useLocation: jest.fn().mockReturnValue({
35
40
  pathname: '/test-jest',
@@ -1,8 +1,9 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import cx from 'classnames';
3
3
  import { Icon } from 'semantic-ui-react';
4
- import { UniversalLink, RenderBlocks } from '@plone/volto/components';
5
- import { BodyClass } from '@plone/volto/helpers';
4
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
5
+ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
6
+ import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
6
7
  import { useLocation } from 'react-router-dom';
7
8
  import Hero from './Hero';
8
9
  import Copyright from './Copyright';
@@ -1,4 +1,4 @@
1
- import { addStyling } from '@plone/volto/helpers';
1
+ import { addStyling } from '@plone/volto/helpers/Extensions';
2
2
  import config from '@plone/volto/registry';
3
3
 
4
4
  import alignTopSVG from '@plone/volto/icons/move-up.svg';
@@ -1,7 +1,7 @@
1
1
  import { stylingSchema, HeroBlockSchema } from './schema';
2
2
  import config from '@plone/volto/registry';
3
3
 
4
- jest.mock('@plone/volto/helpers', () => ({
4
+ jest.mock('@plone/volto/helpers/Extensions', () => ({
5
5
  addStyling: jest.fn((schema) => schema),
6
6
  }));
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { createSlateHeader, serializeText } from './helpers';
2
- import { isArray } from 'lodash';
2
+ import isArray from 'lodash/isArray';
3
3
  import { serializeNodes } from '@plone/volto-slate/editor/render';
4
4
 
5
5
  jest.mock('@plone/volto-slate/editor/render', () => ({
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "paths": {
5
- "@plone/volto/helpers/FormValidation/validators": [
6
- "node_modules/@plone/volto/src/helpers/FormValidation/validators.ts"
7
- ]
8
- }
9
- }
10
- }
@@ -1,34 +0,0 @@
1
- declare module '@plone/volto/helpers/FormValidation/validators' {
2
- export const minLengthValidator: (...args: any[]) => any;
3
- export const maxLengthValidator: (...args: any[]) => any;
4
- export const urlValidator: (...args: any[]) => any;
5
- export const emailValidator: (...args: any[]) => any;
6
- export const isNumberValidator: (...args: any[]) => any;
7
- export const maximumValidator: (...args: any[]) => any;
8
- export const minimumValidator: (...args: any[]) => any;
9
- export const isIntegerValidator: (...args: any[]) => any;
10
- export const maxItemsValidator: (...args: any[]) => any;
11
- export const minItemsValidator: (...args: any[]) => any;
12
- export const hasUniqueItemsValidator: (...args: any[]) => any;
13
- export const startEventDateRangeValidator: (...args: any[]) => any;
14
- export const endEventDateRangeValidator: (...args: any[]) => any;
15
- export const patternValidator: (...args: any[]) => any;
16
- export const defaultLanguageControlPanelValidator: (...args: any[]) => any;
17
- export const sizeValidator: (...args: any[]) => any;
18
- }
19
-
20
- declare module 'react-router-hash-link' {
21
- export const HashLink: any;
22
- }
23
-
24
- declare module '@plone/volto/helpers/Url/Url' {
25
- export const flattenToAppURL: (...args: any[]) => any;
26
- export const isInternalURL: (...args: any[]) => any;
27
- export const getFieldURL: (...args: any[]) => any;
28
- export const URLUtils: any;
29
- }
30
-
31
- declare module '@plone/volto/registry' {
32
- const config: any;
33
- export default config;
34
- }
File without changes