@eeacms/volto-embed 10.1.4 → 11.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.
Files changed (38) hide show
  1. package/.eslintrc.js +6 -6
  2. package/CHANGELOG.md +36 -2
  3. package/DEVELOP.md +19 -17
  4. package/README.md +33 -19
  5. package/docker-compose.yml +1 -1
  6. package/jest-addon.config.js +11 -4
  7. package/locales/de/LC_MESSAGES/volto.po +2 -2
  8. package/locales/en/LC_MESSAGES/volto.po +1 -1
  9. package/locales/it/LC_MESSAGES/volto.po +1 -1
  10. package/locales/ro/LC_MESSAGES/volto.po +1 -1
  11. package/locales/volto.pot +2 -2
  12. package/package.json +1 -1
  13. package/src/Blocks/EmbedMaps/Edit.jsx +1 -1
  14. package/src/Blocks/EmbedMaps/{Edit.test.js → Edit.test.jsx} +4 -6
  15. package/src/Blocks/EmbedMaps/View.jsx +5 -3
  16. package/src/Blocks/EmbedMaps/{View.test.js → View.test.jsx} +9 -1
  17. package/src/Blocks/Maps/Edit.jsx +7 -4
  18. package/src/Blocks/Maps/{Edit.test.js → Edit.test.jsx} +1 -1
  19. package/src/Blocks/Maps/MapsSidebar.jsx +2 -1
  20. package/src/Blocks/Maps/View.jsx +1 -1
  21. package/src/Blocks/Maps/{View.test.js → View.test.jsx} +9 -1
  22. package/src/Blocks/index.js +1 -1
  23. package/src/EmbedMap/EmbedMap.jsx +3 -1
  24. package/src/EmbedMap/{EmbedMap.test.js → EmbedMap.test.jsx} +1 -1
  25. package/src/PrivacyProtection/PrivacyProtection.jsx +7 -3
  26. package/src/Toolbar/Enlarge.jsx +1 -1
  27. package/src/Toolbar/FigureNote.jsx +4 -3
  28. package/src/Toolbar/MoreInfo.jsx +1 -1
  29. package/src/Toolbar/Sources.jsx +1 -1
  30. package/src/Toolbar/Sources.test.jsx +9 -1
  31. package/src/Toolbar/{Toolbar.test.js → Toolbar.test.jsx} +9 -1
  32. package/src/Views/MapView.jsx +1 -1
  33. package/src/Views/{MapView.test.js → MapView.test.jsx} +9 -1
  34. package/src/Widgets/MapWidget.test.jsx +1 -1
  35. package/src/Widgets/MapsWidget.jsx +15 -6
  36. package/src/helpers.js +1 -1
  37. /package/src/Blocks/EmbedMaps/{schema.js → schema.jsx} +0 -0
  38. /package/src/Blocks/Maps/{schema.js → schema.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 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,11 +4,27 @@ 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
- ### [10.1.4](https://github.com/eea/volto-embed/compare/10.1.3...10.1.4) - 22 October 2025
7
+ ### [11.0.1](https://github.com/eea/volto-embed/compare/11.0.0...11.0.1) - 8 April 2026
8
8
 
9
9
  #### :bug: Bug Fixes
10
10
 
11
- - fix(MapsWidget): add higher z-index [Miu Razvan - [`bc98a03`](https://github.com/eea/volto-embed/commit/bc98a0345ea12f235c271bb542a90448e82be447)]
11
+ - fix: make test [Alin V. (Claudiu) - [`48a5d78`](https://github.com/eea/volto-embed/commit/48a5d7841971c5f4a00057c8f5bae76c298a49ad)]
12
+
13
+ ## [11.0.0](https://github.com/eea/volto-embed/compare/10.1.4...11.0.0) - 24 March 2026
14
+
15
+ #### :rocket: New Features
16
+
17
+ - feat: Volto 18 support - refs #287700 [Alin Voinea - [`ba90eb9`](https://github.com/eea/volto-embed/commit/ba90eb98b99fa22a6aed77d6129d8e98d7c0de36)]
18
+
19
+ #### :house: Internal changes
20
+
21
+ - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`9c76ba6`](https://github.com/eea/volto-embed/commit/9c76ba6f0b9a3b5247e3620c3466a828b3c58364)]
22
+ - chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`6830021`](https://github.com/eea/volto-embed/commit/6830021746cab2066f12f205ef43e858e2bcc914)]
23
+
24
+ #### :hammer_and_wrench: Others
25
+
26
+ - tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`712e55a`](https://github.com/eea/volto-embed/commit/712e55acc78f6596a7df8ca51c250c91221275e2)]
27
+ ### [10.1.4](https://github.com/eea/volto-embed/compare/10.1.3...10.1.4) - 22 October 2025
12
28
 
13
29
  #### :hammer_and_wrench: Others
14
30
 
@@ -56,6 +72,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
56
72
  - add useScreenHeight prop [Miu Razvan - [`a261a59`](https://github.com/eea/volto-embed/commit/a261a593892f44845579b2c0aa764e22bbf48e73)]
57
73
  - fix tests [Miu Razvan - [`0798660`](https://github.com/eea/volto-embed/commit/0798660ce054a7a60e4c3888cb63ba9c131a42f8)]
58
74
  - Set interactiv map height to window innerheight, ref #272831 [Miu Razvan - [`5ac9eb5`](https://github.com/eea/volto-embed/commit/5ac9eb5e66cdc626b33d0bdad5b80994af2d7d79)]
75
+ - Add Sonarqube tag using insitu-frontend addons list [EEA Jenkins - [`d99c3dc`](https://github.com/eea/volto-embed/commit/d99c3dc2151f6576b127e3c751fabaae3ad676b8)]
59
76
  ### [10.0.2](https://github.com/eea/volto-embed/compare/10.0.1...10.0.2) - 7 June 2024
60
77
 
61
78
  #### :bug: Bug Fixes
@@ -141,6 +158,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
141
158
 
142
159
  - test: increase coverage [kreafox - [`2d8e43c`](https://github.com/eea/volto-embed/commit/2d8e43cf3988564306b6aa7b885b0ff398043ce0)]
143
160
  - test: increase coverage [kreafox - [`1fa9052`](https://github.com/eea/volto-embed/commit/1fa9052a3c015361e3a7eae043c418b696262fbe)]
161
+ - test: [JENKINS] fail with logs on coverage [valentinab25 - [`eaabce8`](https://github.com/eea/volto-embed/commit/eaabce87f1ed4b88a25bfc59a75285e858413d6a)]
144
162
  - test: increase cypress timeout [kreafox - [`9bb40a5`](https://github.com/eea/volto-embed/commit/9bb40a5df2b29a55edec24a57fcd6e65f270f13c)]
145
163
  - test: updates [kreafox - [`5b54d02`](https://github.com/eea/volto-embed/commit/5b54d02c6b6392e25f07ef1e286bdbced999592e)]
146
164
  - test: update snapshot [kreafox - [`338f23e`](https://github.com/eea/volto-embed/commit/338f23ee5c6c75ccb6ee2d8d474298553fe3bd53)]
@@ -197,11 +215,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
197
215
  - update [Miu Razvan - [`926beb8`](https://github.com/eea/volto-embed/commit/926beb87d2c44907aebe57369312eea7bf22d656)]
198
216
  - update [Miu Razvan - [`da351ae`](https://github.com/eea/volto-embed/commit/da351ae9ffaaef756f7a665618a03fd04cb9b01d)]
199
217
  - use volto-datablocks@develop dependency [Miu Razvan - [`b379d84`](https://github.com/eea/volto-embed/commit/b379d8478657dd39dad066181b349cee7ac2531d)]
218
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`ddf685a`](https://github.com/eea/volto-embed/commit/ddf685a9481d780a1df2e4f991f93676478c3e05)]
200
219
  ## [8.0.0](https://github.com/eea/volto-embed/compare/7.0.2...8.0.0) - 17 November 2023
201
220
 
202
221
  #### :hammer_and_wrench: Others
203
222
 
204
223
  - tests: add cypress tests [nileshgulia1 - [`e4b2803`](https://github.com/eea/volto-embed/commit/e4b28033114170639787d77976dc13b7f697f704)]
224
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`83d91d5`](https://github.com/eea/volto-embed/commit/83d91d5716a9ce8ebbbff01a7838711298684be4)]
205
225
  - fix error [Claudia Ifrim - [`553f3af`](https://github.com/eea/volto-embed/commit/553f3af004af034c721dcd6b01de55c258a88c49)]
206
226
  - bump version [Miu Razvan - [`363694a`](https://github.com/eea/volto-embed/commit/363694ae50cdec941fb53b396b75e9a4554d44fb)]
207
227
  ### [7.0.2](https://github.com/eea/volto-embed/compare/7.0.1...7.0.2) - 10 November 2023
@@ -211,6 +231,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
211
231
  #### :hammer_and_wrench: Others
212
232
 
213
233
  - add missing less variable [Miu Razvan - [`47683a7`](https://github.com/eea/volto-embed/commit/47683a7816581d117bb88f16e3087864aaa52f5e)]
234
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`ba168e4`](https://github.com/eea/volto-embed/commit/ba168e49554a51a6015a98a77dc0ceab76320218)]
214
235
  ## [7.0.0](https://github.com/eea/volto-embed/compare/6.0.1...7.0.0) - 6 November 2023
215
236
 
216
237
  #### :rocket: New Features
@@ -220,12 +241,15 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
220
241
  #### :house: Internal changes
221
242
 
222
243
  - style: Automated code fix [eea-jenkins - [`c34d6f4`](https://github.com/eea/volto-embed/commit/c34d6f47fd33f728d40254a12c05fe385b27f2e9)]
244
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`673f3ff`](https://github.com/eea/volto-embed/commit/673f3ff355baa8d3646e4558ff2be00f36b5a45a)]
223
245
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`31169f7`](https://github.com/eea/volto-embed/commit/31169f73887837463daee76d63b6516046ad49aa)]
224
246
 
225
247
  #### :hammer_and_wrench: Others
226
248
 
227
249
  - update tests [Miu Razvan - [`c906b79`](https://github.com/eea/volto-embed/commit/c906b79149e853f718d924871ce2e633e5e427c8)]
228
250
  - update tests [Miu Razvan - [`11625b6`](https://github.com/eea/volto-embed/commit/11625b65846388a846d1bdf7ebb2e1f8bd103c91)]
251
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`5e7a155`](https://github.com/eea/volto-embed/commit/5e7a15505334c9b81f07172116b49eaefc692ebf)]
252
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`eeb6dcb`](https://github.com/eea/volto-embed/commit/eeb6dcb4b0f8af07496450e6e7783932ebe88bf7)]
229
253
  - Release 7.0.0 [Alin Voinea - [`cbc5c79`](https://github.com/eea/volto-embed/commit/cbc5c79f1b66daf0d599d9de5a1bc7d137bafed8)]
230
254
  - add act in unit tests [Miu Razvan - [`ecf5b2f`](https://github.com/eea/volto-embed/commit/ecf5b2fe553d99ad6a11570d3d34852d557fbe85)]
231
255
  - update [Miu Razvan - [`049cc14`](https://github.com/eea/volto-embed/commit/049cc140bb6ffea4eb3f1555e693e9973ef63d0e)]
@@ -248,6 +272,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
248
272
 
249
273
  - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`dc2de20`](https://github.com/eea/volto-embed/commit/dc2de2084b53043f240ee1efa2588b5037326ed7)]
250
274
  - test: Fix package.json scripts to use makefile [Alin Voinea - [`b4ffca2`](https://github.com/eea/volto-embed/commit/b4ffca24bb8cc4ba2007cc1040cc7b55dc7cc779)]
275
+ - test: Fix eslint and yarn i18n [Alin Voinea - [`1563d0a`](https://github.com/eea/volto-embed/commit/1563d0ab1f54e775a16705bfd3d267303eb2a526)]
251
276
  - i18n: Add en [Alin Voinea - [`b4e0694`](https://github.com/eea/volto-embed/commit/b4e0694ee40ecc195536fd1826adfab8876c5061)]
252
277
  - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`8f228ca`](https://github.com/eea/volto-embed/commit/8f228ca0644cee0f777a01114895583f387a395c)]
253
278
  - test: increase test coverage - refs #254313 [ana-oprea - [`30354d8`](https://github.com/eea/volto-embed/commit/30354d8a10a78e4fc322e37f4be20ff85cd00bbc)]
@@ -276,6 +301,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
276
301
 
277
302
  - Add react-countup to resolutions [kreafox - [`36eb637`](https://github.com/eea/volto-embed/commit/36eb637c0cb9413b0b0e0ce53e621b2289929d65)]
278
303
  - Move generic classes to privacy-protection [kreafox - [`715d559`](https://github.com/eea/volto-embed/commit/715d559e370bf7a3489b64d357b0a6cd7b1a3af2)]
304
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`5715b4d`](https://github.com/eea/volto-embed/commit/5715b4d3fcc14a34e031c383275c685d88f4db44)]
305
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ef24ac0`](https://github.com/eea/volto-embed/commit/ef24ac05b17f4f4dbf05ceafbee677012a7f28f5)]
306
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`81f957b`](https://github.com/eea/volto-embed/commit/81f957b51aef7be59214530b774de8547bee3f5f)]
279
307
  ### [5.0.2](https://github.com/eea/volto-embed/compare/5.0.1...5.0.2) - 20 March 2023
280
308
 
281
309
  #### :hammer_and_wrench: Others
@@ -290,6 +318,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
290
318
  - update .project.eslintrc.js [Miu Razvan - [`628fd40`](https://github.com/eea/volto-embed/commit/628fd402b00d075ce319b9be92ff5f0e4d0ca2c4)]
291
319
  - rename schema.jsx [Miu Razvan - [`62794e3`](https://github.com/eea/volto-embed/commit/62794e398eab5117132e5622cab735f6cf4f79fd)]
292
320
  - improving code quality as per sonarqube reported issues [tedw87 - [`c7842f7`](https://github.com/eea/volto-embed/commit/c7842f7795f344e9d30538ddf2da04e97e319ebe)]
321
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`fe3a2de`](https://github.com/eea/volto-embed/commit/fe3a2de6180796c3d6b569733d2b9365a669c23e)]
293
322
  ## [5.0.0](https://github.com/eea/volto-embed/compare/4.0.4...5.0.0) - 31 October 2022
294
323
 
295
324
  #### :hammer_and_wrench: Others
@@ -309,6 +338,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
309
338
 
310
339
  - use specific alpha for addon test [andreiggr - [`e6df633`](https://github.com/eea/volto-embed/commit/e6df633aa4d2b0ee7eeb6b5aafa21528f14cd1df)]
311
340
  - add optional height to privacy container [andreiggr - [`e2ac711`](https://github.com/eea/volto-embed/commit/e2ac711db4e461b474cade42109346a73bb8ecbd)]
341
+ - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`9f3f358`](https://github.com/eea/volto-embed/commit/9f3f35882fb367d72c7916abe7cbf366dbd8d5b6)]
342
+ - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`7677140`](https://github.com/eea/volto-embed/commit/767714006abf7cbe336c5ab00d76c7232d5bc798)]
312
343
  ### [4.0.2](https://github.com/eea/volto-embed/compare/4.0.1...4.0.2) - 15 July 2022
313
344
 
314
345
  #### :hammer_and_wrench: Others
@@ -348,6 +379,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
348
379
 
349
380
  - Update package.json [Nilesh - [`0ec673a`](https://github.com/eea/volto-embed/commit/0ec673a8178731b8c1e010101caee2a3c9fafaca)]
350
381
  - Update package.json [Nilesh - [`b8b94ec`](https://github.com/eea/volto-embed/commit/b8b94ec64672229f464b9108b4ac01a848827c00)]
382
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`cfe04d8`](https://github.com/eea/volto-embed/commit/cfe04d885255bb8e472a3b268b98e3d7b9022437)]
351
383
  - Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`bf197dd`](https://github.com/eea/volto-embed/commit/bf197dd6516f9c18994add19b1141e061a96e2b6)]
352
384
  - no hardcoded text [Daniela Mormocea - [`4001bb4`](https://github.com/eea/volto-embed/commit/4001bb414df05c1516f95e4dcec4a328406dc63f)]
353
385
  - fix [Daniela Mormocea - [`a41ca9a`](https://github.com/eea/volto-embed/commit/a41ca9a2795a59f2633fb97938244e335dca8c43)]
@@ -421,6 +453,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
421
453
  - revert use of custom bg image [nileshgulia1 - [`63a74b7`](https://github.com/eea/volto-embed/commit/63a74b7e671d85b602b0190c7a18e6d6ad71341b)]
422
454
  - PrivacyProtection update & accept bg image [Andrei Grigore - [`f3f05d1`](https://github.com/eea/volto-embed/commit/f3f05d1d21fc88b90de3f68a995242b6c359e03a)]
423
455
  - fix loading of cookies [nileshgulia1 - [`46348d8`](https://github.com/eea/volto-embed/commit/46348d8321b4633a3d5fdcbfb2c4f01912d7ed2a)]
456
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`a1e1f50`](https://github.com/eea/volto-embed/commit/a1e1f50db8a1ebc11261c3a24c39687c00ca7eea)]
457
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`1e1471e`](https://github.com/eea/volto-embed/commit/1e1471ebab5ba6e5bf0c231ddd0de94d8fe6c846)]
424
458
  ### [2.0.1](https://github.com/eea/volto-embed/compare/2.0.0...2.0.1) - 28 May 2021
425
459
 
426
460
  #### :hammer_and_wrench: Others
package/DEVELOP.md CHANGED
@@ -26,21 +26,20 @@
26
26
 
27
27
  ### Or add @eeacms/volto-embed to your Volto project
28
28
 
29
- Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
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
- 1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
31
+ For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
32
32
 
33
- npm install -g yo @plone/generator-volto mrs-developer
33
+ 1. Create a new Volto project with Cookieplone
34
34
 
35
- 1. Create new volto app
36
-
37
- yo @plone/volto my-volto-project --addon @eeacms/volto-embed --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-embed": {
42
+ "output": "packages",
44
43
  "url": "https://github.com/eea/volto-embed.git",
45
44
  "package": "@eeacms/volto-embed",
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. Install
50
+ 1. Add `@eeacms/volto-embed` to the `addons` key in your project `volto.config.js`
51
+
52
+ 1. Install or refresh the project setup
52
53
 
53
- make develop
54
- yarn
54
+ make install
55
55
 
56
- 1. Start backend
56
+ 1. Start backend in one terminal
57
57
 
58
- docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend
58
+ make backend-start
59
59
 
60
- ...wait for backend to setup and start - `Ready to handle requests`:
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
- yarn start
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 src/addons/volto-embed/
72
+ cd packages/volto-embed
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-embed` to `mrs.developer.json`
81
83
  Go to:
82
84
 
83
85
  ```BASH
84
- cd src/addons/volto-embed/
86
+ cd packages/volto-embed/
85
87
  ```
86
88
 
87
89
  Start:
package/README.md CHANGED
@@ -3,16 +3,16 @@
3
3
  [![Releases](https://img.shields.io/github/v/release/eea/volto-embed)](https://github.com/eea/volto-embed/releases)
4
4
 
5
5
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-embed%2Fmaster&subject=master)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-embed/job/master/display/redirect)
6
- [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
7
- [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
8
- [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
9
- [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-master&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-master)
6
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed)
7
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed)
8
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed)
9
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed)
10
10
 
11
11
  [![Pipeline](https://ci.eionet.europa.eu/buildStatus/icon?job=volto-addons%2Fvolto-embed%2Fdevelop&subject=develop)](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-embed/job/develop/display/redirect)
12
- [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
13
- [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
14
- [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
15
- [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed-develop)
12
+ [![Lines of Code](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&branch=develop&metric=ncloc)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed&branch=develop)
13
+ [![Coverage](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&branch=develop&metric=coverage)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed&branch=develop)
14
+ [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&branch=develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed&branch=develop)
15
+ [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-embed&branch=develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-embed&branch=develop)
16
16
 
17
17
  GDPR-compliant external resource embedding components for Volto.
18
18
 
@@ -38,6 +38,11 @@ See `src/Iframe/ViewIframe` for details on how to implement.
38
38
 
39
39
  Go to http://localhost:3000
40
40
 
41
+ `make start` now defaults to Volto 18. To run the same setup against Volto 17, use:
42
+
43
+ VOLTO_VERSION=17 make
44
+ VOLTO_VERSION=17 make start
45
+
41
46
  ### Add volto-embed to your Volto project
42
47
 
43
48
  1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
@@ -51,30 +56,39 @@ Go to http://localhost:3000
51
56
  * If you already have a volto project, just update `package.json`:
52
57
 
53
58
  ```JSON
54
- "addons": [
55
- "@eeacms/volto-embed"
56
- ],
57
-
58
59
  "dependencies": {
59
60
  "@eeacms/volto-embed": "*"
60
61
  }
61
62
  ```
62
63
 
63
- * If not, create one:
64
+ and `volto.config.js`:
65
+
66
+ ```JavaScript
67
+ const addons = ['@eeacms/volto-embed'];
68
+ ```
69
+
70
+ * If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:
64
71
 
65
72
  ```
66
- npm install -g yo @plone/generator-volto
67
- yo @plone/volto my-volto-project --canary --addon @eeacms/volto-embed
68
- cd my-volto-project
73
+ uvx cookieplone project
74
+ cd project-title
69
75
  ```
70
76
 
71
- 1. Install new add-ons and restart Volto:
77
+ 1. Install or update dependencies, then start the project:
72
78
 
73
79
  ```
74
- yarn
75
- yarn start
80
+ make install
76
81
  ```
77
82
 
83
+ For a Cookieplone project, start the backend and frontend in separate terminals:
84
+
85
+ ```
86
+ make backend-start
87
+ make frontend-start
88
+ ```
89
+
90
+ For a legacy Volto 17 project, install the package with `yarn` and restart the frontend as usual.
91
+
78
92
  1. Go to http://localhost:3000
79
93
 
80
94
  1. Happy editing!
@@ -15,7 +15,7 @@ services:
15
15
  args:
16
16
  ADDON_NAME: "${ADDON_NAME}"
17
17
  ADDON_PATH: "${ADDON_PATH}"
18
- VOLTO_VERSION: ${VOLTO_VERSION:-16}
18
+ VOLTO_VERSION: ${VOLTO_VERSION:-18-yarn}
19
19
  ports:
20
20
  - "3000:3000"
21
21
  - "3001:3001"
@@ -1,5 +1,14 @@
1
1
  require('dotenv').config({ path: __dirname + '/.env' })
2
2
 
3
+ const fs = require('fs')
4
+ const path = require('path')
5
+
6
+ const voltoSlatePath = fs.existsSync(
7
+ path.join(__dirname, '../../../node_modules/@plone/volto-slate/src'),
8
+ )
9
+ ? '<rootDir>/node_modules/@plone/volto-slate/src'
10
+ : '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src'
11
+
3
12
  module.exports = {
4
13
  testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
5
14
  collectCoverageFrom: [
@@ -17,10 +26,8 @@ module.exports = {
17
26
  '@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
18
27
  '@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
19
28
  '@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
20
- '@plone/volto-slate$':
21
- '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
22
- '@plone/volto-slate/(.*)$':
23
- '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
29
+ '@plone/volto-slate$': voltoSlatePath,
30
+ '@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
24
31
  '~/(.*)$': '<rootDir>/src/$1',
25
32
  'load-volto-addons':
26
33
  '<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
@@ -141,8 +141,8 @@ msgstr "Datenschutz"
141
141
 
142
142
  #. Default: "Embed interactive Map"
143
143
  #: Blocks/EmbedMaps/schema
144
- msgid "Embed interactive Map"
145
- msgstr "Interaktive Karte einbetten"
144
+ msgid "embedInteractiveMap"
145
+ msgstr ""
146
146
 
147
147
  #. Default: "Data protection disclaimer enabled"
148
148
  #: PrivacyProtection/schema
@@ -141,7 +141,7 @@ msgstr ""
141
141
 
142
142
  #. Default: "Embed interactive Map"
143
143
  #: Blocks/EmbedMaps/schema
144
- msgid "Embed interactive Map"
144
+ msgid "embedInteractiveMap"
145
145
  msgstr ""
146
146
 
147
147
  #. Default: "Data protection disclaimer enabled"
@@ -141,7 +141,7 @@ msgstr ""
141
141
 
142
142
  #. Default: "Embed interactive Map"
143
143
  #: Blocks/EmbedMaps/schema
144
- msgid "Embed interactive Map"
144
+ msgid "embedInteractiveMap"
145
145
  msgstr ""
146
146
 
147
147
  #. Default: "Data protection disclaimer enabled"
@@ -141,7 +141,7 @@ msgstr ""
141
141
 
142
142
  #. Default: "Embed interactive Map"
143
143
  #: Blocks/EmbedMaps/schema
144
- msgid "Embed interactive Map"
144
+ msgid "embedInteractiveMap"
145
145
  msgstr ""
146
146
 
147
147
  #. Default: "Data protection disclaimer enabled"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2025-01-08T13:34:41.757Z\n"
4
+ "POT-Creation-Date: 2026-03-10T22:12:54.862Z\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
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -143,7 +143,7 @@ msgstr ""
143
143
 
144
144
  #. Default: "Embed interactive Map"
145
145
  #: Blocks/EmbedMaps/schema
146
- msgid "Embed interactive Map"
146
+ msgid "embedInteractiveMap"
147
147
  msgstr ""
148
148
 
149
149
  #. Default: "Data protection disclaimer enabled"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-embed",
3
- "version": "10.1.4",
3
+ "version": "11.0.1",
4
4
  "description": "Embed external content",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { compose } from 'redux';
3
3
  import { injectIntl } from 'react-intl';
4
4
  import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
5
- import { SidebarPortal } from '@plone/volto/components';
5
+ import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
6
6
  import View from './View';
7
7
  import getSchema from './schema';
8
8
 
@@ -5,15 +5,13 @@ import config from '@plone/volto/registry';
5
5
 
6
6
  import Edit from './Edit';
7
7
  import installEmbedMaps from '.';
8
- import '@testing-library/jest-dom/extend-expect';
8
+ import '@testing-library/jest-dom';
9
9
 
10
10
  installEmbedMaps(config);
11
11
 
12
- jest.mock('@plone/volto/components', () => ({
13
- SidebarPortal: ({ children }) => (
14
- <div data-testid="sidebar-portal">{children}</div>
15
- ),
16
- UniversalLink: ({ children, href }) => <a href={href}>{children}</a>,
12
+ jest.mock('@plone/volto/components/manage/Sidebar/SidebarPortal', () => ({
13
+ __esModule: true,
14
+ default: ({ children }) => <div data-testid="sidebar-portal">{children}</div>,
17
15
  }));
18
16
 
19
17
  jest.mock(
@@ -1,9 +1,11 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
- import { reduce, isArray, isString } from 'lodash';
2
+ import reduce from 'lodash/reduce';
3
+ import isArray from 'lodash/isArray';
4
+ import isString from 'lodash/isString';
3
5
  import { connect } from 'react-redux';
4
6
  import { Message } from 'semantic-ui-react';
5
- import { getContent } from '@plone/volto/actions';
6
- import { flattenToAppURL } from '@plone/volto/helpers';
7
+ import { getContent } from '@plone/volto/actions/content/content';
8
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
7
9
  import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
8
10
  import { pickMetadata } from '@eeacms/volto-embed/helpers';
9
11
  import { defineMessages, useIntl } from 'react-intl';
@@ -2,11 +2,19 @@ import React from 'react';
2
2
  import { Provider } from 'react-intl-redux';
3
3
  import config from '@plone/volto/registry';
4
4
  import { render, screen, fireEvent } from '@testing-library/react';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import View from './View';
8
8
  import installEmbedMaps from '.';
9
9
 
10
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => {
11
+ return ({ children, href, ...rest }) => (
12
+ <a href={href} {...rest}>
13
+ {children}
14
+ </a>
15
+ );
16
+ });
17
+
10
18
  installEmbedMaps(config);
11
19
 
12
20
  describe('EmbedMaps Block View', () => {
@@ -4,14 +4,17 @@
4
4
  */
5
5
 
6
6
  import React, { Component } from 'react';
7
- import { isEqual, isString } from 'lodash';
7
+ import isEqual from 'lodash/isEqual';
8
+ import isString from 'lodash/isString';
8
9
  import PropTypes from 'prop-types';
9
10
  import { Button, Input, Message } from 'semantic-ui-react';
10
11
  import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
11
12
  import cx from 'classnames';
12
- import { withBlockExtensions } from '@plone/volto/helpers';
13
+ import { withBlockExtensions } from '@plone/volto/helpers//Extensions';
13
14
  import { compose } from 'redux';
14
- import { Icon, SidebarPortal } from '@plone/volto/components';
15
+ import Image from '@plone/volto/components/theme/Image/Image';
16
+ import Icon from '@plone/volto/components/theme/Icon/Icon';
17
+ import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
15
18
  import clearSVG from '@plone/volto/icons/clear.svg';
16
19
  import aheadSVG from '@plone/volto/icons/ahead.svg';
17
20
  import mapsBlockSVG from '@plone/volto/components/manage/Blocks/Maps/block-maps.svg';
@@ -256,7 +259,7 @@ class Edit extends Component {
256
259
  ) : (
257
260
  <Message>
258
261
  <center>
259
- <img src={mapsBlockSVG} alt="" />
262
+ <Image src={mapsBlockSVG} alt="" loading="lazy" />
260
263
  <div className="toolbar-inner">
261
264
  <Input
262
265
  onKeyDown={this.onKeyDownVariantMenuForm}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { render, screen, fireEvent } from '@testing-library/react';
3
3
  import { Provider } from 'react-intl-redux';
4
4
  import config from '@plone/volto/registry';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import Edit from './Edit';
8
8
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useIntl, defineMessages } from 'react-intl';
3
- import { Icon, BlockDataForm } from '@plone/volto/components';
3
+ import Icon from '@plone/volto/components/theme/Icon/Icon';
4
+ import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
4
5
  import globeSVG from '@plone/volto/icons/globe.svg';
5
6
  import { Segment } from 'semantic-ui-react';
6
7
  import { addPrivacyProtectionToSchema } from '@eeacms/volto-embed';
@@ -8,7 +8,7 @@ import { defineMessages, injectIntl } from 'react-intl';
8
8
  import PropTypes from 'prop-types';
9
9
  import cx from 'classnames';
10
10
  import { compose } from 'redux';
11
- import { withBlockExtensions } from '@plone/volto/helpers';
11
+ import { withBlockExtensions } from '@plone/volto/helpers//Extensions';
12
12
  import PrivacyProtection from '@eeacms/volto-embed/PrivacyProtection/PrivacyProtection';
13
13
 
14
14
  const messages = defineMessages({
@@ -2,11 +2,19 @@ import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import { Provider } from 'react-intl-redux';
4
4
  import config from '@plone/volto/registry';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import View from './View';
8
8
  import installEmbedMaps from '.';
9
9
 
10
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => {
11
+ return ({ children, href, ...rest }) => (
12
+ <a href={href} {...rest}>
13
+ {children}
14
+ </a>
15
+ );
16
+ });
17
+
10
18
  installEmbedMaps(config);
11
19
 
12
20
  config.settings = {
@@ -1,4 +1,4 @@
1
- import { uniqBy } from 'lodash';
1
+ import uniqBy from 'lodash/uniqBy';
2
2
  import installMaps from './Maps';
3
3
  import installEmbedMaps from './EmbedMaps';
4
4
 
@@ -1,5 +1,7 @@
1
1
  import React, { useEffect, useState, useRef } from 'react';
2
- import { isNaN, isNumber, isEmpty } from 'lodash';
2
+ import isNaN from 'lodash/isNaN';
3
+ import isNumber from 'lodash/isNumber';
4
+ import isEmpty from 'lodash/isEmpty';
3
5
  import { compose } from 'redux';
4
6
  import { connect } from 'react-redux';
5
7
  import { defineMessages, injectIntl } from 'react-intl';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import { Provider } from 'react-intl-redux';
4
4
  import config from '@plone/volto/registry';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import EmbedMap from './EmbedMap';
8
8
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import cx from 'classnames';
3
- import { isNumber } from 'lodash';
3
+ import isNumber from 'lodash/isNumber';
4
4
  import { compose } from 'redux';
5
5
  import { useSelector, useDispatch } from 'react-redux';
6
6
  import {
@@ -15,8 +15,12 @@ import { serializeNodes } from '@plone/volto-slate/editor/render';
15
15
  import { defineMessages, injectIntl } from 'react-intl';
16
16
  import { toast } from 'react-toastify';
17
17
  import config from '@plone/volto/registry';
18
- import { getBaseUrl, toPublicURL, isInternalURL } from '@plone/volto/helpers';
19
- import { Toast } from '@plone/volto/components';
18
+ import {
19
+ getBaseUrl,
20
+ toPublicURL,
21
+ isInternalURL,
22
+ } from '@plone/volto/helpers/Url/Url';
23
+ import Toast from '@plone/volto/components/manage/Toast/Toast';
20
24
  import {
21
25
  getConnectedDataParametersForContext,
22
26
  getFilteredURL,
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { isFunction } from 'lodash';
2
+ import isFunction from 'lodash/isFunction';
3
3
  import { Modal } from 'semantic-ui-react';
4
4
  import cx from 'classnames';
5
5
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Popup } from 'semantic-ui-react';
3
- import { isArray, isString } from 'lodash';
3
+ import isArray from 'lodash/isArray';
4
+ import isString from 'lodash/isString';
4
5
  import cx from 'classnames';
5
6
  import {
6
7
  serializeNodes,
@@ -12,8 +13,8 @@ export const serializeText = (notes) => {
12
13
  const text = isArray(notes)
13
14
  ? serializeNodesToText(notes)
14
15
  : isString(notes)
15
- ? notes
16
- : '';
16
+ ? notes
17
+ : '';
17
18
  if (!text) return <p>There are no notes set for this visualization</p>;
18
19
  return content;
19
20
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { UniversalLink } from '@plone/volto/components';
2
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
3
3
 
4
4
  const Link = ({ children, ...props }) => {
5
5
  if (props.href) {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { Popup } from 'semantic-ui-react';
4
- import { UniversalLink } from '@plone/volto/components';
4
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
5
5
 
6
6
  const Link = ({ children, ...props }) => {
7
7
  if (props.href) {
@@ -1,7 +1,15 @@
1
1
  import React from 'react';
2
2
  import { render, fireEvent, screen } from '@testing-library/react';
3
3
  import Sources from './Sources';
4
- import '@testing-library/jest-dom/extend-expect';
4
+ import '@testing-library/jest-dom';
5
+
6
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => {
7
+ return ({ children, href, ...rest }) => (
8
+ <a href={href} {...rest}>
9
+ {children}
10
+ </a>
11
+ );
12
+ });
5
13
 
6
14
  const mockSources = [
7
15
  {
@@ -2,10 +2,18 @@ import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import { Provider } from 'react-intl-redux';
4
4
  import config from '@plone/volto/registry';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import { Enlarge, FigureNote, MoreInfo, Share, Sources } from '.';
8
8
 
9
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => {
10
+ return ({ children, href, ...rest }) => (
11
+ <a href={href} {...rest}>
12
+ {children}
13
+ </a>
14
+ );
15
+ });
16
+
9
17
  config.blocks.blocksConfig = {
10
18
  ...config.blocks.blocksConfig,
11
19
  maps: {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Container } from 'semantic-ui-react';
3
- import { hasBlocksData } from '@plone/volto/helpers';
3
+ import { hasBlocksData } from '@plone/volto/helpers/Blocks/Blocks';
4
4
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
5
5
  import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
6
6
  import { pickMetadata } from '@eeacms/volto-embed/helpers';
@@ -2,10 +2,18 @@ import React from 'react';
2
2
  import { render, screen } from '@testing-library/react';
3
3
  import { Provider } from 'react-intl-redux';
4
4
  import config from '@plone/volto/registry';
5
- import '@testing-library/jest-dom/extend-expect';
5
+ import '@testing-library/jest-dom';
6
6
 
7
7
  import MapView from './MapView';
8
8
 
9
+ jest.mock('@plone/volto/components/manage/UniversalLink/UniversalLink', () => {
10
+ return ({ children, href, ...rest }) => (
11
+ <a href={href} {...rest}>
12
+ {children}
13
+ </a>
14
+ );
15
+ });
16
+
9
17
  config.settings = {
10
18
  ...config.settings,
11
19
  publicURL: 'https://www.eea.europa.eu/',
@@ -5,7 +5,7 @@ import configureStore from 'redux-mock-store';
5
5
  import MapsViewWidget from './MapsViewWidget';
6
6
  import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
7
7
  import { pickMetadata } from '@eeacms/volto-embed/helpers';
8
- import '@testing-library/jest-dom/extend-expect'; // Importă jest-dom
8
+ import '@testing-library/jest-dom'; // Importă jest-dom
9
9
 
10
10
  jest.mock('@eeacms/volto-embed/EmbedMap/EmbedMap', () =>
11
11
  jest.fn(() => <div>Mocked EmbedMap</div>),
@@ -1,13 +1,22 @@
1
1
  import { useMemo, useState, useEffect } from 'react';
2
2
  import { useIntl, FormattedMessage, defineMessages } from 'react-intl';
3
- import { Icon } from '@plone/volto/components';
4
- import { Button, Modal, Grid, Label, Input, Message } from 'semantic-ui-react';
5
- import { map } from 'lodash';
6
- import { FormFieldWrapper, InlineForm } from '@plone/volto/components';
3
+ import Icon from '@plone/volto/components/theme/Icon/Icon';
4
+ import {
5
+ Button,
6
+ Modal,
7
+ Grid,
8
+ Label,
9
+ Input,
10
+ Message,
11
+ Image,
12
+ } from 'semantic-ui-react';
13
+ import map from 'lodash/map';
14
+ import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
15
+ import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
7
16
  import { addPrivacyProtectionToSchema } from '@eeacms/volto-embed';
8
17
  import EmbedMap from '@eeacms/volto-embed/EmbedMap/EmbedMap';
9
18
  import { MapsSchema } from '@eeacms/volto-embed/Blocks/Maps/schema';
10
- import { getBaseUrl } from '@plone/volto/helpers';
19
+ import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
11
20
 
12
21
  import clearSVG from '@plone/volto/icons/clear.svg';
13
22
  import aheadSVG from '@plone/volto/icons/ahead.svg';
@@ -132,7 +141,7 @@ function MapEditorModal({ id, onClose, onChange, ...rest }) {
132
141
  {!value.url && (
133
142
  <Message>
134
143
  <center>
135
- <img src={mapsBlockSVG} alt="" />
144
+ <Image src={mapsBlockSVG} alt="" loading="lazy" />
136
145
  <div className="toolbar-inner">
137
146
  <Input
138
147
  onKeyDown={onKeyDownVariantMenuForm}
package/src/helpers.js CHANGED
@@ -1,4 +1,4 @@
1
- import { pick } from 'lodash';
1
+ import pick from 'lodash/pick';
2
2
 
3
3
  export function pickMetadata(content) {
4
4
  return {
File without changes
File without changes