design-comuni-plone-theme 11.30.2 → 11.30.3
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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +15 -0
- package/RELEASE.md +8 -0
- package/package.json +1 -1
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate.jsx +3 -3
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithImageTemplate.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +4 -3
- package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/RibbonCardTemplate.jsx +5 -4
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/SimpleCardTemplateDefault.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +3 -3
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/BandiInEvidenceTemplateSkeleton.jsx +4 -4
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/CardWithImageTemplateSkeleton.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/CardWithSlideUpTextTemplateSkeleton.jsx +3 -3
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/ContentInEvidenceTemplateSkeleton.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/GridGalleryTemplateSkeleton.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/InEvidenceTemplateSkeleton.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/RibbonCardTemplateSkeleton.jsx +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/SmallBlockLinksTemplateSkeleton.jsx +1 -1
- package/src/components/ItaliaTheme/Blocks/Teaser/ItaliaTeaserBody.jsx +1 -3
- package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoView.jsx +2 -2
- package/src/customizations/volto/helpers/FormValidation/FormValidation.js +3 -2
- package/src/customizations/volto/helpers/FormValidation/FormValidation.test.js +189 -0
- package/src/theme/ItaliaTheme/Blocks/_accordion.scss +4 -0
- package/src/theme/ItaliaTheme/Blocks/_completeBlockLinkstemplate.scss +0 -6
- package/src/theme/ItaliaTheme/Blocks/_contentInEvidenceTemplate.scss +5 -0
- package/src/theme/ItaliaTheme/Blocks/_inEvidenceTemplate.scss +0 -4
- package/src/theme/ItaliaTheme/Blocks/_smallblockLinkstemplate.scss +0 -6
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [11.30.3](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.30.2...v11.30.3) (2025-05-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* added bold style to strong tag in accordion header ([#947](https://github.com/RedTurtle/design-comuni-plone-theme/issues/947)) ([66d4507](https://github.com/RedTurtle/design-comuni-plone-theme/commit/66d4507d2a3f09ffb94f934e7a362c152ce64ce2))
|
|
9
|
+
* correct the alt and title on the Argomento header image ([#950](https://github.com/RedTurtle/design-comuni-plone-theme/issues/950)) ([a6ed6ca](https://github.com/RedTurtle/design-comuni-plone-theme/commit/a6ed6ca6934d278f819738ffde2257bb888e9fa8))
|
|
10
|
+
* spacings and alignments of listing blocks ([#945](https://github.com/RedTurtle/design-comuni-plone-theme/issues/945)) ([d8e27d8](https://github.com/RedTurtle/design-comuni-plone-theme/commit/d8e27d88179405d130a4d266a42b7d4944a371a7))
|
|
11
|
+
* url validation for path and querystring with @, :, ... ([#952](https://github.com/RedTurtle/design-comuni-plone-theme/issues/952)) ([731affb](https://github.com/RedTurtle/design-comuni-plone-theme/commit/731affbbd3dc5d4c2cc16a45b95749c91d51a265))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Documentation
|
|
15
|
+
|
|
16
|
+
* updated publiccode and release log ([7300db4](https://github.com/RedTurtle/design-comuni-plone-theme/commit/7300db4f03c537e65bd130268da48e75ca3631e6))
|
|
17
|
+
|
|
3
18
|
## [11.30.2](https://github.com/RedTurtle/design-comuni-plone-theme/compare/v11.30.1...v11.30.2) (2025-05-07)
|
|
4
19
|
|
|
5
20
|
|
package/RELEASE.md
CHANGED
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
- ...
|
|
42
42
|
-->
|
|
43
43
|
|
|
44
|
+
## Versione 11.30.3 (20/05/2025)
|
|
45
|
+
|
|
46
|
+
### Fix
|
|
47
|
+
|
|
48
|
+
- I titoli degli elementi del blocco Accordion hanno ora tutti lo stesso stile.
|
|
49
|
+
- Corretta la descrizione per la didascalia per l'immagine di testata dentro al CT Argomento.
|
|
50
|
+
- Uniformato le varie spaziature e allineamenti dei blocchi Elenco.
|
|
51
|
+
|
|
44
52
|
## Versione 11.30.2 (07/05/2025)
|
|
45
53
|
|
|
46
54
|
### Fix
|
package/package.json
CHANGED
package/publiccode.yml
CHANGED
|
@@ -227,9 +227,9 @@ maintenance:
|
|
|
227
227
|
name: io-Comune - Il sito AgID per Comuni ed Enti Pubblici
|
|
228
228
|
platforms:
|
|
229
229
|
- web
|
|
230
|
-
releaseDate: '2025-05-
|
|
230
|
+
releaseDate: '2025-05-20'
|
|
231
231
|
softwareType: standalone/web
|
|
232
|
-
softwareVersion: 11.30.
|
|
232
|
+
softwareVersion: 11.30.3
|
|
233
233
|
url: 'https://github.com/italia/design-comuni-plone-theme'
|
|
234
234
|
usedBy:
|
|
235
235
|
- ASP Comuni Modenesi Area Nord
|
|
@@ -69,7 +69,7 @@ const BandiInEvidenceTemplate = ({
|
|
|
69
69
|
const intl = useIntl();
|
|
70
70
|
return (
|
|
71
71
|
<div className="bandi-in-evidence">
|
|
72
|
-
<Container className="px-4">
|
|
72
|
+
<Container className="px-4 pt-3">
|
|
73
73
|
{title && (
|
|
74
74
|
<Row>
|
|
75
75
|
<Col>
|
|
@@ -84,11 +84,11 @@ const BandiInEvidenceTemplate = ({
|
|
|
84
84
|
</Col>
|
|
85
85
|
</Row>
|
|
86
86
|
)}
|
|
87
|
-
<div className="bandi-in-evidence-cards-wrapper mb-
|
|
87
|
+
<div className="bandi-in-evidence-cards-wrapper mt-2 mb-4">
|
|
88
88
|
{items.map((item, index) => {
|
|
89
89
|
const listingText = <ListingText item={item} />;
|
|
90
90
|
return (
|
|
91
|
-
<Card key={index} className=
|
|
91
|
+
<Card key={index} className="listing-item card-bg mt-2">
|
|
92
92
|
<CardBody>
|
|
93
93
|
<CardTitle tag="h3" className="title">
|
|
94
94
|
<UniversalLink
|
|
@@ -24,8 +24,8 @@ const CardWithImageTemplate = (props) => {
|
|
|
24
24
|
} = props;
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
|
-
<div className="card-with-image-template">
|
|
28
|
-
<Container className="px-4">
|
|
27
|
+
<div className="card-with-image-template my-3">
|
|
28
|
+
<Container className="px-4 pt-3">
|
|
29
29
|
{title && (
|
|
30
30
|
<Row>
|
|
31
31
|
<Col>
|
|
@@ -38,6 +38,7 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
38
38
|
show_section,
|
|
39
39
|
show_description = true,
|
|
40
40
|
hide_dates = false,
|
|
41
|
+
show_block_bg,
|
|
41
42
|
id_lighthouse,
|
|
42
43
|
linkmore_id_lighthouse,
|
|
43
44
|
titleLine,
|
|
@@ -46,7 +47,7 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
46
47
|
|
|
47
48
|
return (
|
|
48
49
|
<div className="card-slide-text-template">
|
|
49
|
-
<Container>
|
|
50
|
+
<Container className="px-4 mt-3">
|
|
50
51
|
<div className="title">
|
|
51
52
|
{title && (
|
|
52
53
|
<h2 className={cx('', { 'title-bottom-line': titleLine })}>
|
|
@@ -54,7 +55,7 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
54
55
|
</h2>
|
|
55
56
|
)}
|
|
56
57
|
</div>
|
|
57
|
-
<div className=
|
|
58
|
+
<div className={cx('grid pt-3', { 'mb-3': show_block_bg })}>
|
|
58
59
|
{items.map((item, index) => {
|
|
59
60
|
const image = getListingImageBackground(item, 'large');
|
|
60
61
|
const category = getCategory(item, show_type, show_section, props);
|
|
@@ -70,7 +71,7 @@ const CardWithSlideUpTextTemplate = (props) => {
|
|
|
70
71
|
|
|
71
72
|
return (
|
|
72
73
|
<div
|
|
73
|
-
className="listing-item box bg-img"
|
|
74
|
+
className="listing-item box bg-img mb-2"
|
|
74
75
|
style={
|
|
75
76
|
image && {
|
|
76
77
|
backgroundImage: `url(${image})`,
|
|
@@ -53,7 +53,7 @@ const ContentInEvidenceTemplate = (props) => {
|
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<div className="contentInEvidenceTemplate">
|
|
56
|
-
<Container>
|
|
56
|
+
<Container className="px-4 pt-3">
|
|
57
57
|
{title && (
|
|
58
58
|
<Row>
|
|
59
59
|
<Col>
|
|
@@ -78,7 +78,7 @@ const ContentInEvidenceTemplate = (props) => {
|
|
|
78
78
|
item?.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
|
-
<Row key={item['@id']} className="content-in-evidence">
|
|
81
|
+
<Row key={item['@id']} className="content-in-evidence my-3">
|
|
82
82
|
{hasImage && (
|
|
83
83
|
<Col lg={{ size: 6, offset: 1, order: 2 }}>
|
|
84
84
|
<ListingImage
|
|
@@ -37,7 +37,7 @@ const GridGalleryTemplate = ({
|
|
|
37
37
|
const intl = useIntl();
|
|
38
38
|
return (
|
|
39
39
|
<div className="grid-gallery-template">
|
|
40
|
-
<Container className="px-4">
|
|
40
|
+
<Container className="px-4 pt-3">
|
|
41
41
|
{title && (
|
|
42
42
|
<Row>
|
|
43
43
|
<Col>
|
|
@@ -53,7 +53,7 @@ const GridGalleryTemplate = ({
|
|
|
53
53
|
{intl.formatMessage(messages.maxItemsExceeded)}
|
|
54
54
|
</Alert>
|
|
55
55
|
)}
|
|
56
|
-
<div className="grid-gallery-grid">
|
|
56
|
+
<div className="grid-gallery-grid my-3 pb-3">
|
|
57
57
|
{items.map((item, index) => {
|
|
58
58
|
let image = ListingImage({
|
|
59
59
|
item,
|
|
@@ -61,7 +61,7 @@ const InEvidenceTemplate = (props) => {
|
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
63
|
<div className="in-evidence">
|
|
64
|
-
<Container className="px-4">
|
|
64
|
+
<Container className="px-4 pt-3">
|
|
65
65
|
{title && (
|
|
66
66
|
<Row>
|
|
67
67
|
<Col>
|
|
@@ -76,7 +76,7 @@ const InEvidenceTemplate = (props) => {
|
|
|
76
76
|
</Col>
|
|
77
77
|
</Row>
|
|
78
78
|
)}
|
|
79
|
-
<div className="in-evidence-cards-wrapper
|
|
79
|
+
<div className="in-evidence-cards-wrapper my-3 pb-2">
|
|
80
80
|
{items.map((item, index) => {
|
|
81
81
|
const icon = show_icon ? getItemIcon(item) : null;
|
|
82
82
|
const date = hide_dates
|
|
@@ -60,6 +60,7 @@ const RibbonCardTemplate = (props) => {
|
|
|
60
60
|
show_icon = true,
|
|
61
61
|
show_description = true,
|
|
62
62
|
show_type,
|
|
63
|
+
show_block_bg,
|
|
63
64
|
hide_dates,
|
|
64
65
|
id_lighthouse,
|
|
65
66
|
titleLine,
|
|
@@ -68,7 +69,7 @@ const RibbonCardTemplate = (props) => {
|
|
|
68
69
|
} = props;
|
|
69
70
|
return (
|
|
70
71
|
<div className="ribbon-card-template">
|
|
71
|
-
<Container className="px-4">
|
|
72
|
+
<Container className="px-4 pt-3">
|
|
72
73
|
{title && (
|
|
73
74
|
<Row>
|
|
74
75
|
<Col>
|
|
@@ -79,7 +80,7 @@ const RibbonCardTemplate = (props) => {
|
|
|
79
80
|
</Row>
|
|
80
81
|
)}
|
|
81
82
|
|
|
82
|
-
<Row className=
|
|
83
|
+
<Row className={cx({ 'pb-3': show_block_bg })}>
|
|
83
84
|
{items.map((item, index) => {
|
|
84
85
|
const itemTitle = item.title || item.id;
|
|
85
86
|
const showRibbon =
|
|
@@ -106,10 +107,10 @@ const RibbonCardTemplate = (props) => {
|
|
|
106
107
|
item.parent?.['@type'] === 'Event' && item?.['@type'] === 'Event';
|
|
107
108
|
|
|
108
109
|
return (
|
|
109
|
-
<Col lg={4} sm={12} key={index}>
|
|
110
|
+
<Col lg={4} sm={12} key={index} className="pb-3">
|
|
110
111
|
<Card
|
|
111
112
|
className={cx(
|
|
112
|
-
`card-bg card-big align-items-top rounded shadow`,
|
|
113
|
+
`card-bg card-big align-items-top rounded shadow mt-3`,
|
|
113
114
|
{ show_detail_link: show_detail_link },
|
|
114
115
|
)}
|
|
115
116
|
noWrapper={false}
|
|
@@ -113,7 +113,7 @@ const SimpleCardTemplateDefault = (props) => {
|
|
|
113
113
|
)}
|
|
114
114
|
|
|
115
115
|
<div
|
|
116
|
-
className="card-wrapper card-teaser-wrapper card-teaser-wrapper-equal card-teaser-block-3
|
|
116
|
+
className="card-wrapper card-teaser-wrapper card-teaser-wrapper-equal card-teaser-block-3 my-3"
|
|
117
117
|
id={resultsUID + '_results'}
|
|
118
118
|
>
|
|
119
119
|
{items.map((item, index) => (
|
|
@@ -25,7 +25,7 @@ const SmallBlockLinksTemplate = ({
|
|
|
25
25
|
}) => {
|
|
26
26
|
return (
|
|
27
27
|
<div className="small-block-links">
|
|
28
|
-
<Container className="px-4">
|
|
28
|
+
<Container className="px-4 pt-3">
|
|
29
29
|
{title && (
|
|
30
30
|
<Row>
|
|
31
31
|
<Col>
|
|
@@ -35,13 +35,13 @@ const SmallBlockLinksTemplate = ({
|
|
|
35
35
|
</Col>
|
|
36
36
|
</Row>
|
|
37
37
|
)}
|
|
38
|
-
<Row className=
|
|
38
|
+
<Row className={cx('items', { 'pb-3': show_block_bg })}>
|
|
39
39
|
{items.map((item, index) => {
|
|
40
40
|
return (
|
|
41
41
|
<Col
|
|
42
42
|
md="3"
|
|
43
43
|
key={item['@id']}
|
|
44
|
-
className="col-item col-sm-4 col-lg-2"
|
|
44
|
+
className="col-item col-sm-4 col-lg-2 my-3"
|
|
45
45
|
>
|
|
46
46
|
<div className="center-image-card">
|
|
47
47
|
<UniversalLink
|
|
@@ -21,8 +21,8 @@ const BandiInEvidenceTemplateSkeleton = ({
|
|
|
21
21
|
return (
|
|
22
22
|
<div className={'bandi-in-evidence public-ui'}>
|
|
23
23
|
<div className="full-width">
|
|
24
|
-
<Container className="
|
|
25
|
-
<div className="skeleton-template
|
|
24
|
+
<Container className="px-4 pt-3">
|
|
25
|
+
<div className="skeleton-template">
|
|
26
26
|
{title && (
|
|
27
27
|
<Row>
|
|
28
28
|
<Col>
|
|
@@ -33,10 +33,10 @@ const BandiInEvidenceTemplateSkeleton = ({
|
|
|
33
33
|
</Row>
|
|
34
34
|
)}
|
|
35
35
|
|
|
36
|
-
<div className="bandi-in-evidence-cards-wrapper mb-
|
|
36
|
+
<div className="bandi-in-evidence-cards-wrapper mt-2 mb-4">
|
|
37
37
|
{[0, 1, 2, 3, 4, 5].map((i) => {
|
|
38
38
|
return (
|
|
39
|
-
<Card key={i} className="listing-item card-bg">
|
|
39
|
+
<Card key={i} className="listing-item card-bg mt-2">
|
|
40
40
|
<CardBody>
|
|
41
41
|
<CardTitle tag="h4" className="title">
|
|
42
42
|
-
|
|
@@ -25,8 +25,8 @@ const CardWithImageTemplateSkeleton = ({
|
|
|
25
25
|
full_width = true,
|
|
26
26
|
}) => {
|
|
27
27
|
return (
|
|
28
|
-
<div className="card-with-image-template">
|
|
29
|
-
<Container className="px-4">
|
|
28
|
+
<div className="card-with-image-template my-3">
|
|
29
|
+
<Container className="px-4 pt-3">
|
|
30
30
|
<div className="skeleton-template">
|
|
31
31
|
{title && (
|
|
32
32
|
<Row>
|
|
@@ -20,14 +20,14 @@ const CardWithSlideUpTextTemplateSkeleton = ({
|
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<div className="card-slide-text-template">
|
|
23
|
-
<Container>
|
|
23
|
+
<Container className="px-4 mt-3">
|
|
24
24
|
<div className="title">{title && <h2>{title}</h2>}</div>
|
|
25
|
-
<div className="grid
|
|
25
|
+
<div className="grid pt-3">
|
|
26
26
|
{[0, 1, 2].map((i) => {
|
|
27
27
|
return (
|
|
28
28
|
<UniversalLink
|
|
29
29
|
href="#"
|
|
30
|
-
className="listing-item box bg-img"
|
|
30
|
+
className="listing-item box bg-img mb-2"
|
|
31
31
|
key={i}
|
|
32
32
|
>
|
|
33
33
|
<div className="bg-gradient"></div>
|
|
@@ -22,7 +22,7 @@ const ContentInEvidenceTemplateSkeleton = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
return (
|
|
24
24
|
<div className="contentInEvidence">
|
|
25
|
-
<Container>
|
|
25
|
+
<Container className="px-4 pt-3">
|
|
26
26
|
<div className="skeleton-template">
|
|
27
27
|
{title && (
|
|
28
28
|
<Row>
|
|
@@ -36,7 +36,7 @@ const ContentInEvidenceTemplateSkeleton = ({
|
|
|
36
36
|
|
|
37
37
|
{[0].map((i) => {
|
|
38
38
|
return (
|
|
39
|
-
<Row key={i}>
|
|
39
|
+
<Row key={i} className="my-3">
|
|
40
40
|
<Col lg={{ size: 6, offset: 1, order: 2 }}>
|
|
41
41
|
<div className="img-responsive-wrapper item-image">
|
|
42
42
|
<div className="img-responsive">
|
package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/GridGalleryTemplateSkeleton.jsx
CHANGED
|
@@ -14,7 +14,7 @@ const GridGalleryTemplateSkeleton = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
return (
|
|
16
16
|
<div className="grid-gallery-template">
|
|
17
|
-
<Container className="px-4">
|
|
17
|
+
<Container className="px-4 pt-3">
|
|
18
18
|
<div className="skeleton-template">
|
|
19
19
|
{title && (
|
|
20
20
|
<Row>
|
|
@@ -24,7 +24,7 @@ const GridGalleryTemplateSkeleton = ({
|
|
|
24
24
|
</Row>
|
|
25
25
|
)}
|
|
26
26
|
|
|
27
|
-
<div className="grid-gallery-grid">
|
|
27
|
+
<div className="grid-gallery-grid my-3 pb-3">
|
|
28
28
|
{[0, 1, 2, 3, 4, 5, 6].map((i) => (
|
|
29
29
|
<div key={i} className={cx('grid-gallery-item', `item-${i % 7}`)}>
|
|
30
30
|
<UniversalLink href="#">
|
package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/InEvidenceTemplateSkeleton.jsx
CHANGED
|
@@ -22,7 +22,7 @@ const InEvidenceTemplateSkeleton = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
return (
|
|
24
24
|
<div className="in-evidence">
|
|
25
|
-
<Container className="px-4">
|
|
25
|
+
<Container className="px-4 pt-3">
|
|
26
26
|
<div className="skeleton-template">
|
|
27
27
|
{title && (
|
|
28
28
|
<Row>
|
|
@@ -34,7 +34,7 @@ const InEvidenceTemplateSkeleton = ({
|
|
|
34
34
|
</Row>
|
|
35
35
|
)}
|
|
36
36
|
|
|
37
|
-
<div className="in-evidence-cards-wrapper
|
|
37
|
+
<div className="in-evidence-cards-wrapper my-3 pb-2">
|
|
38
38
|
{[0, 1, 2, 3, 4].map((i) => {
|
|
39
39
|
return (
|
|
40
40
|
<Card key={i} className={cx('listing-item card-bg')}>
|
package/src/components/ItaliaTheme/Blocks/Listing/TemplatesSkeletons/RibbonCardTemplateSkeleton.jsx
CHANGED
|
@@ -28,7 +28,7 @@ const RibbonCardTemplateSkeleton = ({
|
|
|
28
28
|
}) => {
|
|
29
29
|
return (
|
|
30
30
|
<div className="ribbon-card-template">
|
|
31
|
-
<Container className="px-4">
|
|
31
|
+
<Container className="px-4 pt-3">
|
|
32
32
|
<div className="skeleton-template">
|
|
33
33
|
{title && (
|
|
34
34
|
<Row>
|
|
@@ -46,7 +46,7 @@ const RibbonCardTemplateSkeleton = ({
|
|
|
46
46
|
<Col lg={4} sm={12} key={i}>
|
|
47
47
|
<Card
|
|
48
48
|
className={cx(
|
|
49
|
-
`card-bg card-big align-items-top rounded shadow`,
|
|
49
|
+
`card-bg card-big align-items-top rounded shadow mt-3`,
|
|
50
50
|
{ show_detail_link: show_detail_link },
|
|
51
51
|
)}
|
|
52
52
|
noWrapper={false}
|
|
@@ -139,9 +139,7 @@ const ItaliaTeaserBody = (props) => {
|
|
|
139
139
|
{data.title || content.title}
|
|
140
140
|
</ConditionalLink>
|
|
141
141
|
</CardTitle>
|
|
142
|
-
{
|
|
143
|
-
<CardText>{content.description}</CardText>
|
|
144
|
-
)}
|
|
142
|
+
<CardText>{content.description||content.Description}</CardText>
|
|
145
143
|
<BlockExtraTags {...props} item={content} itemIndex={0} />
|
|
146
144
|
{content.tassonomia_argomenti &&
|
|
147
145
|
content.tassonomia_argomenti.length > 0 && (
|
|
@@ -140,8 +140,8 @@ const PaginaArgomentoView = ({ content }) => {
|
|
|
140
140
|
<div>
|
|
141
141
|
<Image
|
|
142
142
|
item={content}
|
|
143
|
-
alt={content.
|
|
144
|
-
title={content.
|
|
143
|
+
alt={content.image_caption ?? content.title}
|
|
144
|
+
title={content.image_caption ?? content.title}
|
|
145
145
|
key={content.image.download}
|
|
146
146
|
responsive={true}
|
|
147
147
|
sizes="100vw"
|
|
@@ -107,8 +107,9 @@ const widgetValidation = {
|
|
|
107
107
|
'localhost' + // OR localhost
|
|
108
108
|
')' +
|
|
109
109
|
'(\\:\\d+)?' + // optional port
|
|
110
|
-
'(\\/[-a-z\\d%_
|
|
111
|
-
'(\\?[;&a-z\\d%_.~+\\/=-]*)?' + // validate query string
|
|
110
|
+
'(\\/[-a-z\\d%_.~+@]*)*' + // path
|
|
111
|
+
// '(\\?[;&a-z\\d%_.~+\\/=-]*)?' + // validate query string
|
|
112
|
+
'(\\?.*)?' + // validate query string (relaxed)
|
|
112
113
|
'(\\#[-a-z\\d\\/_]*)?$', // validate fragment locator
|
|
113
114
|
'i',
|
|
114
115
|
);
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import FormValidation from './FormValidation';
|
|
2
|
+
import { messages } from '@plone/volto/helpers/MessageLabels/MessageLabels';
|
|
3
|
+
|
|
4
|
+
const schema = {
|
|
5
|
+
properties: {
|
|
6
|
+
username: { title: 'Username', type: 'string', description: '' },
|
|
7
|
+
email: { title: 'Email', type: 'string', widget: 'email', description: '' },
|
|
8
|
+
url: { title: 'url', type: 'string', widget: 'url', description: '' },
|
|
9
|
+
},
|
|
10
|
+
fieldsets: [
|
|
11
|
+
{ id: 'default', title: 'FIXME: User Data', fields: ['username'] },
|
|
12
|
+
{ id: 'second', title: 'Second: User Data', fields: ['email'] },
|
|
13
|
+
],
|
|
14
|
+
required: ['username'],
|
|
15
|
+
};
|
|
16
|
+
const errors = { email: ['The specified email is not valid.'] };
|
|
17
|
+
const formData = { username: 'test username', email: 'test' };
|
|
18
|
+
const formatMessage = (messageObj) => {
|
|
19
|
+
return messageObj?.defaultMessage;
|
|
20
|
+
};
|
|
21
|
+
const errorJSON =
|
|
22
|
+
"[{'message': 'The specified email is not valid.', 'field': 'email', 'error': 'ValidationError'}]";
|
|
23
|
+
|
|
24
|
+
describe('FormValidation', () => {
|
|
25
|
+
describe('showFirstTabWithErrors', () => {
|
|
26
|
+
it('does not break without arguments', () => {
|
|
27
|
+
expect(FormValidation.showFirstTabWithErrors()).toEqual(0);
|
|
28
|
+
});
|
|
29
|
+
it('shows the correct tab index', () => {
|
|
30
|
+
expect(
|
|
31
|
+
FormValidation.showFirstTabWithErrors({
|
|
32
|
+
errors,
|
|
33
|
+
schema,
|
|
34
|
+
}),
|
|
35
|
+
).toEqual(1);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('giveServerErrorsToCorrespondingFields', () => {
|
|
40
|
+
it('does not break without arguments', () => {
|
|
41
|
+
expect(FormValidation.giveServerErrorsToCorrespondingFields()).toEqual(
|
|
42
|
+
{},
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
it('fix JSON and show correct error', () => {
|
|
46
|
+
expect(
|
|
47
|
+
FormValidation.giveServerErrorsToCorrespondingFields(errorJSON),
|
|
48
|
+
).toEqual({ email: ['The specified email is not valid.'] });
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
describe('validateFieldsPerFieldset', () => {
|
|
53
|
+
it('does not break without arguments', () => {
|
|
54
|
+
expect(FormValidation.validateFieldsPerFieldset()).toEqual({});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('validates missing required', () => {
|
|
58
|
+
expect(
|
|
59
|
+
FormValidation.validateFieldsPerFieldset({
|
|
60
|
+
schema,
|
|
61
|
+
formData: {},
|
|
62
|
+
formatMessage,
|
|
63
|
+
}),
|
|
64
|
+
).toEqual({
|
|
65
|
+
username: [messages.required.defaultMessage],
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('do not treat 0 as missing required value', () => {
|
|
70
|
+
let newSchema = {
|
|
71
|
+
...schema,
|
|
72
|
+
properties: {
|
|
73
|
+
...schema.properties,
|
|
74
|
+
age: {
|
|
75
|
+
title: 'age',
|
|
76
|
+
type: 'integer',
|
|
77
|
+
widget: 'number',
|
|
78
|
+
description: '',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['age'],
|
|
82
|
+
};
|
|
83
|
+
expect(
|
|
84
|
+
FormValidation.validateFieldsPerFieldset({
|
|
85
|
+
schema: newSchema,
|
|
86
|
+
formData: { username: 'test username', age: null },
|
|
87
|
+
formatMessage,
|
|
88
|
+
}),
|
|
89
|
+
).toEqual({
|
|
90
|
+
age: [messages.required.defaultMessage],
|
|
91
|
+
});
|
|
92
|
+
expect(
|
|
93
|
+
FormValidation.validateFieldsPerFieldset({
|
|
94
|
+
schema: newSchema,
|
|
95
|
+
formData: { username: 'test username', age: 0 },
|
|
96
|
+
formatMessage,
|
|
97
|
+
}),
|
|
98
|
+
).toEqual({});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('validates incorrect email', () => {
|
|
102
|
+
expect(
|
|
103
|
+
FormValidation.validateFieldsPerFieldset({
|
|
104
|
+
schema,
|
|
105
|
+
formData,
|
|
106
|
+
formatMessage,
|
|
107
|
+
}),
|
|
108
|
+
).toEqual({
|
|
109
|
+
email: [messages.isValidEmail.defaultMessage],
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('validates correct email', () => {
|
|
114
|
+
formData.email = 'test@domain.name';
|
|
115
|
+
expect(
|
|
116
|
+
FormValidation.validateFieldsPerFieldset({
|
|
117
|
+
schema,
|
|
118
|
+
formData,
|
|
119
|
+
formatMessage,
|
|
120
|
+
}),
|
|
121
|
+
).toEqual({});
|
|
122
|
+
});
|
|
123
|
+
it('validates incorrect url', () => {
|
|
124
|
+
formData.url = 'foo';
|
|
125
|
+
expect(
|
|
126
|
+
FormValidation.validateFieldsPerFieldset({
|
|
127
|
+
schema,
|
|
128
|
+
formData,
|
|
129
|
+
formatMessage,
|
|
130
|
+
}),
|
|
131
|
+
).toEqual({ url: [messages.isValidURL.defaultMessage] });
|
|
132
|
+
});
|
|
133
|
+
it('validates url', () => {
|
|
134
|
+
formData.url = 'https://plone.org/';
|
|
135
|
+
expect(
|
|
136
|
+
FormValidation.validateFieldsPerFieldset({
|
|
137
|
+
schema,
|
|
138
|
+
formData,
|
|
139
|
+
formatMessage,
|
|
140
|
+
}),
|
|
141
|
+
).toEqual({});
|
|
142
|
+
});
|
|
143
|
+
it('validates url with ip', () => {
|
|
144
|
+
formData.url = 'http://127.0.0.1:8080/Plone';
|
|
145
|
+
expect(
|
|
146
|
+
FormValidation.validateFieldsPerFieldset({
|
|
147
|
+
schema,
|
|
148
|
+
formData,
|
|
149
|
+
formatMessage,
|
|
150
|
+
}),
|
|
151
|
+
).toEqual({});
|
|
152
|
+
});
|
|
153
|
+
it('validates url with localhost', () => {
|
|
154
|
+
formData.url = 'http://localhost:8080/Plone';
|
|
155
|
+
expect(
|
|
156
|
+
FormValidation.validateFieldsPerFieldset({
|
|
157
|
+
schema,
|
|
158
|
+
formData,
|
|
159
|
+
formatMessage,
|
|
160
|
+
}),
|
|
161
|
+
).toEqual({});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// RedTurtle
|
|
165
|
+
it('validates url with @ in path', () => {
|
|
166
|
+
formData.url = 'https://plone.org/@@foo';
|
|
167
|
+
expect(
|
|
168
|
+
FormValidation.validateFieldsPerFieldset({
|
|
169
|
+
schema,
|
|
170
|
+
formData,
|
|
171
|
+
formatMessage,
|
|
172
|
+
}),
|
|
173
|
+
).toEqual({});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// RedTurtle
|
|
177
|
+
it('validates url with @, :, /, ... in query', () => {
|
|
178
|
+
formData.url = 'https://plone.org/foo?remote=http://plone.org/@@foo&baz=2';
|
|
179
|
+
expect(
|
|
180
|
+
FormValidation.validateFieldsPerFieldset({
|
|
181
|
+
schema,
|
|
182
|
+
formData,
|
|
183
|
+
formatMessage,
|
|
184
|
+
}),
|
|
185
|
+
).toEqual({});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
});
|
|
189
|
+
});
|