@eeacms/volto-cca-policy 0.2.11 → 0.2.13

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,34 @@ 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.2.13](https://github.com/eea/volto-cca-policy/compare/0.2.12...0.2.13) - 30 April 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(mission): add mission_tool search config [kreafox - [`96f2c20`](https://github.com/eea/volto-cca-policy/commit/96f2c205100ae3df652429ffaea833fb2aabb7b3)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Refs #269158 - adjust wording [Tripon Eugen - [`ede12a3`](https://github.com/eea/volto-cca-policy/commit/ede12a324689c5791e63c495b07dd9e3f2d29665)]
16
+ - Refs #269158 - research project acetype [Tripon Eugen - [`f1b175c`](https://github.com/eea/volto-cca-policy/commit/f1b175c461c9811a34449b08e1fccffa910a4ebd)]
17
+ ### [0.2.12](https://github.com/eea/volto-cca-policy/compare/0.2.11...0.2.12) - 29 April 2024
18
+
19
+ #### :bug: Bug Fixes
20
+
21
+ - fix(search): cleanup [kreafox - [`6436c4e`](https://github.com/eea/volto-cca-policy/commit/6436c4e8fb98236253ef08dc2357a419bf4f1070)]
22
+
23
+ #### :nail_care: Enhancements
24
+
25
+ - change(search): move common facets [kreafox - [`c3375f3`](https://github.com/eea/volto-cca-policy/commit/c3375f3846ae9788a0f620575e3b1f0bc0302783)]
26
+
27
+ #### :house: Internal changes
28
+
29
+ - style: fix listings [kreafox - [`5782507`](https://github.com/eea/volto-cca-policy/commit/578250758523cf33b495959eb65d8e8b6a255fe3)]
30
+ - style: fix alignment in tabs [kreafox - [`a1bdcc4`](https://github.com/eea/volto-cca-policy/commit/a1bdcc41a80ca53b070e0e21f66b8b0ff3c0184e)]
31
+
32
+ #### :hammer_and_wrench: Others
33
+
34
+ - Pin cypress version to 13 [kreafox - [`53cc434`](https://github.com/eea/volto-cca-policy/commit/53cc434057ce26caab5c46d20bae903250a05663)]
7
35
  ### [0.2.11](https://github.com/eea/volto-cca-policy/compare/0.2.10...0.2.11) - 26 April 2024
8
36
 
9
37
  #### :house: Internal changes
@@ -1052,13 +1080,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1052
1080
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
1053
1081
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
1054
1082
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
1055
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
1056
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
1057
1083
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
1058
1084
 
1059
1085
  #### :house: Internal changes
1060
1086
 
1061
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
1062
1087
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
1063
1088
 
1064
1089
  #### :hammer_and_wrench: Others
@@ -1075,9 +1100,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1075
1100
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
1076
1101
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
1077
1102
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
1078
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
1079
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
1080
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
1081
1103
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
1082
1104
  - Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
1083
1105
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -1294,7 +1316,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1294
1316
 
1295
1317
  #### :house: Internal changes
1296
1318
 
1297
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
1298
1319
 
1299
1320
  #### :hammer_and_wrench: Others
1300
1321
 
@@ -1775,7 +1796,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1775
1796
  #### :hammer_and_wrench: Others
1776
1797
 
1777
1798
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
1778
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
1779
1799
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
1780
1800
 
1781
1801
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "@eeacms/volto-cca-policy: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -49,6 +49,7 @@
49
49
  "react-visibility-sensor": "5.1.1"
50
50
  },
51
51
  "devDependencies": {
52
+ "cypress": "13.1.0",
52
53
  "@cypress/code-coverage": "^3.10.0",
53
54
  "@plone/scripts": "*",
54
55
  "babel-plugin-transform-class-properties": "^6.24.1",
@@ -43,6 +43,7 @@ const portalTypesToSearchTypes = {
43
43
  'eea.climateadapt.c3sindicator': 'Indicator',
44
44
  'eea.climateadapt.informationportal': 'Information portal',
45
45
  'eea.climateadapt.publicationreport': 'Publication reference',
46
+ 'eea.climateadapt.aceproject': 'Research and knowledge project',
46
47
  'eea.climateadapt.researchproject': 'Research and knowledge project',
47
48
  'eea.climateadapt.tool': 'Tool',
48
49
  'eea.climateadapt.video': 'Video',
@@ -23,7 +23,7 @@
23
23
 
24
24
  .image.icon {
25
25
  width: 48px;
26
- max-height: 48px;
26
+ height: 48px;
27
27
  object-fit: contain;
28
28
  }
29
29
 
@@ -12,6 +12,28 @@ export const geographic_countries = {
12
12
  isMulti: true,
13
13
  };
14
14
 
15
+ export const cca_climate_impacts = {
16
+ field: 'cca_climate_impacts.keyword',
17
+ factory: 'MultiTermFacet',
18
+ label: 'Climate Impacts',
19
+ showInFacetsList: true,
20
+ filterType: 'any',
21
+ isFilterable: false,
22
+ show: 10000,
23
+ isMulti: true,
24
+ };
25
+
26
+ export const cca_adaptation_sectors = {
27
+ field: 'cca_adaptation_sectors.keyword',
28
+ factory: 'MultiTermFacet',
29
+ label: 'Adaptation Sectors',
30
+ showInFacetsList: true,
31
+ filterType: 'any',
32
+ isFilterable: false,
33
+ show: 10000,
34
+ isMulti: true,
35
+ };
36
+
15
37
  export const include_archived = booleanFacet(() => ({
16
38
  field: 'IncludeArchived',
17
39
  label: 'Include archived content',
@@ -1,6 +1,7 @@
1
1
  import { mergeConfig } from '@eeacms/search';
2
2
  import { build_runtime_mappings } from '@eeacms/volto-globalsearch/utils';
3
3
  import { getClientProxyAddress } from './utils';
4
+ import vocabs from './vocabulary';
4
5
 
5
6
  import facets from './facets';
6
7
 
@@ -36,25 +37,8 @@ export default function installMainSearch(config) {
36
37
  elastic_index: '_es/globalsearch',
37
38
  index_name: 'data_searchui',
38
39
  host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
39
- vocab: {
40
- cluster_name: {
41
- cca: 'Climate-ADAPT',
42
- },
43
- 'cca_key_type_measure.keyword': {
44
- A1: 'A1: Policy Instruments',
45
- A2: 'A2: Management and planning',
46
- A3: 'A3: Coordination cooperation and networks',
47
- B1: 'B1: Financing incentive instruments',
48
- B2: 'B2: Insurance and risk sharing instruments',
49
- C1: 'C1: Grey options',
50
- C2: 'C2: Technological options',
51
- D1: 'D1: Green options',
52
- D2: 'D2: Blue options',
53
- E1: 'E1: Information and awareness raising',
54
- E2: 'E2: Capacity building empowering and lifestyle practices',
55
- },
56
- },
57
40
  runtime_mappings: build_runtime_mappings(clusters),
41
+ ...vocabs,
58
42
  };
59
43
 
60
44
  const { ccaSearch } = config.searchui;
@@ -2,6 +2,7 @@ import installMainSearch from './config';
2
2
  import installHealthSearch from './health_observatory/config-health';
3
3
  import installMissionStoriesSearch from './mission_stories/config-stories';
4
4
  import installMissionProjectsSearch from './mission_projects/config-projects';
5
+ import installMissionToolsSearch from './mission_tools/config-tools';
5
6
 
6
7
  const extraQueryParams = {
7
8
  text_fields: [
@@ -36,10 +37,15 @@ const applyConfig = (config) => {
36
37
  installMainSearch(config.settings.searchlib),
37
38
  );
38
39
 
40
+ config.settings.searchlib = installMissionToolsSearch(
41
+ installMainSearch(config.settings.searchlib),
42
+ );
43
+
39
44
  config.settings.searchlib.searchui.ccaSearch.extraQueryParams = extraQueryParams;
40
45
  config.settings.searchlib.searchui.ccaHealthSearch.extraQueryParams = extraQueryParams;
41
46
  config.settings.searchlib.searchui.missionProjects.extraQueryParams = extraQueryParams;
42
47
  config.settings.searchlib.searchui.missionStoriesSearch.extraQueryParams = extraQueryParams;
48
+ config.settings.searchlib.searchui.missionToolsSearch.extraQueryParams = extraQueryParams;
43
49
 
44
50
  return config;
45
51
  };
@@ -5,6 +5,8 @@ import {
5
5
  language,
6
6
  issued_date,
7
7
  geographic_countries,
8
+ cca_climate_impacts,
9
+ cca_adaptation_sectors,
8
10
  } from './../common';
9
11
 
10
12
  const facets = [
@@ -16,20 +18,8 @@ const facets = [
16
18
  iconsFamily: 'Funding Programme',
17
19
  alwaysVisible: false,
18
20
  }),
19
- multiTermFacet({
20
- field: 'cca_climate_impacts.keyword',
21
- isFilterable: false,
22
- isMulti: true,
23
- label: 'Climate Impacts',
24
- alwaysVisible: false,
25
- }),
26
- multiTermFacet({
27
- field: 'cca_adaptation_sectors.keyword',
28
- isFilterable: false,
29
- isMulti: true,
30
- label: 'Adaptation Sectors',
31
- alwaysVisible: false,
32
- }),
21
+ cca_climate_impacts,
22
+ cca_adaptation_sectors,
33
23
  multiTermFacet({
34
24
  field: 'cca_adaptation_elements.keyword',
35
25
  isFilterable: false,
@@ -1,24 +1,11 @@
1
1
  import { multiTermFacet } from '@eeacms/search';
2
2
 
3
3
  import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
4
+ import { cca_climate_impacts, cca_adaptation_sectors } from './../common';
4
5
 
5
6
  const facets = [
6
- multiTermFacet({
7
- field: 'cca_climate_impacts.keyword',
8
- isFilterable: false,
9
- isMulti: true,
10
- label: 'Climate Impacts',
11
- iconsFamily: 'Climate Impacts',
12
- alwaysVisible: false,
13
- }),
14
- multiTermFacet({
15
- field: 'cca_adaptation_sectors.keyword',
16
- isFilterable: false,
17
- isMulti: true,
18
- label: 'Adaptation Sectors',
19
- iconsFamily: 'Adaptation Sectors',
20
- alwaysVisible: false,
21
- }),
7
+ cca_climate_impacts,
8
+ cca_adaptation_sectors,
22
9
  multiTermFacet({
23
10
  field: 'key_system.keyword',
24
11
  isFilterable: false,
@@ -0,0 +1,57 @@
1
+ import { mergeConfig } from '@eeacms/search';
2
+ import { getClientProxyAddress, getSearchThumbUrl } from '../utils';
3
+ import facets from './facets-tools';
4
+
5
+ const missionToolsConfig = {
6
+ title: 'Mission Tools Search',
7
+ ...facets,
8
+ };
9
+
10
+ export default function installMissionToolsSearch(config) {
11
+ const envConfig = process.env.RAZZLE_ENV_CONFIG
12
+ ? JSON.parse(process.env.RAZZLE_ENV_CONFIG)
13
+ : missionToolsConfig;
14
+
15
+ const pjson = require('@eeacms/volto-cca-policy/../package.json');
16
+ envConfig.app_name = pjson.name;
17
+ envConfig.app_version = pjson.version;
18
+
19
+ config.searchui.missionToolsSearch = {
20
+ ...mergeConfig(envConfig, config.searchui.globalsearchbase),
21
+ elastic_index: '_es/globalsearch',
22
+ index_name: 'data_searchui',
23
+ host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
24
+ vocab: {
25
+ cluster_name: {
26
+ cca: 'Mission Portal',
27
+ },
28
+ },
29
+ };
30
+
31
+ const { missionToolsSearch } = config.searchui;
32
+
33
+ missionToolsSearch.facets = facets;
34
+
35
+ if (typeof window !== 'undefined') {
36
+ config.searchui.missionToolsSearch.host =
37
+ process.env.RAZZLE_ES_PROXY_ADDR || getClientProxyAddress();
38
+ }
39
+
40
+ missionToolsSearch.resultItemModel = {
41
+ factory: 'ResultModel',
42
+ urlField: 'about',
43
+ titleField: 'title',
44
+ metatypeField: 'objectProvides',
45
+ descriptionField: 'description',
46
+ tagsField: 'topic',
47
+ issuedField: 'issued',
48
+ getThumbnailUrl: 'getSearchThumbUrl',
49
+ getIconUrl: 'getGlobalsearchIconUrl',
50
+ fallbackThumbUrl:
51
+ 'https://react.semantic-ui.com/images/wireframe/white-image.png',
52
+ };
53
+
54
+ config.resolve.getSearchThumbUrl = getSearchThumbUrl();
55
+
56
+ return config;
57
+ }
@@ -0,0 +1,47 @@
1
+ import { multiTermFacet } from '@eeacms/search';
2
+
3
+ import globalSearchBaseConfig from '@eeacms/volto-globalsearch/config/global-search-base-config.js';
4
+ import { cca_climate_impacts, cca_adaptation_sectors } from './../common';
5
+
6
+ const facets = [
7
+ multiTermFacet({
8
+ field: 'cca_rast_steps.keyword',
9
+ isFilterable: false,
10
+ isMulti: true,
11
+ label: 'RAST step(s) of relevance',
12
+ alwaysVisible: false,
13
+ }),
14
+ multiTermFacet({
15
+ field: 'cca_geographical_scale.keyword',
16
+ isFilterable: false,
17
+ isMulti: true,
18
+ label: 'Geographical scale',
19
+ alwaysVisible: false,
20
+ }),
21
+ cca_climate_impacts,
22
+ multiTermFacet({
23
+ field: 'cca_tool_language.keyword',
24
+ isFilterable: false,
25
+ isMulti: true,
26
+ label: 'Language(s) of the tool',
27
+ alwaysVisible: false,
28
+ }),
29
+ cca_adaptation_sectors,
30
+ multiTermFacet({
31
+ field: 'cca_most_useful_for.keyword',
32
+ isFilterable: false,
33
+ isMulti: true,
34
+ label: 'Most useful for',
35
+ alwaysVisible: false,
36
+ }),
37
+ multiTermFacet({
38
+ field: 'cca_user_requirements.keyword',
39
+ isFilterable: false,
40
+ isMulti: true,
41
+ label: 'User requirements',
42
+ alwaysVisible: false,
43
+ }),
44
+ ...globalSearchBaseConfig.facets,
45
+ ];
46
+
47
+ export default facets;
@@ -38,11 +38,7 @@ export function getClientProxyAddress() {
38
38
  export const getSearchThumbUrl = () => (result, config, fallback) => {
39
39
  let image = fallback;
40
40
 
41
- if (
42
- result.about?.raw?.indexOf('://cca-p6.devel5cph.eionet.europa.eu') !== -1 ||
43
- result.about?.raw?.indexOf('://cca.devel5cph.eionet.europa.eu') !== -1 ||
44
- result.about?.raw?.indexOf('://climate-adapt.eea.europa.eu') !== -1
45
- ) {
41
+ if (result.about?.raw?.indexOf('://climate-adapt.eea.europa.eu') !== -1) {
46
42
  if (result.cca_preview_image) {
47
43
  image = result?.about?.raw + '/@@images/preview_image/preview';
48
44
  }
@@ -0,0 +1,24 @@
1
+ const vocab = {
2
+ cluster_name: {
3
+ cca: 'Climate-ADAPT',
4
+ },
5
+ 'cca_key_type_measure.keyword': {
6
+ A1: 'A1: Policy Instruments',
7
+ A2: 'A2: Management and planning',
8
+ A3: 'A3: Coordination cooperation and networks',
9
+ B1: 'B1: Financing incentive instruments',
10
+ B2: 'B2: Insurance and risk sharing instruments',
11
+ C1: 'C1: Grey options',
12
+ C2: 'C2: Technological options',
13
+ D1: 'D1: Green options',
14
+ D2: 'D2: Blue options',
15
+ E1: 'E1: Information and awareness raising',
16
+ E2: 'E2: Capacity building empowering and lifestyle practices',
17
+ },
18
+ objectProvides: {
19
+ 'Publication reference': 'Publications and reports',
20
+ Video: 'Videos and podcasts',
21
+ },
22
+ };
23
+
24
+ export default { vocab };
@@ -0,0 +1,3 @@
1
+ ol.ui.list, .ui.bulleted.list {
2
+ margin-left: 0;
3
+ }
@@ -17,6 +17,14 @@
17
17
  @green-2 97.12%
18
18
  );
19
19
 
20
+ [id='page-document'] > .ui.list,
21
+ .view-wrapper > .ui.list,
22
+ [id='page-document'] > .ui.bulleted.list,
23
+ .view-wrapper > .ui.bulleted.list {
24
+ margin-left: auto !important;
25
+ margin-right: auto !important;
26
+ }
27
+
20
28
  .ui.ordered.list,
21
29
  .ui.ordered.list .list,
22
30
  ol.ui.list,
@@ -185,8 +193,3 @@ body.subsite {
185
193
  font-size: 23px;
186
194
  }
187
195
  }
188
-
189
-
190
- ol.ui.list, .ui.bulleted.list {
191
- margin-left: 0 !important;
192
- }