@eeacms/volto-cca-policy 0.1.58 → 0.1.60

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,21 @@ 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
+ ### [0.1.60](https://github.com/eea/volto-cca-policy/compare/0.1.59...0.1.60) - 16 January 2024
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Refs #257070 - Fix mega menu behavior, add configuration for visible folders and children. [GhitaB - [`c4d9108`](https://github.com/eea/volto-cca-policy/commit/c4d9108c50c5bbd10a5f1f913d7547aba71d2e8c)]
12
+ - Refs #260715 - rast map check rast accordiion test [Tripon Eugen - [`ed9805d`](https://github.com/eea/volto-cca-policy/commit/ed9805dbd39b648b2267758dd72510aba9214ab7)]
13
+ - Refs #260715 - rast map check root_path eslint [Tripon Eugen - [`23df223`](https://github.com/eea/volto-cca-policy/commit/23df223f6827e182e6a6a456cf1caae38ecd0bbb)]
14
+ - Refs #260715 - rast map check root_path not set [Tripon Eugen - [`8693b04`](https://github.com/eea/volto-cca-policy/commit/8693b0429985b2419581b2cbcf4993fa994961aa)]
15
+ - Refs #260715 - rast map align center [Tripon Eugen - [`b58c5cb`](https://github.com/eea/volto-cca-policy/commit/b58c5cb3d9ed08e3de2d3bb1dd3d0995f70a3c9e)]
16
+ ### [0.1.59](https://github.com/eea/volto-cca-policy/compare/0.1.58...0.1.59) - 5 January 2024
17
+
18
+ #### :nail_care: Enhancements
19
+
20
+ - change: update footer color [kreafox - [`3385e33`](https://github.com/eea/volto-cca-policy/commit/3385e3301fe8a1482a0b74feef7e0111dbf36bd9)]
21
+
7
22
  ### [0.1.58](https://github.com/eea/volto-cca-policy/compare/0.1.57...0.1.58) - 4 January 2024
8
23
 
9
24
  #### :house: Internal changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -21,7 +21,7 @@ describe('RASTAccordion', () => {
21
21
  },
22
22
  ],
23
23
  activeMenu: 1,
24
- curent_location: '/',
24
+ curent_location: '/my-item-href',
25
25
  };
26
26
 
27
27
  const store = mockStore({
@@ -70,7 +70,7 @@ export default function RASTMap(props) {
70
70
  height="43"
71
71
  rx="21.5"
72
72
  stroke="white"
73
- stroke-width="2"
73
+ strokeWidth="2"
74
74
  />
75
75
  </LinkWrap>
76
76
  <LinkWrap
@@ -98,7 +98,7 @@ export default function RASTMap(props) {
98
98
  height="43"
99
99
  rx="21.5"
100
100
  stroke="white"
101
- stroke-width="2"
101
+ strokeWidth="2"
102
102
  />
103
103
  </LinkWrap>
104
104
  <LinkWrap
@@ -126,7 +126,7 @@ export default function RASTMap(props) {
126
126
  height="43"
127
127
  rx="21.5"
128
128
  stroke="white"
129
- stroke-width="2"
129
+ strokeWidth="2"
130
130
  />
131
131
  </LinkWrap>
132
132
  <LinkWrap
@@ -154,7 +154,7 @@ export default function RASTMap(props) {
154
154
  height="43"
155
155
  rx="21.5"
156
156
  stroke="white"
157
- stroke-width="2"
157
+ strokeWidth="2"
158
158
  />
159
159
  </LinkWrap>
160
160
  <LinkWrap
@@ -182,7 +182,7 @@ export default function RASTMap(props) {
182
182
  height="43"
183
183
  rx="21.5"
184
184
  stroke="white"
185
- stroke-width="2"
185
+ strokeWidth="2"
186
186
  />
187
187
  </LinkWrap>
188
188
 
@@ -211,7 +211,7 @@ export default function RASTMap(props) {
211
211
  height="43"
212
212
  rx="21.5"
213
213
  stroke="white"
214
- stroke-width="2"
214
+ strokeWidth="2"
215
215
  />
216
216
  </LinkWrap>
217
217
 
@@ -362,7 +362,7 @@ export default function RASTMap(props) {
362
362
  gradientUnits="userSpaceOnUse"
363
363
  >
364
364
  <stop stop-color="#BFDC80" />
365
- <stop offset="1" stop-color="#AAD055" stop-opacity="0.1" />
365
+ <stop offset="1" stop-color="#AAD055" stopOpacity="0.1" />
366
366
  </linearGradient>
367
367
  </defs>
368
368
  </svg>
@@ -23,8 +23,10 @@ export default function RASTView(props) {
23
23
  if (typeof root_path === 'undefined') {
24
24
  root_path = '/';
25
25
  }
26
-
27
- const items = useChildren(root_path);
26
+ let items = useChildren(root_path);
27
+ if (root_path === '/') {
28
+ items = [];
29
+ }
28
30
 
29
31
  return (
30
32
  <div className="block rast-block">
@@ -30,3 +30,9 @@ svg * {
30
30
  .rast-block .item.active a {
31
31
  font-weight: bold;
32
32
  }
33
+
34
+ .rast-map-block {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ }
@@ -286,6 +286,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
286
286
  )}
287
287
  renderMenuItem={(item, options, props) => (
288
288
  <UniversalLink
289
+ openLinkInNewTab={false}
289
290
  href={item.url || '/'}
290
291
  title={item.nav_title || item.title}
291
292
  {...(options || {})}
@@ -227,6 +227,7 @@ const Main = ({
227
227
  if (searchIsActive) setSearchIsActive(false);
228
228
  setActiveItem(item['@id'] || item.url);
229
229
  if (item.items.length) {
230
+ e.preventDefault();
230
231
  setMenuIsActive(true);
231
232
  } else {
232
233
  if (isInternalURL(item.url)) {
@@ -347,9 +347,11 @@ function HeaderMenuPopUp({
347
347
  );
348
348
 
349
349
  const layout =
350
- !!menuItemsLayouts &&
351
- Object.keys(menuItemsLayouts).includes(menuItem?.url) &&
352
- menuItemsLayouts[menuItem.url];
350
+ (!!menuItemsLayouts &&
351
+ Object.keys(menuItemsLayouts).includes(menuItem?.url) &&
352
+ menuItemsLayouts[menuItem.url]) ||
353
+ (!!menuItemsLayouts && menuItemsLayouts['*']) ||
354
+ {};
353
355
 
354
356
  return (
355
357
  <Transition visible={visible} animation="slide down" duration={300}>
package/src/index.js CHANGED
@@ -276,6 +276,19 @@ const applyConfig = (config) => {
276
276
  },
277
277
  ];
278
278
 
279
+ // mega menu layout settings
280
+ config.settings.menuItemsLayouts = {
281
+ // '*': {
282
+ // hideChildrenFromNavigation: false,
283
+ // },
284
+ '/en/eu-policy': {
285
+ hideChildrenFromNavigation: false,
286
+ },
287
+ '/en/knowledge-1': {
288
+ hideChildrenFromNavigation: false,
289
+ },
290
+ };
291
+
279
292
  // Custom results
280
293
  config.settings.searchlib.resolve.HealthHorizontalCardItem = {
281
294
  component: HealthHorizontalCardItem,
@@ -2,5 +2,14 @@
2
2
  Footer
3
3
  *******************************/
4
4
 
5
- // @mobileFooterBackgroundGrandient : linear-gradient(45deg, @primaryColor 12%, @secondaryColor 80%);
6
- // @computerFooterBackgroundGrandient : linear-gradient(45deg, @primaryColor 12%, @secondaryColor 80%);
5
+ @mobileFooterBackgroundGradient: linear-gradient(
6
+ 212.33deg,
7
+ @secondaryColor 12%,
8
+ #004c80 80%
9
+ );
10
+
11
+ @computerFooterBackgroundGradient: linear-gradient(
12
+ 212.33deg,
13
+ @secondaryColor 12%,
14
+ #004c80 80%
15
+ );
@@ -4,4 +4,4 @@
4
4
 
5
5
  /* Search box */
6
6
  // @searchBoxBackgroundGradient : linear-gradient(45deg, @primaryColor 12%, @secondaryColor 80%);
7
- // @megaMenuBackgroundColor : linear-gradient(45deg, @primaryColor 12%, @secondaryColor 80%);
7
+ @megaMenuBackgroundColor : linear-gradient(13.69deg, @blue-5 1.17%, @secondaryColor 80%);
@@ -9,15 +9,15 @@
9
9
  --------------------*/
10
10
 
11
11
  // @primaryColor: @green-6;
12
- // @secondaryColor: @green-4;
12
+ @secondaryColor: #005c97;
13
13
 
14
14
  // @linkColor: @secondaryColor;
15
15
  // @linkHoverColor: @primaryColor;
16
16
  // @linkActiveColor: @linkHoverColor;
17
17
 
18
18
  // Toolbar
19
- @toolbarWidth : 80px;
20
- @collapsedToolbarWidth : 20px;
21
- @mobileToolbarHeight : 100px;
22
- @mobileCollapsedToolbarHeight : 20px;
23
- @sidebarWidth : 375px;
19
+ @toolbarWidth: 80px;
20
+ @collapsedToolbarWidth: 20px;
21
+ @mobileToolbarHeight: 100px;
22
+ @mobileCollapsedToolbarHeight: 20px;
23
+ @sidebarWidth: 375px;