@plone/volto 16.20.3 → 16.20.5
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 +14 -2
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +43 -13
- package/CONTRIBUTING.md +1 -1
- package/README.md +4 -4
- package/package.json +2 -2
- package/packages/volto-slate/package.json +1 -1
- package/src/components/theme/Login/Login.jsx +1 -0
- package/src/helpers/Url/Url.js +8 -3
- package/src/helpers/Url/Url.test.js +14 -0
- package/src/middleware/Api.test.js +54 -0
- package/src/middleware/api.js +1 -1
- package/theme/themes/pastanaga/extras/sidebar.less +4 -0
package/.changelog.draft
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
## 16.20.
|
|
1
|
+
## 16.20.5 (2023-05-12)
|
|
2
2
|
|
|
3
3
|
### Bugfix
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Apply suggestion from browser for password field @lord2anil [#3990](https://github.com/plone/volto/issues/3990)
|
|
6
|
+
- The tabs for the add page was unresponsive on mobile devices. Fixed this by changing flex-wrap property. @sudhanshu1309 [#4506](https://github.com/plone/volto/issues/4506)
|
|
7
|
+
- (fix):Object.normaliseMail: Cannot read properties of null @dobri1408 [#4558](https://github.com/plone/volto/issues/4558)
|
|
8
|
+
|
|
9
|
+
### Internal
|
|
10
|
+
|
|
11
|
+
- Upgrade to Plone 6.0.4 @sneridagh [#4743](https://github.com/plone/volto/issues/4743)
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
- Added documentation regarding the static middleware. @BhardwajAditya-github [#4518](https://github.com/plone/volto/issues/4518)
|
|
16
|
+
- Backport most documentation differences from `master` to `16.x.x`. @stevepiercy [#4727](https://github.com/plone/volto/issues/4727)
|
|
17
|
+
- Fix link in Volto, remove from linkcheck ignore in Documentation. @stevepiercy [#4742](https://github.com/plone/volto/issues/4742)
|
|
6
18
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,36 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.20.5 (2023-05-12)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Apply suggestion from browser for password field @lord2anil [#3990](https://github.com/plone/volto/issues/3990)
|
|
16
|
+
- The tabs for the add page was unresponsive on mobile devices. Fixed this by changing flex-wrap property. @sudhanshu1309 [#4506](https://github.com/plone/volto/issues/4506)
|
|
17
|
+
- (fix):Object.normaliseMail: Cannot read properties of null @dobri1408 [#4558](https://github.com/plone/volto/issues/4558)
|
|
18
|
+
|
|
19
|
+
### Internal
|
|
20
|
+
|
|
21
|
+
- Upgrade to Plone 6.0.4 @sneridagh [#4743](https://github.com/plone/volto/issues/4743)
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
- Added documentation regarding the static middleware. @BhardwajAditya-github [#4518](https://github.com/plone/volto/issues/4518)
|
|
26
|
+
- Backport most documentation differences from `master` to `16.x.x`. @stevepiercy [#4727](https://github.com/plone/volto/issues/4727)
|
|
27
|
+
- Fix link in Volto, remove from linkcheck ignore in Documentation. @stevepiercy [#4742](https://github.com/plone/volto/issues/4742)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 16.20.4 (2023-04-20)
|
|
31
|
+
|
|
32
|
+
### Bugfix
|
|
33
|
+
|
|
34
|
+
- Fix fetching API paths with urlencoded characters in the querystring. @davisagli [#4718](https://github.com/plone/volto/issues/4718)
|
|
35
|
+
|
|
36
|
+
### Internal
|
|
37
|
+
|
|
38
|
+
- Security upgrade for momentjs [#4716](https://github.com/plone/volto/issues/4716)
|
|
39
|
+
|
|
40
|
+
|
|
11
41
|
## 16.20.3 (2023-04-18)
|
|
12
42
|
|
|
13
43
|
### Bugfix
|
|
@@ -263,7 +293,7 @@
|
|
|
263
293
|
|
|
264
294
|
### Documentation
|
|
265
295
|
|
|
266
|
-
- Complete teaser docs, add new section in `Blocks`: `Core Blocks developers notes` @sneridagh [#4461](https://github.com/plone/volto/
|
|
296
|
+
- Complete teaser docs, add new section in `Blocks`: `Core Blocks developers notes` @sneridagh [#4461](https://github.com/plone/volto/pull/4461)
|
|
267
297
|
|
|
268
298
|
|
|
269
299
|
## 16.14.0 (2023-03-03)
|
|
@@ -593,7 +623,7 @@
|
|
|
593
623
|
- Enable the use of yarn 3 in the build by default @sneridagh
|
|
594
624
|
- The `ContentsBreadcrumbs` component now renders the whole language name of the language root folder (if any) instead of just the `id` (before: `de`, now: `Deutsch`) @sneridagh
|
|
595
625
|
|
|
596
|
-
See https://6.
|
|
626
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
597
627
|
|
|
598
628
|
### Feature
|
|
599
629
|
|
|
@@ -1088,7 +1118,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
|
|
|
1088
1118
|
- Moved all sentry-related code from Volto to the `@plone-collective/volto-sentry` package. @tiberiuichim
|
|
1089
1119
|
- The listing block icon has been improved to avoid confusion with the normal text list. @sneridagh
|
|
1090
1120
|
|
|
1091
|
-
See https://6.
|
|
1121
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1092
1122
|
|
|
1093
1123
|
### Feature
|
|
1094
1124
|
|
|
@@ -1198,7 +1228,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
|
|
|
1198
1228
|
|
|
1199
1229
|
- Sentry integration is now lazy-loaded. The `sentryOptions` key from the `settings` registry becomes a callable that passes resolved sentry libraries. @tiberiuichim
|
|
1200
1230
|
|
|
1201
|
-
See https://6.
|
|
1231
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1202
1232
|
|
|
1203
1233
|
### Feature
|
|
1204
1234
|
|
|
@@ -1262,7 +1292,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
|
|
|
1262
1292
|
- Upgrade to Razzle 4 @davisagli
|
|
1263
1293
|
- Jest downgraded from 27 to 26 @davisagli
|
|
1264
1294
|
|
|
1265
|
-
See https://6.
|
|
1295
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1266
1296
|
|
|
1267
1297
|
### Internal
|
|
1268
1298
|
|
|
@@ -1302,7 +1332,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
|
|
|
1302
1332
|
### Breaking
|
|
1303
1333
|
|
|
1304
1334
|
- `react-window` no longer a Volto dependency @sneridagh
|
|
1305
|
-
See https://6.
|
|
1335
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1306
1336
|
|
|
1307
1337
|
### Bugfix
|
|
1308
1338
|
|
|
@@ -1341,7 +1371,7 @@ See https://6.dev-docs.plone.org/volto/upgrade-guide/index.html for more informa
|
|
|
1341
1371
|
### Breaking
|
|
1342
1372
|
|
|
1343
1373
|
- Move Layout constants to `config.views.layoutViewsNamesMapping`. Complete the list. i18n the list. Improve Display component. @sneridagh
|
|
1344
|
-
See https://6.
|
|
1374
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1345
1375
|
|
|
1346
1376
|
### Feature
|
|
1347
1377
|
|
|
@@ -1387,7 +1417,7 @@ Undo html_static_path configuration in `plone/documentation`, and restore image
|
|
|
1387
1417
|
### Breaking
|
|
1388
1418
|
|
|
1389
1419
|
- Main workflow change menu changed from Pastanaga UI simplification to classic Plone implementation. @sneridagh
|
|
1390
|
-
See https://6.
|
|
1420
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1391
1421
|
|
|
1392
1422
|
### Feature
|
|
1393
1423
|
|
|
@@ -1483,7 +1513,7 @@ Undo html_static_path configuration in `plone/documentation`, and restore image
|
|
|
1483
1513
|
- change password-reset url to be consistent with Plone configuration @erral
|
|
1484
1514
|
- Simplify over the existing Component Registry API. The `component` key has been flattened for simplification and now it's mapped directly to the `component` argument of `registerComponent`. @sneridagh
|
|
1485
1515
|
|
|
1486
|
-
See https://6.
|
|
1516
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
1487
1517
|
|
|
1488
1518
|
### Feature
|
|
1489
1519
|
|
|
@@ -2061,14 +2091,14 @@ Use next release instead: https://github.com/plone/volto/releases/tag/16.0.0-alp
|
|
|
2061
2091
|
### Breaking
|
|
2062
2092
|
|
|
2063
2093
|
- Upgrade `react-cookie` to the latest version. @sneridagh @robgietema
|
|
2064
|
-
See https://6.
|
|
2094
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
2065
2095
|
- Language Switcher no longer takes care of the change of the language on the Redux Store. This responsibility has been unified in the API Redux middleware @sneridagh
|
|
2066
2096
|
- Markup change in `LinkView` component.
|
|
2067
2097
|
- Rename `core-sandbox` to `coresandbox` for sake of consistency @sneridagh
|
|
2068
2098
|
- Extend the original intent and rename `RAZZLE_TESTING_ADDONS` to `ADDONS`. @sneridagh
|
|
2069
|
-
See https://6.
|
|
2099
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
2070
2100
|
- Lazyload Draft.js library. See the upgrade guide on how that impacts you, in case you have extended the rich text editor configuration @tiberiuichim @kreafox
|
|
2071
|
-
See https://6.
|
|
2101
|
+
See https://6.docs.plone.org/volto/upgrade-guide/index.html for more information.
|
|
2072
2102
|
- Deprecating `lang` cookie in favor of Plone official one `I18N_LANGUAGE` @sneridagh
|
|
2073
2103
|
|
|
2074
2104
|
### Feature
|
|
@@ -5014,7 +5044,7 @@ https://6.docs.plone.org/volto/upgrade-guide/index.html
|
|
|
5014
5044
|
- Added item type as a tooltip in contents @nzambello
|
|
5015
5045
|
- Added Italian translations and translated array, token and select widget. @giuliaghisini
|
|
5016
5046
|
- Added uploading image preview in FileWidget @iFlameing
|
|
5017
|
-
- Allow custom express middleware declared with `settings.expressMiddleware`. See [Custom Express middleware](https://6.
|
|
5047
|
+
- Allow custom express middleware declared with `settings.expressMiddleware`. See [Custom Express middleware](https://6.docs.plone.org/volto/recipes/express.html) @tiberiuichim
|
|
5018
5048
|
|
|
5019
5049
|
### Bugfix
|
|
5020
5050
|
|
package/CONTRIBUTING.md
CHANGED
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ Please create a new [issue](https://github.com/plone/volto/issues/new) or [pull
|
|
|
181
181
|
|
|
182
182
|
## Documentation
|
|
183
183
|
|
|
184
|
-
You can find the latest
|
|
184
|
+
You can find the latest documentation in [https://6.docs.plone.org/](https://6.docs.plone.org/volto/index.html)
|
|
185
185
|
|
|
186
186
|
## Training
|
|
187
187
|
|
|
@@ -243,7 +243,7 @@ We do not guarantee that deprecated browsers (e.g., Internet Explorer 11) are su
|
|
|
243
243
|
|
|
244
244
|
## Upgrades
|
|
245
245
|
|
|
246
|
-
You can find the upgrade guide here: https://6.
|
|
246
|
+
You can find the upgrade guide here: https://6.docs.plone.org/volto/upgrade-guide/index.html
|
|
247
247
|
|
|
248
248
|
## Volto Development
|
|
249
249
|
|
|
@@ -318,11 +318,11 @@ yarn test
|
|
|
318
318
|
|
|
319
319
|
Here you can find a guide on how acceptance testing is done in Volto:
|
|
320
320
|
|
|
321
|
-
https://6.
|
|
321
|
+
https://6.docs.plone.org/volto/developer-guidelines/acceptance-tests.html
|
|
322
322
|
|
|
323
323
|
## Translations
|
|
324
324
|
|
|
325
|
-
If you would like contribute to translate Volto into several languages, please, read the [Internationalization (i18n) guide](https://6.
|
|
325
|
+
If you would like contribute to translate Volto into several languages, please, read the [Internationalization (i18n) guide](https://6.docs.plone.org/volto/recipes/i18n.html).
|
|
326
326
|
|
|
327
327
|
## Contributors
|
|
328
328
|
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "16.20.
|
|
12
|
+
"version": "16.20.5",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
"lodash-move": "1.1.1",
|
|
314
314
|
"lodash-webpack-plugin": "0.11.5",
|
|
315
315
|
"mini-css-extract-plugin": "0.9.0",
|
|
316
|
-
"moment": "2.
|
|
316
|
+
"moment": "2.29.4",
|
|
317
317
|
"object-assign": "4.1.1",
|
|
318
318
|
"pofile": "1.0.10",
|
|
319
319
|
"postcss": "8.4.13",
|
package/src/helpers/Url/Url.js
CHANGED
|
@@ -280,14 +280,14 @@ export function isTelephone(text) {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
export function normaliseMail(email) {
|
|
283
|
-
if (email
|
|
283
|
+
if (email?.toLowerCase()?.startsWith('mailto:')) {
|
|
284
284
|
return email;
|
|
285
285
|
}
|
|
286
286
|
return `mailto:${email}`;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
export function normalizeTelephone(tel) {
|
|
290
|
-
if (tel
|
|
290
|
+
if (tel?.toLowerCase()?.startsWith('tel:')) {
|
|
291
291
|
return tel;
|
|
292
292
|
}
|
|
293
293
|
return `tel:${tel}`;
|
|
@@ -310,12 +310,17 @@ export function checkAndNormalizeUrl(url) {
|
|
|
310
310
|
res.url = URLUtils.normalizeTelephone(url);
|
|
311
311
|
} else {
|
|
312
312
|
//url
|
|
313
|
-
if (
|
|
313
|
+
if (
|
|
314
|
+
res.url?.length >= 0 &&
|
|
315
|
+
!res.url.startsWith('/') &&
|
|
316
|
+
!res.url.startsWith('#')
|
|
317
|
+
) {
|
|
314
318
|
res.url = URLUtils.normalizeUrl(url);
|
|
315
319
|
if (!URLUtils.isUrl(res.url)) {
|
|
316
320
|
res.isValid = false;
|
|
317
321
|
}
|
|
318
322
|
}
|
|
323
|
+
if (res.url === undefined || res.url === null) res.isValid = false;
|
|
319
324
|
}
|
|
320
325
|
return res;
|
|
321
326
|
}
|
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
removeProtocol,
|
|
15
15
|
addAppURL,
|
|
16
16
|
expandToBackendURL,
|
|
17
|
+
checkAndNormalizeUrl,
|
|
18
|
+
normaliseMail,
|
|
19
|
+
normalizeTelephone,
|
|
17
20
|
} from './Url';
|
|
18
21
|
|
|
19
22
|
beforeEach(() => {
|
|
@@ -61,6 +64,17 @@ describe('Url', () => {
|
|
|
61
64
|
it('return empty string if no url is empty string', () => {
|
|
62
65
|
expect(getBaseUrl('')).toBe('');
|
|
63
66
|
});
|
|
67
|
+
it('return a null/undefined mailto adress ', () => {
|
|
68
|
+
expect(normaliseMail(null)).toBe('mailto:null');
|
|
69
|
+
expect(normaliseMail(undefined)).toBe('mailto:undefined');
|
|
70
|
+
});
|
|
71
|
+
it('return a null/undefined telephone number', () => {
|
|
72
|
+
expect(normalizeTelephone(null)).toBe('tel:null');
|
|
73
|
+
expect(normalizeTelephone(undefined)).toBe('tel:undefined');
|
|
74
|
+
});
|
|
75
|
+
it('null returns an invalid link', () => {
|
|
76
|
+
expect(checkAndNormalizeUrl(null).isValid).toBe(false);
|
|
77
|
+
});
|
|
64
78
|
});
|
|
65
79
|
|
|
66
80
|
describe('getView', () => {
|
|
@@ -53,6 +53,60 @@ describe('api middleware helpers', () => {
|
|
|
53
53
|
);
|
|
54
54
|
expect(result).toEqual('/de/mypage/@navigation?expand.navigation.depth=3');
|
|
55
55
|
});
|
|
56
|
+
it('addExpandersToPath - Path matching, preserve query', () => {
|
|
57
|
+
config.settings.apiExpanders = [
|
|
58
|
+
{
|
|
59
|
+
match: '/de/mypage',
|
|
60
|
+
GET_CONTENT: ['mycustomexpander', 'mycustomexpander2'],
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const result = addExpandersToPath(
|
|
65
|
+
'/de/mypage/@navigation?expand.navigation.depth=3',
|
|
66
|
+
GET_CONTENT,
|
|
67
|
+
);
|
|
68
|
+
expect(result).toEqual(
|
|
69
|
+
'/de/mypage/@navigation?expand=mycustomexpander,mycustomexpander2&expand.navigation.depth=3',
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
it('addExpandersToPath - Path matching, preserve query with multiple', () => {
|
|
73
|
+
config.settings.apiExpanders = [
|
|
74
|
+
{
|
|
75
|
+
match: '/de/mypage',
|
|
76
|
+
GET_CONTENT: ['mycustomexpander', 'mycustomexpander2'],
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const result = addExpandersToPath(
|
|
81
|
+
'/de/mypage/@navigation?expand.navigation.depth=3&expand.other=2',
|
|
82
|
+
GET_CONTENT,
|
|
83
|
+
);
|
|
84
|
+
expect(result).toEqual(
|
|
85
|
+
'/de/mypage/@navigation?expand=mycustomexpander,mycustomexpander2&expand.navigation.depth=3&expand.other=2',
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
it('addExpandersToPath - Path not matching, preserve encoded query', () => {
|
|
89
|
+
config.settings.apiExpanders = [
|
|
90
|
+
{
|
|
91
|
+
match: '/de/otherpath',
|
|
92
|
+
GET_CONTENT: ['mycustomexpander'],
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
const result = addExpandersToPath('/de/mypage?query=a%26b', GET_CONTENT);
|
|
97
|
+
expect(result).toEqual('/de/mypage?query=a%26b');
|
|
98
|
+
});
|
|
99
|
+
it('addExpandersToPath - Path matching, preserve encoded query', () => {
|
|
100
|
+
config.settings.apiExpanders = [
|
|
101
|
+
{
|
|
102
|
+
match: '/de/mypage',
|
|
103
|
+
GET_CONTENT: ['mycustomexpander'],
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
const result = addExpandersToPath('/de/mypage?query=a%26b', GET_CONTENT);
|
|
108
|
+
expect(result).toEqual('/de/mypage?expand=mycustomexpander&query=a%26b');
|
|
109
|
+
});
|
|
56
110
|
it('addExpandersToPath - Two custom expanders from settings', () => {
|
|
57
111
|
config.settings.apiExpanders = [
|
|
58
112
|
{
|
package/src/middleware/api.js
CHANGED
|
@@ -43,7 +43,7 @@ export function addExpandersToPath(path, type, isAnonymous) {
|
|
|
43
43
|
const {
|
|
44
44
|
url,
|
|
45
45
|
query: { expand, ...query },
|
|
46
|
-
} = qs.parseUrl(path);
|
|
46
|
+
} = qs.parseUrl(path, { decode: false });
|
|
47
47
|
|
|
48
48
|
const expandersFromConfig = apiExpanders
|
|
49
49
|
.filter((expand) => matchPath(url, expand.match) && expand[type])
|