io-sanita-theme 2.27.0 → 2.28.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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.28.1](https://github.com/RedTurtle/io-sanita-theme/compare/2.28.0...2.28.1) (2026-05-06)
4
+
5
+ ### Maintenance
6
+
7
+ * updated volto-contents-next ([d082f30](https://github.com/RedTurtle/io-sanita-theme/commit/d082f300244c6eba48e7017471365dcc9b1f8f9f))
8
+
9
+ ## [2.28.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.27.0...2.28.0) (2026-05-05)
10
+
11
+ ### Features
12
+
13
+ * add contenuto da replicare block ([#135](https://github.com/RedTurtle/io-sanita-theme/issues/135)) ([578f9a4](https://github.com/RedTurtle/io-sanita-theme/commit/578f9a43bc97a07444d01fabf0ea5f04c8e48a7b))
14
+
15
+ ### Bug Fixes
16
+
17
+ * faq folderview import ([37cfd3b](https://github.com/RedTurtle/io-sanita-theme/commit/37cfd3b9c15ba78ba1c8ddfa5c7174f39c0ae73f))
18
+ * folder-content more popover open ([c88d3e8](https://github.com/RedTurtle/io-sanita-theme/commit/c88d3e817ff57a4eecf79958c13eb3d212f13a2e))
19
+ * icons for CT in folder content ([ffc7f0f](https://github.com/RedTurtle/io-sanita-theme/commit/ffc7f0fd9b38fd57f3d8b1e1b8ef477751d6e120))
20
+ * sometimes uo in steps were not loaded ([ddc635d](https://github.com/RedTurtle/io-sanita-theme/commit/ddc635dd1b838f49f9fc75d18ac30be3ad3e214d))
21
+
22
+ ### Maintenance
23
+
24
+ * preparing release 2.28.0 ([cb0a294](https://github.com/RedTurtle/io-sanita-theme/commit/cb0a294b23e9acf5bf6892cf7fb0683d6b511a2d))
25
+ * releaselog ([16109c1](https://github.com/RedTurtle/io-sanita-theme/commit/16109c1371e2c782ebbb0693d6536e2f1de1d323))
26
+ * revert volto-form-block-italia version ([5616eae](https://github.com/RedTurtle/io-sanita-theme/commit/5616eae1c8a077a1b26d99ea27b1719fa4ddeb3c))
27
+ * updated deps to remove duplicate api calls ([eb99334](https://github.com/RedTurtle/io-sanita-theme/commit/eb99334958d055da2c70038fd613c79bae4e193d))
28
+ * updated volto-contents-next ([7f7d0f9](https://github.com/RedTurtle/io-sanita-theme/commit/7f7d0f90c08d6cc260d254878dd5d47108b7c844))
29
+ * updated volto-form-block-italia ([d638639](https://github.com/RedTurtle/io-sanita-theme/commit/d638639e3f72e974cf6bf947095545bf4f48d412))
30
+
3
31
  ## [2.27.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.26.0...2.27.0) (2026-04-29)
4
32
 
5
33
  ### Features
package/RELEASE.md CHANGED
@@ -41,7 +41,22 @@
41
41
  - ...
42
42
  -->
43
43
 
44
- ## Versione 2.26.1 (29/04/2026)
44
+ ## Versione 2.28.0 (05/05/2026)
45
+
46
+ ### Migliorie
47
+
48
+ - Sistemate le icone dei tipi di contenuto nella vista dei contenuti.
49
+ - Nella vista dei contenuti, è ora possibile mostrare/nascondere le colonne desiderate dall'apposito pulsante.
50
+
51
+ ### Novità
52
+
53
+ - Aggiunto il blocco "Contenuto da replicare" sia nella Pagina sia nei blocchi dei campi per i vari CT
54
+
55
+ ### Fix
56
+
57
+ - Sistemata l'apertura del menu di azioni su un singolo elemento nella vista dei contenuti. Ora il menu si apre solo sull'elemento cliccato ed è visibile, senza più problemi di apertura e scorrimento della pagina
58
+
59
+ ## Versione 2.27.0 (29/04/2026)
45
60
 
46
61
  ### Novità
47
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.27.0",
3
+ "version": "2.28.1",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -37,7 +37,8 @@
37
37
  "volto-venue",
38
38
  "volto-site-settings",
39
39
  "volto-rss-block",
40
- "@eeacms/volto-taxonomy"
40
+ "@eeacms/volto-taxonomy",
41
+ "volto-repeatable-content-block"
41
42
  ],
42
43
  "scripts": {
43
44
  "i18n": "rm -rf build/messages && NODE_ENV=production i18n --addon",
@@ -80,7 +81,7 @@
80
81
  "@babel/plugin-proposal-throw-expressions": "7.18.6",
81
82
  "@eeacms/volto-taxonomy": "5.1.1",
82
83
  "@loadable/babel-plugin": "5.13.2",
83
- "@plone-collective/volto-contents-next": "0.5.0",
84
+ "@plone-collective/volto-contents-next": "0.5.5",
84
85
  "@plone-collective/volto-sentry": "0.3.1",
85
86
  "@release-it/conventional-changelog": "^9.0.3",
86
87
  "bootstrap-italia": "2.9.2",
@@ -105,13 +106,14 @@
105
106
  "volto-form-block-italia": "1.1.1",
106
107
  "volto-gdpr-privacy": "2.2.15",
107
108
  "volto-querywidget-with-browser": "0.4.3",
109
+ "volto-repeatable-content-block": "1.5.0",
108
110
  "volto-rss-block": "3.0.1",
109
111
  "volto-rt-carousel": "1.0.0",
110
112
  "volto-secondarymenu": "4.1.4",
111
113
  "volto-site-settings": "0.4.7",
112
114
  "volto-slate-italia": "1.0.9",
113
- "volto-slimheader": "0.1.5",
114
- "volto-social-settings": "3.1.1",
115
+ "volto-slimheader": "0.1.6",
116
+ "volto-social-settings": "3.1.2",
115
117
  "volto-subfooter": "3.1.3",
116
118
  "volto-subsites": "4.0.2",
117
119
  "volto-venue": "4.1.1"
@@ -17,7 +17,8 @@ const messages = defineMessages({
17
17
 
18
18
  const ComeFarePerComeFare = ({ content }) => {
19
19
  const intl = useIntl();
20
- const steps = content?.items?.filter((item) => item['@type'] === 'Step') ?? [];
20
+ const steps =
21
+ content?.items?.filter((item) => item['@type'] === 'Step') ?? [];
21
22
 
22
23
  return richTextHasContent(content?.come_fare) || steps.length > 0 ? (
23
24
  <RichTextSection
@@ -31,7 +32,7 @@ const ComeFarePerComeFare = ({ content }) => {
31
32
  </div>
32
33
  </div>
33
34
  )}
34
- <Steps content={content} steps={steps} />
35
+ <Steps content={content} />
35
36
  </RichTextSection>
36
37
  ) : (
37
38
  <></>
@@ -41,6 +42,5 @@ const ComeFarePerComeFare = ({ content }) => {
41
42
  export default ComeFarePerComeFare;
42
43
 
43
44
  ComeFarePerComeFare.propTypes = {
44
- content: PropTypes.shape({
45
- }).isRequired,
45
+ content: PropTypes.shape({}).isRequired,
46
46
  };
@@ -48,9 +48,8 @@ const ComeFarePerSchemaOrg = ({ content }) => {
48
48
  );
49
49
  }
50
50
 
51
- if (steps.length > 0 && Object.keys(loadedSteps).length === steps.length) {
52
- schemaOrg.step = Object.keys(loadedSteps).map((id, index) => {
53
- const step = loadedSteps[id];
51
+ if (loadedSteps.length > 0 && loadedSteps.length == steps.length) {
52
+ schemaOrg.step = loadedSteps.map((step, index) => {
54
53
  const stepSchemaOrg = {
55
54
  '@type': 'HowToStep',
56
55
  position: index + 1,
@@ -60,18 +60,20 @@ const messages = defineMessages({
60
60
  * @params {object} content Content object.
61
61
  * @returns {string} Markup of the component.
62
62
  */
63
- const Steps = ({ content, steps = [] }) => {
63
+ const Steps = ({ content }) => {
64
64
  const intl = useIntl();
65
65
  const [activeItem, setActiveItem] = useState('');
66
66
  const [allOpen, setAllOpen] = useState(false);
67
67
 
68
+ const steps =
69
+ content?.items?.filter((item) => item['@type'] === 'Step') ?? [];
70
+ const { loadedSteps } = useLoadSteps(steps);
71
+
68
72
  useEffect(() => {
69
73
  setActiveItem('');
70
74
  }, [allOpen]);
71
75
 
72
- const { loadedSteps } = useLoadSteps(steps);
73
-
74
- return steps.length > 0 ? (
76
+ return loadedSteps.length > 0 && loadedSteps.length == steps.length ? (
75
77
  <div className="steps">
76
78
  <Button
77
79
  color="link"
@@ -92,8 +94,7 @@ const Steps = ({ content, steps = [] }) => {
92
94
  />
93
95
  </Button>
94
96
  <Accordion background="active">
95
- {steps.map((s, index) => {
96
- const step = loadedSteps[s['@id']] ?? s;
97
+ {loadedSteps.map((step, index) => {
97
98
  const itemIndex = index + 1;
98
99
  const toggleItem = () => {
99
100
  setActiveItem(activeItem !== itemIndex ? itemIndex : '');
@@ -191,7 +192,9 @@ const Steps = ({ content, steps = [] }) => {
191
192
  })}
192
193
  </Accordion>
193
194
  </div>
194
- ) : null;
195
+ ) : (
196
+ <></>
197
+ );
195
198
  };
196
199
 
197
200
  /**
@@ -6,13 +6,14 @@ import { getContent, resetContent } from '@plone/volto/actions/content/content';
6
6
  export const useLoadSteps = (steps = []) => {
7
7
  const dispatch = useDispatch();
8
8
  const subrequests = useSelector((state) => state.content?.subrequests);
9
- const [loadedSteps, setLoadedSteps] = useState({});
9
+ const [loadedSteps, setLoadedSteps] = useState([]);
10
10
 
11
11
  // one request is made for every step
12
12
  useEffect(() => {
13
- steps.forEach((item) => {
14
- const url = flattenToAppURL(item['@id']);
15
- const subrequest_id = item['@id'];
13
+ steps.forEach((step) => {
14
+ const url = flattenToAppURL(step['@id']);
15
+ const subrequest_id = step['@id'];
16
+
16
17
  const requested =
17
18
  subrequests?.[subrequest_id]?.loading ||
18
19
  subrequests?.[subrequest_id]?.loaded;
@@ -34,7 +35,10 @@ export const useLoadSteps = (steps = []) => {
34
35
  const subrequest_id = item['@id'];
35
36
  const step = subrequests?.[subrequest_id]?.data;
36
37
  if (subrequests?.[subrequest_id]?.loaded && step) {
37
- setLoadedSteps({ ...loadedSteps, [item['@id']]: step });
38
+ setLoadedSteps((prevLoadedSteps) => [
39
+ ...prevLoadedSteps.filter((s) => s['@id'] !== step['@id']),
40
+ step,
41
+ ]);
38
42
  }
39
43
  });
40
44
  }, [subrequests]);
@@ -19,6 +19,7 @@ import {
19
19
  RelatedItems,
20
20
  Metadata,
21
21
  Placeholder,
22
+ RelatedItemInEvidence,
22
23
  } from 'io-sanita-theme/components/View/commons';
23
24
 
24
25
  import { TextOrBlocks, useDebouncedEffect } from 'io-sanita-theme/helpers';
@@ -175,8 +176,8 @@ const FaqFolderView = ({ content }) => {
175
176
  <RelatedItems content={content} list={content?.servizi_collegati ?? []} />
176
177
 
177
178
  <RelatedItemInEvidence content={content} />
178
-
179
- <Placeholder position="afterRelatedItems" content={content} />
179
+
180
+ <Placeholder position="afterRelatedItems" content={content} />
180
181
  </>
181
182
  );
182
183
  };
@@ -19,6 +19,9 @@ const TertiaryMenu = ({ mobile = false }) => {
19
19
  const pathname = useLocation().pathname;
20
20
  const dispatch = useDispatch();
21
21
 
22
+ const slimHeaderLoading = useSelector(
23
+ (state) => state.slimHeader?.loadingResults,
24
+ );
22
25
  const slimHeader = useSelector((state) => state.slimHeader?.result);
23
26
  const slimHeaderItems = getItemsByPath(slimHeader, pathname)
24
27
  ?.filter((item) => item.visible)
@@ -31,8 +34,10 @@ const TertiaryMenu = ({ mobile = false }) => {
31
34
  });
32
35
 
33
36
  useEffect(() => {
34
- dispatch(getSlimHeader());
35
- }, [dispatch]);
37
+ if (!slimHeader && !slimHeaderLoading) {
38
+ dispatch(getSlimHeader());
39
+ }
40
+ }, []);
36
41
 
37
42
  const items = slimHeaderItems ?? [];
38
43
 
@@ -390,6 +390,7 @@ export const applyIoSanitaBlocksConfig = (config) => {
390
390
  'testo_riquadro_immagine',
391
391
  'callout_block',
392
392
  'rssBlock',
393
+ 'repeatableContentBlock',
393
394
  //se si aggiunge un nuovo blocco, verificare che in edit non ci siano bottoni che provocano il submit della form. Se succede, gestirli con e.prevenDefault() e.stopPropagation().
394
395
  ],
395
396
 
@@ -26,6 +26,13 @@ import faCogSVG from 'io-sanita-theme/icons/cog.svg';
26
26
  import faSitemapSVG from 'io-sanita-theme/icons/sitemap.svg';
27
27
  import faBuildingSVG from 'io-sanita-theme/icons/building.svg';
28
28
  import faAslSVG from 'io-sanita-theme/icons/ASL.svg';
29
+ import faCircleDotSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/circle-dot.svg';
30
+ import faListCheckSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/list-check.svg';
31
+ import faClipboardQuestionSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/clipboard-question.svg';
32
+ import faClipboardListSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/clipboard-list.svg';
33
+ import faFileContractSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/file-contract.svg';
34
+ import faHouseMedicalFlagSVG from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/house-medical-flag.svg';
35
+ import faAddressBook from 'io-sanita-theme/icons/fontawesome-free-6.4.0-web/svgs/solid/address-book.svg';
29
36
  import faFileDownloadSVG from 'io-sanita-theme/icons/file-download.svg';
30
37
  import faQuestionSVG from 'io-sanita-theme/icons/question-solid.svg';
31
38
  import bandoSVG from 'io-sanita-theme/icons/bando.svg';
@@ -154,6 +161,12 @@ export default function applyConfig(config) {
154
161
  UnitaOrganizzativa: faBuildingSVG,
155
162
  Modulo: faFileDownloadSVG,
156
163
  Faq: faQuestionSVG,
164
+ Step: faCircleDotSVG,
165
+ ComeFarePer: faListCheckSVG,
166
+ FaqFolder: faClipboardQuestionSVG,
167
+ Farmacia: faHouseMedicalFlagSVG,
168
+ PuntoDiContatto: faAddressBook,
169
+ survey: faClipboardListSVG,
157
170
  },
158
171
  controlpanels: [
159
172
  ...(config.settings.controlpanels ?? []),
@@ -0,0 +1,57 @@
1
+ .view-viewview #main-content-section .repeatableContentBlock {
2
+ * {
3
+ word-break: break-all;
4
+ font-family: 'Titillium Web';
5
+ font-size: 14px;
6
+
7
+ }
8
+
9
+ .full-width {
10
+ width: 100% !important;
11
+ position: unset !important;
12
+ margin: 0px !important;
13
+ }
14
+ }
15
+
16
+
17
+ .view-editview .blocks-widget-container .block-editor-repeatableContentBlock .repeatableContentBlock {
18
+
19
+ * {
20
+ font-size: 12px !important;
21
+
22
+ }
23
+
24
+ .full-width,
25
+ .block.image.align.full img.full-width {
26
+ width: 100% !important;
27
+ position: unset !important;
28
+ margin: 0px !important;
29
+ max-width: 100%;
30
+
31
+ }
32
+
33
+ .full-width {
34
+ .container {
35
+ max-width: 100%;
36
+ width: 100% !important;
37
+ }
38
+
39
+ .row {
40
+ margin: 0px;
41
+ }
42
+ }
43
+
44
+ .col-sm-12 {
45
+ padding-left: 0px;
46
+ padding-right: 0px;
47
+ }
48
+
49
+ ::before {
50
+ height: 40px;
51
+ top: -1.5rem;
52
+ }
53
+ }
54
+
55
+ #main-content-section .repeatableContentBlock .public-ui .full-width .col-lg-4 {
56
+ width: 70%;
57
+ }
@@ -27,6 +27,7 @@
27
27
  @import './io-sanita/components/cards';
28
28
  @import './io-sanita/components/mapPinDirections';
29
29
  @import './io-sanita/components/view/commons/pageHeader';
30
+ @import './io-sanita/addons/volto_repeatable-content-block';
30
31
  @import './io-sanita/components/relatedItemInEvidence';
31
32
 
32
33
  @import './io-sanita/components/blocks/common';