@eeacms/volto-datahub 1.0.19 → 1.0.20

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,12 @@ 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.0.20](https://github.com/eea/volto-datahub/compare/1.0.19...1.0.20) - 14 March 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Fix archived item condition [kreafox - [`8c0d70a`](https://github.com/eea/volto-datahub/commit/8c0d70afc7429b7c0382350d291ea68e7a55e37b)]
12
+ - Add archived label [kreafox - [`be58335`](https://github.com/eea/volto-datahub/commit/be583359b5de2a198a13c55b1191e2f8b7dab193)]
7
13
  ### [1.0.19](https://github.com/eea/volto-datahub/compare/1.0.18...1.0.19) - 14 March 2023
8
14
 
9
15
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Accordion } from 'semantic-ui-react';
3
3
  import { Icon } from 'semantic-ui-react';
4
4
  import { DateTime } from '@eeacms/search';
5
- import { isInternal, SVGIcon } from '../utils.js';
5
+ import { isInternal, SVGIcon, isObsolete } from '../utils.js';
6
6
  import DatasetItemDownloadList from './DatasetItemDownloadList';
7
7
 
8
8
  import lockSVG from 'remixicon/icons/System/lock-line.svg';
@@ -34,6 +34,8 @@ const DatasetItemsList = (props) => {
34
34
  temporalDateRange,
35
35
  publicationDateForResource,
36
36
  } = dataset;
37
+ const archived = isObsolete(dataset.cl_status);
38
+
37
39
  return (
38
40
  <React.Fragment key={index}>
39
41
  <Accordion.Title
@@ -43,12 +45,13 @@ const DatasetItemsList = (props) => {
43
45
  >
44
46
  <span className="dataset-title">
45
47
  {dataset.resourceTitleObject.default}
48
+
46
49
  <span className="formats">
47
50
  {(dataset.format || [])
48
51
  .filter((item, pos, self) => self.indexOf(item) === pos)
49
52
  .map((item, i) => {
50
53
  return (
51
- <span className="format-label" key={i}>
54
+ <span className="dh-label" key={i}>
52
55
  {item}
53
56
  </span>
54
57
  );
@@ -61,7 +64,7 @@ const DatasetItemsList = (props) => {
61
64
  .filter((item, pos, self) => self.indexOf(item) === pos)
62
65
  .map((item, i) => {
63
66
  return (
64
- <span className="format-label" key={i}>
67
+ <span className="dh-label" key={i}>
65
68
  {item}
66
69
  </span>
67
70
  );
@@ -70,15 +73,17 @@ const DatasetItemsList = (props) => {
70
73
  ) : (
71
74
  <>
72
75
  {['ESRI', 'OGC'].includes(dataset.linkProtocol) && (
73
- <span className="format-label">
74
- {dataset.linkProtocol}
75
- </span>
76
+ <span className="dh-label">{dataset.linkProtocol}</span>
76
77
  )}
77
78
  </>
78
79
  )}
79
- </span>
80
80
 
81
- {isInternal(dataset) && <SVGIcon name={lockSVG} size="18" />}
81
+ {archived && (
82
+ <span className="dh-label inverted">Archived</span>
83
+ )}
84
+
85
+ {isInternal(dataset) && <SVGIcon name={lockSVG} size="18" />}
86
+ </span>
82
87
  </span>
83
88
  <Icon className="ri-arrow-down-s-line" />
84
89
  </Accordion.Title>