@eeacms/volto-cca-policy 1.0.0 → 1.0.1

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,47 @@ 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
- ### [1.0.0](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.4...1.0.0) - 12 June 2026
7
+ ### [1.0.1](https://github.com/eea/volto-cca-policy/compare/1.0.0...1.0.1) - 10 July 2026
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: remove duplicated @eeacms/volto-datablocks from package.json [kreafox - [`241febd`](https://github.com/eea/volto-cca-policy/commit/241febd890230dff62b67fe905bc359bb0c90f5c)]
12
+ - fix: improve parseDataURL function to validate input and extract data correctly [kreafox - [`0e5e534`](https://github.com/eea/volto-cca-policy/commit/0e5e534fab73426613a628880c27f6f39f9586ea)]
13
+
14
+ #### :house: Internal changes
15
+
16
+
17
+ #### :hammer_and_wrench: Others
18
+
19
+ - test: pin Chromium version 149 to work with Cypress [valentinab25 - [`659ec82`](https://github.com/eea/volto-cca-policy/commit/659ec823dd71fe592a3a7accda22effbe1fb07bc)]
20
+ ## [1.0.0](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.8...1.0.0) - 12 June 2026
21
+
22
+ ### [1.0.0-alpha.8](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.7...1.0.0-alpha.8) - 8 July 2026
23
+
24
+ ### [1.0.0-alpha.7](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.6...1.0.0-alpha.7) - 7 July 2026
25
+
26
+ ### [1.0.0-alpha.6](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.5...1.0.0-alpha.6) - 7 July 2026
27
+
28
+ #### :hammer_and_wrench: Others
29
+
30
+ - Refs #296263 - wip document updated resolve ESLint [iugin - [`3aab87b`](https://github.com/eea/volto-cca-policy/commit/3aab87b48a7a0bff3d088971e8880bb481650255)]
31
+ - Refs #296263 - wip document updated resolve ESLint [iugin - [`b016fa6`](https://github.com/eea/volto-cca-policy/commit/b016fa6f82ccbc8b353ea77dfd29519bafd97f47)]
32
+ - Refs #296263 - wip document updated request [iugin - [`baf89fd`](https://github.com/eea/volto-cca-policy/commit/baf89fd3f56350f71933ff63d7517faf88fb0b44)]
33
+ - test: pin Chromium version 149 to work with Cypress [valentinab25 - [`659ec82`](https://github.com/eea/volto-cca-policy/commit/659ec823dd71fe592a3a7accda22effbe1fb07bc)]
34
+ ### [1.0.0-alpha.5](https://github.com/eea/volto-cca-policy/compare/1.0.0-alpha.4...1.0.0-alpha.5) - 30 June 2026
35
+
36
+ #### :bug: Bug Fixes
37
+
38
+ - fix: remove duplicated @eeacms/volto-datablocks from package.json [kreafox - [`241febd`](https://github.com/eea/volto-cca-policy/commit/241febd890230dff62b67fe905bc359bb0c90f5c)]
39
+ - fix: improve parseDataURL function to validate input and extract data correctly [kreafox - [`0e5e534`](https://github.com/eea/volto-cca-policy/commit/0e5e534fab73426613a628880c27f6f39f9586ea)]
8
40
 
9
41
  #### :nail_care: Enhancements
10
42
 
11
43
  - refactor: remove deprecated Volto 17 stages from Jenkinsfile [kreafox - [`5297ddf`](https://github.com/eea/volto-cca-policy/commit/5297ddf10604963c08554080aee636c642b08f82)]
12
44
 
45
+ #### :house: Internal changes
46
+
47
+
13
48
  #### :hammer_and_wrench: Others
14
49
 
15
50
  - test: increase code coverage for View component & improve rendering logic [kreafox - [`9b946a3`](https://github.com/eea/volto-cca-policy/commit/9b946a3eb36b0c3161c01733823a22cf8437e40e)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
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,7 +23,6 @@
23
23
  "@eeacms/volto-eea-design-system",
24
24
  "@eeacms/volto-eea-website-theme",
25
25
  "@eeacms/volto-tabs-block",
26
- "@eeacms/volto-datablocks",
27
26
  "@eeacms/volto-embed",
28
27
  "@eeacms/volto-globalsearch",
29
28
  "@plone-collective/volto-authomatic"
@@ -116,13 +116,30 @@ const getImageFilename = (value) => {
116
116
  };
117
117
 
118
118
  const parseDataURL = (dataUrl) => {
119
- const fields = dataUrl?.match(/^data:(.*);(.*),(.*)$/);
120
- if (!fields) return null;
119
+ const DATA_URL_PREFIX = 'data:';
120
+
121
+ if (typeof dataUrl !== 'string' || !dataUrl.startsWith(DATA_URL_PREFIX)) {
122
+ return null;
123
+ }
124
+
125
+ const start = DATA_URL_PREFIX.length;
126
+ const dataSeparator = dataUrl.indexOf(',', start);
127
+
128
+ if (dataSeparator === -1) return null;
129
+
130
+ const encodingSeparator = dataUrl.lastIndexOf(';', dataSeparator);
131
+
132
+ if (encodingSeparator < start) return null;
133
+
134
+ const contentType = dataUrl.slice(start, encodingSeparator);
135
+ const encoding = dataUrl.slice(encodingSeparator + 1, dataSeparator);
136
+
137
+ if (!contentType || !encoding) return null;
121
138
 
122
139
  return {
123
- 'content-type': fields[1],
124
- encoding: fields[2],
125
- data: fields[3],
140
+ 'content-type': contentType,
141
+ encoding,
142
+ data: dataUrl.slice(dataSeparator + 1),
126
143
  };
127
144
  };
128
145
 
package/src/constants.js CHANGED
@@ -241,6 +241,7 @@ export const EU_COUNTRIES = [
241
241
  'SI',
242
242
  'SK',
243
243
  'TR',
244
+ 'UA',
244
245
  'XK',
245
246
  'GB',
246
247
  ];