@plone/volto 16.5.0 → 16.6.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 -6
- package/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/index.js +2 -0
- package/src/components/manage/Blocks/Search/components/SortOn.jsx +1 -0
- package/src/components/manage/Widgets/NumberWidget.jsx +4 -1
- package/src/routes.js +30 -4
- package/src/routes.test.js +34 -0
- package/news/4113.bug +0 -1
package/.changelog.draft
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
## 16.
|
|
1
|
+
## 16.6.0 (2022-12-23)
|
|
2
2
|
|
|
3
3
|
### Feature
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Allow passing the `step` prop to NumberWidget @tiberiuichim [#4152](https://github.com/plone/volto/issues/4152)
|
|
6
6
|
|
|
7
7
|
### Bugfix
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- Fix categorization list is not readable when there are longer values or filtering @iFlameing [#4113](https://github.com/plone/volto/issues/4113)
|
|
10
|
+
- Add scroll into view settings @robgietema [#4140](https://github.com/plone/volto/issues/4140)
|
|
11
|
+
- Remove searching capabilities of SortOn component of Search Block @iFlameing [#4162](https://github.com/plone/volto/issues/4162)
|
|
12
|
+
- Fixed externalRoutes short version @pnicolli [#4182](https://github.com/plone/volto/issues/4182)
|
|
11
13
|
|
|
12
|
-
###
|
|
14
|
+
### Documentation
|
|
13
15
|
|
|
14
|
-
-
|
|
16
|
+
- Fix URLs to Plone 6 docs. @stevepiercy [#4143](https://github.com/plone/volto/issues/4143)
|
|
17
|
+
- Fix Sphinx warning Document headings start at H2, not H1 [myst.header]. @stevepiercy [#4145](https://github.com/plone/volto/issues/4145)
|
|
15
18
|
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.6.0 (2022-12-23)
|
|
12
|
+
|
|
13
|
+
### Feature
|
|
14
|
+
|
|
15
|
+
- Allow passing the `step` prop to NumberWidget @tiberiuichim [#4152](https://github.com/plone/volto/issues/4152)
|
|
16
|
+
|
|
17
|
+
### Bugfix
|
|
18
|
+
|
|
19
|
+
- Fix categorization list is not readable when there are longer values or filtering @iFlameing [#4113](https://github.com/plone/volto/issues/4113)
|
|
20
|
+
- Add scroll into view settings @robgietema [#4140](https://github.com/plone/volto/issues/4140)
|
|
21
|
+
- Remove searching capabilities of SortOn component of Search Block @iFlameing [#4162](https://github.com/plone/volto/issues/4162)
|
|
22
|
+
- Fixed externalRoutes short version @pnicolli [#4182](https://github.com/plone/volto/issues/4182)
|
|
23
|
+
|
|
24
|
+
### Documentation
|
|
25
|
+
|
|
26
|
+
- Fix URLs to Plone 6 docs. @stevepiercy [#4143](https://github.com/plone/volto/issues/4143)
|
|
27
|
+
- Fix Sphinx warning Document headings start at H2, not H1 [myst.header]. @stevepiercy [#4145](https://github.com/plone/volto/issues/4145)
|
|
28
|
+
|
|
29
|
+
|
|
11
30
|
## 16.5.0 (2022-12-16)
|
|
12
31
|
|
|
13
32
|
### Feature
|
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ const NumberWidget = (props) => {
|
|
|
32
32
|
maximum,
|
|
33
33
|
minimum,
|
|
34
34
|
placeholder,
|
|
35
|
+
step,
|
|
35
36
|
} = props;
|
|
36
37
|
|
|
37
38
|
return (
|
|
@@ -43,6 +44,7 @@ const NumberWidget = (props) => {
|
|
|
43
44
|
disabled={isDisabled}
|
|
44
45
|
min={minimum || null}
|
|
45
46
|
max={maximum || null}
|
|
47
|
+
step={step}
|
|
46
48
|
value={value ?? ''}
|
|
47
49
|
placeholder={placeholder}
|
|
48
50
|
onChange={({ target }) =>
|
|
@@ -65,7 +67,7 @@ const NumberWidget = (props) => {
|
|
|
65
67
|
NumberWidget.propTypes = {
|
|
66
68
|
id: PropTypes.string.isRequired,
|
|
67
69
|
title: PropTypes.string.isRequired,
|
|
68
|
-
description: PropTypes.string,
|
|
70
|
+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
69
71
|
required: PropTypes.bool,
|
|
70
72
|
error: PropTypes.arrayOf(PropTypes.string),
|
|
71
73
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
@@ -73,6 +75,7 @@ NumberWidget.propTypes = {
|
|
|
73
75
|
wrapped: PropTypes.bool,
|
|
74
76
|
maximum: PropTypes.number,
|
|
75
77
|
minimum: PropTypes.number,
|
|
78
|
+
step: PropTypes.number,
|
|
76
79
|
placeholder: PropTypes.string,
|
|
77
80
|
};
|
|
78
81
|
|
package/src/routes.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Routes.
|
|
3
3
|
* @module routes
|
|
4
4
|
*/
|
|
5
|
+
import debug from 'debug';
|
|
6
|
+
import { compact } from 'lodash';
|
|
5
7
|
import {
|
|
6
8
|
Add,
|
|
7
9
|
AddonsControlpanel,
|
|
@@ -93,12 +95,36 @@ export const multilingualRoutes = [
|
|
|
93
95
|
},
|
|
94
96
|
];
|
|
95
97
|
|
|
98
|
+
export function getExternalRoutes() {
|
|
99
|
+
return compact(
|
|
100
|
+
(config.settings?.externalRoutes || []).map((route) => {
|
|
101
|
+
const newRoute = {
|
|
102
|
+
component: NotFound,
|
|
103
|
+
};
|
|
104
|
+
if (typeof route.match === 'string') {
|
|
105
|
+
newRoute.path = route.match;
|
|
106
|
+
return newRoute;
|
|
107
|
+
} else if (
|
|
108
|
+
typeof route.match === 'object' &&
|
|
109
|
+
!Array.isArray(route.match)
|
|
110
|
+
) {
|
|
111
|
+
return {
|
|
112
|
+
...newRoute,
|
|
113
|
+
...route.match,
|
|
114
|
+
};
|
|
115
|
+
} else {
|
|
116
|
+
debug('routes')(
|
|
117
|
+
'Got invalid externalRoute, please check the configuration.',
|
|
118
|
+
);
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
96
125
|
export const defaultRoutes = [
|
|
97
126
|
// redirect to external links if path is in blacklist
|
|
98
|
-
...(
|
|
99
|
-
...route.match,
|
|
100
|
-
component: NotFound,
|
|
101
|
-
})),
|
|
127
|
+
...getExternalRoutes(),
|
|
102
128
|
...((config.settings?.isMultilingual && multilingualRoutes) || []),
|
|
103
129
|
{
|
|
104
130
|
path: '/',
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import config from './registry';
|
|
2
|
+
import { getExternalRoutes } from './routes';
|
|
3
|
+
|
|
4
|
+
describe('externalRoutes', () => {
|
|
5
|
+
it('computes regular externalRoutes correctly', () => {
|
|
6
|
+
config.settings.externalRoutes = [
|
|
7
|
+
{
|
|
8
|
+
match: {
|
|
9
|
+
path: '/test',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
];
|
|
13
|
+
const testRoute = getExternalRoutes().find((r) => r.path === '/test');
|
|
14
|
+
expect(testRoute).not.toBeUndefined();
|
|
15
|
+
});
|
|
16
|
+
it('computes shorthand externalRoutes correctly', () => {
|
|
17
|
+
config.settings.externalRoutes = [{ match: '/test' }];
|
|
18
|
+
const testRoute = getExternalRoutes().find((r) => r.path === '/test');
|
|
19
|
+
expect(testRoute).not.toBeUndefined();
|
|
20
|
+
});
|
|
21
|
+
it('ignores invalid routes', () => {
|
|
22
|
+
config.settings.externalRoutes = [
|
|
23
|
+
'/test',
|
|
24
|
+
{ '/test': true },
|
|
25
|
+
['/test'],
|
|
26
|
+
{ match: ['/test'] },
|
|
27
|
+
{ match: 123 },
|
|
28
|
+
];
|
|
29
|
+
const externalRoutes = getExternalRoutes();
|
|
30
|
+
const testRoute = externalRoutes.find((r) => r.path === '/test');
|
|
31
|
+
expect(testRoute).toBeUndefined();
|
|
32
|
+
expect(externalRoutes.length).toEqual(0);
|
|
33
|
+
});
|
|
34
|
+
});
|
package/news/4113.bug
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Fix categorization list is not readable when there are longer values or filtering @iFlameing
|