design-comuni-plone-theme 8.3.1 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.github/workflows/develop.yml +12 -14
  2. package/CHANGELOG.md +46 -0
  3. package/locales/de/LC_MESSAGES/volto.po +31 -16
  4. package/locales/en/LC_MESSAGES/volto.po +36 -21
  5. package/locales/es/LC_MESSAGES/volto.po +31 -16
  6. package/locales/fr/LC_MESSAGES/volto.po +31 -16
  7. package/locales/it/LC_MESSAGES/volto.po +32 -17
  8. package/locales/volto.pot +32 -17
  9. package/package.json +1 -1
  10. package/publiccode.yml +2 -2
  11. package/razzle.extend.js +2 -2
  12. package/src/components/ItaliaTheme/Blocks/Listing/Commons/utils.js +63 -0
  13. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +235 -65
  14. package/src/components/ItaliaTheme/Breadcrumbs/Breadcrumbs.jsx +2 -2
  15. package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +11 -7
  16. package/src/components/ItaliaTheme/Footer/FooterPNRRLogo.jsx +2 -2
  17. package/src/components/ItaliaTheme/Footer/logo-eu-inverted.svg +1 -17
  18. package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +38 -11
  19. package/src/components/ItaliaTheme/Search/Search.jsx +7 -3
  20. package/src/components/ItaliaTheme/Search/utils.js +5 -3
  21. package/src/components/ItaliaTheme/Unauthorized/Unauthorized.jsx +3 -1
  22. package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +108 -8
  23. package/src/components/ItaliaTheme/manage/Widgets/SubFooterConfigurationForm.jsx +1 -0
  24. package/src/customizations/volto/components/manage/Blocks/ToC/View.jsx +2 -0
  25. package/src/customizations/volto/components/manage/Blocks/ToC/variations/DefaultTocRenderer.jsx +99 -0
  26. package/src/customizations/volto/components/theme/Breadcrumbs/Breadcrumbs.jsx +3 -3
  27. package/src/customizations/volto/components/theme/View/View.jsx +308 -0
  28. package/src/customizations/volto/helpers/Api/Api.jsx +131 -0
  29. package/src/customizations/volto/middleware/api.js +362 -0
  30. package/src/customizations/volto/middleware/blacklistRoutes.js +47 -0
  31. package/src/theme/ItaliaTheme/Addons/volto-gdpr-privacy.scss +9 -0
  32. package/src/theme/ItaliaTheme/Blocks/_imageBlock.scss +4 -0
  33. package/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +18 -4
  34. package/src/theme/ItaliaTheme/Components/_search.scss +6 -0
  35. package/src/theme/ItaliaTheme/_common.scss +15 -0
  36. package/src/theme/ItaliaTheme/_css_variables.scss +3 -0
  37. package/src/theme/_cms-ui.scss +9 -0
  38. package/src/theme/_site-variables.scss +0 -10
  39. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +3 -3
  40. package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +6 -4
  41. package/src/theme/extras/_search.scss +31 -0
  42. package/src/theme/site.scss +1 -0
@@ -289,11 +289,6 @@ msgstr ""
289
289
  msgid "Icons placeholder"
290
290
  msgstr "Seleziona le icone dalla barra a lato"
291
291
 
292
- #: components/ItaliaTheme/Unauthorized/Unauthorized
293
- # defaultMessage: If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}.
294
- msgid "If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
295
- msgstr "Se sei sicuro di aver inserito l'indirizzo corretto ma ottieni comunque un errore, contatta l' {site_admin}."
296
-
297
292
  #: components/ItaliaTheme/Blocks/Alert/Sidebar
298
293
  # defaultMessage: Immagine
299
294
  msgid "Image"
@@ -479,7 +474,7 @@ msgstr "Piccolo"
479
474
  #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
480
475
  # defaultMessage: Play
481
476
  msgid "Play slider"
482
- msgstr "Play"
477
+ msgstr "Seleziona per riprodurre"
483
478
 
484
479
  #: components/ItaliaTheme/Pagination/PaginationItem
485
480
  # defaultMessage: Pagina precedente
@@ -568,11 +563,6 @@ msgstr "Mostra tutto"
568
563
  msgid "Show all content types"
569
564
  msgstr "Mostra tutti i tipi di contenuto"
570
565
 
571
- #: components/ItaliaTheme/Unauthorized/Unauthorized
572
- # defaultMessage: Site Administration
573
- msgid "Site Administration"
574
- msgstr "Amministratore del sito"
575
-
576
566
  #: components/ItaliaTheme/Search/Search
577
567
  # defaultMessage: Sono occorsi degli errori
578
568
  msgid "Sono occorsi degli errori"
@@ -687,7 +677,6 @@ msgid "Vedi"
687
677
  msgstr "Vedi"
688
678
 
689
679
  #: components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate
690
- #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
691
680
  # defaultMessage: Vedi l'immagine
692
681
  msgid "Vedi l'immagine"
693
682
  msgstr "Vedi l'immagine"
@@ -1706,6 +1695,11 @@ msgstr "Ufficio responsabile"
1706
1695
  msgid "done_edit_social_links"
1707
1696
  msgstr "Fatto"
1708
1697
 
1698
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1699
+ # defaultMessage: Navigazione elementi slider
1700
+ msgid "dots"
1701
+ msgstr ""
1702
+
1709
1703
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1710
1704
  # defaultMessage: Indirizzo
1711
1705
  msgid "dove"
@@ -2183,6 +2177,7 @@ msgid "imageBackground"
2183
2177
  msgstr "Immagine per lo sfondo"
2184
2178
 
2185
2179
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
2180
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2186
2181
  # defaultMessage: Importi di viaggio e/o servizi
2187
2182
  msgid "importi_di_viaggio_e_o_servizi"
2188
2183
  msgstr "Importi di viaggio e/o servizi"
@@ -2601,11 +2596,6 @@ msgstr "Ordina per"
2601
2596
  msgid "organizzato_da"
2602
2597
  msgstr "Organizzato da"
2603
2598
 
2604
- #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2605
- # defaultMessage: Organizzazione
2606
- msgid "organizzazione_riferimento"
2607
- msgstr "Organizzazione"
2608
-
2609
2599
  #: components/ItaliaTheme/View/Commons/TrasparenzaFields
2610
2600
  #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
2611
2601
  # defaultMessage: Organo competente adozione provvedimento finale
@@ -2664,6 +2654,11 @@ msgstr "PEC"
2664
2654
  msgid "persona"
2665
2655
  msgstr "Persona"
2666
2656
 
2657
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2658
+ # defaultMessage: Fa parte di
2659
+ msgid "persona_strutture_correlate"
2660
+ msgstr "Fa parte di"
2661
+
2667
2662
  #: components/ItaliaTheme/View/PuntoDiContattoView/RelatedItemsChipsPDC
2668
2663
  # defaultMessage: Persone correlate
2669
2664
  msgid "persone_correlate"
@@ -2689,6 +2684,11 @@ msgstr "Testo di aiuto"
2689
2684
  msgid "playStoreLink"
2690
2685
  msgstr "PlayStore Link"
2691
2686
 
2687
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2688
+ # defaultMessage: Precedente
2689
+ msgid "precedente"
2690
+ msgstr ""
2691
+
2692
2692
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2693
2693
  # defaultMessage: Anteprima dell'icona scelta
2694
2694
  msgid "previewIconSelected"
@@ -3523,6 +3523,11 @@ msgstr "Vai alla navigazione"
3523
3523
  msgid "skype"
3524
3524
  msgstr "Skype"
3525
3525
 
3526
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3527
+ # defaultMessage: Vai alla slide {index}
3528
+ msgid "slideDot"
3529
+ msgstr ""
3530
+
3526
3531
  #: config/Blocks/ListingOptions/sliderTemplate
3527
3532
  # defaultMessage: N° slide da mostrare
3528
3533
  msgid "slidesToShow"
@@ -3663,6 +3668,11 @@ msgstr "Visibile"
3663
3668
  msgid "subjects"
3664
3669
  msgstr "Tags"
3665
3670
 
3671
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3672
+ # defaultMessage: Successivo
3673
+ msgid "successivo"
3674
+ msgstr ""
3675
+
3666
3676
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3667
3677
  # defaultMessage: Con il supporto di
3668
3678
  msgid "supported_by"
@@ -3872,6 +3882,11 @@ msgstr "Variazione situazione patrimoniale"
3872
3882
  msgid "venues"
3873
3883
  msgstr "Luoghi"
3874
3884
 
3885
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3886
+ # defaultMessage: Sei attualmente in un carosello, per navigare usa le frecce sinistra e destra
3887
+ msgid "viewImage"
3888
+ msgstr "Sei attualmente in un carosello, per navigare usa le frecce sinistra e destra"
3889
+
3875
3890
  #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/BottomBody
3876
3891
  # defaultMessage: Vedi tutti
3877
3892
  msgid "view_all"
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: 2023-07-20T15:16:26.205Z\n"
4
+ "POT-Creation-Date: 2023-08-24T08:14:25.576Z\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
  "MIME-Version: 1.0\n"
@@ -291,11 +291,6 @@ msgstr ""
291
291
  msgid "Icons placeholder"
292
292
  msgstr ""
293
293
 
294
- #: components/ItaliaTheme/Unauthorized/Unauthorized
295
- # defaultMessage: If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}.
296
- msgid "If you are certain you have the correct web address but are encountering an error, please contact the {site_admin}."
297
- msgstr ""
298
-
299
294
  #: components/ItaliaTheme/Blocks/Alert/Sidebar
300
295
  # defaultMessage: Immagine
301
296
  msgid "Image"
@@ -570,11 +565,6 @@ msgstr ""
570
565
  msgid "Show all content types"
571
566
  msgstr ""
572
567
 
573
- #: components/ItaliaTheme/Unauthorized/Unauthorized
574
- # defaultMessage: Site Administration
575
- msgid "Site Administration"
576
- msgstr ""
577
-
578
568
  #: components/ItaliaTheme/Search/Search
579
569
  # defaultMessage: Sono occorsi degli errori
580
570
  msgid "Sono occorsi degli errori"
@@ -689,7 +679,6 @@ msgid "Vedi"
689
679
  msgstr ""
690
680
 
691
681
  #: components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate
692
- #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
693
682
  # defaultMessage: Vedi l'immagine
694
683
  msgid "Vedi l'immagine"
695
684
  msgstr ""
@@ -1708,6 +1697,11 @@ msgstr ""
1708
1697
  msgid "done_edit_social_links"
1709
1698
  msgstr ""
1710
1699
 
1700
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
1701
+ # defaultMessage: Navigazione elementi slider
1702
+ msgid "dots"
1703
+ msgstr ""
1704
+
1711
1705
  #: components/ItaliaTheme/View/VenueView/VenueWhere
1712
1706
  # defaultMessage: Indirizzo
1713
1707
  msgid "dove"
@@ -2185,6 +2179,7 @@ msgid "imageBackground"
2185
2179
  msgstr ""
2186
2180
 
2187
2181
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
2182
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2188
2183
  # defaultMessage: Importi di viaggio e/o servizi
2189
2184
  msgid "importi_di_viaggio_e_o_servizi"
2190
2185
  msgstr ""
@@ -2603,11 +2598,6 @@ msgstr ""
2603
2598
  msgid "organizzato_da"
2604
2599
  msgstr ""
2605
2600
 
2606
- #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2607
- # defaultMessage: Organizzazione
2608
- msgid "organizzazione_riferimento"
2609
- msgstr ""
2610
-
2611
2601
  #: components/ItaliaTheme/View/Commons/TrasparenzaFields
2612
2602
  #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView
2613
2603
  # defaultMessage: Organo competente adozione provvedimento finale
@@ -2666,6 +2656,11 @@ msgstr ""
2666
2656
  msgid "persona"
2667
2657
  msgstr ""
2668
2658
 
2659
+ #: components/ItaliaTheme/View/PersonaView/PersonaRuolo
2660
+ # defaultMessage: Fa parte di
2661
+ msgid "persona_strutture_correlate"
2662
+ msgstr ""
2663
+
2669
2664
  #: components/ItaliaTheme/View/PuntoDiContattoView/RelatedItemsChipsPDC
2670
2665
  # defaultMessage: Persone correlate
2671
2666
  msgid "persone_correlate"
@@ -2691,6 +2686,11 @@ msgstr ""
2691
2686
  msgid "playStoreLink"
2692
2687
  msgstr ""
2693
2688
 
2689
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
2690
+ # defaultMessage: Precedente
2691
+ msgid "precedente"
2692
+ msgstr ""
2693
+
2694
2694
  #: components/ItaliaTheme/manage/Widgets/IconPreviewWidget
2695
2695
  # defaultMessage: Anteprima dell'icona scelta
2696
2696
  msgid "previewIconSelected"
@@ -3525,6 +3525,11 @@ msgstr ""
3525
3525
  msgid "skype"
3526
3526
  msgstr ""
3527
3527
 
3528
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3529
+ # defaultMessage: Vai alla slide {index}
3530
+ msgid "slideDot"
3531
+ msgstr ""
3532
+
3528
3533
  #: config/Blocks/ListingOptions/sliderTemplate
3529
3534
  # defaultMessage: N° slide da mostrare
3530
3535
  msgid "slidesToShow"
@@ -3665,6 +3670,11 @@ msgstr ""
3665
3670
  msgid "subjects"
3666
3671
  msgstr ""
3667
3672
 
3673
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3674
+ # defaultMessage: Successivo
3675
+ msgid "successivo"
3676
+ msgstr ""
3677
+
3668
3678
  #: components/ItaliaTheme/View/EventoView/EventoContatti
3669
3679
  # defaultMessage: Con il supporto di
3670
3680
  msgid "supported_by"
@@ -3874,6 +3884,11 @@ msgstr ""
3874
3884
  msgid "venues"
3875
3885
  msgstr ""
3876
3886
 
3887
+ #: components/ItaliaTheme/Blocks/Listing/SliderTemplate
3888
+ # defaultMessage: Sei attualmente in un carosello, per navigare usa le frecce sinistra e destra
3889
+ msgid "viewImage"
3890
+ msgstr ""
3891
+
3877
3892
  #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/BottomBody
3878
3893
  # defaultMessage: Vedi tutti
3879
3894
  msgid "view_all"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "8.3.1",
5
+ "version": "8.4.0",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
package/publiccode.yml CHANGED
@@ -227,9 +227,9 @@ maintenance:
227
227
  name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
228
228
  platforms:
229
229
  - web
230
- releaseDate: '2023-08-10'
230
+ releaseDate: '2023-08-24'
231
231
  softwareType: standalone/web
232
- softwareVersion: 8.3.1
232
+ softwareVersion: 8.4.0
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
package/razzle.extend.js CHANGED
@@ -72,10 +72,10 @@ const modify = (webpackConfig, { target, dev }, webpackObject) => {
72
72
  webpackConfig.module.rules.push(SVG_LOADER);
73
73
 
74
74
  const urlLoader = webpackConfig.module.rules.find(urlLoaderFinder);
75
- urlLoader.exclude = [/\.(png|jpe?g|webp)$/i, ...(urlLoader.exclude || [])];
75
+ urlLoader.exclude = [/\.(png|jpe?g)$/i, ...(urlLoader.exclude || [])];
76
76
  // see: node_modules/razzle/config/createConfig.js
77
77
  const IMG_LOADER = {
78
- test: /\.(png|jpe?g|webp)$/i,
78
+ test: /\.(png|jpe?g)$/i,
79
79
  use: [
80
80
  {
81
81
  loader: 'url-loader',
@@ -1,3 +1,5 @@
1
+ import { useRef, useEffect } from 'react';
2
+
1
3
  export const getCategory = (item, show_type, show_section, props) => {
2
4
  let cat = [];
3
5
 
@@ -15,3 +17,64 @@ export const getCategory = (item, show_type, show_section, props) => {
15
17
  }
16
18
  return null;
17
19
  };
20
+ export const visibleSlideTitle = (selector) => {
21
+ // Needed to deal with react-slick duplicating a lot of slides
22
+ // when used in infinite mode. It's an useless and counterproductive
23
+ // thing to do on their part, there are multiple issues opened.
24
+ // The lib is not actually mantained so...
25
+ return Array.from(document.querySelectorAll(selector)).find((e) => {
26
+ const rect = e.getBoundingClientRect();
27
+ return rect.left >= 0 && rect.right <= window.innerWidth;
28
+ });
29
+ };
30
+
31
+ export const useSlider = (userAutoplay) => {
32
+ const slider = useRef(null);
33
+ const onIntersection = (entries, opt) => {
34
+ entries.forEach((entry) =>
35
+ entry.target.classList.toggle('visible', entry.isIntersecting),
36
+ );
37
+ };
38
+ const observer = new IntersectionObserver(onIntersection, {
39
+ root: null,
40
+ threshold: 0.5,
41
+ });
42
+ if (document.querySelector('.block.listing.slider'))
43
+ observer.observe(document.querySelector('.block.listing.slider'));
44
+ useEffect(() => {
45
+ return () => observer.disconnect();
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
+ }, []);
48
+
49
+ const focusNext = (currentSlide) => {
50
+ const sliderElement = document.querySelector('.block.listing.slider');
51
+ if (!sliderElement) return;
52
+ const sliderIsVisible = sliderElement.classList.contains('visible');
53
+
54
+ if (!sliderIsVisible) {
55
+ slider.current.slickPause();
56
+ return;
57
+ }
58
+ const slide = sliderElement.querySelectorAll(
59
+ `a.slide-link[data-slide="${currentSlide}"]`,
60
+ );
61
+
62
+ if ((userAutoplay && !slide) || (userAutoplay && !slide.length > 0)) return;
63
+
64
+ // Custom handling of focus as per Arter a11y audit and request
65
+ const link = visibleSlideTitle(
66
+ `a.slide-link[data-slide="${currentSlide}"]`,
67
+ );
68
+
69
+ if (!link || document.activeElement === link) {
70
+ return;
71
+ }
72
+ // eslint-disable-next-line no-unused-expressions
73
+ else link.focus();
74
+ };
75
+
76
+ return {
77
+ slider,
78
+ focusNext,
79
+ };
80
+ };