io-sanita-theme 2.5.3 → 2.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.6.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.5.3...2.6.0) (2025-03-11)
4
+
5
+ ### Features
6
+
7
+ * added all listing variation to Search block ([100880f](https://github.com/RedTurtle/io-sanita-theme/commit/100880f76bcccab88f4055eef6a8a996bc4bc108))
8
+
9
+ ### Bug Fixes
10
+
11
+ * a11y Bando and Event dates ([233d8d1](https://github.com/RedTurtle/io-sanita-theme/commit/233d8d10bd6e6c606fbc79f2b7f4c46196cf5b2a))
12
+
3
13
  ## [2.5.3](https://github.com/RedTurtle/io-sanita-theme/compare/2.5.2...2.5.3) (2025-03-05)
4
14
 
5
15
  ### Bug Fixes
package/RELEASE.md CHANGED
@@ -41,6 +41,12 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione x.x.x (x/x/x)
45
+
46
+ ### Novità
47
+
48
+ - ora nel blocco Cerca, è possibile selezionare tutte le variazioni del blocco elenco come aspetto dei risultati.
49
+
44
50
  ## Versione 2.5.0 (05/03/2025)
45
51
 
46
52
  ### Novità
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.5.3",
3
+ "version": "2.6.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -90,11 +90,14 @@ const BandoDates = ({ content }) => {
90
90
  return (
91
91
  item.date && (
92
92
  <div className="point-list" key={index}>
93
- <div className="point-list-aside point-list-warning">
94
- <span className="point-date text-monospace">
93
+ <div
94
+ className="point-list-aside point-list-warning"
95
+ aria-label={item.date.format('DD MMMM Y')}
96
+ >
97
+ <span className="point-date text-monospace" aria-hidden={true}>
95
98
  {item.date.format('DD')}
96
99
  </span>
97
- <span className="point-month text-monospace">
100
+ <span className="point-month text-monospace" aria-hidden={true}>
98
101
  {item.date.format('MMM')}/{item.date.format('YY')}
99
102
  </span>
100
103
  </div>
@@ -80,13 +80,20 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
80
80
  <>
81
81
  <div className="point-list-wrapper my-4 mb-5">
82
82
  <div className="point-list">
83
- <div className="point-list-aside point-list-primary fw-normal">
84
- <span className="point-date font-monospace">
83
+ <div
84
+ className="point-list-aside point-list-primary fw-normal"
85
+ aria-label={start.format('DD MMMM Y')}
86
+ >
87
+ <span className="point-date font-monospace" aria-hidden={true}>
85
88
  {start.format('DD')}
86
89
  </span>
87
- <span className="point-month font-monospace">{start.format('MMMM')}</span>
90
+ <span className="point-month font-monospace" aria-hidden={true}>
91
+ {start.format('MMMM')}
92
+ </span>
88
93
  {!start.isSame(end, 'year') && (
89
- <span className="point-month font-monospace">{start.format('YYYY')}</span>
94
+ <span className="point-month font-monospace" aria-hidden={true}>
95
+ {start.format('YYYY')}
96
+ </span>
90
97
  )}
91
98
  </div>
92
99
  <div className="point-list-content">
@@ -111,15 +118,18 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
111
118
  </div>
112
119
  {!openEnd && (
113
120
  <div className="point-list">
114
- <div className="point-list-aside point-list-primary fw-normal">
115
- <span className="point-date font-monospace">
121
+ <div
122
+ className="point-list-aside point-list-primary fw-normal"
123
+ aria-label={end.format('DD MMMM Y')}
124
+ >
125
+ <span className="point-date font-monospace" aria-hidden={true}>
116
126
  {end.format('DD')}
117
127
  </span>
118
- <span className="point-month font-monospace">
128
+ <span className="point-month font-monospace" aria-hidden={true}>
119
129
  {end.format('MMMM')}
120
130
  </span>
121
131
  {!end.isSame(start, 'year') && (
122
- <span className="point-month font-monospace">
132
+ <span className="point-month font-monospace" aria-hidden={true}>
123
133
  {end.format('YYYY')}
124
134
  </span>
125
135
  )}
@@ -149,7 +159,7 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
149
159
  {additionalDates.length > 0 && (
150
160
  <div className="mt-4">
151
161
  <h5>{intl.formatMessage(messages.additional_dates)}</h5>
152
- {additionalDates.map((additionalDate,i) => (
162
+ {additionalDates.map((additionalDate, i) => (
153
163
  <div className="font-serif" key={i}>
154
164
  {viewDate(intl.locale, additionalDate, 'dddd DD MMMM YYYY')}
155
165
  </div>
@@ -159,8 +169,8 @@ const Dates = ({ content, show_image, moment: momentlib, rrule }) => {
159
169
  {exdates.length > 0 && (
160
170
  <div className="mt-4">
161
171
  <h5>{intl.formatMessage(messages.excluded_dates)}</h5>
162
- {exdates.map((exDate,i) => (
163
- <div className="font-serif" key={'exdate'+i}>
172
+ {exdates.map((exDate, i) => (
173
+ <div className="font-serif" key={'exdate' + i}>
164
174
  {viewDate(intl.locale, exDate, 'dddd DD MMMM YYYY')}
165
175
  </div>
166
176
  ))}
@@ -74,6 +74,11 @@ export const applyIoSanitaBlocksConfig = (config) => {
74
74
  delete config.blocks.blocksConfig.teaser;
75
75
  delete config.blocks.blocksConfig.leadimage;
76
76
 
77
+ const listingVariations = [
78
+ ...config.blocks.blocksConfig.listing.variations,
79
+ ...getIoSanitaListingVariations(config),
80
+ ];
81
+
77
82
  config.blocks.blocksConfig = {
78
83
  ...config.blocks.blocksConfig,
79
84
 
@@ -81,10 +86,7 @@ export const applyIoSanitaBlocksConfig = (config) => {
81
86
  ...config.blocks.blocksConfig.listing,
82
87
  showLinkMore: true,
83
88
  blockSchema: schemaListing,
84
- variations: [
85
- ...config.blocks.blocksConfig.listing.variations,
86
- ...getIoSanitaListingVariations(config),
87
- ],
89
+ variations: listingVariations,
88
90
  listing_bg_colors: [], //{name:'blue', label:'Blu'},{name:'light-blue', label:'Light blue'},{name:'sidebar-background', label:'Grey'}
89
91
  listing_items_colors: [], //{name:'blue', label:'Blu'},{name:'light-blue', label:'Light blue'},{name:'sidebar-background', label:'Grey'}
90
92
  getAsyncData: null, // questo disabilita il ssr dei listing perché rallenta vistosamente la pagina
@@ -280,7 +282,9 @@ export const applyIoSanitaBlocksConfig = (config) => {
280
282
  },
281
283
  search: {
282
284
  ...config.blocks.blocksConfig.search,
283
- templates: ['simpleCard', 'simpleListTemplate'],
285
+ templates: [
286
+ ...listingVariations.map((v) => v.id).filter((v) => v !== 'carousel'),
287
+ ],
284
288
  },
285
289
  searchMap: {
286
290
  id: 'searchMap',