design-comuni-plone-theme 12.0.0 → 12.1.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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +24 -0
- package/RELEASE.md +19 -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 +1 -1
- 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 +10 -2
- 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 +4 -0
- 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/EnhanceLink.js +7 -2
- package/src/helpers/files.js +2 -2
- package/src/overrideTranslations.jsx +5 -0
|
@@ -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);
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import prettybytes from 'pretty-bytes';
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import { getFileViewFormat } from 'design-comuni-plone-theme/helpers';
|
|
5
|
+
import { useIntl } from 'react-intl';
|
|
5
6
|
|
|
6
7
|
const EnhanceLink = ({
|
|
7
8
|
enhanced_link_infos,
|
|
@@ -9,11 +10,15 @@ const EnhanceLink = ({
|
|
|
9
10
|
className,
|
|
10
11
|
aria_label,
|
|
11
12
|
}) => {
|
|
13
|
+
const intl = useIntl();
|
|
12
14
|
let children = <></>;
|
|
13
15
|
let aria_label_extended = null;
|
|
16
|
+
|
|
14
17
|
let size =
|
|
15
|
-
enhanced_link_infos.getObjSize ??
|
|
16
|
-
prettybytes(enhanced_link_infos.size
|
|
18
|
+
enhanced_link_infos.getObjSize?.replaceAll('.', ',') ??
|
|
19
|
+
prettybytes(enhanced_link_infos.size, {
|
|
20
|
+
locale: intl.locale,
|
|
21
|
+
})?.toUpperCase();
|
|
17
22
|
|
|
18
23
|
if (enhanced_link_infos) {
|
|
19
24
|
const viewFormat = getFileViewFormat(enhanced_link_infos);
|
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': {
|