io-sanita-theme 2.23.2 → 2.24.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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.24.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.23.2...2.24.0) (2026-04-10)
4
+
5
+ ### Features
6
+
7
+ * create new component for badge service status ([#122](https://github.com/RedTurtle/io-sanita-theme/issues/122)) ([2452d1e](https://github.com/RedTurtle/io-sanita-theme/commit/2452d1e26fa963b3043695b4e99a6f59108e1f38))
8
+ * video block added in grid block ([#121](https://github.com/RedTurtle/io-sanita-theme/issues/121)) ([a08d2a2](https://github.com/RedTurtle/io-sanita-theme/commit/a08d2a2a893e109e2f0135670a7cf4652865dbf6))
9
+
10
+ ### Maintenance
11
+
12
+ * preparing release 2.24.0 ([6332b72](https://github.com/RedTurtle/io-sanita-theme/commit/6332b72f23634f305e1be5050b8b1555fe251377))
13
+
14
+ ### Documentation
15
+
16
+ * test ([65db9b9](https://github.com/RedTurtle/io-sanita-theme/commit/65db9b93b686c6a422ea437144a085ce540ab164))
17
+
3
18
  ## [2.23.2](https://github.com/RedTurtle/io-sanita-theme/compare/2.23.0...2.23.2) (2026-03-20)
4
19
 
5
20
  ### Bug Fixes
package/RELEASE.md CHANGED
@@ -41,12 +41,23 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 2.24.0 (10/04/2026)
45
+
46
+ ### Fix
47
+
48
+ - Sistemata l'etichetta relativa allo stato del Servizio nelle card. Ora mostra correttamente "Attivo" o "Non attivo" a seconda dello stato del servizio, invece di mostrare sempre "Servizio Online".
49
+
50
+ ### Novità
51
+
52
+ - Aggiunta la possibilità di inserire il blocco Video all'interno del blocco Griglia.
53
+
44
54
  ## Versione 2.23.2 (20/03/2026)
45
55
 
46
56
  ### Fix
47
57
 
48
58
  - Sistemata l'altezza del blocco "Alert" in visualizzaizone.
49
59
  - Sistemata la visualizzazione dei nomi dei file che in alcuni casi contenevano caratteri speciali.
60
+ -
50
61
 
51
62
  ## Versione 2.23.0 (19/03/2026)
52
63
 
@@ -3433,12 +3433,12 @@ msgid "select_risultato"
3433
3433
  msgstr ""
3434
3434
 
3435
3435
  #. Default: "Servizio non attivo"
3436
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3436
+ #: components/View/Servizio/BadgeStatusServizio
3437
3437
  msgid "service_off"
3438
3438
  msgstr ""
3439
3439
 
3440
3440
  #. Default: "Servizio attivo"
3441
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3441
+ #: components/View/Servizio/BadgeStatusServizio
3442
3442
  msgid "service_on"
3443
3443
  msgstr ""
3444
3444
 
@@ -3502,12 +3502,6 @@ msgstr ""
3502
3502
  msgid "servizio_modulistica"
3503
3503
  msgstr ""
3504
3504
 
3505
- #. Default: "Servizio online"
3506
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3507
- #: components/Cards/CardSimple/CardSimple
3508
- msgid "servizio_online_chip"
3509
- msgstr ""
3510
-
3511
3505
  #. Default: "Orari del servizio"
3512
3506
  #: components/View/Servizio/ServizioOrari
3513
3507
  msgid "servizio_orari"
@@ -3428,12 +3428,12 @@ msgid "select_risultato"
3428
3428
  msgstr "result"
3429
3429
 
3430
3430
  #. Default: "Servizio non attivo"
3431
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3431
+ #: components/View/Servizio/BadgeStatusServizio
3432
3432
  msgid "service_off"
3433
3433
  msgstr "Service not available"
3434
3434
 
3435
3435
  #. Default: "Servizio attivo"
3436
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3436
+ #: components/View/Servizio/BadgeStatusServizio
3437
3437
  msgid "service_on"
3438
3438
  msgstr "Service available"
3439
3439
 
@@ -3497,12 +3497,6 @@ msgstr "Where"
3497
3497
  msgid "servizio_modulistica"
3498
3498
  msgstr "Forms"
3499
3499
 
3500
- #. Default: "Servizio online"
3501
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3502
- #: components/Cards/CardSimple/CardSimple
3503
- msgid "servizio_online_chip"
3504
- msgstr "Online service"
3505
-
3506
3500
  #. Default: "Orari del servizio"
3507
3501
  #: components/View/Servizio/ServizioOrari
3508
3502
  msgid "servizio_orari"
@@ -3435,12 +3435,12 @@ msgid "select_risultato"
3435
3435
  msgstr ""
3436
3436
 
3437
3437
  #. Default: "Servizio non attivo"
3438
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3438
+ #: components/View/Servizio/BadgeStatusServizio
3439
3439
  msgid "service_off"
3440
3440
  msgstr ""
3441
3441
 
3442
3442
  #. Default: "Servizio attivo"
3443
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3443
+ #: components/View/Servizio/BadgeStatusServizio
3444
3444
  msgid "service_on"
3445
3445
  msgstr ""
3446
3446
 
@@ -3504,12 +3504,6 @@ msgstr ""
3504
3504
  msgid "servizio_modulistica"
3505
3505
  msgstr ""
3506
3506
 
3507
- #. Default: "Servizio online"
3508
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3509
- #: components/Cards/CardSimple/CardSimple
3510
- msgid "servizio_online_chip"
3511
- msgstr ""
3512
-
3513
3507
  #. Default: "Orari del servizio"
3514
3508
  #: components/View/Servizio/ServizioOrari
3515
3509
  msgid "servizio_orari"
@@ -3435,12 +3435,12 @@ msgid "select_risultato"
3435
3435
  msgstr ""
3436
3436
 
3437
3437
  #. Default: "Servizio non attivo"
3438
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3438
+ #: components/View/Servizio/BadgeStatusServizio
3439
3439
  msgid "service_off"
3440
3440
  msgstr ""
3441
3441
 
3442
3442
  #. Default: "Servizio attivo"
3443
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3443
+ #: components/View/Servizio/BadgeStatusServizio
3444
3444
  msgid "service_on"
3445
3445
  msgstr ""
3446
3446
 
@@ -3504,12 +3504,6 @@ msgstr ""
3504
3504
  msgid "servizio_modulistica"
3505
3505
  msgstr ""
3506
3506
 
3507
- #. Default: "Servizio online"
3508
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3509
- #: components/Cards/CardSimple/CardSimple
3510
- msgid "servizio_online_chip"
3511
- msgstr ""
3512
-
3513
3507
  #. Default: "Orari del servizio"
3514
3508
  #: components/View/Servizio/ServizioOrari
3515
3509
  msgid "servizio_orari"
@@ -3428,12 +3428,12 @@ msgid "select_risultato"
3428
3428
  msgstr ""
3429
3429
 
3430
3430
  #. Default: "Servizio non attivo"
3431
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3431
+ #: components/View/Servizio/BadgeStatusServizio
3432
3432
  msgid "service_off"
3433
3433
  msgstr "Servizio non attivo"
3434
3434
 
3435
3435
  #. Default: "Servizio attivo"
3436
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3436
+ #: components/View/Servizio/BadgeStatusServizio
3437
3437
  msgid "service_on"
3438
3438
  msgstr "Servizio attivo"
3439
3439
 
@@ -3497,12 +3497,6 @@ msgstr ""
3497
3497
  msgid "servizio_modulistica"
3498
3498
  msgstr ""
3499
3499
 
3500
- #. Default: "Servizio online"
3501
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3502
- #: components/Cards/CardSimple/CardSimple
3503
- msgid "servizio_online_chip"
3504
- msgstr ""
3505
-
3506
3500
  #. Default: "Orari del servizio"
3507
3501
  #: components/View/Servizio/ServizioOrari
3508
3502
  msgid "servizio_orari"
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-09-19T13:15:59.811Z\n"
4
+ "POT-Creation-Date: 2026-04-10T09:33:51.894Z\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"
@@ -3430,12 +3430,12 @@ msgid "select_risultato"
3430
3430
  msgstr ""
3431
3431
 
3432
3432
  #. Default: "Servizio non attivo"
3433
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3433
+ #: components/View/Servizio/BadgeStatusServizio
3434
3434
  msgid "service_off"
3435
3435
  msgstr ""
3436
3436
 
3437
3437
  #. Default: "Servizio attivo"
3438
- #: components/View/commons/PageHeader/PageHeaderStatoServizio
3438
+ #: components/View/Servizio/BadgeStatusServizio
3439
3439
  msgid "service_on"
3440
3440
  msgstr ""
3441
3441
 
@@ -3499,12 +3499,6 @@ msgstr ""
3499
3499
  msgid "servizio_modulistica"
3500
3500
  msgstr ""
3501
3501
 
3502
- #. Default: "Servizio online"
3503
- #: components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault
3504
- #: components/Cards/CardSimple/CardSimple
3505
- msgid "servizio_online_chip"
3506
- msgstr ""
3507
-
3508
3502
  #. Default: "Orari del servizio"
3509
3503
  #: components/View/Servizio/ServizioOrari
3510
3504
  msgid "servizio_orari"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.23.2",
3
+ "version": "2.24.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
package/publiccode.yml CHANGED
@@ -12,14 +12,15 @@ categories:
12
12
  dependsOn:
13
13
  open:
14
14
  - name: nodejs
15
- versionMin: '20'
15
+ versionMin: "20"
16
16
  - name: Python
17
- versionMin: '3.11'
17
+ versionMin: "3.11"
18
18
  - name: Docker
19
- versionMin: '18.03'
19
+ versionMin: "18.03"
20
20
  optional: true
21
21
  usedBy:
22
22
  - AUSL Ferrara
23
+ - IRST
23
24
  developmentStatus: stable
24
25
  softwareType: standalone/web
25
26
  description:
@@ -9,7 +9,6 @@ import {
9
9
  CardTitle,
10
10
  CardText,
11
11
  CardReadMore,
12
- Badge,
13
12
  } from 'design-react-kit';
14
13
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
15
14
  import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
@@ -22,6 +21,7 @@ import {
22
21
  } from 'io-sanita-theme/helpers';
23
22
  import { CardCategoryBottom } from 'io-sanita-theme/components';
24
23
  import { ListingText } from 'io-sanita-theme/components/Blocks';
24
+ import { BadgeStatusServizio } from 'io-sanita-theme/components/View/Servizio';
25
25
 
26
26
  import { CardCategoryTop } from 'io-sanita-theme/components';
27
27
  import 'io-sanita-theme/components/Cards/CardSimple/cardSimple.scss';
@@ -36,10 +36,6 @@ const messages = defineMessages({
36
36
  id: 'update_date',
37
37
  defaultMessage: 'Data di aggiornamento',
38
38
  },
39
- servizioOnline: {
40
- id: 'servizio_online_chip',
41
- defaultMessage: 'Servizio online',
42
- },
43
39
  });
44
40
 
45
41
  const SimpleCardDefault = (props) => {
@@ -92,8 +88,6 @@ const SimpleCardDefault = (props) => {
92
88
  const listingText = show_description ? <ListingText item={item} /> : null;
93
89
 
94
90
  const type = item['@type'];
95
- const isServizioOnline =
96
- item['@type'] === 'Servizio' && item?.servizio_attivo;
97
91
 
98
92
  const BlockExtraTags = getComponentWithFallback({
99
93
  name: 'BlockExtraTags',
@@ -127,13 +121,7 @@ const SimpleCardDefault = (props) => {
127
121
  </CardTitle>
128
122
 
129
123
  {/* Chip servizio attivo */}
130
- {isServizioOnline && (
131
- <div className="mb-3">
132
- <Badge color="info">
133
- {intl.formatMessage(messages.servizioOnline)}
134
- </Badge>
135
- </div>
136
- )}
124
+ <BadgeStatusServizio item={item} wrapperClassName="mb-3" />
137
125
  {listingText && (
138
126
  <CardText className={cx('', { 'mb-5': eventRecurrenceMore })}>
139
127
  {listingText}
@@ -7,20 +7,14 @@ del modello dei siti ASL, la prop che va a leggere è: 'servizio_attivo'
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import { useIntl, defineMessages } from 'react-intl';
10
+ import { useIntl } from 'react-intl';
11
11
  import Highlighter from 'react-highlight-words';
12
12
  import { Card, CardBody, CardTitle, CardText, Badge } from 'design-react-kit';
13
13
  import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
14
14
  import { CardCategoryBottom } from 'io-sanita-theme/components';
15
+ import { BadgeStatusServizio } from 'io-sanita-theme/components/View/Servizio';
15
16
  import { viewDate } from 'io-sanita-theme/helpers';
16
17
  import './cardSimple.scss';
17
-
18
- const messages = defineMessages({
19
- servizioOnline: {
20
- id: 'servizio_online_chip',
21
- defaultMessage: 'Servizio online',
22
- },
23
- });
24
18
  export const CardSimple = ({
25
19
  showDescription = true,
26
20
  showCategory = true,
@@ -38,8 +32,7 @@ export const CardSimple = ({
38
32
  ? viewDate(intl.locale, item.effective, 'DD MMMM YYYY')
39
33
  : null;
40
34
 
41
- const isServizioOnline =
42
- item['@type'] === 'Servizio' && item?.servizio_attivo;
35
+ const isServizio = item['@type'] === 'Servizio';
43
36
 
44
37
  const title = highlight ? (
45
38
  <Highlighter
@@ -63,7 +56,7 @@ export const CardSimple = ({
63
56
  item.description
64
57
  );
65
58
 
66
- const display_badge = isServizioOnline || badgeText?.length > 0;
59
+ const display_badge = isServizio || badgeText?.length > 0;
67
60
  return (
68
61
  <Card className={`shadow rounded no-after card-simple ${className ?? ''}`}>
69
62
  <CardBody>
@@ -86,11 +79,11 @@ export const CardSimple = ({
86
79
  {/* Chip badge: servizio attivo per servizi o badge con badgeText */}
87
80
  {display_badge && (
88
81
  <div className={showDescription ? 'mb-3' : ''}>
89
- <Badge color="info">
90
- {isServizioOnline
91
- ? intl.formatMessage(messages.servizioOnline)
92
- : badgeText}
93
- </Badge>
82
+ {isServizio ? (
83
+ <BadgeStatusServizio item={item} />
84
+ ) : (
85
+ <Badge color="info">{badgeText}</Badge>
86
+ )}
94
87
  </div>
95
88
  )}
96
89
 
@@ -0,0 +1,37 @@
1
+ import { defineMessages, useIntl } from 'react-intl';
2
+ import { Badge } from 'design-react-kit';
3
+
4
+ const messages = defineMessages({
5
+ service_on: {
6
+ id: 'service_on',
7
+ defaultMessage: 'Servizio attivo',
8
+ },
9
+ service_off: {
10
+ id: 'service_off',
11
+ defaultMessage: 'Servizio non attivo',
12
+ },
13
+ });
14
+
15
+ const BadgeStatusServizio = ({ item, wrapperClassName = null }) => {
16
+ const intl = useIntl();
17
+
18
+ if (item?.['@type'] !== 'Servizio') {
19
+ return null;
20
+ }
21
+
22
+ const badge = (
23
+ <Badge color={item.servizio_attivo ? 'info' : 'danger'}>
24
+ {item.servizio_attivo
25
+ ? intl.formatMessage(messages.service_on)
26
+ : intl.formatMessage(messages.service_off)}
27
+ </Badge>
28
+ );
29
+
30
+ return wrapperClassName ? (
31
+ <div className={wrapperClassName}>{badge}</div>
32
+ ) : (
33
+ badge
34
+ );
35
+ };
36
+
37
+ export default BadgeStatusServizio;
@@ -108,3 +108,9 @@ export const ServizioSchemaOrg = loadable(
108
108
  /* webpackChunkName: "ISServizioView" */ 'io-sanita-theme/components/View/Servizio/ServizioSchemaOrg'
109
109
  ),
110
110
  );
111
+ export const BadgeStatusServizio = loadable(
112
+ () =>
113
+ import(
114
+ /* webpackChunkName: "ISBadgeStatusServizio" */ 'io-sanita-theme/components/View/Servizio/BadgeStatusServizio'
115
+ ),
116
+ );
@@ -1,19 +1,11 @@
1
1
  import { defineMessages, useIntl } from 'react-intl';
2
- import { Badge } from 'design-react-kit';
2
+ import { BadgeStatusServizio } from 'io-sanita-theme/components/View/Servizio';
3
3
 
4
4
  const messages = defineMessages({
5
5
  service_available: {
6
6
  id: 'Service available',
7
7
  defaultMessage: 'Servizio disponibile e prenotabile',
8
8
  },
9
- service_on: {
10
- id: 'service_on',
11
- defaultMessage: 'Servizio attivo',
12
- },
13
- service_off: {
14
- id: 'service_off',
15
- defaultMessage: 'Servizio non attivo',
16
- },
17
9
  });
18
10
 
19
11
  const PageHeaderServizio = ({ content }) => {
@@ -21,11 +13,7 @@ const PageHeaderServizio = ({ content }) => {
21
13
 
22
14
  return content['@type'] === 'Servizio' ? (
23
15
  <div className="mb-3">
24
- <Badge color={content.servizio_attivo ? 'info' : 'danger'}>
25
- {content.servizio_attivo
26
- ? intl.formatMessage(messages.service_on)
27
- : intl.formatMessage(messages.service_off)}
28
- </Badge>
16
+ <BadgeStatusServizio item={content} />
29
17
  {content.servizio_attivo && (
30
18
  <span className="px-2">
31
19
  {intl.formatMessage(messages.service_available)}
@@ -205,9 +205,12 @@ export const applyIoSanitaBlocksConfig = (config) => {
205
205
  },
206
206
  gridBlock: {
207
207
  ...config.blocks.blocksConfig.gridBlock,
208
- allowedBlocks: config.blocks.blocksConfig.gridBlock.allowedBlocks.filter(
209
- (item) => !['teaser'].includes(item),
210
- ),
208
+ allowedBlocks: [
209
+ ...config.blocks.blocksConfig.gridBlock.allowedBlocks.filter(
210
+ (item) => !['teaser'].includes(item),
211
+ ),
212
+ 'video',
213
+ ],
211
214
  },
212
215
  hero: {
213
216
  id: 'hero',
@@ -288,7 +291,9 @@ export const applyIoSanitaBlocksConfig = (config) => {
288
291
  search: {
289
292
  ...config.blocks.blocksConfig.search,
290
293
  // filtro top non personalizzato / non funzionante con layout agid
291
- variations: config.blocks.blocksConfig.search.variations.filter((v) => v.id !== 'facetsTopSide'),
294
+ variations: config.blocks.blocksConfig.search.variations.filter(
295
+ (v) => v.id !== 'facetsTopSide',
296
+ ),
292
297
  templates: [
293
298
  ...listingVariations.map((v) => v.id).filter((v) => v !== 'carousel'),
294
299
  ],