@eeacms/volto-marine-policy 2.0.14 → 2.0.16

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,31 @@ 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
+ ### [2.0.16](https://github.com/eea/volto-marine-policy/compare/2.0.15...2.0.16) - 15 July 2025
8
+
9
+ #### :rocket: Dependency updates
10
+
11
+ - Release @eeacms/volto-openlayers-map@1.0.1 [EEA Jenkins - [`9d21a45`](https://github.com/eea/volto-marine-policy/commit/9d21a45dc040ffafa93a1dcdb10b521c429b7fe3)]
12
+ - Release @eeacms/volto-openlayers-map@1.0.0 [EEA Jenkins - [`6f7be1b`](https://github.com/eea/volto-marine-policy/commit/6f7be1b5c4830c639c71a94ba404bf0df6dd14f4)]
13
+
14
+ #### :house: Internal changes
15
+
16
+ - style: Automated code fix [eea-jenkins - [`efe44fc`](https://github.com/eea/volto-marine-policy/commit/efe44fcb0bde4e0339f4a9fea70fb49fb878a095)]
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - fix eslint [laszlocseh - [`5ab04fb`](https://github.com/eea/volto-marine-policy/commit/5ab04fb5734c00c2fc2f8b2a3fa381b5a5f40a71)]
21
+ - added NIS listing view [laszlocseh - [`64258c1`](https://github.com/eea/volto-marine-policy/commit/64258c1094b5ae57547f965b066c52e2e29f9fd8)]
22
+ - added middleware for NIS download [laszlocseh - [`796f3ab`](https://github.com/eea/volto-marine-policy/commit/796f3abc08d632079486eb7c5e7517dfb1d83657)]
23
+ ### [2.0.15](https://github.com/eea/volto-marine-policy/compare/2.0.14...2.0.15) - 16 June 2025
24
+
25
+ #### :house: Internal changes
26
+
27
+ - style: Automated code fix [eea-jenkins - [`5b37969`](https://github.com/eea/volto-marine-policy/commit/5b3796962e97e62cde61dfe0e78e85e340eefc0c)]
28
+
29
+ #### :hammer_and_wrench: Others
30
+
31
+ - small change to demo sites map viewer legend position [laszlocseh - [`0891fdf`](https://github.com/eea/volto-marine-policy/commit/0891fdf38b439804c27c3442a731637ed415ea2b)]
7
32
  ### [2.0.14](https://github.com/eea/volto-marine-policy/compare/2.0.13...2.0.14) - 15 May 2025
8
33
 
9
34
  #### :rocket: Dependency updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-marine-policy",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "@eeacms/volto-marine-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -35,7 +35,7 @@
35
35
  "@eeacms/volto-eea-website-theme": "*",
36
36
  "@eeacms/volto-embed": "*",
37
37
  "@eeacms/volto-globalsearch": "2.1.2",
38
- "@eeacms/volto-openlayers-map": "0.3.2",
38
+ "@eeacms/volto-openlayers-map": "1.0.1",
39
39
  "@eeacms/volto-searchlib": "2.0.16",
40
40
  "@eeacms/volto-tabs-block": "*",
41
41
  "axios": "0.30.0",
@@ -36,6 +36,7 @@ export default function DemoSitesExplorerView(props) {
36
36
  const [filters, setFilters] = React.useState([]);
37
37
  const [map, setMap] = React.useState();
38
38
  const [highlightedIndex, setHighlightedIndex] = React.useState(-1);
39
+ const columnsLength = hideFilters ? 12 : 8;
39
40
 
40
41
  React.useEffect(() => {
41
42
  const _filters = getFilters(activeItems, indicatorOnly);
@@ -82,7 +83,11 @@ export default function DemoSitesExplorerView(props) {
82
83
  <Grid.Row>
83
84
  {cases.length ? (
84
85
  <Grid columns={12}>
85
- <Grid.Column mobile={8} tablet={8} computer={8}>
86
+ <Grid.Column
87
+ mobile={columnsLength}
88
+ tablet={columnsLength}
89
+ computer={columnsLength}
90
+ >
86
91
  <DemoSitesMap
87
92
  items={cases}
88
93
  activeItems={activeItems}
@@ -96,14 +101,14 @@ export default function DemoSitesExplorerView(props) {
96
101
  setHighlightedIndex={setHighlightedIndex}
97
102
  />
98
103
  </Grid.Column>
99
- <Grid.Column
100
- mobile={4}
101
- tablet={4}
102
- computer={4}
103
- className="right-side-filters"
104
- >
105
- <Grid.Row>
106
- {!hideFilters ? (
104
+ {!hideFilters ? (
105
+ <Grid.Column
106
+ mobile={4}
107
+ tablet={4}
108
+ computer={4}
109
+ className="right-side-filters"
110
+ >
111
+ <Grid.Row>
107
112
  <VisibilitySensor>
108
113
  <ObjectivesChart
109
114
  items={cases}
@@ -119,31 +124,52 @@ export default function DemoSitesExplorerView(props) {
119
124
  setInitialized={setInitialized}
120
125
  />
121
126
  </VisibilitySensor>
122
- ) : (
123
- ''
124
- )}
125
- </Grid.Row>
126
- <Grid.Row>
127
- <div className="legend">
128
- {/* <div className="legend-row legend-subtitle">Legend</div> */}
129
- <div className="legend-row">
130
- <div className="circle">
131
- <div className="dot-demosite"></div>
127
+ </Grid.Row>
128
+ <Grid.Row>
129
+ <div className="legend">
130
+ {/* <div className="legend-row legend-subtitle">Legend</div> */}
131
+ <div className="legend-row">
132
+ <div className="circle">
133
+ <div className="dot-demosite"></div>
134
+ </div>
135
+ <div>Demo site</div>
132
136
  </div>
133
- <div>Demo site</div>
134
- </div>
135
- <div className="legend-row">
136
- <div className="circle">
137
- <div className="dot-region"></div>
137
+ <div className="legend-row">
138
+ <div className="circle">
139
+ <div className="dot-region"></div>
140
+ </div>
141
+ <div>Associated region</div>
138
142
  </div>
139
- <div>Associated region</div>
140
143
  </div>
141
- </div>
142
- </Grid.Row>
143
- </Grid.Column>
144
+ </Grid.Row>
145
+ </Grid.Column>
146
+ ) : (
147
+ ''
148
+ )}
144
149
  </Grid>
145
150
  ) : null}
146
151
  </Grid.Row>
152
+ {hideFilters ? (
153
+ <Grid.Row stretched={true}>
154
+ <div className="legend position-bottom">
155
+ {/* <div className="legend-row legend-subtitle">Legend</div> */}
156
+ <div className="legend-row">
157
+ <div className="circle">
158
+ <div className="dot-demosite"></div>
159
+ </div>
160
+ <div>Demo site</div>
161
+ </div>
162
+ <div className="legend-row">
163
+ <div className="circle">
164
+ <div className="dot-region"></div>
165
+ </div>
166
+ <div>Associated region</div>
167
+ </div>
168
+ </div>
169
+ </Grid.Row>
170
+ ) : (
171
+ ''
172
+ )}
147
173
  </div>
148
174
  );
149
175
  }
@@ -409,12 +409,17 @@
409
409
 
410
410
  .legend {
411
411
  // position: absolute;
412
- bottom: 2em;
412
+ // bottom: 2em;
413
413
  display: flex;
414
414
  flex-direction: row;
415
415
  align-items: flex-start;
416
+ justify-content: center;
416
417
  gap: 1em;
417
418
 
419
+ &.position-bottom {
420
+ margin-top: 1em;
421
+ }
422
+
418
423
  .legend-row {
419
424
  display: flex;
420
425
  align-items: center;
@@ -3,6 +3,7 @@ export StickyHeader from './theme/Header/StickyHeader';
3
3
  export HeroSectionView from './theme/View/HeroSectionView';
4
4
  export FullwidthView from './theme/View/FullwidthView';
5
5
  export MetadataListingView from './theme/MetadataListingView/MetadataListingView';
6
+ export NISListingView from './theme/NISListingView/NISListingView';
6
7
  export ItemMetadata from './theme/ItemMetadata/ItemMetadata';
7
8
  export ItemTitle from './theme/ItemMetadata/ItemTitle';
8
9
  export MetadataHeader from './theme/MetadataListingView/MetadataHeader';
@@ -0,0 +1,43 @@
1
+ import { Link } from 'react-router-dom';
2
+ import PropTypes from 'prop-types';
3
+ import './style.less';
4
+
5
+ const NISListingView = ({ items, isEditMode }) => {
6
+ return (
7
+ <div className="items">
8
+ {items.map((item, index) => (
9
+ <div className="listing-item" key={item['@id']}>
10
+ <div className="listing-body">
11
+ <h3>
12
+ <Link to={item['@id']}>{item.title}</Link>
13
+ </h3>
14
+ <div className="listing-metadata">
15
+ {item.nis_species_name_accepted && (
16
+ <div className="metadata-item">
17
+ <b>Species name accepted:</b> {item.nis_species_name_accepted}
18
+ </div>
19
+ )}
20
+ {item.nis_region && (
21
+ <div className="metadata-item">
22
+ <b>Region:</b> {item.nis_region}
23
+ </div>
24
+ )}
25
+ {item.nis_subregion && (
26
+ <div className="metadata-item">
27
+ <b>Subregion:</b> {item.nis_subregion}
28
+ </div>
29
+ )}
30
+ </div>
31
+ </div>
32
+ </div>
33
+ ))}
34
+ </div>
35
+ );
36
+ };
37
+
38
+ NISListingView.propTypes = {
39
+ items: PropTypes.arrayOf(PropTypes.any).isRequired,
40
+ isEditMode: PropTypes.bool,
41
+ };
42
+
43
+ export default NISListingView;
@@ -0,0 +1,11 @@
1
+ .listing-metadata {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ gap: 1em;
5
+ }
6
+
7
+ .metadata-item {
8
+ align-items: baseline;
9
+ padding: 8px 15px;
10
+ background-color: #ebebeb;
11
+ }
@@ -30,7 +30,10 @@ export default function middleware(config) {
30
30
  // TODO: do we want catch all?
31
31
  // middleware.all(['**/@@*'], viewMiddleware);
32
32
 
33
- middleware.all(['**/@@demo-sites-map.arcgis.json'], viewMiddleware);
33
+ middleware.all(
34
+ ['**/@@demo-sites-map.arcgis.json', '**/@@nis-export'],
35
+ viewMiddleware,
36
+ );
34
37
  middleware.id = 'viewsMiddleware';
35
38
  config.settings.expressMiddleware.push(middleware);
36
39
  return config;
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  DatabaseItemView,
6
6
  MetadataListingView,
7
7
  SimpleListingView,
8
+ NISListingView,
8
9
  } from './components';
9
10
  // import installAppExtras from './components/theme/AppExtras';
10
11
  // import HomePageView from '@eeacms/volto-eea-website-theme/components/theme/Homepage/HomePageView';
@@ -153,6 +154,12 @@ const applyConfig = (config) => {
153
154
  template: SimpleListingView,
154
155
  isDefault: false,
155
156
  },
157
+ {
158
+ id: 'nis',
159
+ title: 'NIS Listing',
160
+ template: NISListingView,
161
+ isDefault: false,
162
+ },
156
163
  ],
157
164
  };
158
165