design-comuni-plone-theme 11.26.4 → 11.27.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 (85) hide show
  1. package/.yarn/cache/{volto-venue-npm-4.1.0-481d5ba425-64ca36bc93.zip → volto-venue-npm-4.1.1-d5be247928-f796d519ad.zip} +0 -0
  2. package/.yarn/install-state.gz +0 -0
  3. package/CHANGELOG.md +53 -0
  4. package/RELEASE.md +38 -0
  5. package/locales/de/LC_MESSAGES/volto.po +102 -7
  6. package/locales/en/LC_MESSAGES/volto.po +104 -9
  7. package/locales/es/LC_MESSAGES/volto.po +102 -7
  8. package/locales/fr/LC_MESSAGES/volto.po +102 -7
  9. package/locales/it/LC_MESSAGES/volto.po +103 -8
  10. package/locales/volto.pot +103 -8
  11. package/package.json +2 -2
  12. package/publiccode.yml +2 -2
  13. package/src/components/ImageWithErrors/ImageWithErrors.jsx +0 -1
  14. package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +1 -0
  15. package/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx +13 -10
  16. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +7 -7
  17. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +23 -14
  18. package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +51 -16
  19. package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +15 -10
  20. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +11 -9
  21. package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +4 -3
  22. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +8 -8
  23. package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +7 -6
  24. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +9 -6
  25. package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +19 -23
  26. package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +0 -3
  27. package/src/components/ItaliaTheme/Cards/CardPersona.jsx +5 -8
  28. package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +9 -1
  29. package/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +9 -1
  30. package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +10 -1
  31. package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +15 -2
  32. package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +1 -1
  33. package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +14 -1
  34. package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +9 -1
  35. package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +19 -1
  36. package/src/components/ItaliaTheme/View/Commons/GenericCard.jsx +14 -13
  37. package/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +15 -9
  38. package/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +7 -3
  39. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeader.jsx +3 -4
  40. package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +14 -1
  41. package/src/components/ItaliaTheme/View/Commons/RelatedItems.jsx +5 -1
  42. package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +10 -6
  43. package/src/components/ItaliaTheme/View/Commons/Sponsors.jsx +14 -10
  44. package/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx +13 -6
  45. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +20 -1
  46. package/src/components/ItaliaTheme/View/EventoView/EventoContatti.jsx +8 -7
  47. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -12
  48. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx +1 -12
  49. package/src/components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa.jsx +38 -0
  50. package/src/components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa.jsx +38 -0
  51. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -18
  52. package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +20 -1
  53. package/src/components/ItaliaTheme/View/FAQ/FaqFolder/SearchBar.jsx +2 -0
  54. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemText.jsx +1 -0
  55. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +19 -1
  56. package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +14 -1
  57. package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +20 -1
  58. package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +19 -2
  59. package/src/components/ItaliaTheme/View/UOView/UOView.jsx +20 -1
  60. package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +24 -11
  61. package/src/components/SelectInput/SelectInput.jsx +10 -4
  62. package/src/components/TextInput.jsx +1 -0
  63. package/src/config/Blocks/ListingOptions/attachmentCardTemplate.js +1 -1
  64. package/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js +1 -6
  65. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +15 -11
  66. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +5 -2
  67. package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +16 -2
  68. package/src/customizations/volto/components/theme/View/ListingView.jsx +3 -3
  69. package/src/customizations/volto/helpers/FormValidation/FormValidation.js +8 -5
  70. package/src/customizations/volto-form-block/components/Field.jsx +7 -0
  71. package/src/customizations/volto-form-block/fieldSchema.js +345 -0
  72. package/src/helpers/images.js +25 -1
  73. package/src/helpers/index.js +4 -1
  74. package/src/overrideTranslations.jsx +4 -0
  75. package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +5 -0
  76. package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +10 -0
  77. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +9 -0
  78. package/src/theme/ItaliaTheme/Blocks/_search.scss +8 -2
  79. package/src/theme/ItaliaTheme/Components/_cardLocationItem.scss +12 -0
  80. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +21 -1
  81. package/src/theme/ItaliaTheme/Widgets/_blocksWidget.scss +36 -0
  82. package/src/theme/ItaliaTheme/_ar.scss +3 -2
  83. package/src/theme/_cms-ui.scss +21 -0
  84. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
  85. package/src/theme/bootstrap-override/bootstrap-italia/_avatar.scss +28 -0
@@ -6,7 +6,6 @@ import { defineMessages, useIntl } from 'react-intl';
6
6
  import { UniversalLink } from '@plone/volto/components';
7
7
  import {
8
8
  richTextHasContent,
9
- RichText,
10
9
  Metadata,
11
10
  HelpBox,
12
11
  GenericCard,
@@ -51,18 +50,6 @@ const EventoUlterioriInformazioni = ({ content }) => {
51
50
  </UniversalLink>
52
51
  </div>
53
52
  )}
54
- {richTextHasContent(content?.patrocinato_da) && (
55
- <div className="mt-4">
56
- {richTextHasContent(content?.patrocinato_da) && (
57
- <div className="mb-5">
58
- <RichText
59
- title={intl.formatMessage(messages.patrocinato_da)}
60
- data={content?.patrocinato_da}
61
- />
62
- </div>
63
- )}
64
- </div>
65
- )}
66
53
  {content?.strutture_politiche?.length > 0 && (
67
54
  <div className="mt-4">
68
55
  <h3 className="h5">
@@ -91,11 +78,6 @@ EventoUlterioriInformazioni.propTypes = {
91
78
  ulteriori_informazioni: PropTypes.shape({
92
79
  data: PropTypes.string,
93
80
  }),
94
- patrocinato_da: PropTypes.shape({
95
- 'content-type': PropTypes.string,
96
- data: PropTypes.string,
97
- encoding: PropTypes.string,
98
- }),
99
81
  strutture_politiche: PropTypes.array,
100
82
  items: PropTypes.array,
101
83
  }).isRequired,
@@ -27,6 +27,19 @@ import {
27
27
  useSideMenu,
28
28
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
29
29
 
30
+ import { defineMessages, useIntl } from 'react-intl';
31
+
32
+ const messages = defineMessages({
33
+ sideMenuIndex: {
34
+ id: 'sideMenuIndex',
35
+ defaultMessage: 'Indice della pagina',
36
+ },
37
+ eventoContent: {
38
+ id: 'eventoContent',
39
+ defaultMessage: "Contenuto dell'evento",
40
+ },
41
+ });
42
+
30
43
  export const EventoViewSectionsOrder = [
31
44
  {
32
45
  /* HEADER IMAGE */
@@ -53,6 +66,7 @@ export const EventoViewSectionsOrder = [
53
66
  */
54
67
  const EventoView = ({ content, location }) => {
55
68
  let documentBody = createRef();
69
+ const intl = useIntl();
56
70
  const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
57
71
 
58
72
  return (
@@ -71,7 +85,10 @@ const EventoView = ({ content, location }) => {
71
85
  <ContentImage content={content} position="afterHeader" />
72
86
 
73
87
  <div className="row row-column-border border-light row-column-menu-left">
74
- <aside className="col-lg-4">
88
+ <aside
89
+ className="col-lg-4"
90
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
91
+ >
75
92
  {__CLIENT__ && (
76
93
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
77
94
  )}
@@ -80,6 +97,8 @@ const EventoView = ({ content, location }) => {
80
97
  ref={documentBody}
81
98
  id="main-content-section"
82
99
  className="col-lg-8 it-page-sections-container border-light"
100
+ role="region"
101
+ aria-label={intl.formatMessage(messages.eventoContent)}
83
102
  >
84
103
  {/* SEZIONI */}
85
104
  <ContentTypeViewSections
@@ -72,6 +72,8 @@ const SearchBar = ({ searchableText, setSearchableText }) => {
72
72
  }}
73
73
  type="text"
74
74
  aria-controls="faq-search-results-region"
75
+ role="search"
76
+ aria-label={intl.formatMessage(messages.search_faq)}
75
77
  />
76
78
  </div>
77
79
  </div>
@@ -16,6 +16,7 @@ const messages = defineMessages({
16
16
 
17
17
  const NewsItemText = ({ content }) => {
18
18
  const intl = useIntl();
19
+ if (typeof content !== 'object') return null;
19
20
 
20
21
  // NewsItem ha la descrizione_estesa (testo con blocchi)
21
22
  // altri CT (come i Comunicati Stampa) potrebbero avere `text`
@@ -25,6 +25,18 @@ import {
25
25
  useSideMenu,
26
26
  useReadingTime,
27
27
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
28
+ import { defineMessages, useIntl } from 'react-intl';
29
+
30
+ const messages = defineMessages({
31
+ sideMenuIndex: {
32
+ id: 'sideMenuIndex',
33
+ defaultMessage: 'Indice della pagina',
34
+ },
35
+ newsContent: {
36
+ id: 'newsContent',
37
+ defaultMessage: 'Contenuto della notizia',
38
+ },
39
+ });
28
40
 
29
41
  export const NewsItemViewSectionsOrder = [
30
42
  {
@@ -49,6 +61,7 @@ export const NewsItemViewSectionsOrder = [
49
61
  */
50
62
  const NewsItemView = ({ content, location }) => {
51
63
  let documentBody = createRef();
64
+ const intl = useIntl();
52
65
  const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
53
66
  const { readingtime } = useReadingTime(content, documentBody);
54
67
 
@@ -75,13 +88,18 @@ const NewsItemView = ({ content, location }) => {
75
88
  {/* HEADER IMAGE */}
76
89
  <ContentImage content={content} position="afterHeader" />
77
90
  <div className="row row-column-border border-light row-column-menu-left">
78
- <aside className="col-lg-4">
91
+ <aside
92
+ className="col-lg-4"
93
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
94
+ >
79
95
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
80
96
  </aside>
81
97
  <section
82
98
  className="col-lg-8 it-page-sections-container border-light"
83
99
  id="main-content-section"
84
100
  ref={documentBody}
101
+ role="region"
102
+ aria-label={intl.formatMessage(messages.newsContent)}
85
103
  >
86
104
  {/* SEZIONI */}
87
105
  <ContentTypeViewSections
@@ -57,6 +57,14 @@ const messages = defineMessages({
57
57
  id: 'related_uo',
58
58
  defaultMessage: 'Amministrazione',
59
59
  },
60
+ sideMenuIndex: {
61
+ id: 'sideMenuIndex',
62
+ defaultMessage: 'Indice della pagina',
63
+ },
64
+ argomentoContent: {
65
+ id: 'argomentoContent',
66
+ defaultMessage: "Contenuto dell'argomento",
67
+ },
60
68
  });
61
69
 
62
70
  /**
@@ -85,13 +93,18 @@ const PaginaArgomentoViewNoBlocks = ({ content }) => {
85
93
  <ContentImage content={content} position="afterHeader" />
86
94
 
87
95
  <div className="row row-column-border border-light row-column-menu-left">
88
- <aside className="col-lg-4">
96
+ <aside
97
+ className="col-lg-4"
98
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
99
+ >
89
100
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
90
101
  </aside>
91
102
  <section
92
103
  className="col-lg-8 it-page-sections-container border-light"
93
104
  id="main-content-section"
94
105
  ref={documentBody}
106
+ role="region"
107
+ aria-label={intl.formatMessage(messages.argomentoContent)}
95
108
  >
96
109
  {/* HEADER IMAGE */}
97
110
  <ContentImage content={content} position="documentBody" />
@@ -21,6 +21,19 @@ import {
21
21
  useSideMenu,
22
22
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
23
23
 
24
+ import { defineMessages, useIntl } from 'react-intl';
25
+
26
+ const messages = defineMessages({
27
+ sideMenuIndex: {
28
+ id: 'sideMenuIndex',
29
+ defaultMessage: 'Indice della pagina',
30
+ },
31
+ personaContent: {
32
+ id: 'personaContent',
33
+ defaultMessage: 'Contenuto del profilo della persona',
34
+ },
35
+ });
36
+
24
37
  export const PersonaViewSectionsOrder = [
25
38
  { /* RUOLO */ component: PersonaRuolo },
26
39
  { /* CONTATTI */ component: PersonaContatti },
@@ -36,6 +49,7 @@ export const PersonaViewSectionsOrder = [
36
49
  */
37
50
  const PersonaView = ({ content }) => {
38
51
  let documentBody = createRef();
52
+ const intl = useIntl();
39
53
  const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
40
54
 
41
55
  return (
@@ -52,13 +66,18 @@ const PersonaView = ({ content }) => {
52
66
  showtassonomiaargomenti={true}
53
67
  />
54
68
  <div className="row row-column-border border-light row-column-menu-left">
55
- <aside className="col-lg-4">
69
+ <aside
70
+ className="col-lg-4"
71
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
72
+ >
56
73
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
57
74
  </aside>
58
75
  <section
59
76
  className="col-lg-8 it-page-sections-container border-light"
60
77
  id="main-content-section"
61
78
  ref={documentBody}
79
+ role="region"
80
+ aria-label={intl.formatMessage(messages.personaContent)}
62
81
  >
63
82
  {/* SEZIONI */}
64
83
  <ContentTypeViewSections
@@ -5,7 +5,6 @@
5
5
 
6
6
  import React, { createRef } from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { useIntl } from 'react-intl';
9
8
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
10
9
  import {
11
10
  PageHeader,
@@ -40,6 +39,19 @@ import {
40
39
  useSideMenu,
41
40
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
42
41
 
42
+ import { defineMessages, useIntl } from 'react-intl';
43
+
44
+ const messages = defineMessages({
45
+ sideMenuIndex: {
46
+ id: 'sideMenuIndex',
47
+ defaultMessage: 'Indice della pagina',
48
+ },
49
+ servizioContent: {
50
+ id: 'servizioContent',
51
+ defaultMessage: 'Contenuto del servizio',
52
+ },
53
+ });
54
+
43
55
  export const ServizioViewSectionsOrder = (props) => [
44
56
  {
45
57
  /* HEADER IMAGE */
@@ -126,13 +138,18 @@ const ServizioView = ({ content, moment }) => {
126
138
  <ContentImage content={content} position="afterHeader" />
127
139
 
128
140
  <div className="row row-column-border border-light row-column-menu-left">
129
- <aside className="col-lg-4 ">
141
+ <aside
142
+ className="col-lg-4"
143
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
144
+ >
130
145
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
131
146
  </aside>
132
147
  <section
133
148
  id="main-content-section"
134
149
  className="col-lg-8 it-page-sections-container border-light"
135
150
  ref={documentBody}
151
+ role="region"
152
+ aria-label={intl.formatMessage(messages.servizioContent)}
136
153
  >
137
154
  {/* SEZIONI */}
138
155
  <ContentTypeViewSections
@@ -26,6 +26,19 @@ import {
26
26
  useSideMenu,
27
27
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
28
28
 
29
+ import { defineMessages, useIntl } from 'react-intl';
30
+
31
+ const messages = defineMessages({
32
+ sideMenuIndex: {
33
+ id: 'sideMenuIndex',
34
+ defaultMessage: 'Indice della pagina',
35
+ },
36
+ UOContent: {
37
+ id: 'UOContent',
38
+ defaultMessage: "Contenuto dell'unità organizzativa",
39
+ },
40
+ });
41
+
29
42
  export const UOViewSectionsOrder = [
30
43
  {
31
44
  /* HEADER IMAGE */
@@ -59,6 +72,7 @@ export const UOViewSectionsOrder = [
59
72
  */
60
73
  const UOView = ({ content }) => {
61
74
  let documentBody = createRef();
75
+ const intl = useIntl();
62
76
  const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
63
77
 
64
78
  return (
@@ -76,7 +90,10 @@ const UOView = ({ content }) => {
76
90
  <ContentImage content={content} position="afterHeader" />
77
91
 
78
92
  <div className="row row-column-border border-light row-column-menu-left">
79
- <aside className="col-lg-4">
93
+ <aside
94
+ className="col-lg-4"
95
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
96
+ >
80
97
  {__CLIENT__ && (
81
98
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
82
99
  )}
@@ -85,6 +102,8 @@ const UOView = ({ content }) => {
85
102
  ref={documentBody}
86
103
  id="main-content-section"
87
104
  className="col-lg-8 it-page-sections-container border-light"
105
+ role="region"
106
+ aria-label={intl.formatMessage(messages.UOContent)}
88
107
  >
89
108
  {/* SEZIONI */}
90
109
  <ContentTypeViewSections
@@ -25,6 +25,19 @@ import {
25
25
  useSideMenu,
26
26
  } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
27
27
 
28
+ import { defineMessages, useIntl } from 'react-intl';
29
+
30
+ const messages = defineMessages({
31
+ sideMenuIndex: {
32
+ id: 'sideMenuIndex',
33
+ defaultMessage: 'Indice della pagina',
34
+ },
35
+ venueContent: {
36
+ id: 'venueContent',
37
+ defaultMessage: 'Informazioni sulla struttura',
38
+ },
39
+ });
40
+
28
41
  export const VenueViewSectionsOrder = [
29
42
  {
30
43
  /* HEADER IMAGE */
@@ -56,23 +69,18 @@ export const VenueViewSectionsOrder = [
56
69
  */
57
70
  const VenueView = ({ content }) => {
58
71
  const documentBody = createRef();
72
+ const intl = useIntl();
59
73
  const { sideMenuElements, SideMenu } = useSideMenu(content, documentBody);
60
74
 
61
- useEffect(() => {
62
- if (
63
- content.nome_alternativo &&
64
- !content.title?.includes(content.nome_alternativo)
65
- ) {
66
- content.subtitle = content.nome_alternativo;
67
- }
68
- });
69
-
70
75
  return (
71
76
  <>
72
77
  <div className="container px-4 my-4 luogo-view">
73
78
  <SkipToMainContent />
74
79
  <PageHeader
75
- content={content}
80
+ content={{
81
+ ...content,
82
+ subtitle: content.nome_alternativo,
83
+ }}
76
84
  readingtime={null}
77
85
  showreadingtime={false}
78
86
  showdates={false}
@@ -82,7 +90,10 @@ const VenueView = ({ content }) => {
82
90
  <ContentImage content={content} position="afterHeader" />
83
91
 
84
92
  <div className="row row-column-border border-light row-column-menu-left">
85
- <aside className="col-lg-4">
93
+ <aside
94
+ className="col-lg-4"
95
+ aria-label={intl.formatMessage(messages.sideMenuIndex)}
96
+ >
86
97
  {__CLIENT__ && (
87
98
  <SideMenu data={sideMenuElements} content_uid={content?.UID} />
88
99
  )}
@@ -91,6 +102,8 @@ const VenueView = ({ content }) => {
91
102
  className="col-lg-8 it-page-sections-container border-light"
92
103
  id="main-content-section"
93
104
  ref={documentBody}
105
+ role="region"
106
+ aria-label={intl.formatMessage(messages.venueContent)}
94
107
  >
95
108
  {/* SEZIONI */}
96
109
  <ContentTypeViewSections
@@ -92,6 +92,10 @@ const messages = defineMessages({
92
92
  id: 'dropdown_indicator',
93
93
  defaultMessage: 'Apri il menu',
94
94
  },
95
+ SelectInput_default_label: {
96
+ id: 'SelectInput_default_label',
97
+ defaultMessage: "Seleziona un'opzione",
98
+ },
95
99
  });
96
100
 
97
101
  const SelectContainer = injectLazyLibs('reactSelect')(({
@@ -313,14 +317,16 @@ const SelectInput = ({
313
317
  options,
314
318
  components = {},
315
319
  reactSelect,
320
+ labelledby,
316
321
  defaultValue,
317
322
  }) => {
318
323
  const intl = useIntl();
324
+ const labelDefined =
325
+ label || intl.formatMessage(messages.SelectInput_default_label);
319
326
  const Select = reactSelect.default;
320
327
  return (
321
328
  <div className="bootstrap-select-wrapper">
322
- {label && <label htmlFor={id}>{label}</label>}
323
-
329
+ {label && <label htmlFor={!labelledby ? id : undefined}>{label}</label>}
324
330
  <Select
325
331
  components={{
326
332
  MenuList,
@@ -341,9 +347,9 @@ const SelectInput = ({
341
347
  isSearchable={isSearchable}
342
348
  isMulti={isMulti}
343
349
  isClearable={isClearable}
344
- aria-label={label}
350
+ aria-label={labelDefined}
351
+ aria-labelledby={!label ? labelledby : undefined}
345
352
  aria-live="polite"
346
- aria-labelledby={id}
347
353
  ariaLiveMessages={getSelectAriaLiveMessages(intl)}
348
354
  noOptionsMessage={() =>
349
355
  intl.formatMessage(messages.select_noOptionsMessage)
@@ -17,6 +17,7 @@ export default function TextInput(props) {
17
17
  groupClassName,
18
18
  ...otherProps
19
19
  } = props;
20
+
20
21
  const [isFocused, setIsFocused] = useState(false);
21
22
 
22
23
  const toggleFocusLabel = () => {
@@ -10,7 +10,7 @@ const messages = defineMessages({
10
10
  show_pdf_desc: {
11
11
  id: 'show_pdf_desc',
12
12
  defaultMessage:
13
- "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati.",
13
+ "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata. Se non impostato, i PDF vengono scaricati.",
14
14
  },
15
15
  });
16
16
 
@@ -13,12 +13,7 @@ export const addCardWithSlideUpTextTemplateOptions = (
13
13
  ) => {
14
14
  let pos = position;
15
15
 
16
- // hidden to avoid use of lighthouse on this block
17
- // which creates problems with asseverazione
18
- // 1. clients instructed not to use this variation when data-element is needed
19
- // 2. planned intervention to change structure of variation to allow use of
20
- // data element without wrapping entire card in link
21
- // pos = addLighthouseField(schema, intl, pos);
16
+ pos = addLighthouseField(schema, intl, pos);
22
17
 
23
18
  pos = addDefaultOptions(schema, formData, intl, pos);
24
19
 
@@ -5,6 +5,7 @@
5
5
  * CUSTOMIZATIONS:
6
6
  * - aggiunto icona per link esterni
7
7
  * - aggiunto title informativo per link esterni
8
+ * - aggiunta la condizione su @@display-file e @download-file per gestire i casi in cui questi parametri vengono imposti a monte
8
9
  */
9
10
 
10
11
  import React from 'react';
@@ -59,18 +60,21 @@ const UniversalLink = ({
59
60
  }
60
61
 
61
62
  //case: item of type 'File'
62
- if (
63
- !token &&
64
- config.settings.downloadableObjects.includes(item['@type'])
65
- ) {
66
- url = `${url}/@@download/file`;
67
- }
63
+ if (!url.includes('@@download') && !url.includes('@@display-file')) {
64
+ //se non è gia stato aggiunto il suffisso per il download nell'@id dell'item
65
+ if (
66
+ !token &&
67
+ config.settings.downloadableObjects.includes(item['@type'])
68
+ ) {
69
+ url = `${url}/@@download/file`;
70
+ }
68
71
 
69
- if (
70
- !token &&
71
- config.settings.viewableInBrowserObjects.includes(item['@type'])
72
- ) {
73
- url = `${url}/@@display-file/file`;
72
+ if (
73
+ !token &&
74
+ config.settings.viewableInBrowserObjects.includes(item['@type'])
75
+ ) {
76
+ url = `${url}/@@display-file/file`;
77
+ }
74
78
  }
75
79
  }
76
80
  }
@@ -409,8 +409,8 @@ class RecurrenceWidget extends Component {
409
409
  formValues['freq'] = FREQUENCES.MONDAYFRIDAY;
410
410
  } else
411
411
  formValues[option] = value.map((d) => {
412
- return this.getWeekday(d);
413
- });
412
+ return this.getWeekday(d);
413
+ });
414
414
  }
415
415
  break;
416
416
  case 'bymonthday':
@@ -441,8 +441,11 @@ class RecurrenceWidget extends Component {
441
441
  if (freq === FREQUENCES.YEARLY) {
442
442
  formValues['yearly'] = 'byday';
443
443
  }
444
+ const weekday = this.getWeekday(value[0][0]);
445
+ weekday.n = value[0][1];
444
446
  formValues['weekdayOfTheMonth'] = value[0][0];
445
447
  formValues['weekdayOfTheMonthIndex'] = value[0][1];
448
+ formValues['byweekday'] = weekday;
446
449
  }
447
450
  break;
448
451
  case 'bymonth':
@@ -93,7 +93,12 @@ const Navigation = ({ pathname }) => {
93
93
  return (
94
94
  <Header theme="" type="navbar">
95
95
  {menu?.length > 0 ? (
96
- <HeaderContent expand="lg" megamenu id="navigation">
96
+ <HeaderContent
97
+ expand="lg"
98
+ megamenu
99
+ id="navigation"
100
+ aria-label={intl.formatMessage(messages.mainMenu)}
101
+ >
97
102
  <HeaderToggler
98
103
  aria-controls="it-navigation-collapse"
99
104
  aria-expanded={collapseOpen}
@@ -142,7 +147,12 @@ const Navigation = ({ pathname }) => {
142
147
  </UniversalLink>
143
148
  </div>
144
149
  {/* Main Menu */}
145
- <Nav data-element="main-navigation" navbar role="menubar">
150
+ <Nav
151
+ data-element="main-navigation"
152
+ navbar
153
+ role="menubar"
154
+ aria-label={intl.formatMessage(messages.mainMenu)}
155
+ >
146
156
  {menu
147
157
  ?.filter((item) => item.visible)
148
158
  ?.map((item, index) => (
@@ -206,6 +216,10 @@ const messages = defineMessages({
206
216
  id: 'toggleMenu_close',
207
217
  defaultMessage: 'Chiudi',
208
218
  },
219
+ mainMenu: {
220
+ id: 'mainMenu',
221
+ defaultMessage: 'Menu principale',
222
+ },
209
223
  });
210
224
 
211
225
  Navigation.propTypes = {
@@ -10,6 +10,7 @@ import PropTypes from 'prop-types';
10
10
  import { Link } from 'react-router-dom';
11
11
  import { PageHeader } from 'design-comuni-plone-theme/components/ItaliaTheme/View';
12
12
  import { ListingImage } from 'design-comuni-plone-theme/components/ItaliaTheme';
13
+ import { contentHasImage } from 'design-comuni-plone-theme/helpers';
13
14
 
14
15
  /**
15
16
  * List view component class.
@@ -23,8 +24,7 @@ const ListingView = ({ content }) => (
23
24
  <PageHeader content={content} />
24
25
  <section id="content-core">
25
26
  {content.items.map((item) => {
26
- const image = ListingImage({ item });
27
-
27
+ const hasImage = contentHasImage(item);
28
28
  return (
29
29
  <div key={item.url} className="listing-item my-4">
30
30
  <div>
@@ -35,7 +35,7 @@ const ListingView = ({ content }) => (
35
35
  </h2>
36
36
  {item.description && <p>{item.description}</p>}
37
37
  </div>
38
- {image && <>{image}</>}
38
+ {hasImage && <ListingImage item={item} />}
39
39
  </div>
40
40
  );
41
41
  })}
@@ -100,11 +100,14 @@ const widgetValidation = {
100
100
  url: {
101
101
  isValidURL: (urlValue, urlObj, intlFunc) => {
102
102
  var urlRegex = new RegExp(
103
- '^(https?:\\/\\/)?' + // validate protocol
104
- '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // validate domain name
105
- '((\\d{1,3}\\.){3}\\d{1,3}))|' + // validate OR ip (v4) address
106
- '(localhost)' + // validate OR localhost address
107
- '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // validate port and path
103
+ '^(https?:\\/\\/)?' + // optional protocol
104
+ '(' +
105
+ '([a-z\\d]+(-[a-z\\d]+)*\\.)+[a-z]{2,}|' + // validate domain name
106
+ '((\\d{1,3}\\.){3}\\d{1,3}))|' + // OR ip (v4) address
107
+ '(localhost)' + // OR localhost
108
+ ')' +
109
+ '(\\:\\d+)?' + // optional port
110
+ '(\\/[-a-z\\d%_.~+]*)*' + // path
108
111
  '(\\?[;&a-z\\d%_.~+=-]*)?' + // validate query string
109
112
  '(\\#[-a-z\\d_]*)?$', // validate fragment locator
110
113
  'i',