@eeacms/volto-cca-policy 0.2.5 → 0.2.7
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 +52 -0
- package/package.json +1 -1
- package/src/components/index.js +9 -6
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.js +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.jsx +14 -13
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.jsx +2 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureInteraction.jsx +5 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/InfoOverlay.jsx +4 -4
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +93 -64
- package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +24 -35
- package/src/components/manage/Blocks/CountryProfileDetail/View.js +13 -8
- package/src/components/manage/Blocks/CountryProfileDetail/styles.less +5 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -8
- package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +3 -1
- package/src/components/theme/Widgets/RASTWidgetView.jsx +18 -0
- package/src/helpers/ContentMetadata.jsx +16 -34
- package/src/helpers/Utils.jsx +23 -0
- package/src/helpers/index.js +1 -0
- package/src/index.js +20 -17
- package/theme/elements/list.variables +1 -1
- package/theme/extras/hero.overrides +1 -1
- package/theme/globals/mission.less +15 -0
- package/src/components/theme/Views/MissionFundingCCAView.jsx +0 -190
- package/src/components/theme/Views/MissionFundingCCAView.test.jsx +0 -106
- package/src/components/theme/Views/styles.less +0 -7
- package/src/components/theme/Widgets/TokenWidget.jsx +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,58 @@ 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.7](https://github.com/eea/volto-cca-policy/compare/0.2.6...0.2.7) - 19 April 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat(view): add RASTWidgetView [kreafox - [`2a80745`](https://github.com/eea/volto-cca-policy/commit/2a80745b6f97d03ca33bda8cd3b40e3fd030c521)]
|
|
12
|
+
|
|
13
|
+
#### :nail_care: Enhancements
|
|
14
|
+
|
|
15
|
+
- change: remove MissionFundingView, use dexterity layout - Refs #267791 [kreafox - [`f27de36`](https://github.com/eea/volto-cca-policy/commit/f27de36778d57f5b11b3d9d2abf26bd5bde134f4)]
|
|
16
|
+
- change(view): remove MissionToolView, use dexterity layout - Refs #268126 [kreafox - [`1d11d7d`](https://github.com/eea/volto-cca-policy/commit/1d11d7d6f3429af7a2ea5fd94060893066b68c33)]
|
|
17
|
+
|
|
18
|
+
#### :house: Internal changes
|
|
19
|
+
|
|
20
|
+
- chore: update components export [kreafox - [`5c81f64`](https://github.com/eea/volto-cca-policy/commit/5c81f641275a4ab6087b09c21e333f5a01009c7f)]
|
|
21
|
+
- chore: cleanup code - remove unused widget [kreafox - [`6c6297d`](https://github.com/eea/volto-cca-policy/commit/6c6297df2dbd13010807e409634dfe7a90031407)]
|
|
22
|
+
|
|
23
|
+
#### :hammer_and_wrench: Others
|
|
24
|
+
|
|
25
|
+
- Refs #260715 - remove icons [Tripon Eugen - [`cacff37`](https://github.com/eea/volto-cca-policy/commit/cacff37322171b8faaf6fc1a1e4cd2335376bc41)]
|
|
26
|
+
- Refs #260715 - remove icons [Tripon Eugen - [`7fd9186`](https://github.com/eea/volto-cca-policy/commit/7fd91866c88a9bec53422412c967219242aad5f6)]
|
|
27
|
+
- test: fix SyntaxError [kreafox - [`e942845`](https://github.com/eea/volto-cca-policy/commit/e942845ce658b084715c39eea9f90adbb7bc60fe)]
|
|
28
|
+
- Styleling [Tiberiu Ichim - [`39a22cb`](https://github.com/eea/volto-cca-policy/commit/39a22cbc76a245286d9daa6da84ee5bf539f3dc4)]
|
|
29
|
+
- Remove logging [Tiberiu Ichim - [`ace005c`](https://github.com/eea/volto-cca-policy/commit/ace005c3e7a9d0ab708d48a16cb286253bb44ab9)]
|
|
30
|
+
- Better buffer [Tiberiu Ichim - [`8a7d99f`](https://github.com/eea/volto-cca-policy/commit/8a7d99f901752a2d2eb8db799e415a2aab88a1f6)]
|
|
31
|
+
- Better height [Tiberiu Ichim - [`4928376`](https://github.com/eea/volto-cca-policy/commit/492837652238098e2ce8b5e7bc593db3b8c0ba04)]
|
|
32
|
+
- Hardcode buffer value [Tiberiu Ichim - [`95ed23d`](https://github.com/eea/volto-cca-policy/commit/95ed23dd4dfc53c5ed82108b97023600cc455bcb)]
|
|
33
|
+
- Zoom to point [Tiberiu Ichim - [`2043cb9`](https://github.com/eea/volto-cca-policy/commit/2043cb98ce1db30b6dc80b890e4dee9183ccb092)]
|
|
34
|
+
- Code cleanup [Tiberiu Ichim - [`43fdf78`](https://github.com/eea/volto-cca-policy/commit/43fdf78af12cb6ee2b588ec7641f22052c6bf6fa)]
|
|
35
|
+
- Tweak layer [Tiberiu Ichim - [`f33d894`](https://github.com/eea/volto-cca-policy/commit/f33d894730f9459d7f8638fa680b7ad9572e685f)]
|
|
36
|
+
- Improvements to casestudy explorer map [Tiberiu Ichim - [`b5cf129`](https://github.com/eea/volto-cca-policy/commit/b5cf129ad6106125fb367a25f6bc218a349c1982)]
|
|
37
|
+
### [0.2.6](https://github.com/eea/volto-cca-policy/compare/0.2.5...0.2.6) - 17 April 2024
|
|
38
|
+
|
|
39
|
+
#### :rocket: New Features
|
|
40
|
+
|
|
41
|
+
- feat(view): add MissionToolView for mission_tool content type - Refs #268126 [kreafox - [`598f038`](https://github.com/eea/volto-cca-policy/commit/598f038b17754d272424a04e45ebc2b41766d724)]
|
|
42
|
+
|
|
43
|
+
#### :bug: Bug Fixes
|
|
44
|
+
|
|
45
|
+
- fix(view): fix condition in MissionFundingView [kreafox - [`45f8741`](https://github.com/eea/volto-cca-policy/commit/45f87418982cad2ec33d72a3bacb907ff39a6336)]
|
|
46
|
+
|
|
47
|
+
#### :nail_care: Enhancements
|
|
48
|
+
|
|
49
|
+
- change(view): use semantic List [kreafox - [`3cba130`](https://github.com/eea/volto-cca-policy/commit/3cba130f2c9cf3d39e8131b04beca5750affe73f)]
|
|
50
|
+
- change(view): use MetadataItemList [kreafox - [`a501d41`](https://github.com/eea/volto-cca-policy/commit/a501d413ceb4a78bfdfe38eaaaec38d93eddb7f7)]
|
|
51
|
+
- change(view): use MetadataItemList instead of ItemsList [kreafox - [`df2a28d`](https://github.com/eea/volto-cca-policy/commit/df2a28da12a37252e745ac87984eedea2701e16f)]
|
|
52
|
+
|
|
53
|
+
#### :hammer_and_wrench: Others
|
|
54
|
+
|
|
55
|
+
- test: update snapshot [kreafox - [`a8589e3`](https://github.com/eea/volto-cca-policy/commit/a8589e32cd506eae790cde287fbdf82fa0e29012)]
|
|
56
|
+
- test: reduce duplicated code , move disclaimer to separate component - Refs #268126 [kreafox - [`3ae3d09`](https://github.com/eea/volto-cca-policy/commit/3ae3d09ebdf6b32ef858051eb08d8088bec89d23)]
|
|
57
|
+
- test: add tests for Mission Tool content type [kreafox - [`5214c0f`](https://github.com/eea/volto-cca-policy/commit/5214c0f58646956055f10a07da8acf72398b6e29)]
|
|
58
|
+
- test: update snapshots [kreafox - [`8ce574c`](https://github.com/eea/volto-cca-policy/commit/8ce574cdf17edfe72ece2e4cc59d984746693f03)]
|
|
7
59
|
### [0.2.5](https://github.com/eea/volto-cca-policy/compare/0.2.4...0.2.5) - 15 April 2024
|
|
8
60
|
|
|
9
61
|
#### :rocket: New Features
|
package/package.json
CHANGED
package/src/components/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export ImageGallery from './theme/ImageGallery/ImageGallery';
|
|
2
|
-
export BannerTitle from './theme/BannerTitle/BannerTitle';
|
|
3
|
-
export PortalMessage from './theme/PortalMessage/PortalMessage';
|
|
4
|
-
export TranslationDisclaimer from './theme/TranslationDisclaimer/TranslationDisclaimer';
|
|
5
|
-
export ShareInfoButton from './theme/ShareInfoButton/ShareInfoButton';
|
|
6
|
-
export ASTNavigation from './theme/ASTNavigation/ASTNavigation';
|
|
1
|
+
export { default as ImageGallery } from './theme/ImageGallery/ImageGallery';
|
|
2
|
+
export { default as BannerTitle } from './theme/BannerTitle/BannerTitle';
|
|
3
|
+
export { default as PortalMessage } from './theme/PortalMessage/PortalMessage';
|
|
4
|
+
export { default as TranslationDisclaimer } from './theme/TranslationDisclaimer/TranslationDisclaimer';
|
|
5
|
+
export { default as ShareInfoButton } from './theme/ShareInfoButton/ShareInfoButton';
|
|
6
|
+
export { default as ASTNavigation } from './theme/ASTNavigation/ASTNavigation';
|
|
7
|
+
|
|
8
|
+
// Widgets
|
|
9
|
+
export { default as RASTWidgetView } from './theme/Widgets/RASTWidgetView';
|
|
@@ -62,7 +62,7 @@ export default function CaseStudyExplorerView(props) {
|
|
|
62
62
|
if (__SERVER__) return '';
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
|
-
<div>
|
|
65
|
+
<div className="casestudy-explorer-map">
|
|
66
66
|
<Grid columns="12">
|
|
67
67
|
<Grid.Column mobile={9} tablet={9} computer={9} className="col-left">
|
|
68
68
|
{cases.length ? (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
3
3
|
import { Accordion, Icon, Checkbox } from 'semantic-ui-react';
|
|
4
4
|
|
|
@@ -32,7 +32,7 @@ export default function CaseStudyFilters(props) {
|
|
|
32
32
|
setActiveIndex(index);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const checkboxChangeHandler = (_event
|
|
35
|
+
const checkboxChangeHandler = (_event, data) => {
|
|
36
36
|
const temp = JSON.parse(JSON.stringify(activeFilters));
|
|
37
37
|
|
|
38
38
|
if (data.checked) {
|
|
@@ -48,7 +48,7 @@ export default function CaseStudyFilters(props) {
|
|
|
48
48
|
|
|
49
49
|
const intl = useIntl();
|
|
50
50
|
return (
|
|
51
|
-
|
|
51
|
+
<div className="casestudy-filters">
|
|
52
52
|
<Accordion exclusive={false} className="secondary">
|
|
53
53
|
<Accordion.Title
|
|
54
54
|
active={activeIndex.includes(0)}
|
|
@@ -89,7 +89,6 @@ export default function CaseStudyFilters(props) {
|
|
|
89
89
|
<Accordion.Content active={activeIndex.includes(1)}>
|
|
90
90
|
{Object.entries(filters?.impacts || {}).map(
|
|
91
91
|
([value, label], index) => (
|
|
92
|
-
// <p key={index}>
|
|
93
92
|
<Checkbox
|
|
94
93
|
label={intl.formatMessage({ id: label })}
|
|
95
94
|
checked={activeFilters.impacts.includes(value)}
|
|
@@ -98,7 +97,6 @@ export default function CaseStudyFilters(props) {
|
|
|
98
97
|
onChange={checkboxChangeHandler}
|
|
99
98
|
key={'impact' + index}
|
|
100
99
|
/>
|
|
101
|
-
// </p>
|
|
102
100
|
),
|
|
103
101
|
)}
|
|
104
102
|
</Accordion.Content>
|
|
@@ -120,7 +118,7 @@ export default function CaseStudyFilters(props) {
|
|
|
120
118
|
<p>
|
|
121
119
|
<strong>{intl.formatMessage({ id: key })}</strong>
|
|
122
120
|
</p>
|
|
123
|
-
{Object.entries(values).map(([
|
|
121
|
+
{Object.entries(values).map(([_, valData]) => (
|
|
124
122
|
<Checkbox
|
|
125
123
|
label={intl.formatMessage({ id: valData.value })}
|
|
126
124
|
value={valData.key}
|
|
@@ -145,17 +143,20 @@ export default function CaseStudyFilters(props) {
|
|
|
145
143
|
) : null}
|
|
146
144
|
<div className="case-study-legend">
|
|
147
145
|
<p>
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
<span></span>
|
|
147
|
+
<FormattedMessage
|
|
148
|
+
id="Climate-ADAPT case studies"
|
|
149
|
+
defaultMessage="Climate-ADAPT case studies"
|
|
150
|
+
/>
|
|
152
151
|
</p>
|
|
153
152
|
<p>
|
|
154
153
|
<span className="light-blue"></span>
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
<FormattedMessage
|
|
155
|
+
id="Case studies collected at national level in Spain, provided by AdapteCCA.es"
|
|
156
|
+
defaultMessage="Case studies collected at national level in Spain, provided by AdapteCCA.es"
|
|
157
|
+
/>
|
|
157
158
|
</p>
|
|
158
159
|
</div>
|
|
159
|
-
|
|
160
|
+
</div>
|
|
160
161
|
);
|
|
161
162
|
}
|
|
@@ -15,11 +15,11 @@ export default function CaseStudyMap(props) {
|
|
|
15
15
|
const features = getFeatures(items);
|
|
16
16
|
|
|
17
17
|
const [tileWMSSources] = React.useState([
|
|
18
|
-
// , setTileWMSSources
|
|
19
18
|
new ol.source.TileWMS({
|
|
19
|
+
// see https://gisco-services.ec.europa.eu/maps/demo/ for more layers
|
|
20
20
|
url: 'https://gisco-services.ec.europa.eu/maps/service',
|
|
21
21
|
params: {
|
|
22
|
-
LAYERS: '
|
|
22
|
+
LAYERS: 'OSMCartoComposite',
|
|
23
23
|
TILED: true,
|
|
24
24
|
},
|
|
25
25
|
serverType: 'geoserver',
|
|
@@ -59,7 +59,12 @@ export default function FeatureInteraction({ onFeatureSelect }) {
|
|
|
59
59
|
const subfeatures = feature.values_.features;
|
|
60
60
|
if (subfeatures.length === 1) {
|
|
61
61
|
const selectedFeature = subfeatures[0].values_;
|
|
62
|
+
const extent = selectedFeature.geometry.extent_;
|
|
63
|
+
|
|
62
64
|
onFeatureSelect(selectedFeature);
|
|
65
|
+
const paddedExtent = ol.extent.buffer(extent, 50000);
|
|
66
|
+
|
|
67
|
+
map.getView().fit(paddedExtent, { ...map.getSize(), duration: 1000 });
|
|
63
68
|
} else {
|
|
64
69
|
// zoom to extent of cluster points
|
|
65
70
|
const extent = getExtentOfFeatures(subfeatures);
|
|
@@ -68,8 +73,6 @@ export default function FeatureInteraction({ onFeatureSelect }) {
|
|
|
68
73
|
(extent[3] - extent[1] + extent[2] - extent[0]) / 4;
|
|
69
74
|
extentBuffer = extentBuffer < 500 ? 500 : extentBuffer;
|
|
70
75
|
const paddedExtent = ol.extent.buffer(extent, extentBuffer);
|
|
71
|
-
|
|
72
|
-
// const paddedExtent = ol.extent.buffer(extent, 50000);
|
|
73
76
|
map.getView().fit(paddedExtent, { ...map.getSize(), duration: 1000 });
|
|
74
77
|
}
|
|
75
78
|
});
|
|
@@ -20,6 +20,9 @@ export default function InfoOverlay({
|
|
|
20
20
|
|
|
21
21
|
const prevLayerId = usePrevious(layerId);
|
|
22
22
|
|
|
23
|
+
const [isClient, setIsClient] = React.useState(false);
|
|
24
|
+
React.useEffect(() => setIsClient(true), []);
|
|
25
|
+
|
|
23
26
|
React.useEffect(() => {
|
|
24
27
|
if (prevLayerId && layerId !== prevLayerId) {
|
|
25
28
|
setShowTooltip(false);
|
|
@@ -32,7 +35,7 @@ export default function InfoOverlay({
|
|
|
32
35
|
const overlay = new ol.Overlay({
|
|
33
36
|
element: document.getElementById('popup-overlay'),
|
|
34
37
|
positioning: 'bottom-center',
|
|
35
|
-
offset: [
|
|
38
|
+
offset: [10, -10],
|
|
36
39
|
stopEvent: false,
|
|
37
40
|
});
|
|
38
41
|
map.addOverlay(overlay);
|
|
@@ -61,9 +64,6 @@ export default function InfoOverlay({
|
|
|
61
64
|
};
|
|
62
65
|
}, [map, tooltip, onFeatureSelect, hasCusters]);
|
|
63
66
|
|
|
64
|
-
const [isClient, setIsClient] = React.useState(false);
|
|
65
|
-
React.useEffect(() => setIsClient(true), []);
|
|
66
|
-
|
|
67
67
|
return isClient ? (
|
|
68
68
|
<div
|
|
69
69
|
id="popup-overlay"
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
#csepopup {
|
|
8
|
+
width: 300px;
|
|
9
|
+
padding: 10px 0;
|
|
8
10
|
border-bottom: 6px solid #005c96;
|
|
11
|
+
background-color: white;
|
|
9
12
|
|
|
10
13
|
p {
|
|
11
14
|
padding: 0 10px 0 10px;
|
|
@@ -35,84 +38,110 @@
|
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
.section-case-study-explorer #popup-overlay {
|
|
42
|
+
width: 340px;
|
|
43
|
+
// max-height: 300px;
|
|
44
|
+
padding: 0;
|
|
45
|
+
background-color: #fff;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mapHeight: 70vh;
|
|
49
|
+
|
|
50
|
+
.casestudy-explorer-map {
|
|
51
|
+
// height: @mapHeight;
|
|
52
|
+
min-height: @mapHeight;
|
|
53
|
+
|
|
54
|
+
.ol-map {
|
|
55
|
+
// height: @mapHeight;
|
|
56
|
+
min-height: @mapHeight;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
.casestudy-filters {
|
|
60
|
+
display: flex;
|
|
61
|
+
min-height: @mapHeight;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#cse-filter {
|
|
66
|
+
h4 {
|
|
67
|
+
position: relative;
|
|
68
|
+
padding: 10px;
|
|
69
|
+
border-bottom: 1px solid #d8d8d8;
|
|
70
|
+
margin-top: 0 !important;
|
|
71
|
+
margin-bottom: 0 !important;
|
|
72
|
+
background-color: #fff;
|
|
73
|
+
clear: both;
|
|
74
|
+
color: #005c96;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
font-size: 14px;
|
|
62
77
|
}
|
|
63
78
|
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
p {
|
|
80
|
+
// padding: 2px;
|
|
81
|
+
padding-bottom: 10px;
|
|
82
|
+
clear: both;
|
|
83
|
+
line-height: 20px;
|
|
84
|
+
|
|
85
|
+
span {
|
|
86
|
+
float: left;
|
|
87
|
+
font-family: OpenSansM, sans-serif;
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
input {
|
|
92
|
+
float: right;
|
|
93
|
+
}
|
|
66
94
|
}
|
|
67
|
-
}
|
|
68
95
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
96
|
+
div.title {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
72
99
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
.ui.accordion {
|
|
101
|
+
& > .title > .icon {
|
|
102
|
+
line-height: 1rem;
|
|
103
|
+
}
|
|
76
104
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
p {
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
80
108
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
109
|
+
.content {
|
|
110
|
+
overflow: auto;
|
|
111
|
+
max-height: 400px;
|
|
84
112
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
113
|
+
.subcategory {
|
|
114
|
+
margin-bottom: 30px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
88
118
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
119
|
+
button.reset {
|
|
120
|
+
margin-top: 20px;
|
|
121
|
+
}
|
|
92
122
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
span {
|
|
97
|
-
display: inline-block;
|
|
98
|
-
width: 12px;
|
|
99
|
-
height: 12px;
|
|
100
|
-
margin-top: 3px;
|
|
101
|
-
margin-right: 5px;
|
|
102
|
-
background-color: #005c96 !important;
|
|
103
|
-
background-color: #bbb;
|
|
104
|
-
border-radius: 50%;
|
|
123
|
+
.ui.checkbox {
|
|
124
|
+
width: 100%;
|
|
105
125
|
}
|
|
106
126
|
|
|
107
|
-
|
|
108
|
-
|
|
127
|
+
.case-study-legend {
|
|
128
|
+
padding-top: 20px;
|
|
129
|
+
margin-top: auto;
|
|
130
|
+
|
|
131
|
+
span {
|
|
132
|
+
display: inline-block;
|
|
133
|
+
width: 12px;
|
|
134
|
+
height: 12px;
|
|
135
|
+
margin-top: 3px;
|
|
136
|
+
margin-right: 5px;
|
|
137
|
+
background-color: #005c96 !important;
|
|
138
|
+
background-color: #bbb;
|
|
139
|
+
border-radius: 50%;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
span.light-blue {
|
|
143
|
+
background-color: #00ffff !important;
|
|
144
|
+
}
|
|
109
145
|
}
|
|
110
146
|
}
|
|
111
147
|
}
|
|
112
|
-
|
|
113
|
-
.section-case-study-explorer #popup-overlay {
|
|
114
|
-
width: 340px;
|
|
115
|
-
// max-height: 300px;
|
|
116
|
-
padding: 0;
|
|
117
|
-
background-color: #fff;
|
|
118
|
-
}
|
|
@@ -40,21 +40,19 @@ export const Interactions = ({
|
|
|
40
40
|
) {
|
|
41
41
|
// if (countries_metadata.length>0) {
|
|
42
42
|
let countryName = feature.get('na');
|
|
43
|
-
let noDataReportedMsg =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'">here</a>';
|
|
43
|
+
let noDataReportedMsg = `
|
|
44
|
+
No data reported through the reporting mechanism of the Governance Regulation.
|
|
45
|
+
Last information is available
|
|
46
|
+
<a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
|
|
47
|
+
|
|
49
48
|
if (countryName === 'Türkiye') {
|
|
50
49
|
countryName = 'Turkiye';
|
|
51
|
-
noDataReportedMsg =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
countryName.toLowerCase() +
|
|
56
|
-
'">here</a>';
|
|
50
|
+
noDataReportedMsg = `
|
|
51
|
+
Data reported in 2021 through the reporting mechanism of the Governance Regulation.
|
|
52
|
+
Information is available
|
|
53
|
+
<a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
|
|
57
54
|
}
|
|
55
|
+
|
|
58
56
|
if (!Object.hasOwn(countries_metadata[0], countryName)) {
|
|
59
57
|
return;
|
|
60
58
|
}
|
|
@@ -65,7 +63,7 @@ export const Interactions = ({
|
|
|
65
63
|
let tooltipContent = '';
|
|
66
64
|
if (thematicMapMode === 'National adaption policy') {
|
|
67
65
|
if (metadata[0]?.notreported) {
|
|
68
|
-
tooltipContent =
|
|
66
|
+
tooltipContent = `<span>${noDataReportedMsg}</span>`;
|
|
69
67
|
} else {
|
|
70
68
|
tooltipContent =
|
|
71
69
|
metadata[0]?.mixed || '<span>NAS and NAP not reported</span>';
|
|
@@ -79,28 +77,19 @@ export const Interactions = ({
|
|
|
79
77
|
// overlaySource.addFeature(feature);
|
|
80
78
|
map.getTargetElement().style.cursor = 'pointer';
|
|
81
79
|
const node = tooltipRef.current;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
</div><div class="tooltip-content">` +
|
|
96
|
-
tooltipContent +
|
|
97
|
-
`</div>`;
|
|
98
|
-
setTooltipVisibility(
|
|
99
|
-
node,
|
|
100
|
-
'<div class="country-tooltip">' + tooltipContentDiv + '</div>',
|
|
101
|
-
domEvt,
|
|
102
|
-
true,
|
|
103
|
-
);
|
|
80
|
+
const flag = feature.get('flag').src;
|
|
81
|
+
const cn = countryName.toLowerCase();
|
|
82
|
+
let tooltipContentDiv = `
|
|
83
|
+
<div class="country-tooltip">
|
|
84
|
+
<div id="country-name">
|
|
85
|
+
<a href="/en/countries-regions/countries/${cn}"><h3>${countryName}</h3></a>
|
|
86
|
+
<img class="tooltip-country-flag" src="${flag}" height="33" width="54">
|
|
87
|
+
</div>
|
|
88
|
+
<div class="tooltip-content">${tooltipContent}</div>
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
setTooltipVisibility(node, tooltipContentDiv, domEvt, true);
|
|
104
93
|
}
|
|
105
94
|
|
|
106
95
|
// if (feature) {
|
|
@@ -6,9 +6,10 @@ import CountryTabPane from './CountryTabPane';
|
|
|
6
6
|
import './styles.less';
|
|
7
7
|
|
|
8
8
|
export default function View(props) {
|
|
9
|
-
const dataJson = JSON.parse(
|
|
10
|
-
|
|
11
|
-
);
|
|
9
|
+
// const dataJson = JSON.parse(
|
|
10
|
+
// props?.properties['@components']?.countryprofile?.html,
|
|
11
|
+
// );
|
|
12
|
+
const dataJson = props?.properties['@components']?.countryprofile?.html;
|
|
12
13
|
const [activePanes, setActivePanes] = React.useState({});
|
|
13
14
|
|
|
14
15
|
const panes = [];
|
|
@@ -35,8 +36,9 @@ export default function View(props) {
|
|
|
35
36
|
{dataJson.message_top ? (
|
|
36
37
|
<div class="eea callout">{dataJson.message_top}</div>
|
|
37
38
|
) : null}
|
|
38
|
-
{dataJson.top_accordeon
|
|
39
|
-
|
|
39
|
+
{dataJson.top_accordeon ? (
|
|
40
|
+
<div className="top-accordion">
|
|
41
|
+
{dataJson.top_accordeon.map((accordion, index) => (
|
|
40
42
|
<Accordion className="secondary">
|
|
41
43
|
<Accordion.Title
|
|
42
44
|
role="button"
|
|
@@ -57,8 +59,9 @@ export default function View(props) {
|
|
|
57
59
|
dangerouslySetInnerHTML={{ __html: accordion.value }}
|
|
58
60
|
></Accordion.Content>
|
|
59
61
|
</Accordion>
|
|
60
|
-
))
|
|
61
|
-
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
) : null}
|
|
62
65
|
<Tab
|
|
63
66
|
className="secondary menu"
|
|
64
67
|
panes={panes}
|
|
@@ -73,7 +76,9 @@ export default function View(props) {
|
|
|
73
76
|
tabIndex: 0,
|
|
74
77
|
}}
|
|
75
78
|
/>
|
|
76
|
-
{dataJson.updated ?
|
|
79
|
+
{dataJson.updated ? (
|
|
80
|
+
<p>Reported updated until: {dataJson.updated}</p>
|
|
81
|
+
) : null}
|
|
77
82
|
</>
|
|
78
83
|
);
|
|
79
84
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Accordion
|
|
2
|
+
import { Accordion } from 'semantic-ui-react';
|
|
3
3
|
import RASTAccordionContent from './RASTAccordionContent';
|
|
4
4
|
import { useHistory } from 'react-router-dom';
|
|
5
5
|
|
|
@@ -36,13 +36,6 @@ const RASTAccordion = (props) => {
|
|
|
36
36
|
}}
|
|
37
37
|
>
|
|
38
38
|
<span className="item-title">{item.title}</span>
|
|
39
|
-
{show_subfolders ? (
|
|
40
|
-
active ? (
|
|
41
|
-
<Icon className="ri-arrow-up-s-line" />
|
|
42
|
-
) : (
|
|
43
|
-
<Icon className="ri-arrow-down-s-line" />
|
|
44
|
-
)
|
|
45
|
-
) : null}
|
|
46
39
|
</Accordion.Title>
|
|
47
40
|
{show_subfolders ? (
|
|
48
41
|
<Accordion.Content active={active}>
|
|
@@ -21,8 +21,10 @@ export default function RASTMap(props) {
|
|
|
21
21
|
const { path, pathname, activeMenu, skip_items } = props;
|
|
22
22
|
const currentPath = path || pathname;
|
|
23
23
|
|
|
24
|
-
const items = props.items;
|
|
25
24
|
let data = skip_items.split(',');
|
|
25
|
+
const items = props.items.filter(
|
|
26
|
+
(_item, index) => !data.includes(index.toString()),
|
|
27
|
+
);
|
|
26
28
|
let currentMenu = activeMenu;
|
|
27
29
|
|
|
28
30
|
if (activeMenu !== null) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { List } from 'semantic-ui-react';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
|
|
5
|
+
const RASTWidgetView = ({ value, className }) => {
|
|
6
|
+
return value && value.length > 0 ? (
|
|
7
|
+
<span className={cx(className, 'widget')}>
|
|
8
|
+
<List>
|
|
9
|
+
{value.map((step, index) => (
|
|
10
|
+
<List.Item key={index}>{step.title}</List.Item>
|
|
11
|
+
))}
|
|
12
|
+
</List>
|
|
13
|
+
</span>
|
|
14
|
+
) : (
|
|
15
|
+
''
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export default RASTWidgetView;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { useLocation } from 'react-router-dom';
|
|
3
|
+
import { Popup, Segment } from 'semantic-ui-react';
|
|
4
|
+
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
1
5
|
import {
|
|
2
6
|
ACE_COUNTRIES,
|
|
3
7
|
BIOREGIONS,
|
|
@@ -9,11 +13,10 @@ import {
|
|
|
9
13
|
INDICATOR,
|
|
10
14
|
PUBICATION_REPORT,
|
|
11
15
|
} from '@eeacms/volto-cca-policy/helpers/Constants';
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
16
|
+
import {
|
|
17
|
+
isObservatoryMetadataURL,
|
|
18
|
+
MetadataItemList,
|
|
19
|
+
} from '@eeacms/volto-cca-policy/helpers';
|
|
17
20
|
|
|
18
21
|
const messages = defineMessages({
|
|
19
22
|
'The date refers to the moment in which the item has been prepared or updated by contributing experts to be submitted for the publication in Climate ADAPT': {
|
|
@@ -312,27 +315,8 @@ function PublicationDateInfo(props) {
|
|
|
312
315
|
) : null;
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
function ItemsList(props) {
|
|
316
|
-
let { value, join } = props;
|
|
317
|
-
if (join === undefined) {
|
|
318
|
-
join = ', ';
|
|
319
|
-
}
|
|
320
|
-
if (join === '<br />') {
|
|
321
|
-
return (
|
|
322
|
-
<span>
|
|
323
|
-
{value.map((item, index) => (
|
|
324
|
-
<Fragment key={index}>
|
|
325
|
-
<span>{item.title}</span>
|
|
326
|
-
<br />
|
|
327
|
-
</Fragment>
|
|
328
|
-
))}
|
|
329
|
-
</span>
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
return <span>{value.map((item) => item.title).join(join)}</span>;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
318
|
function ContentMetadata(props) {
|
|
319
|
+
const intl = useIntl();
|
|
336
320
|
const { content } = props;
|
|
337
321
|
const {
|
|
338
322
|
sectors,
|
|
@@ -353,8 +337,6 @@ function ContentMetadata(props) {
|
|
|
353
337
|
const isObservatoryItem = isObservatoryMetadataURL(location.pathname);
|
|
354
338
|
const hasGeoChars = geochars !== null || spatial_layer.length > 0;
|
|
355
339
|
|
|
356
|
-
const intl = useIntl();
|
|
357
|
-
|
|
358
340
|
let date_title;
|
|
359
341
|
if (type === VIDEO) {
|
|
360
342
|
date_title = intl.formatMessage(messages['Date of release:']);
|
|
@@ -387,7 +369,7 @@ function ContentMetadata(props) {
|
|
|
387
369
|
defaultMessage="Health impact:"
|
|
388
370
|
/>
|
|
389
371
|
</h5>
|
|
390
|
-
<
|
|
372
|
+
<MetadataItemList value={health_impacts} />
|
|
391
373
|
</>
|
|
392
374
|
)}
|
|
393
375
|
</>
|
|
@@ -410,7 +392,7 @@ function ContentMetadata(props) {
|
|
|
410
392
|
defaultMessage="Key Type Measures:"
|
|
411
393
|
/>
|
|
412
394
|
</h5>
|
|
413
|
-
<
|
|
395
|
+
<MetadataItemList value={key_type_measures} />
|
|
414
396
|
</>
|
|
415
397
|
)}
|
|
416
398
|
|
|
@@ -422,7 +404,7 @@ function ContentMetadata(props) {
|
|
|
422
404
|
defaultMessage="IPCC adaptation options categories:"
|
|
423
405
|
/>
|
|
424
406
|
</h5>
|
|
425
|
-
<
|
|
407
|
+
<MetadataItemList value={ipcc_category} />
|
|
426
408
|
</>
|
|
427
409
|
)}
|
|
428
410
|
|
|
@@ -436,7 +418,7 @@ function ContentMetadata(props) {
|
|
|
436
418
|
defaultMessage="Climate impacts:"
|
|
437
419
|
/>
|
|
438
420
|
</h5>
|
|
439
|
-
<
|
|
421
|
+
<MetadataItemList value={climate_impacts} />
|
|
440
422
|
</>
|
|
441
423
|
)}
|
|
442
424
|
|
|
@@ -448,7 +430,7 @@ function ContentMetadata(props) {
|
|
|
448
430
|
defaultMessage="Adaptation elements:"
|
|
449
431
|
/>
|
|
450
432
|
</h5>
|
|
451
|
-
<
|
|
433
|
+
<MetadataItemList value={elements} />
|
|
452
434
|
</>
|
|
453
435
|
)}
|
|
454
436
|
|
|
@@ -457,7 +439,7 @@ function ContentMetadata(props) {
|
|
|
457
439
|
<h5>
|
|
458
440
|
<FormattedMessage id="Sectors:" defaultMessage="Sectors:" />
|
|
459
441
|
</h5>
|
|
460
|
-
<
|
|
442
|
+
<MetadataItemList value={sectors} />
|
|
461
443
|
</>
|
|
462
444
|
)}
|
|
463
445
|
</>
|
|
@@ -471,7 +453,7 @@ function ContentMetadata(props) {
|
|
|
471
453
|
defaultMessage="Governance level:"
|
|
472
454
|
/>
|
|
473
455
|
</h5>
|
|
474
|
-
<
|
|
456
|
+
<MetadataItemList value={governance_level} join_type="<br />" />
|
|
475
457
|
</>
|
|
476
458
|
)}
|
|
477
459
|
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -482,3 +482,26 @@ export const EventDetails = (props) => {
|
|
|
482
482
|
</>
|
|
483
483
|
);
|
|
484
484
|
};
|
|
485
|
+
|
|
486
|
+
export const MetadataItemList = (props) => {
|
|
487
|
+
const { value, join_type } = props;
|
|
488
|
+
|
|
489
|
+
return value && value.length > 0 ? (
|
|
490
|
+
<>
|
|
491
|
+
{!join_type ? (
|
|
492
|
+
<p>{value.map((item) => item.title).join(', ')}</p>
|
|
493
|
+
) : (
|
|
494
|
+
<>
|
|
495
|
+
{value.map((item, index) => (
|
|
496
|
+
<React.Fragment key={index}>
|
|
497
|
+
<span>{item.title}</span>
|
|
498
|
+
{index !== value.length - 1 && (
|
|
499
|
+
<span dangerouslySetInnerHTML={{ __html: join_type }} />
|
|
500
|
+
)}
|
|
501
|
+
</React.Fragment>
|
|
502
|
+
))}
|
|
503
|
+
</>
|
|
504
|
+
)}
|
|
505
|
+
</>
|
|
506
|
+
) : null;
|
|
507
|
+
};
|
package/src/helpers/index.js
CHANGED
package/src/index.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { compose } from 'redux';
|
|
2
|
-
|
|
3
2
|
import { Sitemap } from '@plone/volto/components';
|
|
3
|
+
import {
|
|
4
|
+
RASTWidgetView,
|
|
5
|
+
TranslationDisclaimer,
|
|
6
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
7
|
+
import { blockAvailableInMission } from '@eeacms/volto-cca-policy/utils';
|
|
8
|
+
|
|
4
9
|
import CcaEventView from './components/theme/Views/CcaEventView';
|
|
5
10
|
import NewsItemView from './components/theme/Views/NewsItemView';
|
|
6
11
|
import EventView from './components/theme/Views/EventView';
|
|
@@ -9,28 +14,23 @@ import CaseStudyView from './components/theme/Views/CaseStudyView';
|
|
|
9
14
|
import ProjectView from './components/theme/Views/ProjectView';
|
|
10
15
|
import C3SIndicatorView from './components/theme/Views/C3SIndicatorView';
|
|
11
16
|
import DatabaseItemView from './components/theme/Views/DatabaseItemView';
|
|
12
|
-
import MissionFundingCCAView from './components/theme/Views/MissionFundingCCAView';
|
|
13
17
|
|
|
18
|
+
import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
|
|
19
|
+
import GeolocationWidget from './components/theme/Widgets/GeolocationWidget';
|
|
20
|
+
import MigrationButtons from './components/MigrationButtons';
|
|
14
21
|
import HealthHorizontalCardItem from './components/Result/HealthHorizontalCardItem';
|
|
15
22
|
|
|
16
|
-
import
|
|
17
|
-
import ccaLogoWhite from '@eeacms/volto-cca-policy/../theme/assets/images/Header/climate-adapt-logo-white.svg';
|
|
18
|
-
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo-white.svg';
|
|
19
|
-
|
|
20
|
-
import observatoryLogoWhite from '@eeacms/volto-cca-policy/../theme/assets/images/Header/observatory-white-logo.svg';
|
|
21
|
-
import europeanComissionLogo from '@eeacms/volto-cca-policy/../theme/assets/images/Footer/ec_logo.svg';
|
|
23
|
+
import { langRedirection } from './store/middleware';
|
|
22
24
|
|
|
23
25
|
import installBlocks from './components/manage/Blocks';
|
|
24
26
|
import installSearchEngine from './search';
|
|
25
27
|
import installStore from './store';
|
|
26
28
|
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
import { blockAvailableInMission } from '@eeacms/volto-cca-policy/utils';
|
|
33
|
-
import { langRedirection } from './store/middleware';
|
|
29
|
+
import ccaLogo from '@eeacms/volto-cca-policy/../theme/assets/images/Header/climate-adapt-logo.svg';
|
|
30
|
+
import ccaLogoWhite from '@eeacms/volto-cca-policy/../theme/assets/images/Header/climate-adapt-logo-white.svg';
|
|
31
|
+
import observatoryLogoWhite from '@eeacms/volto-cca-policy/../theme/assets/images/Header/observatory-white-logo.svg';
|
|
32
|
+
import europeanComissionLogo from '@eeacms/volto-cca-policy/../theme/assets/images/Footer/ec_logo.svg';
|
|
33
|
+
import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/logo/eea-logo-white.svg';
|
|
34
34
|
|
|
35
35
|
import './slate-styles.less';
|
|
36
36
|
|
|
@@ -286,7 +286,6 @@ const applyConfig = (config) => {
|
|
|
286
286
|
'eea.climateadapt.c3sindicator': C3SIndicatorView,
|
|
287
287
|
'eea.climateadapt.adaptationoption': AdaptationOptionView,
|
|
288
288
|
'News Item': NewsItemView,
|
|
289
|
-
mission_funding_cca: MissionFundingCCAView,
|
|
290
289
|
};
|
|
291
290
|
|
|
292
291
|
config.views.layoutViewsNamesMapping.view_cca_event = 'CCA Event View';
|
|
@@ -387,6 +386,11 @@ const applyConfig = (config) => {
|
|
|
387
386
|
config.widgets.id.geochars = GeocharsWidget;
|
|
388
387
|
config.widgets.id.geolocation = GeolocationWidget;
|
|
389
388
|
|
|
389
|
+
if (config.widgets.views?.widget) {
|
|
390
|
+
config.widgets.views.id.rast_steps = RASTWidgetView;
|
|
391
|
+
config.widgets.views.widget.rast_steps = RASTWidgetView;
|
|
392
|
+
}
|
|
393
|
+
|
|
390
394
|
config.settings.slate.styleMenu.inlineStyles = [
|
|
391
395
|
...(config.settings.slate.styleMenu?.inlineStyles || []),
|
|
392
396
|
{ cssClass: 'large-text', label: 'Large text' },
|
|
@@ -442,7 +446,6 @@ const applyConfig = (config) => {
|
|
|
442
446
|
];
|
|
443
447
|
|
|
444
448
|
// plug custom redux middleware
|
|
445
|
-
//
|
|
446
449
|
const storeExtender = (stack) => [langRedirection, ...stack];
|
|
447
450
|
config.settings.storeExtenders = [
|
|
448
451
|
storeExtender,
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
/* Mission subsite */
|
|
2
2
|
|
|
3
|
+
.mission-item-view {
|
|
4
|
+
.ui.segment.metadata {
|
|
5
|
+
border: none;
|
|
6
|
+
background-color: #f9f9f9;
|
|
7
|
+
|
|
8
|
+
h5 {
|
|
9
|
+
margin: 1em 0 0.5em 0;
|
|
10
|
+
|
|
11
|
+
&:first-child {
|
|
12
|
+
margin-top: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
3
18
|
body.view-viewview.contenttype-subsite.section-mission
|
|
4
19
|
.block.__grid.teaserGrid.centered
|
|
5
20
|
h2 {
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { HTMLField, BannerTitle } from '@eeacms/volto-cca-policy/helpers';
|
|
2
|
-
import { Container, Grid } from 'semantic-ui-react';
|
|
3
|
-
import { PortalMessage } from '@eeacms/volto-cca-policy/components';
|
|
4
|
-
import './styles.less';
|
|
5
|
-
|
|
6
|
-
function MissiongFundingCCAView(props) {
|
|
7
|
-
const { content } = props;
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div className="mission-funding-cca-view">
|
|
11
|
-
<BannerTitle
|
|
12
|
-
content={{ ...content, image: '' }}
|
|
13
|
-
data={{
|
|
14
|
-
info: [{ description: '' }],
|
|
15
|
-
hideContentType: true,
|
|
16
|
-
hideCreationDate: true,
|
|
17
|
-
hideModificationDate: true,
|
|
18
|
-
hidePublishingDate: true,
|
|
19
|
-
hideDownloadButton: false,
|
|
20
|
-
hideShareButton: false,
|
|
21
|
-
subtitle: 'EU and National Funding of Climate Change Adaption',
|
|
22
|
-
}}
|
|
23
|
-
/>
|
|
24
|
-
|
|
25
|
-
<Container>
|
|
26
|
-
<PortalMessage content={content} />
|
|
27
|
-
<Grid columns="12">
|
|
28
|
-
<div className="row">
|
|
29
|
-
<Grid.Column
|
|
30
|
-
mobile={12}
|
|
31
|
-
tablet={12}
|
|
32
|
-
computer={8}
|
|
33
|
-
className="col-left"
|
|
34
|
-
>
|
|
35
|
-
{!!content.objective && content.objective.data.length > 7 && (
|
|
36
|
-
<>
|
|
37
|
-
<h3>Objective of the funding programme</h3>
|
|
38
|
-
<HTMLField value={content.objective} />
|
|
39
|
-
</>
|
|
40
|
-
)}
|
|
41
|
-
|
|
42
|
-
{!!content.funding_type && (
|
|
43
|
-
<>
|
|
44
|
-
<h3>Type of funding</h3>
|
|
45
|
-
<HTMLField value={content.funding_type} />
|
|
46
|
-
</>
|
|
47
|
-
)}
|
|
48
|
-
|
|
49
|
-
{!!content.budget_range && (
|
|
50
|
-
<>
|
|
51
|
-
<h3>Expected budget range of proposals</h3>
|
|
52
|
-
<p>{content.budget_range}</p>
|
|
53
|
-
</>
|
|
54
|
-
)}
|
|
55
|
-
|
|
56
|
-
{!!content.funding_rate && (
|
|
57
|
-
<>
|
|
58
|
-
<h3>Funding rate (percentage of covered costs)</h3>
|
|
59
|
-
<p>{content.funding_rate}</p>
|
|
60
|
-
</>
|
|
61
|
-
)}
|
|
62
|
-
<h3>
|
|
63
|
-
Can the received funding be combined with other funding sources
|
|
64
|
-
(blended)?
|
|
65
|
-
</h3>
|
|
66
|
-
<p>{content.is_blended === true ? 'Yes' : 'No'}</p>
|
|
67
|
-
<h3>Is a Consortium required to apply for the funding?</h3>
|
|
68
|
-
<p>{content.is_consortium_required === true ? 'Yes' : 'No'}</p>
|
|
69
|
-
{!!content.authority && (
|
|
70
|
-
<>
|
|
71
|
-
<h3>Administering authority</h3>
|
|
72
|
-
<p>{content.authority}</p>
|
|
73
|
-
</>
|
|
74
|
-
)}
|
|
75
|
-
{!!content.publication_page && (
|
|
76
|
-
<>
|
|
77
|
-
<h3>Publication page</h3>
|
|
78
|
-
<a href={content.publication_page}>
|
|
79
|
-
{content.publication_page}
|
|
80
|
-
</a>
|
|
81
|
-
</>
|
|
82
|
-
)}
|
|
83
|
-
{!!content.general_info && (
|
|
84
|
-
<>
|
|
85
|
-
<h3>General information</h3>
|
|
86
|
-
<a href={content.general_info}>{content.general_info}</a>
|
|
87
|
-
</>
|
|
88
|
-
)}
|
|
89
|
-
{!!content.further_info && (
|
|
90
|
-
<>
|
|
91
|
-
<h3>Further information</h3>
|
|
92
|
-
<p>{content.further_info}</p>
|
|
93
|
-
</>
|
|
94
|
-
)}
|
|
95
|
-
</Grid.Column>
|
|
96
|
-
<Grid.Column
|
|
97
|
-
mobile={12}
|
|
98
|
-
tablet={12}
|
|
99
|
-
computer={4}
|
|
100
|
-
className="col-right"
|
|
101
|
-
>
|
|
102
|
-
<div className="metadata">
|
|
103
|
-
{!!content.country && content.country.length > 0 && (
|
|
104
|
-
<>
|
|
105
|
-
<h5>Countries where the funding opportunity is offered</h5>
|
|
106
|
-
<p>
|
|
107
|
-
{content.country
|
|
108
|
-
.map((country) => country.title)
|
|
109
|
-
.join(', ')}
|
|
110
|
-
</p>
|
|
111
|
-
</>
|
|
112
|
-
)}
|
|
113
|
-
{!!content.regions && content.regions.length > 0 && (
|
|
114
|
-
<>
|
|
115
|
-
<h5>Region where the funding is offered</h5>
|
|
116
|
-
<p>{content.regions}</p>
|
|
117
|
-
</>
|
|
118
|
-
)}
|
|
119
|
-
{!!content.rast_steps && content.rast_steps.length > 0 && (
|
|
120
|
-
<>
|
|
121
|
-
<h5>RAST step(s) of relevance</h5>
|
|
122
|
-
<ul>
|
|
123
|
-
{content.rast_steps.map((step) => (
|
|
124
|
-
<li>{step.title}</li>
|
|
125
|
-
))}
|
|
126
|
-
</ul>
|
|
127
|
-
</>
|
|
128
|
-
)}
|
|
129
|
-
{!!content.eligible_entities &&
|
|
130
|
-
content.eligible_entities.length > 0 && (
|
|
131
|
-
<>
|
|
132
|
-
<h5>Eligible to receive funding</h5>
|
|
133
|
-
<ul>
|
|
134
|
-
{content.eligible_entities.map((entity) => (
|
|
135
|
-
<li>{entity.title}</li>
|
|
136
|
-
))}
|
|
137
|
-
</ul>
|
|
138
|
-
</>
|
|
139
|
-
)}
|
|
140
|
-
{!!content.sectors && content.eligible_entities.length > 0 && (
|
|
141
|
-
<>
|
|
142
|
-
<h5>Adaptation Sectors</h5>
|
|
143
|
-
<ul>
|
|
144
|
-
{content.sectors.map((sector) => (
|
|
145
|
-
<li>{sector.title}</li>
|
|
146
|
-
))}
|
|
147
|
-
</ul>
|
|
148
|
-
</>
|
|
149
|
-
)}
|
|
150
|
-
</div>
|
|
151
|
-
</Grid.Column>
|
|
152
|
-
</div>
|
|
153
|
-
</Grid>
|
|
154
|
-
<Grid columns="12">
|
|
155
|
-
<div className="row">
|
|
156
|
-
<Grid.Column
|
|
157
|
-
mobile={12}
|
|
158
|
-
tablet={12}
|
|
159
|
-
computer={12}
|
|
160
|
-
className="col-full"
|
|
161
|
-
>
|
|
162
|
-
<div className="styled-slate has--style_name--content-box-gray styled">
|
|
163
|
-
<div className="disclaimer content-box">
|
|
164
|
-
<div className="content-box-inner">
|
|
165
|
-
<p>
|
|
166
|
-
<strong>Disclaimer</strong>
|
|
167
|
-
<br />
|
|
168
|
-
The contents and links to third-party items on this
|
|
169
|
-
Mission webpage are developed by the MIP4Adapt team led by
|
|
170
|
-
Ricardo, under contract CINEA/2022/OP/0013/SI2.884597
|
|
171
|
-
funded by the European Union and do not necessarily
|
|
172
|
-
reflect those of the European Union, CINEA, or those of
|
|
173
|
-
the European Environment Agency (EEA) as host of the
|
|
174
|
-
Climate-ADAPT Platform. Neither the European Union nor
|
|
175
|
-
CINEA nor the EEA accepts responsibility or liability
|
|
176
|
-
arising out of or in connection with the information on
|
|
177
|
-
these pages.
|
|
178
|
-
</p>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
</Grid.Column>
|
|
183
|
-
</div>
|
|
184
|
-
</Grid>
|
|
185
|
-
</Container>
|
|
186
|
-
</div>
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export default MissiongFundingCCAView;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
3
|
-
import configureStore from 'redux-mock-store';
|
|
4
|
-
import { render } from '@testing-library/react';
|
|
5
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
6
|
-
import { Provider } from 'react-intl-redux';
|
|
7
|
-
import MissiongFundingCCAView from './MissionFundingCCAView';
|
|
8
|
-
import config from '@plone/volto/registry';
|
|
9
|
-
|
|
10
|
-
config.blocks = {
|
|
11
|
-
blocksConfig: {
|
|
12
|
-
title: {
|
|
13
|
-
view: () => <div>Title Block Component</div>,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const mockStore = configureStore();
|
|
19
|
-
|
|
20
|
-
describe('MissiongFundingCCAView', () => {
|
|
21
|
-
it('should render the component', () => {
|
|
22
|
-
const data = {
|
|
23
|
-
content: {
|
|
24
|
-
contributors: [],
|
|
25
|
-
country: [
|
|
26
|
-
{
|
|
27
|
-
title: 'Albania',
|
|
28
|
-
token: 'AL',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: 'Armenia',
|
|
32
|
-
token: 'AM',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
description: 'Summary',
|
|
36
|
-
eligible_entities: [
|
|
37
|
-
{
|
|
38
|
-
title: 'Social, cultural, educational bodies',
|
|
39
|
-
token: 'B_SOCIAL_CULTURAL',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
title: 'NGOs',
|
|
43
|
-
token: 'D_NGOS',
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
funding_rate: 'funding rate',
|
|
47
|
-
funding_type: {
|
|
48
|
-
'content-type': 'text/html',
|
|
49
|
-
data: '<p>type of funding</p>',
|
|
50
|
-
encoding: 'utf8',
|
|
51
|
-
},
|
|
52
|
-
further_info: 'further info',
|
|
53
|
-
general_info: '/sandbox',
|
|
54
|
-
is_blended: true,
|
|
55
|
-
is_consortium_required: false,
|
|
56
|
-
objective: {
|
|
57
|
-
'content-type': 'text/html',
|
|
58
|
-
data: '<p></p>',
|
|
59
|
-
encoding: 'utf8',
|
|
60
|
-
},
|
|
61
|
-
publication_page: 'https://google.com',
|
|
62
|
-
rast_steps: [
|
|
63
|
-
{
|
|
64
|
-
title: 'Step 1. Preparing the ground for adaptation',
|
|
65
|
-
token: 'STEP_1',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: 'Step 4. Assessing and selecting adaptation options',
|
|
69
|
-
token: 'STEP_4',
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
regions: 'region here',
|
|
73
|
-
sectors: [
|
|
74
|
-
{
|
|
75
|
-
title: 'Biodiversity',
|
|
76
|
-
token: 'BIODIVERSITY',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
title: 'Coastal areas',
|
|
80
|
-
token: 'COASTAL',
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
title: 'Title here',
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
const store = mockStore({
|
|
88
|
-
userSession: { token: '1234' },
|
|
89
|
-
intl: {
|
|
90
|
-
locale: 'en',
|
|
91
|
-
messages: {},
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const { container } = render(
|
|
96
|
-
<Provider store={store}>
|
|
97
|
-
<MemoryRouter>
|
|
98
|
-
<MissiongFundingCCAView {...data} />
|
|
99
|
-
</MemoryRouter>
|
|
100
|
-
</Provider>,
|
|
101
|
-
);
|
|
102
|
-
expect(
|
|
103
|
-
container.querySelector('.mission-funding-cca-view'),
|
|
104
|
-
).toBeInTheDocument();
|
|
105
|
-
});
|
|
106
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import Tag from '@eeacms/volto-eea-design-system/ui/Tag/Tag';
|
|
4
|
-
|
|
5
|
-
export const TokenWidget = ({ value, children, className }) =>
|
|
6
|
-
value ? (
|
|
7
|
-
<span className={cx(className, 'token', 'widget')}>
|
|
8
|
-
{value.map((tag) => (
|
|
9
|
-
<Tag href={`http://search.apps.eea.europa.eu/?q=${tag}`} key={tag}>
|
|
10
|
-
{children ? children(tag) : tag}
|
|
11
|
-
</Tag>
|
|
12
|
-
))}
|
|
13
|
-
</span>
|
|
14
|
-
) : (
|
|
15
|
-
''
|
|
16
|
-
);
|