design-comuni-plone-theme 11.9.0 → 11.10.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 (96) hide show
  1. package/.github/workflows/performance.yml +47 -0
  2. package/.yarn/cache/minipass-npm-5.0.0-c64fb63c92-425dab2887.zip +0 -0
  3. package/.yarn/cache/tar-npm-6.2.1-237800bb20-f1322768c9.zip +0 -0
  4. package/.yarn/cache/{volto-gdpr-privacy-npm-2.1.1-414b7e6a62-2246b94027.zip → volto-gdpr-privacy-npm-2.2.0-6be0f74d53-8a93254251.zip} +0 -0
  5. package/.yarn/cache/volto-slimheader-npm-0.1.1-6c4a32fae4-94bafa197c.zip +0 -0
  6. package/.yarn/install-state.gz +0 -0
  7. package/CHANGELOG.md +60 -0
  8. package/RELEASE.md +33 -0
  9. package/locales/de/LC_MESSAGES/volto.po +61 -36
  10. package/locales/en/LC_MESSAGES/volto.po +63 -38
  11. package/locales/es/LC_MESSAGES/volto.po +61 -36
  12. package/locales/fr/LC_MESSAGES/volto.po +62 -37
  13. package/locales/it/LC_MESSAGES/volto.po +61 -36
  14. package/locales/volto.pot +62 -37
  15. package/package.json +5 -3
  16. package/publiccode.yml +2 -2
  17. package/src/components/ItaliaTheme/AppExtras/TrackFocus.jsx +47 -0
  18. package/src/components/ItaliaTheme/Blocks/Accordion/View.jsx +1 -1
  19. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/BodyWrapper.jsx +8 -3
  20. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/BottomBody.jsx +25 -16
  21. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Edit.jsx +10 -2
  22. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/Sidebar.jsx +39 -3
  23. package/src/components/ItaliaTheme/Blocks/ArgumentsInEvidence/View.jsx +31 -16
  24. package/src/components/ItaliaTheme/Blocks/Calendar/Body.jsx +23 -59
  25. package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/SelectFilter.jsx +9 -1
  26. package/src/components/ItaliaTheme/Blocks/EventSearch/DefaultFilters.js +5 -0
  27. package/src/components/ItaliaTheme/Blocks/IconBlocks/Block/ViewBlock.jsx +17 -0
  28. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +182 -0
  29. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx +7 -173
  30. package/src/components/ItaliaTheme/Blocks/Listing/Commons/utils.js +0 -70
  31. package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +24 -36
  32. package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +177 -0
  33. package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx +8 -170
  34. package/src/components/ItaliaTheme/Blocks/Listing/Slider/SlideItemDefault.jsx +65 -0
  35. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +62 -212
  36. package/src/components/ItaliaTheme/Blocks/VideoGallery/Body.jsx +10 -48
  37. package/src/components/ItaliaTheme/Blocks/VideoGallery/Edit.jsx +3 -2
  38. package/src/components/ItaliaTheme/Blocks/VideoGallery/View.jsx +3 -2
  39. package/src/components/ItaliaTheme/Footer/FooterNavigation.jsx +6 -0
  40. package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +34 -5
  41. package/src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx +2 -0
  42. package/src/components/ItaliaTheme/MegaMenu/MegaMenu.jsx +8 -2
  43. package/src/components/ItaliaTheme/MenuSecondary/MenuSecondary.jsx +3 -0
  44. package/src/components/ItaliaTheme/Slider/ButtonPlayPause.jsx +48 -0
  45. package/src/components/ItaliaTheme/Slider/CarouselWrapper.jsx +23 -0
  46. package/src/components/ItaliaTheme/Slider/NextArrow.jsx +31 -0
  47. package/src/components/ItaliaTheme/Slider/PrevArrow.jsx +33 -0
  48. package/src/components/ItaliaTheme/Slider/SingleSlideWrapper.jsx +39 -0
  49. package/src/components/ItaliaTheme/Slider/slider.js +203 -0
  50. package/src/components/ItaliaTheme/View/Commons/ContactLink.jsx +3 -2
  51. package/src/components/ItaliaTheme/View/Commons/Dates.jsx +12 -4
  52. package/src/components/ItaliaTheme/View/Commons/Gallery.jsx +13 -9
  53. package/src/components/ItaliaTheme/View/Commons/Metadata.jsx +1 -1
  54. package/src/components/ItaliaTheme/View/Commons/RenderBlocks.jsx +20 -7
  55. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoDescrizione.jsx +15 -7
  56. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +12 -1
  57. package/src/components/ItaliaTheme/View/EventoView/EventoLuoghi.jsx +7 -7
  58. package/src/components/ItaliaTheme/View/UOView/UOServices.jsx +1 -1
  59. package/src/components/ItaliaTheme/View/__tests__/ServizioMetadati.test.jsx +1 -1
  60. package/src/components/ItaliaTheme/index.js +7 -2
  61. package/src/config/Blocks/ListingOptions/cardWithImageTemplate.js +18 -2
  62. package/src/config/Blocks/ListingOptions/simpleCardTemplate.js +34 -17
  63. package/src/config/Blocks/ListingOptions/sliderTemplate.js +68 -11
  64. package/src/config/Blocks/listingVariations.js +8 -0
  65. package/src/config/italiaConfig.js +13 -2
  66. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +5 -0
  67. package/src/customizations/volto/components/manage/Blocks/Search/components/SelectFacetFilterListEntry.jsx +43 -36
  68. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +8 -3
  69. package/src/customizations/volto/components/manage/Widgets/FileWidget.jsx +2 -2
  70. package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +5 -1
  71. package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +126 -0
  72. package/src/helpers/config.js +1 -1
  73. package/src/theme/ItaliaTheme/Blocks/_argumentsInEvidence.scss +4 -4
  74. package/src/theme/ItaliaTheme/Blocks/{_cardWithImageAndInEvidence.scss → _cardWithImage.scss} +63 -38
  75. package/src/theme/ItaliaTheme/Blocks/_iconBlocks.scss +7 -6
  76. package/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss +123 -0
  77. package/src/theme/ItaliaTheme/Blocks/_simpleCardTemplate.scss +65 -67
  78. package/src/theme/ItaliaTheme/Blocks/_sliderTemplate.scss +81 -0
  79. package/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss +16 -0
  80. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +1 -1
  81. package/src/theme/ItaliaTheme/Components/_mobileMenu.scss +1 -1
  82. package/src/theme/ItaliaTheme/Components/_navigation.scss +15 -0
  83. package/src/theme/ItaliaTheme/Components/_tertiaryMenu.scss +6 -0
  84. package/src/theme/ItaliaTheme/Print/_all_pages.scss +33 -0
  85. package/src/theme/ItaliaTheme/Print/_page.scss +21 -0
  86. package/src/theme/ItaliaTheme/Print/_uo.scss +7 -2
  87. package/src/theme/ItaliaTheme/Views/_common.scss +4 -0
  88. package/src/theme/bootstrap-override/bootstrap-italia/_chips.scss +16 -1
  89. package/src/theme/bootstrap-override/bootstrap-italia/_footer.scss +2 -0
  90. package/src/theme/site.scss +4 -2
  91. package/.yarn/cache/nanoid-npm-3.3.4-3d250377d6-2fddd6dee9.zip +0 -0
  92. package/.yarn/cache/postcss-npm-8.4.16-7367383579-10eee25efd.zip +0 -0
  93. package/.yarn/cache/tar-npm-6.1.11-e6ac3cba9c-a04c07bb9e.zip +0 -0
  94. package/src/components/ItaliaTheme/Blocks/Listing/Commons/NextArrow.jsx +0 -10
  95. package/src/components/ItaliaTheme/Blocks/Listing/Commons/PrevArrow.jsx +0 -10
  96. package/src/theme/ItaliaTheme/Blocks/_inevidencetemplate.scss +0 -34
@@ -38,6 +38,23 @@ export const addCardWithImageTemplateOptions = (
38
38
 
39
39
  pos = addDefaultOptions(schema, formData, intl, pos);
40
40
 
41
+ pos = imageCardTemplateOptions(schema, formData, intl, pos);
42
+
43
+ return pos;
44
+ };
45
+
46
+ /*questa funzione è riutilizzabile.
47
+ Serve per fare in modo che le opzioni relative alla visualizzazione di ogni singola card,
48
+ si possano riutilizzare in altre variations del blocco listing, dove appunto viene riutilizzato il componente di visualizzazione dell'elemento.
49
+ Ad esempio, è stato usato anche nella variazione 'slider' per poter mostrare gli elementi con aspetto 'Card con immagine'.*/
50
+ export const imageCardTemplateOptions = (
51
+ schema,
52
+ formData,
53
+ intl,
54
+ position,
55
+ hide_fields = [], //array of string
56
+ ) => {
57
+ let pos = position;
41
58
  pos = templatesOptions(
42
59
  schema,
43
60
  formData,
@@ -52,7 +69,7 @@ export const addCardWithImageTemplateOptions = (
52
69
  'hide_dates',
53
70
  'show_description',
54
71
  'show_topics',
55
- ],
72
+ ].filter((f) => hide_fields.indexOf(f) < 0),
56
73
  {
57
74
  always_show_image: {
58
75
  default: false,
@@ -72,6 +89,5 @@ export const addCardWithImageTemplateOptions = (
72
89
  },
73
90
  pos,
74
91
  );
75
-
76
92
  return pos;
77
93
  };
@@ -79,28 +79,45 @@ export const addSimpleCardTemplateOptions = (
79
79
  pos,
80
80
  );
81
81
  } else {
82
- pos = templatesOptions(
82
+ pos = simpleCardTemplateOptions_appearance_default(
83
83
  schema,
84
84
  formData,
85
85
  intl,
86
- [
87
- 'show_icon',
88
- 'hide_dates',
89
- 'show_section',
90
- 'show_type',
91
- 'show_description',
92
- 'show_detail_link',
93
- 'show_path_filters',
94
- ],
95
- {
96
- hide_dates: { default: false },
97
- show_icon: { default: true },
98
- show_type: { default: false },
99
- show_detail_link: { default: false },
100
- show_path_filters: { default: false },
101
- },
102
86
  pos,
103
87
  );
104
88
  }
105
89
  return pos;
106
90
  };
91
+
92
+ export const simpleCardTemplateOptions_appearance_default = (
93
+ schema,
94
+ formData,
95
+ intl,
96
+ position,
97
+ hide_fields = [], //array of string
98
+ ) => {
99
+ let pos = position;
100
+ pos = templatesOptions(
101
+ schema,
102
+ formData,
103
+ intl,
104
+ [
105
+ 'show_icon',
106
+ 'hide_dates',
107
+ 'show_section',
108
+ 'show_type',
109
+ 'show_description',
110
+ 'show_detail_link',
111
+ 'show_path_filters',
112
+ ].filter((f) => hide_fields.indexOf(f) < 0),
113
+ {
114
+ hide_dates: { default: false },
115
+ show_icon: { default: true },
116
+ show_type: { default: false },
117
+ show_detail_link: { default: false },
118
+ show_path_filters: { default: false },
119
+ },
120
+ pos,
121
+ );
122
+ return pos;
123
+ };
@@ -1,6 +1,8 @@
1
1
  import { defineMessages } from 'react-intl';
2
2
 
3
3
  import { addSchemaField } from 'design-comuni-plone-theme/config/Blocks/ListingOptions';
4
+ import { simpleCardTemplateOptions_appearance_default } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/simpleCardTemplate';
5
+ import { imageCardTemplateOptions } from 'design-comuni-plone-theme/config/Blocks/ListingOptions/cardWithImageTemplate';
4
6
 
5
7
  const messages = defineMessages({
6
8
  show_full_width: {
@@ -31,8 +33,28 @@ const messages = defineMessages({
31
33
  id: 'autoplay_speed_description',
32
34
  defaultMessage: 'La velocità di autoplay deve essere espressa in secondi.',
33
35
  },
36
+ appearance: {
37
+ id: 'Aspetto',
38
+ defaultMessage: 'Aspetto',
39
+ },
40
+ slider_listing_appearance_description: {
41
+ id: 'slider_listing_appearance_description',
42
+ defaultMessage:
43
+ "Qui puoi selezionare, per il template 'Slider', un aspetto diverso da quello di default per gli elementi mostrati nello slider.",
44
+ },
45
+ slider_listing_appearance_simplecard: {
46
+ id: 'slider_listing_appearance_simplecard',
47
+ defaultMessage: 'Card semplice',
48
+ },
49
+ slider_listing_appearance_imagecard: {
50
+ id: 'slider_listing_appearance_imagecard',
51
+ defaultMessage: 'Card con immagine',
52
+ },
34
53
  });
35
54
 
55
+ export const SliderTemplateAppearance_SIMPLECARD = 'simple_card';
56
+ export const SliderTemplateAppearance_IMAGECARD = 'image_card';
57
+
36
58
  export const addSliderTemplateOptions = (
37
59
  schema,
38
60
  formData,
@@ -51,16 +73,6 @@ export const addSliderTemplateOptions = (
51
73
  );
52
74
  pos++;
53
75
 
54
- addSchemaField(
55
- schema,
56
- 'show_image_title',
57
- intl.formatMessage(messages.show_image_title),
58
- null,
59
- { type: 'boolean', default: true },
60
- pos,
61
- );
62
- pos++;
63
-
64
76
  addSchemaField(
65
77
  schema,
66
78
  'show_dots',
@@ -91,7 +103,7 @@ export const addSliderTemplateOptions = (
91
103
  );
92
104
  pos++;
93
105
 
94
- pos = addSchemaField(
106
+ addSchemaField(
95
107
  schema,
96
108
  'slidesToShow',
97
109
  intl.formatMessage(messages.slidesToShow),
@@ -99,5 +111,50 @@ export const addSliderTemplateOptions = (
99
111
  { type: 'number', default: 1 },
100
112
  pos,
101
113
  );
114
+ pos++;
115
+ //appearance options
116
+
117
+ let choices = [
118
+ [
119
+ SliderTemplateAppearance_SIMPLECARD,
120
+ intl.formatMessage(messages.slider_listing_appearance_simplecard),
121
+ ],
122
+ [
123
+ SliderTemplateAppearance_IMAGECARD,
124
+ intl.formatMessage(messages.slider_listing_appearance_imagecard),
125
+ ],
126
+ ];
127
+
128
+ addSchemaField(
129
+ schema,
130
+ 'slide_appearance',
131
+ intl.formatMessage(messages.appearance),
132
+ intl.formatMessage(messages.slider_listing_appearance_description),
133
+ {
134
+ choices,
135
+ },
136
+ pos,
137
+ );
138
+ pos++;
139
+
140
+ if (formData.slide_appearance === SliderTemplateAppearance_SIMPLECARD) {
141
+ simpleCardTemplateOptions_appearance_default(schema, formData, intl, pos, [
142
+ 'show_path_filters',
143
+ ]);
144
+ pos++;
145
+ } else if (formData.slide_appearance === SliderTemplateAppearance_IMAGECARD) {
146
+ imageCardTemplateOptions(schema, formData, intl, pos, ['set_four_columns']);
147
+ pos++;
148
+ } else {
149
+ addSchemaField(
150
+ schema,
151
+ 'show_image_title',
152
+ intl.formatMessage(messages.show_image_title),
153
+ null,
154
+ { type: 'boolean', default: true },
155
+ pos,
156
+ );
157
+ pos++;
158
+ }
102
159
  return pos;
103
160
  };
@@ -26,6 +26,9 @@ import PhotogalleryTemplateSkeleton from 'design-comuni-plone-theme/components/I
26
26
 
27
27
  import SliderTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/SliderTemplate';
28
28
  import SliderTemplateSkeleton from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/SliderTemplateSkeleton';
29
+ import SlideItemDefault from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/Slider/SlideItemDefault';
30
+ import SlideItemSimpleCard from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault';
31
+ import SlideItemImageCard from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault';
29
32
 
30
33
  import GridGalleryTemplate from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate';
31
34
  import GridGalleryTemplateSkeleton from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/GridGalleryTemplateSkeleton';
@@ -229,6 +232,11 @@ const italiaListingVariations = [
229
232
  return schema;
230
233
  },
231
234
  cloneData: cloneBlock,
235
+ appearance: {
236
+ default: SlideItemDefault,
237
+ simple_card: SlideItemSimpleCard,
238
+ image_card: SlideItemImageCard,
239
+ },
232
240
  },
233
241
  {
234
242
  id: 'gridGalleryTemplate',
@@ -33,6 +33,7 @@ import LeftColumnFacets from '@plone/volto/components/manage/Blocks/Search/layou
33
33
  import HandleAnchor from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/HandleAnchor';
34
34
  import GenericAppExtras from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/GenericAppExtras';
35
35
  import PageLoader from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/PageLoader';
36
+ import TrackFocus from 'design-comuni-plone-theme/components/ItaliaTheme/AppExtras/TrackFocus';
36
37
  import redraft from 'redraft';
37
38
  import { loadables as ItaliaLoadables } from 'design-comuni-plone-theme/config/loadables';
38
39
 
@@ -65,8 +66,8 @@ import { schemaListing } from 'design-comuni-plone-theme/components/ItaliaTheme/
65
66
 
66
67
  import reducers from 'design-comuni-plone-theme/reducers';
67
68
 
68
- const ReleaseLog = loadable(
69
- () => import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
69
+ const ReleaseLog = loadable(() =>
70
+ import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
70
71
  );
71
72
 
72
73
  const messages = defineMessages({
@@ -86,6 +87,7 @@ export default function applyConfig(voltoConfig) {
86
87
 
87
88
  config.settings = {
88
89
  ...config.settings,
90
+ openExternalLinkInNewTab: true,
89
91
  sentryOptions: (libraries) => ({
90
92
  ...voltoSentryOptions(libraries),
91
93
  ignoreErrors: [
@@ -216,6 +218,10 @@ export default function applyConfig(voltoConfig) {
216
218
  // arLogoutUrl: '/logout?e=1',
217
219
  // spidLogin: true, //se true, nella pagina di errore Unauthorized, mostra il pulsante per il login a Spid.
218
220
  headerslimTertiaryMenu: {
221
+ default: [
222
+ //{ title: 'Contatti', url: '/it/contatti' },
223
+ //{ title: 'Novità', url: '/it/novita' },
224
+ ],
219
225
  it: [
220
226
  //{ title: 'Contatti', url: '/it/contatti' },
221
227
  //{ title: 'Novità', url: '/it/novita' },
@@ -265,6 +271,7 @@ export default function applyConfig(voltoConfig) {
265
271
  splitMegamenuColumns: true, //se impostato a false, non spezza le colonne con intestazioni nel megamenu
266
272
  footerNavigationDepth: 2, //valori possibili: [1,2]. Se impostato ad 1 non verranno mostrati nel footer i link agli elementi contenuti nelle sezioni di primo livello.
267
273
  markSpecialLinks: true, // se impostato a false, non marca con icona i link esterni
274
+ markFooterLinks: false, // se impostato a true, viene aggiunta un'icona ai link del footer per renderli riconoscibili
268
275
  },
269
276
  apiExpanders: [
270
277
  ...config.settings.apiExpanders,
@@ -287,6 +294,10 @@ export default function applyConfig(voltoConfig) {
287
294
  match: '',
288
295
  component: PageLoader,
289
296
  },
297
+ {
298
+ match: '',
299
+ component: TrackFocus,
300
+ },
290
301
  ],
291
302
  maxFileUploadSize: null,
292
303
  'volto-blocks-widget': {
@@ -5,6 +5,7 @@ CUSTOMIZATIONS:
5
5
  - 'background class' and 'block class'
6
6
  - 'background class' and 'block class' logic for search block
7
7
  - search block integration
8
+ - pass 'block' prop to listing variation
8
9
  */
9
10
  import React from 'react';
10
11
  import { FormattedMessage, injectIntl } from 'react-intl';
@@ -37,7 +38,9 @@ const ListingBody = React.memo(
37
38
  loadingQuery,
38
39
  listingRef,
39
40
  additionalFilters,
41
+ block,
40
42
  } = props;
43
+
41
44
  let ListingBodyTemplate;
42
45
  let templateConfig;
43
46
  // Legacy support if template is present
@@ -97,6 +100,7 @@ const ListingBody = React.memo(
97
100
  // Also need to purge title from searchblock schema, it's the name of the listing template used
98
101
  const listingBodyProps =
99
102
  variation?.['@type'] !== 'search' ? data : { ...variation, title: '' };
103
+
100
104
  return (
101
105
  <div className="public-ui">
102
106
  {loadingQuery && (
@@ -114,6 +118,7 @@ const ListingBody = React.memo(
114
118
  <ListingBodyTemplate
115
119
  items={listingItems}
116
120
  isEditMode={isEditMode}
121
+ block={block}
117
122
  {...listingBodyProps}
118
123
  addFilters={addFilters}
119
124
  additionalFilters={additionalFilters}
@@ -72,41 +72,32 @@ function SelectFacetFilterListEntry(props) {
72
72
  </>
73
73
  ) : (
74
74
  <>
75
- {facets[facet]?.length > 0 && (
75
+ {((Array.isArray(facets?.[facet]) && facets?.[facet]?.length > 0) ||
76
+ (!Array.isArray(facets?.[facet]) && Boolean(facets?.[facet]))) && (
76
77
  <span className="label-title mb-2">
77
78
  {facetSettings.title ?? facetSettings?.field?.label}
78
79
  </span>
79
80
  )}
80
- {facets[facet].map((entry, i) => {
81
- const label = Array.isArray(selectedValue)
82
- ? selectedValue?.find((sv) => sv.value === entry)?.label ?? ''
83
- : '';
84
- return (
85
- <Label key={i} className="d-flex w-100 py-1">
86
- <span>{label}</span>
87
- <Button
88
- className="p-0"
89
- onClick={() => {
90
- const entries = facets[facet].filter((item) => item !== entry);
91
- !isEditMode &&
92
- setFacets({
93
- ...facets,
94
- [facet]: entries,
95
- });
96
- }}
97
- aria-label={intl.formatMessage(
98
- commonSearchBlockMessages.clearFilter,
99
- {
100
- filterName: label,
101
- },
102
- )}
103
- title={intl.formatMessage(commonSearchBlockMessages.clearFilter, {
104
- filterName: label,
105
- })}
106
- >
107
- <Icon
108
- icon="it-close"
109
- size="md"
81
+ {Array.isArray(facets?.[facet]) &&
82
+ facets?.[facet]?.map((entry, i) => {
83
+ const label = Array.isArray(selectedValue)
84
+ ? selectedValue?.find((sv) => sv.value === entry)?.label ?? ''
85
+ : '';
86
+ return (
87
+ <Label key={i} className="d-flex w-100 py-1">
88
+ <span>{label}</span>
89
+ <Button
90
+ className="p-0"
91
+ onClick={() => {
92
+ const entries = facets?.[facet]?.filter(
93
+ (item) => item !== entry,
94
+ );
95
+ !isEditMode &&
96
+ setFacets({
97
+ ...facets,
98
+ [facet]: entries,
99
+ });
100
+ }}
110
101
  aria-label={intl.formatMessage(
111
102
  commonSearchBlockMessages.clearFilter,
112
103
  {
@@ -119,11 +110,27 @@ function SelectFacetFilterListEntry(props) {
119
110
  filterName: label,
120
111
  },
121
112
  )}
122
- />
123
- </Button>
124
- </Label>
125
- );
126
- })}
113
+ >
114
+ <Icon
115
+ icon="it-close"
116
+ size="md"
117
+ aria-label={intl.formatMessage(
118
+ commonSearchBlockMessages.clearFilter,
119
+ {
120
+ filterName: label,
121
+ },
122
+ )}
123
+ title={intl.formatMessage(
124
+ commonSearchBlockMessages.clearFilter,
125
+ {
126
+ filterName: label,
127
+ },
128
+ )}
129
+ />
130
+ </Button>
131
+ </Label>
132
+ );
133
+ })}
127
134
  </>
128
135
  );
129
136
  }
@@ -35,6 +35,7 @@ const UniversalLink = ({
35
35
  }) => {
36
36
  const intl = useIntl();
37
37
  const token = useSelector((state) => state.userSession?.token);
38
+ const { openExternalLinkInNewTab } = config.settings;
38
39
 
39
40
  let url = href;
40
41
  if (!href && item) {
@@ -85,6 +86,7 @@ const UniversalLink = ({
85
86
 
86
87
  const checkedURL = URLUtils.checkAndNormalizeUrl(url);
87
88
  url = checkedURL.url;
89
+
88
90
  let tag = (
89
91
  <Link
90
92
  to={flattenToAppURL(url)}
@@ -99,6 +101,11 @@ const UniversalLink = ({
99
101
  );
100
102
 
101
103
  if (isExternal) {
104
+ const openInNewTab =
105
+ openLinkInNewTab === null || openLinkInNewTab === undefined
106
+ ? openExternalLinkInNewTab
107
+ : openLinkInNewTab;
108
+
102
109
  tag = (
103
110
  <a
104
111
  href={url}
@@ -106,9 +113,7 @@ const UniversalLink = ({
106
113
  id: 'opensInNewTab',
107
114
  })}`}
108
115
  target={
109
- !checkedURL.isMail &&
110
- !checkedURL.isTelephone &&
111
- !(openLinkInNewTab === false)
116
+ !checkedURL.isMail && !checkedURL.isTelephone && openInNewTab
112
117
  ? '_blank'
113
118
  : null
114
119
  }
@@ -87,8 +87,8 @@ const FileWidget = (props) => {
87
87
  const imgsrc = value?.download
88
88
  ? `${flattenToAppURL(value?.download)}?id=${Date.now()}`
89
89
  : null || value?.data
90
- ? `data:${value['content-type']};${value.encoding},${value.data}`
91
- : null;
90
+ ? `data:${value['content-type']};${value.encoding},${value.data}`
91
+ : null;
92
92
 
93
93
  /**
94
94
  * Drop handler
@@ -112,7 +112,11 @@ const Navigation = ({ pathname }) => {
112
112
  >
113
113
  <Icon
114
114
  icon="it-burger"
115
- title={intl.formatMessage(messages.toggleNavigation)}
115
+ title={intl.formatMessage(messages.toggleMenu, {
116
+ action: collapseOpen
117
+ ? intl.formatMessage(messages.toggleMenu_close)
118
+ : intl.formatMessage(messages.toggleMenu_open),
119
+ })}
116
120
  />
117
121
  </HeaderToggler>
118
122
  <Collapse
@@ -0,0 +1,126 @@
1
+ /*
2
+ CUSTOMIZATIONS:
3
+ - make it work, prop name lang was wrong, remove in volto 18
4
+ */
5
+
6
+ import { useEffect } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { compose } from 'redux';
9
+ import { connect } from 'react-redux';
10
+ import { asyncConnect } from '@plone/volto/helpers';
11
+ import { defineMessages, injectIntl } from 'react-intl';
12
+ import { Container as SemanticContainer } from 'semantic-ui-react';
13
+ import { Helmet, toBackendLang } from '@plone/volto/helpers';
14
+ import { Link } from 'react-router-dom';
15
+ import config from '@plone/volto/registry';
16
+
17
+ import { getNavigation } from '@plone/volto/actions';
18
+
19
+ const messages = defineMessages({
20
+ Sitemap: {
21
+ id: 'Sitemap',
22
+ defaultMessage: 'Sitemap',
23
+ },
24
+ });
25
+
26
+ export function getSitemapPath(pathname = '', lang) {
27
+ const prefix = pathname.replace(/\/sitemap$/gm, '').replace(/^\//, '');
28
+ const path = prefix || lang || '';
29
+ return path;
30
+ }
31
+
32
+ /**
33
+ * Sitemap function component.
34
+ * @function Sitemap
35
+ * @param {Object} props - Component properties.
36
+ * @returns {JSX.Element} - Rendered component.
37
+ */
38
+ function Sitemap(props) {
39
+ const {
40
+ location: { pathname },
41
+ lang,
42
+ getNavigation,
43
+ } = props;
44
+
45
+ useEffect(() => {
46
+ const { settings } = config;
47
+ const language = settings.isMultilingual ? `${toBackendLang(lang)}` : null;
48
+ const path = getSitemapPath(pathname, language);
49
+ getNavigation(path, 4);
50
+ }, [pathname, lang, getNavigation]);
51
+
52
+ const renderItems = (items) => {
53
+ return (
54
+ <ul>
55
+ {items.map((item) => (
56
+ <li
57
+ key={item.url}
58
+ className={item.items?.length > 0 ? 'with-children' : ''}
59
+ >
60
+ <Link to={item.url}>{item.title}</Link>
61
+ {item.items && renderItems(item.items)}
62
+ </li>
63
+ ))}
64
+ </ul>
65
+ );
66
+ };
67
+
68
+ const Container =
69
+ config.getComponent({ name: 'Container' }).component || SemanticContainer;
70
+
71
+ return (
72
+ <div id="page-sitemap">
73
+ <Helmet title={props.intl.formatMessage(messages.Sitemap)} />
74
+ <Container className="view-wrapper">
75
+ <h1>{props.intl.formatMessage(messages.Sitemap)} </h1>
76
+ {props.items && renderItems(props.items)}
77
+ </Container>
78
+ </div>
79
+ );
80
+ }
81
+
82
+ Sitemap.propTypes = {
83
+ getNavigation: PropTypes.func.isRequired,
84
+ location: PropTypes.object.isRequired,
85
+ intl: PropTypes.object.isRequired,
86
+ lang: PropTypes.string.isRequired,
87
+ items: PropTypes.array.isRequired,
88
+ };
89
+
90
+ export const __test__ = compose(
91
+ injectIntl,
92
+ connect(
93
+ (state) => ({
94
+ items: state.navigation.items,
95
+ lang: state.intl.locale,
96
+ }),
97
+ { getNavigation },
98
+ ),
99
+ )(Sitemap);
100
+
101
+ export default compose(
102
+ injectIntl,
103
+ connect(
104
+ (state) => ({
105
+ items: state.navigation.items,
106
+ lang: state.intl.locale,
107
+ }),
108
+ { getNavigation },
109
+ ),
110
+ asyncConnect([
111
+ {
112
+ key: 'navigation',
113
+ promise: ({ location, store: { dispatch, getState } }) => {
114
+ if (!__SERVER__) return;
115
+ const { settings } = config;
116
+ const path = getSitemapPath(
117
+ location.pathname,
118
+ settings.isMultilingual
119
+ ? toBackendLang(getState().intl.locale)
120
+ : null,
121
+ );
122
+ return dispatch(getNavigation(path, 4));
123
+ },
124
+ },
125
+ ]),
126
+ )(Sitemap);
@@ -16,7 +16,7 @@ export const getSiteProperty = (property, locale) => {
16
16
  value
17
17
  );
18
18
  } else {
19
- return value.default ?? value;
19
+ return value.default ?? value[locale] ?? value;
20
20
  }
21
21
  default:
22
22
  break;
@@ -10,10 +10,10 @@
10
10
  background-position: top center;
11
11
  background-repeat: no-repeat;
12
12
  background-size: cover;
13
- }
14
-
15
- h2 {
16
- color: $primary-text !important;
13
+ + .volto-subblocks-wrapper .argumentsCardsWrapper h2,
14
+ + .argumentsCardsWrapper h2 {
15
+ color: $primary-text !important;
16
+ }
17
17
  }
18
18
 
19
19
  .grid {