@eeacms/volto-cca-policy 0.2.25 → 0.2.26

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,16 @@ 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.2.26](https://github.com/eea/volto-cca-policy/compare/0.2.25...0.2.26) - 17 May 2024
8
+
9
+ #### :house: Internal changes
10
+
11
+ - style: improve styling for tiles listing [kreafox - [`731c9e3`](https://github.com/eea/volto-cca-policy/commit/731c9e39eefcba2739b2e2f52e1cd695882e2704)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - test: update snapshots [kreafox - [`5e47286`](https://github.com/eea/volto-cca-policy/commit/5e47286700aa6b0a70e2636e988eaabb631e62c5)]
16
+ - Fallback to effective in sort [Tiberiu Ichim - [`3c77aaa`](https://github.com/eea/volto-cca-policy/commit/3c77aaa9aca8280bf4df516b5adde6ab7e35d706)]
7
17
  ### [0.2.25](https://github.com/eea/volto-cca-policy/compare/0.2.24...0.2.25) - 16 May 2024
8
18
 
9
19
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
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,10 +24,10 @@ const portalTypeIcons = {
24
24
  Guidance: 'compass',
25
25
  Indicator: 'area chart',
26
26
  'Information portal': 'info circle',
27
- 'Publication reference': 'newspaper',
27
+ 'Publications and reports': 'newspaper',
28
28
  'Research and knowledge project': 'university',
29
29
  Tool: 'wrench',
30
- Video: 'video play',
30
+ 'Videos and podcasts': 'video play',
31
31
  // 'eea.climateadapt.aceproject': '',
32
32
  // 'eea.climateadapt.adaptationoption': '',
33
33
  // 'eea.climateadapt.c3sindicator': '',
@@ -42,11 +42,11 @@ const portalTypesToSearchTypes = {
42
42
  'eea.climateadapt.indicator': 'Indicator',
43
43
  'eea.climateadapt.c3sindicator': 'Indicator',
44
44
  'eea.climateadapt.informationportal': 'Information portal',
45
- 'eea.climateadapt.publicationreport': 'Publication reference',
45
+ 'eea.climateadapt.publicationreport': 'Publications and reports',
46
46
  'eea.climateadapt.aceproject': 'Research and knowledge project',
47
47
  'eea.climateadapt.researchproject': 'Research and knowledge project',
48
48
  'eea.climateadapt.tool': 'Tool',
49
- 'eea.climateadapt.video': 'Video',
49
+ 'eea.climateadapt.video': 'Videos and podcasts',
50
50
  // TODO: what about these?
51
51
  // 'eea.climateadapt.aceproject': '',
52
52
  // 'eea.climateadapt.mapgraphdataset': '',
@@ -8,7 +8,7 @@
8
8
  flex-direction: row;
9
9
  flex-wrap: wrap;
10
10
  margin: 1em 0;
11
- gap: 1em;
11
+ gap: 0.7em;
12
12
 
13
13
  .semantic-icon {
14
14
  i.icon {
@@ -102,7 +102,7 @@ const applyQuery = (id, data, currentLang, impacts, sectors) => {
102
102
  block: id,
103
103
  limit: data.nr_items,
104
104
  query: defaultQuery,
105
- sort_on: data.sortBy,
105
+ sort_on: data.sortBy || 'effective',
106
106
  sort_order: 'descending',
107
107
  template: 'summary',
108
108
  itemModel: { '@type': 'simpleItem' },
@@ -151,7 +151,7 @@ const FilterAceContentView = (props) => {
151
151
 
152
152
  return (
153
153
  <div className="block filter-acecontent-block">
154
- {data.title && <h3>{data.title}</h3>}
154
+ {data.title && <h4>{data.title}</h4>}
155
155
  <h5>
156
156
  <FormattedMessage id="Climate impact" defaultMessage="Climate impact" />
157
157
  </h5>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { List } from 'semantic-ui-react';
2
+ import { List, ListItem, ListContent, ListIcon } from 'semantic-ui-react';
3
3
  import { Link } from 'react-router-dom';
4
4
  import { flattenToAppURL } from '@plone/volto/helpers';
5
5
 
@@ -24,14 +24,20 @@ const RelevantAceContentView = (props) => {
24
24
  const showBlock = (items && items.length > 0) || results.length > 0;
25
25
 
26
26
  const itemList = (items || []).map((item, index) => (
27
- <List.Item key={index}>
28
- <Link to={flattenToAppURL(item.link)}>{item.item_title}</Link>
29
- </List.Item>
27
+ <ListItem key={index}>
28
+ <ListIcon name="angle right" />
29
+ <ListContent>
30
+ <Link to={flattenToAppURL(item.link)}>{item.item_title}</Link>
31
+ </ListContent>
32
+ </ListItem>
30
33
  ));
31
34
  const resultsList = results.map((result, index) => (
32
- <List.Item key={index} title={result[1]}>
33
- <Link to={flattenToAppURL(result[4])}>{result[0]}</Link>
34
- </List.Item>
35
+ <ListItem key={index} title={result[1]}>
36
+ <ListIcon name="angle right" />
37
+ <ListContent>
38
+ <Link to={flattenToAppURL(result[4])}>{result[0]}</Link>
39
+ </ListContent>
40
+ </ListItem>
35
41
  ));
36
42
  const showResults = hasAnyFilter || search_text != null;
37
43
 
@@ -40,14 +46,14 @@ const RelevantAceContentView = (props) => {
40
46
  {title && <h4>{title}</h4>}
41
47
 
42
48
  {combine_results ? (
43
- <>
49
+ <List>
44
50
  {itemList}
45
51
  {!isEdit && showResults && resultsList}
46
- </>
52
+ </List>
47
53
  ) : items && items.length > 0 ? (
48
- itemList
54
+ <List>{itemList}</List>
49
55
  ) : (
50
- !isEdit && showResults && resultsList
56
+ <List>{!isEdit && showResults && resultsList}</List>
51
57
  )}
52
58
  </div>
53
59
  ) : (
@@ -1,4 +1,4 @@
1
- import { List, Icon } from 'semantic-ui-react';
1
+ import { List, Icon, ListItem, ListContent, ListIcon } from 'semantic-ui-react';
2
2
  import { Link } from 'react-router-dom';
3
3
  import { flattenToAppURL } from '@plone/volto/helpers';
4
4
  import { useIntl, FormattedMessage } from 'react-intl';
@@ -13,12 +13,18 @@ export default function SearchAceContentView(props) {
13
13
  {data.title && <h4>{data.title}</h4>}
14
14
  <List>
15
15
  {results.map((result, index) => (
16
- <List.Item key={index}>
17
- <Link to={flattenToAppURL(result[2])}>
18
- {intl.formatMessage({ id: result[0], defaultMessage: result[0] })}{' '}
19
- ({result[1]})
20
- </Link>
21
- </List.Item>
16
+ <ListItem key={index}>
17
+ <ListIcon name="angle right" />
18
+ <ListContent>
19
+ <Link to={flattenToAppURL(result[2])}>
20
+ {intl.formatMessage({
21
+ id: result[0],
22
+ defaultMessage: result[0],
23
+ })}{' '}
24
+ ({result[1]})
25
+ </Link>
26
+ </ListContent>
27
+ </ListItem>
22
28
  ))}
23
29
  </List>
24
30
  <Link
@@ -0,0 +1,78 @@
1
+ .relevant-acecontent-block,
2
+ .search-acecontent-block {
3
+ .ui.list > .item a,
4
+ .ui.list .list > .item a {
5
+ color: @linkColor;
6
+
7
+ &:hover {
8
+ color: @linkHoverColor;
9
+ }
10
+ }
11
+ .content {
12
+ padding-left: 6px !important;
13
+ }
14
+ .ui.list > .item > i.icon {
15
+ top: 5px;
16
+ position: relative;
17
+ padding: 0;
18
+ color: @linkColor;
19
+ font-size: 14px;
20
+ }
21
+ }
22
+
23
+ .filter-acecontent-block {
24
+ .react-select-container {
25
+ width: 230px;
26
+ border: 1px solid #bcbec0;
27
+
28
+ .react-select__control {
29
+ min-height: auto;
30
+ border: none;
31
+ }
32
+
33
+ .react-select__value-container {
34
+ padding: 5px !important;
35
+ }
36
+
37
+ .react-select__menu {
38
+ border: 1px solid #bcbec0;
39
+ width: 230px;
40
+ margin-left: -1px;
41
+ border-top: none;
42
+ margin-top: -1px;
43
+ }
44
+
45
+ .react-select__indicator {
46
+ top: 4px;
47
+ right: 6px;
48
+ position: relative;
49
+ }
50
+ }
51
+ .listing-body {
52
+ position: relative;
53
+ &:before {
54
+ position: absolute;
55
+ top: 2px;
56
+ left: 0;
57
+ font-family: 'Icons';
58
+ content: '\f105';
59
+ color: @linkColor;
60
+ font-size: 14px;
61
+ }
62
+ }
63
+
64
+ .listing-header {
65
+ display: inline-block !important;
66
+ padding-left: 13px;
67
+ }
68
+
69
+ .u-item.listing-item {
70
+ p {
71
+ color: @linkColor;
72
+ }
73
+
74
+ a:hover p {
75
+ color: @linkHoverColor;
76
+ }
77
+ }
78
+ }
@@ -5,6 +5,7 @@
5
5
  @import './observatory.less';
6
6
  @import './views.less';
7
7
  @import './search.less';
8
+ @import './blocks.less';
8
9
 
9
10
  // [class~='view-defaultview'] [id='page-document'] > *,
10
11
  // [class~='view-viewview'] [id='page-document'] > * {
@@ -12,8 +12,8 @@
12
12
  @secondaryColor: #005c97;
13
13
  @ccaGreenColor: #8a9c39;
14
14
 
15
- // @linkColor: @secondaryColor;
16
- // @linkHoverColor: @primaryColor;
15
+ @linkColor: #006bb8;
16
+ @linkHoverColor: #004b7f;
17
17
  // @linkActiveColor: @linkHoverColor;
18
18
 
19
19
  // Toolbar