@eeacms/volto-datahub 0.1.5 → 0.1.8
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 +30 -0
- package/package.json +1 -1
- package/src/components/ItemView/ItemView.jsx +283 -255
- package/src/components/ItemView/TemporalCoverage.jsx +33 -0
- package/src/components/ItemView/banner.svg +4570 -0
- package/src/components/ItemView/icons/services.svg +3 -0
- package/src/components/Result/DatahubCardItem.jsx +3 -3
- package/src/config/facets.js +22 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,38 @@ 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.8](https://github.com/eea/volto-datahub/compare/0.1.7...0.1.8)
|
|
8
|
+
|
|
9
|
+
- Added facet for time coverage [`553518e`](https://github.com/eea/volto-datahub/commit/553518e7297e7bdace1323010735feb781e3b628)
|
|
10
|
+
|
|
11
|
+
#### [0.1.7](https://github.com/eea/volto-datahub/compare/0.1.6...0.1.7)
|
|
12
|
+
|
|
13
|
+
> 26 August 2022
|
|
14
|
+
|
|
15
|
+
- Release [`#8`](https://github.com/eea/volto-datahub/pull/8)
|
|
16
|
+
- Link to the SDI metadata pdf [`e28b3a0`](https://github.com/eea/volto-datahub/commit/e28b3a0254ee9d60d0804de57dc401c4a9fbea0a)
|
|
17
|
+
- Add services icon, datasets improvements [`5b9295a`](https://github.com/eea/volto-datahub/commit/5b9295ad26af7305d217e3dec99b7337603e329f)
|
|
18
|
+
- WIP datasets section: sorting, add formats [`7d51ec6`](https://github.com/eea/volto-datahub/commit/7d51ec63aa0716073ab6e1f75488fea83dfe585f)
|
|
19
|
+
- Remove more information section [`8a38fee`](https://github.com/eea/volto-datahub/commit/8a38fee341c8b7f7c830b7e0331fcb15a28857f3)
|
|
20
|
+
- First accordion open by default [`9b7af42`](https://github.com/eea/volto-datahub/commit/9b7af424dec504ed019a79bf5110f2054b2e3168)
|
|
21
|
+
- Remove unused import [`f9c62a2`](https://github.com/eea/volto-datahub/commit/f9c62a22b527923e9b02479f72f1e19a9ff6ad76)
|
|
22
|
+
- WIP update datahub item view [`607f9be`](https://github.com/eea/volto-datahub/commit/607f9be74604c8c5ad6ff89f29bc127a94f41288)
|
|
23
|
+
- Add datasets listing [`3d9cc1d`](https://github.com/eea/volto-datahub/commit/3d9cc1d25bb7f0406520473883b6af9167c3fd7b)
|
|
24
|
+
- Fix temporal coverage [`6bc81c5`](https://github.com/eea/volto-datahub/commit/6bc81c52daccf69813a9eb229d6ccb635e9dde49)
|
|
25
|
+
- Update [`d78a5ba`](https://github.com/eea/volto-datahub/commit/d78a5ba0624821820640aa91b3f51b2b75cb3edf)
|
|
26
|
+
|
|
27
|
+
#### [0.1.6](https://github.com/eea/volto-datahub/compare/0.1.5...0.1.6)
|
|
28
|
+
|
|
29
|
+
> 3 August 2022
|
|
30
|
+
|
|
31
|
+
- Add banner for datahub item view & fix cypress [`#7`](https://github.com/eea/volto-datahub/pull/7)
|
|
32
|
+
- Add banner for ItemView [`7c70d6a`](https://github.com/eea/volto-datahub/commit/7c70d6ad127bb9cbdae95ae898304c85d2ab8bd8)
|
|
33
|
+
|
|
7
34
|
#### [0.1.5](https://github.com/eea/volto-datahub/compare/0.1.4...0.1.5)
|
|
8
35
|
|
|
36
|
+
> 29 July 2022
|
|
37
|
+
|
|
38
|
+
- Release [`#6`](https://github.com/eea/volto-datahub/pull/6)
|
|
9
39
|
- Fix merge [`6a8f3d4`](https://github.com/eea/volto-datahub/commit/6a8f3d4f3bfaacb8e0938929d8038f9e31a26ced)
|
|
10
40
|
- Fix layout [`129d480`](https://github.com/eea/volto-datahub/commit/129d4802a63aa346d11ae8e54b323580213c0a71)
|
|
11
41
|
- Fix merge [`3df3a81`](https://github.com/eea/volto-datahub/commit/3df3a8189448dcdd052692b6f5d835a1ea752a50)
|
package/package.json
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Container,
|
|
4
|
-
Card,
|
|
5
|
-
Image,
|
|
6
|
-
Accordion,
|
|
7
|
-
Icon,
|
|
8
|
-
Tab,
|
|
9
|
-
} from 'semantic-ui-react';
|
|
2
|
+
import { Container, Accordion, Icon, List } from 'semantic-ui-react';
|
|
10
3
|
import { Toolbar } from '@plone/volto/components';
|
|
11
4
|
import { BodyClass } from '@plone/volto/helpers';
|
|
12
5
|
import { Portal } from 'react-portal';
|
|
@@ -19,13 +12,30 @@ import {
|
|
|
19
12
|
} from '@eeacms/search';
|
|
20
13
|
import { DateTime } from '@eeacms/search';
|
|
21
14
|
import { SearchProvider, WithSearch } from '@elastic/react-search-ui';
|
|
22
|
-
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
15
|
+
import { Callout, Banner } from '@eeacms/volto-eea-design-system/ui';
|
|
23
16
|
import { useDispatch } from 'react-redux';
|
|
24
17
|
import config from '@plone/volto/registry';
|
|
25
18
|
import { Link, useLocation } from 'react-router-dom';
|
|
19
|
+
import bannerBG from './banner.svg';
|
|
20
|
+
import servicesSVG from './icons/services.svg';
|
|
26
21
|
|
|
27
22
|
const appName = 'datahub';
|
|
28
23
|
|
|
24
|
+
const SVGIcon = ({ name, size, color, className, title, onClick }) => {
|
|
25
|
+
return (
|
|
26
|
+
<svg
|
|
27
|
+
xmlns={name.attributes && name.attributes.xmlns}
|
|
28
|
+
viewBox={name.attributes && name.attributes.viewBox}
|
|
29
|
+
style={{ height: size, width: 'auto', fill: color || 'currentColor' }}
|
|
30
|
+
className={className ? `icon ${className}` : 'icon'}
|
|
31
|
+
onClick={onClick}
|
|
32
|
+
dangerouslySetInnerHTML={{
|
|
33
|
+
__html: title ? `<title>${title}</title>${name.content}` : name.content,
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
29
39
|
function ItemView(props) {
|
|
30
40
|
const { docid, location } = props;
|
|
31
41
|
const { fromPathname, fromSearch } = location?.state || {};
|
|
@@ -33,10 +43,20 @@ function ItemView(props) {
|
|
|
33
43
|
// const content = useSelector((state) => state.content.data);
|
|
34
44
|
const result = useResult(null, docid);
|
|
35
45
|
const item = result ? result._result : null;
|
|
36
|
-
const { title, description, raw_value,
|
|
37
|
-
|
|
46
|
+
const { title, description, raw_value, issued, time_coverage } = item || {}; // readingTime
|
|
47
|
+
const { changeDate, children } = raw_value?.raw || {};
|
|
48
|
+
const startTempCoverage = time_coverage?.raw.at(0);
|
|
49
|
+
const endTempCoverage = time_coverage?.raw.at(-1);
|
|
38
50
|
const rawTitle = title?.raw || '';
|
|
39
51
|
|
|
52
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
53
|
+
|
|
54
|
+
function handleClick(e, titleProps) {
|
|
55
|
+
const { index } = titleProps;
|
|
56
|
+
const newIndex = activeIndex === index ? -1 : index;
|
|
57
|
+
setActiveIndex(newIndex);
|
|
58
|
+
}
|
|
59
|
+
|
|
40
60
|
React.useEffect(() => {
|
|
41
61
|
const handler = async () => {
|
|
42
62
|
if (item) {
|
|
@@ -62,71 +82,46 @@ function ItemView(props) {
|
|
|
62
82
|
|
|
63
83
|
handler();
|
|
64
84
|
}, [item, dispatch, docid, rawTitle]);
|
|
65
|
-
const {
|
|
66
|
-
// contactForResource,
|
|
67
|
-
// contact,
|
|
68
|
-
// resourceTemporalDateRange,
|
|
69
|
-
changeDate,
|
|
70
|
-
} = raw_value?.raw || {};
|
|
71
|
-
|
|
72
|
-
const relatedItemsData = event?.raw.original;
|
|
73
|
-
const relatedDatasets =
|
|
74
|
-
(relatedItemsData && JSON.parse(relatedItemsData)) || {};
|
|
75
|
-
const { children } = relatedDatasets?.raw_value || {};
|
|
76
|
-
const startTempCoverage = parseInt(time_coverage?.raw.at(0));
|
|
77
|
-
const endTempCoverage = parseInt(time_coverage?.raw.at(-1));
|
|
78
85
|
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
const datasets = React.useMemo(
|
|
87
|
+
() =>
|
|
88
|
+
(children || []).sort(
|
|
89
|
+
(a, b) =>
|
|
90
|
+
new Date(b.publicationDateForResource).getTime() -
|
|
91
|
+
new Date(a.publicationDateForResource).getTime(),
|
|
92
|
+
),
|
|
93
|
+
[children],
|
|
94
|
+
);
|
|
87
95
|
|
|
88
|
-
setActiveIndex(newIndex);
|
|
89
|
-
};
|
|
90
96
|
// console.log('result', result?._result);
|
|
91
97
|
|
|
92
|
-
const panes = [
|
|
93
|
-
{
|
|
94
|
-
menuItem: 'European data',
|
|
95
|
-
render: () => <Tab.Pane attached={false}>Tab 1 Content</Tab.Pane>,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
menuItem: 'Dataset definition',
|
|
99
|
-
render: () => <Tab.Pane attached={false}>Tab 2 Content</Tab.Pane>,
|
|
100
|
-
},
|
|
101
|
-
];
|
|
102
|
-
|
|
103
98
|
return item ? (
|
|
104
99
|
<div className="dataset-view">
|
|
105
100
|
<Portal node={document.getElementById('page-header')}>
|
|
106
|
-
<div className="
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
101
|
+
<div className="dataset">
|
|
102
|
+
<Banner image_url={bannerBG} image>
|
|
103
|
+
<Banner.Content>
|
|
104
|
+
<Banner.Title>Datahub</Banner.Title>
|
|
105
|
+
</Banner.Content>
|
|
106
|
+
</Banner>
|
|
114
107
|
</div>
|
|
115
108
|
</Portal>
|
|
116
109
|
|
|
117
110
|
<div className="dataset-container">
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
pathname: fromPathname,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
111
|
+
<Link
|
|
112
|
+
className="search-link"
|
|
113
|
+
to={
|
|
114
|
+
location?.state
|
|
115
|
+
? { pathname: fromPathname, search: fromSearch }
|
|
116
|
+
: {
|
|
117
|
+
pathname: '/en/datahub/',
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
>
|
|
121
|
+
<Icon className="ri-arrow-go-back-line" />
|
|
122
|
+
Back to search
|
|
123
|
+
</Link>
|
|
124
|
+
|
|
130
125
|
<div className="dataset-header">
|
|
131
126
|
<h1>{title?.raw}</h1>
|
|
132
127
|
<div className="dataset-header-bottom">
|
|
@@ -143,209 +138,242 @@ function ItemView(props) {
|
|
|
143
138
|
</span>*/}
|
|
144
139
|
</div>
|
|
145
140
|
</div>
|
|
141
|
+
|
|
146
142
|
<Callout>{description?.raw}</Callout>
|
|
147
143
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
{datasets && datasets.length > 0 && (
|
|
145
|
+
<>
|
|
146
|
+
<h2>Data</h2>
|
|
147
|
+
<Accordion>
|
|
148
|
+
{datasets.map((dataset, index) => {
|
|
149
|
+
return (
|
|
150
|
+
<>
|
|
151
|
+
<Accordion.Title
|
|
152
|
+
active={activeIndex === index}
|
|
153
|
+
index={index}
|
|
154
|
+
onClick={handleClick}
|
|
155
|
+
>
|
|
156
|
+
<span className="dataset-title">
|
|
157
|
+
<div>{dataset.resourceTitleObject.default}</div>
|
|
158
|
+
<span>
|
|
159
|
+
{(dataset.format || []).map((item, i) => {
|
|
160
|
+
return <span className="format-label">{item}</span>;
|
|
161
|
+
})}
|
|
162
|
+
</span>
|
|
163
|
+
</span>
|
|
164
|
+
<Icon className="ri-arrow-down-s-line" />
|
|
165
|
+
</Accordion.Title>
|
|
166
|
+
<Accordion.Content active={activeIndex === index}>
|
|
167
|
+
{!!dataset.link && dataset.link.length > 0 ? (
|
|
168
|
+
<List divided relaxed>
|
|
169
|
+
{dataset.link
|
|
170
|
+
.filter((i) => i.protocol === 'WWW:URL')
|
|
171
|
+
.map((item, i) => {
|
|
172
|
+
return (
|
|
173
|
+
<List.Item>
|
|
174
|
+
<List.Content>
|
|
175
|
+
<div className="dataset-item">
|
|
176
|
+
<Icon className="download" />
|
|
177
|
+
<a href={item.url} className="item-link">
|
|
178
|
+
<span>{item.name}</span>
|
|
179
|
+
</a>
|
|
180
|
+
</div>
|
|
181
|
+
</List.Content>
|
|
182
|
+
{item.description && (
|
|
183
|
+
<span
|
|
184
|
+
className="item-description"
|
|
185
|
+
title={item.description}
|
|
186
|
+
>
|
|
187
|
+
{item.description}
|
|
188
|
+
</span>
|
|
189
|
+
)}
|
|
190
|
+
</List.Item>
|
|
191
|
+
);
|
|
192
|
+
})}
|
|
154
193
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
194
|
+
{dataset.link
|
|
195
|
+
.filter((i) => i.protocol === 'WWW:LINK')
|
|
196
|
+
.map((item, i) => {
|
|
197
|
+
return (
|
|
198
|
+
<List.Item>
|
|
199
|
+
<List.Content>
|
|
200
|
+
<div className="dataset-item">
|
|
201
|
+
<Icon className="download" />
|
|
202
|
+
{item.name ? (
|
|
203
|
+
<a
|
|
204
|
+
href={item.url}
|
|
205
|
+
className="item-link"
|
|
206
|
+
>
|
|
207
|
+
{item.name}
|
|
208
|
+
</a>
|
|
209
|
+
) : (
|
|
210
|
+
<a
|
|
211
|
+
href={item.url}
|
|
212
|
+
className="item-link"
|
|
213
|
+
>
|
|
214
|
+
Download link
|
|
215
|
+
</a>
|
|
216
|
+
)}
|
|
217
|
+
</div>
|
|
218
|
+
</List.Content>
|
|
219
|
+
</List.Item>
|
|
220
|
+
);
|
|
221
|
+
})}
|
|
161
222
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
</div>
|
|
183
|
-
)}
|
|
223
|
+
{dataset.link
|
|
224
|
+
.filter(
|
|
225
|
+
(i) =>
|
|
226
|
+
i.protocol === 'EEA:FILEPATH' ||
|
|
227
|
+
i.protocol === 'EEA:FOLDERPATH',
|
|
228
|
+
)
|
|
229
|
+
.map((item, i) => {
|
|
230
|
+
return (
|
|
231
|
+
<List.Item>
|
|
232
|
+
<List.Content>
|
|
233
|
+
<div className="dataset-item">
|
|
234
|
+
<Icon className="download" />
|
|
235
|
+
<a href={item.url} className="item-link">
|
|
236
|
+
WebDAV: {item.name || item.function}
|
|
237
|
+
</a>
|
|
238
|
+
</div>
|
|
239
|
+
</List.Content>
|
|
240
|
+
</List.Item>
|
|
241
|
+
);
|
|
242
|
+
})}
|
|
184
243
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</div>
|
|
211
|
-
)}
|
|
244
|
+
{dataset.link
|
|
245
|
+
.filter(
|
|
246
|
+
(i) =>
|
|
247
|
+
i.protocol === 'ESRI:REST' ||
|
|
248
|
+
i.protocol === 'OGC:WMS',
|
|
249
|
+
)
|
|
250
|
+
.map((item, i) => {
|
|
251
|
+
return (
|
|
252
|
+
<List.Item>
|
|
253
|
+
<List.Content>
|
|
254
|
+
<SVGIcon name={servicesSVG} size="19" />{' '}
|
|
255
|
+
{(item.name || item.description) && (
|
|
256
|
+
<span className="item-protocol">
|
|
257
|
+
{item.protocol}:
|
|
258
|
+
</span>
|
|
259
|
+
)}
|
|
260
|
+
<a className="item-link" href={item.url}>
|
|
261
|
+
{item.name ||
|
|
262
|
+
item.description ||
|
|
263
|
+
item.protocol}
|
|
264
|
+
</a>
|
|
265
|
+
</List.Content>
|
|
266
|
+
</List.Item>
|
|
267
|
+
);
|
|
268
|
+
})}
|
|
212
269
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
onClick={toggleOpenAccordion}
|
|
235
|
-
>
|
|
236
|
-
Permalinks
|
|
237
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
238
|
-
</Accordion.Title>
|
|
239
|
-
<Accordion.Content active={activeIndex.includes(1)}>
|
|
240
|
-
[No data]
|
|
241
|
-
</Accordion.Content>
|
|
270
|
+
{dataset.link
|
|
271
|
+
.filter((i) => i.protocol.includes('WWW:LINK'))
|
|
272
|
+
.map((item, i) => {
|
|
273
|
+
return (
|
|
274
|
+
<List.Item>
|
|
275
|
+
<List.Content>
|
|
276
|
+
<div className="dataset-item">
|
|
277
|
+
<Icon className="linkify" />
|
|
278
|
+
<a href={item.url} className="item-link">
|
|
279
|
+
<span>{item.name || item.url}</span>
|
|
280
|
+
</a>
|
|
281
|
+
</div>
|
|
282
|
+
</List.Content>
|
|
283
|
+
{item.description && (
|
|
284
|
+
<span className="item-description">
|
|
285
|
+
{item.description}
|
|
286
|
+
</span>
|
|
287
|
+
)}
|
|
288
|
+
</List.Item>
|
|
289
|
+
);
|
|
290
|
+
})}
|
|
242
291
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
292
|
+
{dataset.resourceType[0] !==
|
|
293
|
+
'nonGeographicDataset' && (
|
|
294
|
+
<List.Item>
|
|
295
|
+
<List.Content>
|
|
296
|
+
<div className="dataset-item">
|
|
297
|
+
<Icon className="file pdf" />
|
|
298
|
+
<a
|
|
299
|
+
className="item-link"
|
|
300
|
+
target="_blank"
|
|
301
|
+
rel="noreferrer"
|
|
302
|
+
href={`https://sdi.eea.europa.eu/catalogue/srv/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
303
|
+
>
|
|
304
|
+
PDF Factsheet
|
|
305
|
+
</a>
|
|
306
|
+
</div>
|
|
307
|
+
</List.Content>
|
|
308
|
+
</List.Item>
|
|
309
|
+
)}
|
|
310
|
+
</List>
|
|
311
|
+
) : (
|
|
312
|
+
''
|
|
313
|
+
)}
|
|
314
|
+
</Accordion.Content>
|
|
259
315
|
</>
|
|
260
|
-
) : (
|
|
261
|
-
<span>{item?.spatial?.raw}</span>
|
|
262
|
-
)}
|
|
263
|
-
</div>
|
|
264
|
-
)}
|
|
265
|
-
</Accordion.Content>
|
|
266
|
-
|
|
267
|
-
<Accordion.Title
|
|
268
|
-
active={activeIndex.includes(3)}
|
|
269
|
-
index={3}
|
|
270
|
-
onClick={toggleOpenAccordion}
|
|
271
|
-
>
|
|
272
|
-
Temporal coverage
|
|
273
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
274
|
-
</Accordion.Title>
|
|
275
|
-
<Accordion.Content active={activeIndex.includes(3)}>
|
|
276
|
-
{/*<ul>
|
|
277
|
-
{resourceTemporalDateRange?.map((temp, i) => {
|
|
278
|
-
return (
|
|
279
|
-
<li key={i}>
|
|
280
|
-
<DateTime format="DATE_MED" value={temp.gte} /> -
|
|
281
|
-
<DateTime format="DATE_MED" value={temp.lte} />
|
|
282
|
-
</li>
|
|
283
316
|
);
|
|
284
317
|
})}
|
|
285
|
-
</
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
<div className="side-temp">{`${startTempCoverage - 1}`}</div>
|
|
289
|
-
<div className="time-range">
|
|
290
|
-
<span>{startTempCoverage}</span> -
|
|
291
|
-
<span>{endTempCoverage}</span>
|
|
292
|
-
</div>
|
|
293
|
-
<div className="side-temp">{`${endTempCoverage + 1}`}</div>
|
|
294
|
-
</div>
|
|
295
|
-
)}
|
|
296
|
-
</Accordion.Content>
|
|
297
|
-
|
|
298
|
-
<Accordion.Title
|
|
299
|
-
active={activeIndex.includes(4)}
|
|
300
|
-
index={4}
|
|
301
|
-
onClick={toggleOpenAccordion}
|
|
302
|
-
>
|
|
303
|
-
Topics
|
|
304
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
305
|
-
</Accordion.Title>
|
|
306
|
-
<Accordion.Content active={activeIndex.includes(4)}>
|
|
307
|
-
{item.topic && (
|
|
308
|
-
<>
|
|
309
|
-
{Array.isArray(item?.topic?.raw) ? (
|
|
310
|
-
<>
|
|
311
|
-
{item?.topic?.raw.map((item, i) => {
|
|
312
|
-
return (
|
|
313
|
-
<span className="tag-item" key={i}>
|
|
314
|
-
{item}
|
|
315
|
-
</span>
|
|
316
|
-
);
|
|
317
|
-
})}
|
|
318
|
-
</>
|
|
319
|
-
) : (
|
|
320
|
-
<span className="tag-item">{item?.topic?.raw}</span>
|
|
321
|
-
)}
|
|
322
|
-
</>
|
|
323
|
-
)}
|
|
324
|
-
</Accordion.Content>
|
|
318
|
+
</Accordion>
|
|
319
|
+
</>
|
|
320
|
+
)}
|
|
325
321
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
>
|
|
331
|
-
|
|
332
|
-
<
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
</span>
|
|
342
|
-
);
|
|
343
|
-
},
|
|
322
|
+
{(item?.rod || item?.organisation || time_coverage?.raw.length > 0) && (
|
|
323
|
+
<h2>SDI Metadata Catalogue</h2>
|
|
324
|
+
)}
|
|
325
|
+
{!!item?.rod && (
|
|
326
|
+
<div>
|
|
327
|
+
<h5>Reporting obligations (ROD)</h5>
|
|
328
|
+
<ul>
|
|
329
|
+
{Array.isArray(item.rod?.raw) ? (
|
|
330
|
+
<>
|
|
331
|
+
{item?.rod?.raw.map((item, i) => {
|
|
332
|
+
return <li key={i}>{item}</li>;
|
|
333
|
+
})}
|
|
334
|
+
</>
|
|
335
|
+
) : (
|
|
336
|
+
<li>{item.rod?.raw}</li>
|
|
344
337
|
)}
|
|
345
|
-
</
|
|
346
|
-
</
|
|
347
|
-
|
|
338
|
+
</ul>
|
|
339
|
+
</div>
|
|
340
|
+
)}
|
|
341
|
+
{!!item?.organisation && (
|
|
342
|
+
<div>
|
|
343
|
+
<h5>Organisation</h5>
|
|
344
|
+
<ul>
|
|
345
|
+
{Array.isArray(item?.organisation?.raw) ? (
|
|
346
|
+
<>
|
|
347
|
+
{item?.organisation?.raw.map((item, i) => {
|
|
348
|
+
return <li key={i}>{item}</li>;
|
|
349
|
+
})}
|
|
350
|
+
</>
|
|
351
|
+
) : (
|
|
352
|
+
<li>{item?.organisation?.raw}</li>
|
|
353
|
+
)}
|
|
354
|
+
</ul>
|
|
355
|
+
</div>
|
|
356
|
+
)}
|
|
357
|
+
{time_coverage?.raw && time_coverage?.raw.length > 0 && (
|
|
358
|
+
<>
|
|
359
|
+
<h5>Temporal coverage</h5>
|
|
360
|
+
{Array.isArray(time_coverage?.raw) ? (
|
|
361
|
+
<span>
|
|
362
|
+
{startTempCoverage} - {endTempCoverage}
|
|
363
|
+
</span>
|
|
364
|
+
) : (
|
|
365
|
+
<span>{time_coverage?.raw}</span>
|
|
366
|
+
)}
|
|
367
|
+
</>
|
|
368
|
+
)}
|
|
348
369
|
</div>
|
|
370
|
+
|
|
371
|
+
{/* <div className="info-wrapper">
|
|
372
|
+
<div className="info-content">
|
|
373
|
+
<div className="info-title">More Information for {title?.raw}.</div>
|
|
374
|
+
<p>{description?.raw}</p>
|
|
375
|
+
</div>
|
|
376
|
+
</div> */}
|
|
349
377
|
</div>
|
|
350
378
|
) : null;
|
|
351
379
|
}
|