design-comuni-plone-theme 11.29.1 → 11.30.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/.release-it.json +2 -1
- package/.yarn/cache/{volto-blocks-widget-npm-3.4.3-d7e305af36-68490569a4.zip → volto-blocks-widget-npm-3.4.1-c4d451e2c2-4f5c183698.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +40 -0
- package/RELEASE.md +25 -1
- package/locales/de/LC_MESSAGES/volto.po +21 -0
- package/locales/en/LC_MESSAGES/volto.po +21 -0
- package/locales/es/LC_MESSAGES/volto.po +21 -0
- package/locales/fr/LC_MESSAGES/volto.po +21 -0
- package/locales/it/LC_MESSAGES/volto.po +21 -0
- package/locales/volto.pot +22 -1
- package/package.json +2 -2
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Common/SearchFilters/TextFilter.jsx +6 -1
- package/src/components/ItaliaTheme/Blocks/Teaser/ItaliaTeaserBody.jsx +190 -0
- package/src/components/ItaliaTheme/Blocks/Teaser/schema.js +179 -0
- package/src/components/ItaliaTheme/Blocks/UOSearch/Body.jsx +3 -0
- package/src/components/ItaliaTheme/BrandText/BrandText.jsx +9 -1
- package/src/components/ItaliaTheme/Icons/common/common.js +9 -8
- package/src/components/__tests__/FormValidation.test.js +10 -0
- package/src/config/Blocks/blocks.js +4 -3
- package/src/config/italiaConfig.js +22 -14
- package/src/customizations/volto/components/manage/Blocks/Teaser/Body.jsx +30 -0
- package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +1 -1
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +3 -1
- package/src/customizations/volto/helpers/FormValidation/FormValidation.js +1 -1
- package/src/helpers/files.js +2 -2
- package/src/overrideTranslations.jsx +5 -0
|
@@ -71,6 +71,7 @@ import {
|
|
|
71
71
|
FALLBACK_IMAGE_SRC,
|
|
72
72
|
FALLBACK_IMAGE_SRC_MAX_W,
|
|
73
73
|
} from 'design-comuni-plone-theme/helpers/images';
|
|
74
|
+
import ItaliaTeaserBody from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/Teaser/ItaliaTeaserBody';
|
|
74
75
|
|
|
75
76
|
const ReleaseLog = loadable(
|
|
76
77
|
() => import('design-comuni-plone-theme/components/ReleaseLog/ReleaseLog'),
|
|
@@ -333,20 +334,6 @@ export default function applyConfig(voltoConfig) {
|
|
|
333
334
|
component: SiteSettingsExtras,
|
|
334
335
|
},
|
|
335
336
|
],
|
|
336
|
-
'volto-blocks-widget': {
|
|
337
|
-
allowedBlocks: [
|
|
338
|
-
...(config.settings['volto-blocks-widget']?.allowedBlocks ?? []).filter(
|
|
339
|
-
(block) => block !== 'maps',
|
|
340
|
-
),
|
|
341
|
-
'break',
|
|
342
|
-
'testo_riquadro_semplice',
|
|
343
|
-
'testo_riquadro_immagine',
|
|
344
|
-
'rssBlock',
|
|
345
|
-
//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().
|
|
346
|
-
],
|
|
347
|
-
|
|
348
|
-
showRestricted: false,
|
|
349
|
-
},
|
|
350
337
|
|
|
351
338
|
'volto-gdpr-privacy': {
|
|
352
339
|
...config.settings['volto-gdpr-privacy'],
|
|
@@ -385,6 +372,24 @@ export default function applyConfig(voltoConfig) {
|
|
|
385
372
|
videoAllowExternalsDefault: false,
|
|
386
373
|
showTrasparenzaFields: false,
|
|
387
374
|
};
|
|
375
|
+
// Moved outside as config.settings.defaultBlockType keeps default value (slate) until object spread is concluded
|
|
376
|
+
config.settings['volto-blocks-widget'] = {
|
|
377
|
+
...config.settings['volto-blocks-widget'],
|
|
378
|
+
allowedBlocks: [
|
|
379
|
+
...(config.settings['volto-blocks-widget']?.allowedBlocks ?? []).filter(
|
|
380
|
+
(block) => !['maps', 'text', 'slate'].includes(block),
|
|
381
|
+
),
|
|
382
|
+
'break',
|
|
383
|
+
'testo_riquadro_semplice',
|
|
384
|
+
'testo_riquadro_immagine',
|
|
385
|
+
'rssBlock',
|
|
386
|
+
config.settings.defaultBlockType,
|
|
387
|
+
//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().
|
|
388
|
+
// Se sono bottoni semantic basta mettere type="button"
|
|
389
|
+
],
|
|
390
|
+
|
|
391
|
+
showRestricted: false,
|
|
392
|
+
};
|
|
388
393
|
|
|
389
394
|
config.settings.nonContentRoutes = config.settings.nonContentRoutes.filter(
|
|
390
395
|
(route) => route !== '/contact-form' && route !== '/diff',
|
|
@@ -565,6 +570,9 @@ export default function applyConfig(voltoConfig) {
|
|
|
565
570
|
Image: {
|
|
566
571
|
component: ImageWithErrors,
|
|
567
572
|
},
|
|
573
|
+
Teaser: {
|
|
574
|
+
component: ItaliaTeaserBody,
|
|
575
|
+
},
|
|
568
576
|
};
|
|
569
577
|
config.registerComponent({
|
|
570
578
|
name: 'SiteSettingsExtras',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Customizations:
|
|
3
|
+
- remove unnecessary hasType check and hasType value in dependencies, supported content type is ALL for our use case
|
|
4
|
+
- fix relative import
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import DefaultBody from '@plone/volto/components/manage/Blocks/Teaser/DefaultBody';
|
|
10
|
+
import config from '@plone/volto/registry';
|
|
11
|
+
|
|
12
|
+
const TeaserBody = (props) => {
|
|
13
|
+
const { variation } = props;
|
|
14
|
+
|
|
15
|
+
// Compatible with the previous version of the component registry
|
|
16
|
+
// and the Volto 16 one.
|
|
17
|
+
const BodyComponent =
|
|
18
|
+
config.getComponent({ name: 'Teaser' }).component ||
|
|
19
|
+
variation?.template ||
|
|
20
|
+
DefaultBody;
|
|
21
|
+
|
|
22
|
+
return <BodyComponent {...props} />;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
TeaserBody.propTypes = {
|
|
26
|
+
data: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
27
|
+
isEditMode: PropTypes.bool,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default TeaserBody;
|
|
@@ -184,7 +184,7 @@ export class ObjectBrowserWidgetComponent extends Component {
|
|
|
184
184
|
// add item
|
|
185
185
|
// Check if we want to filter the attributes of the selected item
|
|
186
186
|
let resultantItem = item;
|
|
187
|
-
if (this.props.selectedItemAttrs) {
|
|
187
|
+
if (this.props.selectedItemAttrs?.length > 0) {
|
|
188
188
|
const allowedItemKeys = [
|
|
189
189
|
...this.props.selectedItemAttrs,
|
|
190
190
|
// Add the required attributes for the widget to work
|
package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx
CHANGED
|
@@ -628,7 +628,9 @@ class RecurrenceWidget extends Component {
|
|
|
628
628
|
const byweekday =
|
|
629
629
|
this.state?.rruleSet?.rrules().length > 0
|
|
630
630
|
? this.state.rruleSet.rrules()[0].origOptions.byweekday
|
|
631
|
-
:
|
|
631
|
+
: formValues.byweekday
|
|
632
|
+
? formValues.byweekday
|
|
633
|
+
: null;
|
|
632
634
|
const currWeekday = this.getWeekday(moment().day() - 1);
|
|
633
635
|
const currMonth = moment().month() + 1;
|
|
634
636
|
|
|
@@ -109,7 +109,7 @@ const widgetValidation = {
|
|
|
109
109
|
'(\\:\\d+)?' + // optional port
|
|
110
110
|
'(\\/[-a-z\\d%_.~+]*)*' + // path
|
|
111
111
|
'(\\?[;&a-z\\d%_.~+\\/=-]*)?' + // validate query string
|
|
112
|
-
'(\\#[-a-z\\
|
|
112
|
+
'(\\#[-a-z\\d\\/_]*)?$', // validate fragment locator
|
|
113
113
|
'i',
|
|
114
114
|
);
|
|
115
115
|
const isValid = urlRegex.test(urlValue);
|
package/src/helpers/files.js
CHANGED
|
@@ -77,11 +77,11 @@ export const FILE_FORMATS = {
|
|
|
77
77
|
format_name: 'Excel',
|
|
78
78
|
},
|
|
79
79
|
'application/vnd.ms-powerpoint': {
|
|
80
|
-
icon: { lib: 'far', name: 'file-
|
|
80
|
+
icon: { lib: 'far', name: 'file-powerpoint' },
|
|
81
81
|
format_name: 'PowerPoint',
|
|
82
82
|
},
|
|
83
83
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation': {
|
|
84
|
-
icon: { lib: 'far', name: 'file-
|
|
84
|
+
icon: { lib: 'far', name: 'file-powerpoint' },
|
|
85
85
|
format_name: 'PowerPoint',
|
|
86
86
|
},
|
|
87
87
|
'text/xml': {
|