@plone/volto 16.32.1 → 16.33.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/.changelog.draft +17 -2
- package/CHANGELOG.md +21 -0
- package/locales/ca/LC_MESSAGES/volto.po +55 -13
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +56 -14
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +55 -13
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +55 -13
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +55 -13
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +55 -13
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +55 -13
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +55 -13
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +55 -13
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +55 -13
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +55 -13
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +55 -13
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +55 -13
- package/locales/ro.json +1 -1
- package/locales/volto.pot +56 -14
- package/locales/zh_CN/LC_MESSAGES/volto.po +55 -13
- package/locales/zh_CN.json +1 -1
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/src/actions/aliases/aliases.js +27 -7
- package/src/actions/aliases/aliases.test.js +1 -1
- package/src/components/manage/Controlpanels/Aliases.jsx +542 -583
- package/src/components/manage/Controlpanels/Aliases.test.jsx +7 -0
- package/src/components/manage/Form/ModalForm.jsx +3 -1
- package/src/constants/ActionTypes.js +1 -0
- package/src/helpers/Api/Api.js +12 -1
- package/src/middleware/api.js +3 -0
|
@@ -69,6 +69,7 @@ class ModalForm extends Component {
|
|
|
69
69
|
required: PropTypes.arrayOf(PropTypes.string),
|
|
70
70
|
}).isRequired,
|
|
71
71
|
title: PropTypes.string.isRequired,
|
|
72
|
+
description: PropTypes.objectOf(PropTypes.any),
|
|
72
73
|
formData: PropTypes.objectOf(PropTypes.any),
|
|
73
74
|
submitError: PropTypes.string,
|
|
74
75
|
onSubmit: PropTypes.func.isRequired,
|
|
@@ -210,7 +211,7 @@ class ModalForm extends Component {
|
|
|
210
211
|
* @returns {string} Markup for the component.
|
|
211
212
|
*/
|
|
212
213
|
render() {
|
|
213
|
-
const { schema, onCancel } = this.props;
|
|
214
|
+
const { schema, onCancel, description } = this.props;
|
|
214
215
|
const currentFieldset = schema.fieldsets[this.state.currentTab];
|
|
215
216
|
|
|
216
217
|
const fields = map(currentFieldset.fields, (field) => ({
|
|
@@ -244,6 +245,7 @@ class ModalForm extends Component {
|
|
|
244
245
|
onSubmit={this.onSubmit}
|
|
245
246
|
error={state_errors || Boolean(this.props.submitError)}
|
|
246
247
|
>
|
|
248
|
+
{description}
|
|
247
249
|
<Message error>
|
|
248
250
|
{state_errors ? (
|
|
249
251
|
<FormattedMessage
|
|
@@ -135,6 +135,7 @@ export const MOVE_CONTENT_RULE = 'MOVE_CONTENT_RULE';
|
|
|
135
135
|
export const GET_ALIASES = 'GET_ALIASES';
|
|
136
136
|
export const ADD_ALIASES = 'ADD_ALIASES';
|
|
137
137
|
export const REMOVE_ALIASES = 'REMOVE_ALIASES';
|
|
138
|
+
export const UPLOAD_ALIASES = 'UPLOAD_ALIASES';
|
|
138
139
|
export const GET_USERSCHEMA = 'GET_USERSCHEMA';
|
|
139
140
|
export const GET_UPGRADE = 'GET_UPGRADE';
|
|
140
141
|
export const POST_UPGRADE = 'POST_UPGRADE';
|
package/src/helpers/Api/Api.js
CHANGED
|
@@ -50,7 +50,14 @@ class Api {
|
|
|
50
50
|
methods.forEach((method) => {
|
|
51
51
|
this[method] = (
|
|
52
52
|
path,
|
|
53
|
-
{
|
|
53
|
+
{
|
|
54
|
+
params,
|
|
55
|
+
data,
|
|
56
|
+
type,
|
|
57
|
+
headers = {},
|
|
58
|
+
checkUrl = false,
|
|
59
|
+
attach = [],
|
|
60
|
+
} = {},
|
|
54
61
|
) => {
|
|
55
62
|
let request;
|
|
56
63
|
let promise = new Promise((resolve, reject) => {
|
|
@@ -88,6 +95,10 @@ class Api {
|
|
|
88
95
|
request.send(data);
|
|
89
96
|
}
|
|
90
97
|
|
|
98
|
+
attach.forEach((attachment) => {
|
|
99
|
+
request.attach.apply(request, attachment);
|
|
100
|
+
});
|
|
101
|
+
|
|
91
102
|
request.end((err, response) => {
|
|
92
103
|
if (
|
|
93
104
|
checkUrl &&
|
package/src/middleware/api.js
CHANGED
|
@@ -170,6 +170,7 @@ const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
|
|
|
170
170
|
checkUrl: settings.actions_raising_api_errors.includes(
|
|
171
171
|
action.type,
|
|
172
172
|
),
|
|
173
|
+
attach: item.attach,
|
|
173
174
|
},
|
|
174
175
|
).then((reqres) => {
|
|
175
176
|
return [...acc, reqres];
|
|
@@ -186,6 +187,7 @@ const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
|
|
|
186
187
|
checkUrl: settings.actions_raising_api_errors.includes(
|
|
187
188
|
action.type,
|
|
188
189
|
),
|
|
190
|
+
attach: item.attach,
|
|
189
191
|
}),
|
|
190
192
|
),
|
|
191
193
|
)
|
|
@@ -195,6 +197,7 @@ const apiMiddlewareFactory = (api) => ({ dispatch, getState }) => (next) => (
|
|
|
195
197
|
headers: request.headers,
|
|
196
198
|
params: request.params,
|
|
197
199
|
checkUrl: settings.actions_raising_api_errors.includes(action.type),
|
|
200
|
+
attach: request.attach,
|
|
198
201
|
});
|
|
199
202
|
actionPromise.then(
|
|
200
203
|
(result) => {
|