@eeacms/volto-cca-policy 0.3.68 → 0.3.70

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,7 +4,7 @@ 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.3.68](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.0...0.3.68) - 17 July 2025
7
+ ### [0.3.70](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.0...0.3.70) - 18 July 2025
8
8
 
9
9
  #### :rocket: Dependency updates
10
10
 
@@ -13,6 +13,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
13
13
 
14
14
  #### :bug: Bug Fixes
15
15
 
16
+ - fix: CMSare video URL with query string - #refs 290068 [kreafox - [`d637581`](https://github.com/eea/volto-cca-policy/commit/d637581b12b70f1438576d800d9a7d710c734c11)]
16
17
  - fix: remove unused import [kreafox - [`72e419d`](https://github.com/eea/volto-cca-policy/commit/72e419d8d46a05c1fc2c2314f625bf9c4a08a64d)]
17
18
  - fix: eslint [kreafox - [`7887ef4`](https://github.com/eea/volto-cca-policy/commit/7887ef453f9099f1606a54b2ae06bfcad03ca5f8)]
18
19
  - fix: issues reported by sonarqube [kreafox - [`ccf5bcd`](https://github.com/eea/volto-cca-policy/commit/ccf5bcde698444d9bed9b138edb54841f78e27af)]
@@ -26,11 +27,16 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
26
27
 
27
28
  #### :house: Internal changes
28
29
 
30
+ - style: Automated code fix [eea-jenkins - [`5774f11`](https://github.com/eea/volto-cca-policy/commit/5774f11b505788e71d0810555e28f306f4170ea4)]
29
31
  - style: Automated code fix [eea-jenkins - [`88386b8`](https://github.com/eea/volto-cca-policy/commit/88386b8d31edcf5aec1b2591840af3d5a6f0357a)]
30
32
  - style: Automated code fix [eea-jenkins - [`4c5b5f3`](https://github.com/eea/volto-cca-policy/commit/4c5b5f3f4e0474a7fc2ba1f634229f8fc99c3fb0)]
31
33
 
32
34
  #### :hammer_and_wrench: Others
33
35
 
36
+ - Bump version for volto-datablocks [Tiberiu Ichim - [`e6267e0`](https://github.com/eea/volto-cca-policy/commit/e6267e03882362471e60ad150df49c5c2843884e)]
37
+ - No console.log [Tiberiu Ichim - [`fef7eea`](https://github.com/eea/volto-cca-policy/commit/fef7eea74480a455ccbd04f8dc39170ca538cb17)]
38
+ - No need for schema enhancer [Tiberiu Ichim - [`ec71401`](https://github.com/eea/volto-cca-policy/commit/ec7140102081db6bf86940ff7f06c8ff7233565f)]
39
+ - Add extension for DataConnectedEmbed [Tiberiu Ichim - [`2a14949`](https://github.com/eea/volto-cca-policy/commit/2a149490e2ad001a3efc4106de6207c508762675)]
34
40
  - test: fix security hotspots on sonarqube - refs #289841 [kreafox - [`ed2ae6f`](https://github.com/eea/volto-cca-policy/commit/ed2ae6f3d41062740df5dd31c749b25316321776)]
35
41
  - Undo [Tiberiu Ichim - [`d90fe59`](https://github.com/eea/volto-cca-policy/commit/d90fe596d97753a63796feaa42451b010cd80aec)]
36
42
  - Depend on latest volto-matomo [Tiberiu Ichim - [`2ec3d30`](https://github.com/eea/volto-cca-policy/commit/2ec3d3099a8ba0f6823125209439631a2db18bac)]
@@ -43,7 +49,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
43
49
  - Add some loadable for components [Tiberiu Ichim - [`1793962`](https://github.com/eea/volto-cca-policy/commit/179396211c66a6a2465b2d1b6c0f2afc40fc7189)]
44
50
  - Refs #284961 - test [Tripon Eugen - [`c989f1f`](https://github.com/eea/volto-cca-policy/commit/c989f1f8638c0c5233c5c49f8673c9a2cdc7937e)]
45
51
  - Refs #284961 - add translations [Tripon Eugen - [`04ee988`](https://github.com/eea/volto-cca-policy/commit/04ee988c086d393b9b37ce1ea8d24f5e84f266aa)]
46
- ### [1.0.0-alpha.0](https://github.com/eea/volto-cca-policy/compare/0.3.67...1.0.0-alpha.0) - 15 July 2025
52
+ ### [1.0.0-alpha.0](https://github.com/eea/volto-cca-policy/compare/0.3.69...1.0.0-alpha.0) - 15 July 2025
47
53
 
48
54
  #### :bug: Bug Fixes
49
55
 
@@ -86,6 +92,46 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
86
92
  - test: Update to volto 17 PR30 [valentinab25 - [`ed03286`](https://github.com/eea/volto-cca-policy/commit/ed032865efa051d6353844737616019b202ea562)]
87
93
  - test: update snapshots [ana-oprea - [`94608ad`](https://github.com/eea/volto-cca-policy/commit/94608adc1b3b3655c7ecd5c39dde1f0fcd4b41e9)]
88
94
  - test: Update to volto 17 PR30 [valentinab25 - [`2e81033`](https://github.com/eea/volto-cca-policy/commit/2e810334e08366ca77ba62383c064770dde643a1)]
95
+ ### [0.3.69](https://github.com/eea/volto-cca-policy/compare/0.3.69-alpha.1...0.3.69) - 17 July 2025
96
+
97
+ ### [0.3.69-alpha.1](https://github.com/eea/volto-cca-policy/compare/0.3.69-alpha.0...0.3.69-alpha.1) - 18 July 2025
98
+
99
+ #### :hammer_and_wrench: Others
100
+
101
+ - Refs #289437 - blue map updates [Tripon Eugen - [`a734405`](https://github.com/eea/volto-cca-policy/commit/a734405cc3907b7fdcdc169421713c3b61405641)]
102
+ - Refs #289437 - blue map update data link no profiles [Tripon Eugen - [`5df8797`](https://github.com/eea/volto-cca-policy/commit/5df8797b8b600850516e0f6ce480b052c1e35bdd)]
103
+ - Refs #289437 - blue map update [Tripon Eugen - [`36de33e`](https://github.com/eea/volto-cca-policy/commit/36de33e41e4d862d201db7cf470d902c67560f71)]
104
+ ### [0.3.69-alpha.0](https://github.com/eea/volto-cca-policy/compare/0.3.68...0.3.69-alpha.0) - 18 July 2025
105
+
106
+ #### :bug: Bug Fixes
107
+
108
+ - fix: CMSare video URL with query string - #refs 290068 [kreafox - [`d637581`](https://github.com/eea/volto-cca-policy/commit/d637581b12b70f1438576d800d9a7d710c734c11)]
109
+
110
+ #### :house: Internal changes
111
+
112
+ - style: Automated code fix [eea-jenkins - [`1f11a31`](https://github.com/eea/volto-cca-policy/commit/1f11a31a8ccf6fd74840f3d205992068c7427512)]
113
+
114
+ #### :hammer_and_wrench: Others
115
+
116
+ - Refs #289562 - blue country map change projection [Tripon Eugen - [`8979a20`](https://github.com/eea/volto-cca-policy/commit/8979a20f91a160d5f70f747aa01d0e04a6d6a30d)]
117
+ - Refs #289437 - country map profile label translation [Tripon Eugen - [`59bc0c7`](https://github.com/eea/volto-cca-policy/commit/59bc0c7135290cd4edb7faa53dee8a5e31376c57)]
118
+ - Refs #289437 - Filter test update after remove filters [Tripon Eugen - [`bd6a0c3`](https://github.com/eea/volto-cca-policy/commit/bd6a0c3d6fe4568072cdc741410ab5c19da7433f)]
119
+ - Refs #289437 - eslint, center and zoom map [Tripon Eugen - [`4c1bd3e`](https://github.com/eea/volto-cca-policy/commit/4c1bd3e10b151cb935b10fa136006056c61d28c4)]
120
+ - Refs #289437 - update map colorse and labels [Tripon Eugen - [`6577fc6`](https://github.com/eea/volto-cca-policy/commit/6577fc640755e394d696932413ddd10b541d193e)]
121
+ ### [0.3.68](https://github.com/eea/volto-cca-policy/compare/0.3.67...0.3.68) - 17 July 2025
122
+
123
+ #### :rocket: Dependency updates
124
+
125
+ - Release @eeacms/volto-searchlib@2.1.1 [EEA Jenkins - [`a625e3d`](https://github.com/eea/volto-cca-policy/commit/a625e3d4cf3de11644db824b8ddf46fcd56ea7e9)]
126
+
127
+ #### :bug: Bug Fixes
128
+
129
+ - fix: remove unused import [kreafox - [`72e419d`](https://github.com/eea/volto-cca-policy/commit/72e419d8d46a05c1fc2c2314f625bf9c4a08a64d)]
130
+
131
+ #### :nail_care: Enhancements
132
+
133
+ - change: remove sitemap from header, add sitemap link to the <head> - refs #288920 [kreafox - [`cf2da0a`](https://github.com/eea/volto-cca-policy/commit/cf2da0af294ec97b36d2b711ff7d05a937512a02)]
134
+
89
135
  ### [0.3.67](https://github.com/eea/volto-cca-policy/compare/0.3.66...0.3.67) - 17 July 2025
90
136
 
91
137
  #### :bug: Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.68",
3
+ "version": "0.3.70",
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",
@@ -23,12 +23,13 @@
23
23
  "@eeacms/volto-eea-design-system",
24
24
  "@eeacms/volto-eea-website-theme",
25
25
  "@eeacms/volto-tabs-block",
26
+ "@eeacms/volto-datablocks",
26
27
  "@eeacms/volto-embed",
27
28
  "@eeacms/volto-globalsearch"
28
29
  ],
29
30
  "dependencies": {
30
31
  "@eeacms/volto-block-style": "github:eea/volto-block-style#6.x.x",
31
- "@eeacms/volto-datablocks": "^7.2.5",
32
+ "@eeacms/volto-datablocks": "^7.3.2",
32
33
  "@eeacms/volto-eea-design-system": "<=1.36.3",
33
34
  "@eeacms/volto-eea-website-theme": "^1.35.0",
34
35
  "@eeacms/volto-embed": "^9.1.1",
@@ -0,0 +1,23 @@
1
+ import { injectIntl } from 'react-intl';
2
+ import { ViewEmbedBlock } from '@eeacms/volto-datablocks/components/manage/Blocks/DataConnectedEmbedBlock/View';
3
+ import { connect } from 'react-redux';
4
+ import { getConnectedDataParametersForContext } from '@eeacms/volto-datablocks/helpers';
5
+
6
+ const ConnectedEmbedBlockView = connect((state, props) => {
7
+ const pathname = state.router?.location?.pathname;
8
+ const lang = (pathname || '').split('/')[1];
9
+ const data_params = {
10
+ ...state?.connected_data_parameters,
11
+ byContextPath: {
12
+ ...state?.connected_data_parameters?.byContextPath,
13
+ [pathname]: [{ i: 'lang', v: [lang] }],
14
+ },
15
+ };
16
+
17
+ const params = getConnectedDataParametersForContext(data_params, pathname);
18
+ return {
19
+ connected_data_parameters: params,
20
+ };
21
+ }, {})(injectIntl(ViewEmbedBlock));
22
+
23
+ export default ConnectedEmbedBlockView;
@@ -0,0 +1,15 @@
1
+ import { composeSchema } from '@eeacms/volto-cca-policy/schema-utils';
2
+ // import { addLanguageParamField } from './schema';
3
+ import DataConnectedEmbedBlockView from './DataConnectedEmbedBlockView';
4
+
5
+ export default function applyConfig(config) {
6
+ const { data_connected_embed } = config.blocks.blocksConfig;
7
+
8
+ data_connected_embed.schemaEnhancer = composeSchema(
9
+ // addLanguageParamField,
10
+ data_connected_embed.schemaEnhancer,
11
+ );
12
+ data_connected_embed.view = DataConnectedEmbedBlockView;
13
+
14
+ return config;
15
+ }
@@ -0,0 +1,9 @@
1
+ export function addLanguageParamField({ schema, intl }) {
2
+ schema.fieldsets[0].fields.push('languageParam');
3
+ schema.properties.languageParam = {
4
+ title: 'Language parameter',
5
+ description:
6
+ 'The name of the URL search parameter that will be added to the URL. The embedded URL should support ',
7
+ };
8
+ return schema;
9
+ }
@@ -20,6 +20,7 @@ import installRedirectBlock from './RedirectBlock';
20
20
  import installContentLinks from './ContentLinks';
21
21
  import installASTNavigation from './ASTNavigation';
22
22
  import installFlourishEmbedBlock from './FlourishEmbedBlock';
23
+ import installDataConnectedEmbed from './DataConnectedEmbedBlock';
23
24
 
24
25
  // import installMKHMap from './MKHMap';
25
26
  // import installCountryMapHeatIndex from './CountryMapHeatIndex';
@@ -54,6 +55,7 @@ export default function installBlocks(config) {
54
55
  installASTNavigation,
55
56
  installCountryMapProfile,
56
57
  installFlourishEmbedBlock,
58
+ installDataConnectedEmbed,
57
59
  // installMKHMap,
58
60
  // installCountryMapHeatIndex,
59
61
  )(config);
@@ -193,6 +193,7 @@ const DatabaseItemView = (props) => {
193
193
  width="100%"
194
194
  height="480"
195
195
  src={fixEmbedURL(embed_url, is_cmshare_video)}
196
+ type="video/mp4"
196
197
  >
197
198
  <track default kind="captions" srcLang="en" src="" />
198
199
  </video>
@@ -51,8 +51,12 @@ export const makeContributionsSearchQuery = (props) => {
51
51
 
52
52
  export const fixEmbedURL = (url, is_cmshare_video) => {
53
53
  const suffix = '/download';
54
- if (is_cmshare_video && !url.includes(suffix)) {
55
- return url + suffix;
56
- }
57
- return url;
54
+
55
+ if (!is_cmshare_video) return url;
56
+
57
+ const base = url.split('?')[0];
58
+
59
+ if (base.endsWith(suffix)) return base;
60
+
61
+ return base + suffix;
58
62
  };
@@ -0,0 +1,11 @@
1
+ export function composeSchema() {
2
+ const enhancers = Array.from(arguments);
3
+ const composer = (args) => {
4
+ const props = enhancers.reduce(
5
+ (acc, enhancer) => (enhancer ? { ...acc, schema: enhancer(acc) } : acc),
6
+ { ...args },
7
+ );
8
+ return props.schema;
9
+ };
10
+ return composer;
11
+ }