io-sanita-theme 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/RELEASE.md +15 -3
- package/locales/de/LC_MESSAGES/volto.po +3 -3
- package/locales/en/LC_MESSAGES/volto.po +3 -3
- package/locales/es/LC_MESSAGES/volto.po +3 -3
- package/locales/fr/LC_MESSAGES/volto.po +3 -3
- package/locales/it/LC_MESSAGES/volto.po +3 -3
- package/locales/volto.pot +4 -4
- package/package.json +1 -1
- package/src/components/Blocks/Listing/Carousel/CarouselTemplate.jsx +8 -2
- package/src/components/Blocks/Listing/Carousel/SlideAppearance/SlideGalleryItem.jsx +3 -3
- package/src/components/Blocks/Listing/Carousel/SlideAppearance/slideGalleryItem.scss +0 -12
- package/src/components/Blocks/Listing/Carousel/carouselTemplate.scss +10 -1
- package/src/components/Blocks/Listing/schema.js +12 -1
- package/src/components/Blocks/SearchMap/Body.jsx +4 -1
- package/src/components/Blocks/SearchServiziProcedure/Body.jsx +2 -2
- package/src/components/Cards/CardPersona/CardPersona.jsx +2 -2
- package/src/components/Search/common/SearchResultItem.jsx +6 -6
- package/src/components/Slider/SingleSlideWrapper.jsx +0 -2
- package/src/components/Slider/slider.js +26 -1
- package/src/components/View/commons/Gallery/Gallery.jsx +1 -0
- package/src/components/layout/Header/LanguageSelector.jsx +1 -1
- package/src/config/blocks/index.js +9 -4
- package/src/config/blocks/listing/ListingOptions/cardWithImageTemplate.js +2 -0
- package/src/config/blocks/listing/ListingOptions/carouselTemplate.js +33 -8
- package/src/config/blocks/listing/ListingOptions/index.js +1 -0
- package/src/config/blocks/listing/ListingOptions/simpleCardTemplate.js +2 -0
- package/src/config/blocks/listing/ListingOptions/utils.js +13 -6
- package/src/config/blocks/listing/listingVariations.js +1 -1
- package/src/theme/io-sanita/_mixins.scss +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.1](https://github.com/RedTurtle/io-sanita-theme/compare/2.3.0...2.3.1) (2025-02-25)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* a11y warning ([688bea5](https://github.com/RedTurtle/io-sanita-theme/commit/688bea5d793832f0f06a98a0e46bb992331620eb))
|
|
8
|
+
* listing fieldset and carousel options ([ecec497](https://github.com/RedTurtle/io-sanita-theme/commit/ecec4975db519e9cda7de3df7ea0c3f14915a588))
|
|
9
|
+
* locales and release.md ([94317a7](https://github.com/RedTurtle/io-sanita-theme/commit/94317a7ecdbbb6e1f8e4f61d1722a748f4926064))
|
|
10
|
+
* mismatch server / client classname render ([9f1c20c](https://github.com/RedTurtle/io-sanita-theme/commit/9f1c20ceb23284caa20b66924dce529da78572a7))
|
|
11
|
+
* remove margin between full-block and image block ([c7b0fe4](https://github.com/RedTurtle/io-sanita-theme/commit/c7b0fe419e6664fc58cd7da0d8c4abcd51bd79b4))
|
|
12
|
+
* warnings ([2d10163](https://github.com/RedTurtle/io-sanita-theme/commit/2d10163dc917958329e813deb7ca92841a4190d6))
|
|
13
|
+
|
|
3
14
|
## [2.3.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.2.4...2.3.0) (2025-02-24)
|
|
4
15
|
|
|
5
16
|
### Features
|
package/RELEASE.md
CHANGED
|
@@ -41,14 +41,26 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
-
## Versione
|
|
44
|
+
## Versione 2.3.0 (24/02/2025)
|
|
45
|
+
|
|
46
|
+
### Novità
|
|
47
|
+
|
|
48
|
+
- aggiunto il template 'Carousel' per il blocco elenco, con il quale è possibile realizzare sia caroselli, sia gallery con immagini che si aprono in popup
|
|
49
|
+
|
|
50
|
+
## Versione 2.2.1 (12/02/2025)
|
|
45
51
|
|
|
46
52
|
### Migliorie
|
|
47
53
|
|
|
48
|
-
- aggiunto il tag <lin rel="canonical"> per tutte le pagine, come suggerito da consulente SEO
|
|
49
|
-
- aggiunta la barra di loading nella parte alta della pagina quando si sta caricando un contenuto
|
|
50
54
|
- a11y - migliorata l'accessibilità del sito per quanto riguarda le icone
|
|
51
55
|
- a11y - migliorato il contrasto del focus sugli elementi con la navigazione da tastiera
|
|
56
|
+
- aggiunto il tag <lin rel="canonical"> per tutte le pagine, come suggerito da consulente SEO
|
|
57
|
+
- aggiunta la barra di loading nella parte alta della pagina quando si sta caricando un contenuto
|
|
58
|
+
|
|
59
|
+
## Versione 2.2.0 (06/02/2025)
|
|
60
|
+
|
|
61
|
+
### Migliorie
|
|
62
|
+
|
|
63
|
+
- Ordinate le date del bando in ordine cronologico
|
|
52
64
|
|
|
53
65
|
## Versione 2.1.0 (05/02/2025)
|
|
54
66
|
|
|
@@ -3288,18 +3288,18 @@ msgstr ""
|
|
|
3288
3288
|
msgid "show_icon"
|
|
3289
3289
|
msgstr ""
|
|
3290
3290
|
|
|
3291
|
-
#. Default: "Mostra la descrizione
|
|
3291
|
+
#. Default: "Mostra la descrizione"
|
|
3292
3292
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3293
3293
|
msgid "show_image_description"
|
|
3294
3294
|
msgstr ""
|
|
3295
3295
|
|
|
3296
|
-
#. Default: "Apri l'
|
|
3296
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3297
3297
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3298
3298
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3299
3299
|
msgid "show_image_popup"
|
|
3300
3300
|
msgstr ""
|
|
3301
3301
|
|
|
3302
|
-
#. Default: "Mostra il titolo
|
|
3302
|
+
#. Default: "Mostra il titolo"
|
|
3303
3303
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3304
3304
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3305
3305
|
msgid "show_image_title"
|
|
@@ -3283,18 +3283,18 @@ msgstr ""
|
|
|
3283
3283
|
msgid "show_icon"
|
|
3284
3284
|
msgstr ""
|
|
3285
3285
|
|
|
3286
|
-
#. Default: "Mostra la descrizione
|
|
3286
|
+
#. Default: "Mostra la descrizione"
|
|
3287
3287
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3288
3288
|
msgid "show_image_description"
|
|
3289
3289
|
msgstr ""
|
|
3290
3290
|
|
|
3291
|
-
#. Default: "Apri l'
|
|
3291
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3292
3292
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3293
3293
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3294
3294
|
msgid "show_image_popup"
|
|
3295
3295
|
msgstr ""
|
|
3296
3296
|
|
|
3297
|
-
#. Default: "Mostra il titolo
|
|
3297
|
+
#. Default: "Mostra il titolo"
|
|
3298
3298
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3299
3299
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3300
3300
|
msgid "show_image_title"
|
|
@@ -3290,18 +3290,18 @@ msgstr ""
|
|
|
3290
3290
|
msgid "show_icon"
|
|
3291
3291
|
msgstr ""
|
|
3292
3292
|
|
|
3293
|
-
#. Default: "Mostra la descrizione
|
|
3293
|
+
#. Default: "Mostra la descrizione"
|
|
3294
3294
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3295
3295
|
msgid "show_image_description"
|
|
3296
3296
|
msgstr ""
|
|
3297
3297
|
|
|
3298
|
-
#. Default: "Apri l'
|
|
3298
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3299
3299
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3300
3300
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3301
3301
|
msgid "show_image_popup"
|
|
3302
3302
|
msgstr ""
|
|
3303
3303
|
|
|
3304
|
-
#. Default: "Mostra il titolo
|
|
3304
|
+
#. Default: "Mostra il titolo"
|
|
3305
3305
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3306
3306
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3307
3307
|
msgid "show_image_title"
|
|
@@ -3290,18 +3290,18 @@ msgstr ""
|
|
|
3290
3290
|
msgid "show_icon"
|
|
3291
3291
|
msgstr ""
|
|
3292
3292
|
|
|
3293
|
-
#. Default: "Mostra la descrizione
|
|
3293
|
+
#. Default: "Mostra la descrizione"
|
|
3294
3294
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3295
3295
|
msgid "show_image_description"
|
|
3296
3296
|
msgstr ""
|
|
3297
3297
|
|
|
3298
|
-
#. Default: "Apri l'
|
|
3298
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3299
3299
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3300
3300
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3301
3301
|
msgid "show_image_popup"
|
|
3302
3302
|
msgstr ""
|
|
3303
3303
|
|
|
3304
|
-
#. Default: "Mostra il titolo
|
|
3304
|
+
#. Default: "Mostra il titolo"
|
|
3305
3305
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3306
3306
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3307
3307
|
msgid "show_image_title"
|
|
@@ -3283,18 +3283,18 @@ msgstr ""
|
|
|
3283
3283
|
msgid "show_icon"
|
|
3284
3284
|
msgstr ""
|
|
3285
3285
|
|
|
3286
|
-
#. Default: "Mostra la descrizione
|
|
3286
|
+
#. Default: "Mostra la descrizione"
|
|
3287
3287
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3288
3288
|
msgid "show_image_description"
|
|
3289
3289
|
msgstr ""
|
|
3290
3290
|
|
|
3291
|
-
#. Default: "Apri l'
|
|
3291
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3292
3292
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3293
3293
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3294
3294
|
msgid "show_image_popup"
|
|
3295
3295
|
msgstr ""
|
|
3296
3296
|
|
|
3297
|
-
#. Default: "Mostra il titolo
|
|
3297
|
+
#. Default: "Mostra il titolo"
|
|
3298
3298
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3299
3299
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3300
3300
|
msgid "show_image_title"
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2025-02-
|
|
4
|
+
"POT-Creation-Date: 2025-02-25T11:31:39.047Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
@@ -3285,18 +3285,18 @@ msgstr ""
|
|
|
3285
3285
|
msgid "show_icon"
|
|
3286
3286
|
msgstr ""
|
|
3287
3287
|
|
|
3288
|
-
#. Default: "Mostra la descrizione
|
|
3288
|
+
#. Default: "Mostra la descrizione"
|
|
3289
3289
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3290
3290
|
msgid "show_image_description"
|
|
3291
3291
|
msgstr ""
|
|
3292
3292
|
|
|
3293
|
-
#. Default: "Apri l'
|
|
3293
|
+
#. Default: "Apri l'anteprima in popup"
|
|
3294
3294
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3295
3295
|
#: config/blocks/listing/ListingOptions/photogalleryTemplate
|
|
3296
3296
|
msgid "show_image_popup"
|
|
3297
3297
|
msgstr ""
|
|
3298
3298
|
|
|
3299
|
-
#. Default: "Mostra il titolo
|
|
3299
|
+
#. Default: "Mostra il titolo"
|
|
3300
3300
|
#: config/blocks/listing/ListingOptions/carouselTemplate
|
|
3301
3301
|
#: config/blocks/listing/ListingOptions/sliderTemplate
|
|
3302
3302
|
msgid "show_image_title"
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
|
26
26
|
import config from '@plone/volto/registry';
|
|
27
27
|
|
|
28
28
|
import './carouselTemplate.scss';
|
|
29
|
+
import { on } from 'process';
|
|
29
30
|
const messages = defineMessages({
|
|
30
31
|
carouselItemAriaLabel: {
|
|
31
32
|
id: 'carousel-item-aria-label',
|
|
@@ -48,7 +49,7 @@ const messages = defineMessages({
|
|
|
48
49
|
|
|
49
50
|
const Slide = (props) => {
|
|
50
51
|
const intl = useIntl();
|
|
51
|
-
const { index, appearance, appearanceProp, onKeyDown } = props;
|
|
52
|
+
const { index, appearance, appearanceProp, onKeyDown, ...otherProps } = props;
|
|
52
53
|
|
|
53
54
|
const appearances = config.blocks.blocksConfig.listing.variations.filter(
|
|
54
55
|
(v) => v.id === 'carousel',
|
|
@@ -57,6 +58,7 @@ const Slide = (props) => {
|
|
|
57
58
|
|
|
58
59
|
return (
|
|
59
60
|
<SingleSlideWrapper
|
|
61
|
+
{...otherProps}
|
|
60
62
|
index={index}
|
|
61
63
|
onKeyDown={onKeyDown}
|
|
62
64
|
aria-label={
|
|
@@ -64,7 +66,7 @@ const Slide = (props) => {
|
|
|
64
66
|
intl.formatMessage(messages.carouselItemAriaLabel)
|
|
65
67
|
}
|
|
66
68
|
>
|
|
67
|
-
<div className=
|
|
69
|
+
<div className="slide-wrapper" role="presentation">
|
|
68
70
|
<SlideItemAppearance {...props} {...appearanceProp} intl={intl} />
|
|
69
71
|
</div>
|
|
70
72
|
</SingleSlideWrapper>
|
|
@@ -106,6 +108,7 @@ const CarouselTemplate = (props) => {
|
|
|
106
108
|
SliderNextArrow,
|
|
107
109
|
SliderPrevArrow,
|
|
108
110
|
handleSlideKeydown,
|
|
111
|
+
HiddenSlideFocus,
|
|
109
112
|
} = useSlider(userAutoplay, setUserAutoplay, block_id);
|
|
110
113
|
|
|
111
114
|
const toggleAutoplay = () => {
|
|
@@ -185,6 +188,9 @@ const CarouselTemplate = (props) => {
|
|
|
185
188
|
appendDots: renderCustomDots,
|
|
186
189
|
// Custom handling of focus for a11y
|
|
187
190
|
afterChange: focusSlide,
|
|
191
|
+
onInit: () => {
|
|
192
|
+
HiddenSlideFocus();
|
|
193
|
+
},
|
|
188
194
|
responsive: [
|
|
189
195
|
{
|
|
190
196
|
breakpoint: 980,
|
|
@@ -49,11 +49,11 @@ const SlideGalleryItem = ({
|
|
|
49
49
|
{(show_image_title ||
|
|
50
50
|
(show_image_description && (item.description || item.rights))) && (
|
|
51
51
|
<figcaption>
|
|
52
|
-
{show_image_title && <
|
|
52
|
+
{show_image_title && <div className="title">{item.title}</div>}
|
|
53
53
|
{show_image_description && (item.description || item.rights) && (
|
|
54
|
-
<
|
|
54
|
+
<div className="description">
|
|
55
55
|
{item.description ?? item.rights}
|
|
56
|
-
</
|
|
56
|
+
</div>
|
|
57
57
|
)}
|
|
58
58
|
</figcaption>
|
|
59
59
|
)}
|
|
@@ -52,10 +52,19 @@ $slider-mobile-height: 300px;
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
figcaption {
|
|
55
|
+
position: absolute;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
width: 100%;
|
|
58
|
+
background-color: rgba(255, 255, 255, 0.85);
|
|
59
|
+
|
|
55
60
|
padding: 0.5em 1em;
|
|
56
|
-
color: #
|
|
61
|
+
color: #000;
|
|
57
62
|
font-size: 0.8em;
|
|
58
63
|
text-align: center;
|
|
64
|
+
|
|
65
|
+
.title:has(+ .description) {
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
}
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
|
|
@@ -2,6 +2,8 @@ import { defineMessages } from 'react-intl';
|
|
|
2
2
|
|
|
3
3
|
import ListingBlockSchema from '@plone/volto/components/manage/Blocks/Listing/schema';
|
|
4
4
|
|
|
5
|
+
import { addFieldsetAfter } from 'io-sanita-theme/config/blocks/listing/ListingOptions';
|
|
6
|
+
|
|
5
7
|
export const schemaListing = (props) => {
|
|
6
8
|
const intl = props.intl;
|
|
7
9
|
const baseSchema = ListingBlockSchema(props);
|
|
@@ -11,7 +13,10 @@ export const schemaListing = (props) => {
|
|
|
11
13
|
);
|
|
12
14
|
if (defaultFieldset) {
|
|
13
15
|
defaultFieldset.fields = defaultFieldset.fields.filter(
|
|
14
|
-
(field) =>
|
|
16
|
+
(field) =>
|
|
17
|
+
field !== 'headline' &&
|
|
18
|
+
field !== 'headlineTag' &&
|
|
19
|
+
field !== 'querystring',
|
|
15
20
|
);
|
|
16
21
|
}
|
|
17
22
|
|
|
@@ -19,6 +24,12 @@ export const schemaListing = (props) => {
|
|
|
19
24
|
return fieldset.id === 'linkmore';
|
|
20
25
|
};
|
|
21
26
|
|
|
27
|
+
addFieldsetAfter(baseSchema, 'default', {
|
|
28
|
+
id: 'criteria',
|
|
29
|
+
title: 'Risultati',
|
|
30
|
+
fields: ['querystring'],
|
|
31
|
+
});
|
|
32
|
+
|
|
22
33
|
// const linkMoreFieldset = baseSchema.fieldsets.find(findFieldset);
|
|
23
34
|
// linkMoreFieldset.fields.push('linkAlign');
|
|
24
35
|
|
|
@@ -454,7 +454,10 @@ const SearchMapBody = ({ data, id, path, properties, block, inEditMode }) => {
|
|
|
454
454
|
key={block_id + i}
|
|
455
455
|
className="mb-lg-3"
|
|
456
456
|
>
|
|
457
|
-
<SearchResultItem
|
|
457
|
+
<SearchResultItem
|
|
458
|
+
item={item}
|
|
459
|
+
key={i + '' + block_id}
|
|
460
|
+
/>
|
|
458
461
|
</Col>
|
|
459
462
|
))}
|
|
460
463
|
</Row>
|
|
@@ -61,7 +61,7 @@ const messages = defineMessages({
|
|
|
61
61
|
},
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
const Body = ({ data, id, path, properties,
|
|
64
|
+
const Body = ({ data, id, path, properties, inEditMode }) => {
|
|
65
65
|
const intl = useIntl();
|
|
66
66
|
const dispatch = useDispatch();
|
|
67
67
|
const subsite = useSelector((state) => state.subsite?.data);
|
|
@@ -393,7 +393,7 @@ const Body = ({ data, id, path, properties, block, inEditMode }) => {
|
|
|
393
393
|
* @static
|
|
394
394
|
*/
|
|
395
395
|
Body.propTypes = {
|
|
396
|
-
|
|
396
|
+
id: PropTypes.string.isRequired,
|
|
397
397
|
};
|
|
398
398
|
|
|
399
399
|
export default Body;
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
CardGuide,
|
|
7
7
|
} from 'io-sanita-theme/components';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const SearchResultItem = ({ item }) => {
|
|
10
10
|
return item['@type'] === 'Struttura' ? (
|
|
11
|
-
<CardPlace item={item} type="synthetic" />
|
|
11
|
+
<CardPlace item={item} type="synthetic" key={item['@id']} />
|
|
12
12
|
) : item['@type'] === 'Persona' ? (
|
|
13
|
-
<CardPersona item={item} />
|
|
13
|
+
<CardPersona item={item} key={item['@id']} />
|
|
14
14
|
) : item['@type'] === 'ComeFarePer' ? (
|
|
15
|
-
<CardGuide item={item} />
|
|
15
|
+
<CardGuide item={item} key={item['@id']} />
|
|
16
16
|
) : (
|
|
17
|
-
<CardSimple item={item} />
|
|
17
|
+
<CardSimple item={item} key={item['@id']} />
|
|
18
18
|
);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export default
|
|
21
|
+
export default SearchResultItem;
|
|
@@ -27,6 +27,27 @@ export const useSlider = (userAutoplay, setUserAutoplay, block_id) => {
|
|
|
27
27
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
28
|
}, []);
|
|
29
29
|
|
|
30
|
+
const HiddenSlideFocus = () => {
|
|
31
|
+
const slides = document.querySelectorAll(
|
|
32
|
+
`${sliderElementSelector} .slick-slide`,
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
//set tab index to -1 for hidden slides
|
|
36
|
+
|
|
37
|
+
slides?.forEach((slide) => {
|
|
38
|
+
const focusableElements = slide.querySelectorAll(
|
|
39
|
+
'button:not([disabled]), [href], [tabindex="0"]',
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
focusableElements.forEach((element) => {
|
|
43
|
+
const tabIndexValue =
|
|
44
|
+
element.closest('.slick-active') !== null ? '0' : '-1';
|
|
45
|
+
|
|
46
|
+
element.setAttribute('tabIndex', tabIndexValue);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
30
51
|
const focusSlide = (slideIndex) => {
|
|
31
52
|
if (!sliderElement) return;
|
|
32
53
|
const sliderIsVisible = sliderContainer?.classList?.contains('visible');
|
|
@@ -52,8 +73,10 @@ export const useSlider = (userAutoplay, setUserAutoplay, block_id) => {
|
|
|
52
73
|
).some((node) => node.contains(document.activeElement));
|
|
53
74
|
|
|
54
75
|
if (focusedSliderElement) {
|
|
76
|
+
slide.setAttribute('tabindex', '0');
|
|
55
77
|
slide.focus();
|
|
56
78
|
}
|
|
79
|
+
HiddenSlideFocus();
|
|
57
80
|
};
|
|
58
81
|
|
|
59
82
|
const visibleSlide = (selector) => {
|
|
@@ -160,7 +183,8 @@ export const useSlider = (userAutoplay, setUserAutoplay, block_id) => {
|
|
|
160
183
|
|
|
161
184
|
if (shiftKey) {
|
|
162
185
|
if (prevIndex != null) {
|
|
163
|
-
slider.current.slickGoTo(prevIndex)
|
|
186
|
+
slider.current.slickGoTo(prevIndex) ||
|
|
187
|
+
focusableSlideElements[focusableSlideElements.length - 1].focus();
|
|
164
188
|
} else {
|
|
165
189
|
document.getElementById('sliderPrevArrow_' + block_id).focus();
|
|
166
190
|
}
|
|
@@ -197,5 +221,6 @@ export const useSlider = (userAutoplay, setUserAutoplay, block_id) => {
|
|
|
197
221
|
SliderNextArrow,
|
|
198
222
|
SliderPrevArrow,
|
|
199
223
|
handleSlideKeydown,
|
|
224
|
+
HiddenSlideFocus,
|
|
200
225
|
};
|
|
201
226
|
};
|
|
@@ -60,7 +60,7 @@ const LanguageSelector = (props) => {
|
|
|
60
60
|
inNavbar
|
|
61
61
|
className="is-language-selector"
|
|
62
62
|
>
|
|
63
|
-
<DropdownToggle aria-haspopup caret
|
|
63
|
+
<DropdownToggle aria-haspopup caret nav role="button">
|
|
64
64
|
{languagesISO392[currentLang]}
|
|
65
65
|
<Icon
|
|
66
66
|
icon="it-expand"
|
|
@@ -384,10 +384,15 @@ export const applyIoSanitaBlocksConfig = (config) => {
|
|
|
384
384
|
const no_bg_for = ['hero'];
|
|
385
385
|
|
|
386
386
|
if (data.show_block_bg && no_bg_for.indexOf(data['@type']) < 0) {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
if (classNames.indexOf('bg-primary-lightest') < 0) {
|
|
388
|
+
styles.push('bg-primary-lightest');
|
|
389
|
+
}
|
|
390
|
+
if (classNames.indexOf('full-width') < 0) {
|
|
391
|
+
styles.push('full-width');
|
|
392
|
+
}
|
|
393
|
+
if (classNames.indexOf('py-4') < 0) {
|
|
394
|
+
styles.push('py-4');
|
|
395
|
+
}
|
|
391
396
|
}
|
|
392
397
|
|
|
393
398
|
return [...classNames, ...styles];
|
|
@@ -49,6 +49,7 @@ export const imageCardTemplateOptions = (
|
|
|
49
49
|
intl,
|
|
50
50
|
position,
|
|
51
51
|
hide_fields = [], //array of string
|
|
52
|
+
fieldset,
|
|
52
53
|
) => {
|
|
53
54
|
let pos = position;
|
|
54
55
|
pos = templatesOptions(
|
|
@@ -80,6 +81,7 @@ export const imageCardTemplateOptions = (
|
|
|
80
81
|
show_category: { default: true },
|
|
81
82
|
},
|
|
82
83
|
pos,
|
|
84
|
+
fieldset,
|
|
83
85
|
);
|
|
84
86
|
return pos;
|
|
85
87
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
addSchemaField,
|
|
5
|
+
addFieldsetAfter,
|
|
6
|
+
} from 'io-sanita-theme/config/blocks/listing/ListingOptions';
|
|
4
7
|
import { simpleCardTemplateOptions_appearance_default } from 'io-sanita-theme/config/blocks/listing/ListingOptions/simpleCardTemplate';
|
|
5
8
|
import { imageCardTemplateOptions } from 'io-sanita-theme/config/blocks/listing/ListingOptions/cardWithImageTemplate';
|
|
6
9
|
|
|
@@ -15,15 +18,15 @@ const messages = defineMessages({
|
|
|
15
18
|
},
|
|
16
19
|
show_image_title: {
|
|
17
20
|
id: 'show_image_title',
|
|
18
|
-
defaultMessage:
|
|
21
|
+
defaultMessage: 'Mostra il titolo',
|
|
19
22
|
},
|
|
20
23
|
show_image_description: {
|
|
21
24
|
id: 'show_image_description',
|
|
22
|
-
defaultMessage:
|
|
25
|
+
defaultMessage: 'Mostra la descrizione',
|
|
23
26
|
},
|
|
24
27
|
show_image_popup: {
|
|
25
28
|
id: 'show_image_popup',
|
|
26
|
-
defaultMessage: "Apri l'
|
|
29
|
+
defaultMessage: "Apri l'anteprima in popup",
|
|
27
30
|
},
|
|
28
31
|
show_dots: {
|
|
29
32
|
id: 'show_dots',
|
|
@@ -142,6 +145,11 @@ export const addCarouselTemplateOptions = (
|
|
|
142
145
|
],
|
|
143
146
|
];
|
|
144
147
|
|
|
148
|
+
addFieldsetAfter(schema, 'default', {
|
|
149
|
+
id: 'appearance',
|
|
150
|
+
title: 'Aspetto delle slide',
|
|
151
|
+
fields: [],
|
|
152
|
+
});
|
|
145
153
|
addSchemaField(
|
|
146
154
|
schema,
|
|
147
155
|
'slide_appearance',
|
|
@@ -151,18 +159,31 @@ export const addCarouselTemplateOptions = (
|
|
|
151
159
|
choices,
|
|
152
160
|
},
|
|
153
161
|
pos,
|
|
162
|
+
'appearance',
|
|
154
163
|
);
|
|
155
164
|
pos++;
|
|
156
165
|
|
|
157
166
|
if (formData.slide_appearance === CarouselTemplateAppearance_SIMPLECARD) {
|
|
158
|
-
simpleCardTemplateOptions_appearance_default(
|
|
159
|
-
|
|
160
|
-
|
|
167
|
+
simpleCardTemplateOptions_appearance_default(
|
|
168
|
+
schema,
|
|
169
|
+
formData,
|
|
170
|
+
intl,
|
|
171
|
+
pos,
|
|
172
|
+
['show_path_filters'],
|
|
173
|
+
'appearance',
|
|
174
|
+
);
|
|
161
175
|
pos++;
|
|
162
176
|
} else if (
|
|
163
177
|
formData.slide_appearance === CarouselTemplateAppearance_IMAGECARD
|
|
164
178
|
) {
|
|
165
|
-
imageCardTemplateOptions(
|
|
179
|
+
imageCardTemplateOptions(
|
|
180
|
+
schema,
|
|
181
|
+
formData,
|
|
182
|
+
intl,
|
|
183
|
+
pos,
|
|
184
|
+
['set_four_columns'],
|
|
185
|
+
'appearance',
|
|
186
|
+
);
|
|
166
187
|
pos++;
|
|
167
188
|
} else if (formData.slide_appearance === CarouselTemplateAppearance_GALLERY) {
|
|
168
189
|
addSchemaField(
|
|
@@ -172,6 +193,7 @@ export const addCarouselTemplateOptions = (
|
|
|
172
193
|
null,
|
|
173
194
|
{ type: 'boolean', default: true },
|
|
174
195
|
pos,
|
|
196
|
+
'appearance',
|
|
175
197
|
);
|
|
176
198
|
pos++;
|
|
177
199
|
addSchemaField(
|
|
@@ -181,6 +203,7 @@ export const addCarouselTemplateOptions = (
|
|
|
181
203
|
null,
|
|
182
204
|
{ type: 'boolean', default: true },
|
|
183
205
|
pos,
|
|
206
|
+
'appearance',
|
|
184
207
|
);
|
|
185
208
|
pos++;
|
|
186
209
|
addSchemaField(
|
|
@@ -190,6 +213,7 @@ export const addCarouselTemplateOptions = (
|
|
|
190
213
|
null,
|
|
191
214
|
{ type: 'boolean', default: false },
|
|
192
215
|
pos,
|
|
216
|
+
'appearance',
|
|
193
217
|
);
|
|
194
218
|
pos++;
|
|
195
219
|
} else {
|
|
@@ -200,6 +224,7 @@ export const addCarouselTemplateOptions = (
|
|
|
200
224
|
null,
|
|
201
225
|
{ type: 'boolean', default: true },
|
|
202
226
|
pos,
|
|
227
|
+
'appearance',
|
|
203
228
|
);
|
|
204
229
|
pos++;
|
|
205
230
|
}
|
|
@@ -2,6 +2,7 @@ export {
|
|
|
2
2
|
addSchemaField,
|
|
3
3
|
templatesOptions,
|
|
4
4
|
addLighthouseField,
|
|
5
|
+
addFieldsetAfter,
|
|
5
6
|
} from 'io-sanita-theme/config/blocks/listing/ListingOptions/utils';
|
|
6
7
|
export addDefaultOptions from 'io-sanita-theme/config/blocks/listing/ListingOptions/defaultOptions';
|
|
7
8
|
export addLinkMoreOptions from 'io-sanita-theme/config/blocks/listing/ListingOptions/linkMoreOptions';
|
|
@@ -129,6 +129,7 @@ export const simpleCardTemplateOptions_appearance_default = (
|
|
|
129
129
|
intl,
|
|
130
130
|
position,
|
|
131
131
|
hide_fields = [], //array of string
|
|
132
|
+
fieldset,
|
|
132
133
|
) => {
|
|
133
134
|
let pos = position;
|
|
134
135
|
pos = templatesOptions(
|
|
@@ -153,6 +154,7 @@ export const simpleCardTemplateOptions_appearance_default = (
|
|
|
153
154
|
// show_path_filters: { default: false },
|
|
154
155
|
},
|
|
155
156
|
pos,
|
|
157
|
+
fieldset,
|
|
156
158
|
);
|
|
157
159
|
return pos;
|
|
158
160
|
};
|
|
@@ -86,11 +86,12 @@ export const templatesOptions = (
|
|
|
86
86
|
fields,
|
|
87
87
|
fieldsConfig,
|
|
88
88
|
position = 1,
|
|
89
|
+
fieldset,
|
|
89
90
|
) => {
|
|
90
91
|
let pos = position;
|
|
91
92
|
|
|
92
|
-
const
|
|
93
|
-
schema.id === 'search' ? 'listingTemplateOptions' :
|
|
93
|
+
const _fieldset =
|
|
94
|
+
schema.id === 'search' ? 'listingTemplateOptions' : fieldset;
|
|
94
95
|
fields.forEach((f) => {
|
|
95
96
|
// Avoid duplicated fields when using templates in Search block
|
|
96
97
|
if (schema.fieldsets?.some((fs) => fs?.fields?.some((fsf) => fsf === f)))
|
|
@@ -104,7 +105,7 @@ export const templatesOptions = (
|
|
|
104
105
|
f_config.description ?? null,
|
|
105
106
|
{ type: 'boolean', default: f_config.default ?? true },
|
|
106
107
|
pos,
|
|
107
|
-
|
|
108
|
+
_fieldset,
|
|
108
109
|
);
|
|
109
110
|
|
|
110
111
|
if (formData?.show_detail_link) {
|
|
@@ -116,7 +117,7 @@ export const templatesOptions = (
|
|
|
116
117
|
null,
|
|
117
118
|
null,
|
|
118
119
|
pos,
|
|
119
|
-
|
|
120
|
+
_fieldset,
|
|
120
121
|
);
|
|
121
122
|
}
|
|
122
123
|
} else if (f === 'show_path_filters') {
|
|
@@ -131,7 +132,7 @@ export const templatesOptions = (
|
|
|
131
132
|
formData: formData,
|
|
132
133
|
},
|
|
133
134
|
pos,
|
|
134
|
-
|
|
135
|
+
_fieldset,
|
|
135
136
|
);
|
|
136
137
|
} else {
|
|
137
138
|
addSchemaField(
|
|
@@ -141,7 +142,7 @@ export const templatesOptions = (
|
|
|
141
142
|
f_config.description ?? null,
|
|
142
143
|
{ type: 'boolean', default: f_config.default ?? true },
|
|
143
144
|
pos,
|
|
144
|
-
|
|
145
|
+
_fieldset,
|
|
145
146
|
);
|
|
146
147
|
}
|
|
147
148
|
pos++;
|
|
@@ -178,3 +179,9 @@ export const addLighthouseField = (schema, intl, position = 1) => {
|
|
|
178
179
|
|
|
179
180
|
return pos;
|
|
180
181
|
};
|
|
182
|
+
|
|
183
|
+
export const addFieldsetAfter = (schema, afterFieldsetId, fieldset) => {
|
|
184
|
+
const index = schema.fieldsets.map((f) => f.id).indexOf(afterFieldsetId);
|
|
185
|
+
|
|
186
|
+
schema.fieldsets.splice(index + 1, 0, fieldset);
|
|
187
|
+
};
|
|
@@ -70,7 +70,7 @@ const iosanitaListingVariations = [
|
|
|
70
70
|
schemaEnhancer: ({ schema, formData, intl }) => {
|
|
71
71
|
addSimpleCardTemplateOptions(schema, formData, intl);
|
|
72
72
|
addLinkMoreOptions(schema, formData, intl);
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
return schema;
|
|
75
75
|
},
|
|
76
76
|
cloneData: cloneBlock,
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
.block.full-width[class*='bg-']:has(+ .block#{$class}),
|
|
11
11
|
.block#{$class}:has(+ .block.full-width[class*='bg-']),
|
|
12
12
|
.block#{$class}:has(+ .block.align.full),
|
|
13
|
-
.block#{$class}:has(+ .block.iosanita-block-search)
|
|
13
|
+
.block#{$class}:has(+ .block.iosanita-block-search),
|
|
14
|
+
.block#{$class}:has(+ .block.image) {
|
|
14
15
|
margin-bottom: 0 !important;
|
|
15
16
|
}
|
|
16
17
|
}
|