diff --git a/CHANGELOG.md b/CHANGELOG.md index 175a876a..61f5b64b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [0.2.83](https://github.com/eea/volto-cca-policy/compare/0.2.82...0.2.83) - 16 December 2024 + +#### :rocket: Dependency updates + +- Release @eeacms/volto-searchlib@2.0.5 [EEA Jenkins - [`4adc1dc`](https://github.com/eea/volto-cca-policy/commit/4adc1dc79bca9439b2bd5b79d231c1e2243fc74b)] +- Release @eeacms/volto-searchlib@2.0.4 [EEA Jenkins - [`3b5547c`](https://github.com/eea/volto-cca-policy/commit/3b5547c8a7be40a44fd978efe9ea4736e3fa7bed)] + +#### :hammer_and_wrench: Others + +- Don't expose all the languages [Tiberiu Ichim - [`80e20af`](https://github.com/eea/volto-cca-policy/commit/80e20af2f56d164e6efbd90370307f7317c38909)] +- Add 2 new fields to download [Tiberiu Ichim - [`c8f71ba`](https://github.com/eea/volto-cca-policy/commit/c8f71ba52d8e39568e3ad00cf6e6bc45650e66b8)] +- Ad Maps/Graphs height, handle iframe src and URL for indicators [kreafox - [`4f314c0`](https://github.com/eea/volto-cca-policy/commit/4f314c0f8b5e316d67f3c871276e92128ebf129b)] +- Set download fields [Tiberiu Ichim - [`6677ee0`](https://github.com/eea/volto-cca-policy/commit/6677ee0fa1f863387488db9adb2d5730b4099016)] ### [0.2.82](https://github.com/eea/volto-cca-policy/compare/0.2.81...0.2.82) - 12 December 2024 #### :hammer_and_wrench: Others diff --git a/package.json b/package.json index 5b425b6e..7af6499e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-cca-policy", - "version": "0.2.82", + "version": "0.2.83", "description": "@eeacms/volto-cca-policy: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", @@ -35,7 +35,7 @@ "@eeacms/volto-globalsearch": "^1.1.0", "@eeacms/volto-hero-block": "^7.1.0", "@eeacms/volto-openlayers-map": "*", - "@eeacms/volto-searchlib": "2.0.3", + "@eeacms/volto-searchlib": "2.0.5", "@eeacms/volto-slate-label": "^0.6.0", "@eeacms/volto-tabs-block": "^7.5.1", "@elastic/search-ui": "1.21.2", diff --git a/src/components/theme/Views/DatabaseItemView.jsx b/src/components/theme/Views/DatabaseItemView.jsx index c6c24b83..e0c0549b 100644 --- a/src/components/theme/Views/DatabaseItemView.jsx +++ b/src/components/theme/Views/DatabaseItemView.jsx @@ -94,15 +94,26 @@ const MaybeFlourishVisualization = ({ content }) => { }; function getFirstIframeSrc(htmlString) { - const regex = /]+src=["']([^"']+)["']/; - const match = htmlString.match(regex); - return match ? match[1] : null; + const iframeRegex = /]+src=["']([^"']+)["']/; + + const iframeMatch = htmlString.match(iframeRegex); + if (iframeMatch) { + return iframeMatch[1]; + } + + try { + const url = new URL(htmlString); + return url.href; + } catch (e) { + return null; + } } const MaybeIframeVisualization = ({ content }) => { - const { map_graphs } = content; + const { map_graphs, map_graphs_height } = content; const url = getFirstIframeSrc(map_graphs || ''); + const height = map_graphs_height || 800; const [isClient, setIsClient] = React.useState(); @@ -110,7 +121,6 @@ const MaybeIframeVisualization = ({ content }) => { if (!(isClient && url)) return null; - //
return ( { }} >