design-comuni-plone-theme 11.6.2 → 11.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.yarn/cache/volto-blocks-widget-npm-3.4.0-a61b810f4f-355675359c.zip +0 -0
  2. package/.yarn/cache/volto-editablefooter-npm-5.1.0-b288e1a1a8-2a13163440.zip +0 -0
  3. package/.yarn/cache/{volto-feedback-npm-0.2.0-dcf5397b38-ada1f08b98.zip → volto-feedback-npm-0.3.0-6f555b6437-5d4fe03279.zip} +0 -0
  4. package/.yarn/cache/volto-form-block-npm-3.7.0-06d6dc1b22-c2289a75f3.zip +0 -0
  5. package/.yarn/cache/{volto-querywidget-with-browser-npm-0.4.1-f120a15e6e-a01eacb7fa.zip → volto-querywidget-with-browser-npm-0.4.2-72bae6648a-881cede295.zip} +0 -0
  6. package/.yarn/install-state.gz +0 -0
  7. package/CHANGELOG.md +59 -0
  8. package/README.md +1 -0
  9. package/RELEASE.md +29 -3
  10. package/jest-addon.config.js +2 -0
  11. package/locales/de/LC_MESSAGES/volto.po +5 -0
  12. package/locales/en/LC_MESSAGES/volto.po +5 -0
  13. package/locales/es/LC_MESSAGES/volto.po +5 -0
  14. package/locales/fr/LC_MESSAGES/volto.po +5 -0
  15. package/locales/it/LC_MESSAGES/volto.po +5 -0
  16. package/locales/volto.pot +6 -1
  17. package/package.json +6 -6
  18. package/publiccode.yml +3 -2
  19. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx +1 -1
  20. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Block.jsx +14 -4
  21. package/src/components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar.jsx +13 -0
  22. package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +4 -8
  23. package/src/components/ItaliaTheme/CustomerSatisfaction/Steps/CommentsStep.jsx +1 -1
  24. package/src/components/ItaliaTheme/Footer/FooterMain.jsx +13 -5
  25. package/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +3 -0
  26. package/src/components/ItaliaTheme/manage/Widgets/FileWidget.jsx +30 -4
  27. package/src/customizations/volto/components/manage/Widgets/FileWidget.jsx +232 -0
  28. package/src/customizations/volto-form-block/components/Edit.jsx +57 -48
  29. package/src/customizations/volto-form-block/components/Field.jsx +42 -16
  30. package/src/customizations/volto-form-block/components/FormView.jsx +23 -8
  31. package/src/theme/ItaliaTheme/Blocks/_cardWithImageAndInEvidence.scss +2 -0
  32. package/src/theme/ItaliaTheme/Blocks/_ribbonCardTemplate.scss +1 -1
  33. package/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss +2 -2
  34. package/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +0 -1
  35. package/src/theme/ItaliaTheme/Components/_card.scss +1 -1
  36. package/src/theme/ItaliaTheme/Print/_all_pages.scss +3 -0
  37. package/src/theme/ItaliaTheme/Print/_uo.scss +88 -0
  38. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Views/_common.scss +13 -0
  39. package/src/theme/ItaliaTheme/Subsites/ItaliaTheme/Widgets/reactSelect.scss +1 -0
  40. package/src/theme/ItaliaTheme/Subsites/bootstrap-italia/custom/_navigation.scss +1 -1
  41. package/src/theme/ItaliaTheme/Views/_common.scss +29 -4
  42. package/src/theme/ItaliaTheme/_main.scss +30 -0
  43. package/src/theme/_cms-ui.scss +1 -1
  44. package/src/theme/bootstrap-override/bootstrap-italia/_form.scss +5 -6
  45. package/src/theme/site.scss +1 -0
  46. package/.yarn/cache/volto-blocks-widget-npm-3.1.0-1c491dbc7f-91fc5fc102.zip +0 -0
  47. package/.yarn/cache/volto-editablefooter-npm-5.0.3-0d4dfeeb45-efbc8e7679.zip +0 -0
  48. package/.yarn/cache/volto-form-block-npm-3.3.1-bbef28105f-8bd2232112.zip +0 -0
Binary file
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
 
2
2
 
3
+ ## [11.8.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.7.0...v11.8.0) (2024-03-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * added download link to filename in file widget ([#587](https://github.com/redturtle/design-comuni-plone-theme/issues/587)) ([96649e2](https://github.com/redturtle/design-comuni-plone-theme/commit/96649e29e79a7b71bf93a27406baa4fc1994a213))
9
+ * print styles for UO ([#581](https://github.com/redturtle/design-comuni-plone-theme/issues/581)) ([91b4752](https://github.com/redturtle/design-comuni-plone-theme/commit/91b47526b69b0957eba6c8e803798f4b3ffcf9bb))
10
+ * TextWidget to add alt text to image ([#573](https://github.com/redturtle/design-comuni-plone-theme/issues/573)) ([d183f27](https://github.com/redturtle/design-comuni-plone-theme/commit/d183f2749a2604ebecb0f0df09ec8770d84c7f59))
11
+ * updated volto-form-block with email validation ([#596](https://github.com/redturtle/design-comuni-plone-theme/issues/596)) ([c21f65b](https://github.com/redturtle/design-comuni-plone-theme/commit/c21f65bc7e54d2fa092ae4bcfbfd1c99670cab5c))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * link in header doesn't change color when inside cms-ui ([#583](https://github.com/redturtle/design-comuni-plone-theme/issues/583)) ([d076b0a](https://github.com/redturtle/design-comuni-plone-theme/commit/d076b0a540cf3de3c9f7f08cefca27eff3917f70))
17
+ * updated volto-querywidget-with-browser to fix infinite loops on lost reference ([#599](https://github.com/redturtle/design-comuni-plone-theme/issues/599)) ([c6d4cb6](https://github.com/redturtle/design-comuni-plone-theme/commit/c6d4cb6b51447514fedf2938f40031e42779644e))
18
+ * view form block ([5ff7ea7](https://github.com/redturtle/design-comuni-plone-theme/commit/5ff7ea70474963e3dca126a44d531cc4dc17be74))
19
+
20
+
21
+ ### Maintenance
22
+
23
+ * updated volto-form-block to fix view form ([80a6586](https://github.com/redturtle/design-comuni-plone-theme/commit/80a6586ac7d458c46efe51bcc4fa4a9cb3b8d619))
24
+
25
+
26
+ ### Documentation
27
+
28
+ * updated publiccode and release log ([3c52c12](https://github.com/redturtle/design-comuni-plone-theme/commit/3c52c12edfed3c12a4fdac212b9f229644bf913f))
29
+
30
+ ## [11.7.0](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.2...v11.7.0) (2024-03-15)
31
+
32
+
33
+ ### Features
34
+
35
+ * editable footer top ([#528](https://github.com/redturtle/design-comuni-plone-theme/issues/528)) ([542e2ec](https://github.com/redturtle/design-comuni-plone-theme/commit/542e2ecc95be9b182f7d9f6b45ef893852587022))
36
+ * update volto-feedback 0.3.0 ([3d9dfbe](https://github.com/redturtle/design-comuni-plone-theme/commit/3d9dfbe16111065ec04924430a6d3487ab6d1b05))
37
+ * updated volto-form-block to fix multiple form in same page and added schema field custom validator ([#586](https://github.com/redturtle/design-comuni-plone-theme/issues/586)) ([407ae18](https://github.com/redturtle/design-comuni-plone-theme/commit/407ae18d876f6d5ada3095a2990ccbe3727ba06e))
38
+ * view error for each form field, validate form config ([#578](https://github.com/redturtle/design-comuni-plone-theme/issues/578)) ([45e2f72](https://github.com/redturtle/design-comuni-plone-theme/commit/45e2f727ac6ea5f23f57661a1acef83f94b19a2e))
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * added condition for focus when going back within feedback form ([#588](https://github.com/redturtle/design-comuni-plone-theme/issues/588)) ([7911d89](https://github.com/redturtle/design-comuni-plone-theme/commit/7911d892e04fcb5584ba52d180f8bb79768d5c28))
44
+ * button clear in form block ([68c8bf8](https://github.com/redturtle/design-comuni-plone-theme/commit/68c8bf85183edfeb53cd5525327d6210fae18df3))
45
+ * button type of cancel button in form block ([9a10ff8](https://github.com/redturtle/design-comuni-plone-theme/commit/9a10ff8f40b20753c9400ceb6909e3ff5a543805))
46
+ * default value for show_type in card-with-image-template ([#579](https://github.com/redturtle/design-comuni-plone-theme/issues/579)) ([fe95462](https://github.com/redturtle/design-comuni-plone-theme/commit/fe95462a49e99c5a442023d727676b485ab8edfe))
47
+ * imaged full width view in edit mode ([#570](https://github.com/redturtle/design-comuni-plone-theme/issues/570)) ([053183b](https://github.com/redturtle/design-comuni-plone-theme/commit/053183baea2ce3e11b365bf29559ea532af33fc1))
48
+ * restored right border in listing block small links template ([#582](https://github.com/redturtle/design-comuni-plone-theme/issues/582)) ([beb07ad](https://github.com/redturtle/design-comuni-plone-theme/commit/beb07ad251cb5e5b96c67c6a64ac01ea3f229526))
49
+ * update volto-form-block for subdomain mail validation ([#584](https://github.com/redturtle/design-comuni-plone-theme/issues/584)) ([92939a2](https://github.com/redturtle/design-comuni-plone-theme/commit/92939a28e59d829e05423f83dc0564b9c008692e))
50
+
51
+
52
+ ### Maintenance
53
+
54
+ * Update RELEASE.md ([f308e6b](https://github.com/redturtle/design-comuni-plone-theme/commit/f308e6bf000ca0d41ccfd63557f73b1372ab8faa))
55
+
56
+
57
+ ### Documentation
58
+
59
+ * fix merge mistake in the release docs ([232af7a](https://github.com/redturtle/design-comuni-plone-theme/commit/232af7a1624724e60722c346533223bea95fd8be))
60
+ * updated publiccode and release log ([3e48692](https://github.com/redturtle/design-comuni-plone-theme/commit/3e48692faa06bf6fff7ee16a06032e1b1e7dd782))
61
+
3
62
  ## [11.6.2](https://github.com/redturtle/design-comuni-plone-theme/compare/v11.6.1...v11.6.2) (2024-03-08)
4
63
 
5
64
 
package/README.md CHANGED
@@ -102,6 +102,7 @@ Si veda ad esempio:
102
102
  - [Comune di Piacenza](https://www.comune.piacenza.it/)
103
103
  - [Comune di Prignano sulla Secchia](https://www.comune.prignano.mo.it/)
104
104
  - [Comune di Reggio Emilia](https://www.comune.re.it/)
105
+ - [Comune di Rolo](https://www.comune.rolo.re.it/)
105
106
  - [Comune di San Felice sul Panaro](https://www.comune.sanfelice.mo.it/)
106
107
  - [Comune di San Lazzaro di Savena](https://www.comune.sanlazzaro.bo.it)
107
108
  - [Comune di San Polo d'Enza](https://www.comune.sanpolodenza.re.it/)
package/RELEASE.md CHANGED
@@ -41,17 +41,43 @@
41
41
  - ...
42
42
  -->
43
43
 
44
- ## Versione 11.6.1 (06/03/2024)
44
+ ## Versione 11.8.0 (19/03/2024)
45
+
46
+ ### Migliorie
47
+
48
+ - Gli stili del tipo di contenuto Unità Organizzativa sono stati ottimizzati per la stampa.
49
+
50
+ ### Novità
51
+
52
+ - È possibile scaricare il file o l'immagine caricata dal widget di upload file cliccando sul nome del file stesso.
53
+ - È possibile aggiungere un testo alternativo per l'immagine del blocco Card con Immagine.
54
+
55
+ ## Versione 11.7.0 (15/03/2024)
56
+
57
+ ### Novità
58
+
59
+ - Ora la fascia del footer contenente il logo e il nome del sito è configurabile da pannello di controllo.
60
+ - Nel pannello di controllo dei Feedback, ora gli utenti con permesso di eliminare elementi da questa sezione, possono eliminare i feedback.
61
+
62
+ ### Migliorie
63
+
64
+ - Nel blocco form, se in fase di compilazione ci sono degli errori, viene mostrato un messaggio di errore specifico per ogni campo con errori.
45
65
 
46
66
  ### Fix
47
67
 
48
- - Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale".
68
+ - Il bordo destro della variazione Link solo immagine del blocco Elenco è stato ripristinato.
69
+ - Se si mettono due blocchi Form nella stessa pagina, ora funzionano correttamente.
70
+ - Aggiustato il modulo di Feedback quando si cambia valutazione dopo averne già selezionata un'altra.
49
71
 
50
- ## Versione 11.6.0 (05/03/2024)
72
+ ## Versione 11.6.1 (06/03/2024)
51
73
 
52
74
  ### Fix
53
75
 
76
+ - Quando si imposta una ricorrenza per giorni feriali negli Eventi, viene visualizzato il testo corretto "ogni giorno feriale".
54
77
  - Le icone social nel menu laterale mobile sono tutte dello stesso colore.
78
+
79
+ ## Versione 11.6.0 (05/03/2024)
80
+
55
81
  ### Migliorie
56
82
 
57
83
  - Nel blocco form è stata aggiunta una legenda per i campi obbligatori.
@@ -39,6 +39,8 @@ module.exports = {
39
39
  '^volto-dropdownmenu/(.*)$':
40
40
  '<rootDir>/node_modules/volto-dropdownmenu/src/$1',
41
41
  '^volto-feedback/(.*)$': '<rootDir>/node_modules/volto-feedback/src/$1',
42
+ '^volto-blocks-widget/(.*)$':
43
+ '<rootDir>/node_modules/volto-blocks-widget/src/$1',
42
44
  },
43
45
  collectCoverage: false,
44
46
  collectCoverageFrom: [
@@ -778,6 +778,11 @@ msgstr ""
778
778
  msgid "allegati"
779
779
  msgstr ""
780
780
 
781
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
782
+ # defaultMessage: Testo alternativo per l'immagine
783
+ msgid "altText"
784
+ msgstr ""
785
+
781
786
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
782
787
  # defaultMessage: Altre cariche
783
788
  msgid "altre_cariche"
@@ -763,6 +763,11 @@ msgstr "All topics"
763
763
  msgid "allegati"
764
764
  msgstr "Attached documents"
765
765
 
766
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
767
+ # defaultMessage: Testo alternativo per l'immagine
768
+ msgid "altText"
769
+ msgstr ""
770
+
766
771
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
767
772
  # defaultMessage: Altre cariche
768
773
  msgid "altre_cariche"
@@ -772,6 +772,11 @@ msgstr "Todos los temas"
772
772
  msgid "allegati"
773
773
  msgstr "Documentos adjuntos"
774
774
 
775
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
776
+ # defaultMessage: Testo alternativo per l'immagine
777
+ msgid "altText"
778
+ msgstr ""
779
+
775
780
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
776
781
  # defaultMessage: Altre cariche
777
782
  msgid "altre_cariche"
@@ -780,6 +780,11 @@ msgstr "Tous les sujets"
780
780
  msgid "allegati"
781
781
  msgstr "Documents attachés"
782
782
 
783
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
784
+ # defaultMessage: Testo alternativo per l'immagine
785
+ msgid "altText"
786
+ msgstr ""
787
+
783
788
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
784
789
  # defaultMessage: Altre cariche
785
790
  msgid "altre_cariche"
@@ -763,6 +763,11 @@ msgstr "Tutti gli argomenti"
763
763
  msgid "allegati"
764
764
  msgstr "Documenti allegati"
765
765
 
766
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
767
+ # defaultMessage: Testo alternativo per l'immagine
768
+ msgid "altText"
769
+ msgstr ""
770
+
766
771
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
767
772
  # defaultMessage: Altre cariche
768
773
  msgid "altre_cariche"
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: 2024-03-06T10:48:38.114Z\n"
4
+ "POT-Creation-Date: 2024-03-07T15:23:38.346Z\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"
@@ -765,6 +765,11 @@ msgstr ""
765
765
  msgid "allegati"
766
766
  msgstr ""
767
767
 
768
+ #: components/ItaliaTheme/Blocks/TextCard/CardWithImage/Sidebar
769
+ # defaultMessage: Testo alternativo per l'immagine
770
+ msgid "altText"
771
+ msgstr ""
772
+
768
773
  #: components/ItaliaTheme/View/PersonaView/PersonaDocumenti
769
774
  # defaultMessage: Altre cariche
770
775
  msgid "altre_cariche"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "design-comuni-plone-theme",
3
3
  "description": "Volto Theme for Italia design guidelines",
4
4
  "license": "GPL-v3",
5
- "version": "11.6.2",
5
+ "version": "11.8.0",
6
6
  "main": "src/index.js",
7
7
  "keywords": [
8
8
  "volto-addon",
@@ -141,16 +141,16 @@
141
141
  "typeface-lora": "0.0.72",
142
142
  "typeface-roboto-mono": "0.0.75",
143
143
  "typeface-titillium-web": "0.0.72",
144
- "volto-blocks-widget": "3.1.0",
144
+ "volto-blocks-widget": "3.4.0",
145
145
  "volto-data-grid-widget": "2.3.1",
146
146
  "volto-dropdownmenu": "4.1.1",
147
- "volto-editablefooter": "5.0.3",
148
- "volto-feedback": "0.2.0",
149
- "volto-form-block": "3.3.1",
147
+ "volto-editablefooter": "5.1.0",
148
+ "volto-feedback": "0.3.0",
149
+ "volto-form-block": "3.7.0",
150
150
  "volto-gdpr-privacy": "2.1.1",
151
151
  "volto-google-analytics": "2.0.0",
152
152
  "volto-multilingual-widget": "3.0.0",
153
- "volto-querywidget-with-browser": "0.4.1",
153
+ "volto-querywidget-with-browser": "0.4.2",
154
154
  "volto-rss-block": "3.0.0",
155
155
  "volto-secondarymenu": "4.0.0",
156
156
  "volto-social-settings": "3.0.0",
package/publiccode.yml CHANGED
@@ -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: '2024-03-08'
230
+ releaseDate: '2024-03-19'
231
231
  softwareType: standalone/web
232
- softwareVersion: 11.6.2
232
+ softwareVersion: 11.8.0
233
233
  url: 'https://github.com/italia/design-comuni-plone-theme'
234
234
  usedBy:
235
235
  - ASP Comuni Modenesi Area Nord
@@ -277,6 +277,7 @@ usedBy:
277
277
  - Comune di Piacenza
278
278
  - Comune di Prignano
279
279
  - Comune di Reggio Emilia
280
+ - Comune di Rolo
280
281
  - Comune di San Felice sul Panaro
281
282
  - Comune di San Lazzaro di Savena
282
283
  - Comune di San Polo d'Enza
@@ -50,7 +50,7 @@ const CardWithImageTemplate = (props) => {
50
50
  show_block_bg = false,
51
51
  always_show_image = false,
52
52
  set_four_columns = false,
53
- show_type = true,
53
+ show_type = false,
54
54
  show_section,
55
55
  show_icon = true,
56
56
  show_description = true,
@@ -24,7 +24,7 @@ const messages = defineMessages({
24
24
  },
25
25
  });
26
26
 
27
- const renderImage = (image, showImage, sizeNatural) =>
27
+ const renderImage = (image, showImage, sizeNatural, altText = '') =>
28
28
  showImage && image ? (
29
29
  <div className="img-responsive-wrapper">
30
30
  <div
@@ -35,7 +35,7 @@ const renderImage = (image, showImage, sizeNatural) =>
35
35
  <figure className="img-wrapper">
36
36
  <img
37
37
  src={`data:${image['content-type']};${image.encoding},${image.data}`}
38
- alt=""
38
+ alt={altText}
39
39
  aria-hidden="true"
40
40
  loading="lazy"
41
41
  />
@@ -117,7 +117,12 @@ const Block = ({
117
117
  >
118
118
  {hasImage && (
119
119
  <Col className="my-1 px-0" key={'col-0'}>
120
- {renderImage(data?.image, hasImage, data?.sizeNatural)}
120
+ {renderImage(
121
+ data?.image,
122
+ hasImage,
123
+ data?.sizeNatural,
124
+ data?.altText,
125
+ )}
121
126
  </Col>
122
127
  )}
123
128
  <div
@@ -170,7 +175,12 @@ const Block = ({
170
175
  })}
171
176
  >
172
177
  <Col className="my-1 p-0" key={'col-0'} data-testid={'col-0'}>
173
- {renderImage(data?.image, hasImage, data?.sizeNatural)}
178
+ {renderImage(
179
+ data?.image,
180
+ hasImage,
181
+ data?.sizeNatural,
182
+ data?.altText,
183
+ )}
174
184
  </Col>
175
185
  <div
176
186
  key={'col-1'}
@@ -8,6 +8,7 @@ import {
8
8
  FileWidget,
9
9
  CheckboxWidget,
10
10
  FormFieldWrapper,
11
+ TextWidget,
11
12
  } from '@plone/volto/components';
12
13
  import ImageSizeWidget from '@plone/volto/components/manage/Widgets/ImageSizeWidget';
13
14
 
@@ -44,6 +45,10 @@ const messages = defineMessages({
44
45
  id: 'Grande',
45
46
  defaultMessage: 'Grande',
46
47
  },
48
+ altText: {
49
+ id: 'altText',
50
+ defaultMessage: "Testo alternativo per l'immagine",
51
+ },
47
52
  });
48
53
 
49
54
  const Sidebar = ({ data, block, onChangeBlock }) => {
@@ -105,6 +110,14 @@ const Sidebar = ({ data, block, onChangeBlock }) => {
105
110
  value={data.sizeImage || 's'}
106
111
  />
107
112
  </FormFieldWrapper>
113
+ <TextWidget
114
+ id="altText"
115
+ title={intl.formatMessage(messages.altText)}
116
+ value={data.altText}
117
+ onChange={(name, value) => {
118
+ onChangeBlock({ ...data, altText: value });
119
+ }}
120
+ />
108
121
  </Accordion.Content>
109
122
  </Accordion>
110
123
  </Segment.Group>
@@ -1,10 +1,4 @@
1
- import React, {
2
- useState,
3
- useEffect,
4
- useLayoutEffect,
5
- useCallback,
6
- useMemo,
7
- } from 'react';
1
+ import React, { useState, useEffect, useCallback } from 'react';
8
2
  import { useSelector, useDispatch } from 'react-redux';
9
3
  import { useLocation } from 'react-router-dom';
10
4
  import { useIntl, defineMessages } from 'react-intl';
@@ -215,7 +209,9 @@ const FeedbackForm = ({ contentType, pathname }) => {
215
209
  satisfaction > threshold ? 'positive' : 'negative'
216
210
  }-${getFormFieldValue('answer')}`,
217
211
  );
218
- selectedAnswer.focus();
212
+ if (selectedAnswer) {
213
+ selectedAnswer.focus();
214
+ }
219
215
  }
220
216
  // eslint-disable-next-line react-hooks/exhaustive-deps
221
217
  }, [step]);
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect } from 'react';
1
+ import React from 'react';
2
2
  import { TextArea, Form, FormGroup } from 'design-react-kit';
3
3
  import { defineMessages } from 'react-intl';
4
4
  import { FormHeader } from 'volto-feedback';
@@ -15,12 +15,16 @@ import {
15
15
  FooterPNRRLogo,
16
16
  } from 'design-comuni-plone-theme/components/ItaliaTheme/';
17
17
 
18
+ import { FooterTop } from 'volto-editablefooter';
19
+
18
20
  /**
19
21
  * FooterMain component class.
20
22
  * @class FooterMain
21
23
  * @extends Component
22
24
  */
23
25
  const FooterMain = () => {
26
+ const footerTopContent = FooterTop();
27
+
24
28
  return (
25
29
  <div className="it-footer-main">
26
30
  <Container tag="div">
@@ -28,11 +32,15 @@ const FooterMain = () => {
28
32
  <Row className="clearfix" tag="div">
29
33
  <Col sm={12} tag="div" widths={['xs', 'sm', 'md', 'lg', 'xl']}>
30
34
  <div className="it-brand-wrapper">
31
- <FooterPNRRLogo />
32
- <UniversalLink href="/">
33
- <LogoFooter />
34
- <BrandTextFooter />
35
- </UniversalLink>
35
+ {footerTopContent ?? (
36
+ <>
37
+ <FooterPNRRLogo />
38
+ <UniversalLink href="/">
39
+ <LogoFooter />
40
+ <BrandTextFooter />
41
+ </UniversalLink>
42
+ </>
43
+ )}
36
44
  </div>
37
45
  </Col>
38
46
  </Row>
@@ -48,6 +48,9 @@ const RenderBlocks = ({
48
48
  if (block['@type'] === 'text' && !block.text) {
49
49
  return null;
50
50
  }
51
+ if (block['@type'] === 'slate' && block.plaintext?.length === 0) {
52
+ return null;
53
+ }
51
54
  }
52
55
  return items?.length > 0 ? (
53
56
  <>
@@ -5,6 +5,7 @@
5
5
 
6
6
  import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
+ import cx from 'classnames';
8
9
  import { Dimmer, Button } from 'design-react-kit';
9
10
  import { readAsDataURL } from 'promise-file-reader';
10
11
  import { injectIntl, defineMessages, useIntl } from 'react-intl';
@@ -56,14 +57,25 @@ const messages = defineMessages({
56
57
  * @returns {string} Markup of the component.
57
58
  */
58
59
  const FileWidget = (props) => {
59
- const { id, value, onChange, label, onEdit, infoText, required, invalid } =
60
- props;
60
+ const {
61
+ id,
62
+ value,
63
+ onChange,
64
+ label,
65
+ onEdit,
66
+ infoText,
67
+ required,
68
+ invalid,
69
+ validationText,
70
+ } = props;
61
71
  const [isImage, setIsImage] = React.useState(false);
62
72
  const intl = useIntl();
63
73
 
64
74
  React.useEffect(() => {
65
75
  if (value && imageMimetypes.includes(value['content-type'])) {
66
76
  setIsImage(true);
77
+ } else {
78
+ setIsImage(false);
67
79
  }
68
80
  }, [value]);
69
81
 
@@ -150,7 +162,7 @@ const FileWidget = (props) => {
150
162
  </div>
151
163
  )}
152
164
 
153
- <small className="form-text text-muted">
165
+ <small className="form-text">
154
166
  {value
155
167
  ? intl.formatMessage(messages.replaceFile)
156
168
  : intl.formatMessage(messages.addNewFile)}
@@ -171,7 +183,16 @@ const FileWidget = (props) => {
171
183
  </div>
172
184
  )}
173
185
  </Dropzone>
174
- {infoText && <small className="form-text text-muted">{infoText}</small>}
186
+ {infoText && (
187
+ <small
188
+ className={cx('form-text', {
189
+ 'invalid-feedback form-feedback just-validate-error-label form-feedback just-validate-error-label':
190
+ invalid,
191
+ })}
192
+ >
193
+ {infoText}
194
+ </small>
195
+ )}
175
196
  {value && (
176
197
  <div className="field-file-name">
177
198
  {value.filename}
@@ -189,6 +210,11 @@ const FileWidget = (props) => {
189
210
  </div>
190
211
  )}
191
212
  </div>
213
+ {validationText && (
214
+ <div className="invalid-feedback form-feedback just-validate-error-label form-text form-feedback just-validate-error-label">
215
+ {validationText}
216
+ </div>
217
+ )}
192
218
  </div>
193
219
  );
194
220
  };