io-sanita-theme 2.10.0 → 2.11.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 (32) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/RELEASE.md +6 -0
  3. package/locales/de/LC_MESSAGES/volto.po +40 -0
  4. package/locales/en/LC_MESSAGES/volto.po +40 -0
  5. package/locales/es/LC_MESSAGES/volto.po +40 -0
  6. package/locales/fr/LC_MESSAGES/volto.po +40 -0
  7. package/locales/it/LC_MESSAGES/volto.po +40 -0
  8. package/locales/volto.pot +41 -1
  9. package/package.json +1 -1
  10. package/src/actions/ctSchema.js +13 -0
  11. package/src/actions/index.js +3 -0
  12. package/src/components/Blocks/Accordion/Container.jsx +1 -1
  13. package/src/components/Blocks/Listing/AttachmentCard/AttachmentCardTemplate.jsx +0 -2
  14. package/src/components/Blocks/Listing/Skeletons/TableTemplateSkeleton.jsx +53 -0
  15. package/src/components/Blocks/Listing/Table/TableTemplate.jsx +162 -0
  16. package/src/components/Blocks/Listing/Table/table-templates.scss +41 -0
  17. package/src/components/Blocks/index.js +3 -2
  18. package/src/components/View/Widgets/BlocksViewWidget.jsx +7 -0
  19. package/src/components/View/Widgets/ParliamoDiWidgetView.jsx +26 -0
  20. package/src/components/manage/Widgets/CTFieldsWidget/CTFieldsWidget.jsx +84 -0
  21. package/src/components/manage/Widgets/CTTitleColumnWidget/CTTitleColumnWidget.jsx +22 -0
  22. package/src/config/blocks/listing/ListingOptions/index.js +1 -0
  23. package/src/config/blocks/listing/ListingOptions/tableTemplate.js +105 -0
  24. package/src/config/blocks/listing/listingVariations.js +20 -3
  25. package/src/config/widgets/widgets.js +30 -0
  26. package/src/customizations/volto/components/manage/Blocks/Listing/ListingBody.jsx +6 -6
  27. package/src/reducers/ctSchema.js +80 -0
  28. package/src/reducers/index.js +2 -0
  29. package/src/theme/_bootstrap-italia.scss +1 -0
  30. package/src/theme/_variables.scss +1 -1
  31. package/src/theme/bootstrap-italia/custom/_tables.scss +1 -0
  32. package/src/theme/io-sanita/components/blocks/_skeleton.scss +5 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.11.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.10.0...2.11.0) (2025-03-25)
4
+
5
+ ### Features
6
+
7
+ * Table listing template ([#75](https://github.com/RedTurtle/io-sanita-theme/issues/75)) ([9f478e2](https://github.com/RedTurtle/io-sanita-theme/commit/9f478e248761f6becf40660da4b66bf64b3796e3))
8
+
3
9
  ## [2.10.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.9.1...2.10.0) (2025-03-24)
4
10
 
5
11
  ### Features
package/RELEASE.md CHANGED
@@ -41,6 +41,12 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 2.11.0 (25/03/2025)
45
+
46
+ ### Novità
47
+
48
+ - Aggiunto il template 'tabella' del blocco elenco in cui è possibile selezionare quali colonne dei content-type mostrare
49
+
44
50
  ## Versione 2.10.0 (24/03/2025)
45
51
 
46
52
  ### Novità
@@ -3952,6 +3952,46 @@ msgstr ""
3952
3952
  msgid "successivo"
3953
3953
  msgstr ""
3954
3954
 
3955
+ #. Default: "Colore delle righe alternato"
3956
+ #: config/blocks/listing/ListingOptions/tableTemplate
3957
+ msgid "table_variation_alternate_rows"
3958
+ msgstr ""
3959
+
3960
+ #. Default: "Colonne della tabella"
3961
+ #: config/blocks/listing/ListingOptions/tableTemplate
3962
+ msgid "table_variation_columns"
3963
+ msgstr ""
3964
+
3965
+ #. Default: "Colonna"
3966
+ #: config/blocks/listing/ListingOptions/tableTemplate
3967
+ msgid "table_variaton_column"
3968
+ msgstr ""
3969
+
3970
+ #. Default: "Tipo di contenuto"
3971
+ #: config/blocks/listing/ListingOptions/tableTemplate
3972
+ msgid "table_variaton_ct"
3973
+ msgstr ""
3974
+
3975
+ #. Default: "Campo"
3976
+ #: config/blocks/listing/ListingOptions/tableTemplate
3977
+ msgid "table_variaton_field"
3978
+ msgstr ""
3979
+
3980
+ #. Default: "Titolo"
3981
+ #: config/blocks/listing/ListingOptions/tableTemplate
3982
+ msgid "table_variaton_title"
3983
+ msgstr ""
3984
+
3985
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3986
+ #: config/blocks/listing/ListingOptions/tableTemplate
3987
+ msgid "table_variaton_title_description"
3988
+ msgstr ""
3989
+
3990
+ #. Default: "Titolo"
3991
+ #: components/Blocks/Listing/Table/TableTemplate
3992
+ msgid "tabletemplate_column_title"
3993
+ msgstr ""
3994
+
3955
3995
  #. Default: "Telefono"
3956
3996
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3957
3997
  msgid "telefono"
@@ -3947,6 +3947,46 @@ msgstr "Operating unit"
3947
3947
  msgid "successivo"
3948
3948
  msgstr "Next"
3949
3949
 
3950
+ #. Default: "Colore delle righe alternato"
3951
+ #: config/blocks/listing/ListingOptions/tableTemplate
3952
+ msgid "table_variation_alternate_rows"
3953
+ msgstr ""
3954
+
3955
+ #. Default: "Colonne della tabella"
3956
+ #: config/blocks/listing/ListingOptions/tableTemplate
3957
+ msgid "table_variation_columns"
3958
+ msgstr ""
3959
+
3960
+ #. Default: "Colonna"
3961
+ #: config/blocks/listing/ListingOptions/tableTemplate
3962
+ msgid "table_variaton_column"
3963
+ msgstr ""
3964
+
3965
+ #. Default: "Tipo di contenuto"
3966
+ #: config/blocks/listing/ListingOptions/tableTemplate
3967
+ msgid "table_variaton_ct"
3968
+ msgstr ""
3969
+
3970
+ #. Default: "Campo"
3971
+ #: config/blocks/listing/ListingOptions/tableTemplate
3972
+ msgid "table_variaton_field"
3973
+ msgstr ""
3974
+
3975
+ #. Default: "Titolo"
3976
+ #: config/blocks/listing/ListingOptions/tableTemplate
3977
+ msgid "table_variaton_title"
3978
+ msgstr ""
3979
+
3980
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3981
+ #: config/blocks/listing/ListingOptions/tableTemplate
3982
+ msgid "table_variaton_title_description"
3983
+ msgstr ""
3984
+
3985
+ #. Default: "Titolo"
3986
+ #: components/Blocks/Listing/Table/TableTemplate
3987
+ msgid "tabletemplate_column_title"
3988
+ msgstr ""
3989
+
3950
3990
  #. Default: "Telefono"
3951
3991
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3952
3992
  msgid "telefono"
@@ -3954,6 +3954,46 @@ msgstr ""
3954
3954
  msgid "successivo"
3955
3955
  msgstr ""
3956
3956
 
3957
+ #. Default: "Colore delle righe alternato"
3958
+ #: config/blocks/listing/ListingOptions/tableTemplate
3959
+ msgid "table_variation_alternate_rows"
3960
+ msgstr ""
3961
+
3962
+ #. Default: "Colonne della tabella"
3963
+ #: config/blocks/listing/ListingOptions/tableTemplate
3964
+ msgid "table_variation_columns"
3965
+ msgstr ""
3966
+
3967
+ #. Default: "Colonna"
3968
+ #: config/blocks/listing/ListingOptions/tableTemplate
3969
+ msgid "table_variaton_column"
3970
+ msgstr ""
3971
+
3972
+ #. Default: "Tipo di contenuto"
3973
+ #: config/blocks/listing/ListingOptions/tableTemplate
3974
+ msgid "table_variaton_ct"
3975
+ msgstr ""
3976
+
3977
+ #. Default: "Campo"
3978
+ #: config/blocks/listing/ListingOptions/tableTemplate
3979
+ msgid "table_variaton_field"
3980
+ msgstr ""
3981
+
3982
+ #. Default: "Titolo"
3983
+ #: config/blocks/listing/ListingOptions/tableTemplate
3984
+ msgid "table_variaton_title"
3985
+ msgstr ""
3986
+
3987
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3988
+ #: config/blocks/listing/ListingOptions/tableTemplate
3989
+ msgid "table_variaton_title_description"
3990
+ msgstr ""
3991
+
3992
+ #. Default: "Titolo"
3993
+ #: components/Blocks/Listing/Table/TableTemplate
3994
+ msgid "tabletemplate_column_title"
3995
+ msgstr ""
3996
+
3957
3997
  #. Default: "Telefono"
3958
3998
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3959
3999
  msgid "telefono"
@@ -3954,6 +3954,46 @@ msgstr ""
3954
3954
  msgid "successivo"
3955
3955
  msgstr ""
3956
3956
 
3957
+ #. Default: "Colore delle righe alternato"
3958
+ #: config/blocks/listing/ListingOptions/tableTemplate
3959
+ msgid "table_variation_alternate_rows"
3960
+ msgstr ""
3961
+
3962
+ #. Default: "Colonne della tabella"
3963
+ #: config/blocks/listing/ListingOptions/tableTemplate
3964
+ msgid "table_variation_columns"
3965
+ msgstr ""
3966
+
3967
+ #. Default: "Colonna"
3968
+ #: config/blocks/listing/ListingOptions/tableTemplate
3969
+ msgid "table_variaton_column"
3970
+ msgstr ""
3971
+
3972
+ #. Default: "Tipo di contenuto"
3973
+ #: config/blocks/listing/ListingOptions/tableTemplate
3974
+ msgid "table_variaton_ct"
3975
+ msgstr ""
3976
+
3977
+ #. Default: "Campo"
3978
+ #: config/blocks/listing/ListingOptions/tableTemplate
3979
+ msgid "table_variaton_field"
3980
+ msgstr ""
3981
+
3982
+ #. Default: "Titolo"
3983
+ #: config/blocks/listing/ListingOptions/tableTemplate
3984
+ msgid "table_variaton_title"
3985
+ msgstr ""
3986
+
3987
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3988
+ #: config/blocks/listing/ListingOptions/tableTemplate
3989
+ msgid "table_variaton_title_description"
3990
+ msgstr ""
3991
+
3992
+ #. Default: "Titolo"
3993
+ #: components/Blocks/Listing/Table/TableTemplate
3994
+ msgid "tabletemplate_column_title"
3995
+ msgstr ""
3996
+
3957
3997
  #. Default: "Telefono"
3958
3998
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3959
3999
  msgid "telefono"
@@ -3947,6 +3947,46 @@ msgstr ""
3947
3947
  msgid "successivo"
3948
3948
  msgstr ""
3949
3949
 
3950
+ #. Default: "Colore delle righe alternato"
3951
+ #: config/blocks/listing/ListingOptions/tableTemplate
3952
+ msgid "table_variation_alternate_rows"
3953
+ msgstr ""
3954
+
3955
+ #. Default: "Colonne della tabella"
3956
+ #: config/blocks/listing/ListingOptions/tableTemplate
3957
+ msgid "table_variation_columns"
3958
+ msgstr ""
3959
+
3960
+ #. Default: "Colonna"
3961
+ #: config/blocks/listing/ListingOptions/tableTemplate
3962
+ msgid "table_variaton_column"
3963
+ msgstr ""
3964
+
3965
+ #. Default: "Tipo di contenuto"
3966
+ #: config/blocks/listing/ListingOptions/tableTemplate
3967
+ msgid "table_variaton_ct"
3968
+ msgstr ""
3969
+
3970
+ #. Default: "Campo"
3971
+ #: config/blocks/listing/ListingOptions/tableTemplate
3972
+ msgid "table_variaton_field"
3973
+ msgstr ""
3974
+
3975
+ #. Default: "Titolo"
3976
+ #: config/blocks/listing/ListingOptions/tableTemplate
3977
+ msgid "table_variaton_title"
3978
+ msgstr ""
3979
+
3980
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3981
+ #: config/blocks/listing/ListingOptions/tableTemplate
3982
+ msgid "table_variaton_title_description"
3983
+ msgstr ""
3984
+
3985
+ #. Default: "Titolo"
3986
+ #: components/Blocks/Listing/Table/TableTemplate
3987
+ msgid "tabletemplate_column_title"
3988
+ msgstr ""
3989
+
3950
3990
  #. Default: "Telefono"
3951
3991
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3952
3992
  msgid "telefono"
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-03-24T09:51:21.877Z\n"
4
+ "POT-Creation-Date: 2025-03-25T11:31:34.827Z\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"
@@ -3949,6 +3949,46 @@ msgstr ""
3949
3949
  msgid "successivo"
3950
3950
  msgstr ""
3951
3951
 
3952
+ #. Default: "Colore delle righe alternato"
3953
+ #: config/blocks/listing/ListingOptions/tableTemplate
3954
+ msgid "table_variation_alternate_rows"
3955
+ msgstr ""
3956
+
3957
+ #. Default: "Colonne della tabella"
3958
+ #: config/blocks/listing/ListingOptions/tableTemplate
3959
+ msgid "table_variation_columns"
3960
+ msgstr ""
3961
+
3962
+ #. Default: "Colonna"
3963
+ #: config/blocks/listing/ListingOptions/tableTemplate
3964
+ msgid "table_variaton_column"
3965
+ msgstr ""
3966
+
3967
+ #. Default: "Tipo di contenuto"
3968
+ #: config/blocks/listing/ListingOptions/tableTemplate
3969
+ msgid "table_variaton_ct"
3970
+ msgstr ""
3971
+
3972
+ #. Default: "Campo"
3973
+ #: config/blocks/listing/ListingOptions/tableTemplate
3974
+ msgid "table_variaton_field"
3975
+ msgstr ""
3976
+
3977
+ #. Default: "Titolo"
3978
+ #: config/blocks/listing/ListingOptions/tableTemplate
3979
+ msgid "table_variaton_title"
3980
+ msgstr ""
3981
+
3982
+ #. Default: "Titolo della colonna. Se vuoi, puoi modificare il titolo di default."
3983
+ #: config/blocks/listing/ListingOptions/tableTemplate
3984
+ msgid "table_variaton_title_description"
3985
+ msgstr ""
3986
+
3987
+ #. Default: "Titolo"
3988
+ #: components/Blocks/Listing/Table/TableTemplate
3989
+ msgid "tabletemplate_column_title"
3990
+ msgstr ""
3991
+
3952
3992
  #. Default: "Telefono"
3953
3993
  #: components/View/PuntoDiContatto/PuntoDiContattoContatti
3954
3994
  msgid "telefono"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -0,0 +1,13 @@
1
+ export const GET_CT_SCHEMA = 'GET_CT_SCHEMA';
2
+
3
+ export function getCTSchema(type, url) {
4
+ url = typeof url !== 'undefined' ? url : '';
5
+ return {
6
+ type: GET_CT_SCHEMA,
7
+ subrequest: type,
8
+ request: {
9
+ op: 'get',
10
+ path: `${url}/@types/${type}`,
11
+ },
12
+ };
13
+ }
@@ -19,6 +19,7 @@ import {
19
19
  getTassonomieSearch,
20
20
  GET_TASSONOMIE_SEARCH,
21
21
  } from './search';
22
+ import { getCTSchema, GET_CT_SCHEMA } from './ctSchema';
22
23
 
23
24
  import { getFarmacia, GET_FARMACIA } from './getFarmacia';
24
25
  import {
@@ -57,4 +58,6 @@ export {
57
58
  RESET_QUERYSTRING_RESULTS,
58
59
  getSearchBandiFilters,
59
60
  GET_SEARCH_BANDI_FILTERS,
61
+ getCTSchema,
62
+ GET_CT_SCHEMA,
60
63
  };
@@ -5,7 +5,7 @@ import { TextBlockView } from '@plone/volto-slate/blocks/Text';
5
5
  const AccordionContainer = ({ data, headerChildren, children }) => {
6
6
  return data.show_block_bg ? (
7
7
  <div className="public-ui">
8
- <div className="full-width section section-muted section-inset-shadow py-5">
8
+ <div className="full-width section section-muted section-inset-shadow py-5 mb-4">
9
9
  <Container className="px-md-4">
10
10
  <Card className="card-bg rounded no-after" noWrapper={false}>
11
11
  {(data.title || data.description || headerChildren) && (
@@ -7,8 +7,6 @@ import { ListingContainer } from 'io-sanita-theme/components/Blocks';
7
7
  import { LinkMore } from 'io-sanita-theme/components';
8
8
  import { CardFile } from 'io-sanita-theme/components';
9
9
 
10
- import AttachmentCardTemplateSkeleton from '../Skeletons/AttachmentCardTemplateSkeleton';
11
-
12
10
  const AttachmentCardTemplate = (props) => {
13
11
  const {
14
12
  items,
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
4
+ import { Row, Col, Table } from 'design-react-kit';
5
+ import { ListingContainer } from 'io-sanita-theme/components/Blocks';
6
+
7
+ const SimpleListTemplateSkeleton = (props) => {
8
+ const { isEditMode, title, linkHref, show_block_bg, show_pointer_list } =
9
+ props;
10
+ return (
11
+ <div className="table-skeleton-template">
12
+ <ListingContainer data={props} isEditMode={isEditMode}>
13
+ <div className="skeleton-template">
14
+ {title && (
15
+ <Row>
16
+ <Col>
17
+ <h2 className="mb-4">{title}</h2>
18
+ </Col>
19
+ </Row>
20
+ )}
21
+
22
+ <Table size="sm" responsive bordered>
23
+ <thead>
24
+ <tr>
25
+ {[0, 1, 2, 3, 4].map((i) => (
26
+ <th scope="col" key={i}></th>
27
+ ))}
28
+ </tr>
29
+ </thead>
30
+ <tbody>
31
+ {[0, 1, 2, 3, 4, 5, 6].map((i) => (
32
+ <tr key={i}>
33
+ {[0, 1, 2, 3, 4].map((i) => (
34
+ <td scope="col" key={i}></td>
35
+ ))}
36
+ </tr>
37
+ ))}
38
+ </tbody>
39
+ </Table>
40
+ {linkHref && <div className="link-button text-center my-5"></div>}
41
+ </div>
42
+ </ListingContainer>
43
+ </div>
44
+ );
45
+ };
46
+
47
+ SimpleListTemplateSkeleton.propTypes = {
48
+ linkHref: PropTypes.any,
49
+ isEditMode: PropTypes.bool,
50
+ title: PropTypes.string,
51
+ };
52
+
53
+ export default SimpleListTemplateSkeleton;
@@ -0,0 +1,162 @@
1
+ /*
2
+ * Template a tabella
3
+ */
4
+ import React, { useEffect } from 'react';
5
+ import cx from 'classnames';
6
+ import PropTypes from 'prop-types';
7
+ import { useDispatch, useSelector } from 'react-redux';
8
+ import { useIntl, defineMessages } from 'react-intl';
9
+ import { getCTSchema } from 'io-sanita-theme/actions';
10
+ import { Row, Col, Table } from 'design-react-kit';
11
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
12
+
13
+ import {
14
+ ListingImage,
15
+ ListingContainer,
16
+ } from 'io-sanita-theme/components/Blocks';
17
+ import { LinkMore } from 'io-sanita-theme/components';
18
+ import { getWidget } from '@plone/volto/helpers/Widget/utils';
19
+
20
+ import config from '@plone/volto/registry';
21
+ import './table-templates.scss';
22
+
23
+ const messages = defineMessages({
24
+ title: { id: 'tabletemplate_column_title', defaultMessage: 'Titolo' },
25
+ });
26
+
27
+ const TableTemplate = (props) => {
28
+ const {
29
+ columns,
30
+ alternate_rows,
31
+ items,
32
+ isEditMode,
33
+ linkAlign,
34
+ linkTitle,
35
+ linkHref,
36
+ linkmore_id_lighthouse,
37
+ } = props;
38
+
39
+ const intl = useIntl();
40
+ const dispatch = useDispatch();
41
+ const { views } = config.widgets;
42
+ const ct_schemas = useSelector((state) => state.ct_schema?.subrequests);
43
+
44
+ useEffect(() => {
45
+ (columns ?? []).forEach((c) => {
46
+ if (!ct_schemas[c.ct]) {
47
+ dispatch(getCTSchema(c.ct));
48
+ }
49
+ });
50
+ }, [columns]);
51
+
52
+ let render_columns =
53
+ (columns ?? []).filter((c) => c.field === 'title').length > 0
54
+ ? columns
55
+ : [
56
+ { field: 'title', title: intl.formatMessage(messages.title) },
57
+ ...(columns ?? []),
58
+ ];
59
+
60
+ return (
61
+ <div className="table-template">
62
+ <ListingContainer data={props} isEditMode={isEditMode}>
63
+ <Table size="sm" responsive bordered striped={alternate_rows ?? false}>
64
+ <thead className="table-light">
65
+ <tr>
66
+ {render_columns.map((c, index) => {
67
+ const field_properties =
68
+ ct_schemas?.[c.ct]?.result?.properties?.[c.field] ?? {};
69
+
70
+ return (
71
+ <th
72
+ scope="col"
73
+ className={cx(c.ct + '-' + c.field, {
74
+ 'date-column':
75
+ field_properties.widget === 'date' ||
76
+ field_properties.widget === 'datetime',
77
+ })}
78
+ key={index}
79
+ >
80
+ {c.title}
81
+ </th>
82
+ );
83
+ })}
84
+ </tr>
85
+ </thead>
86
+ <tbody>
87
+ {items.map((item, index) => (
88
+ <tr key={index}>
89
+ {render_columns.map((c, index) => {
90
+ const field_properties =
91
+ ct_schemas?.[c.ct]?.result?.properties?.[c.field];
92
+ let render_value = JSON.stringify(item[c.field]);
93
+
94
+ if (field_properties) {
95
+ let field = {
96
+ ...field_properties,
97
+ id: c.field,
98
+ widget: getWidget(c.field, field_properties),
99
+ };
100
+
101
+ let Widget = views?.getWidget(field);
102
+
103
+ let widget_props = {};
104
+ switch (c.field) {
105
+ case 'apertura_bando':
106
+ case 'chiusura_procedimento_bando':
107
+ case 'scadenza_domande_bando':
108
+ case 'scadenza_bando':
109
+ widget_props.format = 'd MMM yyyy';
110
+ break;
111
+ default:
112
+ break;
113
+ }
114
+
115
+ if (field_properties.vocabulary) {
116
+ widget_props.vocabulary =
117
+ field_properties.vocabulary['@id'];
118
+ }
119
+ render_value = (
120
+ <Widget value={item[c.field]} {...widget_props} />
121
+ );
122
+ }
123
+ if (c.field === 'title') {
124
+ render_value = (
125
+ <UniversalLink
126
+ item={!isEditMode ? item : null}
127
+ href={isEditMode ? '#' : ''}
128
+ className="img-link"
129
+ >
130
+ {item[c.field]}
131
+ </UniversalLink>
132
+ );
133
+ }
134
+
135
+ return <td key={index}>{render_value}</td>;
136
+ })}
137
+ </tr>
138
+ ))}
139
+ </tbody>
140
+ </Table>
141
+
142
+ <LinkMore
143
+ title={linkTitle}
144
+ href={linkHref}
145
+ linkAlign={linkAlign}
146
+ className="my-4"
147
+ linkmoreIdLighthouse={linkmore_id_lighthouse}
148
+ />
149
+ </ListingContainer>
150
+ </div>
151
+ );
152
+ };
153
+
154
+ TableTemplate.propTypes = {
155
+ items: PropTypes.arrayOf(PropTypes.any).isRequired,
156
+ linkTitle: PropTypes.any,
157
+ linkHref: PropTypes.any,
158
+ isEditMode: PropTypes.bool,
159
+ title: PropTypes.string,
160
+ };
161
+
162
+ export default TableTemplate;
@@ -0,0 +1,41 @@
1
+ .table-template {
2
+ table.table {
3
+ th {
4
+ vertical-align: top;
5
+ }
6
+ td {
7
+ background-color: #fff;
8
+ }
9
+
10
+ &,
11
+ p,
12
+ ul,
13
+ ul,
14
+ li,
15
+ ol {
16
+ font-size: 0.9rem;
17
+ }
18
+
19
+ .date-column {
20
+ min-width: 6.5rem;
21
+ }
22
+
23
+ ul.relations.widget {
24
+ list-style-type: none;
25
+ padding-left: 0;
26
+ li {
27
+ a {
28
+ .icon {
29
+ display: none;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ + .pagination-wrapper {
37
+ .mt-5.pagination-wrapper {
38
+ margin-top: 0 !important;
39
+ }
40
+ }
41
+ }
@@ -84,6 +84,7 @@ export RassegnaInfo from 'io-sanita-theme/components/Blocks/Listing/commons/Rass
84
84
  export ListingContainer from 'io-sanita-theme/components/Blocks/Listing/commons/ListingContainer';
85
85
 
86
86
  /*Listing variations*/
87
+ export AttachmentCardTemplate from 'io-sanita-theme/components/Blocks/Listing/AttachmentCard/AttachmentCardTemplate';
87
88
  export BandiTemplate from 'io-sanita-theme/components/Blocks/Listing/Bandi/BandiTemplate';
88
89
  export CardWithImageTemplate from 'io-sanita-theme/components/Blocks/Listing/CardWithImage/CardWithImageTemplate';
89
90
  export CardWithSlideUpTextTemplate from 'io-sanita-theme/components/Blocks/Listing/CardWithSlideUpText/CardWithSlideUpTextTemplate';
@@ -94,9 +95,9 @@ export MapTemplate from 'io-sanita-theme/components/Blocks/Listing/Map/MapTempla
94
95
  export SimpleCardTemplate from 'io-sanita-theme/components/Blocks/Listing/SimpleCard/SimpleCardTemplate';
95
96
  export SimpleListTemplate from 'io-sanita-theme/components/Blocks/Listing/SimpleList/SimpleListTemplate';
96
97
  export SmallBlockLinksTemplate from 'io-sanita-theme/components/Blocks/Listing/SmallBlockLinks/SmallBlockLinksTemplate';
97
- export AttachmentCardTemplate from 'io-sanita-theme/components/Blocks/Listing/AttachmentCard/AttachmentCardTemplate';
98
98
 
99
99
  /*Skeleton*/
100
+ export AttachmentCardTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/AttachmentCardTemplateSkeleton';
100
101
  export BandiTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/BandiTemplateSkeleton';
101
102
  export CardWithImageTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/CardWithImageTemplateSkeleton';
102
103
  export CardWithSlideUpTextTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/CardWithSlideUpTextTemplateSkeleton';
@@ -107,7 +108,7 @@ export InEvidenceTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listin
107
108
  export MapTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/MapTemplateSkeleton';
108
109
  export SimpleListTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/SimpleListTemplateSkeleton';
109
110
  export SmallBlockLinksTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/SmallBlockLinksTemplateSkeleton';
110
- export AttachmentCardTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/AttachmentCardTemplateSkeleton';
111
+ export TableTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/Skeletons/TableTemplateSkeleton';
111
112
 
112
113
  /*Rss block (as listing)*/
113
114
  export CardWithoutImageRssTemplate from 'io-sanita-theme/components/Blocks/Rss/CardWithoutImageRssTemplate';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { RichTextRender } from 'io-sanita-theme/helpers';
3
+ const BlocksViewWidget = ({ value, children, className }) => {
4
+ return <RichTextRender data={value} add_class={className} serif={false} />;
5
+ };
6
+
7
+ export default BlocksViewWidget;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
3
+ import { AGGREGATION_PAGE_ARGOMENTO } from 'io-sanita-theme/config/ioSanitaConfig';
4
+ import { Chip, ChipLabel } from 'design-react-kit';
5
+
6
+ const ParliamoDiWidgetView = ({ value, children, className }) => {
7
+ return value?.length > 0 ? (
8
+ <div className="topics-view-widget">
9
+ {value.map((item, i) => (
10
+ <UniversalLink
11
+ href={AGGREGATION_PAGE_ARGOMENTO + item.token}
12
+ key={item.token}
13
+ className="text-decoration-none me-2 d-inline-block"
14
+ >
15
+ <Chip color="accent" simple>
16
+ <ChipLabel>{item.title}</ChipLabel>
17
+ </Chip>
18
+ </UniversalLink>
19
+ ))}
20
+ </div>
21
+ ) : (
22
+ ''
23
+ );
24
+ };
25
+
26
+ export default ParliamoDiWidgetView;
@@ -0,0 +1,84 @@
1
+ import React, { useEffect } from 'react';
2
+ import { defineMessages, useIntl } from 'react-intl';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
+ import { getCTSchema } from 'io-sanita-theme/actions';
5
+ import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
6
+ import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
7
+ import { normalizeValue } from '@plone/volto/components/manage/Widgets/SelectUtils';
8
+
9
+ import {
10
+ Option,
11
+ DropdownIndicator,
12
+ selectTheme,
13
+ customSelectStyles,
14
+ } from '@plone/volto/components/manage/Widgets/SelectStyling';
15
+
16
+ const CTFieldsWidget = ({ ct, reactSelect, value, ...props }) => {
17
+ const intl = useIntl();
18
+ const dispatch = useDispatch();
19
+ const Select = reactSelect.default;
20
+ const exclude_fieldsets = ['ownership', 'seo', 'settings'];
21
+ const ct_schema = useSelector(
22
+ (state) => state.ct_schema?.subrequests?.[ct]?.result,
23
+ );
24
+
25
+ useEffect(() => {
26
+ if (!ct_schema) {
27
+ dispatch(getCTSchema(ct));
28
+ }
29
+ }, [ct]);
30
+
31
+ const groups_choices =
32
+ ct_schema?.fieldsets
33
+ ?.filter((fieldset) => exclude_fieldsets.indexOf(fieldset.id) < 0)
34
+ .map((fieldset) => {
35
+ return {
36
+ label: fieldset.title,
37
+ options: fieldset.fields.map((f) => {
38
+ return {
39
+ value: f,
40
+ label: ct_schema.properties[f].title,
41
+ };
42
+ }),
43
+ };
44
+ }) ?? [];
45
+
46
+ const disabled = props.disabled || props.isDisabled;
47
+ const normalizedValue = normalizeValue(
48
+ groups_choices.reduce((acc, fieldset) => {
49
+ return [...acc, ...fieldset.options];
50
+ }, []),
51
+ value,
52
+ intl,
53
+ );
54
+
55
+ return groups_choices?.length > 0 ? (
56
+ <FormFieldWrapper {...props}>
57
+ <Select
58
+ id={`field-${props.id}`}
59
+ name={props.id}
60
+ disabled={disabled}
61
+ className="react-select-container"
62
+ classNamePrefix="react-select"
63
+ placeholder={props.placeholder ?? 'Seleziona un valore'}
64
+ options={groups_choices}
65
+ styles={customSelectStyles}
66
+ theme={selectTheme}
67
+ components={{ DropdownIndicator, Option }}
68
+ value={normalizedValue}
69
+ onChange={(selectedOption) => {
70
+ props.onChange(
71
+ props.id,
72
+ selectedOption && selectedOption.value !== 'no-value'
73
+ ? selectedOption.value
74
+ : undefined,
75
+ );
76
+ }}
77
+ />
78
+ </FormFieldWrapper>
79
+ ) : (
80
+ <></>
81
+ );
82
+ };
83
+
84
+ export default injectLazyLibs('reactSelect')(CTFieldsWidget);
@@ -0,0 +1,22 @@
1
+ import React, { useEffect } from 'react';
2
+ import { useSelector } from 'react-redux';
3
+ import { TextWidget } from '@plone/volto/components';
4
+
5
+ const CTTitleColumnWidget = (props) => {
6
+ const { onChange, id } = props;
7
+ const { ct, field } = props.objectvalue;
8
+ const ct_schema = useSelector(
9
+ (state) => state.ct_schema?.subrequests?.[ct]?.result,
10
+ );
11
+
12
+ useEffect(() => {
13
+ const field_label = ct_schema?.properties?.[field]?.title;
14
+ if (field_label) {
15
+ onChange(id, field_label);
16
+ }
17
+ }, [field]);
18
+
19
+ return <TextWidget {...props} className="text" />;
20
+ };
21
+
22
+ export default CTTitleColumnWidget;
@@ -27,3 +27,4 @@ export { addPhotogalleryTemplateOptions } from 'io-sanita-theme/config/blocks/li
27
27
  export { addSmallBlockLinksTemplateOptions } from 'io-sanita-theme/config/blocks/listing/ListingOptions/smallBlockLinksTemplate';
28
28
  export { addAttachmentCardTemplateOptions } from 'io-sanita-theme/config/blocks/listing/ListingOptions/attachmentCardTemplate';
29
29
  export { addCarouselTemplateOptions } from 'io-sanita-theme/config/blocks/listing/ListingOptions/carouselTemplate';
30
+ export { addTableTemplateOptions } from 'io-sanita-theme/config/blocks/listing/ListingOptions/tableTemplate';
@@ -0,0 +1,105 @@
1
+ import { defineMessages } from 'react-intl';
2
+ import cloneDeep from 'lodash/cloneDeep';
3
+
4
+ import { addSchemaField } from 'io-sanita-theme/config/blocks/listing/ListingOptions';
5
+
6
+ const messages = defineMessages({
7
+ columns: {
8
+ id: 'table_variation_columns',
9
+ defaultMessage: 'Colonne della tabella',
10
+ },
11
+ alternate_rows: {
12
+ id: 'table_variation_alternate_rows',
13
+ defaultMessage: 'Colore delle righe alternato',
14
+ },
15
+ column: {
16
+ id: 'table_variaton_column',
17
+ defaultMessage: 'Colonna',
18
+ },
19
+ ct: { id: 'table_variaton_ct', defaultMessage: 'Tipo di contenuto' },
20
+ field: { id: 'table_variaton_field', defaultMessage: 'Campo' },
21
+ title: {
22
+ id: 'table_variaton_title',
23
+ defaultMessage: 'Titolo',
24
+ },
25
+ title_description: {
26
+ id: 'table_variaton_title_description',
27
+ defaultMessage:
28
+ 'Titolo della colonna. Se vuoi, puoi modificare il titolo di default.',
29
+ },
30
+ //sortable: { id: 'table_variaton_sortable', defaultMessage: 'Ordinabile' },
31
+ });
32
+
33
+ const ColumnSchema = ({ intl }) => ({
34
+ title: intl.formatMessage(messages.column),
35
+ fieldsets: [
36
+ {
37
+ id: 'default',
38
+ title: 'Default',
39
+ fields: ['ct' /*'field', 'title', 'sortable'*/], //questi campi commentati vengono aggiunti solo quando è valorizzato il campo ct
40
+ },
41
+ ],
42
+ properties: {
43
+ ct: {
44
+ title: intl.formatMessage(messages.ct),
45
+ vocabulary: {
46
+ '@id': 'plone.app.vocabularies.ReallyUserFriendlyTypes',
47
+ },
48
+ },
49
+ field: {
50
+ title: intl.formatMessage(messages.field),
51
+ widget: 'ct_fields',
52
+ },
53
+ title: {
54
+ title: intl.formatMessage(messages.title),
55
+ description: intl.formatMessage(messages.title_description),
56
+ widget: 'ct_title_column',
57
+ },
58
+ // sortable: {
59
+ // title: intl.formatMessage(messages.sortable),
60
+ // type: 'boolean',
61
+ // },
62
+ },
63
+ });
64
+
65
+ export const addTableTemplateOptions = (
66
+ schema,
67
+ formData,
68
+ intl,
69
+ position = 1,
70
+ ) => {
71
+ let pos = position;
72
+
73
+ addSchemaField(
74
+ schema,
75
+ 'alternate_rows',
76
+ intl.formatMessage(messages.alternate_rows),
77
+ null,
78
+ { type: 'boolean', default: true },
79
+ pos,
80
+ );
81
+ pos++;
82
+
83
+ addSchemaField(
84
+ schema,
85
+ 'columns',
86
+ intl.formatMessage(messages.columns),
87
+ null,
88
+ {
89
+ widget: 'object_list',
90
+ schema: ColumnSchema({ intl }),
91
+ schemaExtender: (schema, data, intl) => {
92
+ const mutated = cloneDeep(schema);
93
+ if (data.ct) {
94
+ mutated.fieldsets[0].fields.push('field', 'title' /*, 'sortable'*/);
95
+ mutated.properties.field.ct = data.ct;
96
+ }
97
+ return mutated;
98
+ },
99
+ },
100
+ pos,
101
+ );
102
+ pos++;
103
+
104
+ return pos;
105
+ };
@@ -1,4 +1,6 @@
1
1
  import {
2
+ AttachmentCardTemplate,
3
+ AttachmentCardTemplateSkeleton,
2
4
  BandiTemplate,
3
5
  BandiTemplateSkeleton,
4
6
  CardWithImageTemplate,
@@ -18,8 +20,7 @@ import {
18
20
  SimpleListTemplateSkeleton,
19
21
  SmallBlockLinksTemplate,
20
22
  SmallBlockLinksTemplateSkeleton,
21
- AttachmentCardTemplate,
22
- AttachmentCardTemplateSkeleton
23
+ TableTemplateSkeleton,
23
24
  } from 'io-sanita-theme/components/Blocks';
24
25
 
25
26
  import CarouselTemplate from 'io-sanita-theme/components/Blocks/Listing/Carousel/CarouselTemplate.jsx';
@@ -28,7 +29,7 @@ import SlideItemDefault from 'io-sanita-theme/components/Blocks/Listing/Carousel
28
29
  import SlideGalleryItem from 'io-sanita-theme/components/Blocks/Listing/Carousel/SlideAppearance/SlideGalleryItem';
29
30
  import SlideItemSimpleCard from 'io-sanita-theme/components/Blocks/Listing/SimpleCard/Card/SimpleCardDefault';
30
31
  import SlideItemImageCard from 'io-sanita-theme/components/Blocks/Listing/CardWithImage/Card/CardWithImageDefault';
31
-
32
+ import TableTemplate from 'io-sanita-theme/components/Blocks/Listing/Table/TableTemplate';
32
33
  // import RibbonCardTemplate from 'io-sanita-theme/components/Blocks/Listing/RibbonCardTemplate';
33
34
  // import RibbonCardTemplateSkeleton from 'io-sanita-theme/components/Blocks/Listing/TemplatesSkeletons/RibbonCardTemplateSkeleton';
34
35
 
@@ -56,6 +57,7 @@ import {
56
57
  addSmallBlockLinksTemplateOptions,
57
58
  addCarouselTemplateOptions,
58
59
  addAttachmentCardTemplateOptions,
60
+ addTableTemplateOptions,
59
61
  // addRibbonCardTemplateOptions,
60
62
  // addBandiInEvidenceTemplateOptions,
61
63
 
@@ -234,6 +236,21 @@ const iosanitaListingVariations = [
234
236
  gallery_item: SlideGalleryItem,
235
237
  },
236
238
  },
239
+ {
240
+ id: 'table',
241
+ isDefault: false,
242
+ title: 'Tabella',
243
+ template: TableTemplate,
244
+ skeleton: TableTemplateSkeleton,
245
+ schemaEnhancer: ({ schema, formData, intl }) => {
246
+ let pos = addDefaultOptions(schema, formData, intl);
247
+ addTableTemplateOptions(schema, formData, intl, pos);
248
+ addLinkMoreOptions(schema, formData, intl);
249
+ return schema;
250
+ },
251
+ fullobjects: true,
252
+ cloneData: cloneBlock,
253
+ },
237
254
  // {
238
255
  // id: 'ribbonCardTemplate',
239
256
  // isDefault: false,
@@ -2,6 +2,16 @@ import React from 'react';
2
2
  import loadable from '@loadable/component';
3
3
  import { defaultIconWidgetOptions } from 'io-sanita-theme/components/manage/Widgets';
4
4
 
5
+ const CTFieldsWidget = loadable(() =>
6
+ import(
7
+ /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/CTFieldsWidget/CTFieldsWidget'
8
+ ),
9
+ );
10
+ const CTTitleColumnWidget = loadable(() =>
11
+ import(
12
+ /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/CTTitleColumnWidget/CTTitleColumnWidget'
13
+ ),
14
+ );
5
15
  const QuickSearchConfigurationWidget = loadable(() =>
6
16
  import(
7
17
  /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/QuickSearch/QuickSearchConfigurationWidget'
@@ -28,11 +38,24 @@ const SubsiteSocialLinksWidget = loadable(() =>
28
38
  /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/SubsiteSocialLinksWidget/SubsiteSocialLinksWidget'
29
39
  ),
30
40
  );
41
+
42
+ const ParliamoDiWidgetView = loadable(() =>
43
+ import(
44
+ /* webpackChunkName: "ISWidgetView" */ 'io-sanita-theme/components/View/Widgets/ParliamoDiWidgetView'
45
+ ),
46
+ );
47
+ const BlocksViewWidget = loadable(() =>
48
+ import(
49
+ /* webpackChunkName: "ISWidgetView" */ 'io-sanita-theme/components/View/Widgets/BlocksViewWidget'
50
+ ),
51
+ );
52
+
31
53
  const PanelsWidget = loadable(() =>
32
54
  import(
33
55
  /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/PanelsWidget/PanelsWidget'
34
56
  ),
35
57
  );
58
+
36
59
  export const LinkToWidget = loadable(() =>
37
60
  import(
38
61
  /* webpackChunkName: "ISManage" */ 'io-sanita-theme/components/manage/Widgets/LinkToWidget/LinkToWidget'
@@ -70,6 +93,13 @@ const getIoSanitaWidgets = (config) => {
70
93
  ...config.widgets.widget,
71
94
  icon: IconWidget,
72
95
  linkTo: LinkToWidget,
96
+ ct_fields: CTFieldsWidget,
97
+ ct_title_column: CTTitleColumnWidget,
98
+ },
99
+ views: {
100
+ ...config.widgets.views,
101
+ id: { ...config.widgets.views.id, parliamo_di: ParliamoDiWidgetView },
102
+ widget: { ...config.widgets.views.widget, blocks: BlocksViewWidget },
73
103
  },
74
104
  type: {
75
105
  ...config.widgets.type,
@@ -85,7 +85,7 @@ const Headline = ({ headlineTag, id, data = {}, listingItems, isEditMode }) => {
85
85
  )}
86
86
  </Col>
87
87
  )}
88
- {path_filters_buttons && (
88
+ {/* {path_filters_buttons && (
89
89
  <Col md={6}>
90
90
  <PathFilters
91
91
  {...data}
@@ -93,7 +93,7 @@ const Headline = ({ headlineTag, id, data = {}, listingItems, isEditMode }) => {
93
93
  addFilters={addFilters}
94
94
  />
95
95
  </Col>
96
- )}
96
+ )} */}
97
97
  </Row>
98
98
  </ListingContainer>
99
99
  )
@@ -115,8 +115,8 @@ const ListingBody = withQuerystringResults((props) => {
115
115
  hasLoaded,
116
116
  id,
117
117
  block,
118
- additionalFilters,
119
- addFilters,
118
+ // additionalFilters,
119
+ // addFilters,
120
120
  } = props;
121
121
 
122
122
  let ListingBodyTemplate;
@@ -173,8 +173,8 @@ const ListingBody = withQuerystringResults((props) => {
173
173
  listingItems={listingItems}
174
174
  data={data}
175
175
  isEditMode={isEditMode}
176
- additionalFilters={additionalFilters}
177
- addFilters={addFilters}
176
+ // additionalFilters={additionalFilters}
177
+ // addFilters={addFilters}
178
178
  />
179
179
  <div
180
180
  ref={listingRef}
@@ -0,0 +1,80 @@
1
+ import { GET_CT_SCHEMA } from 'io-sanita-theme/actions';
2
+
3
+ const initialState = {
4
+ error: null,
5
+ result: {},
6
+ loaded: false,
7
+ loading: false,
8
+ subrequests: {},
9
+ };
10
+
11
+ export function ctSchema(state = initialState, action = {}) {
12
+ switch (action.type) {
13
+ case `${GET_CT_SCHEMA}_PENDING`:
14
+ return action.subrequest
15
+ ? {
16
+ ...state,
17
+ subrequests: {
18
+ ...state.subrequests,
19
+ [action.subrequest]: {
20
+ ...state.subrequests[action.subrequest],
21
+ result: {},
22
+ error: null,
23
+ loaded: false,
24
+ loading: true,
25
+ },
26
+ },
27
+ }
28
+ : {
29
+ ...state,
30
+ error: null,
31
+ loading: true,
32
+ loaded: false,
33
+ };
34
+ case `${GET_CT_SCHEMA}_SUCCESS`:
35
+ return action.subrequest
36
+ ? {
37
+ ...state,
38
+ subrequests: {
39
+ ...state.subrequests,
40
+ [action.subrequest]: {
41
+ error: null,
42
+ result: action.result,
43
+ loaded: true,
44
+ loading: false,
45
+ },
46
+ },
47
+ }
48
+ : {
49
+ ...state,
50
+ error: null,
51
+ result: action.result,
52
+ loaded: true,
53
+ loading: false,
54
+ };
55
+ case `${GET_CT_SCHEMA}_FAIL`:
56
+ return action.subrequest
57
+ ? {
58
+ ...state,
59
+ subrequests: {
60
+ ...state.subrequests,
61
+ [action.subrequest]: {
62
+ error: action.error,
63
+ result: {},
64
+ loading: false,
65
+ loaded: false,
66
+ },
67
+ },
68
+ }
69
+ : {
70
+ ...state,
71
+ error: action.error,
72
+ result: {},
73
+
74
+ loading: false,
75
+ loaded: false,
76
+ };
77
+ default:
78
+ return state;
79
+ }
80
+ }
@@ -19,6 +19,7 @@ import { searchBandiFiltersReducer } from './searchBandiFiltersReducer';
19
19
  // import { breadcrumbs } from './breadcrumbs';
20
20
  import { iosanita_settings } from './settings';
21
21
  import { farmaciaReducer } from './farmaciaReducer';
22
+ import { ctSchema } from './ctSchema';
22
23
 
23
24
  /**
24
25
  * Root reducer.
@@ -41,6 +42,7 @@ const reducers = {
41
42
  // breadcrumbs: breadcrumbs,
42
43
  iosanita_settings,
43
44
  farmacia: farmaciaReducer,
45
+ ct_schema: ctSchema,
44
46
  };
45
47
 
46
48
  export default reducers;
@@ -65,6 +65,7 @@
65
65
  @import 'bootstrap-italia/src/scss/custom/grid';
66
66
  @import './bootstrap-italia/custom/grid';
67
67
  @import 'bootstrap-italia/src/scss/custom/tables';
68
+ @import './bootstrap-italia/custom/tables';
68
69
  @import 'bootstrap-italia/src/scss/custom/breadcrumb';
69
70
  @import 'bootstrap-italia/src/scss/custom/modal';
70
71
  @import 'bootstrap-italia/src/scss/custom/accordion';
@@ -15,7 +15,7 @@ $primary-darker: hsl(
15
15
  $accent: #9c0769 !default;
16
16
 
17
17
  $info: hsl(189, 47%, 54%) !default;
18
-
18
+ $light: hsl(189, 28%, 88%) !default;
19
19
  $primary-text: #fff !default;
20
20
  $accent-contrast-text: #fff !default;
21
21
  $bg-primary-lightest: hsl($primary-h, 50%, 97%) !default; //#F4FAFB;
@@ -0,0 +1 @@
1
+ @include table-variant('light', #c5c7c9); //override light table variant
@@ -141,15 +141,17 @@
141
141
 
142
142
  th,
143
143
  td {
144
- height: 3.6em;
144
+ height: 2.5rem;
145
+ //min-width: 4rem;
146
+ @extend %skeleton-animation;
145
147
  }
146
148
 
147
149
  th {
148
- background-color: var(--skeleton-item);
150
+ background-color: var(--skeleton-bg) !important;
149
151
  }
150
152
 
151
153
  td {
152
- background-color: var(--skeleton-bg);
154
+ background-color: #fff;
153
155
  }
154
156
  }
155
157