@eeacms/volto-eea-website-theme 1.24.3 → 1.25.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.md
CHANGED
@@ -4,15 +4,26 @@ 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.25.0](https://github.com/eea/volto-eea-website-theme/compare/1.24.3...1.25.0) - 12 December 2023
|
8
|
+
|
9
|
+
#### :bug: Bug Fixes
|
10
|
+
|
11
|
+
- fix: customize SidebarPopup volto component [Miu Razvan - [`0bdf736`](https://github.com/eea/volto-eea-website-theme/commit/0bdf736045509938ad562b26c8c87f040c7994e4)]
|
12
|
+
|
13
|
+
#### :house: Documentation changes
|
14
|
+
|
15
|
+
- docs: Update Sidbar customizations README [Alin Voinea - [`7a39ac0`](https://github.com/eea/volto-eea-website-theme/commit/7a39ac0b74aaa0e8f4d0d77d7b6718f297979228)]
|
16
|
+
- docs: Add Sidebar customizations README [Alin Voinea - [`dd220bd`](https://github.com/eea/volto-eea-website-theme/commit/dd220bd4b977320860392a7637b441a41354936d)]
|
17
|
+
|
18
|
+
#### :hammer_and_wrench: Others
|
19
|
+
|
20
|
+
- Release 1.25.0 [Alin Voinea - [`ed2083b`](https://github.com/eea/volto-eea-website-theme/commit/ed2083b6dc1150c6d030f988fbfd94103777844e)]
|
7
21
|
### [1.24.3](https://github.com/eea/volto-eea-website-theme/compare/1.24.2...1.24.3) - 5 December 2023
|
8
22
|
|
9
23
|
#### :rocket: New Features
|
10
24
|
|
11
25
|
- feat: modify the password reset page - refs #259024 [ana-oprea - [`966e441`](https://github.com/eea/volto-eea-website-theme/commit/966e44163b43f8d41535617f0bb491210465751e)]
|
12
26
|
|
13
|
-
#### :hammer_and_wrench: Others
|
14
|
-
|
15
|
-
- Update Twitter logo in Share to section. [Ghiță Bizău - [`b9c7426`](https://github.com/eea/volto-eea-website-theme/commit/b9c7426cc29cf1a981603219cec9c780cd43973b)]
|
16
27
|
### [1.24.2](https://github.com/eea/volto-eea-website-theme/compare/1.24.1...1.24.2) - 4 December 2023
|
17
28
|
|
18
29
|
#### :bug: Bug Fixes
|
package/README.md
CHANGED
@@ -25,6 +25,10 @@ EEA Website [Volto](https://github.com/plone/volto) Theme
|
|
25
25
|
See [Docusaurus](https://eea.github.io/).
|
26
26
|
See [Storybook](https://eea.github.io/eea-storybook/).
|
27
27
|
|
28
|
+
## Volto customizations
|
29
|
+
|
30
|
+
- `volto/components/manage/Sidebar/SidebarPopup` -> https://github.com/plone/volto/pull/5520
|
31
|
+
|
28
32
|
## Getting started
|
29
33
|
|
30
34
|
### Try volto-eea-website-theme with Docker
|
@@ -46,25 +50,25 @@ Go to http://localhost:3000
|
|
46
50
|
|
47
51
|
1. Start Volto frontend
|
48
52
|
|
49
|
-
|
53
|
+
- If you already have a volto project, just update `package.json`:
|
50
54
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
+
```JSON
|
56
|
+
"addons": [
|
57
|
+
"@eeacms/volto-eea-website-theme"
|
58
|
+
],
|
55
59
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
+
"dependencies": {
|
61
|
+
"@eeacms/volto-eea-website-theme": "*"
|
62
|
+
}
|
63
|
+
```
|
60
64
|
|
61
|
-
|
65
|
+
- If not, create one:
|
62
66
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
67
|
+
```
|
68
|
+
npm install -g yo @plone/generator-volto
|
69
|
+
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-eea-website-theme
|
70
|
+
cd my-volto-project
|
71
|
+
```
|
68
72
|
|
69
73
|
1. Install new add-ons and restart Volto:
|
70
74
|
|
package/package.json
CHANGED
@@ -0,0 +1,82 @@
|
|
1
|
+
// Check this https://github.com/plone/volto/pull/5520
|
2
|
+
import React from 'react';
|
3
|
+
import { Portal } from 'react-portal';
|
4
|
+
import { CSSTransition } from 'react-transition-group';
|
5
|
+
import PropTypes from 'prop-types';
|
6
|
+
import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib';
|
7
|
+
|
8
|
+
const DEFAULT_TIMEOUT = 500;
|
9
|
+
|
10
|
+
const SidebarPopup = (props) => {
|
11
|
+
const { children, open, onClose, overlay } = props;
|
12
|
+
|
13
|
+
const asideElement = React.useRef();
|
14
|
+
|
15
|
+
const handleClickOutside = (e) => {
|
16
|
+
if (asideElement && doesNodeContainClick(asideElement.current, e)) return;
|
17
|
+
onClose();
|
18
|
+
};
|
19
|
+
|
20
|
+
React.useEffect(() => {
|
21
|
+
document.addEventListener('mousedown', handleClickOutside, false);
|
22
|
+
return () => {
|
23
|
+
document.removeEventListener('mousedown', handleClickOutside, false);
|
24
|
+
};
|
25
|
+
});
|
26
|
+
|
27
|
+
return (
|
28
|
+
<>
|
29
|
+
{overlay && (
|
30
|
+
<CSSTransition
|
31
|
+
in={open}
|
32
|
+
timeout={DEFAULT_TIMEOUT}
|
33
|
+
classNames="overlay-container"
|
34
|
+
unmountOnExit
|
35
|
+
>
|
36
|
+
<Portal node={document?.body}>
|
37
|
+
<div className="overlay-container"></div>
|
38
|
+
</Portal>
|
39
|
+
</CSSTransition>
|
40
|
+
)}
|
41
|
+
<CSSTransition
|
42
|
+
in={open}
|
43
|
+
timeout={DEFAULT_TIMEOUT}
|
44
|
+
classNames="sidebar-container"
|
45
|
+
unmountOnExit
|
46
|
+
>
|
47
|
+
<Portal>
|
48
|
+
<aside
|
49
|
+
id="test"
|
50
|
+
role="presentation"
|
51
|
+
onClick={(e) => {
|
52
|
+
e.stopPropagation();
|
53
|
+
}}
|
54
|
+
onKeyDown={(e) => {
|
55
|
+
e.stopPropagation();
|
56
|
+
}}
|
57
|
+
ref={asideElement}
|
58
|
+
key="sidebarpopup"
|
59
|
+
className="sidebar-container"
|
60
|
+
style={{ overflowY: 'auto' }}
|
61
|
+
>
|
62
|
+
{children}
|
63
|
+
</aside>
|
64
|
+
</Portal>
|
65
|
+
</CSSTransition>
|
66
|
+
</>
|
67
|
+
);
|
68
|
+
};
|
69
|
+
|
70
|
+
SidebarPopup.propTypes = {
|
71
|
+
open: PropTypes.bool,
|
72
|
+
onClose: PropTypes.func,
|
73
|
+
overlay: PropTypes.bool,
|
74
|
+
};
|
75
|
+
|
76
|
+
SidebarPopup.defaultProps = {
|
77
|
+
open: false,
|
78
|
+
onClose: () => {},
|
79
|
+
overlay: false,
|
80
|
+
};
|
81
|
+
|
82
|
+
export default SidebarPopup;
|