design-comuni-plone-theme 8.6.0 → 8.7.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 +33 -0
- package/RELEASE.md +17 -2
- package/locales/de/LC_MESSAGES/volto.po +7 -1
- package/locales/en/LC_MESSAGES/volto.po +7 -1
- package/locales/es/LC_MESSAGES/volto.po +7 -1
- package/locales/fr/LC_MESSAGES/volto.po +7 -1
- package/locales/it/LC_MESSAGES/volto.po +7 -1
- package/locales/volto.pot +8 -2
- package/package.json +1 -1
- package/publiccode.yml +3 -3
- package/src/components/ItaliaTheme/Blocks/Accordion/Block/EditBlock.jsx +26 -20
- package/src/components/ItaliaTheme/Blocks/Accordion/Edit.jsx +9 -1
- package/src/components/ItaliaTheme/Blocks/Alert/Edit.jsx +25 -12
- package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/BodyWrapper.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/View.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/CTABlock/Block.jsx +29 -11
- package/src/components/ItaliaTheme/Blocks/CTABlock/View.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +1 -0
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/Edit.jsx +8 -2
- package/src/components/ItaliaTheme/Blocks/ContactsBlock/View.jsx +7 -1
- package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +4 -0
- package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithImageRssTemplate.jsx +4 -2
- package/src/components/ItaliaTheme/Blocks/RssBlock/CardWithoutImageRssTemplate.jsx +5 -2
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +25 -52
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Edit.jsx +3 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/View.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block.jsx +27 -51
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/Edit.jsx +3 -1
- package/src/components/ItaliaTheme/Blocks/TextCard/SimpleCard/View.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/__tests__/CardWithImage.test.jsx +6 -5
- package/src/components/ItaliaTheme/Blocks/__tests__/SimpleCard.test.jsx +1 -1
- package/src/components/ItaliaTheme/Search/Search.jsx +6 -1
- package/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx +2 -2
- package/src/components/ItaliaTheme/manage/Widgets/TextEditorWidget.jsx +28 -0
- package/src/components/ReleaseLog/ReleaseLog.jsx +1 -0
- package/src/components/SelectInput/SelectInput.jsx +5 -1
- package/src/config/Blocks/ListingOptions/index.js +1 -0
- package/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js +32 -0
- package/src/config/Blocks/listingVariations.js +3 -1
- package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +10 -8
- package/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +8 -1
- package/src/theme/ItaliaTheme/Widgets/_react-dates-override.scss +15 -0
- package/src/theme/site.scss +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.7.1](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.7.0...v8.7.1) (2023-09-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Maintenance
|
|
7
|
+
|
|
8
|
+
* added id in h2 title of some blocks to enable anchors ([#350](https://github.com/RedTurtle/design-comuni-plone-theme/issues/350)) ([e67e57a](https://github.com/RedTurtle/design-comuni-plone-theme/commit/e67e57a3f767f94377cae4605097977a0fa5021a))
|
|
9
|
+
* updated publicode ([cd8fc79](https://github.com/RedTurtle/design-comuni-plone-theme/commit/cd8fc791891105e69f7cbc7b8b14e19f0da71601))
|
|
10
|
+
|
|
11
|
+
## [8.7.0](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v8.6.0...v8.7.0) (2023-09-20)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* Us 46339 link esterni smalllinksblock ([#339](https://github.com/RedTurtle/design-comuni-plone-theme/issues/339)) ([9d4ab47](https://github.com/RedTurtle/design-comuni-plone-theme/commit/9d4ab474390d934bbc92ad9a6527fcb44138ad3e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* accessibility and SR fix for selectInput ([#345](https://github.com/RedTurtle/design-comuni-plone-theme/issues/345)) ([67adc6f](https://github.com/RedTurtle/design-comuni-plone-theme/commit/67adc6fb222b72636a772153fb20dbbe70a17190))
|
|
22
|
+
* fix blocks Alert, Card Semplice, Card immagine, Accordion keyboa… ([#348](https://github.com/RedTurtle/design-comuni-plone-theme/issues/348)) ([bc93065](https://github.com/RedTurtle/design-comuni-plone-theme/commit/bc930651ed88c2ce8ba06c3d6b0a793418c2427a))
|
|
23
|
+
* fix Contact Block items align ([#338](https://github.com/RedTurtle/design-comuni-plone-theme/issues/338)) ([c2e9aaa](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c2e9aaab1ea132ac043952deb37b3cd8843ec440))
|
|
24
|
+
* i link in modulistica devono far vedere la remoteUrl e non il link ([#336](https://github.com/RedTurtle/design-comuni-plone-theme/issues/336)) ([a311095](https://github.com/RedTurtle/design-comuni-plone-theme/commit/a3110953b2e99425e864eed8eeb870fe9eab3acb))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Maintenance
|
|
28
|
+
|
|
29
|
+
* added title to release-log ([#347](https://github.com/RedTurtle/design-comuni-plone-theme/issues/347)) ([b04f947](https://github.com/RedTurtle/design-comuni-plone-theme/commit/b04f947f48b0431acb5ebae1017f49fb9e1a5fcb))
|
|
30
|
+
* update files for release ([eed8929](https://github.com/RedTurtle/design-comuni-plone-theme/commit/eed89299d8a13dea863ee9a8edbb08e298fbec19))
|
|
31
|
+
* updated locales ([9ef4dd3](https://github.com/RedTurtle/design-comuni-plone-theme/commit/9ef4dd38e52bd085c7f09a182addda06e0632254))
|
|
32
|
+
* updated publiccode ([6d46730](https://github.com/RedTurtle/design-comuni-plone-theme/commit/6d467308c02bf2377adf5574e5d1a715f5f33072))
|
|
33
|
+
* updated RELEASE.md ([c8b4982](https://github.com/RedTurtle/design-comuni-plone-theme/commit/c8b49822f88cba8d8e3911e03e1b069306966591))
|
|
34
|
+
* updatedRELEASE.md ([4391e42](https://github.com/RedTurtle/design-comuni-plone-theme/commit/4391e42a3c908c1ed15693a548d06c05c9cb37fd))
|
|
35
|
+
|
|
3
36
|
## [8.6.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v8.5.1...v8.6.0) (2023-09-18)
|
|
4
37
|
|
|
5
38
|
|
package/RELEASE.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<!--- -----------------------------------------------------------------
|
|
7
7
|
Esempio:
|
|
8
8
|
---------------------------------------------------------------------
|
|
9
|
-
## Versione 7.10.9
|
|
9
|
+
## Versione 7.10.9 (12/09/2023)
|
|
10
10
|
### Migliorie
|
|
11
11
|
- Fissato il layout di stampa per pagine con Accordion
|
|
12
12
|
### Novità
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
TEMPLATE PER RELEASE
|
|
20
20
|
----------------------------------------------------------------------
|
|
21
21
|
|
|
22
|
-
## Versione X.X.X
|
|
22
|
+
## Versione X.X.X (dd/mm/yyyy)
|
|
23
23
|
### Migliorie
|
|
24
24
|
- ...
|
|
25
25
|
|
|
@@ -29,3 +29,18 @@
|
|
|
29
29
|
### Fix
|
|
30
30
|
- ...
|
|
31
31
|
-->
|
|
32
|
+
|
|
33
|
+
## Versione 8.7.0 (20/09/2023)
|
|
34
|
+
|
|
35
|
+
### Migliorie
|
|
36
|
+
|
|
37
|
+
- Nel template Blocco link solo immagini con link esterni, icona accessibilità per link esterni ora è disattivabile attraverso opzione del template
|
|
38
|
+
- Migliorata l'accessibilità e il supporto Screen Reader per il menu a tendina "Ordina Per" nella pagina di ricerca
|
|
39
|
+
- Migliorata la navigazione da tastiera quando si è in modifica dei blocchi Alert, Card Semplice, Card con Immagine, Accordion
|
|
40
|
+
|
|
41
|
+
### Fix
|
|
42
|
+
|
|
43
|
+
- sistemati gli oggetti link che puntano a file nella Cartella Modulistica
|
|
44
|
+
- Sistemato l'allineamento degli elementi nel blocco Contatti: se ci sono meno di tre elementi l'allineamento è centrato, se ce ne sono più di 3 l'allineamento è a sinistra.
|
|
45
|
+
- Migliorata accessibilità del calendario nel blocco ricerca Eventi e ricerca Bandi
|
|
46
|
+
- Fissato il layout del template Blocco link solo immagini con link esterni, posizionata l'icona di accessibilità per link esterni in overlay se presente
|
|
@@ -647,11 +647,12 @@ msgstr ""
|
|
|
647
647
|
msgid "Type description…"
|
|
648
648
|
msgstr ""
|
|
649
649
|
|
|
650
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
650
651
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
651
652
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
652
653
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
653
654
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
654
|
-
# defaultMessage: Digita
|
|
655
|
+
# defaultMessage: Digita il testo…
|
|
655
656
|
msgid "Type text…"
|
|
656
657
|
msgstr ""
|
|
657
658
|
|
|
@@ -2633,6 +2634,11 @@ msgstr ""
|
|
|
2633
2634
|
msgid "other_info"
|
|
2634
2635
|
msgstr ""
|
|
2635
2636
|
|
|
2637
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2638
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2639
|
+
msgid "override_links_accessibility_marker"
|
|
2640
|
+
msgstr "Barrierefreiheitssymbol nicht für Links anzeigen, die auf externe Websites oder Ressourcen verweisen"
|
|
2641
|
+
|
|
2636
2642
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2637
2643
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2638
2644
|
msgid "pagamenti"
|
|
@@ -632,11 +632,12 @@ msgstr ""
|
|
|
632
632
|
msgid "Type description…"
|
|
633
633
|
msgstr ""
|
|
634
634
|
|
|
635
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
635
636
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
636
637
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
637
638
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
638
639
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
639
|
-
# defaultMessage: Digita
|
|
640
|
+
# defaultMessage: Digita il testo…
|
|
640
641
|
msgid "Type text…"
|
|
641
642
|
msgstr ""
|
|
642
643
|
|
|
@@ -2618,6 +2619,11 @@ msgstr "Ohter topics"
|
|
|
2618
2619
|
msgid "other_info"
|
|
2619
2620
|
msgstr "Further information"
|
|
2620
2621
|
|
|
2622
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2623
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2624
|
+
msgid "override_links_accessibility_marker"
|
|
2625
|
+
msgstr "Do not show accessibility icon for links pointing to external websites or resources"
|
|
2626
|
+
|
|
2621
2627
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2622
2628
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2623
2629
|
msgid "pagamenti"
|
|
@@ -641,11 +641,12 @@ msgstr "Transparencia"
|
|
|
641
641
|
msgid "Type description…"
|
|
642
642
|
msgstr "Escribe la descripción..."
|
|
643
643
|
|
|
644
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
644
645
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
645
646
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
646
647
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
647
648
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
648
|
-
# defaultMessage: Digita
|
|
649
|
+
# defaultMessage: Digita il testo…
|
|
649
650
|
msgid "Type text…"
|
|
650
651
|
msgstr "Ingrese texto..."
|
|
651
652
|
|
|
@@ -2627,6 +2628,11 @@ msgstr "Otros temas"
|
|
|
2627
2628
|
msgid "other_info"
|
|
2628
2629
|
msgstr "Más información"
|
|
2629
2630
|
|
|
2631
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2632
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2633
|
+
msgid "override_links_accessibility_marker"
|
|
2634
|
+
msgstr "No mostrar el ícono de accesibilidad para enlaces que apuntan a sitios web o recursos externos"
|
|
2635
|
+
|
|
2630
2636
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2631
2637
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2632
2638
|
msgid "pagamenti"
|
|
@@ -649,11 +649,12 @@ msgstr ""
|
|
|
649
649
|
msgid "Type description…"
|
|
650
650
|
msgstr ""
|
|
651
651
|
|
|
652
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
652
653
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
653
654
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
654
655
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
655
656
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
656
|
-
# defaultMessage: Digita
|
|
657
|
+
# defaultMessage: Digita il testo…
|
|
657
658
|
msgid "Type text…"
|
|
658
659
|
msgstr ""
|
|
659
660
|
|
|
@@ -2635,6 +2636,11 @@ msgstr "Autres sujets"
|
|
|
2635
2636
|
msgid "other_info"
|
|
2636
2637
|
msgstr "Informations complémentaires"
|
|
2637
2638
|
|
|
2639
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2640
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2641
|
+
msgid "override_links_accessibility_marker"
|
|
2642
|
+
msgstr "Ne pas afficher l'icône d'accessibilité pour les liens pointant vers des sites Web ou des ressources externes"
|
|
2643
|
+
|
|
2638
2644
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2639
2645
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2640
2646
|
msgid "pagamenti"
|
|
@@ -632,11 +632,12 @@ msgstr "Trasparenza"
|
|
|
632
632
|
msgid "Type description…"
|
|
633
633
|
msgstr "Digita la descrizione…"
|
|
634
634
|
|
|
635
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
635
636
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
636
637
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
637
638
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
638
639
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
639
|
-
# defaultMessage: Digita
|
|
640
|
+
# defaultMessage: Digita il testo…
|
|
640
641
|
msgid "Type text…"
|
|
641
642
|
msgstr "Digita testo…"
|
|
642
643
|
|
|
@@ -2618,6 +2619,11 @@ msgstr "Altri argomenti"
|
|
|
2618
2619
|
msgid "other_info"
|
|
2619
2620
|
msgstr "Ulteriori informazioni"
|
|
2620
2621
|
|
|
2622
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2623
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2624
|
+
msgid "override_links_accessibility_marker"
|
|
2625
|
+
msgstr ""
|
|
2626
|
+
|
|
2621
2627
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2622
2628
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2623
2629
|
msgid "pagamenti"
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2023-
|
|
4
|
+
"POT-Creation-Date: 2023-09-20T11:30:56.175Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"MIME-Version: 1.0\n"
|
|
@@ -634,11 +634,12 @@ msgstr ""
|
|
|
634
634
|
msgid "Type description…"
|
|
635
635
|
msgstr ""
|
|
636
636
|
|
|
637
|
+
#: components/ItaliaTheme/Blocks/Alert/Edit
|
|
637
638
|
#: components/ItaliaTheme/Blocks/ArgumentsInEvidence/Block
|
|
638
639
|
#: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block
|
|
639
640
|
#: components/ItaliaTheme/Blocks/TextCard/SimpleCard/Block
|
|
640
641
|
#: components/ItaliaTheme/manage/Widgets/TextEditorWidget
|
|
641
|
-
# defaultMessage: Digita
|
|
642
|
+
# defaultMessage: Digita il testo…
|
|
642
643
|
msgid "Type text…"
|
|
643
644
|
msgstr ""
|
|
644
645
|
|
|
@@ -2620,6 +2621,11 @@ msgstr ""
|
|
|
2620
2621
|
msgid "other_info"
|
|
2621
2622
|
msgstr ""
|
|
2622
2623
|
|
|
2624
|
+
#: config/Blocks/ListingOptions/smallBlockLinksTemplate
|
|
2625
|
+
# defaultMessage: Non mostrare l'icona di accessibilità per i link a siti esterni
|
|
2626
|
+
msgid "override_links_accessibility_marker"
|
|
2627
|
+
msgstr ""
|
|
2628
|
+
|
|
2623
2629
|
#: components/ItaliaTheme/View/Commons/TrasparenzaFields
|
|
2624
2630
|
# defaultMessage: Pagamenti previsti e modalità
|
|
2625
2631
|
msgid "pagamenti"
|
package/package.json
CHANGED
package/publiccode.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# This repository adheres to the publiccode.yml standard by including this
|
|
1
|
+
# This repository adheres to the publiccode.yml standard by including this
|
|
2
2
|
# metadata file that makes public software easily discoverable.
|
|
3
3
|
# More info at https://github.com/italia/publiccode.yml
|
|
4
4
|
|
|
@@ -227,9 +227,9 @@ maintenance:
|
|
|
227
227
|
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
|
|
228
228
|
platforms:
|
|
229
229
|
- web
|
|
230
|
-
releaseDate: '2023-09-
|
|
230
|
+
releaseDate: '2023-09-21'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 8.
|
|
232
|
+
softwareVersion: 8.7.1
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -48,16 +48,6 @@ class EditBlock extends SubblockEdit {
|
|
|
48
48
|
this.accordion_item_ref = React.createRef();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
componentDidMount() {
|
|
52
|
-
// eslint-disable-next-line no-unused-expressions
|
|
53
|
-
this.accordion_item_ref?.current?.addEventListener('keydown', (e) => {
|
|
54
|
-
if (e.keyCode === 13) {
|
|
55
|
-
if (!(this.state.focusOn === 'text')) {
|
|
56
|
-
this.setState({ focusOn: 'text' });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
51
|
/**
|
|
62
52
|
* Render method.
|
|
63
53
|
* @method render
|
|
@@ -105,12 +95,20 @@ class EditBlock extends SubblockEdit {
|
|
|
105
95
|
placeholder={this.props.intl.formatMessage(
|
|
106
96
|
messages.titlePlaceholder,
|
|
107
97
|
)}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
98
|
+
onSelectBlock={() => {}}
|
|
99
|
+
onAddBlock={() => {
|
|
100
|
+
this.setState({ focusOn: 'text' });
|
|
101
|
+
}}
|
|
102
|
+
onFocusNextBlock={() => {
|
|
103
|
+
this.setState({ focusOn: 'text' });
|
|
113
104
|
}}
|
|
105
|
+
onFocusPreviousBlock={
|
|
106
|
+
this.props.isFirst
|
|
107
|
+
? this.props.onFocusPreviousBlock
|
|
108
|
+
: () => {
|
|
109
|
+
this.props.onSubblockChangeFocus(this.props.index - 1);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
114
112
|
showToolbar={false}
|
|
115
113
|
key="title"
|
|
116
114
|
/>
|
|
@@ -135,11 +133,19 @@ class EditBlock extends SubblockEdit {
|
|
|
135
133
|
placeholder={this.props.intl.formatMessage(
|
|
136
134
|
messages.textPlaceholder,
|
|
137
135
|
)}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
onAddBlock={this.props.onFocusNextBlock}
|
|
137
|
+
onFocusNextBlock={
|
|
138
|
+
this.props.isLast
|
|
139
|
+
? this.props.onFocusNextBlock
|
|
140
|
+
: () => {
|
|
141
|
+
this.setState({ focusOn: null });
|
|
142
|
+
this.props.onSubblockChangeFocus(
|
|
143
|
+
this.props.index + 1,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
onFocusPreviousBlock={() => {
|
|
148
|
+
this.setState({ focusOn: 'title' });
|
|
143
149
|
}}
|
|
144
150
|
key="text"
|
|
145
151
|
/>
|
|
@@ -51,9 +51,17 @@ class Edit extends SubblocksEdit {
|
|
|
51
51
|
<EditBlock
|
|
52
52
|
data={subblock}
|
|
53
53
|
index={subindex}
|
|
54
|
-
selected={
|
|
54
|
+
selected={
|
|
55
|
+
this.props.selected &&
|
|
56
|
+
this.isSubblockSelected(subindex)
|
|
57
|
+
}
|
|
55
58
|
{...this.subblockProps}
|
|
56
59
|
openObjectBrowser={this.props.openObjectBrowser}
|
|
60
|
+
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
|
|
61
|
+
onFocusNextBlock={this.props.onFocusNextBlock}
|
|
62
|
+
onSubblockChangeFocus={this.onSubblockChangeFocus}
|
|
63
|
+
isLast={this.state.subblocks.length - 1 === subindex}
|
|
64
|
+
isFirst={subindex === 0}
|
|
57
65
|
/>
|
|
58
66
|
</div>
|
|
59
67
|
))}
|
|
@@ -7,15 +7,25 @@ import React, { Component } from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { connect } from 'react-redux';
|
|
9
9
|
import { compose } from 'redux';
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { Container, Row, Col } from 'design-react-kit';
|
|
13
13
|
|
|
14
14
|
import { createContent } from '@plone/volto/actions';
|
|
15
15
|
import { SidebarPortal } from '@plone/volto/components';
|
|
16
|
-
import {
|
|
16
|
+
import { defineMessages, injectIntl } from 'react-intl';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
AlertSidebar,
|
|
20
|
+
TextEditorWidget,
|
|
21
|
+
} from 'design-comuni-plone-theme/components/ItaliaTheme';
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
const messages = defineMessages({
|
|
24
|
+
content_placeholder: {
|
|
25
|
+
id: 'Type text…',
|
|
26
|
+
defaultMessage: 'Digita il testo…',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
19
29
|
/**
|
|
20
30
|
* Edit Alert block class.
|
|
21
31
|
* @class Edit
|
|
@@ -84,20 +94,23 @@ class Edit extends Component {
|
|
|
84
94
|
</Col>
|
|
85
95
|
)}
|
|
86
96
|
<Col>
|
|
87
|
-
<
|
|
97
|
+
<TextEditorWidget
|
|
88
98
|
data={this.props.data}
|
|
89
|
-
|
|
90
|
-
index={this.props.index}
|
|
99
|
+
fieldName="text"
|
|
91
100
|
selected={this.props.selected}
|
|
92
101
|
block={this.props.block}
|
|
102
|
+
onChangeBlock={(data) =>
|
|
103
|
+
this.props.onChangeBlock(this.props.block, data)
|
|
104
|
+
}
|
|
105
|
+
placeholder={this.props.intl.formatMessage(
|
|
106
|
+
messages.content_placeholder,
|
|
107
|
+
)}
|
|
108
|
+
showToolbar={true}
|
|
109
|
+
onSelectBlock={this.props.onSelectBlock}
|
|
93
110
|
onAddBlock={this.props.onAddBlock}
|
|
94
|
-
|
|
95
|
-
onDeleteBlock={this.props.onDeleteBlock}
|
|
96
|
-
onMutateBlock={this.props.onMutateBlock}
|
|
97
|
-
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
|
|
111
|
+
index={this.props.index}
|
|
98
112
|
onFocusNextBlock={this.props.onFocusNextBlock}
|
|
99
|
-
|
|
100
|
-
blockNode={this.blockNode}
|
|
113
|
+
onFocusPreviousBlock={this.props.onFocusPreviousBlock}
|
|
101
114
|
/>
|
|
102
115
|
</Col>
|
|
103
116
|
</Row>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
|
-
const BodyWrapper = ({ data, inEditMode, children }) => {
|
|
4
|
+
const BodyWrapper = ({ data, inEditMode, children, id }) => {
|
|
5
5
|
return (
|
|
6
6
|
<div className={cx('container pt-5', { 'p-5': inEditMode })}>
|
|
7
|
-
<h2>{data.text}</h2>
|
|
7
|
+
<h2 id={id + 'title'}>{data.text}</h2>
|
|
8
8
|
<div className="grid mt-5">{children}</div>
|
|
9
9
|
</div>
|
|
10
10
|
);
|
|
@@ -13,7 +13,7 @@ const View = ({ data, id }) => {
|
|
|
13
13
|
<div className="block full-width">
|
|
14
14
|
<div className="argumentInEvidence">
|
|
15
15
|
<ArgumentsInEvidenceBackground />
|
|
16
|
-
<BodyWrapper data={data} inEditMode={false}>
|
|
16
|
+
<BodyWrapper data={data} inEditMode={false} id={id}>
|
|
17
17
|
{data.subblocks
|
|
18
18
|
?.filter((subblock) => {
|
|
19
19
|
return subblock.argument?.length > 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button, Container } from 'design-react-kit';
|
|
2
2
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
-
import React, { useRef, useState } from 'react';
|
|
4
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
5
5
|
import { defineMessages, useIntl } from 'react-intl';
|
|
6
6
|
|
|
7
7
|
import Image from '@plone/volto/components/theme/Image/Image';
|
|
@@ -35,6 +35,9 @@ const Block = ({
|
|
|
35
35
|
onSelectBlock,
|
|
36
36
|
onAddBlock,
|
|
37
37
|
index,
|
|
38
|
+
onFocusNextBlock,
|
|
39
|
+
onFocusPreviousBlock,
|
|
40
|
+
selected,
|
|
38
41
|
}) => {
|
|
39
42
|
const intl = useIntl();
|
|
40
43
|
const title = data?.cta_title?.blocks[0]?.text;
|
|
@@ -42,9 +45,16 @@ const Block = ({
|
|
|
42
45
|
const content = data?.cta_content;
|
|
43
46
|
const showFullwidth = data?.showFullWidth;
|
|
44
47
|
|
|
45
|
-
const [
|
|
48
|
+
const [selectedField, setSelectedField] = useState('title');
|
|
46
49
|
const titleRef = useRef();
|
|
47
50
|
const contentRef = useRef();
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (selected) {
|
|
53
|
+
setSelectedField('title');
|
|
54
|
+
} else {
|
|
55
|
+
setSelectedField(null);
|
|
56
|
+
}
|
|
57
|
+
}, [selected]);
|
|
48
58
|
|
|
49
59
|
return (
|
|
50
60
|
<div
|
|
@@ -62,7 +72,7 @@ const Block = ({
|
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
if (titleRef.current.contains(e.target)) {
|
|
65
|
-
|
|
75
|
+
setSelectedField('content');
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
}}
|
|
@@ -85,29 +95,33 @@ const Block = ({
|
|
|
85
95
|
)}
|
|
86
96
|
<Container tag="div" className="px-3 px-md-4">
|
|
87
97
|
<div className="cta-tile-text">
|
|
88
|
-
<h2 className="title mt-0">
|
|
98
|
+
<h2 className="title mt-0" id={block + 'title'}>
|
|
89
99
|
{inEditMode ? (
|
|
90
100
|
<div
|
|
91
101
|
ref={titleRef}
|
|
92
102
|
onClick={() => {
|
|
93
|
-
|
|
103
|
+
setSelectedField('title');
|
|
94
104
|
}}
|
|
95
105
|
onFocus={() => {
|
|
96
|
-
|
|
106
|
+
setSelectedField('title');
|
|
97
107
|
}}
|
|
98
108
|
>
|
|
99
109
|
<TextEditorWidget
|
|
100
110
|
data={data}
|
|
101
111
|
fieldName="cta_title"
|
|
102
|
-
selected={
|
|
112
|
+
selected={selectedField === 'title'}
|
|
103
113
|
block={block}
|
|
104
114
|
onChangeBlock={(data) => onChangeBlock(block, data)}
|
|
105
115
|
placeholder={intl.formatMessage(messages.cta_title)}
|
|
106
116
|
showToolbar={false}
|
|
107
117
|
onSelectBlock={() => {}}
|
|
108
118
|
onAddBlock={() => {
|
|
109
|
-
|
|
119
|
+
setSelectedField('content');
|
|
110
120
|
}}
|
|
121
|
+
onFocusNextBlock={() => {
|
|
122
|
+
setSelectedField('content');
|
|
123
|
+
}}
|
|
124
|
+
onFocusPreviousBlock={onFocusPreviousBlock}
|
|
111
125
|
/>
|
|
112
126
|
</div>
|
|
113
127
|
) : (
|
|
@@ -118,16 +132,16 @@ const Block = ({
|
|
|
118
132
|
<div
|
|
119
133
|
ref={contentRef}
|
|
120
134
|
onClick={() => {
|
|
121
|
-
|
|
135
|
+
setSelectedField('content');
|
|
122
136
|
}}
|
|
123
137
|
onFocus={() => {
|
|
124
|
-
|
|
138
|
+
setSelectedField('content');
|
|
125
139
|
}}
|
|
126
140
|
>
|
|
127
141
|
<TextEditorWidget
|
|
128
142
|
data={data}
|
|
129
143
|
fieldName="cta_content"
|
|
130
|
-
selected={
|
|
144
|
+
selected={selectedField === 'content'}
|
|
131
145
|
block={block}
|
|
132
146
|
onChangeBlock={(data) => onChangeBlock(block, data)}
|
|
133
147
|
placeholder={intl.formatMessage(messages.cta_content)}
|
|
@@ -135,6 +149,10 @@ const Block = ({
|
|
|
135
149
|
onSelectBlock={onSelectBlock}
|
|
136
150
|
onAddBlock={onAddBlock}
|
|
137
151
|
index={index}
|
|
152
|
+
onFocusNextBlock={onFocusNextBlock}
|
|
153
|
+
onFocusPreviousBlock={() => {
|
|
154
|
+
setSelectedField('title');
|
|
155
|
+
}}
|
|
138
156
|
/>
|
|
139
157
|
</div>
|
|
140
158
|
) : (
|
|
@@ -4,10 +4,10 @@ import BodyWrapper from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks
|
|
|
4
4
|
|
|
5
5
|
import Block from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/CTABlock/Block';
|
|
6
6
|
|
|
7
|
-
const View = ({ data }) => {
|
|
7
|
+
const View = ({ data, id }) => {
|
|
8
8
|
return (
|
|
9
9
|
<BodyWrapper inEditMode={false}>
|
|
10
|
-
<Block data={data} inEditMode={false} />
|
|
10
|
+
<Block data={data} inEditMode={false} block={id} />
|
|
11
11
|
</BodyWrapper>
|
|
12
12
|
);
|
|
13
13
|
};
|
|
@@ -106,9 +106,15 @@ class Edit extends SubblocksEdit {
|
|
|
106
106
|
</div>
|
|
107
107
|
|
|
108
108
|
<SubblocksWrapper node={this.node}>
|
|
109
|
-
<Row
|
|
109
|
+
<Row
|
|
110
|
+
className={
|
|
111
|
+
this.state.subblocks.length > 3
|
|
112
|
+
? 'justify-content-start'
|
|
113
|
+
: 'justify-content-center'
|
|
114
|
+
}
|
|
115
|
+
>
|
|
110
116
|
{this.state.subblocks.map((subblock, subindex) => (
|
|
111
|
-
<Col lg="4" key={subblock.id}>
|
|
117
|
+
<Col lg="4" key={subblock.id} className="pb-3">
|
|
112
118
|
<EditBlock
|
|
113
119
|
data={subblock}
|
|
114
120
|
index={subindex}
|
|
@@ -42,7 +42,13 @@ const AccordionView = ({ data, block }) => {
|
|
|
42
42
|
)}
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
|
-
<Row
|
|
45
|
+
<Row
|
|
46
|
+
className={
|
|
47
|
+
data.subblocks.length > 3
|
|
48
|
+
? 'justify-content-start'
|
|
49
|
+
: 'justify-content-center'
|
|
50
|
+
}
|
|
51
|
+
>
|
|
46
52
|
{data.subblocks.map((subblock, index) => (
|
|
47
53
|
<Col lg="4" key={subblock.id} className="pb-3">
|
|
48
54
|
<ViewBlock
|
|
@@ -19,6 +19,7 @@ const SmallBlockLinksTemplate = ({
|
|
|
19
19
|
linkHref,
|
|
20
20
|
titleLine,
|
|
21
21
|
linkmore_id_lighthouse,
|
|
22
|
+
override_links_accessibility_marker,
|
|
22
23
|
}) => {
|
|
23
24
|
return (
|
|
24
25
|
<div className="small-block-links">
|
|
@@ -48,6 +49,9 @@ const SmallBlockLinksTemplate = ({
|
|
|
48
49
|
item={!isEditMode ? item : null}
|
|
49
50
|
href={isEditMode ? '#' : ''}
|
|
50
51
|
className="img-link"
|
|
52
|
+
overrideMarkSpecialLinks={
|
|
53
|
+
override_links_accessibility_marker
|
|
54
|
+
}
|
|
51
55
|
>
|
|
52
56
|
{image}
|
|
53
57
|
</UniversalLink>
|