@eeacms/volto-cca-policy 0.1.85 → 0.1.86

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,18 @@ 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.86](https://github.com/eea/volto-cca-policy/compare/0.1.85...0.1.86) - 1 March 2024
8
+
9
+ #### :nail_care: Enhancements
10
+
11
+ - change(banner): improve BannerTitle component [kreafox - [`bb49297`](https://github.com/eea/volto-cca-policy/commit/bb49297ff439dba1b8174cb65c9aae2fc419d047)]
12
+
13
+ #### :house: Internal changes
14
+
15
+ - style(stats): CSS fixes [kreafox - [`696c0fd`](https://github.com/eea/volto-cca-policy/commit/696c0fda6241f264f097e76812ada3b30b2ef760)]
16
+ - style(stats): fix z-index on count [kreafox - [`aeaaf1c`](https://github.com/eea/volto-cca-policy/commit/aeaaf1cc912a946b5c2553937c41940b926d3dd8)]
17
+ - style: improve tab items on hover [kreafox - [`7b0bc8b`](https://github.com/eea/volto-cca-policy/commit/7b0bc8b8e398503521d86048f96c5d2749595a55)]
18
+
7
19
  ### [0.1.85](https://github.com/eea/volto-cca-policy/compare/0.1.84...0.1.85) - 29 February 2024
8
20
 
9
21
  #### :house: Internal changes
@@ -483,10 +495,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
483
495
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
484
496
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
485
497
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
498
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
499
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
486
500
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
487
501
 
488
502
  #### :house: Internal changes
489
503
 
504
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
490
505
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
491
506
 
492
507
  #### :hammer_and_wrench: Others
@@ -503,6 +518,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
503
518
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
504
519
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
505
520
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
521
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
522
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
523
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
506
524
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
507
525
  - Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
508
526
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -719,6 +737,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
719
737
 
720
738
  #### :house: Internal changes
721
739
 
740
+ - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
722
741
 
723
742
  #### :hammer_and_wrench: Others
724
743
 
@@ -1199,6 +1218,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1199
1218
  #### :hammer_and_wrench: Others
1200
1219
 
1201
1220
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
1221
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
1202
1222
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
1203
1223
 
1204
1224
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
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",
@@ -24,7 +24,7 @@ const useStats = (path, id, data) => {
24
24
 
25
25
  export const StatVoltoIcon = ({ name, value, source, showLabel = false }) => {
26
26
  return (
27
- <div className="tab-icon" title={value}>
27
+ <div className="tab-icon" title={name}>
28
28
  <div className="tab-icon-wrapper">
29
29
  {!source && name}
30
30
  {!!source && <Icon title={name} name={source} size="50" />}
@@ -37,7 +37,7 @@ export const StatVoltoIcon = ({ name, value, source, showLabel = false }) => {
37
37
 
38
38
  export const RemixIcon = ({ name, value, source, showLabel = false }) => {
39
39
  return (
40
- <div className="tab-icon semantic-icon" title={value}>
40
+ <div className="tab-icon semantic-icon" title={name}>
41
41
  <div className="tab-icon-wrapper">
42
42
  {!!source && <UiIcon title={name} name={source} />}
43
43
  <span className="count">{value}</span>
@@ -100,6 +100,7 @@ export default function CollectionStatsView(props) {
100
100
  .sort((a, b) => a.localeCompare(b))
101
101
  .map((k) => (
102
102
  <UniversalLink
103
+ className="tab-item-link"
103
104
  key={k}
104
105
  href={urlHandler({
105
106
  base,
@@ -7,11 +7,17 @@
7
7
  display: flex;
8
8
  flex-direction: row;
9
9
  flex-wrap: wrap;
10
- margin: 2em 0;
11
- gap: 2.5em;
10
+ margin: 1em 0;
11
+ gap: 1em;
12
12
 
13
- .semantic-icon i.icon {
14
- font-size: 3em;
13
+ .semantic-icon {
14
+ i.icon {
15
+ font-size: 2em;
16
+ }
17
+
18
+ .label {
19
+ width: 85px !important;
20
+ }
15
21
  }
16
22
 
17
23
  .tab-icon-wrapper {
@@ -19,18 +25,31 @@
19
25
  display: inline-block;
20
26
  }
21
27
 
28
+ .tab-item-link:hover {
29
+ .count {
30
+ background-color: @ccaGreenColor;
31
+ }
32
+
33
+ .tab-icon,
34
+ .label {
35
+ color: @primaryColor;
36
+ }
37
+ }
38
+
22
39
  .tab-icon {
23
40
  color: @secondaryColor;
24
41
  text-align: center;
25
42
 
26
43
  .label {
27
44
  display: block;
28
- max-width: 130px;
45
+ width: 120px;
46
+ color: @contentAreaColor;
47
+ font-size: 14px;
29
48
  }
30
49
 
31
50
  .count {
32
51
  position: absolute;
33
- z-index: 100;
52
+ z-index: 1;
34
53
  top: auto;
35
54
  bottom: 0;
36
55
  left: 100%;
@@ -1,22 +1,28 @@
1
1
  import config from '@plone/volto/registry';
2
2
 
3
+ const hasTypeOfBlock = (type, blocks) => {
4
+ const block = blocks
5
+ ? Object.keys(blocks).find((id) => blocks?.[id]?.['@type'] === type)
6
+ : null;
7
+
8
+ return block;
9
+ };
10
+
3
11
  const BannerTitle = (props) => {
4
12
  const { content } = props;
13
+ const { blocks } = content;
5
14
  const {
6
15
  blocks: { blocksConfig },
7
16
  } = config;
8
17
  const TitleBlockView = blocksConfig?.title?.view;
9
- const hasTitleBlock = content?.blocks
10
- ? Object.keys(content?.blocks).find(
11
- (id) => content?.blocks?.[id]?.['@type'] === 'title',
12
- )
13
- : null;
14
- const isHomePage =
15
- ['Subsite', 'LRF', 'Plone Site'].indexOf(content?.['@type']) > -1;
18
+ const hasTitleBlock = hasTypeOfBlock('title', blocks);
19
+ const hasCountryFlagBlock = hasTypeOfBlock('countryFlag', blocks);
20
+ const types = ['Subsite', 'LRF', 'Plone Site'];
21
+ const isHomePage = types.indexOf(content?.['@type']) > -1;
16
22
 
17
23
  return !isHomePage ? (
18
24
  <>
19
- {!hasTitleBlock ? (
25
+ {!hasTitleBlock && !hasCountryFlagBlock ? (
20
26
  <TitleBlockView
21
27
  {...props}
22
28
  data={{