From cc43200b7bee1444f5149f8e280b25034a835c4f Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Tue, 26 Mar 2024 14:26:18 +0100 Subject: [PATCH 01/19] fix: string formatting for modified date (#608) --- src/components/ItaliaTheme/View/Commons/PageMetadata.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx b/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx index 550b48c0b..025f16973 100644 --- a/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx +++ b/src/components/ItaliaTheme/View/Commons/PageMetadata.jsx @@ -25,7 +25,7 @@ const PageMetadata = ({ content, children }) => { {intl.formatMessage(messages.modified)}: {' '} - {viewDate(intl.locale, content.modified, 'DD-MM-Y HH:MM')} + {viewDate(intl.locale, content.modified, 'DD-MM-Y HH:mm')} {children} ); From e736bed0a399aecd6ec2f399c1c5c70f1192509b Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:47:33 +0100 Subject: [PATCH 02/19] fix: added aria-hidden attribute to icons (#594) * fix: added aria-hidden attribute to icons * fix: used aria-hidden instead of custom attribute --- RELEASE.md | 1 + .../ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx | 2 +- src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx | 5 +++-- src/components/ItaliaTheme/Icons/Icon.jsx | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index d24ef00d3..3dc9db607 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,6 +45,7 @@ ### Migliorie +- Migliorata l'accessibilità del blocco Icone. - ... ### Novità diff --git a/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx index 6af951579..5a638ba5d 100644 --- a/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx @@ -37,7 +37,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { {data.icon?.length > 0 && (
- +
)} diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index 70b8a39ac..fa17e5fd6 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -35,8 +35,8 @@ const FontAwesomeIcon = (props) => { prefixKey === 'fab' ? 'brands' : prefixKey === 'far' - ? 'regular' - : 'solid', + ? 'regular' + : 'solid', iconName, ]; }; @@ -74,6 +74,7 @@ const FontAwesomeIcon = (props) => { ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + aria-hidden={props['aria-hidden']} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index 06939fb88..e768ec6b2 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -12,6 +12,7 @@ import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaThem const Icon = (props) => { const { icon, className, color, size, padding, ...rest } = props; + if (icon) { const classes = classNames( 'icon', From 32a008a8dbf0516ff344e7f3579f643546db4acd Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:34:36 +0100 Subject: [PATCH 03/19] fix: added role='button' to search link (#611) * fix: added role='button' to search link * fix: changed link for search in case js is not enabled --- RELEASE.md | 1 + .../ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 3dc9db607..5eb0812fb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,6 +45,7 @@ ### Migliorie +- Migliorata l'accessibilità del bottone "Ricerca". - Migliorata l'accessibilità del blocco Icone. - ... diff --git a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx index a3a1797b2..96fbea568 100644 --- a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx @@ -32,7 +32,8 @@ const HeaderSearch = () => { e.preventDefault(); setShowSearchModal(true); }} - href="#search" + href="/search" + role="button" > From 0d7e84b7eb7c24cb4fe850ccd69e9b0749ab86b5 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:37:41 +0100 Subject: [PATCH 04/19] fix: updated volto-form-block (#613) --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f6125dc02..1dccb4e79 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "volto-dropdownmenu": "4.1.1", "volto-editablefooter": "5.1.0", "volto-feedback": "0.3.0", - "volto-form-block": "3.7.1", + "volto-form-block": "3.7.2", "volto-gdpr-privacy": "2.1.1", "volto-google-analytics": "2.0.0", "volto-multilingual-widget": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 8ae76f1ce..95e487373 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6576,7 +6576,7 @@ __metadata: volto-dropdownmenu: 4.1.1 volto-editablefooter: 5.1.0 volto-feedback: 0.3.0 - volto-form-block: 3.7.1 + volto-form-block: 3.7.2 volto-gdpr-privacy: 2.1.1 volto-google-analytics: 2.0.0 volto-multilingual-widget: 3.0.0 @@ -14355,9 +14355,9 @@ __metadata: languageName: node linkType: hard -"volto-form-block@npm:3.7.1": - version: 3.7.1 - resolution: "volto-form-block@npm:3.7.1" +"volto-form-block@npm:3.7.2": + version: 3.7.2 + resolution: "volto-form-block@npm:3.7.2" dependencies: "@hcaptcha/react-hcaptcha": ^0.3.6 file-saver: ^2.0.5 @@ -14366,7 +14366,7 @@ __metadata: peerDependencies: "@plone/volto": ">=16.0.0-alpha.38" volto-subblocks: ^2.0.0 - checksum: 6cdbcb91d5bca43fa4ee828e7816df37573816854552fd00965053dd7f2496c8ee4c87838cbaa9d5e10b5496b51da1ed573ff3c300806f8d7a2e0ad55a8ca962 + checksum: 7387a1b85a877c3da5dd800b33b6a01673ef60e2bcecd2c25cafd22f8474bf167e0f39befc289d2ae8614abf35fdd424066dd83a77ad0bdced2d297ef8652eeb languageName: node linkType: hard From 661ba6ec6ee732127a4b1d76caf85869266221a7 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:45:52 +0100 Subject: [PATCH 05/19] fix: added styles to spread out card-image-wrapper div (#614) * fix: added col class to spread out card-image-wrapper div * fix: added width property to card-image-wrapper in cardPersona * chore: fixed release.md * docs: release log * docs: release log --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 3 +-- src/theme/ItaliaTheme/Components/_cardPersona.scss | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 5eb0812fb..2096e1dc6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -47,7 +47,6 @@ - Migliorata l'accessibilità del bottone "Ricerca". - Migliorata l'accessibilità del blocco Icone. -- ... ### Novità @@ -55,7 +54,7 @@ ### Fix -- ... +- Aggiustato il layout della card per il CT persone quando è impostata un'immagine. ## Versione 11.8.0 (19/03/2024) diff --git a/src/theme/ItaliaTheme/Components/_cardPersona.scss b/src/theme/ItaliaTheme/Components/_cardPersona.scss index ce217efce..9faaf81c7 100644 --- a/src/theme/ItaliaTheme/Components/_cardPersona.scss +++ b/src/theme/ItaliaTheme/Components/_cardPersona.scss @@ -3,6 +3,7 @@ display: flex; flex: 1; align-items: flex-start; + width: 100%; } .card-body { From 4e5c352e783c969a12b626ecb4fd356863192369 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:53:42 +0100 Subject: [PATCH 06/19] feat: added ppt icon file format (#615) --- src/helpers/IconWidget/IconAliasHelper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/helpers/IconWidget/IconAliasHelper.js b/src/helpers/IconWidget/IconAliasHelper.js index 7cbfdbfed..8a6f9866b 100644 --- a/src/helpers/IconWidget/IconAliasHelper.js +++ b/src/helpers/IconWidget/IconAliasHelper.js @@ -218,6 +218,7 @@ export const fontAwesomeAliases = { 'field-hockey': 'field-hockey-stick-ball', 'fighter-jet': 'jet-fighter', 'file-alt': 'file-lines', + 'file-ppt': 'file-powerpoint', 'file-archive': 'file-zipper', 'file-chart-line': 'file-chart-column', 'file-download': 'file-arrow-down', From 6b2a26dd3d5206bff141c39945bf6792479dbb83 Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Wed, 27 Mar 2024 15:54:07 +0100 Subject: [PATCH 07/19] fix: p instead of headings in BrandText for a11y (#616) --- src/components/ItaliaTheme/BrandText/BrandText.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ItaliaTheme/BrandText/BrandText.jsx b/src/components/ItaliaTheme/BrandText/BrandText.jsx index 44ac44469..2372068a3 100644 --- a/src/components/ItaliaTheme/BrandText/BrandText.jsx +++ b/src/components/ItaliaTheme/BrandText/BrandText.jsx @@ -7,12 +7,12 @@ const BrandText = ({ mobile = false, subsite }) => { const intl = useIntl(); return (
-

+

{subsite?.title || getSiteProperty('siteTitle', intl.locale)} -

-

+

+

{subsite?.description || getSiteProperty('siteSubtitle', intl.locale)} -

+

); }; From 669dfffc42b3b9956396e6d00ee676bdfe798017 Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:07:17 +0100 Subject: [PATCH 08/19] fix: alt defaults to item.title for CompleteBlockLinksTemplate for accessibility (#617) * fix: alt defaults to item.title for ListingImages for accessibility * fix: use alt only for specific listing template --- .../ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx | 3 +-- .../ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx index f9e128e7a..34031cb52 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx @@ -16,7 +16,7 @@ const ListingImage = ({ let commonImageProps = { item, 'aria-hidden': true, - alt: '', + alt: imageProps.alt ?? '', role: 'presentation', className, loading, @@ -29,7 +29,6 @@ const ListingImage = ({ // photogallery needs to check for null image // https://stackoverflow.com/questions/33136399/is-there-a-way-to-tell-if-reactelement-renders-null const image = Image(commonImageProps); - if (image === null) return showDefault ? : null; diff --git a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx index 9a137d09c..504086ad3 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx @@ -61,6 +61,7 @@ const CompleteBlockLinksTemplate = (props) => { className: '', sizes: '60px', showTitleAttr: false, + alt: item.title, }); const BlockExtraTags = getComponentWithFallback({ From 26ae36219955b785d994815f8c041e4c54f7889f Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:16:43 +0100 Subject: [PATCH 09/19] feat: added new AttachmentCardTemplate listing variation (#603) * feat: added new AttachmentCardTemplate listing variation * fix: fixed a11y icon and locales --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 2 +- locales/de/LC_MESSAGES/volto.po | 12 ++ locales/en/LC_MESSAGES/volto.po | 12 ++ locales/es/LC_MESSAGES/volto.po | 12 ++ locales/fr/LC_MESSAGES/volto.po | 12 ++ locales/it/LC_MESSAGES/volto.po | 12 ++ locales/volto.pot | 14 ++- .../Blocks/Listing/AttachmentCardTemplate.jsx | 116 ++++++++++++++++++ .../ListingOptions/attachmentCardTemplate.js | 40 ++++++ src/config/Blocks/ListingOptions/index.js | 1 + src/config/Blocks/listingVariations.js | 17 +++ 11 files changed, 248 insertions(+), 2 deletions(-) create mode 100644 src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx create mode 100644 src/config/Blocks/ListingOptions/attachmentCardTemplate.js diff --git a/RELEASE.md b/RELEASE.md index 2096e1dc6..e41dc9a9f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -50,7 +50,7 @@ ### Novità -- ... +- Aggiunto una nuova variazione del blocco elenco "Allegati" che permette di scaricare oggetti di tipo File o aprire l'anteprima di file PDF. ### Fix diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 35af469fd..e9158aba5 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -859,6 +859,7 @@ msgstr "" msgid "assessore_riferimento" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2300,6 +2301,7 @@ msgstr "" msgid "legend_required" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3599,6 +3601,16 @@ msgstr "" msgid "show_only_first_ribbon" msgstr "" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "" + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 7a22d634d..e70149346 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -844,6 +844,7 @@ msgstr "Councilor of" msgid "assessore_riferimento" msgstr "Reference councilor" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2285,6 +2286,7 @@ msgstr "Internal services or offices" msgid "legend_required" msgstr "Fields marked with (*) are required." +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3584,6 +3586,16 @@ msgstr "" msgid "show_only_first_ribbon" msgstr "" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "Allows you to open the preview of all the PDFs in this list in a separate tab otherwise they will be downloaded." + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "Show PDFs in preview" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 45dab89cb..9ed68f7e2 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -853,6 +853,7 @@ msgstr "Concejal de" msgid "assessore_riferimento" msgstr "Concejal de referencia" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2294,6 +2295,7 @@ msgstr "Servicios internos u oficinas" msgid "legend_required" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3593,6 +3595,16 @@ msgstr "Mostrar el mapa en ancho completo" msgid "show_only_first_ribbon" msgstr "Mostrar la cinta solo en la primera tarjeta" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "Le permite abrir la vista previa de todos los archivos PDF en esta lista en una pestaña separada, de lo contrario, se descargarán." + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "Mostrar archivos PDF en vista previa" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 0b105fceb..5432a1f62 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -861,6 +861,7 @@ msgstr "Conseiller de" msgid "assessore_riferimento" msgstr "Référence du conseiller" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2302,6 +2303,7 @@ msgstr "" msgid "legend_required" msgstr "Les champs marqués d'une (*) sont obligatoires." +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3601,6 +3603,16 @@ msgstr "" msgid "show_only_first_ribbon" msgstr "" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "Permet d'ouvrir l'aperçu de tous les PDF de cette liste dans un onglet séparé sinon ils seront téléchargés." + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "Afficher les PDF en aperçu" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index b53d4f229..ea3f12415 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -844,6 +844,7 @@ msgstr "Assessore di" msgid "assessore_riferimento" msgstr "Assessore di riferimento" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2285,6 +2286,7 @@ msgstr "Servizi o uffici interni" msgid "legend_required" msgstr "I campi contrassegnati da (*) sono obbligatori." +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3584,6 +3586,16 @@ msgstr "Mostra la mappa a tutta larghezza" msgid "show_only_first_ribbon" msgstr "Mostra il nastro solo sulla prima card" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati." + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "Mostra i PDF in anteprima" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/locales/volto.pot b/locales/volto.pot index dd3f2d722..21cb64346 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-03-07T15:23:38.346Z\n" +"POT-Creation-Date: 2024-03-27T08:54:22.652Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -846,6 +846,7 @@ msgstr "" msgid "assessore_riferimento" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/View/Commons/Attachment # defaultMessage: Allegato msgid "attachment" @@ -2287,6 +2288,7 @@ msgstr "" msgid "legend_required" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate #: components/ItaliaTheme/Blocks/SearchSections/SideBar # defaultMessage: Collegamento msgid "link" @@ -3586,6 +3588,16 @@ msgstr "" msgid "show_only_first_ribbon" msgstr "" +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati. +msgid "show_pdf_desc" +msgstr "" + +#: config/Blocks/ListingOptions/attachmentCardTemplate +# defaultMessage: Mostra i PDF in anteprima +msgid "show_pdf_preview" +msgstr "" + #: config/Blocks/ListingOptions/simpleListTemplate # defaultMessage: Mostra elenco puntato msgid "show_pointer_list" diff --git a/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx new file mode 100644 index 000000000..aee103190 --- /dev/null +++ b/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx @@ -0,0 +1,116 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import cx from 'classnames'; +import { defineMessages, useIntl } from 'react-intl'; +import { UniversalLink } from '@plone/volto/components'; +import { Container, Card, CardBody, CardTitle } from 'design-react-kit'; +import { + Icon, + ListingLinkMore, +} from 'design-comuni-plone-theme/components/ItaliaTheme'; + +const messages = defineMessages({ + link: { + id: 'link', + defaultMessage: 'Collegamento', + }, + attachment: { + id: 'attachment', + defaultMessage: 'Allegato', + }, +}); + +const AttachmentCardTemplate = ({ + items, + isEditMode, + linkTitle, + linkHref, + show_pdf_preview, + show_block_bg, + title, + id_lighthouse, + linkAlign, + titleLine, + linkmore_id_lighthouse, +}) => { + const intl = useIntl(); + + return ( + +
+ {title && ( +

+ {title} +

+ )} +
+ {items.map((item, index) => { + let itemUrl = { ...item }; + if (item['@type'] === 'File') { + itemUrl = { + ...item, + file: item, + '@id': + show_pdf_preview && item?.mime_type === 'application/pdf' + ? item?.['@id'] + '/@@display-file/file' + : item?.['@id'] + '/@@download/file', + }; + } + + return ( + + {item['@type'] === 'File' ? ( + + ) : ( + + )} + + + + {item.title || item.id} + + + + + ); + })} +
+ + +
+
+ ); +}; + +AttachmentCardTemplate.propTypes = { + items: PropTypes.arrayOf(PropTypes.any).isRequired, + isEditMode: PropTypes.bool, + linkTitle: PropTypes.any, +}; + +export default AttachmentCardTemplate; diff --git a/src/config/Blocks/ListingOptions/attachmentCardTemplate.js b/src/config/Blocks/ListingOptions/attachmentCardTemplate.js new file mode 100644 index 000000000..d54b2fe45 --- /dev/null +++ b/src/config/Blocks/ListingOptions/attachmentCardTemplate.js @@ -0,0 +1,40 @@ +import { defineMessages } from 'react-intl'; + +import { templatesOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions'; + +const messages = defineMessages({ + show_pdf_preview: { + id: 'show_pdf_preview', + defaultMessage: 'Mostra i PDF in anteprima', + }, + show_pdf_desc: { + id: 'show_pdf_desc', + defaultMessage: + "Permette di aprire l'anteprima di tutti i PDF di questo elenco in una tab separata altrimenti vengono scaricati.", + }, +}); + +export const addAttachmentCardTemplateOptions = ( + schema, + formData, + intl, + position = 1, +) => { + let pos = position; + + pos = templatesOptions( + schema, + formData, + intl, + ['show_pdf_preview'], + { + show_pdf_preview: { + default: false, + label: intl.formatMessage(messages.show_pdf_preview), + description: intl.formatMessage(messages.show_pdf_desc), + }, + }, + pos, + ); + return pos; +}; diff --git a/src/config/Blocks/ListingOptions/index.js b/src/config/Blocks/ListingOptions/index.js index caab64e02..36cb46fb9 100644 --- a/src/config/Blocks/ListingOptions/index.js +++ b/src/config/Blocks/ListingOptions/index.js @@ -22,3 +22,4 @@ export { addSimpleListTemplateOptions } from 'design-comuni-plone-theme/config/B export { addCardWithSlideUpTextTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate'; export { addPhotogalleryTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/photogalleryTemplate'; export { addSmallBlockLinksTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/smallBlockLinksTemplate'; +export { addAttachmentCardTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/attachmentCardTemplate'; diff --git a/src/config/Blocks/listingVariations.js b/src/config/Blocks/listingVariations.js index 59c5a6614..e91012edd 100644 --- a/src/config/Blocks/listingVariations.js +++ b/src/config/Blocks/listingVariations.js @@ -42,6 +42,8 @@ import SimpleListTemplateSkeleton from 'design-comuni-plone-theme/components/Ita import CardWithSlideUpTextTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate'; import CardWithSlideUpTextTemplateSkeleton from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/CardWithSlideUpTextTemplateSkeleton'; +import AttachmentCardTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate'; + // import AmministrazioneTrasparenteTablesTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/AmministrazioneTrasparenteTablesTemplate'; // import AmministrazioneTrasparenteTablesTemplateSkeleton from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/AmministrazioneTrasparenteTablesTemplateSkeleton'; @@ -60,6 +62,7 @@ import { addPhotogalleryTemplateOptions, addLinkMoreOptions, addSmallBlockLinksTemplateOptions, + addAttachmentCardTemplateOptions, cloneBlock, } from 'design-comuni-plone-theme/config/Blocks/ListingOptions'; @@ -268,6 +271,20 @@ const italiaListingVariations = [ }, cloneData: cloneBlock, }, + { + id: 'attachmentCardTemplate', + isDefault: false, + title: 'Allegati', + template: AttachmentCardTemplate, + // used default skeleton + schemaEnhancer: ({ schema, formData, intl }) => { + let pos = addDefaultOptions(schema, formData, intl); + addAttachmentCardTemplateOptions(schema, formData, intl, pos); + addLinkMoreOptions(schema, formData, intl); + return schema; + }, + cloneData: cloneBlock, + }, // { // id: 'amministrazioneTrasparenteTablesTemplate', // isDefault: false, From b57f290e91da06e57e04e60f892846bba0c060e4 Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:32:58 +0100 Subject: [PATCH 10/19] fix: sovrapposizione etichetta card nastro (#409) * fix: spacing of label * chore: added info in RELEASE.md * fix: changed layout of ribbonCardTemplate --------- Co-authored-by: Piero Nicolli --- RELEASE.md | 1 + src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss | 11 +++++++---- src/theme/_site-variables.scss | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index e41dc9a9f..d85024e2a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -54,6 +54,7 @@ ### Fix +- L'etichetta della Card con Nastro (Blocco Elenco) non si sovrappone più all'immagine del nastro. - Aggiustato il layout della card per il CT persone quando è impostata un'immagine. ## Versione 11.8.0 (19/03/2024) diff --git a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss index 990e6006d..df9c276a1 100644 --- a/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss +++ b/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss @@ -1,5 +1,9 @@ .ribbon-card-template { .card { + .flag-icon { + width: $ribbon-width; + } + .dates { font-size: 0.8em; text-transform: uppercase; @@ -8,11 +12,10 @@ .etichetta { position: absolute; top: 3rem; - right: 0; - left: 0; - width: 100%; + right: 0px; + left: auto; + max-width: calc(100% - $ribbon-spacing-h * 3 - $ribbon-width); justify-content: inherit; - padding: 0 3rem; .icon { margin-left: auto; diff --git a/src/theme/_site-variables.scss b/src/theme/_site-variables.scss index ba08dcaaa..8388d11e2 100644 --- a/src/theme/_site-variables.scss +++ b/src/theme/_site-variables.scss @@ -59,3 +59,7 @@ $external-link-fill-subfooter: $tertiary-text !default; $dvt-navigation-v-padding: 15px !default; // $navigation-h-padding: 24px; + +$spacer: 16px; +$ribbon-spacing-h: calc($spacer * 3); +$ribbon-width: calc($spacer * 2); From 1c7bd5ccac6b08ee4dad6e56af4edec15c422f40 Mon Sep 17 00:00:00 2001 From: Martina Bustacchini <41484878+deodorhunter@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:03:25 +0100 Subject: [PATCH 11/19] fix: aria-label in calendar block controls (#620) Co-authored-by: Piero Nicolli --- locales/de/LC_MESSAGES/volto.po | 4 +-- locales/en/LC_MESSAGES/volto.po | 4 +-- locales/es/LC_MESSAGES/volto.po | 4 +-- locales/fr/LC_MESSAGES/volto.po | 4 +-- locales/it/LC_MESSAGES/volto.po | 8 +++--- locales/volto.pot | 6 ++--- .../ItaliaTheme/Blocks/Calendar/Body.jsx | 26 ++++++++++++++----- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index e9158aba5..7b273c8d8 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -1107,7 +1107,7 @@ msgid "calendarBlockSidebarTitle" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" msgstr "" @@ -1117,7 +1117,7 @@ msgid "calendar_no_results" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" msgstr "" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index e70149346..7db743d29 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -1092,7 +1092,7 @@ msgid "calendarBlockSidebarTitle" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" msgstr "" @@ -1102,7 +1102,7 @@ msgid "calendar_no_results" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" msgstr "" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 9ed68f7e2..62d4d2fb3 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -1101,7 +1101,7 @@ msgid "calendarBlockSidebarTitle" msgstr "Calendario" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" msgstr "Próximo" @@ -1111,7 +1111,7 @@ msgid "calendar_no_results" msgstr "No hay eventos disponibles en este momento" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" msgstr "Precedente" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 5432a1f62..7d625432c 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -1109,7 +1109,7 @@ msgid "calendarBlockSidebarTitle" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" msgstr "" @@ -1119,7 +1119,7 @@ msgid "calendar_no_results" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" msgstr "" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index ea3f12415..6c01e61e3 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -1092,9 +1092,9 @@ msgid "calendarBlockSidebarTitle" msgstr "Calendario" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" -msgstr "Prossimo" +msgstr "Prossimi eventi" #: components/ItaliaTheme/Blocks/Calendar/Body # defaultMessage: Nessun evento disponibile al momento @@ -1102,9 +1102,9 @@ msgid "calendar_no_results" msgstr "Nessun evento disponibile al momento" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" -msgstr "Precedente" +msgstr "Eventi precedenti" #: components/ItaliaTheme/manage/Widgets/CanaleDigitaleWidget # defaultMessage: Accedere al servizio diff --git a/locales/volto.pot b/locales/volto.pot index 21cb64346..5ef4413d2 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-03-27T08:54:22.652Z\n" +"POT-Creation-Date: 2024-03-27T15:08:22.683Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -1094,7 +1094,7 @@ msgid "calendarBlockSidebarTitle" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Prossimo +# defaultMessage: Prossimi eventi msgid "calendar_next_arrow" msgstr "" @@ -1104,7 +1104,7 @@ msgid "calendar_no_results" msgstr "" #: components/ItaliaTheme/Blocks/Calendar/Body -# defaultMessage: Precedente +# defaultMessage: Eventi precedenti msgid "calendar_prev_arrow" msgstr "" diff --git a/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx b/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx index 7ff3e95cb..8ca345b14 100644 --- a/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx @@ -30,11 +30,11 @@ const messages = defineMessages({ }, calendar_next_arrow: { id: 'calendar_next_arrow', - defaultMessage: 'Prossimo', + defaultMessage: 'Prossimi eventi', }, calendar_prev_arrow: { id: 'calendar_prev_arrow', - defaultMessage: 'Precedente', + defaultMessage: 'Eventi precedenti', }, }); @@ -172,10 +172,17 @@ const Body = ({ data, block, inEditMode, path, onChangeBlock, reactSlick }) => { const NextArrow = (props) => { const { onClick, className } = props; return ( - ); @@ -183,10 +190,17 @@ const Body = ({ data, block, inEditMode, path, onChangeBlock, reactSlick }) => { const PrevArrow = (props) => { const { onClick, className } = props; return ( - ); From 2e5d7f9b5a714b3560e790e5fab9f0cc232d832c Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Wed, 27 Mar 2024 17:12:27 +0100 Subject: [PATCH 12/19] fix: remove dangerouslySetInnerHTML from ContactLink (#601) * fix: remove dangerouslySetInnerHTML from ContactLink * fix: improve regexes --- locales/de/LC_MESSAGES/volto.po | 41 ----- locales/en/LC_MESSAGES/volto.po | 41 ----- locales/es/LC_MESSAGES/volto.po | 41 ----- locales/fr/LC_MESSAGES/volto.po | 41 ----- locales/it/LC_MESSAGES/volto.po | 41 ----- locales/volto.pot | 41 ----- .../ItaliaTheme/View/Commons/ContactLink.jsx | 78 ++++---- .../ItaliaTheme/View/Commons/SmallVenue.jsx | 1 + .../ItaliaTheme/View/UOView/UOTelephones.jsx | 1 + .../View/VenueView/VenueContacts.jsx | 170 +----------------- 10 files changed, 42 insertions(+), 454 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 7b273c8d8..c98743d97 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2750,7 +2750,6 @@ msgid "patrocinato_da" msgstr "" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2912,46 +2911,6 @@ msgstr "" msgid "riferimenti_normativi" msgstr "" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 7db743d29..9edfa7b04 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2735,7 +2735,6 @@ msgid "patrocinato_da" msgstr "Sponsored by" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2897,46 +2896,6 @@ msgstr "" msgid "riferimenti_normativi" msgstr "Normative requirements" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "PEC" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "Phone" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "Tel." - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "Web" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 62d4d2fb3..387511973 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2744,7 +2744,6 @@ msgid "patrocinato_da" msgstr "Patrocinado por" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2906,46 +2905,6 @@ msgstr "Responsable del procedimiento" msgid "riferimenti_normativi" msgstr "Requisitos del reglamentarios" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "Correo electrónico" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "Correo electrónico" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "PEC" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "Teléfono" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "Teléfono" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "Web" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 7d625432c..ce3741bf8 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2752,7 +2752,6 @@ msgid "patrocinato_da" msgstr "Sponsorisé par" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2914,46 +2913,6 @@ msgstr "" msgid "riferimenti_normativi" msgstr "Exigences normatives" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "PEC" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "Téléphone" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "Téléphone" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "Web" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index 6c01e61e3..e4789beb0 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2735,7 +2735,6 @@ msgid "patrocinato_da" msgstr "Patrocinato da" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2897,46 +2896,6 @@ msgstr "Responsabile del procedimento" msgid "riferimenti_normativi" msgstr "Riferimenti normativi" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "Fax" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "E-mail" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "PEC" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "Telefono" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "Telefono" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "Web" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/locales/volto.pot b/locales/volto.pot index 5ef4413d2..a2ea34074 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -2737,7 +2737,6 @@ msgid "patrocinato_da" msgstr "" #: components/ItaliaTheme/View/PuntoDiContattoView/PuntoDiContattoView -#: components/ItaliaTheme/View/VenueView/VenueContacts #: helpers/contentHelper # defaultMessage: PEC msgid "pec" @@ -2899,46 +2898,6 @@ msgstr "" msgid "riferimenti_normativi" msgstr "" -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Fax -msgid "riferimento_fax_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: E-mail -msgid "riferimento_mail_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: PEC -msgid "riferimento_pec_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_luogo" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Telefono -msgid "riferimento_telefonico_struttura" -msgstr "" - -#: components/ItaliaTheme/View/VenueView/VenueContacts -# defaultMessage: Web -msgid "riferimento_web" -msgstr "" - #: components/ItaliaTheme/View/Commons/Metadata # defaultMessage: Diritti msgid "rights" diff --git a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx index 180a6f76a..7dd01862e 100644 --- a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx +++ b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx @@ -30,58 +30,58 @@ const messages = defineMessages({ }, }); +const phoneRegex = /(\+?[0-9](?: ?[0-9/-]+)+.?[0-9]*)/gm; +const phoneCleanRegex = /-|\/|\s/gm; +const emailRegex = /([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi; +const emailCleanRegex = /|\/|\s/gm; + const ContactLink = ({ tel, fax, email, label = true, strong = false }) => { const intl = useIntl(); let ret_label = null; let ret = null; - function ReplacePhoneNumbers(str, type) { - // eslint-disable-next-line no-useless-escape - let newhtml = str.replace(/\+?[0-9]( ?[0-9\/-]+)+.?[0-9]*/gm, function (v) { - let r = - "" + - v + - ''; - return r; - }); - return newhtml; - } + const titles = { + tel: intl.formatMessage(messages.call), + fax: intl.formatMessage(messages.call_fax), + mailto: intl.formatMessage(messages.write_to), + }; - function ReplaceEmails(str) { - let newhtml = str.replace( - /([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi, - function (v) { - let r = - "" + - v + - ''; - return r; - }, - ); - return newhtml; + function replaceString(str, type) { + const regex = type === 'mailto' ? emailRegex : phoneRegex; + return str.split(regex).reduce((acc, substr, i) => { + if (substr.trim() !== '') return acc; + return [ + ...acc, + acc.length === 0 ? '' : ' ', + substr.test(regex) ? ( + + {substr} + + ) : ( + substr + ), + ]; + }, []); } if (tel) { ret_label = intl.formatMessage(messages.telefono); - ret = ReplacePhoneNumbers(tel, 'tel'); + ret = replaceString(tel, 'tel'); } else if (fax) { ret_label = intl.formatMessage(messages.fax); - ret = ReplacePhoneNumbers(fax, 'fax'); + ret = replaceString(fax, 'fax'); } else if (email) { ret_label = intl.formatMessage(messages.email_label); - ret = ReplaceEmails(email); + ret = replaceString(email, 'mailto'); } ret_label = label ? <>{ret_label}: : null; ret_label = label ? strong ? {ret_label} : ret_label : null; @@ -89,7 +89,7 @@ const ContactLink = ({ tel, fax, email, label = true, strong = false }) => { return ret ? ( <> {ret_label} - + {ret} ) : null; }; diff --git a/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx b/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx index 23035376d..c301b2c3e 100644 --- a/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx +++ b/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx @@ -1,3 +1,4 @@ +// TODO REMOVEME Sembra non più usato, rimuovere import { useDispatch, useSelector } from 'react-redux'; import React, { useEffect } from 'react'; import { getContent } from '@plone/volto/actions'; diff --git a/src/components/ItaliaTheme/View/UOView/UOTelephones.jsx b/src/components/ItaliaTheme/View/UOView/UOTelephones.jsx index 1f41b8701..70173d2c1 100644 --- a/src/components/ItaliaTheme/View/UOView/UOTelephones.jsx +++ b/src/components/ItaliaTheme/View/UOView/UOTelephones.jsx @@ -1,3 +1,4 @@ +// TODO REMOVEME Sembra non più usato, rimuovere import React from 'react'; import PropTypes from 'prop-types'; diff --git a/src/components/ItaliaTheme/View/VenueView/VenueContacts.jsx b/src/components/ItaliaTheme/View/VenueView/VenueContacts.jsx index 7f6dd0433..6e20e79e1 100644 --- a/src/components/ItaliaTheme/View/VenueView/VenueContacts.jsx +++ b/src/components/ItaliaTheme/View/VenueView/VenueContacts.jsx @@ -15,46 +15,10 @@ const messages = defineMessages({ id: 'contatti', defaultMessage: 'Contatti', }, - riferimento_telefonico_luogo: { - id: 'riferimento_telefonico_luogo', - defaultMessage: 'Telefono', - }, - riferimento_fax_luogo: { - id: 'riferimento_fax_luogo', - defaultMessage: 'Fax', - }, - riferimento_mail_luogo: { - id: 'riferimento_mail_luogo', - defaultMessage: 'E-mail', - }, - riferimento_pec_luogo: { - id: 'riferimento_pec_luogo', - defaultMessage: 'PEC', - }, - riferimento_web: { - id: 'riferimento_web', - defaultMessage: 'Web', - }, struttura_responsabile: { id: 'struttura_responsabile', defaultMessage: 'Struttura responsabile', }, - riferimento_telefonico_struttura: { - id: 'riferimento_telefonico_struttura', - defaultMessage: 'Telefono', - }, - riferimento_fax_struttura: { - id: 'riferimento_fax_struttura', - defaultMessage: 'Fax', - }, - riferimento_mail_struttura: { - id: 'riferimento_mail_struttura', - defaultMessage: 'E-mail', - }, - riferimento_pec_struttura: { - id: 'pec', - defaultMessage: 'PEC', - }, }); const VenueContacts = ({ content }) => { @@ -62,77 +26,12 @@ const VenueContacts = ({ content }) => { return content?.contact_info?.length > 0 || content?.struttura_responsabile_correlati?.length > 0 || - // richTextHasContent(content?.struttura_responsabile) || - // content?.riferimento_telefonico_struttura || - // content?.riferimento_fax_struttura || - // content?.riferimento_mail_struttura || - // content?.riferimento_pec_struttura ? ( richTextHasContent(content?.struttura_responsabile) ? ( <> - {/* CONTATTI LUOGO */} - {/* {(content?.telefono || - content?.email || - content?.fax || - content?.pec || - content?.web) && ( - - - - - - {content.telefono && ( -

- {intl.formatMessage(messages.riferimento_telefonico_luogo)} - : -

- )} - - {content.fax && ( -

- {intl.formatMessage(messages.riferimento_fax_luogo)} - : -

- )} - - {content.email && ( -

- {intl.formatMessage(messages.riferimento_mail_luogo)}:{' '} - -

- )} - - {content.pec && ( -

- {intl.formatMessage(messages.riferimento_pec_luogo)}:{' '} - -

- )} - - {content.web && ( -

- {intl.formatMessage(messages.riferimento_web)}:{' '} - - {content.web} - -

- )} -
-
- )} */} {content?.contact_info?.length > 0 && content.contact_info.map((contact) => ( { */}
{(content?.struttura_responsabile_correlati?.length > 0 || - richTextHasContent(content?.struttura_responsabile) || - content?.riferimento_telefonico_struttura || - content?.riferimento_fax_struttura || - content?.riferimento_mail_struttura || - content?.riferimento_pec_struttura) && ( + richTextHasContent(content?.struttura_responsabile)) && ( { ) : ( //STRUTTURA RESPONSABILE <> - {/* {(richTextHasContent(content.struttura_responsabile) || - content.riferimento_telefonico_struttura || - content.riferimento_fax_struttura || - content.riferimento_mail_struttura || - content.riferimento_pec_struttura) && ( */} {richTextHasContent(content.struttura_responsabile) && ( @@ -181,64 +71,6 @@ const VenueContacts = ({ content }) => { )} - {/* - {content.riferimento_telefonico_struttura && ( -
- - {intl.formatMessage( - messages.riferimento_telefonico_struttura, - )} - : - {' '} - -
- )} - {content.riferimento_fax_struttura && ( -
- - {intl.formatMessage( - messages.riferimento_fax_struttura, - )} - : - {' '} - -
- )} - {content.riferimento_mail_struttura && ( -
- - {intl.formatMessage( - messages.riferimento_mail_struttura, - )} - : - {' '} - -
- )} - {content.riferimento_pec_struttura && ( -
- - {intl.formatMessage( - messages.riferimento_pec_struttura, - )} - : - {' '} - -
- )} -
*/}
)} From a33c93b0b414e7cfb0b6b7344c799070a14f92ea Mon Sep 17 00:00:00 2001 From: sabrina-bongiovanni <116291154+sabrina-bongiovanni@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:20:02 +0100 Subject: [PATCH 13/19] fix: added aria label to icons across ioComune (#557) * fix: added aria label to icons across ioComune * fix: added alt text to all icons * fix: changed alt text to title and added arialabelled-by and ids * chore: removed unused code * fix: added translations * fix: used previously created translation messages * fix: added translations * fix: title attributes in all icons * fix: removed aria-labelledby from FontAwesomeIcon * fix: added aria-labelledby to FontAwesomeIcon --------- Co-authored-by: Piero Nicolli --- locales/de/LC_MESSAGES/volto.po | 56 ++++++++++++++++++ locales/en/LC_MESSAGES/volto.po | 56 ++++++++++++++++++ locales/es/LC_MESSAGES/volto.po | 56 ++++++++++++++++++ locales/fr/LC_MESSAGES/volto.po | 56 ++++++++++++++++++ locales/it/LC_MESSAGES/volto.po | 56 ++++++++++++++++++ locales/volto.pot | 58 ++++++++++++++++++- .../Blocks/Accordion/Block/ViewBlock.jsx | 18 +++++- .../Common/SearchFilters/DateFilter.jsx | 16 +++++ .../Blocks/HeroImageLeft/StoresButtons.jsx | 4 +- .../Blocks/Listing/RibbonCardTemplate.jsx | 14 ++++- .../SimpleCard/SimpleCardTemplateCompact.jsx | 16 ++++- .../Blocks/Listing/SliderTemplate.jsx | 35 +++++++++-- .../ItaliaTheme/Blocks/NumbersBlock/View.jsx | 12 +++- .../Blocks/SearchSections/Body.jsx | 7 ++- .../ItaliaTheme/Blocks/VideoGallery/Body.jsx | 7 ++- .../ItaliaTheme/Cards/CardCategory.jsx | 13 ++++- .../ItaliaTheme/Footer/FooterNavigation.jsx | 7 ++- .../ItaliaTheme/Footer/FooterSocials.jsx | 1 + .../Header/HeaderSearch/HeaderSearch.jsx | 2 +- .../ItaliaTheme/Header/SocialHeader.jsx | 8 ++- .../ItaliaTheme/Icons/DesignIcon.jsx | 7 ++- .../ItaliaTheme/Icons/FontAwesomeIcon.jsx | 8 ++- src/components/ItaliaTheme/Icons/Icon.jsx | 1 - .../ItaliaTheme/Icons/svg/TelegramSVG.jsx | 1 + .../ItaliaTheme/Icons/svg/XTwitterSVG.jsx | 1 + .../ItaliaTheme/Pagination/PaginationItem.jsx | 2 + .../View/Commons/Argument/ArgumentIcon.jsx | 19 +++++- .../ItaliaTheme/View/Commons/HelpBox.jsx | 9 +++ .../ItaliaTheme/View/Commons/LocationItem.jsx | 11 +++- .../ItaliaTheme/View/Commons/OfficeCard.jsx | 16 ++++- .../View/Commons/SearchSectionForm.jsx | 7 ++- .../EventoContattiOrganizzatoreEsterno.jsx | 14 ++++- .../PaginaArgomentoView.jsx | 2 +- src/components/SelectInput/SelectInput.jsx | 17 +++++- .../volto-form-block/components/Field.jsx | 20 +++++++ .../Search/components/DateRangeFacet.jsx | 10 +++- .../theme/Navigation/Navigation.jsx | 18 +++++- 37 files changed, 622 insertions(+), 39 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index c98743d97..a390876f4 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -839,6 +839,12 @@ msgstr "" msgid "argoment" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1157,6 +1163,11 @@ msgstr "" msgid "casi_particolari" msgstr "" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1215,6 +1226,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1756,6 +1772,11 @@ msgstr "" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2229,6 +2250,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2611,6 +2652,16 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3940,6 +3991,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index 9edfa7b04..ef6faef15 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -824,6 +824,12 @@ msgstr "Responsible area" msgid "argoment" msgstr "Topic" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "{type} Icon" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1142,6 +1148,11 @@ msgstr "Downloadable formats" msgid "casi_particolari" msgstr "Special cases" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "Category icon" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1200,6 +1211,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "Close the accordion" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1741,6 +1757,11 @@ msgstr "Download" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "Open the menu" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2214,6 +2235,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "Icon for {topic_title} topic" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "Venues icon" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "Phone icon" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "Office icon" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2596,6 +2637,16 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Press release number" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "Open the accordion" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "Open link" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3925,6 +3976,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Responsible office" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "Further information icon" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 387511973..981bb5564 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -833,6 +833,12 @@ msgstr "Área responsable" msgid "argoment" msgstr "Tema" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1151,6 +1157,11 @@ msgstr "Formatos descargables" msgid "casi_particolari" msgstr "Casos especiales" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1209,6 +1220,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1750,6 +1766,11 @@ msgstr "Descargar" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2223,6 +2244,26 @@ msgstr "Icono" msgid "iconDescription" msgstr "Puede seleccionar un icono de los propuestos en el menú desplegable o puede escribir/pegar el nombre de un icono 'fontawesome 5' en el campo de texto" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2605,6 +2646,16 @@ msgstr "Bloque de números" msgid "numero_progressivo_cs" msgstr "Número de comunicado de prensa" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3934,6 +3985,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Oficina responsable" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index ce3741bf8..e92c08aa2 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -841,6 +841,12 @@ msgstr "Zone responsable" msgid "argoment" msgstr "Sujet" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1159,6 +1165,11 @@ msgstr "Formats téléchargeables" msgid "casi_particolari" msgstr "Cas spéciaux" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1217,6 +1228,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1758,6 +1774,11 @@ msgstr "Télécharger" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2231,6 +2252,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2613,6 +2654,16 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "Numéro du communiqué de presse" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3942,6 +3993,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "Bureau responsable" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index e4789beb0..9c47e9621 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -824,6 +824,12 @@ msgstr "Area responsabile" msgid "argoment" msgstr "Argomento" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1142,6 +1148,11 @@ msgstr "Formati scaricabili" msgid "casi_particolari" msgstr "Casi particolari" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1200,6 +1211,11 @@ msgstr "Rimuovi ricerca testuale" msgid "close-menu" msgstr "Chiudi menu" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1741,6 +1757,11 @@ msgstr "Scarica" msgid "downloadPlayVideo" msgstr "Scarica e riproduci video" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2214,6 +2235,26 @@ msgstr "Icona" msgid "iconDescription" msgstr "Puoi selezionare un’icona fra quelle proposte nel menu a tendina oppure puoi scrivere/incollare nel campo di testo il nome di un’icona di fontawesome 6" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2596,6 +2637,16 @@ msgstr "Blocco numeri" msgid "numero_progressivo_cs" msgstr "Numero del comunicato stampa" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3925,6 +3976,11 @@ msgstr "Unità organizzativa" msgid "ufficio_responsabile" msgstr "Ufficio responsabile" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/locales/volto.pot b/locales/volto.pot index a2ea34074..dc2b876cf 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -826,6 +826,12 @@ msgstr "" msgid "argoment" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate +#: components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact +# defaultMessage: Icona {type} +msgid "argument_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar # defaultMessage: Argomenti in evidenza msgid "arguments_in_evidence_block" @@ -1144,6 +1150,11 @@ msgstr "" msgid "casi_particolari" msgstr "" +#: components/ItaliaTheme/Cards/CardCategory +# defaultMessage: Icona categoria +msgid "category_icon" +msgstr "" + #: components/ItaliaTheme/Blocks/VideoGallery/Sidebar # defaultMessage: Link al canale msgid "channel_link" @@ -1202,6 +1213,11 @@ msgstr "" msgid "close-menu" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Chiudi l'accordion +msgid "closeAccordion" +msgstr "" + #: components/ItaliaTheme/Header/HeaderSearch/SearchModal # defaultMessage: Chiudi cerca msgid "closeSearch" @@ -1743,6 +1759,11 @@ msgstr "" msgid "downloadPlayVideo" msgstr "" +#: components/SelectInput/SelectInput +# defaultMessage: Apri il menu +msgid "dropdown_indicator" +msgstr "" + #: components/ItaliaTheme/manage/Widgets/MenuConfigurationForm # defaultMessage: Additional classes msgid "dropdownmenu-additionalClasses" @@ -2216,6 +2237,26 @@ msgstr "" msgid "iconDescription" msgstr "" +#: components/ItaliaTheme/View/Commons/Argument/ArgumentIcon +# defaultMessage: Icona per l'argomento {topic_title} +msgid "icon_title" +msgstr "" + +#: components/ItaliaTheme/View/Commons/LocationItem +# defaultMessage: Icona luoghi +msgid "icona_luoghi" +msgstr "" + +#: components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno +# defaultMessage: Icona telefono +msgid "icona_telefono" +msgstr "" + +#: components/ItaliaTheme/View/Commons/OfficeCard +# defaultMessage: Icona ufficio +msgid "icona_ufficio" +msgstr "" + #: components/ItaliaTheme/Blocks/IconBlocks/Sidebar # defaultMessage: Blocco con icone msgid "iconss_blocks" @@ -2598,6 +2639,16 @@ msgstr "" msgid "numero_progressivo_cs" msgstr "" +#: components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock +# defaultMessage: Apri l'accordion +msgid "openAccordion" +msgstr "" + +#: components/ItaliaTheme/Blocks/Listing/SliderTemplate +# defaultMessage: Apri il link +msgid "openLink" +msgstr "" + #: components/ItaliaTheme/Blocks/CTABlock/Block # defaultMessage: Apri link in una nuova scheda msgid "openLinkInNewTab" @@ -3234,7 +3285,7 @@ msgid "search_startDate" msgstr "" #: helpers/Translations/searchBlockExtendedTranslations -# defaultMessage: Ricerca per: {searchedtext}. +# defaultMessage: Ricerca per: {searchedtext}. msgid "searchedFor" msgstr "" @@ -3927,6 +3978,11 @@ msgstr "" msgid "ufficio_responsabile" msgstr "" +#: components/ItaliaTheme/View/Commons/HelpBox +# defaultMessage: Icona ulteriori informazioni +msgid "ulteriori_info" +msgstr "" + #: components/ItaliaTheme/View/Commons/TrasparenzaFields #: components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks #: components/ItaliaTheme/View/TrasparenzaView/DettagliProcedimentiView diff --git a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx index 44b7a7b28..7c43c54b6 100644 --- a/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +++ b/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx @@ -17,6 +17,14 @@ const messages = defineMessages({ id: 'Vedi', defaultMessage: 'Vedi', }, + closeAccordion: { + id: 'closeAccordion', + defaultMessage: "Chiudi l'accordion", + }, + openAccordion: { + id: 'openAccordion', + defaultMessage: "Apri l'accordion", + }, }); /** @@ -40,6 +48,11 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => { color="primary" icon={isOpen ? 'it-minus' : 'it-plus'} padding={false} + title={ + isOpen + ? intl.formatMessage(messages.closeAccordion) + : intl.formatMessage(messages.openAccordion) + } /> {redraft( @@ -69,7 +82,10 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
{data.linkMoreTitle || intl.formatMessage(messages.vedi)} - +
)} diff --git a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx index 58989fe1d..d93d7ebd8 100644 --- a/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx +++ b/src/components/ItaliaTheme/Blocks/Common/SearchFilters/DateFilter.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import { useIntl, defineMessages } from 'react-intl'; +import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; @@ -174,6 +175,7 @@ const getDateRangePickerPhrases = (intl) => { ), }; }; + const DateFilter = (props) => { const intl = useIntl(); const [focusedDateInput, setFocusedDateInput] = useState(null); @@ -251,6 +253,20 @@ const DateFilter = (props) => { hideKeyboardShortcutsPanel={true} showClearDates phrases={getDateRangePickerPhrases(intl)} + customArrowIcon={ + + } + customCloseIcon={ + + } /> ); diff --git a/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx b/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx index b687319aa..4193376d8 100644 --- a/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx +++ b/src/components/ItaliaTheme/Blocks/HeroImageLeft/StoresButtons.jsx @@ -23,14 +23,14 @@ const StoresButtons = ({ data }) => { {data.playStoreLink && ( )} {data.appStoreLink && ( )} diff --git a/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx index 76338420a..ceeeb1feb 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx @@ -35,6 +35,10 @@ const messages = defineMessages({ id: 'Vedi', defaultMessage: 'Vedi', }, + argumentIcon: { + id: 'argument_icon', + defaultMessage: 'Icona {type}', + }, }); const RibbonCardTemplate = (props) => { @@ -96,7 +100,6 @@ const RibbonCardTemplate = (props) => { name: 'BlockExtraTags', dependencies: ['RibbonCardTemplate', item['@type']], }).component; - return ( { {(category || icon) && (
- {icon && } + {icon && ( + + )} {category && {category}}
)} diff --git a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx index 032958dd1..c9f0ddb23 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateCompact.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { UniversalLink } from '@plone/volto/components'; @@ -10,6 +11,13 @@ import { ListingLinkMore, } from 'design-comuni-plone-theme/components/ItaliaTheme'; +const messages = defineMessages({ + argumentIcon: { + id: 'argument_icon', + defaultMessage: 'Icona {type}', + }, +}); + const SimpleCardTemplateCompact = ({ items, isEditMode, @@ -23,6 +31,7 @@ const SimpleCardTemplateCompact = ({ titleLine, linkmore_id_lighthouse, }) => { + const intl = useIntl(); return (
{title && ( @@ -49,7 +58,12 @@ const SimpleCardTemplateCompact = ({ > {show_icon && (
- +
)} diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index badf03459..832006211 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -50,6 +50,10 @@ const messages = defineMessages({ id: 'slideDot', defaultMessage: 'Vai alla slide {index}', }, + openLink: { + id: 'openLink', + defaultMessage: 'Apri il link', + }, }); function NextArrow(props) { @@ -81,7 +85,11 @@ function NextArrow(props) { onKeyDown={handleKeyboardUsers} id="sliderNextArrow" > - + {intl.formatMessage(messages.successivo)} @@ -126,7 +134,11 @@ function PrevArrow(props) { id="sliderPrevArrow" onKeyDown={handleKeyboardUsers} > - + {intl.formatMessage(messages.precedente)} @@ -185,11 +197,21 @@ const Slide = ({ > {full_width ? ( - {item.title} + {item.title}{' '} + ) : ( <> - {item.title} + {item.title}{' '} + )} @@ -342,6 +364,11 @@ const SliderTemplate = ({ {userAutoplay ? 'pause' : 'play'} diff --git a/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx b/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx index 9808b9d72..c70c5378c 100644 --- a/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx +++ b/src/components/ItaliaTheme/Blocks/NumbersBlock/View.jsx @@ -50,9 +50,15 @@ const NumbersView = ({ data, block }) => {
{(data.icon1 || data.icon2 || data.icon3) && (
- {data.icon1?.length > 0 && } - {data.icon2?.length > 0 && } - {data.icon3?.length > 0 && } + {data.icon1?.length > 0 && ( + + )} + {data.icon2?.length > 0 && ( + + )} + {data.icon3?.length > 0 && ( + + )}
)} diff --git a/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx b/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx index 1909ef393..e1f0e0f78 100644 --- a/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/SearchSections/Body.jsx @@ -61,7 +61,12 @@ const Body = ({ block, sections }) => { onClick={(e) => navigate(inputText, searchFilters())} aria-label={intl.formatMessage(messages.doSearch)} > - + { {data?.title &&

{data.title}

} {(data?.channel_link || data?.channel_link_title) && (
- + {data.channel_link ? ( { const { iconName, date, href, children, ...rest } = props; + const intl = useIntl(); const classes = classNames({ 'category-top': date || ' ', 'categoryicon-top': iconName, @@ -29,7 +38,9 @@ const CardCategory = (props) => { const categoryText = !href && children && ( {children} ); - const categoryIcon = iconName && ; + const categoryIcon = iconName && ( + + ); return (
diff --git a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx index f34eb012d..8e45c5241 100644 --- a/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +++ b/src/components/ItaliaTheme/Footer/FooterNavigation.jsx @@ -51,7 +51,12 @@ const FooterNavigation = () => {

{ className="align-top" padding={false} size="sm" + title={social.title} /> {social.title} diff --git a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx index 96fbea568..98842f36d 100644 --- a/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +++ b/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx @@ -35,7 +35,7 @@ const HeaderSearch = () => { href="/search" role="button" > - +

{ target="_blank" rel="noopener noreferrer" > - + ))} diff --git a/src/components/ItaliaTheme/Icons/DesignIcon.jsx b/src/components/ItaliaTheme/Icons/DesignIcon.jsx index e07e4f8fa..5c51b1332 100644 --- a/src/components/ItaliaTheme/Icons/DesignIcon.jsx +++ b/src/components/ItaliaTheme/Icons/DesignIcon.jsx @@ -1,4 +1,5 @@ -import React, { useState, useEffect, useRef } from 'react'; +import React, { useState, useEffect, useRef, useMemo } from 'react'; +import { v4 as uuid } from 'uuid'; import PropTypes from 'prop-types'; const propTypes = { @@ -19,6 +20,7 @@ const defaultProps = { const Icon = ({ icon, title, className, size }) => { const ImportedIconRef = useRef(null); const [loading, setLoading] = useState(false); + const iconID = useMemo(() => uuid(), []); useEffect(() => { setLoading(true); @@ -50,9 +52,10 @@ const Icon = ({ icon, title, className, size }) => { aria-hidden="true" dangerouslySetInnerHTML={{ __html: title - ? `${title}${name.content}` + ? `${title}${name.content}` : name.content, }} + aria-labelledby={iconID} /> ); } diff --git a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx index fa17e5fd6..6fd082386 100644 --- a/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +++ b/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx @@ -2,17 +2,18 @@ * Icon component. * @module components/ItaliaTheme/Icons/SectionIcon */ -import React from 'react'; +import React, { useMemo } from 'react'; +import { v4 as uuid } from 'uuid'; import { fontAwesomeAliases } from 'design-comuni-plone-theme/helpers/index'; const FontAwesomeIcon = (props) => { const { className, icon, prefix, title } = props; + const iconID = useMemo(() => uuid(), []); const [loadedIcon, setLoadedIcon] = React.useState({ module: null, iconName: '', family: 'solid', }); - const getIconAlias = (icon, aliasList) => { if (icon in aliasList) { return aliasList[icon]; @@ -71,9 +72,10 @@ const FontAwesomeIcon = (props) => { className={`icon fa-icon ${className ?? ''}`} dangerouslySetInnerHTML={{ __html: title - ? `${title}${loadedIcon.module.content}` + ? `${title}${loadedIcon.module.content}` : loadedIcon.module.content, }} + aria-labelledby={iconID} aria-hidden={props['aria-hidden']} /> ) : icon ? ( diff --git a/src/components/ItaliaTheme/Icons/Icon.jsx b/src/components/ItaliaTheme/Icons/Icon.jsx index e768ec6b2..06939fb88 100644 --- a/src/components/ItaliaTheme/Icons/Icon.jsx +++ b/src/components/ItaliaTheme/Icons/Icon.jsx @@ -12,7 +12,6 @@ import { FontAwesomeIcon } from 'design-comuni-plone-theme/components/ItaliaThem const Icon = (props) => { const { icon, className, color, size, padding, ...rest } = props; - if (icon) { const classes = classNames( 'icon', diff --git a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx index 3fd17472a..f5350920a 100644 --- a/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/TelegramSVG.jsx @@ -10,6 +10,7 @@ const TelegramSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" + aria-label="Telegram" > diff --git a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx index 1d1cad9ef..52d381c43 100644 --- a/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx +++ b/src/components/ItaliaTheme/Icons/svg/XTwitterSVG.jsx @@ -10,6 +10,7 @@ const XTwitterSVG = (props) => ( role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" + aria-label="Twitter" > diff --git a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx index de8182097..b389586c8 100644 --- a/src/components/ItaliaTheme/Pagination/PaginationItem.jsx +++ b/src/components/ItaliaTheme/Pagination/PaginationItem.jsx @@ -79,6 +79,7 @@ class PaginationItem extends Component { icon="it-chevron-left" style={{ ariaHidden: true }} color="primary" + title={intl.formatMessage(messages.prevPage)} /> @@ -92,6 +93,7 @@ class PaginationItem extends Component { icon="it-chevron-right" style={{ ariaHidden: true }} color="primary" + title={intl.formatMessage(messages.nextPage)} /> {intl.formatMessage(messages.nextPage)} diff --git a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx index e90c2a21a..69870950f 100644 --- a/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx +++ b/src/components/ItaliaTheme/View/Commons/Argument/ArgumentIcon.jsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; @@ -8,10 +9,17 @@ import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; * @params {object} Dates: object. * @returns {string} Markup of the component. */ -const ArgumentIcon = ({ icon }) => { +const ArgumentIcon = ({ icon, title }) => { + const intl = useIntl(); + return icon ? (
- +
) : null; }; @@ -21,3 +29,10 @@ export default ArgumentIcon; ArgumentIcon.propTypes = { icon: PropTypes.string, }; + +const messages = defineMessages({ + iconTitle: { + id: 'icon_title', + defaultMessage: "Icona per l'argomento {topic_title}", + }, +}); diff --git a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx index 688fe4b41..7636343ae 100644 --- a/src/components/ItaliaTheme/View/Commons/HelpBox.jsx +++ b/src/components/ItaliaTheme/View/Commons/HelpBox.jsx @@ -1,10 +1,12 @@ import React from 'react'; +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Callout, CalloutTitle } from 'design-react-kit'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import { RichText } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const HelpBox = ({ text }) => { + const intl = useIntl(); return text ? ( @@ -14,6 +16,7 @@ const HelpBox = ({ text }) => { padding={false} size="" aria-hidden + title={intl.formatMessage(messages.ulteriori_info)} /> @@ -28,4 +31,10 @@ HelpBox.propTypes = { text: PropTypes.object.isRequired, }; +const messages = defineMessages({ + ulteriori_info: { + id: 'ulteriori_info', + defaultMessage: 'Icona ulteriori informazioni', + }, +}); export default HelpBox; diff --git a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx index 6c6192bd3..c383ecb42 100644 --- a/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +++ b/src/components/ItaliaTheme/View/Commons/LocationItem.jsx @@ -27,6 +27,10 @@ const messages = defineMessages({ id: 'circoscrizione', defaultMessage: 'Circoscrizione', }, + icona_luoghi: { + id: 'icona_luoghi', + defaultMessage: 'Icona luoghi', + }, }); const LocationItem = ({ @@ -45,7 +49,12 @@ const LocationItem = ({ return location ? (
- {show_icon && } + {show_icon && ( + + )}
{(location.nome_sede || location.title) && ( diff --git a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx index fe499479e..b67c5d20c 100644 --- a/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +++ b/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx @@ -1,3 +1,4 @@ +import { useIntl, defineMessages } from 'react-intl'; import { UniversalLink } from '@plone/volto/components'; import PropTypes from 'prop-types'; import cx from 'classnames'; @@ -21,6 +22,7 @@ const OfficeCard = ({ no_details = false, ...rest }) => { + const intl = useIntl(); const Image = config.getComponent({ name: 'Image' }).component; const image = showimage && Image({ item: office, sizes: '80px', loading: 'lazy' }); @@ -36,7 +38,12 @@ const OfficeCard = ({ )} {...rest} > - {icon && } + {icon && ( + + )}
{ id="search-page-button" className="pe-2 py-0 rounded-0" > - +
diff --git a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx index 32a9872e7..85ff6ea56 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx @@ -1,3 +1,4 @@ +import { useIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; import { Card, CardBody } from 'design-react-kit'; import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; @@ -8,6 +9,7 @@ import { } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const EventoContattiOrganizzatoreEsterno = ({ content }) => { + const intl = useIntl(); return richTextHasContent(content?.organizzato_da_esterno) || content?.telefono || content?.email || @@ -18,7 +20,10 @@ const EventoContattiOrganizzatoreEsterno = ({ content }) => { noWrapper={true} tag="div" > - + @@ -52,4 +57,11 @@ EventoContattiOrganizzatoreEsterno.propTypes = { content: PropTypes.object.isRequired, }; +const messages = defineMessages({ + icona_telefono: { + id: 'icona_telefono', + defaultMessage: 'Icona telefono', + }, +}); + export default EventoContattiOrganizzatoreEsterno; diff --git a/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx b/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx index d834bb72f..ec9e3e494 100644 --- a/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx +++ b/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx @@ -87,7 +87,7 @@ const PaginaArgomentoView = ({ content }) => { > - +

{content?.title}

diff --git a/src/components/SelectInput/SelectInput.jsx b/src/components/SelectInput/SelectInput.jsx index 7e0e37ec9..1902478b2 100644 --- a/src/components/SelectInput/SelectInput.jsx +++ b/src/components/SelectInput/SelectInput.jsx @@ -88,6 +88,10 @@ const messages = defineMessages({ id: 'ay11_select cancel', defaultMessage: 'Annulla', }, + dropwdown_indicator: { + id: 'dropdown_indicator', + defaultMessage: 'Apri il menu', + }, }); const SelectContainer = injectLazyLibs('reactSelect')(({ @@ -131,10 +135,15 @@ MenuList.propTypes = { }; const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { + const intl = useIntl(); const components = props.reactSelect.components; return ( - + ); }); @@ -165,7 +174,11 @@ const ClearIndicator = (props) => { style={{ padding: '0px 5px' }} title={intl.formatMessage(messages.ay11_for_cancel)} > - +
); diff --git a/src/customizations/volto-form-block/components/Field.jsx b/src/customizations/volto-form-block/components/Field.jsx index daad047a5..1052b5813 100644 --- a/src/customizations/volto-form-block/components/Field.jsx +++ b/src/customizations/volto-form-block/components/Field.jsx @@ -10,6 +10,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { useIntl, defineMessages } from 'react-intl'; import { Input, FormGroup, Label } from 'design-react-kit'; +import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme'; import FileWidget from 'design-comuni-plone-theme/components/ItaliaTheme/manage/Widgets/FileWidget'; import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable'; @@ -22,6 +23,24 @@ const messages = defineMessages({ id: 'form_select_a_value', defaultMessage: 'Seleziona un valore', }, + open_menu: { + id: 'open_menu', + defaultMessage: 'Apri il menu', + }, +}); + +const DropdownIndicator = injectLazyLibs('reactSelect')((props) => { + const intl = useIntl(); + const components = props.reactSelect.components; + return ( + + + + ); }); /** @@ -114,6 +133,7 @@ const Field = ({