@plone/volto 16.9.0 → 16.10.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 +9 -12
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +20 -1
- package/package.json +2 -1
- package/packages/volto-slate/package.json +1 -1
- package/src/components/manage/Controlpanels/Rules/components/VariableModal.jsx +38 -11
- package/src/components/manage/Form/Form.jsx +8 -4
- package/src/components/manage/Toolbar/Toolbar.jsx +12 -2
- package/src/helpers/ScrollToTop/ScrollToTop.jsx +7 -0
- package/news/4104.internal +0 -1
- package/news/4165.feature +0 -1
- package/news/4189.bugfix +0 -1
- package/news/4194.bugfix +0 -1
- package/news/4223.bugfix +0 -1
- package/news/4231.feature +0 -1
- package/news/4282.feature +0 -1
- package/news/4285.feature +0 -1
- package/news/4311.bugfix +0 -1
- package/news/4313.feature +0 -1
package/.changelog.draft
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
## 16.
|
|
1
|
+
## 16.10.0 (2023-02-06)
|
|
2
2
|
|
|
3
3
|
### Feature
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- Add `addNewBlock` Cypress support command @sneridagh [#4313](https://github.com/plone/volto/issues/4313)
|
|
5
|
+
- Option for opening /edit with the same vertical offset like the page in view mode before. @ksuess [#3662](https://github.com/plone/volto/issues/3662)
|
|
6
|
+
- Add option to add an action button to the top of the toolbar and to add a menu button to the bottom of the toolbar. @ksuess [#4333](https://github.com/plone/volto/issues/4333)
|
|
7
|
+
- Update to latest versions in the backend for testing and the convenience api folder @sneridagh [#4361](https://github.com/plone/volto/issues/4361)
|
|
8
|
+
- Content Rules: Support server-provided schema for condition and action @ericof [#4368](https://github.com/plone/volto/issues/4368)
|
|
10
9
|
|
|
11
10
|
### Bugfix
|
|
12
11
|
|
|
13
|
-
-
|
|
14
|
-
- bugfix : add pathname as required proptype in Blocks/Edit @akshatgarg12 [#4194](https://github.com/plone/volto/issues/4194)
|
|
15
|
-
- (Fix) Select Widgets scrolls the page when the options are not visible @dobri1408 [#4223](https://github.com/plone/volto/issues/4223)
|
|
16
|
-
- Updated volto-slate to check for slateSettings before falling back to config @danalvrz [#4311](https://github.com/plone/volto/issues/4311)
|
|
12
|
+
- Fix react-error-overlay resolution @sneridagh [#4360](https://github.com/plone/volto/issues/4360)
|
|
17
13
|
|
|
18
|
-
###
|
|
14
|
+
### Documentation
|
|
19
15
|
|
|
20
|
-
-
|
|
16
|
+
- Add documentation for copy, cut, and paste blocks in Volto. @MAX-786 [#3827](https://github.com/plone/volto/issues/3827)
|
|
17
|
+
- Fixed Grammar error @SaiRev0 [#4272](https://github.com/plone/volto/issues/4272)
|
|
21
18
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.10.0 (2023-02-06)
|
|
12
|
+
|
|
13
|
+
### Feature
|
|
14
|
+
|
|
15
|
+
- Option for opening /edit with the same vertical offset like the page in view mode before. @ksuess [#3662](https://github.com/plone/volto/issues/3662)
|
|
16
|
+
- Add option to add an action button to the top of the toolbar and to add a menu button to the bottom of the toolbar. @ksuess [#4333](https://github.com/plone/volto/issues/4333)
|
|
17
|
+
- Update to latest versions in the backend for testing and the convenience api folder @sneridagh [#4361](https://github.com/plone/volto/issues/4361)
|
|
18
|
+
- Content Rules: Support server-provided schema for condition and action @ericof [#4368](https://github.com/plone/volto/issues/4368)
|
|
19
|
+
|
|
20
|
+
### Bugfix
|
|
21
|
+
|
|
22
|
+
- Fix react-error-overlay resolution @sneridagh [#4360](https://github.com/plone/volto/issues/4360)
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
- Add documentation for copy, cut, and paste blocks in Volto. @MAX-786 [#3827](https://github.com/plone/volto/issues/3827)
|
|
27
|
+
- Fixed Grammar error @SaiRev0 [#4272](https://github.com/plone/volto/issues/4272)
|
|
28
|
+
|
|
29
|
+
|
|
11
30
|
## 16.9.0 (2023-01-27)
|
|
12
31
|
|
|
13
32
|
### Feature
|
|
@@ -24,6 +43,7 @@
|
|
|
24
43
|
- bugfix : add pathname as required proptype in Blocks/Edit @akshatgarg12 [#4194](https://github.com/plone/volto/issues/4194)
|
|
25
44
|
- (Fix) Select Widgets scrolls the page when the options are not visible @dobri1408 [#4223](https://github.com/plone/volto/issues/4223)
|
|
26
45
|
- Updated volto-slate to check for slateSettings before falling back to config @danalvrz [#4311](https://github.com/plone/volto/issues/4311)
|
|
46
|
+
- Fix bug where label of search facet wasn't translated when the content object is being translated @robgietema [#4306](https://github.com/plone/volto/issues/4306)
|
|
27
47
|
|
|
28
48
|
### Internal
|
|
29
49
|
|
|
@@ -35,7 +55,6 @@
|
|
|
35
55
|
### Bugfix
|
|
36
56
|
|
|
37
57
|
- Fix StyleWrapper extenders, the classNames were not being re-fed into the pipe @sneridagh [#4275](https://github.com/plone/volto/issues/4275)
|
|
38
|
-
- Fix bug where label of search facet wasn't translated when the content object is being translated @robgietema
|
|
39
58
|
|
|
40
59
|
|
|
41
60
|
## 16.8.0 (2023-01-18)
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "16.
|
|
12
|
+
"version": "16.10.0",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -422,6 +422,7 @@
|
|
|
422
422
|
"resolutions": {
|
|
423
423
|
"clean-css": "5.3.1",
|
|
424
424
|
"http-proxy": "^1.18.1",
|
|
425
|
+
"react-error-overlay": "6.0.9",
|
|
425
426
|
"ua-parser-js": "0.7.28"
|
|
426
427
|
},
|
|
427
428
|
"volta": {
|
|
@@ -339,6 +339,23 @@ const detectVocabulary = (type) => {
|
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
|
|
342
|
+
const processSchema = (schema) => {
|
|
343
|
+
const properties = { ...schema.properties };
|
|
344
|
+
Object.keys(properties).forEach((key) => {
|
|
345
|
+
const value = properties[key];
|
|
346
|
+
const vocabId = value?.vocabulary?.['@id'];
|
|
347
|
+
if (vocabId?.includes('@sources')) {
|
|
348
|
+
value['widget'] = 'internal_url';
|
|
349
|
+
delete value['vocabulary'];
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
const newSchema = {
|
|
353
|
+
...schema,
|
|
354
|
+
properties,
|
|
355
|
+
};
|
|
356
|
+
return newSchema;
|
|
357
|
+
};
|
|
358
|
+
|
|
342
359
|
const VariableModal = ({
|
|
343
360
|
open,
|
|
344
361
|
type,
|
|
@@ -371,17 +388,27 @@ const VariableModal = ({
|
|
|
371
388
|
React.useEffect(() => {
|
|
372
389
|
//reset input schema to rehydrate options
|
|
373
390
|
setInputSchema('');
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
391
|
+
// On creation, @schema is provided by value
|
|
392
|
+
// On update, @schema comes from formData
|
|
393
|
+
const rawSchema = value['@schema'] || formData['@schema'];
|
|
394
|
+
let schema;
|
|
395
|
+
if (rawSchema) {
|
|
396
|
+
schema = processSchema(rawSchema);
|
|
397
|
+
} else {
|
|
398
|
+
const vocabularyOptions =
|
|
399
|
+
vocabularyName &&
|
|
400
|
+
vocabularies &&
|
|
401
|
+
vocabularies[vocabularyName] &&
|
|
402
|
+
vocabularies[vocabularyName].items
|
|
403
|
+
? vocabularies[vocabularyName].items.map((item, i) => {
|
|
404
|
+
return [item.value, item.label];
|
|
405
|
+
})
|
|
406
|
+
: [];
|
|
407
|
+
//set schema with the new options from vocabulary
|
|
408
|
+
schema = setSchema(value.title, vocabularyOptions);
|
|
409
|
+
}
|
|
410
|
+
setInputSchema(schema);
|
|
411
|
+
|
|
385
412
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
386
413
|
}, [vocabularies, open, formData, value]);
|
|
387
414
|
|
|
@@ -180,10 +180,11 @@ class Form extends Component {
|
|
|
180
180
|
formData.hasOwnProperty(blocksLayoutFieldname) &&
|
|
181
181
|
formData[blocksLayoutFieldname].items.length > 0
|
|
182
182
|
) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
if (config.blocks?.initialBlocksFocus
|
|
186
|
-
//Default selected is not the first block, but the one from config.
|
|
183
|
+
if (config.blocks?.initialBlocksFocus === null) {
|
|
184
|
+
selectedBlock = null;
|
|
185
|
+
} else if (this.props.type in config.blocks?.initialBlocksFocus) {
|
|
186
|
+
// Default selected is not the first block, but the one from config.
|
|
187
|
+
// TODO Select first block and not an arbitrary one.
|
|
187
188
|
Object.keys(formData[blocksFieldname]).forEach((b_key) => {
|
|
188
189
|
if (
|
|
189
190
|
formData[blocksFieldname][b_key]['@type'] ===
|
|
@@ -192,8 +193,11 @@ class Form extends Component {
|
|
|
192
193
|
selectedBlock = b_key;
|
|
193
194
|
}
|
|
194
195
|
});
|
|
196
|
+
} else {
|
|
197
|
+
selectedBlock = formData[blocksLayoutFieldname].items[0];
|
|
195
198
|
}
|
|
196
199
|
}
|
|
200
|
+
|
|
197
201
|
this.state = {
|
|
198
202
|
formData,
|
|
199
203
|
initialFormData: cloneDeep(formData),
|
|
@@ -109,7 +109,7 @@ const messages = defineMessages({
|
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
let toolbarComponents = {
|
|
113
113
|
personalTools: { component: PersonalTools, wrapper: null },
|
|
114
114
|
more: { component: More, wrapper: null },
|
|
115
115
|
types: { component: Types, wrapper: null, contentAsProps: true },
|
|
@@ -210,6 +210,12 @@ class Toolbar extends Component {
|
|
|
210
210
|
if (!hasApiExpander('types', getBaseUrl(this.props.pathname))) {
|
|
211
211
|
this.props.getTypes(getBaseUrl(this.props.pathname));
|
|
212
212
|
}
|
|
213
|
+
toolbarComponents = {
|
|
214
|
+
...(config.settings
|
|
215
|
+
? config.settings.additionalToolbarComponents || {}
|
|
216
|
+
: {}),
|
|
217
|
+
...toolbarComponents,
|
|
218
|
+
};
|
|
213
219
|
this.props.setExpandedToolbar(this.state.expanded);
|
|
214
220
|
document.addEventListener('mousedown', this.handleClickOutside, false);
|
|
215
221
|
}
|
|
@@ -551,9 +557,13 @@ class Toolbar extends Component {
|
|
|
551
557
|
</button>
|
|
552
558
|
</>
|
|
553
559
|
)}
|
|
560
|
+
<Pluggable name="main.toolbar.top" />
|
|
554
561
|
</div>
|
|
555
562
|
<div className="toolbar-bottom">
|
|
556
|
-
<Pluggable
|
|
563
|
+
<Pluggable
|
|
564
|
+
name="main.toolbar.bottom"
|
|
565
|
+
params={{ onClickHandler: this.toggleMenu }}
|
|
566
|
+
/>
|
|
557
567
|
{!this.props.hideDefaultViewButtons && (
|
|
558
568
|
<button
|
|
559
569
|
className="user"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
|
+
import config from '@plone/volto/registry';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
*
|
|
@@ -27,8 +28,14 @@ class ScrollToTop extends React.Component {
|
|
|
27
28
|
* @memberof ScrollToTop
|
|
28
29
|
*/
|
|
29
30
|
componentDidUpdate(prevProps) {
|
|
31
|
+
const noInitialBlocksFocus = // Do not scroll on /edit
|
|
32
|
+
config.blocks?.initialBlocksFocus === null
|
|
33
|
+
? this.props.location?.pathname.slice(-5) !== '/edit'
|
|
34
|
+
: true;
|
|
30
35
|
if (
|
|
36
|
+
!this.props.location?.hash &&
|
|
31
37
|
!this.props.location?.pathname.hash &&
|
|
38
|
+
noInitialBlocksFocus &&
|
|
32
39
|
this.props.location?.pathname !== prevProps.location?.pathname
|
|
33
40
|
) {
|
|
34
41
|
window.scrollTo(0, 0);
|
package/news/4104.internal
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Updated 4 Dependencies @SaiRev0
|
package/news/4165.feature
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Enable scrolling to ids via hashes in internal links @jackahl
|
package/news/4189.bugfix
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Fixed maxLength validation for string type fields @pnicolli
|
package/news/4194.bugfix
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bugfix : add pathname as required proptype in Blocks/Edit @akshatgarg12
|
package/news/4223.bugfix
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(Fix) Select Widgets scrolls the page when the options are not visible @dobri1408
|
package/news/4231.feature
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Read listing block schema from configuration registry @pnicolli
|
package/news/4282.feature
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Add displayName when registering a component @sneridagh
|
package/news/4285.feature
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Support for all default expanders (breadcrumbs, navigation, actions, types) in actions/reducers. Conditional loading of actions if the expanders are present. @sneridagh
|
package/news/4311.bugfix
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Updated volto-slate to check for slateSettings before falling back to config @danalvrz
|
package/news/4313.feature
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Add `addNewBlock` Cypress support command @sneridagh
|