@eeacms/volto-datahub 1.0.0 → 1.0.1

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.
@@ -1,15 +1,18 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- const projectRootPath = fs.realpathSync('./project'); // __dirname
4
+ const projectRootPath = fs.existsSync('./project')
5
+ ? fs.realpathSync('./project')
6
+ : fs.realpathSync('./../../../');
5
7
  const packageJson = require(path.join(projectRootPath, 'package.json'));
6
- const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
8
+ const jsConfig = require(path.join(projectRootPath, 'jsconfig.json'))
9
+ .compilerOptions;
7
10
 
8
11
  const pathsConfig = jsConfig.paths;
9
12
 
10
13
  let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
11
14
 
12
- Object.keys(pathsConfig).forEach(pkg => {
15
+ Object.keys(pathsConfig).forEach((pkg) => {
13
16
  if (pkg === '@plone/volto') {
14
17
  voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
15
18
  }
@@ -18,11 +21,15 @@ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
18
21
  const reg = new AddonConfigurationRegistry(projectRootPath);
19
22
 
20
23
  // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
21
- const addonAliases = Object.keys(reg.packages).map(o => [
24
+ const addonAliases = Object.keys(reg.packages).map((o) => [
22
25
  o,
23
26
  reg.packages[o].modulePath,
24
27
  ]);
25
28
 
29
+ const voltoSearchlibPath = path.dirname(
30
+ reg.packages['@eeacms/volto-searchlib'].modulePath,
31
+ );
32
+ const searchlibPath = path.resolve(`${voltoSearchlibPath}/searchlib`);
26
33
 
27
34
  module.exports = {
28
35
  extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
@@ -32,6 +39,7 @@ module.exports = {
32
39
  map: [
33
40
  ['@plone/volto', '@plone/volto/src'],
34
41
  ...addonAliases,
42
+ ['@eeacms/search', searchlibPath],
35
43
  ['@package', `${__dirname}/src`],
36
44
  ['~', `${__dirname}/src`],
37
45
  ],
@@ -43,4 +51,3 @@ module.exports = {
43
51
  },
44
52
  },
45
53
  };
46
-
package/CHANGELOG.md CHANGED
@@ -4,7 +4,17 @@ 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.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
7
+ ### [1.0.1](https://github.com/eea/volto-datahub/compare/1.0.0...1.0.1) - 15 November 2022
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - Fix eslintrc: add @eeacms/search [kreafox - [`465816f`](https://github.com/eea/volto-datahub/commit/465816feb8f58095ab4b5b3168cd29ebede3a10c)]
12
+ - Use latest Volto before yarn 3 [Tiberiu Ichim - [`69f5859`](https://github.com/eea/volto-datahub/commit/69f585980fd9a38ff99d0c7875704671857720f7)]
13
+ - Reorder sections on landing page [kreafox - [`46fac8d`](https://github.com/eea/volto-datahub/commit/46fac8d821cf93fe1b2c380380719de130c3f1cb)]
14
+ - Fix project eslintrc [kreafox - [`5baa150`](https://github.com/eea/volto-datahub/commit/5baa1505ec38ed313269f5608c186c6a6a8bbfc4)]
15
+ - Open dataset links in new tab [kreafox - [`bbed914`](https://github.com/eea/volto-datahub/commit/bbed914dc2edf6c749d1d73d93a423bc642e680c)]
16
+ - Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`380a2a9`](https://github.com/eea/volto-datahub/commit/380a2a9625c6f799df7a7c343fad3f3b3d959f96)]
17
+ ## [1.0.0](https://github.com/eea/volto-datahub/compare/0.1.12...1.0.0) - 28 October 2022
8
18
 
9
19
  #### :nail_care: Enhancements
10
20
 
@@ -28,6 +38,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
28
38
  #### :hammer_and_wrench: Others
29
39
 
30
40
  - fixed query for related items [Zoltan Szabo - [`b66faee`](https://github.com/eea/volto-datahub/commit/b66faee1f8a1922cd22b3a36eccc9c7b92e377d4)]
41
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`158fe1a`](https://github.com/eea/volto-datahub/commit/158fe1a0b1767452e2e51a3e2ef97169589a50e8)]
31
42
  ### [0.1.10](https://github.com/eea/volto-datahub/compare/0.1.9...0.1.10) - 21 September 2022
32
43
 
33
44
  #### :hammer_and_wrench: Others
@@ -116,6 +127,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
116
127
  #### :hammer_and_wrench: Others
117
128
 
118
129
  - Hide questions & fix landing page [kreafox - [`a1ef303`](https://github.com/eea/volto-datahub/commit/a1ef3033df0e84f3a72dd0f984c8717dff2a771c)]
130
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`910688e`](https://github.com/eea/volto-datahub/commit/910688e3ddf2f8cda4f941595ae9a6ee0ec0ea3b)]
119
131
  ### [0.1.1](https://github.com/eea/volto-datahub/compare/0.1.0...0.1.1) - 10 June 2022
120
132
 
121
133
  ### [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.0",
3
+ "version": "1.0.1",
4
4
  "description": "@eeacms/volto-datahub: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -43,7 +43,12 @@ const DatasetList = (props) => {
43
43
  <List.Content>
44
44
  <div className="dataset-item">
45
45
  <Icon className="download" />
46
- <a href={item.url} className="item-link">
46
+ <a
47
+ href={item.url}
48
+ className="item-link"
49
+ target="_blank"
50
+ rel="noreferrer"
51
+ >
47
52
  <span>{item.name}</span>
48
53
  </a>
49
54
  </div>
@@ -64,11 +69,21 @@ const DatasetList = (props) => {
64
69
  <div className="dataset-item">
65
70
  <Icon className="download" />
66
71
  {item.name ? (
67
- <a href={item.url} className="item-link">
72
+ <a
73
+ href={item.url}
74
+ className="item-link"
75
+ target="_blank"
76
+ rel="noreferrer"
77
+ >
68
78
  {item.name}
69
79
  </a>
70
80
  ) : (
71
- <a href={item.url} className="item-link">
81
+ <a
82
+ href={item.url}
83
+ className="item-link"
84
+ target="_blank"
85
+ rel="noreferrer"
86
+ >
72
87
  Download link
73
88
  </a>
74
89
  )}
@@ -84,7 +99,12 @@ const DatasetList = (props) => {
84
99
  <List.Content>
85
100
  <div className="dataset-item">
86
101
  <Icon className="download" />
87
- <a href={item.url} className="item-link">
102
+ <a
103
+ href={item.url}
104
+ className="item-link"
105
+ target="_blank"
106
+ rel="noreferrer"
107
+ >
88
108
  WebDAV: {item.name || item.function}
89
109
  </a>
90
110
  </div>
@@ -99,7 +119,12 @@ const DatasetList = (props) => {
99
119
  <List.Content>
100
120
  <div className="dataset-item">
101
121
  <Icon className="download" />
102
- <a href={item.url} className="item-link">
122
+ <a
123
+ href={item.url}
124
+ className="item-link"
125
+ target="_blank"
126
+ rel="noreferrer"
127
+ >
103
128
  WebDAV: {item.name || item.function}
104
129
  </a>
105
130
  </div>
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { DateTime, StringList } from '@eeacms/search';
4
4
  import { ResultContext } from '@eeacms/search';
5
5
  import { Link } from 'react-router-dom';
6
- import { UniversalItem } from '@eeacms/volto-listing-block';
6
+ import { UniversalCard } from '@eeacms/volto-listing-block';
7
7
 
8
8
  const DatahubCardItem = (props) => {
9
9
  const { result } = props;
@@ -57,7 +57,7 @@ const DatahubCardItem = (props) => {
57
57
  '@type': 'searchItem',
58
58
  };
59
59
 
60
- return <UniversalItem item={item} itemModel={itemModel} />;
60
+ return <UniversalCard item={item} itemModel={itemModel} />;
61
61
  };
62
62
 
63
63
  // <div
@@ -19,18 +19,18 @@ export default {
19
19
  sortField: 'issued.date',
20
20
  sortDirection: 'desc',
21
21
  sections: [
22
- {
23
- id: 'rod',
24
- title: 'Reporting obligations',
25
- facetField: 'rod',
26
- sortOn: 'alpha',
27
- },
28
22
  {
29
23
  id: 'topics',
30
24
  title: 'EEA topics',
31
25
  facetField: 'topic',
32
26
  sortOn: 'alpha',
33
27
  },
28
+ {
29
+ id: 'rod',
30
+ title: 'Reporting obligations',
31
+ facetField: 'rod',
32
+ sortOn: 'alpha',
33
+ },
34
34
  {
35
35
  id: 'website',
36
36
  title: 'Sources',