@eeacms/volto-cca-policy 0.2.18 → 0.2.20

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,22 @@ 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.20](https://github.com/eea/volto-cca-policy/compare/0.2.19...0.2.20) - 8 May 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix(block): undefined error [kreafox - [`8fac298`](https://github.com/eea/volto-cca-policy/commit/8fac2983375a3bdc38a0aa0b9ccff0df3a4a5dda)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Refs #269158 - observatory section [Tripon Eugen - [`69fb8eb`](https://github.com/eea/volto-cca-policy/commit/69fb8ebf617ac291c217cdc8ad5d51543b7e351f)]
16
+ ### [0.2.19](https://github.com/eea/volto-cca-policy/compare/0.2.18...0.2.19) - 7 May 2024
17
+
18
+ #### :bug: Bug Fixes
19
+
20
+ - fix: use DefaultView in layoutViews [kreafox - [`a87f13f`](https://github.com/eea/volto-cca-policy/commit/a87f13fc22374b40b3fbf2d0faff30059b65a610)]
21
+ - fix: update tests [kreafox - [`9f71324`](https://github.com/eea/volto-cca-policy/commit/9f7132455a988c09fed5a064a1c3e7f63856e27f)]
22
+
7
23
  ### [0.2.18](https://github.com/eea/volto-cca-policy/compare/0.2.17...0.2.18) - 7 May 2024
8
24
 
9
25
  #### :nail_care: Enhancements
@@ -1104,13 +1120,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1104
1120
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
1105
1121
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
1106
1122
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
1107
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
1108
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
1109
1123
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
1110
1124
 
1111
1125
  #### :house: Internal changes
1112
1126
 
1113
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
1114
1127
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
1115
1128
 
1116
1129
  #### :hammer_and_wrench: Others
@@ -1127,9 +1140,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1127
1140
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
1128
1141
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
1129
1142
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
1130
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
1131
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
1132
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
1133
1143
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
1134
1144
  - 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)]
1135
1145
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -1346,7 +1356,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1346
1356
 
1347
1357
  #### :house: Internal changes
1348
1358
 
1349
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
1350
1359
 
1351
1360
  #### :hammer_and_wrench: Others
1352
1361
 
@@ -1827,7 +1836,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1827
1836
  #### :hammer_and_wrench: Others
1828
1837
 
1829
1838
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
1830
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
1831
1839
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
1832
1840
 
1833
1841
  #### :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.18",
3
+ "version": "0.2.20",
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",
@@ -33,7 +33,7 @@ describe('RedirectBlockDetails', () => {
33
33
  const { container } = render(
34
34
  <Provider store={store}>
35
35
  <MemoryRouter>
36
- <RedirectBlockDetails data={data} />
36
+ <RedirectBlockDetails data={data} token="1234" />
37
37
  </MemoryRouter>
38
38
  </Provider>,
39
39
  );
@@ -5,9 +5,10 @@ import Schema from './schema';
5
5
  export default function CountryMapObservatoryEdit(props) {
6
6
  const { block, data, onChangeBlock, selected } = props;
7
7
  const schema = Schema(data);
8
+
8
9
  return (
9
10
  <div className="redirection-block-edit">
10
- <RedirectBlockDetails data={data} />
11
+ <RedirectBlockDetails data={data} token={true} />
11
12
 
12
13
  <SidebarPortal selected={selected}>
13
14
  <BlockDataForm
@@ -3,8 +3,8 @@ import React from 'react';
3
3
  import { useHistory } from 'react-router-dom';
4
4
  import { flattenToAppURL } from '@plone/volto/helpers';
5
5
 
6
- export function RedirectBlockDetails({ data }) {
7
- return (
6
+ export function RedirectBlockDetails({ data, token }) {
7
+ return token ? (
8
8
  <div className="redirect-block">
9
9
  <h5>Redirection block</h5>
10
10
  <p className="discreet">
@@ -16,16 +16,18 @@ export function RedirectBlockDetails({ data }) {
16
16
  )}
17
17
  </p>
18
18
  </div>
19
- );
19
+ ) : null;
20
20
  }
21
21
 
22
22
  export default function RedirectBlockView({ data, token }) {
23
23
  const target = data?.href?.[0]?.['@id'];
24
24
  const history = useHistory();
25
+
25
26
  React.useEffect(() => {
26
27
  if (!token) {
27
28
  history.push(flattenToAppURL(target));
28
29
  }
29
30
  }, [token, target, history]);
30
- return <RedirectBlockDetails data={data} />;
31
+
32
+ return <RedirectBlockDetails data={data} token={token} />;
31
33
  }
@@ -19,7 +19,7 @@ const RelevantAceContentView = (props) => {
19
19
  const results = _v_results || [];
20
20
  const isEdit = mode === 'edit' ? true : false;
21
21
  const hasAnyFilter = [element_type, sector, search_type, special_tags].some(
22
- (list) => list.length > 0,
22
+ (list) => list?.length > 0,
23
23
  );
24
24
 
25
25
  return (
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { compose } from 'redux';
2
2
  import { Sitemap } from '@plone/volto/components';
3
+ import DefaultView from '@plone/volto/components/theme/View/DefaultView';
3
4
  import {
4
5
  RASTWidgetView,
5
6
  TranslationDisclaimer,
@@ -290,6 +291,14 @@ const applyConfig = (config) => {
290
291
 
291
292
  config.views.layoutViewsNamesMapping.view_cca_event = 'CCA Event View';
292
293
 
294
+ config.views.layoutViews = {
295
+ ...config.views.layoutViews,
296
+ document_view: DefaultView,
297
+ album_view: DefaultView,
298
+ summary_view: DefaultView,
299
+ tabular_view: DefaultView,
300
+ };
301
+
293
302
  config.settings.contextNavigationLocations = [
294
303
  {
295
304
  title: 'Adaptation',
@@ -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-health';
6
7
  import views from './views-health';
@@ -75,11 +76,7 @@ export default function installMainSearch(config) {
75
76
  elastic_index: '_es/globalsearch',
76
77
  index_name: 'data_searchui',
77
78
  host: process.env.RAZZLE_ES_PROXY_ADDR || 'http://localhost:3000',
78
- vocab: {
79
- cluster_name: {
80
- cca: 'Climate-ADAPT',
81
- },
82
- },
79
+ ...vocabs,
83
80
  runtime_mappings: build_runtime_mappings(clusters),
84
81
  };
85
82