design-comuni-plone-theme 11.23.2 → 11.24.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/.github/workflows/main.yml +1 -1
- package/.github/workflows/npm.yml +1 -1
- package/.github/workflows/prs.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/.yarn/cache/{volto-form-block-npm-3.9.2-cb78fb6cd0-a47c5241be.zip → volto-form-block-npm-3.10.0-8cd1c7a976-8ddce2c624.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +39 -0
- package/Makefile +1 -1
- package/RELEASE.md +15 -0
- package/locales/de/LC_MESSAGES/volto.po +5 -0
- package/locales/en/LC_MESSAGES/volto.po +5 -0
- package/locales/es/LC_MESSAGES/volto.po +5 -0
- package/locales/fr/LC_MESSAGES/volto.po +5 -0
- package/locales/it/LC_MESSAGES/volto.po +5 -0
- package/locales/volto.pot +6 -1
- package/package.json +3 -3
- package/publiccode.yml +2 -2
- package/src/components/ItaliaTheme/Blocks/Listing/SimpleCard/Card/SimpleCardDefault.jsx +5 -1
- package/src/components/ItaliaTheme/View/PersonaView/PersonaRuolo.jsx +11 -5
- package/src/config/italiaConfig.js +1 -0
- package/src/customizations/volto/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +709 -0
- package/src/customizations/volto/components/manage/Controlpanels/Groups/RenderGroups.jsx +122 -0
- package/src/customizations/volto/components/manage/Diff/DiffField.jsx +2 -3
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/EndField.jsx +18 -11
- package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +233 -116
- package/src/customizations/volto-form-block/components/FormView.jsx +44 -40
- package/src/customizations/volto-form-block/components/Sidebar.jsx +4 -1
- package/src/customizations/volto-form-block/components/View.jsx +9 -2
- package/src/customizations/volto-form-block/formSchema.js +18 -0
- package/src/theme/ItaliaTheme/Blocks/common/_searchBlockFilters.scss +10 -4
- package/src/theme/ItaliaTheme/Widgets/_reactSelect.scss +5 -2
- package/src/theme/ItaliaTheme/_common.scss +5 -3
- package/src/theme/_site-variables.scss +1 -1
- package/src/theme/bootstrap-override/bootstrap-italia/_focus.scss +5 -2
- package/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +5 -2
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// CUSTOMIZATION:
|
|
2
|
+
// - 97: changed condition check or uncheck Checkboxes
|
|
3
|
+
/**
|
|
4
|
+
* Users controlpanel groups.
|
|
5
|
+
* @module components/manage/Controlpanels/UsersControlpanelGroups
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React, { Component } from 'react';
|
|
9
|
+
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
10
|
+
import { Dropdown, Table, Checkbox } from 'semantic-ui-react';
|
|
11
|
+
import trashSVG from '@plone/volto/icons/delete.svg';
|
|
12
|
+
import ploneSVG from '@plone/volto/icons/plone.svg';
|
|
13
|
+
import { Icon } from '@plone/volto/components';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* UsersControlpanelGroups class.
|
|
17
|
+
* @class UsersControlpanelGroups
|
|
18
|
+
* @extends Component
|
|
19
|
+
*/
|
|
20
|
+
class RenderGroups extends Component {
|
|
21
|
+
/**
|
|
22
|
+
* Property types.
|
|
23
|
+
* @property {Object} propTypes Property types.
|
|
24
|
+
* @static
|
|
25
|
+
*/
|
|
26
|
+
static propTypes = {
|
|
27
|
+
//single group
|
|
28
|
+
group: PropTypes.shape({
|
|
29
|
+
title: PropTypes.string,
|
|
30
|
+
description: PropTypes.string,
|
|
31
|
+
email: PropTypes.string,
|
|
32
|
+
groupname: PropTypes.string,
|
|
33
|
+
roles: PropTypes.arrayOf(PropTypes.string),
|
|
34
|
+
}).isRequired,
|
|
35
|
+
|
|
36
|
+
roles: PropTypes.arrayOf(
|
|
37
|
+
PropTypes.shape({
|
|
38
|
+
id: PropTypes.string,
|
|
39
|
+
}),
|
|
40
|
+
).isRequired,
|
|
41
|
+
inheritedRole: PropTypes.array,
|
|
42
|
+
onDelete: PropTypes.func.isRequired,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Constructor
|
|
47
|
+
* @method constructor
|
|
48
|
+
* @param {Object} props Component properties
|
|
49
|
+
* @constructs Sharing
|
|
50
|
+
*/
|
|
51
|
+
constructor(props) {
|
|
52
|
+
super(props);
|
|
53
|
+
this.onChange = this.onChange.bind(this);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {*} event
|
|
58
|
+
* @param {*} { value }
|
|
59
|
+
* @memberof UsersControlpanelUser
|
|
60
|
+
*/
|
|
61
|
+
onChange(event, { value }) {
|
|
62
|
+
const [group, role] = value.split('&role=');
|
|
63
|
+
this.props.updateGroups(group, role);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
*@param {*}
|
|
68
|
+
*@returns {Boolean}
|
|
69
|
+
*@memberof RenderGroups
|
|
70
|
+
*/
|
|
71
|
+
isAuthGroup = (roleId) => {
|
|
72
|
+
return this.props.inheritedRole.includes(roleId);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Render method.
|
|
77
|
+
* @method render
|
|
78
|
+
* @returns {string} Markup for the component.
|
|
79
|
+
*/
|
|
80
|
+
render() {
|
|
81
|
+
return (
|
|
82
|
+
<Table.Row key={this.props.group.title}>
|
|
83
|
+
<Table.Cell>{this.props.group.groupname}</Table.Cell>
|
|
84
|
+
{this.props.roles.map((role) => (
|
|
85
|
+
<Table.Cell key={role.id}>
|
|
86
|
+
{this.props.inheritedRole &&
|
|
87
|
+
this.props.inheritedRole.includes(role.id) &&
|
|
88
|
+
this.props.group.roles.includes('Authenticated') ? (
|
|
89
|
+
<Icon
|
|
90
|
+
name={ploneSVG}
|
|
91
|
+
size="20px"
|
|
92
|
+
color="#007EB1"
|
|
93
|
+
title={'plone-svg'}
|
|
94
|
+
/>
|
|
95
|
+
) : (
|
|
96
|
+
<Checkbox
|
|
97
|
+
checked={this.props.group.roles.includes(role.id)}
|
|
98
|
+
onChange={this.onChange}
|
|
99
|
+
value={`${this.props.group.id}&role=${role.id}`}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
102
|
+
</Table.Cell>
|
|
103
|
+
))}
|
|
104
|
+
<Table.Cell textAlign="right">
|
|
105
|
+
<Dropdown icon="ellipsis horizontal">
|
|
106
|
+
<Dropdown.Menu className="left">
|
|
107
|
+
<Dropdown.Item
|
|
108
|
+
onClick={this.props.onDelete}
|
|
109
|
+
value={this.props.group['@id']}
|
|
110
|
+
>
|
|
111
|
+
<Icon name={trashSVG} size="15px" />
|
|
112
|
+
<FormattedMessage id="Delete" defaultMessage="Delete" />
|
|
113
|
+
</Dropdown.Item>
|
|
114
|
+
</Dropdown.Menu>
|
|
115
|
+
</Dropdown>
|
|
116
|
+
</Table.Cell>
|
|
117
|
+
</Table.Row>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export default injectIntl(RenderGroups);
|
|
@@ -114,7 +114,6 @@ const DiffField = ({
|
|
|
114
114
|
const second = SSRRenderHtml(history, store, two, field);
|
|
115
115
|
parts = diff2(first, second);
|
|
116
116
|
} else if (schema.type === 'array') {
|
|
117
|
-
// debugger;
|
|
118
117
|
const oneArray = (one || []).map((i) => i?.title || i).join(', ');
|
|
119
118
|
const twoArray = (two || []).map((j) => j?.title || j).join(', ');
|
|
120
119
|
parts = diff2(oneArray, twoArray);
|
|
@@ -150,8 +149,8 @@ const DiffField = ({
|
|
|
150
149
|
schema?.type === 'boolean'
|
|
151
150
|
? booleanMapping[!!one]
|
|
152
151
|
: schema?.widget === 'json'
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
? contentOne
|
|
153
|
+
: one,
|
|
155
154
|
schema?.widget ??
|
|
156
155
|
(schema?.type === 'object' && field.includes('image')
|
|
157
156
|
? field
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - added customization to have this changes https://github.com/plone/volto/pull/5555/files
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import React from 'react';
|
|
10
|
+
import React, { useState, useEffect } from 'react';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
13
13
|
import { Form, Grid, Input, Radio } from 'semantic-ui-react';
|
|
@@ -25,6 +25,12 @@ const messages = defineMessages({
|
|
|
25
25
|
* @returns {string} Markup of the component.
|
|
26
26
|
*/
|
|
27
27
|
const EndField = ({ value, count, until, onChange, intl }) => {
|
|
28
|
+
// Give state to fields, updating logic is convoluted,
|
|
29
|
+
// update only when/if needed
|
|
30
|
+
const [occurrenceValue, setOccurrenceValue] = useState(count);
|
|
31
|
+
const [untilValue, setUntilValue] = useState(until);
|
|
32
|
+
useEffect(() => setOccurrenceValue(count), [count]);
|
|
33
|
+
useEffect(() => setUntilValue(until), [until]);
|
|
28
34
|
return (
|
|
29
35
|
<Form.Field inline className="text">
|
|
30
36
|
<Grid>
|
|
@@ -55,12 +61,12 @@ const EndField = ({ value, count, until, onChange, intl }) => {
|
|
|
55
61
|
<Input
|
|
56
62
|
id="count"
|
|
57
63
|
name="count"
|
|
58
|
-
value={
|
|
64
|
+
value={occurrenceValue || ''}
|
|
59
65
|
onChange={({ target }) => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
target.
|
|
63
|
-
|
|
66
|
+
setOccurrenceValue(target.value);
|
|
67
|
+
if (target.value) {
|
|
68
|
+
onChange(target.id, parseInt(target.value));
|
|
69
|
+
}
|
|
64
70
|
}}
|
|
65
71
|
/>
|
|
66
72
|
</Form.Field>
|
|
@@ -86,15 +92,16 @@ const EndField = ({ value, count, until, onChange, intl }) => {
|
|
|
86
92
|
title={intl.formatMessage(messages.recurrenceEndsUntil)}
|
|
87
93
|
dateOnly={true}
|
|
88
94
|
value={
|
|
89
|
-
|
|
90
|
-
? typeof
|
|
91
|
-
?
|
|
92
|
-
:
|
|
95
|
+
untilValue
|
|
96
|
+
? typeof untilValue === 'string'
|
|
97
|
+
? untilValue
|
|
98
|
+
: untilValue?.toISOString()
|
|
93
99
|
: ''
|
|
94
100
|
}
|
|
95
101
|
resettable={false}
|
|
96
102
|
onChange={(id, value) => {
|
|
97
|
-
|
|
103
|
+
setUntilValue(value);
|
|
104
|
+
if (value) onChange(id, value === '' ? undefined : value);
|
|
98
105
|
}}
|
|
99
106
|
/>
|
|
100
107
|
</Form.Field>
|