@eeacms/volto-cca-policy 0.1.25 → 0.1.26

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,11 +4,14 @@ 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.25](https://github.com/eea/volto-cca-policy/compare/0.1.24...0.1.25) - 13 June 2023
7
+ ### [0.1.26](https://github.com/eea/volto-cca-policy/compare/0.1.25...0.1.26) - 13 June 2023
8
8
 
9
9
  #### :hammer_and_wrench: Others
10
10
 
11
- - Temporary disable external routes config (test issue in demo). [GhitaB - [`ea7ddfd`](https://github.com/eea/volto-cca-policy/commit/ea7ddfdb7311891d9e6f5946c2f6d4bca93cfef8)]
11
+ - Fix condition for external routes. [GhitaB - [`9d30963`](https://github.com/eea/volto-cca-policy/commit/9d3096380aa920d7ca7d14020689c491e5c74821)]
12
+ - Restore external routes config. [GhitaB - [`6ffa31c`](https://github.com/eea/volto-cca-policy/commit/6ffa31c698f79eae4d0701c8ff545c3921dda3e4)]
13
+ ### [0.1.25](https://github.com/eea/volto-cca-policy/compare/0.1.24...0.1.25) - 13 June 2023
14
+
12
15
  ### [0.1.24](https://github.com/eea/volto-cca-policy/compare/0.1.23...0.1.24) - 12 June 2023
13
16
 
14
17
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
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",
package/src/index.js CHANGED
@@ -24,23 +24,28 @@ import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
24
24
  import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';
25
25
 
26
26
  const applyConfig = (config) => {
27
- // const notInEnMission = /^(?!(\/en\/mission)).*$/;
28
- // WIP, test redirect issue (do not deploy in production)
29
- // if (!__DEVELOPMENT__ && !process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES) {
30
- // config.settings.externalRoutes = [
31
- // ...(config.settings.externalRoutes || []),
32
- // {
33
- // match: {
34
- // path: notInEnMission,
35
- // exact: false,
36
- // strict: false,
37
- // },
38
- // url(payload) {
39
- // return payload.location.pathname;
40
- // },
41
- // },
42
- // ];
43
- // }
27
+ const notInEnMission = /^(?!(\/en\/mission)).*$/;
28
+ if (
29
+ !(
30
+ __DEVELOPMENT__ ||
31
+ (process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES &&
32
+ process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES === 'True')
33
+ )
34
+ ) {
35
+ config.settings.externalRoutes = [
36
+ ...(config.settings.externalRoutes || []),
37
+ {
38
+ match: {
39
+ path: notInEnMission,
40
+ exact: false,
41
+ strict: false,
42
+ },
43
+ url(payload) {
44
+ return payload.location.pathname;
45
+ },
46
+ },
47
+ ];
48
+ }
44
49
 
45
50
  config.settings.loadables.d3 = loadable.lib(() => import('d3'));
46
51