@eeacms/volto-datahub 0.1.8 → 0.1.10
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 +129 -112
- package/package.json +5 -3
- package/src/components/ItemView/Datasets.jsx +304 -0
- package/src/components/ItemView/ItemView.jsx +27 -274
- package/src/components/ItemView/MetadataSection.jsx +81 -0
- package/src/components/ItemView/MoreLikeThis.jsx +85 -0
- package/src/components/ItemView/icons/services.svg +2 -2
- package/src/components/ItemView/index.js +3 -0
- package/src/components/LandingPage/DatahubLandingPage.jsx +84 -67
- package/src/components/Result/DatahubCardItem.jsx +124 -181
- package/src/config/index.js +1 -1
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,115 +4,132 @@ 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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- Fix
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
7
|
+
### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Update dependencies [kreafox - [`e9fc8c3`](https://github.com/eea/volto-datahub/commit/e9fc8c35530214b19e969d1e5d9b88ffe9098c4d)]
|
|
12
|
+
- Use tabs on the landing page [kreafox - [`d0f4b91`](https://github.com/eea/volto-datahub/commit/d0f4b910d414f5cbad58d9b8eaa7090b1aa3b7dd)]
|
|
13
|
+
- Fix card model [Tiberiu Ichim - [`3d98969`](https://github.com/eea/volto-datahub/commit/3d98969ce9339c6aa6126cb5bbe7ad630ab74faf)]
|
|
14
|
+
- WIP integrate UniversalItem [kreafox - [`02e37f4`](https://github.com/eea/volto-datahub/commit/02e37f43fe580982acba5ae731f77a6724ec13fe)]
|
|
15
|
+
- WIP use universalItem [Tiberiu Ichim - [`024313e`](https://github.com/eea/volto-datahub/commit/024313e1d43135ae4f9c170d19065eea23fa7138)]
|
|
16
|
+
- Code cleanup in datahub item [Tiberiu Ichim - [`3856914`](https://github.com/eea/volto-datahub/commit/3856914da9b2759bb8c9bdf5af233d2eb6bfd9b3)]
|
|
17
|
+
### [0.1.9](https://github.com/eea/volto-datahub/compare/0.1.8...0.1.9) - 16 September 2022
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- Fix ESLint [kreafox - [`200e8d9`](https://github.com/eea/volto-datahub/commit/200e8d977301d3b37362a0a02332ec4b27d74876)]
|
|
22
|
+
- Add published date [kreafox - [`9f83e86`](https://github.com/eea/volto-datahub/commit/9f83e864e6b02d327e39fd880d39242231f95063)]
|
|
23
|
+
- Rename facsheet button [kreafox - [`7c4fbd2`](https://github.com/eea/volto-datahub/commit/7c4fbd20a51399980362f1e08752ccb337883992)]
|
|
24
|
+
- Rename SDI Metadata Catalogue => More information [kreafox - [`1893fa4`](https://github.com/eea/volto-datahub/commit/1893fa4cec2bdf9d4e419a54d554301135e42781)]
|
|
25
|
+
- Remove author from search results [kreafox - [`87f81d0`](https://github.com/eea/volto-datahub/commit/87f81d073b8e93d1e9e9d52154031c840064078b)]
|
|
26
|
+
- Improve datasets list [kreafox - [`accc140`](https://github.com/eea/volto-datahub/commit/accc1407438bc6536f08e9684d5fb8c53a55cefa)]
|
|
27
|
+
- Split some components [kreafox - [`dcc004f`](https://github.com/eea/volto-datahub/commit/dcc004f8dfaf831b9a746a5991bbe68f0164f718)]
|
|
28
|
+
- More like this improvements [kreafox - [`d96c8fc`](https://github.com/eea/volto-datahub/commit/d96c8fc574e85cac8d4c856bcc309f7cbefa951b)]
|
|
29
|
+
- include all fields in the results for similar documents [Zoltan Szabo - [`5c65789`](https://github.com/eea/volto-datahub/commit/5c65789abb28442dbff307da3185bfe4c71be951)]
|
|
30
|
+
- Added 'more like this' functionality [Zoltan Szabo - [`30dd3d9`](https://github.com/eea/volto-datahub/commit/30dd3d94689e73037526717d012ad2967d955e3f)]
|
|
31
|
+
- Layout improvements [kreafox - [`72287ec`](https://github.com/eea/volto-datahub/commit/72287ec134a4f9f9810d3841a82ad8246289e9e4)]
|
|
32
|
+
- ignore 'European Environment Agency' on detail page's organisation list [Zoltan Szabo - [`5578d82`](https://github.com/eea/volto-datahub/commit/5578d821ddbc96962d42f257b5e3f1ce6bbbf584)]
|
|
33
|
+
- PDF factsheet [kreafox - [`1d449cb`](https://github.com/eea/volto-datahub/commit/1d449cb826a00ecba536ad5a23cc365c0eb2d86e)]
|
|
34
|
+
- Update icon & small cleanup [kreafox - [`d2cd1c8`](https://github.com/eea/volto-datahub/commit/d2cd1c8200c36f20d39a1da95ef60a207b1e79c1)]
|
|
35
|
+
- Layout improvements [kreafox - [`98103ae`](https://github.com/eea/volto-datahub/commit/98103ae6308cf78785246da4f081b334c494a455)]
|
|
36
|
+
- import useAppConfig from hocs [Zoltan Szabo - [`2152036`](https://github.com/eea/volto-datahub/commit/21520368325003e4782d8d61a3b6123bfdfde0bb)]
|
|
37
|
+
- fixed temporal coverage for data series [Zoltan Szabo - [`fc9a1d1`](https://github.com/eea/volto-datahub/commit/fc9a1d16a4ba7686f4477edebf72ccd8373a0262)]
|
|
38
|
+
- updated temporal coverage [Zoltan Szabo - [`edd09ed`](https://github.com/eea/volto-datahub/commit/edd09ede6e51c98fb99eb202ab159cc9e6dba246)]
|
|
39
|
+
- added temporal coverage for data series and datasets [Zoltan Szabo - [`a651f4f`](https://github.com/eea/volto-datahub/commit/a651f4f4e5c4d09e44ec0f30972705cd16f10c21)]
|
|
40
|
+
### [0.1.8](https://github.com/eea/volto-datahub/compare/0.1.7...0.1.8) - 29 August 2022
|
|
41
|
+
|
|
42
|
+
#### :hammer_and_wrench: Others
|
|
43
|
+
|
|
44
|
+
- Added facet for time coverage [Zoltan Szabo - [`553518e`](https://github.com/eea/volto-datahub/commit/553518e7297e7bdace1323010735feb781e3b628)]
|
|
45
|
+
### [0.1.7](https://github.com/eea/volto-datahub/compare/0.1.6...0.1.7) - 26 August 2022
|
|
46
|
+
|
|
47
|
+
#### :hammer_and_wrench: Others
|
|
48
|
+
|
|
49
|
+
- Link to the SDI metadata pdf [kreafox - [`e28b3a0`](https://github.com/eea/volto-datahub/commit/e28b3a0254ee9d60d0804de57dc401c4a9fbea0a)]
|
|
50
|
+
- Add services icon, datasets improvements [kreafox - [`5b9295a`](https://github.com/eea/volto-datahub/commit/5b9295ad26af7305d217e3dec99b7337603e329f)]
|
|
51
|
+
- WIP datasets section: sorting, add formats [kreafox - [`7d51ec6`](https://github.com/eea/volto-datahub/commit/7d51ec63aa0716073ab6e1f75488fea83dfe585f)]
|
|
52
|
+
- Remove more information section [kreafox - [`8a38fee`](https://github.com/eea/volto-datahub/commit/8a38fee341c8b7f7c830b7e0331fcb15a28857f3)]
|
|
53
|
+
- First accordion open by default [kreafox - [`9b7af42`](https://github.com/eea/volto-datahub/commit/9b7af424dec504ed019a79bf5110f2054b2e3168)]
|
|
54
|
+
- Remove unused import [kreafox - [`f9c62a2`](https://github.com/eea/volto-datahub/commit/f9c62a22b527923e9b02479f72f1e19a9ff6ad76)]
|
|
55
|
+
- WIP update datahub item view [kreafox - [`607f9be`](https://github.com/eea/volto-datahub/commit/607f9be74604c8c5ad6ff89f29bc127a94f41288)]
|
|
56
|
+
- Add datasets listing [kreafox - [`3d9cc1d`](https://github.com/eea/volto-datahub/commit/3d9cc1d25bb7f0406520473883b6af9167c3fd7b)]
|
|
57
|
+
- Fix temporal coverage [kreafox - [`6bc81c5`](https://github.com/eea/volto-datahub/commit/6bc81c52daccf69813a9eb229d6ccb635e9dde49)]
|
|
58
|
+
- Update [kreafox - [`d78a5ba`](https://github.com/eea/volto-datahub/commit/d78a5ba0624821820640aa91b3f51b2b75cb3edf)]
|
|
59
|
+
### [0.1.6](https://github.com/eea/volto-datahub/compare/0.1.5...0.1.6) - 3 August 2022
|
|
60
|
+
|
|
61
|
+
#### :hammer_and_wrench: Others
|
|
62
|
+
|
|
63
|
+
- Add banner for ItemView [kreafox - [`7c70d6a`](https://github.com/eea/volto-datahub/commit/7c70d6ad127bb9cbdae95ae898304c85d2ab8bd8)]
|
|
64
|
+
### [0.1.5](https://github.com/eea/volto-datahub/compare/0.1.4...0.1.5) - 29 July 2022
|
|
65
|
+
|
|
66
|
+
#### :hammer_and_wrench: Others
|
|
67
|
+
|
|
68
|
+
- Fix merge [kreafox - [`6a8f3d4`](https://github.com/eea/volto-datahub/commit/6a8f3d4f3bfaacb8e0938929d8038f9e31a26ced)]
|
|
69
|
+
- Fix layout [kreafox - [`129d480`](https://github.com/eea/volto-datahub/commit/129d4802a63aa346d11ae8e54b323580213c0a71)]
|
|
70
|
+
- Fix merge [kreafox - [`3df3a81`](https://github.com/eea/volto-datahub/commit/3df3a8189448dcdd052692b6f5d835a1ea752a50)]
|
|
71
|
+
- Add back to search [kreafox - [`b80ce25`](https://github.com/eea/volto-datahub/commit/b80ce250d326fa75c8451d70fe366148f7d49abb)]
|
|
72
|
+
- Change datahubitem path [Tiberiu Ichim - [`7ccdbf0`](https://github.com/eea/volto-datahub/commit/7ccdbf0619e45a99e85b096dcdfb2e645e3ecc90)]
|
|
73
|
+
- Integrate the Breadcrumb [Tiberiu Ichim - [`bccae64`](https://github.com/eea/volto-datahub/commit/bccae6445b3c46d4715743558343a14b08c7c07f)]
|
|
74
|
+
### [0.1.4](https://github.com/eea/volto-datahub/compare/0.1.3...0.1.4) - 28 July 2022
|
|
75
|
+
|
|
76
|
+
#### :hammer_and_wrench: Others
|
|
77
|
+
|
|
78
|
+
- Improve temporal coverage [kreafox - [`d0483d4`](https://github.com/eea/volto-datahub/commit/d0483d46259b956a96a66268b9ec305d27456f88)]
|
|
79
|
+
- Fix warning message [kreafox - [`305d2d6`](https://github.com/eea/volto-datahub/commit/305d2d61123d1ee23e8a4baf837b1aadc5d9a41f)]
|
|
80
|
+
- Hide readingTime for now [kreafox - [`5e508d3`](https://github.com/eea/volto-datahub/commit/5e508d3c2bfd97bcc01dca59894a4f9ad582284b)]
|
|
81
|
+
- ESlint fix [kreafox - [`dcfbab4`](https://github.com/eea/volto-datahub/commit/dcfbab4effa23ddcc3d4bf9a61d0b0d101c796b6)]
|
|
82
|
+
- Set topics filter always visible [kreafox - [`1c062f4`](https://github.com/eea/volto-datahub/commit/1c062f473c123b5c04055fc6a52ea56bbd00e7b4)]
|
|
83
|
+
- Update item view [kreafox - [`a53d297`](https://github.com/eea/volto-datahub/commit/a53d297916bb8d2c5d020acb9de600228e344982)]
|
|
84
|
+
- Fix import [kreafox - [`bfa1cbc`](https://github.com/eea/volto-datahub/commit/bfa1cbc04c60009f949ac675278df894b4e1c892)]
|
|
85
|
+
- WIP Update dataset's page based on new figma design [kreafox - [`01eecfa`](https://github.com/eea/volto-datahub/commit/01eecfacd482ca6abea81e4fd24eb7871e5365c9)]
|
|
86
|
+
- Reconfigure datahub facets [Tiberiu Ichim - [`8636536`](https://github.com/eea/volto-datahub/commit/863653613d05faaa73101943896f05243055c696)]
|
|
87
|
+
- Update result item based on new figma design [kreafox - [`eb618a0`](https://github.com/eea/volto-datahub/commit/eb618a0ce441cb9d797b39efad6bf98e4b07c728)]
|
|
88
|
+
### [0.1.3](https://github.com/eea/volto-datahub/compare/0.1.2...0.1.3) - 30 June 2022
|
|
89
|
+
|
|
90
|
+
### [0.1.2](https://github.com/eea/volto-datahub/compare/0.1.1...0.1.2) - 30 June 2022
|
|
91
|
+
|
|
92
|
+
#### :hammer_and_wrench: Others
|
|
93
|
+
|
|
94
|
+
- Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
|
|
95
|
+
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
|
|
96
|
+
### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
|
|
97
|
+
|
|
98
|
+
### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
|
|
99
|
+
|
|
100
|
+
#### :hammer_and_wrench: Others
|
|
101
|
+
|
|
102
|
+
- Avoid warning [Tiberiu Ichim - [`02c08ac`](https://github.com/eea/volto-datahub/commit/02c08acf2ce2009d63451dceb81a3e754e57572b)]
|
|
103
|
+
- Update imports [Tiberiu Ichim - [`c35b976`](https://github.com/eea/volto-datahub/commit/c35b97607a84423d946afb8fba84b539c9c3caf3)]
|
|
104
|
+
- fixed typo [Zoltan Szabo - [`2f6f573`](https://github.com/eea/volto-datahub/commit/2f6f5739f56239a8cf19045fe28c35ba01e8138e)]
|
|
105
|
+
- updated dependencies [Zoltan Szabo - [`6997881`](https://github.com/eea/volto-datahub/commit/6997881363df8399973e24b14cdf340bb701a0fb)]
|
|
106
|
+
- Update versions [Tiberiu Ichim - [`5805ad2`](https://github.com/eea/volto-datahub/commit/5805ad27ce99c087d5561b75d98b58cc8774b346)]
|
|
107
|
+
- updated dependencies [Zoltan Szabo - [`44527f7`](https://github.com/eea/volto-datahub/commit/44527f7bb7c2a7e492bb0d6ef83f9337ec7369fb)]
|
|
108
|
+
- fixed typo [Zoltan Szabo - [`8b96d63`](https://github.com/eea/volto-datahub/commit/8b96d63ae2ad56c4120989e08a2562d352c49978)]
|
|
109
|
+
- updated dependencies [Zoltan Szabo - [`ddd8aa3`](https://github.com/eea/volto-datahub/commit/ddd8aa3daa90884df45409250eeb8ee13668d821)]
|
|
110
|
+
- added volto-searchlib as dependency [Zoltan Szabo - [`894e4c0`](https://github.com/eea/volto-datahub/commit/894e4c022237dad35609a0741a7cd6585d786907)]
|
|
111
|
+
- updated dependencies [Zoltan Szabo - [`1b907cf`](https://github.com/eea/volto-datahub/commit/1b907cf1ce33a9bc35b489983740653872176e2c)]
|
|
112
|
+
- Remove imported css [kreafox - [`56ca7c5`](https://github.com/eea/volto-datahub/commit/56ca7c5dbbad9aee3781c971fab5ef4f320bc125)]
|
|
113
|
+
### 0.0.1 - 19 May 2022
|
|
114
|
+
|
|
115
|
+
#### :hammer_and_wrench: Others
|
|
116
|
+
|
|
117
|
+
- Use Callout instead of Quote [kreafox - [`52158a3`](https://github.com/eea/volto-datahub/commit/52158a3fdb14f8228c83fbc8d32dbbb1e9c296e0)]
|
|
118
|
+
- Update BlockQuote [kreafox - [`a66cc90`](https://github.com/eea/volto-datahub/commit/a66cc900a2ba7452c7a0dfa54b678b45fbbb5c44)]
|
|
119
|
+
- Fix Jenkinsfile [kreafox - [`def0c67`](https://github.com/eea/volto-datahub/commit/def0c6786711b1f8a1448f4093b89b5da7e86c30)]
|
|
120
|
+
- Prettier [kreafox - [`50b2a67`](https://github.com/eea/volto-datahub/commit/50b2a679229c994d256d99818c318c999d1980b6)]
|
|
121
|
+
- WIP Datahub item view [kreafox - [`5c42f6f`](https://github.com/eea/volto-datahub/commit/5c42f6fac74dd6895a281397977a0879c4471519)]
|
|
122
|
+
- Remove the index if not enableNLP [Tiberiu Ichim - [`3a3f399`](https://github.com/eea/volto-datahub/commit/3a3f399b4b7c117465358c9ca42ff6f0d3626d6d)]
|
|
123
|
+
- Don't crash when no data yet [Tiberiu Ichim - [`1e08b02`](https://github.com/eea/volto-datahub/commit/1e08b02ae7bef74ef03d75f82cbf3a8056f66f7a)]
|
|
124
|
+
- Fix datahub config [Tiberiu Ichim - [`b847f6d`](https://github.com/eea/volto-datahub/commit/b847f6daa685ce3e8541ccd8a4122c0261fe8b03)]
|
|
125
|
+
- Don't use SegmentedBreadcrumb, it's not needed yet [Tiberiu Ichim - [`38e616b`](https://github.com/eea/volto-datahub/commit/38e616b54e7df842ce036b8b2681de65e129493e)]
|
|
126
|
+
- Code cleanup [Tiberiu Ichim - [`39df02c`](https://github.com/eea/volto-datahub/commit/39df02c9cf9c72debbd24f61db9c2bffa2ea5d6b)]
|
|
127
|
+
- Add datahub item view [Tiberiu Ichim - [`7478768`](https://github.com/eea/volto-datahub/commit/7478768b12dfa9e04f0d704395386afea05ea9e1)]
|
|
128
|
+
- Add custom datahub item [Tiberiu Ichim - [`ce8dfd4`](https://github.com/eea/volto-datahub/commit/ce8dfd4136977b75e21bbd69041d10ca84063751)]
|
|
129
|
+
- configure fields to be excluded from response [Zoltan Szabo - [`fde38e1`](https://github.com/eea/volto-datahub/commit/fde38e1a44e7e45de007907ff9270b90f35b6eca)]
|
|
130
|
+
- Don't need this import [Tiberiu Ichim - [`c691386`](https://github.com/eea/volto-datahub/commit/c691386242bdbc1b1334ebf1d9115b7455ea998f)]
|
|
131
|
+
- Tweaks [Tiberiu Ichim - [`d4e79f8`](https://github.com/eea/volto-datahub/commit/d4e79f8eed36847fb2ee0d7ba0a340cf790e22c6)]
|
|
132
|
+
- Install datahub [Tiberiu Ichim - [`b52e323`](https://github.com/eea/volto-datahub/commit/b52e32314777b030c819c656d59c72bbda87f6dc)]
|
|
133
|
+
- Add files from searchlib [Tiberiu Ichim - [`279d959`](https://github.com/eea/volto-datahub/commit/279d959e57a8d52a22432f2c6c975fa5d5d7e95f)]
|
|
134
|
+
- Run bootstrap [Tiberiu Ichim - [`8b7c48c`](https://github.com/eea/volto-datahub/commit/8b7c48cec37185e3fb47ba0a362024592f90a82e)]
|
|
135
|
+
- Initial commit [Tiberiu Ichim - [`ea8d1ed`](https://github.com/eea/volto-datahub/commit/ea8d1edb00bed5ebd31ea48d1342302a49d6b873)]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-datahub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "@eeacms/volto-datahub: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"url": "git@github.com:eea/volto-datahub.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@eeacms/volto-globalsearch": "*"
|
|
20
|
+
"@eeacms/volto-globalsearch": "*",
|
|
21
|
+
"@eeacms/volto-listing-block": "*"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@plone/scripts": "*",
|
|
@@ -25,7 +26,8 @@
|
|
|
25
26
|
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
26
27
|
},
|
|
27
28
|
"addons": [
|
|
28
|
-
"@eeacms/volto-globalsearch"
|
|
29
|
+
"@eeacms/volto-globalsearch",
|
|
30
|
+
"@eeacms/volto-listing-block"
|
|
29
31
|
],
|
|
30
32
|
"scripts": {
|
|
31
33
|
"release": "release-it",
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, List, Accordion } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
import servicesSVG from './icons/services.svg';
|
|
5
|
+
|
|
6
|
+
const SVGIcon = ({ name, size, color, className, title, onClick }) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
xmlns={name.attributes && name.attributes.xmlns}
|
|
10
|
+
viewBox={name.attributes && name.attributes.viewBox}
|
|
11
|
+
style={{ height: size, width: 'auto', fill: color || 'currentColor' }}
|
|
12
|
+
className={className ? `icon ${className}` : 'icon'}
|
|
13
|
+
onClick={onClick}
|
|
14
|
+
dangerouslySetInnerHTML={{
|
|
15
|
+
__html: title ? `<title>${title}</title>${name.content}` : name.content,
|
|
16
|
+
}}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const DatasetList = (props) => {
|
|
22
|
+
const { link } = props;
|
|
23
|
+
|
|
24
|
+
const dataset = link.reduce((dataset, item) => {
|
|
25
|
+
const group = dataset[item.protocol] || [];
|
|
26
|
+
group.push(item);
|
|
27
|
+
dataset[item.protocol] = group;
|
|
28
|
+
return dataset;
|
|
29
|
+
}, {});
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div>
|
|
33
|
+
{(dataset['WWW:URL'] ||
|
|
34
|
+
dataset['WWW:LINK'] ||
|
|
35
|
+
dataset['EEA:FILEPATH'] ||
|
|
36
|
+
dataset['EEA:FOLDERPATH']) && (
|
|
37
|
+
<>
|
|
38
|
+
<h5>Download:</h5>
|
|
39
|
+
<List divided relaxed>
|
|
40
|
+
{(dataset['WWW:URL'] || []).map((item, i) => {
|
|
41
|
+
return (
|
|
42
|
+
<List.Item key={i}>
|
|
43
|
+
<List.Content>
|
|
44
|
+
<div className="dataset-item">
|
|
45
|
+
<Icon className="download" />
|
|
46
|
+
<a href={item.url} className="item-link">
|
|
47
|
+
<span>{item.name}</span>
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
</List.Content>
|
|
51
|
+
{item.description && (
|
|
52
|
+
<span className="item-description" title={item.description}>
|
|
53
|
+
{item.description}
|
|
54
|
+
</span>
|
|
55
|
+
)}
|
|
56
|
+
</List.Item>
|
|
57
|
+
);
|
|
58
|
+
})}
|
|
59
|
+
|
|
60
|
+
{(dataset['WWW:LINK'] || []).map((item, i) => {
|
|
61
|
+
return (
|
|
62
|
+
<List.Item key={i}>
|
|
63
|
+
<List.Content>
|
|
64
|
+
<div className="dataset-item">
|
|
65
|
+
<Icon className="download" />
|
|
66
|
+
{item.name ? (
|
|
67
|
+
<a href={item.url} className="item-link">
|
|
68
|
+
{item.name}
|
|
69
|
+
</a>
|
|
70
|
+
) : (
|
|
71
|
+
<a href={item.url} className="item-link">
|
|
72
|
+
Download link
|
|
73
|
+
</a>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
</List.Content>
|
|
77
|
+
</List.Item>
|
|
78
|
+
);
|
|
79
|
+
})}
|
|
80
|
+
|
|
81
|
+
{(dataset['EEA:FILEPATH'] || []).map((item, i) => {
|
|
82
|
+
return (
|
|
83
|
+
<List.Item key={i}>
|
|
84
|
+
<List.Content>
|
|
85
|
+
<div className="dataset-item">
|
|
86
|
+
<Icon className="download" />
|
|
87
|
+
<a href={item.url} className="item-link">
|
|
88
|
+
WebDAV: {item.name || item.function}
|
|
89
|
+
</a>
|
|
90
|
+
</div>
|
|
91
|
+
</List.Content>
|
|
92
|
+
</List.Item>
|
|
93
|
+
);
|
|
94
|
+
})}
|
|
95
|
+
|
|
96
|
+
{(dataset['EEA:FOLDERPATH'] || []).map((item, i) => {
|
|
97
|
+
return (
|
|
98
|
+
<List.Item key={i}>
|
|
99
|
+
<List.Content>
|
|
100
|
+
<div className="dataset-item">
|
|
101
|
+
<Icon className="download" />
|
|
102
|
+
<a href={item.url} className="item-link">
|
|
103
|
+
WebDAV: {item.name || item.function}
|
|
104
|
+
</a>
|
|
105
|
+
</div>
|
|
106
|
+
</List.Content>
|
|
107
|
+
</List.Item>
|
|
108
|
+
);
|
|
109
|
+
})}
|
|
110
|
+
</List>
|
|
111
|
+
</>
|
|
112
|
+
)}
|
|
113
|
+
|
|
114
|
+
{(dataset['ESRI:REST'] || dataset['OGC:WMS']) && (
|
|
115
|
+
<>
|
|
116
|
+
<h5>Services:</h5>
|
|
117
|
+
<List divided relaxed>
|
|
118
|
+
{(dataset['ESRI:REST'] || []).map((item, i) => {
|
|
119
|
+
return (
|
|
120
|
+
<List.Item key={i}>
|
|
121
|
+
<List.Content>
|
|
122
|
+
<SVGIcon name={servicesSVG} size="18" />
|
|
123
|
+
{/* {(item.name || item.description) && (
|
|
124
|
+
<span className="item-protocol">{item.protocol}:</span>
|
|
125
|
+
)} */}
|
|
126
|
+
<a className="item-link" href={item.url}>
|
|
127
|
+
{item.protocol} {item.name || item.description}
|
|
128
|
+
</a>
|
|
129
|
+
</List.Content>
|
|
130
|
+
</List.Item>
|
|
131
|
+
);
|
|
132
|
+
})}
|
|
133
|
+
|
|
134
|
+
{(dataset['OGC:WMS'] || []).map((item, i) => {
|
|
135
|
+
return (
|
|
136
|
+
<List.Item key={i}>
|
|
137
|
+
<List.Content>
|
|
138
|
+
<SVGIcon name={servicesSVG} size="18" />
|
|
139
|
+
{/* {(item.name || item.description) && (
|
|
140
|
+
<span className="item-protocol">{item.protocol}:</span>
|
|
141
|
+
)} */}
|
|
142
|
+
<a className="item-link" href={item.url}>
|
|
143
|
+
{item.protocol} {item.name || item.description}
|
|
144
|
+
</a>
|
|
145
|
+
</List.Content>
|
|
146
|
+
</List.Item>
|
|
147
|
+
);
|
|
148
|
+
})}
|
|
149
|
+
</List>
|
|
150
|
+
</>
|
|
151
|
+
)}
|
|
152
|
+
|
|
153
|
+
{dataset['WWW:LINK-1.0-http--link'] && (
|
|
154
|
+
<>
|
|
155
|
+
<h5>Links:</h5>
|
|
156
|
+
<List divided relaxed>
|
|
157
|
+
{(dataset['WWW:LINK-1.0-http--link'] || []).map((item, i) => {
|
|
158
|
+
return (
|
|
159
|
+
<List.Item key={i}>
|
|
160
|
+
<List.Content>
|
|
161
|
+
<div className="dataset-item">
|
|
162
|
+
<Icon className="linkify" />
|
|
163
|
+
<a
|
|
164
|
+
href={item.url}
|
|
165
|
+
className="item-link"
|
|
166
|
+
target="_blank"
|
|
167
|
+
rel="noreferrer"
|
|
168
|
+
>
|
|
169
|
+
<span>{item.name || item.url}</span>
|
|
170
|
+
</a>
|
|
171
|
+
</div>
|
|
172
|
+
</List.Content>
|
|
173
|
+
{item.description && (
|
|
174
|
+
<span className="item-description">{item.description}</span>
|
|
175
|
+
)}
|
|
176
|
+
</List.Item>
|
|
177
|
+
);
|
|
178
|
+
})}
|
|
179
|
+
</List>
|
|
180
|
+
</>
|
|
181
|
+
)}
|
|
182
|
+
</div>
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const Datasets = (props) => {
|
|
187
|
+
const { item, appConfig } = props;
|
|
188
|
+
const { children } = item?.raw_value?.raw || {};
|
|
189
|
+
|
|
190
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
191
|
+
|
|
192
|
+
function handleClick(e, titleProps) {
|
|
193
|
+
const { index } = titleProps;
|
|
194
|
+
const newIndex = activeIndex === index ? -1 : index;
|
|
195
|
+
setActiveIndex(newIndex);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const datasets = React.useMemo(
|
|
199
|
+
() =>
|
|
200
|
+
(children || []).sort(
|
|
201
|
+
(a, b) =>
|
|
202
|
+
new Date(b.publicationDateForResource).getTime() -
|
|
203
|
+
new Date(a.publicationDateForResource).getTime(),
|
|
204
|
+
),
|
|
205
|
+
[children],
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
// console.log('result', item);
|
|
209
|
+
// console.log('children', children);
|
|
210
|
+
|
|
211
|
+
return datasets && datasets.length > 0 ? (
|
|
212
|
+
<>
|
|
213
|
+
<h2>Data</h2>
|
|
214
|
+
|
|
215
|
+
<Accordion>
|
|
216
|
+
{datasets.map((dataset, index) => {
|
|
217
|
+
const { resourceTemporalExtentDetails } = dataset;
|
|
218
|
+
|
|
219
|
+
return (
|
|
220
|
+
<React.Fragment key={index}>
|
|
221
|
+
<Accordion.Title
|
|
222
|
+
active={activeIndex === index}
|
|
223
|
+
index={index}
|
|
224
|
+
onClick={handleClick}
|
|
225
|
+
>
|
|
226
|
+
<span className="dataset-title">
|
|
227
|
+
{dataset.resourceTitleObject.default}
|
|
228
|
+
<span className="formats">
|
|
229
|
+
{(dataset.format || []).map((item, i) => {
|
|
230
|
+
return (
|
|
231
|
+
<span className="format-label" key={i}>
|
|
232
|
+
{item}
|
|
233
|
+
</span>
|
|
234
|
+
);
|
|
235
|
+
})}
|
|
236
|
+
</span>
|
|
237
|
+
</span>
|
|
238
|
+
<Icon className="ri-arrow-down-s-line" />
|
|
239
|
+
</Accordion.Title>
|
|
240
|
+
<Accordion.Content active={activeIndex === index}>
|
|
241
|
+
<div className="dataset-content">
|
|
242
|
+
{resourceTemporalExtentDetails &&
|
|
243
|
+
resourceTemporalExtentDetails?.length > 0 && (
|
|
244
|
+
<div>
|
|
245
|
+
<strong>Temporal coverage: </strong>
|
|
246
|
+
|
|
247
|
+
{resourceTemporalExtentDetails.map((tc, i) => {
|
|
248
|
+
let tc_start = tc?.start?.date;
|
|
249
|
+
if (tc_start) {
|
|
250
|
+
tc_start = new Date(
|
|
251
|
+
Date.parse(tc_start),
|
|
252
|
+
).getFullYear();
|
|
253
|
+
}
|
|
254
|
+
let tc_end = tc?.end?.date;
|
|
255
|
+
if (tc_end) {
|
|
256
|
+
tc_end = new Date(Date.parse(tc_end)).getFullYear();
|
|
257
|
+
}
|
|
258
|
+
tc_start = tc_start || '';
|
|
259
|
+
tc_end = tc_end || '';
|
|
260
|
+
return (
|
|
261
|
+
<React.Fragment key={i}>
|
|
262
|
+
<span>
|
|
263
|
+
{tc_start === tc_end && tc_start}
|
|
264
|
+
{tc_start !== tc_end &&
|
|
265
|
+
tc_start + ' - ' + tc_end}
|
|
266
|
+
</span>
|
|
267
|
+
{i !== resourceTemporalExtentDetails.length - 1
|
|
268
|
+
? ', '
|
|
269
|
+
: ' '}
|
|
270
|
+
</React.Fragment>
|
|
271
|
+
);
|
|
272
|
+
})}
|
|
273
|
+
</div>
|
|
274
|
+
)}
|
|
275
|
+
|
|
276
|
+
{dataset.resourceType[0] !== 'nonGeographicDataset' && (
|
|
277
|
+
<div className="dataset-pdf">
|
|
278
|
+
<div className="pdf-btn">
|
|
279
|
+
<Icon className="file pdf" />
|
|
280
|
+
<a
|
|
281
|
+
target="_blank"
|
|
282
|
+
rel="noreferrer"
|
|
283
|
+
href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${dataset.metadataIdentifier}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
|
|
284
|
+
>
|
|
285
|
+
SDI Metadata Factsheet
|
|
286
|
+
</a>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
)}
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
{!!dataset.link && dataset.link.length > 0 && (
|
|
293
|
+
<DatasetList link={dataset.link} />
|
|
294
|
+
)}
|
|
295
|
+
</Accordion.Content>
|
|
296
|
+
</React.Fragment>
|
|
297
|
+
);
|
|
298
|
+
})}
|
|
299
|
+
</Accordion>
|
|
300
|
+
</>
|
|
301
|
+
) : null;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
export default Datasets;
|