@eeacms/volto-datahub 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [1.0.27](https://github.com/eea/volto-datahub/compare/1.0.26...1.0.27) - 25 August 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Add tests to increase coverage [kreafox - [`b112058`](https://github.com/eea/volto-datahub/commit/b112058ce16c34397e9cf59d5d96bcbc34dc70cf)]
12
+ - Formatting [kreafox - [`b0b0077`](https://github.com/eea/volto-datahub/commit/b0b007794b113a09e937ca7333b298555a947e68)]
13
+ - Accessibility improvements [kreafox - [`193ce3f`](https://github.com/eea/volto-datahub/commit/193ce3f99931ded1118065f46c5ef672ee49cbb2)]
14
+ - Accessibility improvements [kreafox - [`4301b19`](https://github.com/eea/volto-datahub/commit/4301b1946642a1c83f4f5194a73afab6f5d150fc)]
7
15
  ### [1.0.26](https://github.com/eea/volto-datahub/compare/1.0.25...1.0.26) - 23 August 2023
8
16
 
9
17
  #### :hammer_and_wrench: Others
@@ -42,6 +50,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
42
50
 
43
51
  #### :house: Internal changes
44
52
 
53
+ - chore: [JENKINS] Deprecate circularity website [valentinab25 - [`e5933ce`](https://github.com/eea/volto-datahub/commit/e5933ce8879d98aabe0bab56980dbd50ce856a36)]
45
54
 
46
55
  #### :hammer_and_wrench: Others
47
56
 
@@ -96,6 +105,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
96
105
  - added utils.js [Zoltan Szabo - [`fdb33c3`](https://github.com/eea/volto-datahub/commit/fdb33c37e1af2fe071dbe8f4f5dcd2b82932edc8)]
97
106
  - Show 'Obsolete' info in the metadata section in the banner [Zoltan Szabo - [`fddfd2a`](https://github.com/eea/volto-datahub/commit/fddfd2aea63d1a1d1567c163ab29dd7119781117)]
98
107
  - Show 'More information' section only if it's not empty [Zoltan Szabo - [`612f035`](https://github.com/eea/volto-datahub/commit/612f03509c6adf143631ae6dee5ca2bd48a501c3)]
108
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`b9100f6`](https://github.com/eea/volto-datahub/commit/b9100f6b2b2e9e9a26b9c11708c8fda94137cecc)]
99
109
  ### [1.0.15](https://github.com/eea/volto-datahub/compare/1.0.14...1.0.15) - 1 March 2023
100
110
 
101
111
  ### [1.0.14](https://github.com/eea/volto-datahub/compare/1.0.13...1.0.14) - 1 March 2023
@@ -188,9 +198,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
188
198
  #### :hammer_and_wrench: Others
189
199
 
190
200
  - Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
201
+ - Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
191
202
  - Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
192
203
  - Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
193
204
  - Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
205
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
194
206
  ## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
195
207
 
196
208
  #### :nail_care: Enhancements
@@ -215,6 +227,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
215
227
  #### :hammer_and_wrench: Others
216
228
 
217
229
  - fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
230
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
218
231
  ### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
219
232
 
220
233
  #### :hammer_and_wrench: Others
@@ -303,6 +316,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
303
316
  #### :hammer_and_wrench: Others
304
317
 
305
318
  - Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
319
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
306
320
  ### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
307
321
 
308
322
  ### [0.1.0](https://github.com/eea/volto-datahub/compare/0.0.1...0.1.0) - 9 June 2022
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-datahub",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
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,9 +17,9 @@
17
17
  "url": "git@github.com:eea/volto-datahub.git"
18
18
  },
19
19
  "dependencies": {
20
+ "@eeacms/volto-accordion-block": "*",
20
21
  "@eeacms/volto-globalsearch": "*",
21
22
  "@eeacms/volto-listing-block": "*",
22
- "@eeacms/volto-accordion-block": "*",
23
23
  "feed": "4.2.2"
24
24
  },
25
25
  "devDependencies": {
@@ -147,13 +147,16 @@ const DatasetItemsList = (props) => {
147
147
  <>
148
148
  <Accordion id={id} key={index}>
149
149
  <Accordion.Title
150
+ role="button"
150
151
  tabIndex={0}
151
152
  active={active}
153
+ aria-expanded={active}
152
154
  index={index}
153
155
  onClick={(e) => handleClick(e, { index, id, item })}
154
156
  onKeyDown={(e) => {
155
- if (e.key === 'Enter') {
156
- handleClick(e, { index });
157
+ if (e.keyCode === 13 || e.keyCode === 32) {
158
+ e.preventDefault();
159
+ handleClick(e, { index, id, item });
157
160
  }
158
161
  }}
159
162
  >
@@ -206,7 +209,11 @@ const DatasetItemsList = (props) => {
206
209
  )}
207
210
  </span>
208
211
  </span>
209
- <Icon className="ri-arrow-down-s-line" />
212
+ {active ? (
213
+ <Icon className="ri-arrow-up-s-line" />
214
+ ) : (
215
+ <Icon className="ri-arrow-down-s-line" />
216
+ )}
210
217
  </Accordion.Title>
211
218
  <Accordion.Content active={active}>
212
219
  <div className="dataset-content">
@@ -32,12 +32,21 @@ const DatasetsTab = (props) => {
32
32
 
33
33
  const panes = (items || []).map((item, i) => ({
34
34
  menuItem: (
35
- <Menu.Item key={i} tabIndex={0}>
35
+ <Menu.Item
36
+ key={i}
37
+ tabIndex={0}
38
+ onKeyDown={(e) => {
39
+ if (e.keyCode === 13 || e.keyCode === 32) {
40
+ e.preventDefault();
41
+ setActiveTabIndex(i);
42
+ }
43
+ }}
44
+ >
36
45
  {item.date ? <span>{item.date}</span> : 'No date'}
37
46
  </Menu.Item>
38
47
  ),
39
48
  render: () => (
40
- <Tab.Pane>
49
+ <Tab.Pane tabIndex={0}>
41
50
  <DatasetItemsList
42
51
  item={item}
43
52
  appConfig={appConfig}
@@ -81,7 +81,10 @@ const MetadataSection = (props) => {
81
81
  <a
82
82
  target="_blank"
83
83
  rel="noreferrer"
84
- href={`${appConfig.indexBaseUrl}/catalogue/datahub/api/records/${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`}
84
+ href={
85
+ `${appConfig.indexBaseUrl}/catalogue/datahub/api/records/` +
86
+ `${docid}/formatters/xsl-view?output=pdf&language=eng&approved=true`
87
+ }
85
88
  >
86
89
  Metadata Factsheet
87
90
  </a>
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import renderer from 'react-test-renderer';
3
+
4
+ import MoreLikeThis from './MoreLikeThis';
5
+
6
+ jest.mock('@eeacms/search', () => ({
7
+ runRequest: jest.fn(),
8
+ }));
9
+
10
+ describe('MoreLikeThis', () => {
11
+ it('renders correctly', () => {
12
+ const tree = renderer.create(<MoreLikeThis appConfig={{}} />).toJSON();
13
+ expect(tree).toMatchSnapshot();
14
+ });
15
+ });