design-comuni-plone-theme 11.26.5 → 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.
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +29 -0
- package/RELEASE.md +16 -0
- package/locales/de/LC_MESSAGES/volto.po +94 -0
- package/locales/en/LC_MESSAGES/volto.po +95 -1
- package/locales/es/LC_MESSAGES/volto.po +94 -0
- package/locales/fr/LC_MESSAGES/volto.po +94 -0
- package/locales/it/LC_MESSAGES/volto.po +94 -0
- package/locales/volto.pot +95 -1
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +1 -0
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +23 -14
- package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +17 -4
- package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +4 -3
- package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +0 -1
- package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +0 -3
- package/src/components/ItaliaTheme/Cards/CardPersona.jsx +1 -1
- package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +9 -1
- package/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +9 -1
- package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +10 -1
- package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +15 -2
- package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +1 -1
- package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +14 -1
- package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +9 -1
- package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +19 -1
- package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeader.jsx +3 -4
- package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +14 -1
- package/src/components/ItaliaTheme/View/Commons/RelatedItems.jsx +5 -1
- package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +10 -6
- package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +20 -1
- package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +20 -1
- package/src/components/ItaliaTheme/View/FAQ/FaqFolder/SearchBar.jsx +2 -0
- package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +19 -1
- package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +14 -1
- package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +20 -1
- package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +19 -2
- package/src/components/ItaliaTheme/View/UOView/UOView.jsx +20 -1
- package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +24 -11
- package/src/components/SelectInput/SelectInput.jsx +2 -1
- package/src/components/TextInput.jsx +1 -0
- package/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js +1 -6
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +5 -2
- package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +16 -2
- package/src/customizations/volto/helpers/FormValidation/FormValidation.js +8 -5
- package/src/customizations/volto-form-block/components/Field.jsx +7 -0
- package/src/customizations/volto-form-block/fieldSchema.js +345 -0
- package/src/overrideTranslations.jsx +4 -0
- package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +1 -0
- package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +10 -0
- package/src/theme/ItaliaTheme/Blocks/_search.scss +8 -2
- package/src/theme/ItaliaTheme/Components/_cardPersona.scss +2 -0
- package/src/theme/ItaliaTheme/_ar.scss +3 -2
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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={
|
|
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
|
|
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
|
|
@@ -326,6 +326,7 @@ const SelectInput = ({
|
|
|
326
326
|
const Select = reactSelect.default;
|
|
327
327
|
return (
|
|
328
328
|
<div className="bootstrap-select-wrapper">
|
|
329
|
+
{label && <label htmlFor={!labelledby ? id : undefined}>{label}</label>}
|
|
329
330
|
<Select
|
|
330
331
|
components={{
|
|
331
332
|
MenuList,
|
|
@@ -347,7 +348,7 @@ const SelectInput = ({
|
|
|
347
348
|
isMulti={isMulti}
|
|
348
349
|
isClearable={isClearable}
|
|
349
350
|
aria-label={labelDefined}
|
|
350
|
-
aria-labelledby={labelledby}
|
|
351
|
+
aria-labelledby={!label ? labelledby : undefined}
|
|
351
352
|
aria-live="polite"
|
|
352
353
|
ariaLiveMessages={getSelectAriaLiveMessages(intl)}
|
|
353
354
|
noOptionsMessage={() =>
|
|
@@ -13,12 +13,7 @@ export const addCardWithSlideUpTextTemplateOptions = (
|
|
|
13
13
|
) => {
|
|
14
14
|
let pos = position;
|
|
15
15
|
|
|
16
|
-
|
|
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
|
|
package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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 = {
|
|
@@ -100,11 +100,14 @@ const widgetValidation = {
|
|
|
100
100
|
url: {
|
|
101
101
|
isValidURL: (urlValue, urlObj, intlFunc) => {
|
|
102
102
|
var urlRegex = new RegExp(
|
|
103
|
-
|
|
104
|
-
'(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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',
|
|
@@ -64,6 +64,7 @@ const Field = ({
|
|
|
64
64
|
errorMessage,
|
|
65
65
|
id,
|
|
66
66
|
reactSelect,
|
|
67
|
+
autocomplete,
|
|
67
68
|
}) => {
|
|
68
69
|
const intl = useIntl();
|
|
69
70
|
const Select = reactSelect.default;
|
|
@@ -102,6 +103,7 @@ const Field = ({
|
|
|
102
103
|
onChange(name, e.target.value);
|
|
103
104
|
}}
|
|
104
105
|
value={value ?? ''}
|
|
106
|
+
autoComplete={autocomplete}
|
|
105
107
|
/>
|
|
106
108
|
)}
|
|
107
109
|
{field_type === 'textarea' && (
|
|
@@ -120,6 +122,7 @@ const Field = ({
|
|
|
120
122
|
onChange(name, e.target.value);
|
|
121
123
|
}}
|
|
122
124
|
value={value ?? undefined}
|
|
125
|
+
autoComplete={autocomplete}
|
|
123
126
|
/>
|
|
124
127
|
)}
|
|
125
128
|
{field_type === 'select' && (
|
|
@@ -151,6 +154,7 @@ const Field = ({
|
|
|
151
154
|
classNamePrefix="react-select"
|
|
152
155
|
className={isInvalid() ? 'is-invalid' : ''}
|
|
153
156
|
value={value ? [{ value: value, label: value }] : []}
|
|
157
|
+
autoComplete={autocomplete}
|
|
154
158
|
/>
|
|
155
159
|
{description && <small className="form-text">{description}</small>}
|
|
156
160
|
{errorMessage && (
|
|
@@ -286,6 +290,7 @@ const Field = ({
|
|
|
286
290
|
onChange(name, e.target.value);
|
|
287
291
|
}}
|
|
288
292
|
value={value ?? ''}
|
|
293
|
+
autoComplete={autocomplete}
|
|
289
294
|
/>
|
|
290
295
|
)}
|
|
291
296
|
{field_type === 'attachment' && (
|
|
@@ -320,6 +325,7 @@ const Field = ({
|
|
|
320
325
|
onChange(name, e.target.value);
|
|
321
326
|
}}
|
|
322
327
|
value={value ?? ''}
|
|
328
|
+
autoComplete={autocomplete}
|
|
323
329
|
/>
|
|
324
330
|
)}
|
|
325
331
|
{field_type === 'static_text' &&
|
|
@@ -382,6 +388,7 @@ Field.propTypes = {
|
|
|
382
388
|
value: PropTypes.any,
|
|
383
389
|
formHasErrors: PropTypes.bool,
|
|
384
390
|
onChange: PropTypes.func,
|
|
391
|
+
autoComplete: PropTypes.string,
|
|
385
392
|
};
|
|
386
393
|
|
|
387
394
|
export default injectLazyLibs('reactSelect')(Field);
|