@eeacms/volto-cca-policy 1.0.37 → 1.0.39
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 +27 -1
- package/locales/bg/LC_MESSAGES/volto.po +35 -0
- package/locales/cs/LC_MESSAGES/volto.po +35 -0
- package/locales/da/LC_MESSAGES/volto.po +35 -0
- package/locales/de/LC_MESSAGES/volto.po +35 -0
- package/locales/el/LC_MESSAGES/volto.po +35 -0
- package/locales/en/LC_MESSAGES/volto.po +35 -0
- package/locales/es/LC_MESSAGES/volto.po +35 -0
- package/locales/et/LC_MESSAGES/volto.po +35 -0
- package/locales/fi/LC_MESSAGES/volto.po +35 -0
- package/locales/fr/LC_MESSAGES/volto.po +35 -0
- package/locales/ga/LC_MESSAGES/volto.po +35 -0
- package/locales/hr/LC_MESSAGES/volto.po +35 -0
- package/locales/hu/LC_MESSAGES/volto.po +35 -0
- package/locales/is/LC_MESSAGES/volto.po +35 -0
- package/locales/it/LC_MESSAGES/volto.po +35 -0
- package/locales/lt/LC_MESSAGES/volto.po +35 -0
- package/locales/lv/LC_MESSAGES/volto.po +35 -0
- package/locales/mt/LC_MESSAGES/volto.po +35 -0
- package/locales/nl/LC_MESSAGES/volto.po +35 -0
- package/locales/nn/LC_MESSAGES/volto.po +35 -0
- package/locales/pl/LC_MESSAGES/volto.po +35 -0
- package/locales/pt/LC_MESSAGES/volto.po +35 -0
- package/locales/ro/LC_MESSAGES/volto.po +35 -0
- package/locales/sk/LC_MESSAGES/volto.po +35 -0
- package/locales/sl/LC_MESSAGES/volto.po +35 -0
- package/locales/sv/LC_MESSAGES/volto.po +35 -0
- package/locales/tr/LC_MESSAGES/volto.po +35 -0
- package/locales/volto.pot +36 -1
- package/package.json +1 -1
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapState.jsx +72 -0
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapState.test.jsx +46 -0
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.jsx +30 -3
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.test.jsx +99 -16
- package/src/components/Search/NavigatorCatalogue/NavigatorGeographicCoverageFacet.jsx +47 -39
- package/src/components/Search/NavigatorCatalogue/NavigatorGeographicCoverageFacet.test.jsx +65 -1
- package/src/components/Search/NavigatorCatalogue/utils.js +40 -8
- package/src/components/Search/NavigatorGuide/NavigatorGuideContentView.test.jsx +67 -0
- package/src/components/theme/CompareTools/CompareToolsView.test.jsx +59 -0
- package/theme/globals/navigator.less +83 -1
|
@@ -11,6 +11,11 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "4 or more"
|
|
15
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapView
|
|
16
|
+
msgid "4 or more"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
14
19
|
#. Default: "A background document for the event is available"
|
|
15
20
|
#: components/theme/Views/CcaEventView
|
|
16
21
|
msgid "A background document for the event is available"
|
|
@@ -293,6 +298,16 @@ msgstr "mesto:"
|
|
|
293
298
|
msgid "Clear all"
|
|
294
299
|
msgstr ""
|
|
295
300
|
|
|
301
|
+
#. Default: "Clear filters"
|
|
302
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
303
|
+
msgid "Clear filters"
|
|
304
|
+
msgstr ""
|
|
305
|
+
|
|
306
|
+
#. Default: "Clear other geographic coverage filters to enable the map."
|
|
307
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
308
|
+
msgid "Clear other geographic coverage filters to enable the map."
|
|
309
|
+
msgstr ""
|
|
310
|
+
|
|
296
311
|
#. Default: "Climate Impacts"
|
|
297
312
|
#: search/cca/facets
|
|
298
313
|
#: search/common
|
|
@@ -949,6 +964,11 @@ msgstr "Upravljanje in načrtovanje"
|
|
|
949
964
|
msgid "Map view"
|
|
950
965
|
msgstr ""
|
|
951
966
|
|
|
967
|
+
#. Default: "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
968
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
969
|
+
msgid "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
970
|
+
msgstr ""
|
|
971
|
+
|
|
952
972
|
#. Default: "Mission story"
|
|
953
973
|
#: messages
|
|
954
974
|
msgid "Mission story"
|
|
@@ -1060,6 +1080,11 @@ msgstr "Ne-EU jeziki"
|
|
|
1060
1080
|
msgid "Not available"
|
|
1061
1081
|
msgstr ""
|
|
1062
1082
|
|
|
1083
|
+
#. Default: "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1084
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1085
|
+
msgid "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1086
|
+
msgstr ""
|
|
1087
|
+
|
|
1063
1088
|
#. Default: "Objectives of the adaptation measure"
|
|
1064
1089
|
#: components/theme/Views/CaseStudyView
|
|
1065
1090
|
msgid "Objectives of the adaptation measure"
|
|
@@ -1373,6 +1398,11 @@ msgstr "Oglejte si video zunaj Climate-ADAPT"
|
|
|
1373
1398
|
msgid "Select"
|
|
1374
1399
|
msgstr "Izberite"
|
|
1375
1400
|
|
|
1401
|
+
#. Default: "Select a country to explore the map"
|
|
1402
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
1403
|
+
msgid "Select a country to explore the map"
|
|
1404
|
+
msgstr ""
|
|
1405
|
+
|
|
1376
1406
|
#. Default: "Select all that apply"
|
|
1377
1407
|
#: components/Search/NavigatorGuide/NavigatorGuideContentView
|
|
1378
1408
|
msgid "Select all that apply"
|
|
@@ -1519,6 +1549,11 @@ msgstr ""
|
|
|
1519
1549
|
msgid "These items will have broken links"
|
|
1520
1550
|
msgstr ""
|
|
1521
1551
|
|
|
1552
|
+
#. Default: "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1553
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1554
|
+
msgid "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1555
|
+
msgstr ""
|
|
1556
|
+
|
|
1522
1557
|
#. Default: "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
1523
1558
|
#: components/theme/PortalMessage/PortalMessage
|
|
1524
1559
|
msgid "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
@@ -11,6 +11,11 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "4 or more"
|
|
15
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapView
|
|
16
|
+
msgid "4 or more"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
14
19
|
#. Default: "A background document for the event is available"
|
|
15
20
|
#: components/theme/Views/CcaEventView
|
|
16
21
|
msgid "A background document for the event is available"
|
|
@@ -293,6 +298,16 @@ msgstr "Stad:"
|
|
|
293
298
|
msgid "Clear all"
|
|
294
299
|
msgstr ""
|
|
295
300
|
|
|
301
|
+
#. Default: "Clear filters"
|
|
302
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
303
|
+
msgid "Clear filters"
|
|
304
|
+
msgstr ""
|
|
305
|
+
|
|
306
|
+
#. Default: "Clear other geographic coverage filters to enable the map."
|
|
307
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
308
|
+
msgid "Clear other geographic coverage filters to enable the map."
|
|
309
|
+
msgstr ""
|
|
310
|
+
|
|
296
311
|
#. Default: "Climate Impacts"
|
|
297
312
|
#: search/cca/facets
|
|
298
313
|
#: search/common
|
|
@@ -949,6 +964,11 @@ msgstr "Ledning och planering"
|
|
|
949
964
|
msgid "Map view"
|
|
950
965
|
msgstr ""
|
|
951
966
|
|
|
967
|
+
#. Default: "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
968
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
969
|
+
msgid "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
970
|
+
msgstr ""
|
|
971
|
+
|
|
952
972
|
#. Default: "Mission story"
|
|
953
973
|
#: messages
|
|
954
974
|
msgid "Mission story"
|
|
@@ -1060,6 +1080,11 @@ msgstr "Språk utanför EU"
|
|
|
1060
1080
|
msgid "Not available"
|
|
1061
1081
|
msgstr ""
|
|
1062
1082
|
|
|
1083
|
+
#. Default: "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1084
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1085
|
+
msgid "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1086
|
+
msgstr ""
|
|
1087
|
+
|
|
1063
1088
|
#. Default: "Objectives of the adaptation measure"
|
|
1064
1089
|
#: components/theme/Views/CaseStudyView
|
|
1065
1090
|
msgid "Objectives of the adaptation measure"
|
|
@@ -1373,6 +1398,11 @@ msgstr "Se video utanför Climate-ADAPT"
|
|
|
1373
1398
|
msgid "Select"
|
|
1374
1399
|
msgstr "Välja"
|
|
1375
1400
|
|
|
1401
|
+
#. Default: "Select a country to explore the map"
|
|
1402
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
1403
|
+
msgid "Select a country to explore the map"
|
|
1404
|
+
msgstr ""
|
|
1405
|
+
|
|
1376
1406
|
#. Default: "Select all that apply"
|
|
1377
1407
|
#: components/Search/NavigatorGuide/NavigatorGuideContentView
|
|
1378
1408
|
msgid "Select all that apply"
|
|
@@ -1519,6 +1549,11 @@ msgstr ""
|
|
|
1519
1549
|
msgid "These items will have broken links"
|
|
1520
1550
|
msgstr ""
|
|
1521
1551
|
|
|
1552
|
+
#. Default: "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1553
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1554
|
+
msgid "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1555
|
+
msgstr ""
|
|
1556
|
+
|
|
1522
1557
|
#. Default: "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
1523
1558
|
#: components/theme/PortalMessage/PortalMessage
|
|
1524
1559
|
msgid "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
@@ -11,6 +11,11 @@ msgstr ""
|
|
|
11
11
|
"Content-Transfer-Encoding: \n"
|
|
12
12
|
"Plural-Forms: \n"
|
|
13
13
|
|
|
14
|
+
#. Default: "4 or more"
|
|
15
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapView
|
|
16
|
+
msgid "4 or more"
|
|
17
|
+
msgstr ""
|
|
18
|
+
|
|
14
19
|
#. Default: "A background document for the event is available"
|
|
15
20
|
#: components/theme/Views/CcaEventView
|
|
16
21
|
msgid "A background document for the event is available"
|
|
@@ -293,6 +298,16 @@ msgstr "Şehir:"
|
|
|
293
298
|
msgid "Clear all"
|
|
294
299
|
msgstr ""
|
|
295
300
|
|
|
301
|
+
#. Default: "Clear filters"
|
|
302
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
303
|
+
msgid "Clear filters"
|
|
304
|
+
msgstr ""
|
|
305
|
+
|
|
306
|
+
#. Default: "Clear other geographic coverage filters to enable the map."
|
|
307
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
308
|
+
msgid "Clear other geographic coverage filters to enable the map."
|
|
309
|
+
msgstr ""
|
|
310
|
+
|
|
296
311
|
#. Default: "Climate Impacts"
|
|
297
312
|
#: search/cca/facets
|
|
298
313
|
#: search/common
|
|
@@ -949,6 +964,11 @@ msgstr "Yönetim ve planlama"
|
|
|
949
964
|
msgid "Map view"
|
|
950
965
|
msgstr ""
|
|
951
966
|
|
|
967
|
+
#. Default: "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
968
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
969
|
+
msgid "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
970
|
+
msgstr ""
|
|
971
|
+
|
|
952
972
|
#. Default: "Mission story"
|
|
953
973
|
#: messages
|
|
954
974
|
msgid "Mission story"
|
|
@@ -1060,6 +1080,11 @@ msgstr "AB Dışı Diller"
|
|
|
1060
1080
|
msgid "Not available"
|
|
1061
1081
|
msgstr ""
|
|
1062
1082
|
|
|
1083
|
+
#. Default: "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1084
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1085
|
+
msgid "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1086
|
+
msgstr ""
|
|
1087
|
+
|
|
1063
1088
|
#. Default: "Objectives of the adaptation measure"
|
|
1064
1089
|
#: components/theme/Views/CaseStudyView
|
|
1065
1090
|
msgid "Objectives of the adaptation measure"
|
|
@@ -1373,6 +1398,11 @@ msgstr "Climate-ADAPT dışındaki videoyu izleyin"
|
|
|
1373
1398
|
msgid "Select"
|
|
1374
1399
|
msgstr "Seçme"
|
|
1375
1400
|
|
|
1401
|
+
#. Default: "Select a country to explore the map"
|
|
1402
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
1403
|
+
msgid "Select a country to explore the map"
|
|
1404
|
+
msgstr ""
|
|
1405
|
+
|
|
1376
1406
|
#. Default: "Select all that apply"
|
|
1377
1407
|
#: components/Search/NavigatorGuide/NavigatorGuideContentView
|
|
1378
1408
|
msgid "Select all that apply"
|
|
@@ -1519,6 +1549,11 @@ msgstr ""
|
|
|
1519
1549
|
msgid "These items will have broken links"
|
|
1520
1550
|
msgstr ""
|
|
1521
1551
|
|
|
1552
|
+
#. Default: "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1553
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1554
|
+
msgid "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1555
|
+
msgstr ""
|
|
1556
|
+
|
|
1522
1557
|
#. Default: "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
1523
1558
|
#: components/theme/PortalMessage/PortalMessage
|
|
1524
1559
|
msgid "This object has been archived because its content is outdated. You can still access it as legacy."
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date: 2026-10-
|
|
4
|
+
"POT-Creation-Date: 2026-10-12T08:25:29.939Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
@@ -13,6 +13,11 @@ msgstr ""
|
|
|
13
13
|
"Preferred-Encodings: utf-8\n"
|
|
14
14
|
"Domain: volto\n"
|
|
15
15
|
|
|
16
|
+
#. Default: "4 or more"
|
|
17
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapView
|
|
18
|
+
msgid "4 or more"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
16
21
|
#. Default: "A background document for the event is available"
|
|
17
22
|
#: components/theme/Views/CcaEventView
|
|
18
23
|
msgid "A background document for the event is available"
|
|
@@ -295,6 +300,16 @@ msgstr ""
|
|
|
295
300
|
msgid "Clear all"
|
|
296
301
|
msgstr ""
|
|
297
302
|
|
|
303
|
+
#. Default: "Clear filters"
|
|
304
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
305
|
+
msgid "Clear filters"
|
|
306
|
+
msgstr ""
|
|
307
|
+
|
|
308
|
+
#. Default: "Clear other geographic coverage filters to enable the map."
|
|
309
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
310
|
+
msgid "Clear other geographic coverage filters to enable the map."
|
|
311
|
+
msgstr ""
|
|
312
|
+
|
|
298
313
|
#. Default: "Climate Impacts"
|
|
299
314
|
#: search/cca/facets
|
|
300
315
|
#: search/common
|
|
@@ -951,6 +966,11 @@ msgstr ""
|
|
|
951
966
|
msgid "Map view"
|
|
952
967
|
msgstr ""
|
|
953
968
|
|
|
969
|
+
#. Default: "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
970
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
971
|
+
msgid "Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>."
|
|
972
|
+
msgstr ""
|
|
973
|
+
|
|
954
974
|
#. Default: "Mission story"
|
|
955
975
|
#: messages
|
|
956
976
|
msgid "Mission story"
|
|
@@ -1062,6 +1082,11 @@ msgstr ""
|
|
|
1062
1082
|
msgid "Not available"
|
|
1063
1083
|
msgstr ""
|
|
1064
1084
|
|
|
1085
|
+
#. Default: "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1086
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1087
|
+
msgid "Number of adaptation support cycle steps supported, from 1 to 6 steps."
|
|
1088
|
+
msgstr ""
|
|
1089
|
+
|
|
1065
1090
|
#. Default: "Objectives of the adaptation measure"
|
|
1066
1091
|
#: components/theme/Views/CaseStudyView
|
|
1067
1092
|
msgid "Objectives of the adaptation measure"
|
|
@@ -1375,6 +1400,11 @@ msgstr ""
|
|
|
1375
1400
|
msgid "Select"
|
|
1376
1401
|
msgstr ""
|
|
1377
1402
|
|
|
1403
|
+
#. Default: "Select a country to explore the map"
|
|
1404
|
+
#: components/Search/NavigatorCatalogue/NavigatorCatalogueMapState
|
|
1405
|
+
msgid "Select a country to explore the map"
|
|
1406
|
+
msgstr ""
|
|
1407
|
+
|
|
1378
1408
|
#. Default: "Select all that apply"
|
|
1379
1409
|
#: components/Search/NavigatorGuide/NavigatorGuideContentView
|
|
1380
1410
|
msgid "Select all that apply"
|
|
@@ -1521,6 +1551,11 @@ msgstr ""
|
|
|
1521
1551
|
msgid "These items will have broken links"
|
|
1522
1552
|
msgstr ""
|
|
1523
1553
|
|
|
1554
|
+
#. Default: "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1555
|
+
#: components/theme/CompareTools/CompareToolsView
|
|
1556
|
+
msgid "This indicates how easy the tool and its outputs are to understand and interpret, with low = high-level expertise needed, moderate = some prior technical/scientific knowledge needed, high = general user-friendly, minimal technical knowledge needed."
|
|
1557
|
+
msgstr ""
|
|
1558
|
+
|
|
1524
1559
|
#. Default: "This object has been archived because its content is outdated. You can still access it as legacy."
|
|
1525
1560
|
#: components/theme/PortalMessage/PortalMessage
|
|
1526
1561
|
msgid "This object has been archived because its content is outdated. You can still access it as legacy."
|
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from 'semantic-ui-react';
|
|
3
|
+
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
const messages = defineMessages({
|
|
6
|
+
countrySelectionRequired: {
|
|
7
|
+
id: 'Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>.',
|
|
8
|
+
defaultMessage:
|
|
9
|
+
'Map view is only applicable when countries are selected in the <strong>Geographic coverage</strong>.',
|
|
10
|
+
},
|
|
11
|
+
clearGeographicCoverageFilters: {
|
|
12
|
+
id: 'Clear other geographic coverage filters to enable the map.',
|
|
13
|
+
defaultMessage:
|
|
14
|
+
'Clear other geographic coverage filters to enable the map.',
|
|
15
|
+
},
|
|
16
|
+
clearGeographicCoverageFiltersButton: {
|
|
17
|
+
id: 'Clear filters',
|
|
18
|
+
defaultMessage: 'Clear filters',
|
|
19
|
+
},
|
|
20
|
+
selectCountryForMap: {
|
|
21
|
+
id: 'Select a country to explore the map',
|
|
22
|
+
defaultMessage: 'Select a country to explore the map',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const NavigatorCatalogueMapState = ({ children, isMapDisabled, onClear }) => {
|
|
27
|
+
const intl = useIntl();
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div
|
|
31
|
+
className={`navigator-catalogue-map-state${
|
|
32
|
+
isMapDisabled ? ' is-disabled' : ''
|
|
33
|
+
}`}
|
|
34
|
+
aria-disabled={isMapDisabled || undefined}
|
|
35
|
+
>
|
|
36
|
+
<div
|
|
37
|
+
className="navigator-catalogue-map-content"
|
|
38
|
+
aria-hidden={isMapDisabled || undefined}
|
|
39
|
+
inert={isMapDisabled ? '' : undefined}
|
|
40
|
+
>
|
|
41
|
+
{children}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
{isMapDisabled && (
|
|
45
|
+
<div className="navigator-catalogue-map-overlay">
|
|
46
|
+
<div className="navigator-catalogue-map-notice">
|
|
47
|
+
<h4>{intl.formatMessage(messages.selectCountryForMap)}</h4>
|
|
48
|
+
<p>
|
|
49
|
+
<FormattedMessage
|
|
50
|
+
{...messages.countrySelectionRequired}
|
|
51
|
+
values={{ strong: (text) => <strong>{text}</strong> }}
|
|
52
|
+
/>
|
|
53
|
+
</p>
|
|
54
|
+
<p>
|
|
55
|
+
<FormattedMessage {...messages.clearGeographicCoverageFilters} />
|
|
56
|
+
</p>
|
|
57
|
+
<Button
|
|
58
|
+
className="primary map-notice-clear-button"
|
|
59
|
+
onClick={onClear}
|
|
60
|
+
>
|
|
61
|
+
{intl.formatMessage(
|
|
62
|
+
messages.clearGeographicCoverageFiltersButton,
|
|
63
|
+
)}
|
|
64
|
+
</Button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default NavigatorCatalogueMapState;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@testing-library/jest-dom';
|
|
3
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
4
|
+
import { IntlProvider } from 'react-intl';
|
|
5
|
+
import NavigatorCatalogueMapState from './NavigatorCatalogueMapState';
|
|
6
|
+
|
|
7
|
+
const renderMapState = (props) =>
|
|
8
|
+
render(
|
|
9
|
+
<IntlProvider locale="en">
|
|
10
|
+
<NavigatorCatalogueMapState {...props}>
|
|
11
|
+
<div data-testid="country-map">Map</div>
|
|
12
|
+
</NavigatorCatalogueMapState>
|
|
13
|
+
</IntlProvider>,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
describe('NavigatorCatalogueMapState', () => {
|
|
17
|
+
it('leaves the map interactive when it is enabled', () => {
|
|
18
|
+
renderMapState({ isMapDisabled: false, onClear: jest.fn() });
|
|
19
|
+
|
|
20
|
+
expect(screen.getByTestId('country-map').parentElement).not.toHaveAttribute(
|
|
21
|
+
'inert',
|
|
22
|
+
);
|
|
23
|
+
expect(
|
|
24
|
+
screen.queryByText('Select a country to explore the map'),
|
|
25
|
+
).not.toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('disables the map and handles the clear action', () => {
|
|
29
|
+
const onClear = jest.fn();
|
|
30
|
+
renderMapState({ isMapDisabled: true, onClear });
|
|
31
|
+
|
|
32
|
+
expect(screen.getByTestId('country-map').parentElement).toHaveAttribute(
|
|
33
|
+
'inert',
|
|
34
|
+
);
|
|
35
|
+
expect(
|
|
36
|
+
screen.getByText('Select a country to explore the map'),
|
|
37
|
+
).toBeInTheDocument();
|
|
38
|
+
|
|
39
|
+
fireEvent.click(
|
|
40
|
+
screen.getByRole('button', {
|
|
41
|
+
name: 'Clear filters',
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
expect(onClear).toHaveBeenCalledTimes(1);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -22,10 +22,13 @@ import {
|
|
|
22
22
|
getColorForCount,
|
|
23
23
|
normalizeCountryName,
|
|
24
24
|
buildCountryCounts,
|
|
25
|
+
clearMapIncompatibleGeographicFilters,
|
|
25
26
|
filterCountryCounts,
|
|
27
|
+
hasMapIncompatibleGeographicSelection,
|
|
26
28
|
mapLegendItems,
|
|
27
29
|
setCountryFilter,
|
|
28
30
|
} from './utils';
|
|
31
|
+
import NavigatorCatalogueMapState from './NavigatorCatalogueMapState';
|
|
29
32
|
|
|
30
33
|
const messages = defineMessages({
|
|
31
34
|
toolAvailability: {
|
|
@@ -41,6 +44,10 @@ const messages = defineMessages({
|
|
|
41
44
|
id: 'Tools per country',
|
|
42
45
|
defaultMessage: 'Tools per country',
|
|
43
46
|
},
|
|
47
|
+
fourOrMore: {
|
|
48
|
+
id: '4 or more',
|
|
49
|
+
defaultMessage: '4 or more',
|
|
50
|
+
},
|
|
44
51
|
close: {
|
|
45
52
|
id: 'Close',
|
|
46
53
|
defaultMessage: 'Close',
|
|
@@ -140,7 +147,7 @@ const CountryClickInteractions = ({ ol, countryCounts, onExploreTools }) => {
|
|
|
140
147
|
};
|
|
141
148
|
|
|
142
149
|
/* istanbul ignore next */
|
|
143
|
-
const
|
|
150
|
+
const NavigatorCatalogueCountryMap = (props) => {
|
|
144
151
|
const { geofeatures, projection, ol } = props;
|
|
145
152
|
const intl = useIntl();
|
|
146
153
|
const searchContext = useSearchContext();
|
|
@@ -260,9 +267,13 @@ const NavigatorCatalogueMapViewInner = (props) => {
|
|
|
260
267
|
<div key={item.label} className="legend-item">
|
|
261
268
|
<span
|
|
262
269
|
className="legend-color"
|
|
263
|
-
style={{
|
|
270
|
+
style={{ '--legend-color': item.color }}
|
|
264
271
|
/>
|
|
265
|
-
<span>
|
|
272
|
+
<span>
|
|
273
|
+
{item.messageKey
|
|
274
|
+
? intl.formatMessage(messages[item.messageKey])
|
|
275
|
+
: item.label}
|
|
276
|
+
</span>
|
|
266
277
|
</div>
|
|
267
278
|
))}
|
|
268
279
|
</aside>
|
|
@@ -270,6 +281,22 @@ const NavigatorCatalogueMapViewInner = (props) => {
|
|
|
270
281
|
);
|
|
271
282
|
};
|
|
272
283
|
|
|
284
|
+
const NavigatorCatalogueMapViewInner = (props) => {
|
|
285
|
+
const searchContext = useSearchContext();
|
|
286
|
+
const isMapDisabled = hasMapIncompatibleGeographicSelection(
|
|
287
|
+
searchContext.filters,
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
return (
|
|
291
|
+
<NavigatorCatalogueMapState
|
|
292
|
+
isMapDisabled={isMapDisabled}
|
|
293
|
+
onClear={() => clearMapIncompatibleGeographicFilters(searchContext)}
|
|
294
|
+
>
|
|
295
|
+
<NavigatorCatalogueCountryMap {...props} />
|
|
296
|
+
</NavigatorCatalogueMapState>
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
|
|
273
300
|
/* istanbul ignore next */
|
|
274
301
|
export default compose(
|
|
275
302
|
withClientOnly,
|
|
@@ -3,34 +3,31 @@ import {
|
|
|
3
3
|
getColorForCount,
|
|
4
4
|
normalizeCountryName,
|
|
5
5
|
buildCountryCounts,
|
|
6
|
+
clearMapIncompatibleGeographicFilters,
|
|
6
7
|
filterCountryCounts,
|
|
8
|
+
hasMapIncompatibleGeographicSelection,
|
|
7
9
|
mapLegendItems,
|
|
8
10
|
setCountryFilter,
|
|
9
11
|
} from './utils';
|
|
10
12
|
|
|
11
13
|
describe('getColorForCount', () => {
|
|
12
|
-
it('returns darkest green for
|
|
14
|
+
it('returns darkest green for 4 or more tools', () => {
|
|
15
|
+
expect(getColorForCount(4)).toBe('#0F6B3F');
|
|
13
16
|
expect(getColorForCount(10)).toBe('#0F6B3F');
|
|
14
17
|
expect(getColorForCount(15)).toBe('#0F6B3F');
|
|
15
18
|
expect(getColorForCount(100)).toBe('#0F6B3F');
|
|
16
19
|
});
|
|
17
20
|
|
|
18
|
-
it('returns dark green for
|
|
19
|
-
expect(getColorForCount(
|
|
20
|
-
expect(getColorForCount(8)).toBe('#007B6C');
|
|
21
|
-
expect(getColorForCount(9)).toBe('#007B6C');
|
|
21
|
+
it('returns dark green for 3 tools', () => {
|
|
22
|
+
expect(getColorForCount(3)).toBe('#007B6C');
|
|
22
23
|
});
|
|
23
24
|
|
|
24
|
-
it('returns base accent green for
|
|
25
|
-
expect(getColorForCount(
|
|
26
|
-
expect(getColorForCount(5)).toBe('#84C79A');
|
|
27
|
-
expect(getColorForCount(6)).toBe('#84C79A');
|
|
25
|
+
it('returns base accent green for 2 tools', () => {
|
|
26
|
+
expect(getColorForCount(2)).toBe('#84C79A');
|
|
28
27
|
});
|
|
29
28
|
|
|
30
|
-
it('returns light green for 1
|
|
29
|
+
it('returns light green for 1 tool', () => {
|
|
31
30
|
expect(getColorForCount(1)).toBe('#C2E3CD');
|
|
32
|
-
expect(getColorForCount(2)).toBe('#C2E3CD');
|
|
33
|
-
expect(getColorForCount(3)).toBe('#C2E3CD');
|
|
34
31
|
});
|
|
35
32
|
|
|
36
33
|
it('returns lightest gray-green for 0 or falsy counts', () => {
|
|
@@ -185,6 +182,92 @@ describe('filterCountryCounts', () => {
|
|
|
185
182
|
});
|
|
186
183
|
});
|
|
187
184
|
|
|
185
|
+
describe('hasMapIncompatibleGeographicSelection', () => {
|
|
186
|
+
it('allows no geographic selection and country selections', () => {
|
|
187
|
+
expect(hasMapIncompatibleGeographicSelection()).toBe(false);
|
|
188
|
+
expect(hasMapIncompatibleGeographicSelection([])).toBe(false);
|
|
189
|
+
expect(
|
|
190
|
+
hasMapIncompatibleGeographicSelection([
|
|
191
|
+
{
|
|
192
|
+
field: 'cca_geographic_countries.keyword',
|
|
193
|
+
values: [],
|
|
194
|
+
type: 'any',
|
|
195
|
+
},
|
|
196
|
+
]),
|
|
197
|
+
).toBe(false);
|
|
198
|
+
expect(
|
|
199
|
+
hasMapIncompatibleGeographicSelection([
|
|
200
|
+
{
|
|
201
|
+
field: 'cca_geographic_countries.keyword',
|
|
202
|
+
values: ['Germany'],
|
|
203
|
+
type: 'any',
|
|
204
|
+
},
|
|
205
|
+
]),
|
|
206
|
+
).toBe(false);
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
it('rejects Global, Europe, and transnational selections', () => {
|
|
210
|
+
expect(
|
|
211
|
+
hasMapIncompatibleGeographicSelection([
|
|
212
|
+
{
|
|
213
|
+
field: 'cca_navigator_geographic_scope',
|
|
214
|
+
values: ['Global', 'Europe'],
|
|
215
|
+
type: 'any',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
field: 'cca_geographic_transnational_region.keyword',
|
|
219
|
+
values: ['Alpine Space'],
|
|
220
|
+
type: 'any',
|
|
221
|
+
},
|
|
222
|
+
]),
|
|
223
|
+
).toBe(true);
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
describe('clearMapIncompatibleGeographicFilters', () => {
|
|
228
|
+
it('clears only map-incompatible geographic filters', () => {
|
|
229
|
+
const searchContext = {
|
|
230
|
+
filters: [
|
|
231
|
+
{
|
|
232
|
+
field: 'cca_navigator_geographic_scope',
|
|
233
|
+
values: ['Europe'],
|
|
234
|
+
type: 'any',
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
field: 'cca_geographic_transnational_region.keyword',
|
|
238
|
+
values: ['Alpine Space'],
|
|
239
|
+
type: 'any',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
field: 'cca_geographic_countries.keyword',
|
|
243
|
+
values: ['Germany'],
|
|
244
|
+
type: 'any',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
field: 'cca_climate_impacts.keyword',
|
|
248
|
+
values: ['Flooding'],
|
|
249
|
+
type: 'any',
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
removeFilter: jest.fn(),
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
clearMapIncompatibleGeographicFilters(searchContext);
|
|
256
|
+
|
|
257
|
+
expect(searchContext.removeFilter).toHaveBeenCalledTimes(2);
|
|
258
|
+
expect(searchContext.removeFilter).toHaveBeenCalledWith(
|
|
259
|
+
'cca_navigator_geographic_scope',
|
|
260
|
+
null,
|
|
261
|
+
'any',
|
|
262
|
+
);
|
|
263
|
+
expect(searchContext.removeFilter).toHaveBeenCalledWith(
|
|
264
|
+
'cca_geographic_transnational_region.keyword',
|
|
265
|
+
null,
|
|
266
|
+
'any',
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
|
|
188
271
|
describe('mapLegendItems', () => {
|
|
189
272
|
it('has 5 legend items', () => {
|
|
190
273
|
expect(mapLegendItems).toHaveLength(5);
|
|
@@ -200,10 +283,10 @@ describe('mapLegendItems', () => {
|
|
|
200
283
|
|
|
201
284
|
it('has correct labels', () => {
|
|
202
285
|
expect(mapLegendItems.map((item) => item.label)).toEqual([
|
|
203
|
-
'
|
|
204
|
-
'
|
|
205
|
-
'
|
|
206
|
-
'1
|
|
286
|
+
'4 or more',
|
|
287
|
+
'3',
|
|
288
|
+
'2',
|
|
289
|
+
'1',
|
|
207
290
|
'None',
|
|
208
291
|
]);
|
|
209
292
|
});
|