@plone/volto 18.26.0 → 18.27.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 (155) hide show
  1. package/.eslintrc +20 -0
  2. package/CHANGELOG.md +17 -0
  3. package/locales/af/LC_MESSAGES/volto.po +5 -0
  4. package/locales/af.json +1 -1
  5. package/locales/ar/LC_MESSAGES/volto.po +5 -0
  6. package/locales/ar.json +1 -1
  7. package/locales/bg/LC_MESSAGES/volto.po +5 -0
  8. package/locales/bg.json +1 -1
  9. package/locales/bn/LC_MESSAGES/volto.po +5 -0
  10. package/locales/bn.json +1 -1
  11. package/locales/ca/LC_MESSAGES/volto.po +5 -0
  12. package/locales/ca.json +1 -1
  13. package/locales/cs/LC_MESSAGES/volto.po +5 -0
  14. package/locales/cs.json +1 -1
  15. package/locales/cy/LC_MESSAGES/volto.po +5 -0
  16. package/locales/cy.json +1 -1
  17. package/locales/da/LC_MESSAGES/volto.po +5 -0
  18. package/locales/da.json +1 -1
  19. package/locales/de/LC_MESSAGES/volto.po +5 -0
  20. package/locales/de.json +1 -1
  21. package/locales/el/LC_MESSAGES/volto.po +5 -0
  22. package/locales/el.json +1 -1
  23. package/locales/en/LC_MESSAGES/volto.po +5 -0
  24. package/locales/en.json +1 -1
  25. package/locales/en_AU/LC_MESSAGES/volto.po +5 -0
  26. package/locales/en_AU.json +1 -1
  27. package/locales/en_GB/LC_MESSAGES/volto.po +5 -0
  28. package/locales/en_GB.json +1 -1
  29. package/locales/eo/LC_MESSAGES/volto.po +5 -0
  30. package/locales/eo.json +1 -1
  31. package/locales/es/LC_MESSAGES/volto.po +5 -0
  32. package/locales/es.json +1 -1
  33. package/locales/et/LC_MESSAGES/volto.po +5 -0
  34. package/locales/et.json +1 -1
  35. package/locales/eu/LC_MESSAGES/volto.po +5 -0
  36. package/locales/eu.json +1 -1
  37. package/locales/fa/LC_MESSAGES/volto.po +5 -0
  38. package/locales/fa.json +1 -1
  39. package/locales/fi/LC_MESSAGES/volto.po +5 -0
  40. package/locales/fi.json +1 -1
  41. package/locales/fr/LC_MESSAGES/volto.po +5 -0
  42. package/locales/fr.json +1 -1
  43. package/locales/fu/LC_MESSAGES/volto.po +5 -0
  44. package/locales/fu.json +1 -1
  45. package/locales/gl/LC_MESSAGES/volto.po +5 -0
  46. package/locales/gl.json +1 -1
  47. package/locales/he/LC_MESSAGES/volto.po +5 -0
  48. package/locales/he.json +1 -1
  49. package/locales/hi/LC_MESSAGES/volto.po +5 -0
  50. package/locales/hi.json +1 -1
  51. package/locales/hr/LC_MESSAGES/volto.po +5 -0
  52. package/locales/hr.json +1 -1
  53. package/locales/hu/LC_MESSAGES/volto.po +5 -0
  54. package/locales/hu.json +1 -1
  55. package/locales/hy/LC_MESSAGES/volto.po +5 -0
  56. package/locales/hy.json +1 -1
  57. package/locales/id/LC_MESSAGES/volto.po +5 -0
  58. package/locales/id.json +1 -1
  59. package/locales/it/LC_MESSAGES/volto.po +5 -0
  60. package/locales/it.json +1 -1
  61. package/locales/ja/LC_MESSAGES/volto.po +5 -0
  62. package/locales/ja.json +1 -1
  63. package/locales/ka/LC_MESSAGES/volto.po +5 -0
  64. package/locales/ka.json +1 -1
  65. package/locales/kn/LC_MESSAGES/volto.po +5 -0
  66. package/locales/kn.json +1 -1
  67. package/locales/ko/LC_MESSAGES/volto.po +5 -0
  68. package/locales/ko.json +1 -1
  69. package/locales/lt/LC_MESSAGES/volto.po +5 -0
  70. package/locales/lt.json +1 -1
  71. package/locales/lv/LC_MESSAGES/volto.po +5 -0
  72. package/locales/lv.json +1 -1
  73. package/locales/mi/LC_MESSAGES/volto.po +5 -0
  74. package/locales/mi.json +1 -1
  75. package/locales/mk/LC_MESSAGES/volto.po +5 -0
  76. package/locales/mk.json +1 -1
  77. package/locales/my/LC_MESSAGES/volto.po +5 -0
  78. package/locales/my.json +1 -1
  79. package/locales/nb_NO/LC_MESSAGES/volto.po +5 -0
  80. package/locales/nb_NO.json +1 -1
  81. package/locales/nl/LC_MESSAGES/volto.po +5 -0
  82. package/locales/nl.json +1 -1
  83. package/locales/nn/LC_MESSAGES/volto.po +5 -0
  84. package/locales/nn.json +1 -1
  85. package/locales/pl/LC_MESSAGES/volto.po +5 -0
  86. package/locales/pl.json +1 -1
  87. package/locales/pt/LC_MESSAGES/volto.po +5 -0
  88. package/locales/pt.json +1 -1
  89. package/locales/pt_BR/LC_MESSAGES/volto.po +15 -10
  90. package/locales/pt_BR.json +1 -1
  91. package/locales/rm/LC_MESSAGES/volto.po +5 -0
  92. package/locales/rm.json +1 -1
  93. package/locales/ro/LC_MESSAGES/volto.po +5 -0
  94. package/locales/ro.json +1 -1
  95. package/locales/ru/LC_MESSAGES/volto.po +5 -0
  96. package/locales/ru.json +1 -1
  97. package/locales/sk/LC_MESSAGES/volto.po +5 -0
  98. package/locales/sk.json +1 -1
  99. package/locales/sl/LC_MESSAGES/volto.po +5 -0
  100. package/locales/sl.json +1 -1
  101. package/locales/sm/LC_MESSAGES/volto.po +5 -0
  102. package/locales/sm.json +1 -1
  103. package/locales/sq/LC_MESSAGES/volto.po +5 -0
  104. package/locales/sq.json +1 -1
  105. package/locales/sr/LC_MESSAGES/volto.po +5 -0
  106. package/locales/sr.json +1 -1
  107. package/locales/sr@cyrl/LC_MESSAGES/volto.po +5 -0
  108. package/locales/sr@cyrl.json +1 -1
  109. package/locales/sr@latn/LC_MESSAGES/volto.po +5 -0
  110. package/locales/sr@latn.json +1 -1
  111. package/locales/sv/LC_MESSAGES/volto.po +5 -0
  112. package/locales/sv.json +1 -1
  113. package/locales/ta/LC_MESSAGES/volto.po +5 -0
  114. package/locales/ta.json +1 -1
  115. package/locales/te/LC_MESSAGES/volto.po +5 -0
  116. package/locales/te.json +1 -1
  117. package/locales/th/LC_MESSAGES/volto.po +5 -0
  118. package/locales/th.json +1 -1
  119. package/locales/to/LC_MESSAGES/volto.po +5 -0
  120. package/locales/to.json +1 -1
  121. package/locales/tr/LC_MESSAGES/volto.po +5 -0
  122. package/locales/tr.json +1 -1
  123. package/locales/uk/LC_MESSAGES/volto.po +5 -0
  124. package/locales/uk.json +1 -1
  125. package/locales/vi/LC_MESSAGES/volto.po +5 -0
  126. package/locales/vi.json +1 -1
  127. package/locales/volto.pot +5 -0
  128. package/locales/zh_CN/LC_MESSAGES/volto.po +5 -0
  129. package/locales/zh_CN.json +1 -1
  130. package/locales/zh_Hant/LC_MESSAGES/volto.po +5 -0
  131. package/locales/zh_Hant.json +1 -1
  132. package/locales/zh_Hant_HK/LC_MESSAGES/volto.po +5 -0
  133. package/locales/zh_Hant_HK.json +1 -1
  134. package/news/7305.fix +1 -0
  135. package/package.json +3 -3
  136. package/src/components/manage/Blocks/LeadImage/Edit.jsx +2 -2
  137. package/src/components/manage/Blocks/LeadImage/LeadImageSidebar.jsx +1 -1
  138. package/src/components/manage/Blocks/Maps/Edit.jsx +2 -1
  139. package/src/components/manage/Blocks/Search/SearchBlockView.jsx +21 -4
  140. package/src/components/manage/Blocks/Teaser/Data.jsx +20 -6
  141. package/src/components/manage/Blocks/Teaser/DefaultBody.jsx +1 -1
  142. package/src/components/manage/Blocks/Video/Edit.jsx +2 -1
  143. package/src/components/manage/Contents/Contents.jsx +20 -2
  144. package/src/components/manage/Controlpanels/Users/RenderUsers.jsx +156 -175
  145. package/src/components/manage/Sidebar/ObjectBrowserNav.jsx +2 -1
  146. package/src/components/manage/TemplateChooser/TemplateChooser.jsx +2 -1
  147. package/src/components/manage/Toolbar/PersonalTools.jsx +2 -1
  148. package/src/components/manage/Widgets/ImageWidget.jsx +2 -2
  149. package/src/components/theme/Avatar/Avatar.jsx +2 -1
  150. package/src/components/theme/PreviewImage/PreviewImage.jsx +1 -1
  151. package/src/components/theme/Widgets/ImageWidget.jsx +2 -1
  152. package/theme/themes/pastanaga/extras/contents.less +12 -0
  153. package/types/components/manage/Controlpanels/Users/RenderUsers.d.ts +18 -2
  154. package/types/components/manage/Controlpanels/index.d.ts +1 -1
  155. package/Makefile~ +0 -301
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Users controlpanel user.
3
- * @module components/manage/Controlpanels/UsersControlpanelUser
2
+ * RenderUsers component.
3
+ * @module components/manage/Controlpanels/Users/RenderUsers
4
4
  */
5
5
  import PropTypes from 'prop-types';
6
- import React, { Component } from 'react';
7
- import { FormattedMessage, injectIntl } from 'react-intl';
6
+ import { useState } from 'react';
7
+ import { FormattedMessage, useIntl } from 'react-intl';
8
+ import { useDispatch, useSelector } from 'react-redux';
8
9
  import { Dropdown, Table, Checkbox } from 'semantic-ui-react';
9
10
  import trashSVG from '@plone/volto/icons/delete.svg';
10
11
  import editSVG from '@plone/volto/icons/editing.svg';
@@ -13,199 +14,179 @@ import Toast from '@plone/volto/components/manage/Toast/Toast';
13
14
  import { ModalForm } from '@plone/volto/components/manage/Form';
14
15
  import { updateUser } from '@plone/volto/actions/users/users';
15
16
  import ploneSVG from '@plone/volto/icons/plone.svg';
16
- import { compose } from 'redux';
17
- import { connect } from 'react-redux';
18
17
  import { messages } from '@plone/volto/helpers/MessageLabels/MessageLabels';
19
18
  import { canAssignRole } from '@plone/volto/helpers/User/User';
20
19
  import { toast } from 'react-toastify';
21
20
 
22
21
  /**
23
- * UsersControlpanelUser class.
24
- * @class UsersControlpanelUser
25
- * @extends Component
22
+ * RenderUsers functional component.
23
+ * @function RenderUsers
26
24
  */
27
- class RenderUsers extends Component {
28
- /**
29
- * Property types.
30
- * @property {Object} propTypes Property types.
31
- * @static
32
- */
33
- static propTypes = {
34
- user: PropTypes.shape({
35
- username: PropTypes.string,
36
- fullname: PropTypes.string,
37
- roles: PropTypes.arrayOf(PropTypes.string),
38
- }).isRequired,
39
- roles: PropTypes.arrayOf(
40
- PropTypes.shape({
41
- id: PropTypes.string,
42
- }),
43
- ).isRequired,
44
- onDelete: PropTypes.func.isRequired,
45
- isUserManager: PropTypes.bool.isRequired,
46
- };
25
+ const RenderUsers = (props) => {
26
+ const [user, setUser] = useState({});
47
27
 
48
- /**
49
- * Constructor
50
- * @method constructor
51
- * @param {Object} props Component properties
52
- * @constructs Sharing
53
- */
54
- constructor(props) {
55
- super(props);
56
- this.state = {
57
- user: {},
58
- };
59
- this.onChange = this.onChange.bind(this);
60
- this.onEditUserError = this.onEditUserError.bind(this);
61
- this.onEditUserSubmit = this.onEditUserSubmit.bind(this);
62
- }
28
+ const intl = useIntl();
29
+ const dispatch = useDispatch();
30
+ const updateRequest = useSelector((state) => state.users?.update);
31
+
32
+ const {
33
+ user: propsUser,
34
+ listUsers,
35
+ updateUser: updateUserRole,
36
+ isUserManager,
37
+ roles,
38
+ inheritedRole,
39
+ userschema,
40
+ onDelete,
41
+ } = props;
42
+
43
+ // Use dispatch to call updateUser action
44
+ const updateUserData = (userId, userData) => {
45
+ dispatch(updateUser(userId, userData))
46
+ .then(() => {
47
+ // Handle success
48
+ setUser({});
49
+ if (listUsers) {
50
+ listUsers();
51
+ }
52
+ toast.success(
53
+ <Toast
54
+ success
55
+ title={intl.formatMessage(messages.success)}
56
+ content={intl.formatMessage(messages.updateUserSuccess)}
57
+ />,
58
+ );
59
+ })
60
+ .catch(() => {
61
+ // Handle error
62
+ toast.error(
63
+ <Toast
64
+ error
65
+ title={intl.formatMessage(messages.error)}
66
+ content={intl.formatMessage(messages.thereWereSomeErrors)}
67
+ />,
68
+ );
69
+ });
70
+ };
63
71
 
64
72
  /**
65
73
  * @param {*} event
66
74
  * @param {*} { value }
67
- * @memberof UsersControlpanelUser
68
75
  */
76
+ const onChange = (_event, { value }) => {
77
+ const [userId, role] = value.split('&role=');
78
+ updateUserRole(userId, role);
79
+ };
69
80
 
70
- onChange(event, { value }) {
71
- const [user, role] = value.split('&role=');
72
- this.props.updateUser(user, role);
73
- }
74
-
75
- componentDidUpdate(prevProps) {
76
- if (
77
- prevProps.updateRequest.loading &&
78
- this.props.updateRequest.loaded &&
79
- this.state?.user?.id === this.props?.user?.id
80
- ) {
81
- this.setState({ user: {} });
82
- this.props.listUsers();
83
- return toast.success(
84
- <Toast
85
- success
86
- title={this.props.intl.formatMessage(messages.success)}
87
- content={this.props.intl.formatMessage(messages.updateUserSuccess)}
88
- />,
89
- );
90
- }
91
- }
92
-
93
- onEditUserSubmit(data, callback) {
81
+ const onEditUserSubmit = (data) => {
94
82
  // Do not handle groups and roles in this form
95
83
  delete data.groups;
96
84
  delete data.roles;
97
- this.props.updateUserData(data.id, data);
98
- }
99
-
100
- onEditUserError() {
101
- return toast.error(
102
- <Toast
103
- error
104
- title={this.props.intl.formatMessage(messages.error)}
105
- content={this.props.intl.formatMessage(
106
- messages.addUserFormPasswordAndSendPasswordTogetherNotAllowed,
107
- )}
108
- />,
109
- );
110
- }
85
+ updateUserData(data.id, data);
86
+ };
111
87
 
112
- onClickEdit(props) {
113
- const { formData } = props;
114
- this.setState({ user: { ...formData } });
115
- }
88
+ const onClickEdit = (formProps) => {
89
+ const { formData } = formProps;
90
+ setUser({ ...formData });
91
+ };
116
92
 
117
- canDeleteUser() {
118
- if (this.props.isUserManager) return true;
119
- return !this.props.user.roles.includes('Manager');
120
- }
93
+ const canDeleteUser = () => {
94
+ if (isUserManager) return true;
95
+ return !propsUser.roles.includes('Manager');
96
+ };
121
97
 
122
- /**
123
- * Render method.
124
- * @method render
125
- * @returns {string} Markup for the component.
126
- */
127
- render() {
128
- return (
129
- <Table.Row key={this.props.user.username}>
130
- <Table.Cell className="fullname">
131
- {this.props.user.fullname
132
- ? this.props.user.fullname
133
- : this.props.user.username}{' '}
134
- ({this.props.user.username})
98
+ return (
99
+ <Table.Row key={propsUser.username}>
100
+ <Table.Cell className="fullname">
101
+ {propsUser.fullname ? propsUser.fullname : propsUser.username} (
102
+ {propsUser.username})
103
+ </Table.Cell>
104
+ {roles.map((role) => (
105
+ <Table.Cell key={role.id}>
106
+ {inheritedRole && inheritedRole.includes(role.id) ? (
107
+ <Icon
108
+ name={ploneSVG}
109
+ size="20px"
110
+ color="#007EB1"
111
+ title={'plone-svg'}
112
+ />
113
+ ) : (
114
+ <Checkbox
115
+ checked={propsUser.roles.includes(role.id)}
116
+ onChange={onChange}
117
+ value={`${propsUser.id}&role=${role.id}`}
118
+ disabled={!canAssignRole(isUserManager, role)}
119
+ />
120
+ )}
135
121
  </Table.Cell>
136
- {this.props.roles.map((role) => (
137
- <Table.Cell key={role.id}>
138
- {this.props.inheritedRole &&
139
- this.props.inheritedRole.includes(role.id) ? (
140
- <Icon
141
- name={ploneSVG}
142
- size="20px"
143
- color="#007EB1"
144
- title={'plone-svg'}
145
- />
146
- ) : (
147
- <Checkbox
148
- checked={this.props.user.roles.includes(role.id)}
149
- onChange={this.onChange}
150
- value={`${this.props.user.id}&role=${role.id}`}
151
- disabled={!canAssignRole(this.props.isUserManager, role)}
152
- />
153
- )}
154
- </Table.Cell>
155
- ))}
156
- <Table.Cell textAlign="right">
157
- {this.canDeleteUser() && (
158
- <Dropdown icon="ellipsis horizontal">
159
- <Dropdown.Menu className="left">
160
- {this.props.userschema && (
161
- <Dropdown.Item
162
- id="edit-user-button"
163
- onClick={() => {
164
- this.onClickEdit({ formData: this.props.user });
165
- }}
166
- value={this.props.user['@id']}
167
- >
168
- <Icon name={editSVG} size="15px" />
169
- <FormattedMessage id="Edit" defaultMessage="Edit" />
170
- </Dropdown.Item>
171
- )}
122
+ ))}
123
+ <Table.Cell textAlign="right">
124
+ {canDeleteUser() && (
125
+ <Dropdown icon="ellipsis horizontal">
126
+ <Dropdown.Menu className="left">
127
+ {userschema && (
172
128
  <Dropdown.Item
173
- id="delete-user-button"
174
- onClick={this.props.onDelete}
175
- value={this.props.user['@id']}
129
+ id="edit-user-button"
130
+ onClick={() => {
131
+ onClickEdit({ formData: propsUser });
132
+ }}
133
+ value={propsUser['@id']}
176
134
  >
177
- <Icon name={trashSVG} size="15px" />
178
- <FormattedMessage id="Delete" defaultMessage="Delete" />
135
+ <Icon name={editSVG} size="15px" />
136
+ <FormattedMessage id="Edit" defaultMessage="Edit" />
179
137
  </Dropdown.Item>
180
- </Dropdown.Menu>
181
- </Dropdown>
182
- )}
183
- </Table.Cell>
184
- {Object.keys(this.state.user).length > 0 &&
185
- this.props.userschema.loaded && (
186
- <ModalForm
187
- className="modal"
188
- onSubmit={this.onEditUserSubmit}
189
- submitError={this.state.editUserError}
190
- formData={this.state.user}
191
- onCancel={() => this.setState({ user: {} })}
192
- title={this.props.intl.formatMessage(
193
- messages.updateUserFormTitle,
194
138
  )}
195
- loading={this.props.updateRequest.loading}
196
- schema={this.props.userschema.userschema}
197
- />
198
- )}
199
- </Table.Row>
200
- );
201
- }
202
- }
203
- export default compose(
204
- injectIntl,
205
- connect(
206
- (state, props) => ({
207
- updateRequest: state.users?.update,
139
+ <Dropdown.Item
140
+ id="delete-user-button"
141
+ onClick={onDelete}
142
+ value={propsUser['@id']}
143
+ >
144
+ <Icon name={trashSVG} size="15px" />
145
+ <FormattedMessage id="Delete" defaultMessage="Delete" />
146
+ </Dropdown.Item>
147
+ </Dropdown.Menu>
148
+ </Dropdown>
149
+ )}
150
+ </Table.Cell>
151
+ {Object.keys(user).length > 0 && userschema.loaded && (
152
+ <ModalForm
153
+ className="modal"
154
+ onSubmit={onEditUserSubmit}
155
+ submitError={user.editUserError}
156
+ formData={user}
157
+ onCancel={() => setUser({})}
158
+ title={intl.formatMessage(messages.updateUserFormTitle)}
159
+ loading={updateRequest.loading}
160
+ schema={userschema.userschema}
161
+ />
162
+ )}
163
+ </Table.Row>
164
+ );
165
+ };
166
+
167
+ // PropTypes to the component
168
+ RenderUsers.propTypes = {
169
+ user: PropTypes.shape({
170
+ id: PropTypes.string,
171
+ username: PropTypes.string,
172
+ fullname: PropTypes.string,
173
+ roles: PropTypes.arrayOf(PropTypes.string),
174
+ '@id': PropTypes.string,
175
+ }).isRequired,
176
+ roles: PropTypes.arrayOf(
177
+ PropTypes.shape({
178
+ id: PropTypes.string,
208
179
  }),
209
- { updateUserData: updateUser },
210
- ),
211
- )(RenderUsers);
180
+ ).isRequired,
181
+ onDelete: PropTypes.func.isRequired,
182
+ isUserManager: PropTypes.bool.isRequired,
183
+ listUsers: PropTypes.func,
184
+ updateUser: PropTypes.func.isRequired,
185
+ inheritedRole: PropTypes.arrayOf(PropTypes.string),
186
+ userschema: PropTypes.shape({
187
+ loaded: PropTypes.bool,
188
+ userschema: PropTypes.object,
189
+ }),
190
+ };
191
+
192
+ export default RenderUsers;
@@ -3,6 +3,7 @@ import { Button, Segment, Popup } from 'semantic-ui-react';
3
3
  import { useIntl, defineMessages } from 'react-intl';
4
4
  import cx from 'classnames';
5
5
  import Icon from '@plone/volto/components/theme/Icon/Icon';
6
+ import Image from '@plone/volto/components/theme/Image/Image';
6
7
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
7
8
  import { getContentIcon } from '@plone/volto/helpers/Content/Content';
8
9
  import config from '@plone/volto/registry';
@@ -69,7 +70,7 @@ const ObjectBrowserNav = ({
69
70
  }
70
71
  >
71
72
  {item['@type'] === 'Image' ? (
72
- <img
73
+ <Image
73
74
  src={`${item['@id']}/@@images/image/preview`}
74
75
  alt={item.title}
75
76
  style={{
@@ -1,6 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { useIntl } from 'react-intl';
3
3
  import { Button, Grid, Message } from 'semantic-ui-react';
4
+ import Image from '@plone/volto/components/theme/Image/Image';
4
5
 
5
6
  const TemplateChooser = ({ templates, onSelectTemplate }) => {
6
7
  const intl = useIntl();
@@ -15,7 +16,7 @@ const TemplateChooser = ({ templates, onSelectTemplate }) => {
15
16
  className="template-chooser-item"
16
17
  onClick={() => onSelectTemplate(index)}
17
18
  >
18
- <img src={template.image} alt="" />
19
+ <Image src={template.image} alt="" />
19
20
  <div className="template-chooser-title">
20
21
  {intl.formatMessage({
21
22
  id: template.id,
@@ -7,6 +7,7 @@ import cx from 'classnames';
7
7
  import { FormattedMessage, useIntl, defineMessages } from 'react-intl';
8
8
 
9
9
  import Icon from '@plone/volto/components/theme/Icon/Icon';
10
+ import Image from '@plone/volto/components/theme/Image/Image';
10
11
  import { getUser } from '@plone/volto/actions/users/users';
11
12
  import { Pluggable } from '@plone/volto/components/manage/Pluggable';
12
13
  import { expandToBackendURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
@@ -96,7 +97,7 @@ const PersonalTools = (props) => {
96
97
  </header>
97
98
  <div className={cx('avatar', { default: !user.portrait })}>
98
99
  {user.portrait ? (
99
- <img
100
+ <Image
100
101
  src={expandToBackendURL(user.portrait)}
101
102
  alt={intl.formatMessage(messages.userAvatar)}
102
103
  />
@@ -291,7 +291,7 @@ const UnconnectedImageInput = (props) => {
291
291
  {isRelationChoice ? (
292
292
  <Image item={value} width="fit-content" height="auto" loading="lazy" />
293
293
  ) : (
294
- <img
294
+ <Image
295
295
  className={props.className}
296
296
  src={
297
297
  isInternalURL(imageValue)
@@ -341,7 +341,7 @@ const UnconnectedImageInput = (props) => {
341
341
  </Loader>
342
342
  </Dimmer>
343
343
  )}
344
- <img src={imageBlockSVG} alt="" className="placeholder" />
344
+ <Image src={imageBlockSVG} alt="" className="placeholder" />
345
345
  <p>{description || intl.formatMessage(messages.addImage)}</p>
346
346
  <div className="toolbar-wrapper">
347
347
  <div className="toolbar-inner" ref={linkEditor.anchorNode}>
@@ -5,6 +5,7 @@
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { getInitials } from '@plone/volto/helpers/Utils/Utils';
8
+ import Image from '@plone/volto/components/theme/Image/Image';
8
9
 
9
10
  const defaultSize = 30;
10
11
  const defaultColor = 'Teal';
@@ -15,7 +16,7 @@ const Avatar = ({ src, title, text, size, color, className }) => {
15
16
  return (
16
17
  <div className={className} title={title}>
17
18
  {src ? (
18
- <img src={src} alt={title}></img>
19
+ <Image src={src} alt={title} />
19
20
  ) : (
20
21
  <svg width={size} height={size}>
21
22
  <circle cx={radius} cy={radius} r={radius} fill={color} />
@@ -25,7 +25,7 @@ function PreviewImage({ item, alt, image_field, showDefault = true, ...rest }) {
25
25
  return image;
26
26
  } else {
27
27
  return (
28
- <img
28
+ <Image
29
29
  src={
30
30
  config.getComponent({
31
31
  name: 'DefaultImage',
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
3
  import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
4
+ import Image from '@plone/volto/components/theme/Image/Image';
4
5
 
5
6
  const niceBytes = (bytes) => {
6
7
  bytes = Number(bytes);
@@ -18,7 +19,7 @@ const niceBytes = (bytes) => {
18
19
  const ImageWidget = ({ value, className }) =>
19
20
  value ? (
20
21
  <span className={cx(className, 'image', 'widget')}>
21
- <img
22
+ <Image
22
23
  src={
23
24
  value.data
24
25
  ? `data:${value['content-type']};base64,${value.data}`
@@ -107,6 +107,18 @@
107
107
  top: auto;
108
108
  bottom: 100%;
109
109
  }
110
+
111
+ .search-feedback {
112
+ position: absolute;
113
+ overflow: hidden;
114
+ width: 1px;
115
+ height: 1px;
116
+ padding: 0;
117
+ border: 0;
118
+ margin: -1px;
119
+ clip: rect(0, 0, 0, 0);
120
+ white-space: nowrap;
121
+ }
110
122
  }
111
123
 
112
124
  .ui.table .icon-align,
@@ -1,2 +1,18 @@
1
- declare const _default: any;
2
- export default _default;
1
+ export default RenderUsers;
2
+ /**
3
+ * RenderUsers functional component.
4
+ * @function RenderUsers
5
+ */
6
+ declare function RenderUsers(props: any): import("react/jsx-runtime").JSX.Element;
7
+ declare namespace RenderUsers {
8
+ namespace propTypes {
9
+ let user: any;
10
+ let roles: any;
11
+ let onDelete: any;
12
+ let isUserManager: any;
13
+ let listUsers: any;
14
+ let updateUser: any;
15
+ let inheritedRole: any;
16
+ let userschema: any;
17
+ }
18
+ }
@@ -5,7 +5,7 @@ export declare const AddRuleControlpanel: import("@loadable/component").Loadable
5
5
  export declare const EditRuleControlpanel: import("@loadable/component").LoadableClassComponent<any>;
6
6
  export declare const ConfigureRuleControlpanel: import("@loadable/component").LoadableClassComponent<any>;
7
7
  export declare const UsersControlpanel: import("@loadable/component").LoadableClassComponent<any>;
8
- export declare const RenderUsers: import("@loadable/component").LoadableClassComponent<any>;
8
+ export declare const RenderUsers: import("@loadable/component").LoadableComponent<any>;
9
9
  export declare const UserGroupMembershipControlPanel: import("@loadable/component").LoadableComponent<unknown>;
10
10
  export declare const GroupsControlpanel: import("@loadable/component").LoadableClassComponent<any>;
11
11
  export declare const RenderGroups: import("@loadable/component").LoadableComponent<any>;