@eeacms/volto-eea-website-theme 2.1.2 → 2.1.4
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
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
4
4
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
6
6
|
|
7
|
+
### [2.1.4](https://github.com/eea/volto-eea-website-theme/compare/2.1.3...2.1.4) - 30 July 2024
|
8
|
+
|
9
|
+
#### :bug: Bug Fixes
|
10
|
+
|
11
|
+
- fix(slate): don't customize slate li element, ref #269872 [Miu Razvan - [`945afa5`](https://github.com/eea/volto-eea-website-theme/commit/945afa5c1076de4779d46f602300a61adf41937d)]
|
12
|
+
|
13
|
+
### [2.1.3](https://github.com/eea/volto-eea-website-theme/compare/2.1.2...2.1.3) - 22 July 2024
|
14
|
+
|
7
15
|
### [2.1.2](https://github.com/eea/volto-eea-website-theme/compare/2.1.1...2.1.2) - 14 June 2024
|
8
16
|
|
9
17
|
#### :house: Internal changes
|
package/package.json
CHANGED
@@ -29,6 +29,7 @@ const UniversalLink = ({
|
|
29
29
|
const token = useSelector((state) => state.userSession?.token);
|
30
30
|
|
31
31
|
let url = href;
|
32
|
+
|
32
33
|
if (!href && item) {
|
33
34
|
if (!item['@id']) {
|
34
35
|
// eslint-disable-next-line no-console
|
@@ -51,10 +52,10 @@ const UniversalLink = ({
|
|
51
52
|
|
52
53
|
//case: item of type 'File'
|
53
54
|
if (
|
54
|
-
|
55
|
+
download &&
|
55
56
|
config.settings.downloadableObjects.includes(item['@type'])
|
56
57
|
) {
|
57
|
-
url = `${url}/@@download/file`;
|
58
|
+
url = url.includes('/@@download/file') ? url : `${url}/@@download/file`;
|
58
59
|
}
|
59
60
|
|
60
61
|
if (
|
@@ -68,10 +69,10 @@ const UniversalLink = ({
|
|
68
69
|
|
69
70
|
const isExternal = !isInternalURL(url);
|
70
71
|
|
71
|
-
const isDownload =
|
72
|
+
const isDownload = !isExternal && url && url.includes('@@download/file');
|
73
|
+
|
72
74
|
const isDisplayFile =
|
73
75
|
(!isExternal && url.includes('@@display-file')) || false;
|
74
|
-
|
75
76
|
const checkedURL = URLUtils.checkAndNormalizeUrl(url);
|
76
77
|
|
77
78
|
// we can receive an item with a linkWithHash property set from ObjectBrowserWidget
|
package/src/slate.js
CHANGED
@@ -286,12 +286,6 @@ export default function installSlate(config) {
|
|
286
286
|
</List>
|
287
287
|
);
|
288
288
|
|
289
|
-
config.settings.slate.elements.li = ({ attributes, children }) => (
|
290
|
-
<List.Item as="li" {...attributes}>
|
291
|
-
{children}
|
292
|
-
</List.Item>
|
293
|
-
);
|
294
|
-
|
295
289
|
config.settings.slate.allowedHeadlineElements.push('zotero');
|
296
290
|
|
297
291
|
// Slate StyleMenu configuration
|