@eeacms/volto-n2k 0.1.4 → 0.1.5

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,12 +4,19 @@ 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.5](https://github.com/eea/volto-n2k/compare/0.1.4...0.1.5)
8
+
9
+ - Use volto 16 for cypress tests [`dfb57d1`](https://github.com/eea/volto-n2k/commit/dfb57d12d37dbeb1aa8c0d87cf8cc950cdf27d13)
10
+ - Show language native name [`20692d7`](https://github.com/eea/volto-n2k/commit/20692d74fb65ff686d23e73bd87d676b871b266f)
11
+
7
12
  #### [0.1.4](https://github.com/eea/volto-n2k/compare/0.1.3...0.1.4)
8
13
 
14
+ > 15 July 2022
15
+
16
+ - Lazy load d3 [`#5`](https://github.com/eea/volto-n2k/pull/5)
9
17
  - Prettier [`43c0a09`](https://github.com/eea/volto-n2k/commit/43c0a090f481f81e7cadcfcda59b5dcc02dd8f1a)
10
18
  - Prettier [`553c35b`](https://github.com/eea/volto-n2k/commit/553c35b2c9b34adb8fb630f2ec41f2ffd2cf22b0)
11
19
  - Prettier fix [`47619cb`](https://github.com/eea/volto-n2k/commit/47619cb286ff939df397c483c18cc532c58b7547)
12
- - Lazy load d3 [`874e88c`](https://github.com/eea/volto-n2k/commit/874e88c48f3af2f1c01f5818971248c2f19b6789)
13
20
 
14
21
  #### [0.1.3](https://github.com/eea/volto-n2k/compare/0.1.2...0.1.3)
15
22
 
package/Jenkinsfile CHANGED
@@ -6,7 +6,7 @@ pipeline {
6
6
  NAMESPACE = "@eeacms"
7
7
  SONARQUBE_TAGS = "volto.eea.europa.eu,biodiversity.europa.eu"
8
8
  DEPENDENCIES = "volto-slate @eeacms/volto-datablocks"
9
- VOLTO = "alpha"
9
+ VOLTO = "16.0.0-alpha.14"
10
10
  }
11
11
 
12
12
  stages {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-n2k",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "volto-n2k: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -6,7 +6,7 @@
6
6
  import React from 'react';
7
7
  import { withRouter, matchPath, generatePath } from 'react-router';
8
8
  import { useSelector } from 'react-redux';
9
- // import langmap from 'langmap';
9
+ import { langmap } from '@plone/volto/helpers';
10
10
  import { flattenToAppURL } from '@plone/volto/helpers';
11
11
  import { Dropdown } from 'semantic-ui-react';
12
12
  import config from '@plone/volto/registry';
@@ -15,32 +15,32 @@ import { getN2kItems, pathExists } from '@eeacms/volto-n2k/helpers';
15
15
  import './styles.less';
16
16
 
17
17
  const LanguageSelector = (props) => {
18
+ const { settings } = config;
18
19
  const content = useSelector((state) => state.content);
19
20
  const n2kItems = getN2kItems(props.navigation.items);
20
21
  const localStorage = props.localStorage;
21
22
  const pathname = props.location.pathname;
22
23
  const currentLang = localStorage.get('N2K_LANGUAGE');
23
24
  const match = matchPath(pathname, {
24
- path: config.settings.multilingualPath,
25
+ path: settings.multilingualPath,
25
26
  exact: true,
26
27
  strict: false,
27
28
  });
28
29
  const hasMultilingualSupport =
29
- match && config.settings.supportedLanguages.includes(match.params.lang);
30
+ match && settings.supportedLanguages.includes(match.params.lang);
30
31
  const translations = hasMultilingualSupport
31
- ? config.settings.supportedLanguages.map((lang) => ({
32
- path: generatePath(config.settings.multilingualPath, {
32
+ ? settings.supportedLanguages.map((lang) => ({
33
+ path: generatePath(settings.multilingualPath, {
33
34
  ...match.params,
34
35
  lang,
35
36
  }),
36
37
  lang,
37
38
  }))
38
39
  : [];
39
- const { settings } = config;
40
40
  const supportedLanguagesOptions = settings.supportedLanguages.map((lang) => ({
41
41
  key: lang,
42
42
  value: lang,
43
- text: lang,
43
+ text: langmap[lang].nativeName,
44
44
  }));
45
45
 
46
46
  return (