@eeacms/volto-eea-website-theme 1.3.2 → 1.4.1
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 +24 -0
- package/package.json +2 -2
- package/src/components/manage/Blocks/Title/schema.js +18 -9
- package/src/components/theme/Banner/View.jsx +15 -1
- package/src/components/theme/Logo.jsx +1 -1
- package/src/config.js +2 -2
- package/src/customizations/volto/components/manage/Sidebar/ObjectBrowserNav.jsx +140 -0
- package/src/customizations/volto/components/theme/Header/Header.jsx +1 -0
- package/theme/site/imageicons/imageicons.less +5 -0
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,30 @@ 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
|
+
### [1.4.1](https://github.com/eea/volto-eea-website-theme/compare/1.4.0...1.4.1) - 29 December 2022
|
8
|
+
|
9
|
+
#### :bug: Bug Fixes
|
10
|
+
|
11
|
+
- fix(Sidebar): Fix relative import typo [Alin Voinea - [`a731bbb`](https://github.com/eea/volto-eea-website-theme/commit/a731bbb6186c41349cb38e3662176aede4d1dd08)]
|
12
|
+
- fix(Sidebar): Fix relative import [Alin Voinea - [`020c0b4`](https://github.com/eea/volto-eea-website-theme/commit/020c0b4ba62814ee51c7ffbc6a0cde22ffd6fa34)]
|
13
|
+
|
14
|
+
### [1.4.0](https://github.com/eea/volto-eea-website-theme/compare/1.3.2...1.4.0) - 28 December 2022
|
15
|
+
|
16
|
+
#### :rocket: New Features
|
17
|
+
|
18
|
+
- feat(sidebar): Allow previewing images when selecting them with the file picker - refs #152099 [dobri1408 - [`57949d8`](https://github.com/eea/volto-eea-website-theme/commit/57949d80d6a0b081210ee982af26eeee9865ecbe)]
|
19
|
+
- feat(language): Show/hide language menu based on supportedLanguages - refs #158616 [Alin Voinea - [`31c96c5`](https://github.com/eea/volto-eea-website-theme/commit/31c96c528a5f86c0a106749ec117006121835ec6)]
|
20
|
+
|
21
|
+
#### :nail_care: Enhancements
|
22
|
+
|
23
|
+
- change(logo): reference after latest release of volto-eea-design-system [David Ichim - [`c29781d`](https://github.com/eea/volto-eea-website-theme/commit/c29781db3455e1a42b184ba203131cac2ce8768a)]
|
24
|
+
|
25
|
+
#### :hammer_and_wrench: Others
|
26
|
+
|
27
|
+
- Release 1.4.0 [Alin Voinea - [`bd42a0d`](https://github.com/eea/volto-eea-website-theme/commit/bd42a0d26e928cac5d99933194755da3db06b341)]
|
28
|
+
- bump version to use as volto-eea-design-system [David Ichim - [`f4be047`](https://github.com/eea/volto-eea-website-theme/commit/f4be047328b46399b03b612d378b18aaf82e7dc1)]
|
29
|
+
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`9b7cfef`](https://github.com/eea/volto-eea-website-theme/commit/9b7cfefb4d34fc1c948015e491feb370f9795bd8)]
|
30
|
+
- test(Jenkins): Run tests and cypress with latest canary @plone/volto [Alin Voinea - [`df252a9`](https://github.com/eea/volto-eea-website-theme/commit/df252a9bfed0bb86cadf53c59dd1603b1e2cd822)]
|
7
31
|
### [1.3.2](https://github.com/eea/volto-eea-website-theme/compare/1.3.1...1.3.2) - 16 December 2022
|
8
32
|
|
9
33
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eeacms/volto-eea-website-theme",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.4.1",
|
4
4
|
"description": "@eeacms/volto-eea-website-theme: Volto add-on",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"url": "git@github.com:eea/volto-eea-website-theme.git"
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@eeacms/volto-eea-design-system": "
|
25
|
+
"@eeacms/volto-eea-design-system": "^1.0.0-alpha.8",
|
26
26
|
"volto-subsites": "*"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
@@ -35,11 +35,11 @@ export default {
|
|
35
35
|
title: 'Actions',
|
36
36
|
fields: ['hideShareButton', 'hideDownloadButton'],
|
37
37
|
},
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
{
|
39
|
+
id: 'copyright',
|
40
|
+
title: 'Copyright',
|
41
|
+
fields: ['copyright', 'copyrightIcon', 'copyrightPosition'],
|
42
|
+
},
|
43
43
|
],
|
44
44
|
properties: {
|
45
45
|
hideContentType: {
|
@@ -71,10 +71,19 @@ export default {
|
|
71
71
|
widget: 'object_list',
|
72
72
|
schema: infoSchema,
|
73
73
|
},
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
copyright: {
|
75
|
+
title: 'Text',
|
76
|
+
},
|
77
|
+
copyrightIcon: {
|
78
|
+
title: 'Icon',
|
79
|
+
default: 'ri-copyright-line',
|
80
|
+
},
|
81
|
+
copyrightPosition: {
|
82
|
+
title: 'Align',
|
83
|
+
widget: 'align',
|
84
|
+
actions: ['left', 'right'],
|
85
|
+
defaultValue: 'left',
|
86
|
+
},
|
78
87
|
},
|
79
88
|
required: [],
|
80
89
|
};
|
@@ -5,10 +5,11 @@ import { withRouter } from 'react-router';
|
|
5
5
|
import { defineMessages, injectIntl } from 'react-intl';
|
6
6
|
import { startCase } from 'lodash';
|
7
7
|
import qs from 'querystring';
|
8
|
-
import { Container, Popup } from 'semantic-ui-react';
|
8
|
+
import { Container, Popup, Icon } from 'semantic-ui-react';
|
9
9
|
import { flattenToAppURL } from '@plone/volto/helpers';
|
10
10
|
import Banner from './Banner';
|
11
11
|
import { getImageSource, sharePage } from './Banner';
|
12
|
+
import Copyright from '@eeacms/volto-eea-design-system/ui/Copyright/Copyright';
|
12
13
|
|
13
14
|
import './styles.less';
|
14
15
|
|
@@ -83,6 +84,9 @@ const View = (props) => {
|
|
83
84
|
hideModificationDate,
|
84
85
|
hideShareButton,
|
85
86
|
hideDownloadButton,
|
87
|
+
copyright,
|
88
|
+
copyrightIcon,
|
89
|
+
copyrightPosition,
|
86
90
|
// contentType,
|
87
91
|
} = props.data;
|
88
92
|
// Set query parameters
|
@@ -222,6 +226,16 @@ const View = (props) => {
|
|
222
226
|
/>
|
223
227
|
))}
|
224
228
|
</Banner.Metadata>
|
229
|
+
{copyright ? (
|
230
|
+
<Copyright copyrightPosition={copyrightPosition}>
|
231
|
+
<Copyright.Icon>
|
232
|
+
<Icon className={copyrightIcon} />
|
233
|
+
</Copyright.Icon>
|
234
|
+
<Copyright.Text>{copyright}</Copyright.Text>
|
235
|
+
</Copyright>
|
236
|
+
) : (
|
237
|
+
''
|
238
|
+
)}
|
225
239
|
</Banner.Content>
|
226
240
|
</ContainerWrapper>
|
227
241
|
</div>
|
@@ -3,7 +3,7 @@ import { defineMessages, useIntl } from 'react-intl';
|
|
3
3
|
import config from '@plone/volto/registry';
|
4
4
|
|
5
5
|
import { Logo } from '@eeacms/volto-eea-design-system/ui';
|
6
|
-
import LogoImage from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/
|
6
|
+
import LogoImage from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo.svg';
|
7
7
|
|
8
8
|
const messages = defineMessages({
|
9
9
|
site: {
|
package/src/config.js
CHANGED
@@ -8,8 +8,8 @@ import copernicusLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/
|
|
8
8
|
import industryLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/industry.svg';
|
9
9
|
import marineLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/marine.svg';
|
10
10
|
import eionetLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eionet.svg';
|
11
|
-
import eeaLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/
|
12
|
-
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-white.svg';
|
11
|
+
import eeaLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo.svg';
|
12
|
+
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo-white.svg';
|
13
13
|
import climateLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/climate-health.svg';
|
14
14
|
|
15
15
|
// TODO: to be consolidated with headerLinks
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Button, Segment, Popup } from 'semantic-ui-react';
|
3
|
+
import { useIntl, defineMessages } from 'react-intl';
|
4
|
+
import cx from 'classnames';
|
5
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
6
|
+
import { flattenToAppURL, getContentIcon } from '@plone/volto/helpers';
|
7
|
+
import { Image } from 'semantic-ui-react';
|
8
|
+
import config from '@plone/volto/registry';
|
9
|
+
import '@eeacms/volto-eea-website-theme/../theme/site/imageicons/imageicons.less';
|
10
|
+
|
11
|
+
import rightArrowSVG from '@plone/volto/icons/right-key.svg';
|
12
|
+
import homeSVG from '@plone/volto/icons/home.svg';
|
13
|
+
|
14
|
+
const messages = defineMessages({
|
15
|
+
browse: {
|
16
|
+
id: 'Browse',
|
17
|
+
defaultMessage: 'Browse',
|
18
|
+
},
|
19
|
+
select: {
|
20
|
+
id: 'Select',
|
21
|
+
defaultMessage: 'Select',
|
22
|
+
},
|
23
|
+
});
|
24
|
+
|
25
|
+
const ObjectBrowserNav = ({
|
26
|
+
currentSearchResults,
|
27
|
+
selected,
|
28
|
+
handleClickOnItem,
|
29
|
+
handleDoubleClickOnItem,
|
30
|
+
mode,
|
31
|
+
navigateTo,
|
32
|
+
isSelectable,
|
33
|
+
}) => {
|
34
|
+
const intl = useIntl();
|
35
|
+
const isSelected = (item) => {
|
36
|
+
let ret = false;
|
37
|
+
if (selected) {
|
38
|
+
selected
|
39
|
+
.filter((item) => item != null)
|
40
|
+
.forEach((_item) => {
|
41
|
+
if (flattenToAppURL(_item['@id']) === flattenToAppURL(item['@id'])) {
|
42
|
+
ret = true;
|
43
|
+
}
|
44
|
+
});
|
45
|
+
}
|
46
|
+
return ret;
|
47
|
+
};
|
48
|
+
|
49
|
+
return (
|
50
|
+
<Segment as="ul" className="object-listing">
|
51
|
+
{currentSearchResults &&
|
52
|
+
currentSearchResults.items.map((item) => (
|
53
|
+
<li
|
54
|
+
role="presentation"
|
55
|
+
aria-label={
|
56
|
+
item.is_folderish && mode === 'image'
|
57
|
+
? `${intl.formatMessage(messages.browse)} ${item.title}`
|
58
|
+
: `${intl.formatMessage(messages.select)} ${item.title}`
|
59
|
+
}
|
60
|
+
key={item['@id']}
|
61
|
+
className={cx('', {
|
62
|
+
'selected-item': isSelected(item),
|
63
|
+
|
64
|
+
disabled:
|
65
|
+
mode === 'image'
|
66
|
+
? !config.settings.imageObjects.includes(item['@type']) &&
|
67
|
+
!item.is_folderish
|
68
|
+
: !isSelectable(item),
|
69
|
+
})}
|
70
|
+
onClick={() => handleClickOnItem(item)}
|
71
|
+
onDoubleClick={() => handleDoubleClickOnItem(item)}
|
72
|
+
>
|
73
|
+
<span title={`${item['@id']} (${item['@type']})`}>
|
74
|
+
<Popup
|
75
|
+
key={item['@id']}
|
76
|
+
content={
|
77
|
+
<>
|
78
|
+
<Icon name={homeSVG} size="18px" />{' '}
|
79
|
+
{flattenToAppURL(item['@id'])} ( {item['@type']})
|
80
|
+
</>
|
81
|
+
}
|
82
|
+
trigger={
|
83
|
+
<span>
|
84
|
+
{item['@type'] === 'Image' ? (
|
85
|
+
<Image
|
86
|
+
src={`${item?.getURL}/@@images/image`}
|
87
|
+
className="sidebar-image-icon"
|
88
|
+
/>
|
89
|
+
) : (
|
90
|
+
<Icon
|
91
|
+
name={getContentIcon(item['@type'], item.is_folderish)}
|
92
|
+
size="24px"
|
93
|
+
/>
|
94
|
+
)}
|
95
|
+
</span>
|
96
|
+
}
|
97
|
+
/>
|
98
|
+
|
99
|
+
{item.title}
|
100
|
+
</span>
|
101
|
+
{item.is_folderish && mode === 'image' && (
|
102
|
+
<Icon
|
103
|
+
className="right-arrow-icon"
|
104
|
+
name={rightArrowSVG}
|
105
|
+
size="24px"
|
106
|
+
/>
|
107
|
+
)}
|
108
|
+
{item.is_folderish && (mode === 'link' || mode === 'multiple') && (
|
109
|
+
<div
|
110
|
+
role="presentation"
|
111
|
+
className="right-arrow-link-mode"
|
112
|
+
onClick={(e) => {
|
113
|
+
e.stopPropagation();
|
114
|
+
navigateTo(item['@id']);
|
115
|
+
}}
|
116
|
+
>
|
117
|
+
<Button.Group>
|
118
|
+
<Button
|
119
|
+
basic
|
120
|
+
icon
|
121
|
+
aria-label={`${intl.formatMessage(messages.browse)} ${
|
122
|
+
item.title
|
123
|
+
}`}
|
124
|
+
>
|
125
|
+
<Icon
|
126
|
+
className="right-arrow-icon"
|
127
|
+
name={rightArrowSVG}
|
128
|
+
size="24px"
|
129
|
+
/>
|
130
|
+
</Button>
|
131
|
+
</Button.Group>
|
132
|
+
</div>
|
133
|
+
)}
|
134
|
+
</li>
|
135
|
+
))}
|
136
|
+
</Segment>
|
137
|
+
);
|
138
|
+
};
|
139
|
+
|
140
|
+
export default ObjectBrowserNav;
|
@@ -153,6 +153,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
|
|
153
153
|
<Header.TopDropdownMenu
|
154
154
|
id="language-switcher"
|
155
155
|
className="item"
|
156
|
+
hasLanguageDropdown={config.settings.supportedLanguages.length > 1}
|
156
157
|
text={`${language.toUpperCase()}`}
|
157
158
|
mobileText={`${language.toUpperCase()}`}
|
158
159
|
icon={
|