@eeacms/volto-datahub 0.1.8 → 0.1.9

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,115 +4,122 @@ 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
-
34
- #### [0.1.5](https://github.com/eea/volto-datahub/compare/0.1.4...0.1.5)
35
-
36
- > 29 July 2022
37
-
38
- - Release [`#6`](https://github.com/eea/volto-datahub/pull/6)
39
- - Fix merge [`6a8f3d4`](https://github.com/eea/volto-datahub/commit/6a8f3d4f3bfaacb8e0938929d8038f9e31a26ced)
40
- - Fix layout [`129d480`](https://github.com/eea/volto-datahub/commit/129d4802a63aa346d11ae8e54b323580213c0a71)
41
- - Fix merge [`3df3a81`](https://github.com/eea/volto-datahub/commit/3df3a8189448dcdd052692b6f5d835a1ea752a50)
42
- - Add back to search [`b80ce25`](https://github.com/eea/volto-datahub/commit/b80ce250d326fa75c8451d70fe366148f7d49abb)
43
- - Change datahubitem path [`7ccdbf0`](https://github.com/eea/volto-datahub/commit/7ccdbf0619e45a99e85b096dcdfb2e645e3ecc90)
44
- - Integrate the Breadcrumb [`bccae64`](https://github.com/eea/volto-datahub/commit/bccae6445b3c46d4715743558343a14b08c7c07f)
45
-
46
- #### [0.1.4](https://github.com/eea/volto-datahub/compare/0.1.3...0.1.4)
47
-
48
- > 28 July 2022
49
-
50
- - Develop [`#5`](https://github.com/eea/volto-datahub/pull/5)
51
- - Improve temporal coverage [`d0483d4`](https://github.com/eea/volto-datahub/commit/d0483d46259b956a96a66268b9ec305d27456f88)
52
- - Fix warning message [`305d2d6`](https://github.com/eea/volto-datahub/commit/305d2d61123d1ee23e8a4baf837b1aadc5d9a41f)
53
- - Hide readingTime for now [`5e508d3`](https://github.com/eea/volto-datahub/commit/5e508d3c2bfd97bcc01dca59894a4f9ad582284b)
54
- - ESlint fix [`dcfbab4`](https://github.com/eea/volto-datahub/commit/dcfbab4effa23ddcc3d4bf9a61d0b0d101c796b6)
55
- - Set topics filter always visible [`1c062f4`](https://github.com/eea/volto-datahub/commit/1c062f473c123b5c04055fc6a52ea56bbd00e7b4)
56
- - Update item view [`a53d297`](https://github.com/eea/volto-datahub/commit/a53d297916bb8d2c5d020acb9de600228e344982)
57
- - Fix import [`bfa1cbc`](https://github.com/eea/volto-datahub/commit/bfa1cbc04c60009f949ac675278df894b4e1c892)
58
- - WIP Update dataset's page based on new figma design [`01eecfa`](https://github.com/eea/volto-datahub/commit/01eecfacd482ca6abea81e4fd24eb7871e5365c9)
59
- - Reconfigure datahub facets [`8636536`](https://github.com/eea/volto-datahub/commit/863653613d05faaa73101943896f05243055c696)
60
- - Update result item based on new figma design [`eb618a0`](https://github.com/eea/volto-datahub/commit/eb618a0ce441cb9d797b39efad6bf98e4b07c728)
61
-
62
- #### [0.1.3](https://github.com/eea/volto-datahub/compare/0.1.2...0.1.3)
63
-
64
- > 30 June 2022
65
-
66
-
67
- #### [0.1.2](https://github.com/eea/volto-datahub/compare/0.1.1...0.1.2)
68
-
69
- > 30 June 2022
70
-
71
- - Release [`#3`](https://github.com/eea/volto-datahub/pull/3)
72
- - Hide questions & fix landing page [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)
73
-
74
- #### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1)
75
-
76
- > 10 June 2022
77
-
78
- - Fix dependencies [`#2`](https://github.com/eea/volto-datahub/pull/2)
79
-
80
- #### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0)
81
-
82
- > 9 June 2022
83
-
84
- - Develop [`#1`](https://github.com/eea/volto-datahub/pull/1)
85
- - Avoid warning [`02c08ac`](https://github.com/eea/volto-datahub/commit/02c08acf2ce2009d63451dceb81a3e754e57572b)
86
- - Update imports [`c35b976`](https://github.com/eea/volto-datahub/commit/c35b97607a84423d946afb8fba84b539c9c3caf3)
87
- - fixed typo [`2f6f573`](https://github.com/eea/volto-datahub/commit/2f6f5739f56239a8cf19045fe28c35ba01e8138e)
88
- - updated dependencies [`6997881`](https://github.com/eea/volto-datahub/commit/6997881363df8399973e24b14cdf340bb701a0fb)
89
- - Update versions [`5805ad2`](https://github.com/eea/volto-datahub/commit/5805ad27ce99c087d5561b75d98b58cc8774b346)
90
- - updated dependencies [`44527f7`](https://github.com/eea/volto-datahub/commit/44527f7bb7c2a7e492bb0d6ef83f9337ec7369fb)
91
- - fixed typo [`8b96d63`](https://github.com/eea/volto-datahub/commit/8b96d63ae2ad56c4120989e08a2562d352c49978)
92
- - updated dependencies [`ddd8aa3`](https://github.com/eea/volto-datahub/commit/ddd8aa3daa90884df45409250eeb8ee13668d821)
93
- - added volto-searchlib as dependency [`894e4c0`](https://github.com/eea/volto-datahub/commit/894e4c022237dad35609a0741a7cd6585d786907)
94
- - updated dependencies [`1b907cf`](https://github.com/eea/volto-datahub/commit/1b907cf1ce33a9bc35b489983740653872176e2c)
95
- - Remove imported css [`56ca7c5`](https://github.com/eea/volto-datahub/commit/56ca7c5dbbad9aee3781c971fab5ef4f320bc125)
96
-
97
- #### 0.0.1
98
-
99
- > 19 May 2022
100
-
101
- - Use Callout instead of Quote [`52158a3`](https://github.com/eea/volto-datahub/commit/52158a3fdb14f8228c83fbc8d32dbbb1e9c296e0)
102
- - Update BlockQuote [`a66cc90`](https://github.com/eea/volto-datahub/commit/a66cc900a2ba7452c7a0dfa54b678b45fbbb5c44)
103
- - Prettier [`50b2a67`](https://github.com/eea/volto-datahub/commit/50b2a679229c994d256d99818c318c999d1980b6)
104
- - WIP Datahub item view [`5c42f6f`](https://github.com/eea/volto-datahub/commit/5c42f6fac74dd6895a281397977a0879c4471519)
105
- - Remove the index if not enableNLP [`3a3f399`](https://github.com/eea/volto-datahub/commit/3a3f399b4b7c117465358c9ca42ff6f0d3626d6d)
106
- - Don't crash when no data yet [`1e08b02`](https://github.com/eea/volto-datahub/commit/1e08b02ae7bef74ef03d75f82cbf3a8056f66f7a)
107
- - Fix datahub config [`b847f6d`](https://github.com/eea/volto-datahub/commit/b847f6daa685ce3e8541ccd8a4122c0261fe8b03)
108
- - Don't use SegmentedBreadcrumb, it's not needed yet [`38e616b`](https://github.com/eea/volto-datahub/commit/38e616b54e7df842ce036b8b2681de65e129493e)
109
- - Code cleanup [`39df02c`](https://github.com/eea/volto-datahub/commit/39df02c9cf9c72debbd24f61db9c2bffa2ea5d6b)
110
- - Add datahub item view [`7478768`](https://github.com/eea/volto-datahub/commit/7478768b12dfa9e04f0d704395386afea05ea9e1)
111
- - Add custom datahub item [`ce8dfd4`](https://github.com/eea/volto-datahub/commit/ce8dfd4136977b75e21bbd69041d10ca84063751)
112
- - configure fields to be excluded from response [`fde38e1`](https://github.com/eea/volto-datahub/commit/fde38e1a44e7e45de007907ff9270b90f35b6eca)
113
- - Don't need this import [`c691386`](https://github.com/eea/volto-datahub/commit/c691386242bdbc1b1334ebf1d9115b7455ea998f)
114
- - Tweaks [`d4e79f8`](https://github.com/eea/volto-datahub/commit/d4e79f8eed36847fb2ee0d7ba0a340cf790e22c6)
115
- - Install datahub [`b52e323`](https://github.com/eea/volto-datahub/commit/b52e32314777b030c819c656d59c72bbda87f6dc)
116
- - Add files from searchlib [`279d959`](https://github.com/eea/volto-datahub/commit/279d959e57a8d52a22432f2c6c975fa5d5d7e95f)
117
- - Run bootstrap [`8b7c48c`](https://github.com/eea/volto-datahub/commit/8b7c48cec37185e3fb47ba0a362024592f90a82e)
118
- - Initial commit [`ea8d1ed`](https://github.com/eea/volto-datahub/commit/ea8d1edb00bed5ebd31ea48d1342302a49d6b873)
7
+ ### [0.1.9](https://github.com/eea/volto-datahub/compare/0.1.8...0.1.9) - 12 September 2022
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Fix ESLint [kreafox - [`200e8d9`](https://github.com/eea/volto-datahub/commit/200e8d977301d3b37362a0a02332ec4b27d74876)]
12
+ - Add published date [kreafox - [`9f83e86`](https://github.com/eea/volto-datahub/commit/9f83e864e6b02d327e39fd880d39242231f95063)]
13
+ - Rename facsheet button [kreafox - [`7c4fbd2`](https://github.com/eea/volto-datahub/commit/7c4fbd20a51399980362f1e08752ccb337883992)]
14
+ - Rename SDI Metadata Catalogue => More information [kreafox - [`1893fa4`](https://github.com/eea/volto-datahub/commit/1893fa4cec2bdf9d4e419a54d554301135e42781)]
15
+ - Remove author from search results [kreafox - [`87f81d0`](https://github.com/eea/volto-datahub/commit/87f81d073b8e93d1e9e9d52154031c840064078b)]
16
+ - Improve datasets list [kreafox - [`accc140`](https://github.com/eea/volto-datahub/commit/accc1407438bc6536f08e9684d5fb8c53a55cefa)]
17
+ - Split some components [kreafox - [`dcc004f`](https://github.com/eea/volto-datahub/commit/dcc004f8dfaf831b9a746a5991bbe68f0164f718)]
18
+ - More like this improvements [kreafox - [`d96c8fc`](https://github.com/eea/volto-datahub/commit/d96c8fc574e85cac8d4c856bcc309f7cbefa951b)]
19
+ - include all fields in the results for similar documents [Zoltan Szabo - [`5c65789`](https://github.com/eea/volto-datahub/commit/5c65789abb28442dbff307da3185bfe4c71be951)]
20
+ - Added 'more like this' functionality [Zoltan Szabo - [`30dd3d9`](https://github.com/eea/volto-datahub/commit/30dd3d94689e73037526717d012ad2967d955e3f)]
21
+ - Layout improvements [kreafox - [`72287ec`](https://github.com/eea/volto-datahub/commit/72287ec134a4f9f9810d3841a82ad8246289e9e4)]
22
+ - ignore 'European Environment Agency' on detail page's organisation list [Zoltan Szabo - [`5578d82`](https://github.com/eea/volto-datahub/commit/5578d821ddbc96962d42f257b5e3f1ce6bbbf584)]
23
+ - PDF factsheet [kreafox - [`1d449cb`](https://github.com/eea/volto-datahub/commit/1d449cb826a00ecba536ad5a23cc365c0eb2d86e)]
24
+ - Update icon & small cleanup [kreafox - [`d2cd1c8`](https://github.com/eea/volto-datahub/commit/d2cd1c8200c36f20d39a1da95ef60a207b1e79c1)]
25
+ - Layout improvements [kreafox - [`98103ae`](https://github.com/eea/volto-datahub/commit/98103ae6308cf78785246da4f081b334c494a455)]
26
+ - import useAppConfig from hocs [Zoltan Szabo - [`2152036`](https://github.com/eea/volto-datahub/commit/21520368325003e4782d8d61a3b6123bfdfde0bb)]
27
+ - fixed temporal coverage for data series [Zoltan Szabo - [`fc9a1d1`](https://github.com/eea/volto-datahub/commit/fc9a1d16a4ba7686f4477edebf72ccd8373a0262)]
28
+ - updated temporal coverage [Zoltan Szabo - [`edd09ed`](https://github.com/eea/volto-datahub/commit/edd09ede6e51c98fb99eb202ab159cc9e6dba246)]
29
+ - added temporal coverage for data series and datasets [Zoltan Szabo - [`a651f4f`](https://github.com/eea/volto-datahub/commit/a651f4f4e5c4d09e44ec0f30972705cd16f10c21)]
30
+ ### [0.1.8](https://github.com/eea/volto-datahub/compare/0.1.7...0.1.8) - 29 August 2022
31
+
32
+ #### :hammer_and_wrench: Others
33
+
34
+ - Added facet for time coverage [Zoltan Szabo - [`553518e`](https://github.com/eea/volto-datahub/commit/553518e7297e7bdace1323010735feb781e3b628)]
35
+ ### [0.1.7](https://github.com/eea/volto-datahub/compare/0.1.6...0.1.7) - 26 August 2022
36
+
37
+ #### :hammer_and_wrench: Others
38
+
39
+ - Link to the SDI metadata pdf [kreafox - [`e28b3a0`](https://github.com/eea/volto-datahub/commit/e28b3a0254ee9d60d0804de57dc401c4a9fbea0a)]
40
+ - Add services icon, datasets improvements [kreafox - [`5b9295a`](https://github.com/eea/volto-datahub/commit/5b9295ad26af7305d217e3dec99b7337603e329f)]
41
+ - WIP datasets section: sorting, add formats [kreafox - [`7d51ec6`](https://github.com/eea/volto-datahub/commit/7d51ec63aa0716073ab6e1f75488fea83dfe585f)]
42
+ - Remove more information section [kreafox - [`8a38fee`](https://github.com/eea/volto-datahub/commit/8a38fee341c8b7f7c830b7e0331fcb15a28857f3)]
43
+ - First accordion open by default [kreafox - [`9b7af42`](https://github.com/eea/volto-datahub/commit/9b7af424dec504ed019a79bf5110f2054b2e3168)]
44
+ - Remove unused import [kreafox - [`f9c62a2`](https://github.com/eea/volto-datahub/commit/f9c62a22b527923e9b02479f72f1e19a9ff6ad76)]
45
+ - WIP update datahub item view [kreafox - [`607f9be`](https://github.com/eea/volto-datahub/commit/607f9be74604c8c5ad6ff89f29bc127a94f41288)]
46
+ - Add datasets listing [kreafox - [`3d9cc1d`](https://github.com/eea/volto-datahub/commit/3d9cc1d25bb7f0406520473883b6af9167c3fd7b)]
47
+ - Fix temporal coverage [kreafox - [`6bc81c5`](https://github.com/eea/volto-datahub/commit/6bc81c52daccf69813a9eb229d6ccb635e9dde49)]
48
+ - Update [kreafox - [`d78a5ba`](https://github.com/eea/volto-datahub/commit/d78a5ba0624821820640aa91b3f51b2b75cb3edf)]
49
+ ### [0.1.6](https://github.com/eea/volto-datahub/compare/0.1.5...0.1.6) - 3 August 2022
50
+
51
+ #### :hammer_and_wrench: Others
52
+
53
+ - Add banner for ItemView [kreafox - [`7c70d6a`](https://github.com/eea/volto-datahub/commit/7c70d6ad127bb9cbdae95ae898304c85d2ab8bd8)]
54
+ ### [0.1.5](https://github.com/eea/volto-datahub/compare/0.1.4...0.1.5) - 29 July 2022
55
+
56
+ #### :hammer_and_wrench: Others
57
+
58
+ - Fix merge [kreafox - [`6a8f3d4`](https://github.com/eea/volto-datahub/commit/6a8f3d4f3bfaacb8e0938929d8038f9e31a26ced)]
59
+ - Fix layout [kreafox - [`129d480`](https://github.com/eea/volto-datahub/commit/129d4802a63aa346d11ae8e54b323580213c0a71)]
60
+ - Fix merge [kreafox - [`3df3a81`](https://github.com/eea/volto-datahub/commit/3df3a8189448dcdd052692b6f5d835a1ea752a50)]
61
+ - Add back to search [kreafox - [`b80ce25`](https://github.com/eea/volto-datahub/commit/b80ce250d326fa75c8451d70fe366148f7d49abb)]
62
+ - Change datahubitem path [Tiberiu Ichim - [`7ccdbf0`](https://github.com/eea/volto-datahub/commit/7ccdbf0619e45a99e85b096dcdfb2e645e3ecc90)]
63
+ - Integrate the Breadcrumb [Tiberiu Ichim - [`bccae64`](https://github.com/eea/volto-datahub/commit/bccae6445b3c46d4715743558343a14b08c7c07f)]
64
+ ### [0.1.4](https://github.com/eea/volto-datahub/compare/0.1.3...0.1.4) - 28 July 2022
65
+
66
+ #### :hammer_and_wrench: Others
67
+
68
+ - Improve temporal coverage [kreafox - [`d0483d4`](https://github.com/eea/volto-datahub/commit/d0483d46259b956a96a66268b9ec305d27456f88)]
69
+ - Fix warning message [kreafox - [`305d2d6`](https://github.com/eea/volto-datahub/commit/305d2d61123d1ee23e8a4baf837b1aadc5d9a41f)]
70
+ - Hide readingTime for now [kreafox - [`5e508d3`](https://github.com/eea/volto-datahub/commit/5e508d3c2bfd97bcc01dca59894a4f9ad582284b)]
71
+ - ESlint fix [kreafox - [`dcfbab4`](https://github.com/eea/volto-datahub/commit/dcfbab4effa23ddcc3d4bf9a61d0b0d101c796b6)]
72
+ - Set topics filter always visible [kreafox - [`1c062f4`](https://github.com/eea/volto-datahub/commit/1c062f473c123b5c04055fc6a52ea56bbd00e7b4)]
73
+ - Update item view [kreafox - [`a53d297`](https://github.com/eea/volto-datahub/commit/a53d297916bb8d2c5d020acb9de600228e344982)]
74
+ - Fix import [kreafox - [`bfa1cbc`](https://github.com/eea/volto-datahub/commit/bfa1cbc04c60009f949ac675278df894b4e1c892)]
75
+ - WIP Update dataset's page based on new figma design [kreafox - [`01eecfa`](https://github.com/eea/volto-datahub/commit/01eecfacd482ca6abea81e4fd24eb7871e5365c9)]
76
+ - Reconfigure datahub facets [Tiberiu Ichim - [`8636536`](https://github.com/eea/volto-datahub/commit/863653613d05faaa73101943896f05243055c696)]
77
+ - Update result item based on new figma design [kreafox - [`eb618a0`](https://github.com/eea/volto-datahub/commit/eb618a0ce441cb9d797b39efad6bf98e4b07c728)]
78
+ ### [0.1.3](https://github.com/eea/volto-datahub/compare/0.1.2...0.1.3) - 30 June 2022
79
+
80
+ ### [0.1.2](https://github.com/eea/volto-datahub/compare/0.1.1...0.1.2) - 30 June 2022
81
+
82
+ #### :hammer_and_wrench: Others
83
+
84
+ - Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
85
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
86
+ ### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
87
+
88
+ ### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
89
+
90
+ #### :hammer_and_wrench: Others
91
+
92
+ - Avoid warning [Tiberiu Ichim - [`02c08ac`](https://github.com/eea/volto-datahub/commit/02c08acf2ce2009d63451dceb81a3e754e57572b)]
93
+ - Update imports [Tiberiu Ichim - [`c35b976`](https://github.com/eea/volto-datahub/commit/c35b97607a84423d946afb8fba84b539c9c3caf3)]
94
+ - fixed typo [Zoltan Szabo - [`2f6f573`](https://github.com/eea/volto-datahub/commit/2f6f5739f56239a8cf19045fe28c35ba01e8138e)]
95
+ - updated dependencies [Zoltan Szabo - [`6997881`](https://github.com/eea/volto-datahub/commit/6997881363df8399973e24b14cdf340bb701a0fb)]
96
+ - Update versions [Tiberiu Ichim - [`5805ad2`](https://github.com/eea/volto-datahub/commit/5805ad27ce99c087d5561b75d98b58cc8774b346)]
97
+ - updated dependencies [Zoltan Szabo - [`44527f7`](https://github.com/eea/volto-datahub/commit/44527f7bb7c2a7e492bb0d6ef83f9337ec7369fb)]
98
+ - fixed typo [Zoltan Szabo - [`8b96d63`](https://github.com/eea/volto-datahub/commit/8b96d63ae2ad56c4120989e08a2562d352c49978)]
99
+ - updated dependencies [Zoltan Szabo - [`ddd8aa3`](https://github.com/eea/volto-datahub/commit/ddd8aa3daa90884df45409250eeb8ee13668d821)]
100
+ - added volto-searchlib as dependency [Zoltan Szabo - [`894e4c0`](https://github.com/eea/volto-datahub/commit/894e4c022237dad35609a0741a7cd6585d786907)]
101
+ - updated dependencies [Zoltan Szabo - [`1b907cf`](https://github.com/eea/volto-datahub/commit/1b907cf1ce33a9bc35b489983740653872176e2c)]
102
+ - Remove imported css [kreafox - [`56ca7c5`](https://github.com/eea/volto-datahub/commit/56ca7c5dbbad9aee3781c971fab5ef4f320bc125)]
103
+ ### 0.0.1 - 19 May 2022
104
+
105
+ #### :hammer_and_wrench: Others
106
+
107
+ - Use Callout instead of Quote [kreafox - [`52158a3`](https://github.com/eea/volto-datahub/commit/52158a3fdb14f8228c83fbc8d32dbbb1e9c296e0)]
108
+ - Update BlockQuote [kreafox - [`a66cc90`](https://github.com/eea/volto-datahub/commit/a66cc900a2ba7452c7a0dfa54b678b45fbbb5c44)]
109
+ - Fix Jenkinsfile [kreafox - [`def0c67`](https://github.com/eea/volto-datahub/commit/def0c6786711b1f8a1448f4093b89b5da7e86c30)]
110
+ - Prettier [kreafox - [`50b2a67`](https://github.com/eea/volto-datahub/commit/50b2a679229c994d256d99818c318c999d1980b6)]
111
+ - WIP Datahub item view [kreafox - [`5c42f6f`](https://github.com/eea/volto-datahub/commit/5c42f6fac74dd6895a281397977a0879c4471519)]
112
+ - Remove the index if not enableNLP [Tiberiu Ichim - [`3a3f399`](https://github.com/eea/volto-datahub/commit/3a3f399b4b7c117465358c9ca42ff6f0d3626d6d)]
113
+ - Don't crash when no data yet [Tiberiu Ichim - [`1e08b02`](https://github.com/eea/volto-datahub/commit/1e08b02ae7bef74ef03d75f82cbf3a8056f66f7a)]
114
+ - Fix datahub config [Tiberiu Ichim - [`b847f6d`](https://github.com/eea/volto-datahub/commit/b847f6daa685ce3e8541ccd8a4122c0261fe8b03)]
115
+ - Don't use SegmentedBreadcrumb, it's not needed yet [Tiberiu Ichim - [`38e616b`](https://github.com/eea/volto-datahub/commit/38e616b54e7df842ce036b8b2681de65e129493e)]
116
+ - Code cleanup [Tiberiu Ichim - [`39df02c`](https://github.com/eea/volto-datahub/commit/39df02c9cf9c72debbd24f61db9c2bffa2ea5d6b)]
117
+ - Add datahub item view [Tiberiu Ichim - [`7478768`](https://github.com/eea/volto-datahub/commit/7478768b12dfa9e04f0d704395386afea05ea9e1)]
118
+ - Add custom datahub item [Tiberiu Ichim - [`ce8dfd4`](https://github.com/eea/volto-datahub/commit/ce8dfd4136977b75e21bbd69041d10ca84063751)]
119
+ - configure fields to be excluded from response [Zoltan Szabo - [`fde38e1`](https://github.com/eea/volto-datahub/commit/fde38e1a44e7e45de007907ff9270b90f35b6eca)]
120
+ - Don't need this import [Tiberiu Ichim - [`c691386`](https://github.com/eea/volto-datahub/commit/c691386242bdbc1b1334ebf1d9115b7455ea998f)]
121
+ - Tweaks [Tiberiu Ichim - [`d4e79f8`](https://github.com/eea/volto-datahub/commit/d4e79f8eed36847fb2ee0d7ba0a340cf790e22c6)]
122
+ - Install datahub [Tiberiu Ichim - [`b52e323`](https://github.com/eea/volto-datahub/commit/b52e32314777b030c819c656d59c72bbda87f6dc)]
123
+ - Add files from searchlib [Tiberiu Ichim - [`279d959`](https://github.com/eea/volto-datahub/commit/279d959e57a8d52a22432f2c6c975fa5d5d7e95f)]
124
+ - Run bootstrap [Tiberiu Ichim - [`8b7c48c`](https://github.com/eea/volto-datahub/commit/8b7c48cec37185e3fb47ba0a362024592f90a82e)]
125
+ - 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.8",
3
+ "version": "0.1.9",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -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;
@@ -1,62 +1,41 @@
1
1
  import React from 'react';
2
- import { Container, Accordion, Icon, List } from 'semantic-ui-react';
2
+ import { Portal } from 'react-portal';
3
+ import { useDispatch } from 'react-redux';
4
+ import { Link, useLocation } from 'react-router-dom';
5
+ import { Container, Icon } from 'semantic-ui-react';
3
6
  import { Toolbar } from '@plone/volto/components';
4
7
  import { BodyClass } from '@plone/volto/helpers';
5
- import { Portal } from 'react-portal';
8
+ import config from '@plone/volto/registry';
6
9
  import {
7
10
  useResult,
8
11
  AppConfigContext,
9
12
  SearchContext,
10
13
  rebind,
11
14
  applyConfigurationSchema,
15
+ DateTime,
12
16
  } from '@eeacms/search';
13
- import { DateTime } from '@eeacms/search';
14
17
  import { SearchProvider, WithSearch } from '@elastic/react-search-ui';
15
18
  import { Callout, Banner } from '@eeacms/volto-eea-design-system/ui';
16
- import { useDispatch } from 'react-redux';
17
- import config from '@plone/volto/registry';
18
- import { Link, useLocation } from 'react-router-dom';
19
+ import {
20
+ MoreLikeThis,
21
+ MetadataSection,
22
+ Datasets,
23
+ } from '@eeacms/volto-datahub/components/ItemView';
19
24
  import bannerBG from './banner.svg';
20
- import servicesSVG from './icons/services.svg';
21
25
 
22
26
  const appName = 'datahub';
23
27
 
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
-
39
28
  function ItemView(props) {
40
- const { docid, location } = props;
29
+ const { docid, location, appConfig } = props;
41
30
  const { fromPathname, fromSearch } = location?.state || {};
42
31
  const dispatch = useDispatch();
43
32
  // const content = useSelector((state) => state.content.data);
44
33
  const result = useResult(null, docid);
45
34
  const item = result ? result._result : null;
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);
35
+ const { title, description, raw_value } = item || {}; // readingTime
36
+ const { changeDate } = raw_value?.raw || {};
50
37
  const rawTitle = title?.raw || '';
51
38
 
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
-
60
39
  React.useEffect(() => {
61
40
  const handler = async () => {
62
41
  if (item) {
@@ -83,18 +62,6 @@ function ItemView(props) {
83
62
  handler();
84
63
  }, [item, dispatch, docid, rawTitle]);
85
64
 
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
- );
95
-
96
- // console.log('result', result?._result);
97
-
98
65
  return item ? (
99
66
  <div className="dataset-view">
100
67
  <Portal node={document.getElementById('page-header')}>
@@ -125,11 +92,13 @@ function ItemView(props) {
125
92
  <div className="dataset-header">
126
93
  <h1>{title?.raw}</h1>
127
94
  <div className="dataset-header-bottom">
128
- <span className="header-data">Prod-ID: [No data]</span>
129
- <span className="header-data">
95
+ <span className="header-data">Prod-ID: -</span>
96
+ {/* <span className="header-data">
130
97
  Created: <DateTime format="DATE_MED" value={issued?.raw} />
98
+ </span> */}
99
+ <span className="header-data">
100
+ Published: <DateTime format="DATE_MED" value={result.issued} />
131
101
  </span>
132
- <span className="header-data">Published: [No data]</span>
133
102
  <span className="header-data">
134
103
  Last modified: <DateTime format="DATE_MED" value={changeDate} />
135
104
  </span>
@@ -141,231 +110,11 @@ function ItemView(props) {
141
110
 
142
111
  <Callout>{description?.raw}</Callout>
143
112
 
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
- })}
113
+ <Datasets item={item} appConfig={appConfig} />
193
114
 
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
- })}
115
+ <MetadataSection item={item} appConfig={appConfig} docid={docid} />
222
116
 
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
- })}
243
-
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
- })}
269
-
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
- })}
291
-
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>
315
- </>
316
- );
317
- })}
318
- </Accordion>
319
- </>
320
- )}
321
-
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>
337
- )}
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
- )}
117
+ <MoreLikeThis docid={docid} title={title.raw} appConfig={appConfig} />
369
118
  </div>
370
119
 
371
120
  {/* <div className="info-wrapper">
@@ -412,7 +161,11 @@ function DatahubItemView(props) {
412
161
  return (
413
162
  <AppConfigContext.Provider value={appConfigContext}>
414
163
  <SearchContext.Provider value={params}>
415
- <ItemView docid={docid} location={location} />
164
+ <ItemView
165
+ docid={docid}
166
+ location={location}
167
+ appConfig={appConfig}
168
+ />
416
169
  </SearchContext.Provider>
417
170
  </AppConfigContext.Provider>
418
171
  );
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import { Icon } from 'semantic-ui-react';
3
+
4
+ const EEA = 'European Environment Agency';
5
+
6
+ const MetadataSection = (props) => {
7
+ const { item, appConfig, docid } = props;
8
+ const { raw_value, organisation, rod } = item || {};
9
+ const { merged_time_coverage_range } = raw_value?.raw || {};
10
+ const org = !!organisation
11
+ ? !Array.isArray(organisation?.raw)
12
+ ? [organisation?.raw]
13
+ : organisation?.raw
14
+ : [];
15
+ const organisations = org.filter((org) => org !== EEA);
16
+
17
+ return (
18
+ <div className="metadata-wrapper">
19
+ <h2>More information</h2>
20
+
21
+ {!!rod && (
22
+ <div className="metadata-section">
23
+ <h5>Reporting obligations (ROD)</h5>
24
+
25
+ {Array.isArray(rod?.raw) ? (
26
+ <>
27
+ {rod?.raw.map((item, i) => {
28
+ return <div key={i}>{item}</div>;
29
+ })}
30
+ </>
31
+ ) : (
32
+ <div>{rod?.raw}</div>
33
+ )}
34
+ </div>
35
+ )}
36
+
37
+ {!!organisations && organisations.length > 0 && (
38
+ <div className="metadata-section">
39
+ <h5>Organisation:</h5>
40
+
41
+ {organisations.map((item, i) => {
42
+ return <div key={i}>{item}</div>;
43
+ })}
44
+ </div>
45
+ )}
46
+
47
+ {merged_time_coverage_range && merged_time_coverage_range?.length > 0 && (
48
+ <div className="metadata-section">
49
+ <h5>Temporal coverage:</h5>
50
+
51
+ {merged_time_coverage_range.map((tc, i) => {
52
+ const tc_start = tc.start || '';
53
+ const tc_end = tc.end || '';
54
+ return (
55
+ <React.Fragment key={i}>
56
+ <span>
57
+ {tc_start === tc_end && tc_start}
58
+ {tc_start !== tc_end && tc_start + ' - ' + tc_end}
59
+ </span>
60
+ {i !== merged_time_coverage_range.length - 1 ? ', ' : ' '}
61
+ </React.Fragment>
62
+ );
63
+ })}
64
+ </div>
65
+ )}
66
+
67
+ <div className="pdf-btn">
68
+ <Icon className="file pdf" />
69
+ <a
70
+ target="_blank"
71
+ rel="noreferrer"
72
+ href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
73
+ >
74
+ SDI Metadata Factsheet
75
+ </a>
76
+ </div>
77
+ </div>
78
+ );
79
+ };
80
+
81
+ export default MetadataSection;
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { Card } from 'semantic-ui-react';
3
+ import { runRequest, firstWords } from '@eeacms/search';
4
+
5
+ function buildQuery(title, docid) {
6
+ const body = {
7
+ // _source: {
8
+ // include: ['label', 'about', ],
9
+ // },
10
+ size: 3,
11
+ query: {
12
+ bool: {
13
+ must: [
14
+ {
15
+ more_like_this: {
16
+ fields: ['label'],
17
+ like: title,
18
+ min_term_freq: 1,
19
+ min_word_length: 3,
20
+ max_query_terms: 35,
21
+ analyzer: 'english',
22
+ minimum_should_match: '70%',
23
+ },
24
+ },
25
+ ],
26
+ must_not: [
27
+ {
28
+ match: {
29
+ about: docid,
30
+ },
31
+ },
32
+ ],
33
+ },
34
+ },
35
+ };
36
+ return body;
37
+ }
38
+
39
+ const MoreLikeThis = (props) => {
40
+ const { docid, title, appConfig } = props;
41
+
42
+ const [similarDocs, setSimilarDocs] = React.useState();
43
+
44
+ React.useEffect(() => {
45
+ async function getSimilarDocs(docid, title, appConfig) {
46
+ const query_body = buildQuery(title, docid);
47
+ const resp = await runRequest(query_body, appConfig);
48
+ setSimilarDocs(resp.body.hits.hits);
49
+ }
50
+ getSimilarDocs(docid, title, appConfig);
51
+ }, [appConfig, docid, title]);
52
+
53
+ return similarDocs && similarDocs.length > 0 ? (
54
+ <div className="more-like-this">
55
+ <h2>Similar content</h2>
56
+ <div className="section-wrapper">
57
+ <Card.Group itemsPerRow={3}>
58
+ {similarDocs.map((item, i) => {
59
+ return (
60
+ <Card
61
+ href={`/en/datahub/datahubitem-view/${item._source.about}`}
62
+ key={i}
63
+ >
64
+ <Card.Content>
65
+ <Card.Header>
66
+ <span title={item._source.label}>
67
+ {firstWords(item._source.label, 10)}
68
+ </span>
69
+ </Card.Header>
70
+ <Card.Description>
71
+ <span className="card-description">
72
+ {item._source.description}
73
+ </span>
74
+ </Card.Description>
75
+ </Card.Content>
76
+ </Card>
77
+ );
78
+ })}
79
+ </Card.Group>
80
+ </div>
81
+ </div>
82
+ ) : null;
83
+ };
84
+
85
+ export default MoreLikeThis;
@@ -1,3 +1,3 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19.3825 19.562C18.9344 18.5917 18.5734 17.3767 18.3328 16H15.0703C16.0253 17.651 17.5534 18.929 19.3825 19.562ZM21.0285 18.3283C20.7671 17.6747 20.5403 16.8885 20.3667 16H23.6333C23.4597 16.8885 23.2329 17.6747 22.9715 18.3283C22.6653 19.0937 22.3508 19.5788 22.1039 19.8399C22.0635 19.8826 22.0289 19.9155 22 19.9407C21.9711 19.9155 21.9365 19.8826 21.8961 19.8399C21.6492 19.5788 21.3347 19.0937 21.0285 18.3283ZM20 12C20 12.6936 20.0306 13.3627 20.0872 14H23.9128C23.9694 13.3627 24 12.6936 24 12C24 11.6605 23.9927 11.3269 23.9786 11H20.0214C20.0073 11.3269 20 11.6605 20 12ZM24.6175 19.562C25.0656 18.5917 25.4266 17.3767 25.6672 16H28.9297C27.9747 17.651 26.4466 18.929 24.6175 19.562ZM25.92 14H29.748C29.9125 13.3608 30 12.6906 30 12C30 11.6613 29.979 11.3276 29.9381 11H25.9802C25.9933 11.3289 26 11.6625 26 12C26 12.6849 25.9725 13.3538 25.92 14ZM24.6175 4.43801C26.8011 5.19373 28.5557 6.86865 29.4185 9H25.8169C25.592 7.21014 25.1713 5.63713 24.6175 4.43801ZM22.9715 5.67171C23.3272 6.56108 23.6189 7.69598 23.7996 9H20.2004C20.3811 7.69598 20.6728 6.56108 21.0285 5.67171C21.3347 4.90634 21.6492 4.42118 21.8961 4.16007C21.9365 4.11741 21.9711 4.08451 22 4.05929C22.0289 4.08451 22.0635 4.11741 22.1039 4.16007C22.3508 4.42118 22.6653 4.90634 22.9715 5.67171ZM19.3825 4.43801C18.8287 5.63713 18.408 7.21014 18.1831 9H14.5815C15.4443 6.86865 17.1989 5.19373 19.3825 4.43801ZM14 12C14 11.6613 14.021 11.3276 14.0619 11H18.0198C18.0067 11.3289 18 11.6625 18 12C18 12.6849 18.0275 13.3538 18.08 14H14.252C14.0875 13.3608 14 12.6906 14 12ZM22 2C27.5228 2 32 6.47715 32 12C32 17.5228 27.5228 22 22 22C16.4772 22 12 17.5228 12 12C12 6.47715 16.4772 2 22 2ZM7 24H5L5 30H7V24ZM7 32C7.56328 32 8.07217 31.7671 8.43566 31.3924H10.0481L18.4255 33.6755C18.8115 33.8043 19.4057 33.9448 20.0454 33.9872C20.6816 34.0293 21.5082 33.9849 22.2166 33.5941C22.7349 33.3082 24.0438 32.4206 25.4052 31.4772C26.7931 30.5154 28.3067 29.4452 29.2772 28.7531L29.2949 28.7404L32.2147 26.4599L32.2569 26.418C32.534 26.1429 32.8368 25.7471 32.9484 25.2114C33.2648 23.6929 32.0851 22.046 30.332 22.046C29.6348 22.046 29.1353 22.2807 28.8273 22.4254L28.8055 22.4356L28.7659 22.4542L24.0116 24.9376C23.5353 24.5362 22.9191 24.2942 22.2469 24.2942H18.6099L18.0245 23.7852C16.8265 22.6777 15.2188 22 13.4549 22C12.3341 22 11.2748 22.2739 10.3438 22.7588H8.56834C8.20201 22.2965 7.63563 22 7 22H5C3.89543 22 3 22.8954 3 24V30C3 31.1046 3.89543 32 5 32H7ZM10.3158 29.3924H9V24.7588H10.8659L11.0972 24.6259C11.7895 24.2282 12.5937 24 13.4549 24C14.702 24 15.8331 24.4791 16.6758 25.262L16.6878 25.2733L17.862 26.2942H22.2469C22.5269 26.2942 22.7687 26.4478 22.8927 26.6737C22.948 26.7745 22.9796 26.8897 22.9796 27.0149C22.9796 27.4063 22.6582 27.7355 22.2469 27.7355H17.6316C17.0793 27.7355 16.6316 28.1832 16.6316 28.7355C16.6316 29.2878 17.0793 29.7355 17.6316 29.7355H22.2469C23.7495 29.7355 24.9796 28.524 24.9796 27.0149C24.9796 26.9078 24.9734 26.802 24.9612 26.698L29.6539 24.2468L29.655 24.2463C29.9454 24.11 30.0996 24.046 30.332 24.046C30.5438 24.046 30.7227 24.1422 30.8485 24.3011C30.9825 24.4702 31.0196 24.6634 30.9905 24.8035C30.9887 24.812 30.9754 24.8629 30.8832 24.9621L28.0981 27.1374C27.1321 27.8263 25.6361 28.8839 24.266 29.8334C22.8608 30.8071 21.6563 31.619 21.2505 31.8429C21.0347 31.9619 20.6633 32.0237 20.1776 31.9915C19.7133 31.9608 19.277 31.8532 19.0412 31.7724L19.011 31.7621L10.3158 29.3924Z"/>
1
+ <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4305 20.7572C19.9264 19.6657 19.5203 18.2987 19.2496 16.75H15.5792C16.6536 18.6073 18.3727 20.0451 20.4305 20.7572ZM22.2822 19.3693C21.9881 18.634 21.733 17.7495 21.5376 16.75H25.2126C25.0173 17.7495 24.7622 18.634 24.4681 19.3693C24.1236 20.2304 23.7698 20.7762 23.492 21.0699C23.4466 21.1179 23.4077 21.1549 23.3751 21.1833C23.3426 21.1549 23.3037 21.1179 23.2583 21.0699C22.9805 20.7762 22.6267 20.2304 22.2822 19.3693ZM21.1251 12.25C21.1251 13.0302 21.1596 13.7831 21.2232 14.5H25.5271C25.5907 13.7831 25.6251 13.0302 25.6251 12.25C25.6251 11.8681 25.6169 11.4928 25.601 11.125H21.1493C21.1334 11.4928 21.1251 11.8681 21.1251 12.25ZM26.3198 20.7572C26.8239 19.6657 27.23 18.2987 27.5007 16.75H31.1711C30.0967 18.6073 28.3776 20.0451 26.3198 20.7572ZM27.7851 14.5H32.0916C32.2767 13.7808 32.3751 13.0269 32.3751 12.25C32.3751 11.869 32.3515 11.4935 32.3055 11.125H27.8529C27.8676 11.495 27.8751 11.8703 27.8751 12.25C27.8751 13.0205 27.8442 13.773 27.7851 14.5ZM26.3198 3.74275C28.7764 4.59295 30.7503 6.47723 31.7209 8.875H27.6691C27.4162 6.8614 26.9428 5.09177 26.3198 3.74275ZM24.4681 5.13068C24.8683 6.13121 25.1964 7.40798 25.3997 8.875H21.3506C21.5539 7.40798 21.882 6.13121 22.2822 5.13068C22.6267 4.26963 22.9805 3.72382 23.2583 3.43007C23.3037 3.38208 23.3426 3.34507 23.3751 3.3167C23.4077 3.34507 23.4466 3.38208 23.492 3.43007C23.7698 3.72382 24.1236 4.26963 24.4681 5.13068ZM20.4305 3.74275C19.8075 5.09177 19.3341 6.8614 19.0812 8.875H15.0294C15.9999 6.47723 17.9739 4.59295 20.4305 3.74275ZM14.3751 12.25C14.3751 11.869 14.3988 11.4935 14.4448 11.125H18.8974C18.8827 11.495 18.8751 11.8703 18.8751 12.25C18.8751 13.0205 18.9061 13.773 18.9652 14.5H14.6587C14.4736 13.7808 14.3751 13.0269 14.3751 12.25ZM23.3751 1C29.5883 1 34.6251 6.03679 34.6251 12.25C34.6251 18.4632 29.5883 23.5 23.3751 23.5C17.1619 23.5 12.1251 18.4632 12.1251 12.25C12.1251 6.03679 17.1619 1 23.3751 1ZM6.5 25.7499H4.25V32.4999H6.5V25.7499ZM6.5 34.7499C7.13369 34.7499 7.70619 34.488 8.11512 34.0664H9.92915L19.3537 36.6348C19.7879 36.7797 20.4564 36.9378 21.176 36.9855C21.8918 37.0329 22.8217 36.9829 23.6186 36.5433C24.2017 36.2216 25.6743 35.2231 27.2058 34.1618C28.7672 33.0797 30.47 31.8758 31.5618 31.0971L31.5818 31.0829L34.8666 28.5173L34.914 28.4702C35.2257 28.1607 35.5664 27.7154 35.692 27.1128C36.0479 25.4045 34.7208 23.5517 32.7485 23.5517C31.9642 23.5517 31.4022 23.8157 31.0557 23.9785L31.0312 23.99L30.9866 24.0109L25.638 26.8047C25.1022 26.3532 24.409 26.0809 23.6528 26.0809H19.5611L18.9026 25.5083C17.5548 24.2624 15.7461 23.4999 13.7618 23.4999C12.5008 23.4999 11.3092 23.808 10.2617 24.3536H8.26438C7.85225 23.8335 7.21508 23.4999 6.5 23.4999H4.25C3.00736 23.4999 2 24.5073 2 25.7499V32.4999C2 33.7426 3.00736 34.7499 4.25 34.7499H6.5ZM10.2302 31.8164H8.75V26.6036H10.8491L11.1093 26.4541C11.8882 26.0067 12.7929 25.7499 13.7618 25.7499C15.1647 25.7499 16.4372 26.2889 17.3852 27.1697L17.3988 27.1824L18.7197 28.3309H23.6528C23.9678 28.3309 24.2397 28.5037 24.3792 28.7578C24.4415 28.8712 24.4771 29.0008 24.4771 29.1416C24.4771 29.582 24.1155 29.9524 23.6528 29.9524H18.4605C17.8392 29.9524 17.3355 30.456 17.3355 31.0774C17.3355 31.6987 17.8392 32.2024 18.4605 32.2024H23.6528C25.3432 32.2024 26.7271 30.8394 26.7271 29.1416C26.7271 29.0212 26.72 28.9022 26.7063 28.7852L31.9857 26.0275L31.9869 26.027C32.3136 25.8737 32.4871 25.8017 32.7485 25.8017C32.9867 25.8017 33.188 25.9099 33.3296 26.0887C33.4802 26.2789 33.5221 26.4963 33.4893 26.6538C33.4873 26.6635 33.4723 26.7206 33.3686 26.8323L30.2354 29.2795C29.1485 30.0545 27.4656 31.2443 25.9242 32.3125C24.3434 33.4079 22.9883 34.3213 22.5317 34.5732C22.289 34.7071 21.8712 34.7766 21.3248 34.7404C20.8025 34.7058 20.3116 34.5847 20.0464 34.4939L20.0124 34.4823L10.2302 31.8164Z"/>
3
3
  </svg>
@@ -0,0 +1,3 @@
1
+ export Datasets from './Datasets';
2
+ export MetadataSection from './MetadataSection';
3
+ export MoreLikeThis from './MoreLikeThis';
@@ -5,8 +5,8 @@ import {
5
5
  // Button,
6
6
  // Dropdown
7
7
  } from 'semantic-ui-react';
8
- import { DateTime as FormattedDate, StringList } from '@eeacms/search';
9
- import { DateTime } from 'luxon';
8
+ import { DateTime, StringList } from '@eeacms/search';
9
+ // import { DateTime } from 'luxon';
10
10
  // import { useAppConfig, useWindowDimensions } from '@eeacms/search/lib/hocs';
11
11
  // import { TagsList } from '@eeacms/search/components'; // SegmentedBreadcrumb,
12
12
  // import { firstWords, getTermDisplayValue } from '@eeacms/search/lib/utils';
@@ -53,7 +53,7 @@ const DatahubCardItem = (props) => {
53
53
  // const { width } = useWindowDimensions();
54
54
  // const isSmallScreen = width < 1000;
55
55
  // const clusters = result.clusterInfo;
56
- // console.log('result', result.metaTypes, result._result);
56
+ // console.log('result', result._result);
57
57
 
58
58
  return (
59
59
  <div
@@ -71,10 +71,10 @@ const DatahubCardItem = (props) => {
71
71
  </div>*/}
72
72
  <div className={classColLeft}>
73
73
  <div className="details">
74
- <div className="result-info">
74
+ {/* <div className="result-info">
75
75
  <span className="result-info-title">Author: </span>
76
76
  {result._result?.raw_value?.raw.Org}
77
- </div>
77
+ </div> */}
78
78
  <h3>
79
79
  <Link
80
80
  to={{
@@ -153,13 +153,8 @@ const DatahubCardItem = (props) => {
153
153
  </div>
154
154
  ) : null}
155
155
  <div className="result-info">
156
- <span className="result-info-title">Last modified: </span>
157
- <FormattedDate
158
- format="DATE_MED"
159
- value={DateTime.fromISO(
160
- result?._result?.raw_value.raw.changeDate,
161
- )}
162
- />
156
+ <span className="result-info-title">Published: </span>
157
+ <DateTime format="DATE_MED" value={result.issued} />
163
158
  </div>
164
159
  <div className="result-info">
165
160
  <span className="result-info-title">Available formats: </span>
package/src/index.js CHANGED
@@ -28,6 +28,7 @@ const applyConfig = (config) => {
28
28
  datahub.enableNLP = false;
29
29
  datahub.showPromptQueries = false;
30
30
  datahub.requestBodyModifiers.push(tweakForNLPService);
31
+ datahub.indexBaseUrl = 'https://galliwasp.eea.europa.eu';
31
32
  // datahub.resultViews[0].factories.item = "DatahubListingViewItem"
32
33
 
33
34
  config.settings.nonContentRoutes.push(/datahubitem-view\/(.*)/); // \/(.*)\/