@plone/volto 18.0.0-alpha.26 → 18.0.0-alpha.27
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.md
CHANGED
|
@@ -17,6 +17,13 @@ myst:
|
|
|
17
17
|
|
|
18
18
|
<!-- towncrier release notes start -->
|
|
19
19
|
|
|
20
|
+
## 18.0.0-alpha.27 (2024-04-05)
|
|
21
|
+
|
|
22
|
+
### Bugfix
|
|
23
|
+
|
|
24
|
+
- Enhanced navigation reducer in Volto to keep items extra-data sent from the navigation endpoint @Hrittik20 [#5772](https://github.com/plone/volto/issues/5772)
|
|
25
|
+
- Improve `ColorPickerWidget` typings @sneridagh [#5948](https://github.com/plone/volto/issues/5948)
|
|
26
|
+
|
|
20
27
|
## 18.0.0-alpha.26 (2024-04-03)
|
|
21
28
|
|
|
22
29
|
### Breaking
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "18.0.0-alpha.
|
|
12
|
+
"version": "18.0.0-alpha.27",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -237,8 +237,8 @@
|
|
|
237
237
|
"use-deep-compare-effect": "1.8.1",
|
|
238
238
|
"uuid": "^8.3.2",
|
|
239
239
|
"@plone/registry": "1.5.5",
|
|
240
|
-
"@plone/
|
|
241
|
-
"@plone/
|
|
240
|
+
"@plone/volto-slate": "18.0.0-alpha.11",
|
|
241
|
+
"@plone/scripts": "3.6.1"
|
|
242
242
|
},
|
|
243
243
|
"devDependencies": {
|
|
244
244
|
"@babel/core": "^7.0.0",
|
|
@@ -351,8 +351,8 @@
|
|
|
351
351
|
"webpack-dev-server": "4.11.1",
|
|
352
352
|
"webpack-node-externals": "3.0.0",
|
|
353
353
|
"why": "0.6.2",
|
|
354
|
-
"@plone/
|
|
355
|
-
"@plone/
|
|
354
|
+
"@plone/types": "1.0.0-alpha.10",
|
|
355
|
+
"@plone/volto-coresandbox": "1.0.0"
|
|
356
356
|
},
|
|
357
357
|
"volta": {
|
|
358
358
|
"node": "20.9.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Form } from 'semantic-ui-react';
|
|
3
3
|
import { Grid, Button } from 'semantic-ui-react';
|
|
4
|
-
import { isEqual } from 'lodash';
|
|
4
|
+
import { isEmpty, isEqual } from 'lodash';
|
|
5
5
|
import { defineMessages, useIntl } from 'react-intl';
|
|
6
6
|
|
|
7
7
|
const messages = defineMessages({
|
|
@@ -26,11 +26,11 @@ type Color =
|
|
|
26
26
|
export type ColorPickerWidgetProps = {
|
|
27
27
|
id: string;
|
|
28
28
|
title: string;
|
|
29
|
-
value
|
|
30
|
-
default
|
|
31
|
-
required
|
|
32
|
-
missing_value
|
|
33
|
-
className
|
|
29
|
+
value?: string;
|
|
30
|
+
default?: string | object;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
missing_value?: unknown;
|
|
33
|
+
className?: string;
|
|
34
34
|
onChange: (id: string, value: any) => void;
|
|
35
35
|
colors: Color[];
|
|
36
36
|
};
|
|
@@ -41,7 +41,7 @@ const ColorPickerWidget = (props: ColorPickerWidgetProps) => {
|
|
|
41
41
|
const intl = useIntl();
|
|
42
42
|
|
|
43
43
|
React.useEffect(() => {
|
|
44
|
-
if (
|
|
44
|
+
if (isEmpty(props.value) && props.default) {
|
|
45
45
|
props.onChange(props.id, props.default);
|
|
46
46
|
}
|
|
47
47
|
// Yes, this is correct.
|
|
@@ -31,9 +31,8 @@ const initialState = {
|
|
|
31
31
|
*/
|
|
32
32
|
function getRecursiveItems(items) {
|
|
33
33
|
return map(items, (item) => ({
|
|
34
|
-
title: item.title,
|
|
35
|
-
description: item.description,
|
|
36
34
|
url: flattenToAppURL(item['@id']),
|
|
35
|
+
...item,
|
|
37
36
|
...(item.items && { items: getRecursiveItems(item.items) }),
|
|
38
37
|
}));
|
|
39
38
|
}
|
|
@@ -49,6 +49,7 @@ describe('Navigation reducer', () => {
|
|
|
49
49
|
error: null,
|
|
50
50
|
items: [
|
|
51
51
|
{
|
|
52
|
+
'@id': 'http://localhost:8080/Plone/front-page',
|
|
52
53
|
title: 'Welcome to Plone!',
|
|
53
54
|
description:
|
|
54
55
|
'Congratulations! You have successfully installed Plone.',
|
|
@@ -91,17 +92,20 @@ describe('Navigation reducer', () => {
|
|
|
91
92
|
error: null,
|
|
92
93
|
items: [
|
|
93
94
|
{
|
|
95
|
+
'@id': 'http://localhost:8080/Plone/front-page',
|
|
94
96
|
title: 'Welcome to Plone!',
|
|
95
97
|
description:
|
|
96
98
|
'Congratulations! You have successfully installed Plone.',
|
|
97
99
|
url: '/front-page',
|
|
98
100
|
},
|
|
99
101
|
{
|
|
102
|
+
'@id': 'http://localhost:8080/Plone/folder1',
|
|
100
103
|
title: 'Folder1',
|
|
101
104
|
description: 'Folder description',
|
|
102
105
|
url: '/folder1',
|
|
103
106
|
items: [
|
|
104
107
|
{
|
|
108
|
+
'@id': 'http://localhost:8080/Plone/folderinfolder1',
|
|
105
109
|
title: 'FolderInFolder1',
|
|
106
110
|
description: 'Sub-folder description',
|
|
107
111
|
url: '/folderinfolder1',
|
|
@@ -162,6 +166,7 @@ describe('Navigation reducer (NAVIGATION)GET_CONTENT', () => {
|
|
|
162
166
|
error: null,
|
|
163
167
|
items: [
|
|
164
168
|
{
|
|
169
|
+
'@id': 'http://localhost:8080/Plone/front-page',
|
|
165
170
|
title: 'Welcome to Plone!',
|
|
166
171
|
description:
|
|
167
172
|
'Congratulations! You have successfully installed Plone.',
|
|
@@ -192,6 +197,7 @@ describe('Navigation reducer (NAVIGATION)GET_CONTENT', () => {
|
|
|
192
197
|
error: null,
|
|
193
198
|
items: [
|
|
194
199
|
{
|
|
200
|
+
'@id': 'http://localhost:8080/Plone/front-page',
|
|
195
201
|
title: 'Welcome to Plone!',
|
|
196
202
|
description:
|
|
197
203
|
'Congratulations! You have successfully installed Plone.',
|
|
@@ -10,11 +10,11 @@ type Color = {
|
|
|
10
10
|
export type ColorPickerWidgetProps = {
|
|
11
11
|
id: string;
|
|
12
12
|
title: string;
|
|
13
|
-
value
|
|
14
|
-
default
|
|
15
|
-
required
|
|
16
|
-
missing_value
|
|
17
|
-
className
|
|
13
|
+
value?: string;
|
|
14
|
+
default?: string | object;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
missing_value?: unknown;
|
|
17
|
+
className?: string;
|
|
18
18
|
onChange: (id: string, value: any) => void;
|
|
19
19
|
colors: Color[];
|
|
20
20
|
};
|