@eeacms/volto-eea-design-system 1.23.2 → 1.23.3

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/.eslintrc.js ADDED
@@ -0,0 +1,52 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const projectRootPath = fs.existsSync('./project')
5
+ ? fs.realpathSync('./project')
6
+ : fs.realpathSync('./../../../');
7
+ const packageJson = require(path.join(projectRootPath, 'package.json'));
8
+ const jsConfig = require(path.join(
9
+ projectRootPath,
10
+ 'jsconfig.json',
11
+ )).compilerOptions;
12
+
13
+ const pathsConfig = jsConfig.paths;
14
+
15
+ let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
16
+
17
+ Object.keys(pathsConfig).forEach((pkg) => {
18
+ if (pkg === '@plone/volto') {
19
+ voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
20
+ }
21
+ });
22
+ const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
23
+ const reg = new AddonConfigurationRegistry(projectRootPath);
24
+
25
+ // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
26
+ const addonAliases = Object.keys(reg.packages).map((o) => [
27
+ o,
28
+ reg.packages[o].modulePath,
29
+ ]);
30
+
31
+ module.exports = {
32
+ extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
33
+ settings: {
34
+ 'import/resolver': {
35
+ alias: {
36
+ map: [
37
+ ['@plone/volto', '@plone/volto/src'],
38
+ ...addonAliases,
39
+ ['@package', `${__dirname}/src`],
40
+ ['~', `${__dirname}/src`],
41
+ ],
42
+ extensions: ['.js', '.jsx', '.json'],
43
+ },
44
+ 'babel-plugin-root-import': {
45
+ rootPathSuffix: 'src',
46
+ },
47
+ },
48
+ },
49
+ rules: {
50
+ 'react/jsx-no-target-blank': 'off',
51
+ },
52
+ };
package/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@ 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.23.3](https://github.com/eea/volto-eea-design-system/compare/1.23.2...1.23.3) - 12 March 2024
8
+
7
9
  ### [1.23.2](https://github.com/eea/volto-eea-design-system/compare/1.23.1...1.23.2) - 5 March 2024
8
10
 
9
11
  #### :nail_care: Enhancements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.23.2",
3
+ "version": "1.23.3",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -20,12 +20,7 @@ const FooterActions = (props) => {
20
20
  {action.title}
21
21
  </Link>
22
22
  ) : (
23
- <a
24
- href={action.url}
25
- key={index}
26
- target={'_blank'}
27
- rel={'noreferrer'}
28
- >
23
+ <a href={action.url} key={index} target={'_blank'}>
29
24
  {action.title}
30
25
  </a>
31
26
  ),
@@ -42,12 +37,7 @@ const FooterActions = (props) => {
42
37
  {copyright.title}
43
38
  </Link>
44
39
  ) : (
45
- <a
46
- href={copyright.url}
47
- key={index}
48
- target={'_blank'}
49
- rel={'noreferrer'}
50
- >
40
+ <a href={copyright.url} key={index} target={'_blank'}>
51
41
  {copyright.title}
52
42
  </a>
53
43
  ),
@@ -1263,7 +1263,6 @@ const Template = (args) => {
1263
1263
  <a
1264
1264
  href="https://europa.eu/european-union/contact/institutions-bodies_en"
1265
1265
  target="_blank"
1266
- rel="noreferrer"
1267
1266
  role="option"
1268
1267
  aria-selected="false"
1269
1268
  >
@@ -1284,12 +1283,7 @@ const Template = (args) => {
1284
1283
  <div className="wrapper" tabIndex={0} role={'presentation'}>
1285
1284
  {links.map((item, index) => (
1286
1285
  <Dropdown.Item key={index}>
1287
- <a
1288
- href={item.href}
1289
- className="site"
1290
- target="_blank"
1291
- rel="noreferrer"
1292
- >
1286
+ <a href={item.href} className="site" target="_blank">
1293
1287
  {item.title}
1294
1288
  </a>
1295
1289
  </Dropdown.Item>
@@ -4,13 +4,7 @@ import { Button, Icon } from 'semantic-ui-react';
4
4
  function NewTabLabeledIcon({ children, ...rest }) {
5
5
  return (
6
6
  <div className="eea new tab labeled icon">
7
- <Button
8
- target="_blank"
9
- rel="noreferrer"
10
- href={rest.link}
11
- as="a"
12
- className="text"
13
- >
7
+ <Button target="_blank" href={rest.link} as="a" className="text">
14
8
  {children}
15
9
  </Button>
16
10
  </div>